Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +19 −6 Original line number Diff line number Diff line Loading @@ -5837,8 +5837,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { @Override public void run() { synchronized (mScreenshotLock) { if (mScreenshotConnection != null) { mContext.unbindService(mScreenshotConnection); mScreenshotConnection = null; resetScreenshotConnection(); notifyScreenshotError(); } } Loading Loading @@ -5870,8 +5869,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { public void handleMessage(Message msg) { synchronized (mScreenshotLock) { if (mScreenshotConnection == myConn) { mContext.unbindService(mScreenshotConnection); mScreenshotConnection = null; resetScreenshotConnection(); mHandler.removeCallbacks(mScreenshotTimeout); } } Loading @@ -5894,8 +5892,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { public void onServiceDisconnected(ComponentName name) { synchronized (mScreenshotLock) { if (mScreenshotConnection != null) { mContext.unbindService(mScreenshotConnection); mScreenshotConnection = null; resetScreenshotConnection(); mHandler.removeCallbacks(mScreenshotTimeout); notifyScreenshotError(); } Loading Loading @@ -5925,6 +5922,16 @@ public class PhoneWindowManager implements WindowManagerPolicy { mContext.sendBroadcastAsUser(errorIntent, UserHandle.CURRENT); } /** * Reset the screenshot connection. */ private void resetScreenshotConnection() { if (mScreenshotConnection != null) { mContext.unbindService(mScreenshotConnection); mScreenshotConnection = null; } } /** {@inheritDoc} */ @Override public int interceptKeyBeforeQueueing(KeyEvent event, int policyFlags) { Loading Loading @@ -6605,6 +6612,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { mLastSystemUiFlags = 0; updateSystemUiVisibilityLw(); } // close the screenshot connection on user switch so that screenshots // are always started with the correct user's context synchronized(mScreenshotLock) { resetScreenshotConnection(); } } } }; Loading Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +19 −6 Original line number Diff line number Diff line Loading @@ -5837,8 +5837,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { @Override public void run() { synchronized (mScreenshotLock) { if (mScreenshotConnection != null) { mContext.unbindService(mScreenshotConnection); mScreenshotConnection = null; resetScreenshotConnection(); notifyScreenshotError(); } } Loading Loading @@ -5870,8 +5869,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { public void handleMessage(Message msg) { synchronized (mScreenshotLock) { if (mScreenshotConnection == myConn) { mContext.unbindService(mScreenshotConnection); mScreenshotConnection = null; resetScreenshotConnection(); mHandler.removeCallbacks(mScreenshotTimeout); } } Loading @@ -5894,8 +5892,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { public void onServiceDisconnected(ComponentName name) { synchronized (mScreenshotLock) { if (mScreenshotConnection != null) { mContext.unbindService(mScreenshotConnection); mScreenshotConnection = null; resetScreenshotConnection(); mHandler.removeCallbacks(mScreenshotTimeout); notifyScreenshotError(); } Loading Loading @@ -5925,6 +5922,16 @@ public class PhoneWindowManager implements WindowManagerPolicy { mContext.sendBroadcastAsUser(errorIntent, UserHandle.CURRENT); } /** * Reset the screenshot connection. */ private void resetScreenshotConnection() { if (mScreenshotConnection != null) { mContext.unbindService(mScreenshotConnection); mScreenshotConnection = null; } } /** {@inheritDoc} */ @Override public int interceptKeyBeforeQueueing(KeyEvent event, int policyFlags) { Loading Loading @@ -6605,6 +6612,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { mLastSystemUiFlags = 0; updateSystemUiVisibilityLw(); } // close the screenshot connection on user switch so that screenshots // are always started with the correct user's context synchronized(mScreenshotLock) { resetScreenshotConnection(); } } } }; Loading