Expose dialog for current webview setting.

Change-Id: I91c796b2c75c0ac8047ba0c2555a1036e8c6c616
Fixes: 28554048
This commit is contained in:
Jason Monk
2016-05-06 15:09:32 -04:00
parent ab30931d41
commit 7519954286
4 changed files with 136 additions and 11 deletions

View File

@@ -749,7 +749,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
ArrayList<String> options = new ArrayList<String>();
ArrayList<String> values = new ArrayList<String>();
for(int n = 0; n < providers.length; n++) {
if (isPackageEnabled(providers[n].packageName)) {
if (Utils.isPackageEnabled(getActivity(), providers[n].packageName)) {
options.add(providers[n].description);
values.add(providers[n].packageName);
}
@@ -1929,15 +1929,6 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
requestCode, resources.getString(R.string.oem_unlock_enable));
}
private boolean isPackageEnabled(String packageName) {
try {
return getActivity().getPackageManager().getApplicationInfo(packageName, 0).enabled;
} catch (NameNotFoundException e) {
// Thrown by PackageManager.getApplicationInfo if the package does not exist
}
return false;
}
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
if (HDCP_CHECKING_KEY.equals(preference.getKey())) {