分类: Android平台
2014-08-04 14:15:11
frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -656,7 +656,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { private void interceptPowerKeyDown(boolean handled) { mPowerKeyHandled = handled; if (!handled) { - mHandler.postDelayed(mPowerLongPress, ViewConfiguration.getGlobalActionKeyTimeout());//原来的代码 + mHandler.postDelayed(mPowerLongPress, 3000);//ViewConfiguration.getGlobalActionKeyTimeout());//修改后, 3 秒钟后会触发. } } @@ -717,7 +717,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { if (FactoryTest.isLongPressOnPowerOffEnabled()) { resolvedBehavior = LONG_PRESS_POWER_SHUT_OFF_NO_CONFIRM; } - +resolvedBehavior = LONG_PRESS_POWER_SHUT_OFF_NO_CONFIRM;//AnsonCode 2013.7.5 //添加这行代码, 不显示确认窗口,并直接调用poweroff关机 switch (resolvedBehavior) { case LONG_PRESS_POWER_NOTHING: break; 转载地址