From a58b144822fdd61565f0d97c0d6419e508a95dea Mon Sep 17 00:00:00 2001 From: Tsung-Mao Fang Date: Thu, 22 Apr 2021 17:04:17 +0800 Subject: [PATCH] Replace to correct footer preference style Test: Rebuilt apk and see the result Fix: 186078568 Change-Id: I24ee2371dd51b8be4aa69d51d08c534117978ff2 --- res/xml/app_notification_settings.xml | 6 +- res/xml/channel_notification_settings.xml | 4 +- .../conversation_notification_settings.xml | 2 +- res/xml/notification_group_settings.xml | 4 +- .../app/NotificationFooterPreference.java | 58 ------------------- 5 files changed, 8 insertions(+), 66 deletions(-) delete mode 100644 src/com/android/settings/notification/app/NotificationFooterPreference.java diff --git a/res/xml/app_notification_settings.xml b/res/xml/app_notification_settings.xml index a801ae17980..edf8cb9ecc1 100644 --- a/res/xml/app_notification_settings.xml +++ b/res/xml/app_notification_settings.xml @@ -26,7 +26,7 @@ - @@ -96,11 +96,11 @@ - - diff --git a/res/xml/channel_notification_settings.xml b/res/xml/channel_notification_settings.xml index 95f794458a9..97dcc269220 100644 --- a/res/xml/channel_notification_settings.xml +++ b/res/xml/channel_notification_settings.xml @@ -116,11 +116,11 @@ android:title="@string/app_settings_link" settings:allowDividerAbove="true"/> - - diff --git a/res/xml/conversation_notification_settings.xml b/res/xml/conversation_notification_settings.xml index ea555c293f7..7e475be7ebe 100644 --- a/res/xml/conversation_notification_settings.xml +++ b/res/xml/conversation_notification_settings.xml @@ -58,7 +58,7 @@ android:summary="@string/demote_conversation_summary" settings:allowDividerAbove="true"/> - diff --git a/res/xml/notification_group_settings.xml b/res/xml/notification_group_settings.xml index cbe23c655f4..e714759aed3 100644 --- a/res/xml/notification_group_settings.xml +++ b/res/xml/notification_group_settings.xml @@ -31,9 +31,9 @@ android:title="@string/app_settings_link" settings:allowDividerAbove="true"/> - - diff --git a/src/com/android/settings/notification/app/NotificationFooterPreference.java b/src/com/android/settings/notification/app/NotificationFooterPreference.java deleted file mode 100644 index 6f34cdd5c90..00000000000 --- a/src/com/android/settings/notification/app/NotificationFooterPreference.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2017 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.settings.notification.app; - -import android.content.Context; -import android.text.method.LinkMovementMethod; -import android.util.AttributeSet; -import android.widget.TextView; - -import androidx.core.content.res.TypedArrayUtils; -import androidx.preference.Preference; -import androidx.preference.PreferenceViewHolder; - -import com.android.settingslib.R; - -/** - * FooterPreference that can have any key or ordering. - */ -public class NotificationFooterPreference extends Preference { - - public NotificationFooterPreference(Context context, AttributeSet attrs) { - super(context, attrs, TypedArrayUtils.getAttr( - context, R.attr.footerPreferenceStyle, android.R.attr.preferenceStyle)); - init(); - } - - public NotificationFooterPreference(Context context) { - this(context, null); - } - - @Override - public void onBindViewHolder(PreferenceViewHolder holder) { - super.onBindViewHolder(holder); - TextView title = holder.itemView.findViewById(android.R.id.title); - title.setMovementMethod(new LinkMovementMethod()); - title.setClickable(false); - title.setLongClickable(false); - } - - private void init() { - setIcon(R.drawable.ic_info_outline_24dp); - setSelectable(false); - } -}