summaryrefslogtreecommitdiffstats
path: root/services/java
diff options
context:
space:
mode:
authorriddle_hsu <riddle_hsu@htc.com>2015-03-19 01:11:55 +0800
committerRiddle Hsu <riddle_hsu@htc.com>2015-03-18 19:01:36 +0000
commitd3b371755df509cabbc5b4451df83309be5439b0 (patch)
tree70d3cd4df91e053459d63cdbc1d1a41c1a25f45b /services/java
parent28e6aeca3aad075ef4fd7aab08cd1ad1ff9eb555 (diff)
downloadframeworks_base-d3b371755df509cabbc5b4451df83309be5439b0.zip
frameworks_base-d3b371755df509cabbc5b4451df83309be5439b0.tar.gz
frameworks_base-d3b371755df509cabbc5b4451df83309be5439b0.tar.bz2
Fix no vibration during shutdown.
In ShutdownThread:rebootOrShutdown, the vibrator is created by "new SystemVibrator()" which will use default constructor of Vibrator. And because system server is not bound application, ActivityThread.currentPackageName will be null. Then the member mPackageName of Vibrator is null. When doing vibration: VibratorService.startVibrationLocked -> mAppOpsService.startOperation -> getOpsLocked (null package will get null op) -> return MODE_ERRORED -> no vibration https://code.google.com/p/android/issues/detail?id=160830 Pass null context in SystemServer.performPendingShutdown because vibrator service is not ready, and from the call sequence, there is no available context to use. Change-Id: I3e0175ba6dc2e1a92787873eda4461fba6e89783
Diffstat (limited to 'services/java')
-rw-r--r--services/java/com/android/server/SystemServer.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 7871147..fa12d5f 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -288,7 +288,7 @@ public final class SystemServer {
reason = null;
}
- ShutdownThread.rebootOrShutdown(reboot, reason);
+ ShutdownThread.rebootOrShutdown(null, reboot, reason);
}
}