diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/SystemUI/res/values/strings.xml | 13 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java | 43 |
2 files changed, 3 insertions, 53 deletions
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index 3ffa6f4..bbfe383 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -500,16 +500,5 @@ <!-- Shows up when there is a user SSL CA Cert installed on the device. Indicates to the user that SSL traffic can be intercepted. [CHAR LIMIT=NONE] --> <string name="ssl_ca_cert_warning">Network may be monitored</string> - <!-- Button to close the SSL CA cert warning dialog box. [CHAR LIMIT=NONE] --> - <string name="done_button">Done</string> - <!-- Title of Dialog warning users of SSL monitoring. [CHAR LIMIT=NONE] --> - <string name="ssl_ca_cert_dialog_title">Network Monitoring</string> - <!-- Text of message to show to users whose administrator has installed a SSL CA Cert. - [CHAR LIMIT=NONE] --> - <string name="ssl_ca_cert_info_message">This device is managed by: <xliff:g id="managing_domain">%s</xliff:g>.\n\nYour administrator is capable of monitoring your network activity, including emails, apps, and secure websites.\n\nFor more information,contact your administrator.</string> - <!-- Text of warning to show to users that have a SSL CA Cert installed. [CHAR LIMIT=NONE] --> - <string name="ssl_ca_cert_warning_message">A third party is capable of monitoring your network\nactivity, including emails, apps, and secure websites.\n\nA trusted credential installed on your device is making this possible.</string> - <!-- Label on button that will take the user to the Trusted Credentials settings page. - [CHAR LIMIT=NONE]--> - <string name="ssl_ca_cert_settings_button">Check trusted credentials</string> + </resources> 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(); |