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

Commit 8a61f496 authored by Vairavan Srinivasan's avatar Vairavan Srinivasan
Browse files

frameworks/base: unlink death notifications of Vibrate requests

Death notifications of Vibrate requests isn't needed when
broadcast of ACTION_SCREEN_OFF is received.

Change-Id: Ic411525fa8ce1fce3fa215314c54440ce837e41a
parent f247e545
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -379,6 +379,12 @@ public class VibratorService extends IVibratorService.Stub {
            if (intent.getAction().equals(Intent.ACTION_SCREEN_OFF)) {
                synchronized (mVibrations) {
                    doCancelVibrateLocked();

                    int size = mVibrations.size();
                    for(int i = 0; i < size; i++) {
                        unlinkVibration(mVibrations.get(i));
                    }

                    mVibrations.clear();
                }
            }