Loading services/core/java/com/android/server/wm/ActivityStack.java +9 −1 Original line number Original line Diff line number Diff line Loading @@ -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 Loading services/core/java/com/android/server/wm/ActivityTaskManagerService.java +6 −2 Original line number Original line Diff line number Diff line Loading @@ -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; Loading Loading @@ -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. Loading Loading @@ -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(); Loading Loading
services/core/java/com/android/server/wm/ActivityStack.java +9 −1 Original line number Original line Diff line number Diff line Loading @@ -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 Loading
services/core/java/com/android/server/wm/ActivityTaskManagerService.java +6 −2 Original line number Original line Diff line number Diff line Loading @@ -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; Loading Loading @@ -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. Loading Loading @@ -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(); Loading