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

Commit 65a1fd32 authored by Demon000's avatar Demon000 Committed by Łukasz Patron
Browse files

GlobalScreenshot: do not capture multiple screenshots simultaneously

Change-Id: I4c0c73759b8b0483f0d28b4c6c39e9a616c26b57
parent 733c2d46
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -665,6 +665,11 @@ class GlobalScreenshot {
    }

    void takeScreenshot(Runnable finisher, boolean statusBarVisible, boolean navBarVisible) {
        if (mScreenshotLayout.getParent() != null) {
            finisher.run();
            return;
        }

        mDisplay.getRealMetrics(mDisplayMetrics);
        takeScreenshot(finisher, statusBarVisible, navBarVisible,
                new Rect(0, 0, mDisplayMetrics.widthPixels, mDisplayMetrics.heightPixels));
@@ -687,6 +692,11 @@ class GlobalScreenshot {
     */
    void takeScreenshotPartial(final Runnable finisher, final boolean statusBarVisible,
            final boolean navBarVisible) {
        if (mScreenshotLayout.getParent() != null) {
            finisher.run();
            return;
        }

        setBlockedGesturalNavigation(true);
        mWindowManager.addView(mScreenshotLayout, mWindowLayoutParams);
        mScreenshotSelectorView.setSelectionListener(