From 87f575098bf6465bd46ef6c99b555ee6c167dee5 Mon Sep 17 00:00:00 2001 From: Bryan Eyler Date: Wed, 19 Jul 2017 16:29:49 -0700 Subject: [PATCH] Cancel fullscreen countdown timer on interaction. Any interaction on the fullscreen user switcher should cancel the countdown timer and cause it to go away. Tested on Mojave Bug 36454400 Change-Id: I22556988d38d140e773cbc7eff03a30bde4f1f46 --- .../systemui/statusbar/car/FullscreenUserSwitcher.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/car/FullscreenUserSwitcher.java b/packages/SystemUI/src/com/android/systemui/statusbar/car/FullscreenUserSwitcher.java index 9338887098ebe..6060134de6da1 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/car/FullscreenUserSwitcher.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/car/FullscreenUserSwitcher.java @@ -74,6 +74,15 @@ public class FullscreenUserSwitcher { automaticallySelectUser(); }); + // Any interaction with the screen should cancel the timer. + mContainer.setOnClickListener(v -> { + cancelTimer(); + }); + mUserGridView.setOnTouchListener((v, e) -> { + cancelTimer(); + return false; + }); + mSwitchingUsers = mParent.findViewById(R.id.switching_users); } @@ -152,6 +161,7 @@ public class FullscreenUserSwitcher { if (mTimer != null) { mTimer.cancel(); mTimer = null; + mProgressBar.setProgress(0, true /* animate */); } }