summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Geoffrey Pitsch <gpitsch@google.com> 2016-09-13 15:39:41 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-09-13 15:39:43 +0000
commit221330f9f932a602b4a35e4e0931dac369eb0f5a (patch)
tree6906dab11f1936b07ff27ae0b7c7fab493b32027
parente0ca918e23439488bb699f741fd751285ae762ce (diff)
parentb2d6ed3cd125d616ab44b89e36af34a52756c47c (diff)
Merge "Prevent notifyScreenshotError() from calling twice" into nyc-mr1-dev
-rw-r--r--services/core/java/com/android/server/policy/PhoneWindowManager.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index bd6851c939d4..ccf9b898d7b2 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -5534,7 +5534,14 @@ public class PhoneWindowManager implements WindowManagerPolicy {
@Override
public void onServiceDisconnected(ComponentName name) {
- notifyScreenshotError();
+ synchronized (mScreenshotLock) {
+ if (mScreenshotConnection != null) {
+ mContext.unbindService(mScreenshotConnection);
+ mScreenshotConnection = null;
+ mHandler.removeCallbacks(mScreenshotTimeout);
+ notifyScreenshotError();
+ }
+ }
}
};
if (mContext.bindServiceAsUser(serviceIntent, conn,
@@ -7771,7 +7778,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
int delta = newRotation - oldRotation;
if (delta < 0) delta += 4;
// Likewise we don't rotate seamlessly for 180 degree rotations
- // in this case the surfaces never resize, and our logic to
+ // in this case the surfaces never resize, and our logic to
// revert the transformations on size change will fail. We could
// fix this in the future with the "tagged" frames idea.
if (delta == Surface.ROTATION_180) {