Loading core/java/android/view/ViewRootImpl.java +13 −0 Original line number Diff line number Diff line Loading @@ -6522,6 +6522,19 @@ public final class ViewRootImpl implements ViewParent, return false; } /** * Force the window to report its next draw. * <p> * This method is only supposed to be used to speed up the interaction from SystemUI and window * manager when waiting for the first frame to be drawn when turning on the screen. DO NOT USE * unless you fully understand this interaction. * @hide */ public void setReportNextDraw() { mReportNextDraw = true; invalidate(); } void changeCanvasOpacity(boolean opaque) { Log.d(TAG, "changeCanvasOpacity: opaque=" + opaque); if (mAttachInfo.mHardwareRenderer != null) { Loading packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +9 −3 Original line number Diff line number Diff line Loading @@ -1461,6 +1461,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)) { Loading @@ -1474,9 +1483,6 @@ public class KeyguardViewMediator extends SystemUI { updateActivityLockScreenState(); adjustStatusBarLocked(); sendUserPresentBroadcast(); if (mWakeAndUnlocking && mDrawnCallback != null) { notifyDrawn(mDrawnCallback); } } } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +5 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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(); } } Loading
core/java/android/view/ViewRootImpl.java +13 −0 Original line number Diff line number Diff line Loading @@ -6522,6 +6522,19 @@ public final class ViewRootImpl implements ViewParent, return false; } /** * Force the window to report its next draw. * <p> * This method is only supposed to be used to speed up the interaction from SystemUI and window * manager when waiting for the first frame to be drawn when turning on the screen. DO NOT USE * unless you fully understand this interaction. * @hide */ public void setReportNextDraw() { mReportNextDraw = true; invalidate(); } void changeCanvasOpacity(boolean opaque) { Log.d(TAG, "changeCanvasOpacity: opaque=" + opaque); if (mAttachInfo.mHardwareRenderer != null) { Loading
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +9 −3 Original line number Diff line number Diff line Loading @@ -1461,6 +1461,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)) { Loading @@ -1474,9 +1483,6 @@ public class KeyguardViewMediator extends SystemUI { updateActivityLockScreenState(); adjustStatusBarLocked(); sendUserPresentBroadcast(); if (mWakeAndUnlocking && mDrawnCallback != null) { notifyDrawn(mDrawnCallback); } } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +5 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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(); } }