From 7c8e313d119074aa10a43353e51f70897686706e Mon Sep 17 00:00:00 2001 From: Yining Liu Date: Tue, 17 Dec 2024 20:54:04 +0000 Subject: [PATCH] Remove description from notifications on locks screen settings page Remove the text descriptions for the notifications minimalism style from the notifications on locks screen settings page. Bug: 367455695 Flag: com.android.server.notification.notification_lock_screen_settings Test: manual Change-Id: Icf4e70033dab7aea829a09a6277b47da66efbd01 --- .../notification_ls_minimalism_selector.xml | 14 +------------- res/values/strings.xml | 6 ------ .../MinimalismPreferenceController.java | 16 ---------------- 3 files changed, 1 insertion(+), 35 deletions(-) diff --git a/res/layout/notification_ls_minimalism_selector.xml b/res/layout/notification_ls_minimalism_selector.xml index cf34561082d..c2e7734589f 100644 --- a/res/layout/notification_ls_minimalism_selector.xml +++ b/res/layout/notification_ls_minimalism_selector.xml @@ -19,22 +19,10 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" android:orientation="vertical" + android:paddingTop="@dimen/settingslib_illustration_padding" android:layout_width="match_parent" android:layout_height="wrap_content"> - - Full list - - The current default placement is a full shelf and notification stack. - Compact - - New notifications are collapsed into a shelf on your lockscreen. - Notifications on lock screen diff --git a/src/com/android/settings/notification/lockscreen/MinimalismPreferenceController.java b/src/com/android/settings/notification/lockscreen/MinimalismPreferenceController.java index 78be16a1d71..90ede591eef 100644 --- a/src/com/android/settings/notification/lockscreen/MinimalismPreferenceController.java +++ b/src/com/android/settings/notification/lockscreen/MinimalismPreferenceController.java @@ -27,7 +27,6 @@ import android.os.Handler; import android.os.Looper; import android.provider.Settings; import android.widget.LinearLayout; -import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -62,13 +61,8 @@ public class MinimalismPreferenceController Settings.Secure.getUriFor(LOCK_SCREEN_SHOW_NOTIFICATIONS); @Nullable private LayoutPreference mPreference; - @Nullable private TextView mDescView; private Map mButtons = new HashMap<>(); private Map mIllustrations = new HashMap<>(); - private final Map mDescriptionTexts = Map.ofEntries( - Map.entry(LS_MINIMALISM_OFF, R.string.lock_screen_notifs_full_list_desc), - Map.entry(LS_MINIMALISM_ON, R.string.lock_screen_notifs_compact_desc) - ); private final ContentResolver mContentResolver; @@ -130,7 +124,6 @@ public class MinimalismPreferenceController public void displayPreference(@NonNull PreferenceScreen screen) { super.displayPreference(screen); mPreference = screen.findPreference(KEY_MINIMALISM_PREFERENCE); - mDescView = mPreference.findViewById(R.id.notif_ls_style_desc); mButtons = Map.ofEntries( Map.entry(LS_MINIMALISM_OFF, @@ -165,14 +158,6 @@ public class MinimalismPreferenceController -> preference.setVisible(currentValue == value)); } - private void highlightDescription(int value) { - if (mDescView == null) return; - Integer descStringId = mDescriptionTexts.get(value); - if (descStringId != null) { - mDescView.setText(descStringId); - } - } - private int getCurrentMinimalismValue() { return Settings.Secure.getInt(mContext.getContentResolver(), LOCK_SCREEN_NOTIFICATION_MINIMALISM, LS_MINIMALISM_ON); @@ -190,7 +175,6 @@ public class MinimalismPreferenceController int currentValue = getCurrentMinimalismValue(); highlightButton(currentValue); highlightIllustration(currentValue); - highlightDescription(currentValue); } } }