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

Commit 46b89b53 authored by Yein Jo's avatar Yein Jo
Browse files

Allow drawing outside of the screenshot thumbnail

Bug: 329659738
Test: Manual
Flag: ACONFIG com.android.systemui.screenshot_shelf_ui2 NEXTFOOD

Change-Id: I6c3939951bbfe4237f2b434ebaadac7b0deff141
parent 62f8a057
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -19,7 +19,9 @@
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    android:layout_height="match_parent"
    android:clipChildren="false"
    android:clipToPadding="false">
    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/screenshot_static"
        android:layout_width="match_parent"
+7 −0
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ import android.util.Pair;
import android.view.Display;
import android.view.ScrollCaptureResponse;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewRootImpl;
import android.view.ViewTreeObserver;
import android.view.WindowInsets;
@@ -699,6 +700,12 @@ public class ScreenshotController {
        mBlockAttach = true;
        mWindowManager.addView(decorView, mWindowLayoutParams);
        decorView.requestApplyInsets();

        if (screenshotShelfUi2()) {
            ViewGroup layout = decorView.requireViewById(android.R.id.content);
            layout.setClipChildren(false);
            layout.setClipToPadding(false);
        }
    }

    void removeWindow() {