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

Commit 01e65b8c authored by Sergey Nikolaienkov's avatar Sergey Nikolaienkov Committed by Automerger Merge Worker
Browse files

Merge "Make unfocused windows in pinned mode unable to receive touch input"...

Merge "Make unfocused windows in pinned mode unable to receive touch input" into rvc-dev am: b95bf01c

Change-Id: I47fdea992ab9cac7e4e508c4cf3d4f1a1dd017f0
parents ad87e369 b95bf01c
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -3264,7 +3264,15 @@ class ActivityStack extends Task {
    }

    boolean shouldIgnoreInput() {
        return inSplitScreenPrimaryWindowingMode() && !isFocusable();
        if (inSplitScreenPrimaryWindowingMode() && !isFocusable()) {
            return true;
        }
        if (mAtmService.mHasLeanbackFeature && inPinnedWindowingMode()
                && !isFocusedStackOnDisplay()) {
            // Preventing Picture-in-Picture stack from receiving input on TVs.
            return true;
        }
        return false;
    }

    @Override
+6 −2
Original line number Diff line number Diff line
@@ -42,7 +42,9 @@ import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
import static android.content.pm.ApplicationInfo.FLAG_FACTORY_TEST;
import static android.content.pm.ConfigurationInfo.GL_ES_VERSION_UNDEFINED;
import static android.content.pm.PackageManager.FEATURE_ACTIVITIES_ON_SECONDARY_DISPLAYS;
import static android.content.pm.PackageManager.FEATURE_CANT_SAVE_STATE;
import static android.content.pm.PackageManager.FEATURE_FREEFORM_WINDOW_MANAGEMENT;
import static android.content.pm.PackageManager.FEATURE_LEANBACK;
import static android.content.pm.PackageManager.FEATURE_PICTURE_IN_PICTURE;
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
import static android.os.FactoryTest.FACTORY_TEST_HIGH_LEVEL;
@@ -393,6 +395,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
    /** The currently running heavy-weight process, if any. */
    WindowProcessController mHeavyWeightProcess = null;
    boolean mHasHeavyWeightFeature;
    boolean mHasLeanbackFeature;
    /**
     * This is the process holding the activity the user last visited that is in a different process
     * from the one they are currently in.
@@ -734,8 +737,9 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {

    public void onSystemReady() {
        synchronized (mGlobalLock) {
            mHasHeavyWeightFeature = mContext.getPackageManager().hasSystemFeature(
                    PackageManager.FEATURE_CANT_SAVE_STATE);
            final PackageManager pm = mContext.getPackageManager();
            mHasHeavyWeightFeature = pm.hasSystemFeature(FEATURE_CANT_SAVE_STATE);
            mHasLeanbackFeature = pm.hasSystemFeature(FEATURE_LEANBACK);
            mAssistUtils = new AssistUtils(mContext);
            mVrController.onSystemReady();
            mRecentTasks.onSystemReadyLocked();