diff options
author | Maggie Benthall <mbenthall@google.com> | 2013-09-14 18:00:12 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-09-14 18:00:13 +0000 |
commit | f5aba5ad1e09829a13bd0ad4912e45ff3d773176 (patch) | |
tree | 3633494467fca00503e117ff5d06ad55ec986091 /packages/SystemUI/src | |
parent | 276e6c7a89ed91dbf3e4fe9f46d19e82656d8fd9 (diff) | |
parent | 0469f41010d8001dba5e09606bb631b1d3313021 (diff) | |
download | frameworks_base-f5aba5ad1e09829a13bd0ad4912e45ff3d773176.zip frameworks_base-f5aba5ad1e09829a13bd0ad4912e45ff3d773176.tar.gz frameworks_base-f5aba5ad1e09829a13bd0ad4912e45ff3d773176.tar.bz2 |
Merge "CA cert monitoring: add notifications and actions for dialog" into klp-dev
Diffstat (limited to 'packages/SystemUI/src')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java | 43 |
1 files changed, 2 insertions, 41 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java index 68ee2b5..ceed30e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java @@ -194,7 +194,7 @@ class QuickSettings { mQueryCertTask = new AsyncTask<Void, Void, Pair<Boolean, Boolean>>() { @Override protected Pair<Boolean, Boolean> doInBackground(Void... params) { - boolean hasCert = mDevicePolicyManager.hasAnyCaCertsInstalled(); + boolean hasCert = DevicePolicyManager.hasAnyCaCertsInstalled(); boolean isManaged = mDevicePolicyManager.getDeviceOwner() != null; return Pair.create(hasCert, isManaged); @@ -764,7 +764,7 @@ class QuickSettings { @Override public void onClick(View v) { collapsePanels(); - showSslCaCertWarningDialog(); + startSettingsActivity(Settings.ACTION_MONITORING_CERT_INFO); } }); @@ -832,45 +832,6 @@ class QuickSettings { dialog.show(); } - private void showSslCaCertWarningDialog() { - final AlertDialog.Builder builder = new AlertDialog.Builder(mContext); - builder.setTitle(R.string.ssl_ca_cert_dialog_title); - builder.setCancelable(true); - final boolean hasDeviceOwner = mDevicePolicyManager.getDeviceOwner() != null; - int buttonLabel; - if (hasDeviceOwner) { - // Institutional case. Show informational message. - String message = mContext.getResources().getString(R.string.ssl_ca_cert_info_message, - mDevicePolicyManager.getDeviceOwnerName()); - builder.setMessage(message); - buttonLabel = R.string.done_button; - } else { - // Consumer case. Show scary warning. - builder.setMessage(R.string.ssl_ca_cert_warning_message); - buttonLabel = R.string.ssl_ca_cert_settings_button; - } - - builder.setPositiveButton(buttonLabel, new OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - // do something. - if (hasDeviceOwner) { - // Close - } else { - startSettingsActivity("com.android.settings.TRUSTED_CREDENTIALS_USER"); - } - } - }); - - final Dialog dialog = builder.create(); - dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT); - try { - WindowManagerGlobal.getWindowManagerService().dismissKeyguard(); - } catch (RemoteException e) { - } - dialog.show(); - } - private void updateWifiDisplayStatus() { mWifiDisplayStatus = mDisplayManager.getWifiDisplayStatus(); applyWifiDisplayStatus(); |