Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb0ce841 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Ban non-notification vibrations of background process"

parents 28a7ebc7 e582299f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -593,7 +593,7 @@ public class VibratorService extends IVibratorService.Stub
                Vibration vib = new Vibration(token, effect, usageHint, uid, opPkg, reason);
                if (mProcStatesCache.get(uid, ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND)
                        > ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND
                        && vib.isHapticFeedback()) {
                        && !vib.isNotification() && !vib.isRingtone()) {
                    Slog.e(TAG, "Ignoring incoming vibration as process with uid = "
                            + uid + " is background");
                    return;