Loading core/java/android/view/ViewRootImpl.java +7 −4 Original line number Diff line number Diff line Loading @@ -327,6 +327,8 @@ public final class ViewRootImpl implements ViewParent, // This is used to reduce the race between window focus changes being dispatched from // the window manager and input events coming through the input system. @GuardedBy("this") boolean mWindowFocusChanged; @GuardedBy("this") boolean mUpcomingWindowFocus; @GuardedBy("this") boolean mUpcomingInTouchMode; Loading Loading @@ -2472,14 +2474,14 @@ public final class ViewRootImpl implements ViewParent, final boolean hasWindowFocus; final boolean inTouchMode; synchronized (this) { if (!mWindowFocusChanged) { return; } mWindowFocusChanged = false; hasWindowFocus = mUpcomingWindowFocus; inTouchMode = mUpcomingInTouchMode; } if (mAttachInfo.mHasWindowFocus == hasWindowFocus) { return; } if (mAdded) { profileRendering(hasWindowFocus); Loading Loading @@ -7181,6 +7183,7 @@ public final class ViewRootImpl implements ViewParent, public void windowFocusChanged(boolean hasFocus, boolean inTouchMode) { synchronized (this) { mWindowFocusChanged = true; mUpcomingWindowFocus = hasFocus; mUpcomingInTouchMode = inTouchMode; } Loading Loading
core/java/android/view/ViewRootImpl.java +7 −4 Original line number Diff line number Diff line Loading @@ -327,6 +327,8 @@ public final class ViewRootImpl implements ViewParent, // This is used to reduce the race between window focus changes being dispatched from // the window manager and input events coming through the input system. @GuardedBy("this") boolean mWindowFocusChanged; @GuardedBy("this") boolean mUpcomingWindowFocus; @GuardedBy("this") boolean mUpcomingInTouchMode; Loading Loading @@ -2472,14 +2474,14 @@ public final class ViewRootImpl implements ViewParent, final boolean hasWindowFocus; final boolean inTouchMode; synchronized (this) { if (!mWindowFocusChanged) { return; } mWindowFocusChanged = false; hasWindowFocus = mUpcomingWindowFocus; inTouchMode = mUpcomingInTouchMode; } if (mAttachInfo.mHasWindowFocus == hasWindowFocus) { return; } if (mAdded) { profileRendering(hasWindowFocus); Loading Loading @@ -7181,6 +7183,7 @@ public final class ViewRootImpl implements ViewParent, public void windowFocusChanged(boolean hasFocus, boolean inTouchMode) { synchronized (this) { mWindowFocusChanged = true; mUpcomingWindowFocus = hasFocus; mUpcomingInTouchMode = inTouchMode; } Loading