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

Commit ec2ce5b6 authored by Michael W's avatar Michael W
Browse files

PhoneWindowManager: Don't timeout when taking a partial screenshot

* A partial screenshot shouldn't timeout when the user might still be
  adjusting the rectangle

BUGBASH-1500

Change-Id: Ifb06173dc712667db3bfb3c6f945b9bddb2a85fa
parent 4c171bd2
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -993,10 +993,12 @@ class GlobalActionsDialog implements DialogInterface.OnDismissListener, DialogIn
            if (mContext.bindServiceAsUser(
                        intent, conn, Context.BIND_AUTO_CREATE, UserHandle.CURRENT)) {
                mScreenshotConnection = conn;
                if (!partial) {
                    mHandler.postDelayed(mScreenshotTimeout, 10000);
                }
            }
        }
    }

    private void prepareDialog() {
        refreshSilentMode();
+3 −1
Original line number Diff line number Diff line
@@ -6474,10 +6474,12 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                    Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE_WHILE_AWAKE,
                    UserHandle.CURRENT)) {
                mScreenshotConnection = conn;
                if (screenshotType != WindowManager.TAKE_SCREENSHOT_SELECTED_REGION) {
                    mHandler.postDelayed(mScreenshotTimeout, 10000);
                }
            }
        }
    }

    /**
     * Notifies the screenshot service to show an error.