Revert "Improve App notification loading"

Revert "Fix binder error when an app has many channels"

Revert submission 19290255-jr-bind-flicker

Reason for revert: b/240100577
Reverted Changes:
I9a1c96f75:Improve App notification loading
I391ce0b10:Fix binder error when an app has many channels

Change-Id: Iaae40de74d135a79c18201ec17e00f3d9d5f0f3b
This commit is contained in:
Neha Jain
2022-07-25 22:16:16 +00:00
parent e90507373c
commit c5f1cb11e0
34 changed files with 272 additions and 318 deletions

View File

@@ -56,7 +56,7 @@ public class BubblePreferenceController extends NotificationPreferenceController
public BubblePreferenceController(Context context, @Nullable FragmentManager fragmentManager,
NotificationBackend backend, boolean isAppPage,
@Nullable NotificationSettings.DependentFieldListener listener) {
super(context, backend, KEY);
super(context, backend);
mFragmentManager = fragmentManager;
mIsAppPage = isAppPage;
mListener = listener;
@@ -68,24 +68,21 @@ public class BubblePreferenceController extends NotificationPreferenceController
}
@Override
public int getAvailabilityStatus() {
if (super.getAvailabilityStatus() == CONDITIONALLY_UNAVAILABLE) {
return CONDITIONALLY_UNAVAILABLE;
public boolean isAvailable() {
if (!super.isAvailable()) {
return false;
}
if (!mIsAppPage && !isEnabled()) {
return CONDITIONALLY_UNAVAILABLE;
return false;
}
if (mChannel != null) {
if (isDefaultChannel()) {
return AVAILABLE;
return true;
} else {
if (mAppRow != null && mAppRow.bubblePreference != BUBBLE_PREFERENCE_NONE) {
return AVAILABLE;
}
return CONDITIONALLY_UNAVAILABLE;
return mAppRow != null && mAppRow.bubblePreference != BUBBLE_PREFERENCE_NONE;
}
}
return AVAILABLE;
return true;
}
@Override