frameworks/base/core/java/com/android/internal/app/ShutdownThread.java:
1.去掉触发灭屏的message
private static void beginShutdownSequence(Context context) {
.......
/* set screen brightness off after shutdownThread start */
//sInstance.mHandler.postDelayed(mDelayDim, screen_turn_off_time);
//modify shutdown screen off time
......
}
2.IPO关机振动与灭屏同步
public void running() {
......
if(mShutdownFlow == IPO_SHUTDOWN_FLOW)
{
……
delayForPlayAnimation();
if (sInstance.mScreenWakeLock != null && sInstance.mScreenWakeLock.isHeld()) {
sInstance.mScreenWakeLock.release();
sInstance.mScreenWakeLock = null;
}
//modify shutdown screen off time
Log.d(TAG, "setBacklightBrightness: Off");
sInstance.mPowerManager.setBacklightBrightnessOff(true);
//modify shutdown screen off time
//sInstance.mHandler.removeCallbacks(mDelayDim);
stMgr.shutdown(mContext);
......
}
3,正常关机流程振动与灭屏同步
public static void rebootOrShutdown(boolean reboot, String reason) {
......
delayForPlayAnimation();
//modify shutdown screen off time to start
Log.d(TAG, "setBacklightBrightness: Off");
if (sInstance.mScreenWakeLock != null && sInstance.mScreenWakeLock.isHeld()) {
sInstance.mScreenWakeLock.release();
sInstance.mScreenWakeLock = null;
}
sInstance.mPowerManager.setBacklightBrightnessOff(true);
//modify shutdown screen off time to end
// Shutdown power
Log.i(TAG, "Performing low-level shutdown...");
......
}