Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e87707a authored by Geoffrey Pitsch's avatar Geoffrey Pitsch Committed by android-build-merger
Browse files

Prevent notifyScreenshotError() from calling twice am: b2d6ed3c am: d13870b1

am: 0e1400b9

Change-Id: I12029e9dc83a2096eb354776bb75216198ff3594
parents dc81d34d 0e1400b9
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -5646,8 +5646,15 @@ public class PhoneWindowManager implements WindowManagerPolicy {

                @Override
                public void onServiceDisconnected(ComponentName name) {
                    synchronized (mScreenshotLock) {
                        if (mScreenshotConnection != null) {
                            mContext.unbindService(mScreenshotConnection);
                            mScreenshotConnection = null;
                            mHandler.removeCallbacks(mScreenshotTimeout);
                            notifyScreenshotError();
                        }
                    }
                }
            };
            if (mContext.bindServiceAsUser(serviceIntent, conn,
                    Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE_WHILE_AWAKE,