Fix Conversation page flickers when back
In this page, there are 3 items flickery when back from conversation page, - The summary under priority conversations - The summary under non-priority conversations - The clear all button under recent conversations This is because there is no key on these 3 preferences, when preference screen updated in onResume(), preference screen thought these 3 are new items, shows an animation for them. Add keys to them to fix. Bug: 215073227 Fix: 232341970 Test: visual check Change-Id: I24691cfa89a624c1741786499b47ede87d518d1a
This commit is contained in:
@@ -23,7 +23,6 @@ import android.app.people.IPeopleManager;
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.content.Context;
|
||||
import android.content.pm.ShortcutInfo;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.os.RemoteException;
|
||||
import android.os.UserHandle;
|
||||
@@ -51,6 +50,7 @@ public class RecentConversationsPreferenceController extends AbstractPreferenceC
|
||||
|
||||
private static final String TAG = "RecentConversationsPC";
|
||||
private static final String KEY = "recent_conversations";
|
||||
private static final String CLEAR_ALL_KEY_SUFFIX = "_clear_all";
|
||||
private List<ConversationChannel> mConversations;
|
||||
private final IPeopleManager mPs;
|
||||
private final NotificationBackend mBackend;
|
||||
@@ -72,9 +72,11 @@ public class RecentConversationsPreferenceController extends AbstractPreferenceC
|
||||
return true;
|
||||
}
|
||||
|
||||
//TODO(b/233325816): Use ButtonPreference instead.
|
||||
LayoutPreference getClearAll(PreferenceGroup parent) {
|
||||
LayoutPreference pref = new LayoutPreference(
|
||||
mContext, R.layout.conversations_clear_recents);
|
||||
pref.setKey(getPreferenceKey() + CLEAR_ALL_KEY_SUFFIX);
|
||||
pref.setOrder(1);
|
||||
Button button = pref.findViewById(R.id.conversation_settings_clear_recents);
|
||||
button.setOnClickListener(v -> {
|
||||
|
||||
Reference in New Issue
Block a user