diff options
author | Jorim Jaggi <jjaggi@google.com> | 2015-08-24 14:52:45 -0700 |
---|---|---|
committer | Jorim Jaggi <jjaggi@google.com> | 2015-08-28 20:07:35 +0000 |
commit | b774e554f32fd65cac30b43d1cf679403ef4af82 (patch) | |
tree | 357b74b83c3f9096089d29398c7e5d49e16ab36a /packages | |
parent | 9b2f9bcb56765c52a2fc9cdcdcf11c6707403210 (diff) | |
download | frameworks_base-b774e554f32fd65cac30b43d1cf679403ef4af82.zip frameworks_base-b774e554f32fd65cac30b43d1cf679403ef4af82.tar.gz frameworks_base-b774e554f32fd65cac30b43d1cf679403ef4af82.tar.bz2 |
Optimize fp touch to wake: Shortcut for report next draw
When telling window manager that Keyguard window is in the correct
state for a fp-touch-to-wake sequence, it takes more than 1 frame at
the moment because the signal that WM is waiting for the next draw
is delayed by one frame because it is posted at the end of the
runnable queue.
To correctly fix this, we should post it at the beginning at the
queue, but this is way too risky this late. Instead, add a isolated
SysUI hack to report it faster.
Bug: 23401557
Change-Id: Icf64101e27611c7c01d108123021b22186f1e70c
Diffstat (limited to 'packages')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java | 12 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java | 5 |
2 files changed, 14 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java index 647b272..d520072 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -1445,6 +1445,15 @@ public class KeyguardViewMediator extends SystemUI { } mHiding = false; + if (mWakeAndUnlocking && mDrawnCallback != null) { + + // Hack level over 9000: To speed up wake-and-unlock sequence, force it to report + // the next draw from here so we don't have to wait for window manager to signal + // this to our ViewRootImpl. + mStatusBarKeyguardViewManager.getViewRootImpl().setReportNextDraw(); + notifyDrawn(mDrawnCallback); + } + // only play "unlock" noises if not on a call (since the incall UI // disables the keyguard) if (TelephonyManager.EXTRA_STATE_IDLE.equals(mPhoneState)) { @@ -1458,9 +1467,6 @@ public class KeyguardViewMediator extends SystemUI { updateActivityLockScreenState(); adjustStatusBarLocked(); sendUserPresentBroadcast(); - if (mWakeAndUnlocking && mDrawnCallback != null) { - notifyDrawn(mDrawnCallback); - } } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java index d0604c5..e26f423 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java @@ -24,6 +24,7 @@ import android.os.Trace; import android.view.KeyEvent; import android.view.View; import android.view.ViewGroup; +import android.view.ViewRootImpl; import android.view.WindowManagerGlobal; import com.android.internal.widget.LockPatternUtils; @@ -533,4 +534,8 @@ public class StatusBarKeyguardViewManager { public void showBouncerMessage(String message, int color) { mBouncer.showMessage(message, color); } + + public ViewRootImpl getViewRootImpl() { + return mPhoneStatusBar.getStatusBarView().getViewRootImpl(); + } } |