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

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

Prevent notifyScreenshotError() from calling twice

am: b2d6ed3c

Change-Id: I754d4fbdcce050a0944894685167c973aef7ec53
parents 29a8e541 b2d6ed3c
Loading
Loading
Loading
Loading
+9 −2
Original line number Original line Diff line number Diff line
@@ -5646,8 +5646,15 @@ public class PhoneWindowManager implements WindowManagerPolicy {


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