Merge "Move vibrate while unlocked behind a flag" into main

This commit is contained in:
Iavor-Valentin Iftime
2024-01-08 16:45:16 +00:00
committed by Android (Google) Code Review
2 changed files with 4 additions and 1 deletions

View File

@@ -40,7 +40,7 @@ public class PoliteNotifVibrateUnlockedToggleController extends TogglePreference
@Override
public int getAvailabilityStatus() {
// TODO: b/291897570 - remove this when the feature flag is removed!
if (!Flags.politeNotifications()) {
if (!Flags.politeNotifications() || !Flags.vibrateWhileUnlocked()) {
return CONDITIONALLY_UNAVAILABLE;
}
return mContext.getSystemService(Vibrator.class).hasVibrator() ? AVAILABLE