summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/SettingsInitialize.java
diff options
context:
space:
mode:
authorGustav Sennton <gsennton@google.com>2016-12-13 19:16:48 +0000
committerGustav Sennton <gsennton@google.com>2017-01-23 18:34:11 +0000
commit4d3334c50b07c60c137085a35a8fb670eabd2aca (patch)
tree1eaff22641a31c735b53d9028f416c7bddf3a2ac /src/com/android/settings/SettingsInitialize.java
parentd9d463be8ba2bb07d88f609a71336da5f27e7e37 (diff)
downloadpackages_apps_Settings-4d3334c50b07c60c137085a35a8fb670eabd2aca.tar.gz
packages_apps_Settings-4d3334c50b07c60c137085a35a8fb670eabd2aca.tar.bz2
packages_apps_Settings-4d3334c50b07c60c137085a35a8fb670eabd2aca.zip
Update WebView implementation Dev Setting - new looks + descriptions.
Now that we are changing the WebView package mechanism so that a package can only be used as WebView implementation if that package is enabled for all users of the device we need to tell the user why a package can't be chosen as WebView implementation. With this CL we do so in the 'Set WebView Implementation' Developer Setting. We code for the WebView implementation Developer Setting is now based on the same code as that of the Debug App Developer Setting. Bug: 32894154 Test: Ensure WebView Implementation setting shows correct packages. Test: Ensure WebView Implementation setting shows correct descriptions for why a package is not usable - including the case where packages are disabled/uninstalled for a second user. Test: Ensure the summary for the WebView Implmentation setting is updated after changing WebView package. Test: Ensure the WebView package Activity (Settings.ACTION_WEBVIEW_SETTINGS) is similar to the Dev Setting. Test: ensure non-admin user cannot start WV-picker activity through 'adb shell am start -n com.android.settings/.WebViewImplementation' Change-Id: Ia6e6e9e12ce8f8f45ec539807cd0c6479acb8ecb
Diffstat (limited to 'src/com/android/settings/SettingsInitialize.java')
-rw-r--r--src/com/android/settings/SettingsInitialize.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/settings/SettingsInitialize.java b/src/com/android/settings/SettingsInitialize.java
index 07fec0741a..66fc4d690b 100644
--- a/src/com/android/settings/SettingsInitialize.java
+++ b/src/com/android/settings/SettingsInitialize.java
@@ -44,6 +44,8 @@ public class SettingsInitialize extends BroadcastReceiver {
private static final String TAG = "Settings";
private static final String PRIMARY_PROFILE_SETTING =
"com.android.settings.PRIMARY_PROFILE_CONTROLLED";
+ private static final String SETTINGS_PACKAGE = "com.android.settings";
+ private static final String WEBVIEW_IMPLEMENTATION_ACTIVITY = ".WebViewImplementation";
@Override
public void onReceive(Context context, Intent broadcast) {
@@ -100,7 +102,7 @@ public class SettingsInitialize extends BroadcastReceiver {
return;
}
ComponentName settingsComponentName =
- new ComponentName(context, WebViewImplementation.class);
+ new ComponentName(SETTINGS_PACKAGE, SETTINGS_PACKAGE + WEBVIEW_IMPLEMENTATION_ACTIVITY);
pm.setComponentEnabledSetting(settingsComponentName,
userInfo.isAdmin() ?
PackageManager.COMPONENT_ENABLED_STATE_ENABLED :