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

Commit b95bf01c authored by Sergey Nikolaienkov's avatar Sergey Nikolaienkov Committed by Android (Google) Code Review
Browse files

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

parents 07bed80a 30c947df
Loading
Loading
Loading
Loading
+9 −1
Original line number Original line Diff line number Diff line
@@ -3264,7 +3264,15 @@ class ActivityStack extends Task {
    }
    }


    boolean shouldIgnoreInput() {
    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
    @Override
+6 −2
Original line number Original line 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.ApplicationInfo.FLAG_FACTORY_TEST;
import static android.content.pm.ConfigurationInfo.GL_ES_VERSION_UNDEFINED;
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_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_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.FEATURE_PICTURE_IN_PICTURE;
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
import static android.os.FactoryTest.FACTORY_TEST_HIGH_LEVEL;
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. */
    /** The currently running heavy-weight process, if any. */
    WindowProcessController mHeavyWeightProcess = null;
    WindowProcessController mHeavyWeightProcess = null;
    boolean mHasHeavyWeightFeature;
    boolean mHasHeavyWeightFeature;
    boolean mHasLeanbackFeature;
    /**
    /**
     * This is the process holding the activity the user last visited that is in a different process
     * This is the process holding the activity the user last visited that is in a different process
     * from the one they are currently in.
     * from the one they are currently in.
@@ -734,8 +737,9 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {


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