Loading policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +9 −0 Original line number Diff line number Diff line Loading @@ -4880,6 +4880,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { } }; private void disableQbCharger() { if (SystemProperties.getInt("sys.quickboot.enable", 0) == 1) { SystemProperties.set("sys.qbcharger.enable", "false"); } } // Called on the PowerManager's Notifier thread. @Override public void goingToSleep(int why) { Loading Loading @@ -4907,6 +4913,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { EventLog.writeEvent(70000, 1); if (DEBUG_WAKEUP) Slog.i(TAG, "Waking up..."); // To disable qbcharger process when screen turning on disableQbCharger(); // Since goToSleep performs these functions synchronously, we must // do the same here. We cannot post this work to a handler because // that might cause it to become reordered with respect to what Loading services/core/java/com/android/server/power/PowerManagerService.java +12 −0 Original line number Diff line number Diff line Loading @@ -1094,6 +1094,17 @@ public final class PowerManagerService extends SystemService return true; } private void enableQbCharger(boolean enable) { if (SystemProperties.getInt("sys.quickboot.enable", 0) == 1 && SystemProperties.getInt("sys.quickboot.poweroff", 0) != 1) { // only handle "charged" event, qbcharger process will handle // "uncharged" event itself if (enable && mIsPowered && !isInteractiveInternal()) { SystemProperties.set("sys.qbcharger.enable", "true"); } } } private void goToSleepInternal(long eventTime, int reason, int flags, int uid) { synchronized (mLock) { if (goToSleepNoUpdateLocked(eventTime, reason, flags, uid)) { Loading Loading @@ -1329,6 +1340,7 @@ public final class PowerManagerService extends SystemService + ", mBatteryLevel=" + mBatteryLevel); } enableQbCharger(mIsPowered); if (wasPowered != mIsPowered || oldPlugType != mPlugType) { mDirty |= DIRTY_IS_POWERED; Loading Loading
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +9 −0 Original line number Diff line number Diff line Loading @@ -4880,6 +4880,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { } }; private void disableQbCharger() { if (SystemProperties.getInt("sys.quickboot.enable", 0) == 1) { SystemProperties.set("sys.qbcharger.enable", "false"); } } // Called on the PowerManager's Notifier thread. @Override public void goingToSleep(int why) { Loading Loading @@ -4907,6 +4913,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { EventLog.writeEvent(70000, 1); if (DEBUG_WAKEUP) Slog.i(TAG, "Waking up..."); // To disable qbcharger process when screen turning on disableQbCharger(); // Since goToSleep performs these functions synchronously, we must // do the same here. We cannot post this work to a handler because // that might cause it to become reordered with respect to what Loading
services/core/java/com/android/server/power/PowerManagerService.java +12 −0 Original line number Diff line number Diff line Loading @@ -1094,6 +1094,17 @@ public final class PowerManagerService extends SystemService return true; } private void enableQbCharger(boolean enable) { if (SystemProperties.getInt("sys.quickboot.enable", 0) == 1 && SystemProperties.getInt("sys.quickboot.poweroff", 0) != 1) { // only handle "charged" event, qbcharger process will handle // "uncharged" event itself if (enable && mIsPowered && !isInteractiveInternal()) { SystemProperties.set("sys.qbcharger.enable", "true"); } } } private void goToSleepInternal(long eventTime, int reason, int flags, int uid) { synchronized (mLock) { if (goToSleepNoUpdateLocked(eventTime, reason, flags, uid)) { Loading Loading @@ -1329,6 +1340,7 @@ public final class PowerManagerService extends SystemService + ", mBatteryLevel=" + mBatteryLevel); } enableQbCharger(mIsPowered); if (wasPowered != mIsPowered || oldPlugType != mPlugType) { mDirty |= DIRTY_IS_POWERED; Loading