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

Commit ab96d4bb authored by Linus Tufvesson's avatar Linus Tufvesson
Browse files

ENABLE_TOUCH_OPAQUE_ACTIVITIES to default enabled

Use mActivityRecord.getSurfaceControl() to set the correct bounds
when activity is moved between tasks

Test: atest CtsWindowManagerDeviceTestCases:WindowUntrustedTouchTest
Test: atest CtsInputTestCases:android.input.cts.InputShellCommandTest
Test: Manually verifed with sample app that touches are blocked from
passing through activities by default
Bug: 194480991

Change-Id: I7b709ebfd3e854a4e814f534b605a4c0c6466d2b
parent d708555b
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ import static com.android.server.wm.WindowContainer.AnimationFlags.TRANSITION;

import android.app.compat.CompatChanges;
import android.compat.annotation.ChangeId;
import android.compat.annotation.Disabled;
import android.compat.annotation.Overridable;
import android.os.IBinder;
import android.os.InputConstants;
import android.os.Looper;
@@ -47,7 +47,7 @@ class ActivityRecordInputSink {
     * Feature flag for making Activities consume all touches within their task bounds.
     */
    @ChangeId
    @Disabled
    @Overridable
    static final long ENABLE_TOUCH_OPAQUE_ACTIVITIES = 194480991L;

    private static final String TAG = "ActivityRecordInputSink";
@@ -116,8 +116,7 @@ class ActivityRecordInputSink {
    private InputWindowHandle createInputWindowHandle() {
        InputWindowHandle inputWindowHandle = new InputWindowHandle(null,
                mActivityRecord.getDisplayId());
        inputWindowHandle.replaceTouchableRegionWithCrop(
                mActivityRecord.getParentSurfaceControl());
        inputWindowHandle.replaceTouchableRegionWithCrop(mActivityRecord.getSurfaceControl());
        inputWindowHandle.name = mName;
        inputWindowHandle.ownerUid = Process.myUid();
        inputWindowHandle.ownerPid = Process.myPid();