65 {
66 this.activity = activity;
67 this.cancelListener = cancelListener;
68
69 dlgVerifyCertificate = new AlertDialog.Builder(activity)
70 .setTitle(R.string.dlg_title_verify_certificate)
71 .setPositiveButton(android.R.string.yes,
72 (dialog, which) -> {
73 callbackDialogResult = true;
74 synchronized (dialog)
75 {
76 dialog.notify();
77 }
78 })
79 .setNegativeButton(android.R.string.no,
80 (dialog, which) -> {
81 callbackDialogResult = false;
82 notifyCancel();
83 synchronized (dialog)
84 {
85 dialog.notify();
86 }
87 })
88 .setCancelable(false)
89 .create();
90
91 userCredView = activity.getLayoutInflater().inflate(R.layout.credentials, null, true);
92 dlgUserCredentials = new AlertDialog.Builder(activity)
93 .setView(userCredView)
94 .setTitle(R.string.dlg_title_credentials)
95 .setPositiveButton(android.R.string.ok,
96 (dialog, which) -> {
97 callbackDialogResult = true;
98 synchronized (dialog)
99 {
100 dialog.notify();
101 }
102 })
103 .setNegativeButton(android.R.string.cancel,
104 (dialog, which) -> {
105 callbackDialogResult = false;
106 notifyCancel();
107 synchronized (dialog)
108 {
109 dialog.notify();
110 }
111 })
112 .setCancelable(false)
113 .create();
114
115 dlgExperimental = new AlertDialog.Builder(activity)
116 .setTitle(R.string.dlg_title_experimental_feature)
117 .setPositiveButton(R.string.menu_app_settings,
118 (dialog, which) -> {
119 openExperimentalSettings();
120 synchronized (dialog)
121 {
122 dialog.notify();
123 }
124 })
125 .setNegativeButton(android.R.string.cancel,
126 (dialog, which) -> {
127 notifyCancel();
128 synchronized (dialog)
129 {
130 dialog.notify();
131 }
132 })
133 .setCancelable(false)
134 .create();
135 }