diff options
author | Shaoxu Liu <shaoxu@codeaurora.org> | 2015-10-08 15:15:27 +0800 |
---|---|---|
committer | Shaoxu Liu <shaoxu@codeaurora.org> | 2015-10-08 15:15:27 +0800 |
commit | 3d299959deb33a86ba2925eb4fa954e0118bd893 (patch) | |
tree | f4b1c3cbbf7114285a85d89ae074cb4720d9d531 /src/com | |
parent | 584a7b64ad7468ae8f790d9d24cbf373dc869d38 (diff) | |
download | packages_apps_Settings-3d299959deb33a86ba2925eb4fa954e0118bd893.zip packages_apps_Settings-3d299959deb33a86ba2925eb4fa954e0118bd893.tar.gz packages_apps_Settings-3d299959deb33a86ba2925eb4fa954e0118bd893.tar.bz2 |
Customize regulatory info.
Since the AndroidManifest could not use the overlay boolean,
enable the regulatory info in AndroidManifest.
Add flag checking to make sure it could be customized to enable
or disable.
Change-Id: I95018d94dea271eed9d740b356ad883c0b537e28
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/settings/DeviceInfoSettings.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/settings/DeviceInfoSettings.java b/src/com/android/settings/DeviceInfoSettings.java index 1f0cad1..3a0e061 100644 --- a/src/com/android/settings/DeviceInfoSettings.java +++ b/src/com/android/settings/DeviceInfoSettings.java @@ -180,9 +180,10 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In removePreferenceIfBoolFalse(KEY_UPDATE_SETTING, R.bool.config_additional_system_update_setting_enable); - // Remove regulatory information if none present. + // Remove regulatory information if none present or config_show_regulatory_info is disabled final Intent intent = new Intent(Settings.ACTION_SHOW_REGULATORY_INFO); - if (getPackageManager().queryIntentActivities(intent, 0).isEmpty()) { + if (getPackageManager().queryIntentActivities(intent, 0).isEmpty() + || !getResources().getBoolean(R.bool.config_show_regulatory_info)) { Preference pref = findPreference(KEY_REGULATORY_INFO); if (pref != null) { getPreferenceScreen().removePreference(pref); |