Skip to content
Commit d3b37175 authored by riddle_hsu's avatar riddle_hsu Committed by Riddle Hsu
Browse files

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
parent 28e6aeca
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment