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

Commit 0a0f6179 authored by Demon000's avatar Demon000 Committed by LuK1337
Browse files

SystemUI: implement better partial screenshot

commit ecd79bcd1362bf81b0ce0dfc970c3a7cef7a459e
Author: Demon000 <demonsingur@gmail.com>
Date:   Mon Jan 20 03:37:29 2020 +0000

    ScreenshotHelper: ignore timeout when taking partial screenshots

    User should have as much time to select the region as he wants.

    Change-Id: Ib9b79d5127a59d3e2af278dbc8cd054221c37ca6

commit 39b2b0fa8979b2904d7435215cd13241a9ca296e
Author: ezio84 <brabus84@gmail.com>
Date:   Sun Dec 1 18:19:48 2019 +0100

    SystemUI: block gestural navigation when using partial screenshot

    Change-Id: I68d25a6eab9ea16707e8736b9e56055532bcdf87

commit 77d3a89ebde978c195b4623fa3fbc52b75975f32
Author: Demon000 <demonsingur@gmail.com>
Date:   Sat Feb 1 18:24:34 2020 +0000

    GlobalScreenshot: do not capture multiple screenshots simultaneously

    Change-Id: I4c0c73759b8b0483f0d28b4c6c39e9a616c26b57

Change-Id: Ib818b24bb788a19ac210378611402c96fa55bd37
parent 648ae865
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -233,4 +233,9 @@ oneway interface IStatusBar
     */
    void showInDisplayFingerprintView();
    void hideInDisplayFingerprintView();

    /**
     * Used to block or unblock usage of gestural navigation
     */
    void setBlockedGesturalNavigation(boolean blocked);
}
+5 −0
Original line number Diff line number Diff line
@@ -153,4 +153,9 @@ interface IStatusBarService
     */
    void showInDisplayFingerprintView();
    void hideInDisplayFingerprintView();

    /**
     * Used to block or unblock usage of gestural navigation
     */
    void setBlockedGesturalNavigation(boolean blocked);
}
+8 −2
Original line number Diff line number Diff line
@@ -2,6 +2,8 @@ package com.android.internal.util;

import static android.view.WindowManager.ScreenshotSource.SCREENSHOT_OTHER;

import static android.view.WindowManager.TAKE_SCREENSHOT_SELECTED_REGION;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.content.ComponentName;
@@ -364,8 +366,10 @@ public class ScreenshotHelper {
                        Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE,
                        UserHandle.CURRENT)) {
                    mScreenshotConnection = conn;
                    if (screenshotType != TAKE_SCREENSHOT_SELECTED_REGION) {
                        handler.postDelayed(mScreenshotTimeout, timeoutMs);
                    }
                }
            } else {
                Messenger messenger = new Messenger(mScreenshotService);
                try {
@@ -376,10 +380,12 @@ public class ScreenshotHelper {
                        completionConsumer.accept(null);
                    }
                }
                if (screenshotType != TAKE_SCREENSHOT_SELECTED_REGION) {
                    handler.postDelayed(mScreenshotTimeout, timeoutMs);
                }
            }
        }
    }

    /**
     * Notifies the screenshot service to show an error.
+6 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="oval">
    <solid android:color="#a0000000" />
    <size android:width="48dp" android:height="48dp" />
</shape>
+12 −0
Original line number Diff line number Diff line
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:drawable="@drawable/ic_screenshot_selector_bg"
        android:height="48dp"
        android:width="48dp" />
    <item
        android:drawable="@drawable/ic_screenshot_selector_cancel_fg"
        android:height="24dp"
        android:width="24dp"
        android:left="12dp"
        android:top="12dp" />
</layer-list>
Loading