summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVairavan Srinivasan <vairav@codeaurora.org>2011-05-13 10:47:20 -0700
committerVairavan Srinivasan <vairav@codeaurora.org>2011-05-13 10:47:20 -0700
commit8a61f496919504a86244d2f833acfec9bc20a745 (patch)
tree68682dd5aeced7341452cade59ab11467b9d549a
parentf247e545b521584bb778e79710c1e60ab814839e (diff)
downloadframeworks_base-8a61f496919504a86244d2f833acfec9bc20a745.zip
frameworks_base-8a61f496919504a86244d2f833acfec9bc20a745.tar.gz
frameworks_base-8a61f496919504a86244d2f833acfec9bc20a745.tar.bz2
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
-rwxr-xr-xservices/java/com/android/server/VibratorService.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/services/java/com/android/server/VibratorService.java b/services/java/com/android/server/VibratorService.java
index 86c30f8..7135391 100755
--- a/services/java/com/android/server/VibratorService.java
+++ b/services/java/com/android/server/VibratorService.java
@@ -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();
}
}