d3b371755d
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