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:
@@ -34,7 +34,7 @@ public class VibrationPreferenceController extends NotificationPreferenceControl
|
||||
private final Vibrator mVibrator;
|
||||
|
||||
public VibrationPreferenceController(Context context, NotificationBackend backend) {
|
||||
super(context, backend, KEY_VIBRATE);
|
||||
super(context, backend);
|
||||
mVibrator = context.getSystemService(Vibrator.class);
|
||||
}
|
||||
|
||||
@@ -44,15 +44,14 @@ public class VibrationPreferenceController extends NotificationPreferenceControl
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
if (super.getAvailabilityStatus() == CONDITIONALLY_UNAVAILABLE || mChannel == null) {
|
||||
return CONDITIONALLY_UNAVAILABLE;
|
||||
}
|
||||
if (checkCanBeVisible(NotificationManager.IMPORTANCE_DEFAULT) && !isDefaultChannel()
|
||||
&& mVibrator != null && mVibrator.hasVibrator()) {
|
||||
return AVAILABLE;
|
||||
}
|
||||
return CONDITIONALLY_UNAVAILABLE;
|
||||
public boolean isAvailable() {
|
||||
if (!super.isAvailable() || mChannel == null) {
|
||||
return false;
|
||||
}
|
||||
return checkCanBeVisible(NotificationManager.IMPORTANCE_DEFAULT)
|
||||
&& !isDefaultChannel()
|
||||
&& mVibrator != null
|
||||
&& mVibrator.hasVibrator();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user