Revert^3 "Improve App notification loading"

33710fd9e2

Change-Id: Ifb45f949c28bff04f8abfe3e1a73628f2e407241
This commit is contained in:
Michael Wright
2022-08-24 12:22:12 +00:00
parent 33710fd9e2
commit 475632c4fe
34 changed files with 272 additions and 318 deletions

View File

@@ -29,7 +29,7 @@ public class DescriptionPreferenceController extends NotificationPreferenceContr
private static final String KEY_DESC = "desc";
public DescriptionPreferenceController(Context context) {
super(context, null, KEY_DESC);
super(context, null);
}
@Override
@@ -38,20 +38,20 @@ public class DescriptionPreferenceController extends NotificationPreferenceContr
}
@Override
public int getAvailabilityStatus() {
if (super.getAvailabilityStatus() == CONDITIONALLY_UNAVAILABLE) {
return CONDITIONALLY_UNAVAILABLE;
public boolean isAvailable() {
if (!super.isAvailable()) {
return false;
}
if (mChannel == null && !hasValidGroup()) {
return CONDITIONALLY_UNAVAILABLE;
return false;
}
if (mChannel != null && !TextUtils.isEmpty(mChannel.getDescription())) {
return AVAILABLE;
return true;
}
if (hasValidGroup() && !TextUtils.isEmpty(mChannelGroup.getDescription())) {
return AVAILABLE;
return true;
}
return CONDITIONALLY_UNAVAILABLE;
return false;
}
@Override