Permalink
Browse files

[1/2] Settings: Completely remove the AOSP System Updates

Change-Id: Ia1eb4413207a614dfec4744da5471f42af590f37
  • Loading branch information...
STELIX authored and xlxfoxxlx committed Sep 12, 2016
1 parent 0779371 commit 3ec6e9374c9ed59b85d78769fc28d31d9a8c07f8
Showing with 0 additions and 52 deletions.
  1. +0 −6 res/values/strings.xml
  2. +0 −15 res/xml/device_info_settings.xml
  3. +0 −31 src/com/android/settings/DeviceInfoSettings.java
View
@@ -2368,8 +2368,6 @@
<!-- About phone screen, list item title. Takes the user to the screen for seeing and installing system updates. [CHAR LIMIT=40] -->
<string name="system_update_settings_list_item_title">System updates</string>
<!-- About phone screen, list item summary. Takes the user to the screen for seeing and installing system updates. [CHAR LIMIT=40] -->
<string name="system_update_settings_list_item_summary">""</string>
<!-- About phone screen, status item label [CHAR LIMIT=40] -->
<string name="firmware_version">Android version</string>
@@ -5441,10 +5439,6 @@
<!-- Button label for cancelling the new-password operation and retaining the user's previous full-backup password -->
<string name="backup_pw_cancel_button_text">Cancel</string>
<!-- A menu item in "About phone" that allows the user to update the phone with settings
from their cell phone carrier. The use of the string is similar to the string
"system_update_settings_list_item_title" in this project. [CHAR LIMIT=25] -->
<string name="additional_system_update_settings_list_item_title">Additional system updates</string>
<!-- These statuses are displayed when a device was built with SE Android supoprt.
These are displayed by the settings app in the about section. -->
<string name="selinux_status_disabled">Disabled</string>
@@ -24,21 +24,6 @@
android:layout="@layout/aosip_about"
android:fragment="com.android.settings.aosip.AosipAbout" />
<!-- System update settings - launches activity
<PreferenceScreen android:key="system_update_settings"
android:title="@string/system_update_settings_list_item_title"
android:summary="@string/system_update_settings_list_item_summary">
<intent android:action="android.settings.SYSTEM_UPDATE_SETTINGS" />
</PreferenceScreen>
<PreferenceScreen android:key="additional_system_update_settings"
android:title="@string/additional_system_update_settings_list_item_title">
<intent android:action="android.intent.action.MAIN"
android:targetPackage="@string/additional_system_update"
android:targetClass="@string/additional_system_update_menu" />
</PreferenceScreen> -->
<!-- AOSiP version -->
<com.android.settings.DividerPreference
android:key="aosip_version"
@@ -56,7 +56,6 @@
private static final String KEY_MANUAL = "manual";
private static final String KEY_REGULATORY_INFO = "regulatory_info";
private static final String KEY_SYSTEM_UPDATE_SETTINGS = "system_update_settings";
private static final String PROPERTY_URL_SAFETYLEGAL = "ro.url.safetylegal";
private static final String PROPERTY_SELINUX_STATUS = "ro.build.selinux";
private static final String KEY_KERNEL_VERSION = "kernel_version";
@@ -177,22 +176,6 @@ public void onCreate(Bundle icicle) {
// These are contained by the root preference screen
PreferenceGroup parentPreference = getPreferenceScreen();
if (mUm.isAdminUser()) {
Utils.updatePreferenceToSpecificActivityOrRemove(act, parentPreference,
KEY_SYSTEM_UPDATE_SETTINGS,
Utils.UPDATE_PREFERENCE_FLAG_SET_TITLE_TO_MATCHING_ACTIVITY);
} else {
// Remove for secondary users
removePreference(KEY_SYSTEM_UPDATE_SETTINGS);
}
// Read platform settings for additional system update setting
removePreferenceIfBoolFalse(KEY_UPDATE_SETTING,
R.bool.config_additional_system_update_setting_enable);
// Remove manual entry if none present.
removePreferenceIfBoolFalse(KEY_MANUAL, R.bool.config_show_manual);
// 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()
@@ -313,13 +296,6 @@ public boolean onPreferenceTreeClick(Preference preference) {
}
} else if (preference.getKey().equals(KEY_DEVICE_FEEDBACK)) {
sendFeedback();
} else if(preference.getKey().equals(KEY_SYSTEM_UPDATE_SETTINGS)) {
CarrierConfigManager configManager =
(CarrierConfigManager) getSystemService(Context.CARRIER_CONFIG_SERVICE);
PersistableBundle b = configManager.getConfig();
if (b != null && b.getBoolean(CarrierConfigManager.KEY_CI_ACTION_ON_SYS_UPDATE_BOOL)) {
ciActionOnSysUpdate(b);
}
}
return super.onPreferenceTreeClick(preference);
}
@@ -485,13 +461,6 @@ public void setListening(boolean listening) {
}
final UserManager um = UserManager.get(context);
// TODO: system update needs to be fixed for non-owner user b/22760654
if (!um.isAdminUser()) {
keys.add(KEY_SYSTEM_UPDATE_SETTINGS);
}
if (!context.getResources().getBoolean(
R.bool.config_additional_system_update_setting_enable)) {
keys.add(KEY_UPDATE_SETTING);
}
return keys;
}

0 comments on commit 3ec6e93

Please sign in to comment.