Loading packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java +3 −2 Original line number Diff line number Diff line Loading @@ -517,8 +517,6 @@ public class UdfpsController implements DozeReceiver { scaledMajor); Log.v(TAG, "onTouch | finger down: " + touchInfo); mTouchLogTime = mSystemClock.elapsedRealtime(); mPowerManager.userActivity(mSystemClock.uptimeMillis(), PowerManager.USER_ACTIVITY_EVENT_TOUCH, 0); handled = true; } else if (sinceLastLog >= MIN_TOUCH_LOG_INTERVAL) { Log.v(TAG, "onTouch | finger move: " + touchInfo); Loading Loading @@ -846,6 +844,9 @@ public class UdfpsController implements DozeReceiver { return; } mLatencyTracker.onActionStart(LatencyTracker.ACTION_UDFPS_ILLUMINATE); // Refresh screen timeout and boost process priority if possible. mPowerManager.userActivity(mSystemClock.uptimeMillis(), PowerManager.USER_ACTIVITY_EVENT_TOUCH, 0); if (!mOnFingerDown) { playStartHaptic(); Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +4 −12 Original line number Diff line number Diff line Loading @@ -5107,18 +5107,10 @@ public class PhoneWindowManager implements WindowManagerPolicy { /** {@inheritDoc} */ @Override public void userActivity() { // *************************************** // NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE // *************************************** // THIS IS CALLED FROM DEEP IN THE POWER MANAGER // WITH ITS LOCKS HELD. // // This code must be VERY careful about the locks // it acquires. // In fact, the current code acquires way too many, // and probably has lurking deadlocks. public void userActivity(int displayGroupId, int event) { if (displayGroupId == DEFAULT_DISPLAY && event == PowerManager.USER_ACTIVITY_EVENT_TOUCH) { mDefaultDisplayPolicy.onUserActivityEventTouch(); } synchronized (mScreenLockTimeout) { if (mLockScreenTimerActive) { // reset the timer Loading services/core/java/com/android/server/policy/WindowManagerPolicy.java +1 −1 Original line number Diff line number Diff line Loading @@ -1006,7 +1006,7 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants { * Called when userActivity is signalled in the power manager. * This is safe to call from any thread, with any window manager locks held or not. */ public void userActivity(); void userActivity(int displayGroupId, int event); /** * Called when we have finished booting and can now display the home Loading services/core/java/com/android/server/power/Notifier.java +1 −1 Original line number Diff line number Diff line Loading @@ -712,7 +712,7 @@ public class Notifier { } TelephonyManager tm = mContext.getSystemService(TelephonyManager.class); tm.notifyUserActivity(); mPolicy.userActivity(); mPolicy.userActivity(displayGroupId, event); mFaceDownDetector.userActivity(event); mScreenUndimDetector.userActivity(displayGroupId); } Loading services/core/java/com/android/server/wm/ActivityTaskManagerService.java +8 −6 Original line number Diff line number Diff line Loading @@ -311,7 +311,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { /** * The duration to keep a process in animating state (top scheduling group) when the * wakefulness is changing from awake to doze or sleep. * wakefulness is dozing (unlocking) or changing from awake to doze or sleep (locking). */ private static final long DOZE_ANIMATING_STATE_RETAIN_TIME_MS = 2000; Loading Loading @@ -2927,12 +2927,14 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { mDemoteTopAppReasons &= ~DEMOTE_TOP_REASON_DURING_UNLOCKING; final WindowState notificationShade = mRootWindowContainer.getDefaultDisplay() .getDisplayPolicy().getNotificationShade(); proc = notificationShade != null ? mProcessMap.getProcess(notificationShade.mSession.mPid) : null; proc = notificationShade != null ? notificationShade.getProcess() : null; } if (proc == null) { return; setProcessAnimatingWhileDozing(proc); } // The caller MUST NOT hold the global lock because it calls AM method directly. void setProcessAnimatingWhileDozing(WindowProcessController proc) { if (proc == null) return; // Set to activity manager directly to make sure the state can be seen by the subsequent // update of scheduling group. proc.setRunningAnimationUnsafe(); Loading Loading
packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java +3 −2 Original line number Diff line number Diff line Loading @@ -517,8 +517,6 @@ public class UdfpsController implements DozeReceiver { scaledMajor); Log.v(TAG, "onTouch | finger down: " + touchInfo); mTouchLogTime = mSystemClock.elapsedRealtime(); mPowerManager.userActivity(mSystemClock.uptimeMillis(), PowerManager.USER_ACTIVITY_EVENT_TOUCH, 0); handled = true; } else if (sinceLastLog >= MIN_TOUCH_LOG_INTERVAL) { Log.v(TAG, "onTouch | finger move: " + touchInfo); Loading Loading @@ -846,6 +844,9 @@ public class UdfpsController implements DozeReceiver { return; } mLatencyTracker.onActionStart(LatencyTracker.ACTION_UDFPS_ILLUMINATE); // Refresh screen timeout and boost process priority if possible. mPowerManager.userActivity(mSystemClock.uptimeMillis(), PowerManager.USER_ACTIVITY_EVENT_TOUCH, 0); if (!mOnFingerDown) { playStartHaptic(); Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +4 −12 Original line number Diff line number Diff line Loading @@ -5107,18 +5107,10 @@ public class PhoneWindowManager implements WindowManagerPolicy { /** {@inheritDoc} */ @Override public void userActivity() { // *************************************** // NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE // *************************************** // THIS IS CALLED FROM DEEP IN THE POWER MANAGER // WITH ITS LOCKS HELD. // // This code must be VERY careful about the locks // it acquires. // In fact, the current code acquires way too many, // and probably has lurking deadlocks. public void userActivity(int displayGroupId, int event) { if (displayGroupId == DEFAULT_DISPLAY && event == PowerManager.USER_ACTIVITY_EVENT_TOUCH) { mDefaultDisplayPolicy.onUserActivityEventTouch(); } synchronized (mScreenLockTimeout) { if (mLockScreenTimerActive) { // reset the timer Loading
services/core/java/com/android/server/policy/WindowManagerPolicy.java +1 −1 Original line number Diff line number Diff line Loading @@ -1006,7 +1006,7 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants { * Called when userActivity is signalled in the power manager. * This is safe to call from any thread, with any window manager locks held or not. */ public void userActivity(); void userActivity(int displayGroupId, int event); /** * Called when we have finished booting and can now display the home Loading
services/core/java/com/android/server/power/Notifier.java +1 −1 Original line number Diff line number Diff line Loading @@ -712,7 +712,7 @@ public class Notifier { } TelephonyManager tm = mContext.getSystemService(TelephonyManager.class); tm.notifyUserActivity(); mPolicy.userActivity(); mPolicy.userActivity(displayGroupId, event); mFaceDownDetector.userActivity(event); mScreenUndimDetector.userActivity(displayGroupId); } Loading
services/core/java/com/android/server/wm/ActivityTaskManagerService.java +8 −6 Original line number Diff line number Diff line Loading @@ -311,7 +311,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { /** * The duration to keep a process in animating state (top scheduling group) when the * wakefulness is changing from awake to doze or sleep. * wakefulness is dozing (unlocking) or changing from awake to doze or sleep (locking). */ private static final long DOZE_ANIMATING_STATE_RETAIN_TIME_MS = 2000; Loading Loading @@ -2927,12 +2927,14 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { mDemoteTopAppReasons &= ~DEMOTE_TOP_REASON_DURING_UNLOCKING; final WindowState notificationShade = mRootWindowContainer.getDefaultDisplay() .getDisplayPolicy().getNotificationShade(); proc = notificationShade != null ? mProcessMap.getProcess(notificationShade.mSession.mPid) : null; proc = notificationShade != null ? notificationShade.getProcess() : null; } if (proc == null) { return; setProcessAnimatingWhileDozing(proc); } // The caller MUST NOT hold the global lock because it calls AM method directly. void setProcessAnimatingWhileDozing(WindowProcessController proc) { if (proc == null) return; // Set to activity manager directly to make sure the state can be seen by the subsequent // update of scheduling group. proc.setRunningAnimationUnsafe(); Loading