Improve App notification loading
1) Use UiBlocker, for better animations for apps with a lot of channels 2) Only load data in onResume, because the data loading step in some of the controllers is expensive Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.notification" Test: load small channel and large (6000ish) channel app pages Test: load individual channel pages Test: load in-app channel shelf UI Fixes: 215072888 Change-Id: I9a1c96f75b02f94b3ffc529d17d9c0cad7752de1
This commit is contained in:
@@ -31,7 +31,7 @@ public class InvalidConversationPreferenceController extends NotificationPrefere
|
||||
private static final String KEY = "invalid_conversation_switch";
|
||||
|
||||
public InvalidConversationPreferenceController(Context context, NotificationBackend backend) {
|
||||
super(context, backend);
|
||||
super(context, backend, KEY);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -40,17 +40,19 @@ public class InvalidConversationPreferenceController extends NotificationPrefere
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAvailable() {
|
||||
public int getAvailabilityStatus() {
|
||||
if (mAppRow == null) {
|
||||
return false;
|
||||
return CONDITIONALLY_UNAVAILABLE;
|
||||
}
|
||||
if (mAppRow.banned) {
|
||||
return false;
|
||||
return CONDITIONALLY_UNAVAILABLE;
|
||||
}
|
||||
if (mPreferenceFilter != null && !isIncludedInFilter()) {
|
||||
return false;
|
||||
return CONDITIONALLY_UNAVAILABLE;
|
||||
}
|
||||
return mBackend.isInInvalidMsgState(mAppRow.pkg, mAppRow.uid);
|
||||
return mBackend.isInInvalidMsgState(mAppRow.pkg, mAppRow.uid)
|
||||
? AVAILABLE
|
||||
: CONDITIONALLY_UNAVAILABLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user