Loading packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java +4 −4 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Rect; import android.os.Handler; import android.os.SystemClock; import android.os.UserHandle; import android.util.Pair; import android.view.LayoutInflater; Loading Loading @@ -361,8 +362,7 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta // If the user has toggled it too quickly, then just eat up the event here (it's better than // showing a janky screenshot). // NOTE: Ideally, the screenshot mechanism would take the window transform into account long currentTime = System.currentTimeMillis(); if ((currentTime > mLastToggleTime) && (currentTime - mLastToggleTime) < sMinToggleDelay) { if ((SystemClock.elapsedRealtime() - mLastToggleTime) < sMinToggleDelay) { return; } Loading @@ -377,7 +377,7 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT | Intent.FLAG_RECEIVER_FOREGROUND); mContext.sendBroadcastAsUser(intent, UserHandle.CURRENT); mLastToggleTime = System.currentTimeMillis(); mLastToggleTime = SystemClock.elapsedRealtime(); return; } else { // Otherwise, start the recents activity Loading Loading @@ -559,7 +559,7 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta startAlternateRecentsActivity(topTask, opts, EXTRA_FROM_HOME, stackVr); } } mLastToggleTime = System.currentTimeMillis(); mLastToggleTime = SystemClock.elapsedRealtime(); } /** Starts the recents activity */ Loading packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java +3 −2 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.content.Intent; import android.content.IntentFilter; import android.content.SharedPreferences; import android.os.Bundle; import android.os.SystemClock; import android.os.UserHandle; import android.util.Pair; import android.view.KeyEvent; Loading Loading @@ -564,13 +565,13 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView public boolean onKeyDown(int keyCode, KeyEvent event) { switch (keyCode) { case KeyEvent.KEYCODE_TAB: { boolean hasRepKeyTimeElapsed = (System.currentTimeMillis() - boolean hasRepKeyTimeElapsed = (SystemClock.elapsedRealtime() - mLastTabKeyEventTime) > mConfig.altTabKeyDelay; if (event.getRepeatCount() <= 0 || hasRepKeyTimeElapsed) { // Focus the next task in the stack final boolean backward = event.isShiftPressed(); mRecentsView.focusNextTask(!backward); mLastTabKeyEventTime = System.currentTimeMillis(); mLastTabKeyEventTime = SystemClock.elapsedRealtime(); } return true; } Loading Loading
packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java +4 −4 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Rect; import android.os.Handler; import android.os.SystemClock; import android.os.UserHandle; import android.util.Pair; import android.view.LayoutInflater; Loading Loading @@ -361,8 +362,7 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta // If the user has toggled it too quickly, then just eat up the event here (it's better than // showing a janky screenshot). // NOTE: Ideally, the screenshot mechanism would take the window transform into account long currentTime = System.currentTimeMillis(); if ((currentTime > mLastToggleTime) && (currentTime - mLastToggleTime) < sMinToggleDelay) { if ((SystemClock.elapsedRealtime() - mLastToggleTime) < sMinToggleDelay) { return; } Loading @@ -377,7 +377,7 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT | Intent.FLAG_RECEIVER_FOREGROUND); mContext.sendBroadcastAsUser(intent, UserHandle.CURRENT); mLastToggleTime = System.currentTimeMillis(); mLastToggleTime = SystemClock.elapsedRealtime(); return; } else { // Otherwise, start the recents activity Loading Loading @@ -559,7 +559,7 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta startAlternateRecentsActivity(topTask, opts, EXTRA_FROM_HOME, stackVr); } } mLastToggleTime = System.currentTimeMillis(); mLastToggleTime = SystemClock.elapsedRealtime(); } /** Starts the recents activity */ Loading
packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java +3 −2 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.content.Intent; import android.content.IntentFilter; import android.content.SharedPreferences; import android.os.Bundle; import android.os.SystemClock; import android.os.UserHandle; import android.util.Pair; import android.view.KeyEvent; Loading Loading @@ -564,13 +565,13 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView public boolean onKeyDown(int keyCode, KeyEvent event) { switch (keyCode) { case KeyEvent.KEYCODE_TAB: { boolean hasRepKeyTimeElapsed = (System.currentTimeMillis() - boolean hasRepKeyTimeElapsed = (SystemClock.elapsedRealtime() - mLastTabKeyEventTime) > mConfig.altTabKeyDelay; if (event.getRepeatCount() <= 0 || hasRepKeyTimeElapsed) { // Focus the next task in the stack final boolean backward = event.isShiftPressed(); mRecentsView.focusNextTask(!backward); mLastTabKeyEventTime = System.currentTimeMillis(); mLastTabKeyEventTime = SystemClock.elapsedRealtime(); } return true; } Loading