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
This commit is contained in:
@@ -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">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/notif_ls_style_desc"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="@dimen/settingslib_illustration_padding"
|
||||
android:paddingEnd="48dp"
|
||||
android:paddingStart="48dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:gravity="center"
|
||||
android:focusable="true"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorSecondary"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@@ -8863,15 +8863,9 @@
|
||||
<!-- Configure notifications: Value for lockscreen notifications: show all notifications [CHAR LIMIT=60] -->
|
||||
<string name="lock_screen_notifs_show_full_list">Full list</string>
|
||||
|
||||
<!-- Configure notifications: Summary for lockscreen notifications: show all notifications [CHAR LIMIT=NONE] -->
|
||||
<string name="lock_screen_notifs_full_list_desc">The current default placement is a full shelf and notification stack.</string>
|
||||
|
||||
<!-- Configure notifications: Value for lockscreen notifications: show compact notifications (minimalism on) [CHAR LIMIT=60] -->
|
||||
<string name="lock_screen_notifs_show_compact">Compact</string>
|
||||
|
||||
<!-- Configure notifications: Summary for lockscreen notifications: show compact notifications (minimalism on) [CHAR LIMIT=NONE] -->
|
||||
<string name="lock_screen_notifs_compact_desc">New notifications are collapsed into a shelf on your lockscreen.</string>
|
||||
|
||||
<!-- Configure notifications: Title for determining which notifications appear on the lock screen [CHAR LIMIT=60] -->
|
||||
<string name="lock_screen_notifs_title">Notifications on lock screen</string>
|
||||
|
||||
|
@@ -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<Integer, LinearLayout> mButtons = new HashMap<>();
|
||||
private Map<Integer, IllustrationPreference> mIllustrations = new HashMap<>();
|
||||
private final Map<Integer, Integer> 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user