From e8657614de19bcac0f43367e24ca68fa824fdcc5 Mon Sep 17 00:00:00 2001 From: Mohit Mali Date: Mon, 28 Sep 2020 11:14:30 +0530 Subject: [PATCH] Remove the updater subtitle --- src/com/android/settings/Utils.java | 1 + .../system/SystemUpdatePreferenceController.java | 10 ++-------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/com/android/settings/Utils.java b/src/com/android/settings/Utils.java index 4db359c72bb..4b9552e81e9 100644 --- a/src/com/android/settings/Utils.java +++ b/src/com/android/settings/Utils.java @@ -119,6 +119,7 @@ public final class Utils extends com.android.settingslib.Utils { * Set the preference's title to the matching activity's label. */ public static final int UPDATE_PREFERENCE_FLAG_SET_TITLE_TO_MATCHING_ACTIVITY = 1; + public static final int UPDATE_PREFERENCE_FLAG_DONT_SET_TITLE_TO_MATCHING_ACTIVITY = 0; public static final String SETTINGS_PACKAGE_NAME = "com.android.settings"; diff --git a/src/com/android/settings/system/SystemUpdatePreferenceController.java b/src/com/android/settings/system/SystemUpdatePreferenceController.java index 38a88b95439..f9df4dd1601 100644 --- a/src/com/android/settings/system/SystemUpdatePreferenceController.java +++ b/src/com/android/settings/system/SystemUpdatePreferenceController.java @@ -68,7 +68,7 @@ public class SystemUpdatePreferenceController extends BasePreferenceController { if (isAvailable()) { Utils.updatePreferenceToSpecificActivityOrRemove(mContext, screen, getPreferenceKey(), - Utils.UPDATE_PREFERENCE_FLAG_SET_TITLE_TO_MATCHING_ACTIVITY); + Utils.UPDATE_PREFERENCE_FLAG_DONT_SET_TITLE_TO_MATCHING_ACTIVITY); } } @@ -88,8 +88,7 @@ public class SystemUpdatePreferenceController extends BasePreferenceController { @Override public CharSequence getSummary() { - CharSequence summary = mContext.getString(R.string.android_version_summary, - Build.VERSION.RELEASE); + CharSequence summary = ""; final FutureTask bundleFutureTask = new FutureTask<>( // Put the API call in a future to avoid StrictMode violation. () -> mUpdateManager.retrieveSystemUpdateInfo()); @@ -112,11 +111,6 @@ public class SystemUpdatePreferenceController extends BasePreferenceController { Log.d(TAG, "Update statue unknown"); // fall through to next branch case SystemUpdateManager.STATUS_IDLE: - final String version = updateInfo.getString(SystemUpdateManager.KEY_TITLE); - if (!TextUtils.isEmpty(version)) { - summary = mContext.getString(R.string.android_version_summary, version); - } - break; } return summary; } -- GitLab