Revert^2 "Improve App notification loading"
c5f1cb11e0
Change-Id: I5a6d39e0a5f2b7bd30bcc12e207b8bb23857c6d8
This commit is contained in:
@@ -33,7 +33,7 @@ public class LightsPreferenceController extends NotificationPreferenceController
|
||||
private static final String KEY_LIGHTS = "lights";
|
||||
|
||||
public LightsPreferenceController(Context context, NotificationBackend backend) {
|
||||
super(context, backend);
|
||||
super(context, backend, KEY_LIGHTS);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -42,16 +42,18 @@ public class LightsPreferenceController extends NotificationPreferenceController
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAvailable() {
|
||||
if (!super.isAvailable()) {
|
||||
return false;
|
||||
public int getAvailabilityStatus() {
|
||||
if (super.getAvailabilityStatus() == CONDITIONALLY_UNAVAILABLE) {
|
||||
return CONDITIONALLY_UNAVAILABLE;
|
||||
}
|
||||
if (mChannel == null) {
|
||||
return false;
|
||||
return CONDITIONALLY_UNAVAILABLE;
|
||||
}
|
||||
return checkCanBeVisible(NotificationManager.IMPORTANCE_DEFAULT)
|
||||
&& canPulseLight()
|
||||
&& !isDefaultChannel();
|
||||
if (checkCanBeVisible(NotificationManager.IMPORTANCE_DEFAULT) && canPulseLight()
|
||||
&& !isDefaultChannel()) {
|
||||
return AVAILABLE;
|
||||
}
|
||||
return CONDITIONALLY_UNAVAILABLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user