Loading services/core/java/com/android/server/am/ActivityManagerService.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -266,6 +266,7 @@ import static android.app.ActivityManager.StackId.INVALID_STACK_ID; import static android.app.ActivityManager.StackId.LAST_STATIC_STACK_ID; import static android.app.ActivityManager.StackId.LAST_STATIC_STACK_ID; import static android.app.ActivityManager.StackId.PINNED_STACK_ID; import static android.app.ActivityManager.StackId.PINNED_STACK_ID; 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_ONLY; 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.GET_PROVIDERS; import static android.content.pm.PackageManager.GET_PROVIDERS; import static android.content.pm.PackageManager.MATCH_DEBUG_TRIAGED_MISSING; import static android.content.pm.PackageManager.MATCH_DEBUG_TRIAGED_MISSING; Loading Loading @@ -1344,6 +1345,7 @@ public final class ActivityManagerService extends ActivityManagerNative boolean mSupportsMultiWindow; boolean mSupportsMultiWindow; boolean mSupportsFreeformWindowManagement; boolean mSupportsFreeformWindowManagement; boolean mSupportsPictureInPicture; boolean mSupportsPictureInPicture; boolean mSupportsLeanbackOnly; Rect mDefaultPinnedStackBounds; Rect mDefaultPinnedStackBounds; IActivityController mController = null; IActivityController mController = null; boolean mControllerIsAMonkey = false; boolean mControllerIsAMonkey = false; Loading Loading @@ -12813,6 +12815,9 @@ public final class ActivityManagerService extends ActivityManagerNative final boolean forceRtl = Settings.Global.getInt(resolver, DEVELOPMENT_FORCE_RTL, 0) != 0; final boolean forceRtl = Settings.Global.getInt(resolver, DEVELOPMENT_FORCE_RTL, 0) != 0; final boolean forceResizable = Settings.Global.getInt( final boolean forceResizable = Settings.Global.getInt( resolver, DEVELOPMENT_FORCE_RESIZABLE_ACTIVITIES, 0) != 0; resolver, DEVELOPMENT_FORCE_RESIZABLE_ACTIVITIES, 0) != 0; final boolean supportsLeanbackOnly = mContext.getPackageManager().hasSystemFeature(FEATURE_LEANBACK_ONLY); // Transfer any global setting for forcing RTL layout, into a System Property // Transfer any global setting for forcing RTL layout, into a System Property SystemProperties.set(DEVELOPMENT_FORCE_RTL, forceRtl ? "1":"0"); SystemProperties.set(DEVELOPMENT_FORCE_RTL, forceRtl ? "1":"0"); Loading @@ -12828,6 +12833,7 @@ public final class ActivityManagerService extends ActivityManagerNative mWaitForDebugger = mOrigWaitForDebugger = waitForDebugger; mWaitForDebugger = mOrigWaitForDebugger = waitForDebugger; mAlwaysFinishActivities = alwaysFinishActivities; mAlwaysFinishActivities = alwaysFinishActivities; mLenientBackgroundCheck = lenientBackgroundCheck; mLenientBackgroundCheck = lenientBackgroundCheck; mSupportsLeanbackOnly = supportsLeanbackOnly; mForceResizableActivities = forceResizable; mForceResizableActivities = forceResizable; mWindowManager.setForceResizableTasks(mForceResizableActivities); mWindowManager.setForceResizableTasks(mForceResizableActivities); if (supportsMultiWindow || forceResizable) { if (supportsMultiWindow || forceResizable) { services/core/java/com/android/server/am/ActivityStack.java +3 −3 Original line number Original line Diff line number Diff line Loading @@ -1832,9 +1832,9 @@ final class ActivityStack { boolean isVisible = boolean isVisible = !behindFullscreenActivity || r.mLaunchTaskBehind || activityVisibleBehind; !behindFullscreenActivity || r.mLaunchTaskBehind || activityVisibleBehind; if (isVisible && r.isRecentsActivity()) { if (mService.mSupportsLeanbackOnly && isVisible && r.isRecentsActivity()) { // Recents activity can only be visible if the home stack is the focused stack or we are // On devices that support leanback only (Android TV), Recents activity can only be // in split-screen mode. // visible if the home stack is the focused stack or we are in split-screen mode. isVisible = mStackSupervisor.getStack(DOCKED_STACK_ID) != null isVisible = mStackSupervisor.getStack(DOCKED_STACK_ID) != null || mStackSupervisor.isFocusedStack(this); || mStackSupervisor.isFocusedStack(this); } } Loading Loading
services/core/java/com/android/server/am/ActivityManagerService.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -266,6 +266,7 @@ import static android.app.ActivityManager.StackId.INVALID_STACK_ID; import static android.app.ActivityManager.StackId.LAST_STATIC_STACK_ID; import static android.app.ActivityManager.StackId.LAST_STATIC_STACK_ID; import static android.app.ActivityManager.StackId.PINNED_STACK_ID; import static android.app.ActivityManager.StackId.PINNED_STACK_ID; 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_ONLY; 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.GET_PROVIDERS; import static android.content.pm.PackageManager.GET_PROVIDERS; import static android.content.pm.PackageManager.MATCH_DEBUG_TRIAGED_MISSING; import static android.content.pm.PackageManager.MATCH_DEBUG_TRIAGED_MISSING; Loading Loading @@ -1344,6 +1345,7 @@ public final class ActivityManagerService extends ActivityManagerNative boolean mSupportsMultiWindow; boolean mSupportsMultiWindow; boolean mSupportsFreeformWindowManagement; boolean mSupportsFreeformWindowManagement; boolean mSupportsPictureInPicture; boolean mSupportsPictureInPicture; boolean mSupportsLeanbackOnly; Rect mDefaultPinnedStackBounds; Rect mDefaultPinnedStackBounds; IActivityController mController = null; IActivityController mController = null; boolean mControllerIsAMonkey = false; boolean mControllerIsAMonkey = false; Loading Loading @@ -12813,6 +12815,9 @@ public final class ActivityManagerService extends ActivityManagerNative final boolean forceRtl = Settings.Global.getInt(resolver, DEVELOPMENT_FORCE_RTL, 0) != 0; final boolean forceRtl = Settings.Global.getInt(resolver, DEVELOPMENT_FORCE_RTL, 0) != 0; final boolean forceResizable = Settings.Global.getInt( final boolean forceResizable = Settings.Global.getInt( resolver, DEVELOPMENT_FORCE_RESIZABLE_ACTIVITIES, 0) != 0; resolver, DEVELOPMENT_FORCE_RESIZABLE_ACTIVITIES, 0) != 0; final boolean supportsLeanbackOnly = mContext.getPackageManager().hasSystemFeature(FEATURE_LEANBACK_ONLY); // Transfer any global setting for forcing RTL layout, into a System Property // Transfer any global setting for forcing RTL layout, into a System Property SystemProperties.set(DEVELOPMENT_FORCE_RTL, forceRtl ? "1":"0"); SystemProperties.set(DEVELOPMENT_FORCE_RTL, forceRtl ? "1":"0"); Loading @@ -12828,6 +12833,7 @@ public final class ActivityManagerService extends ActivityManagerNative mWaitForDebugger = mOrigWaitForDebugger = waitForDebugger; mWaitForDebugger = mOrigWaitForDebugger = waitForDebugger; mAlwaysFinishActivities = alwaysFinishActivities; mAlwaysFinishActivities = alwaysFinishActivities; mLenientBackgroundCheck = lenientBackgroundCheck; mLenientBackgroundCheck = lenientBackgroundCheck; mSupportsLeanbackOnly = supportsLeanbackOnly; mForceResizableActivities = forceResizable; mForceResizableActivities = forceResizable; mWindowManager.setForceResizableTasks(mForceResizableActivities); mWindowManager.setForceResizableTasks(mForceResizableActivities); if (supportsMultiWindow || forceResizable) { if (supportsMultiWindow || forceResizable) {
services/core/java/com/android/server/am/ActivityStack.java +3 −3 Original line number Original line Diff line number Diff line Loading @@ -1832,9 +1832,9 @@ final class ActivityStack { boolean isVisible = boolean isVisible = !behindFullscreenActivity || r.mLaunchTaskBehind || activityVisibleBehind; !behindFullscreenActivity || r.mLaunchTaskBehind || activityVisibleBehind; if (isVisible && r.isRecentsActivity()) { if (mService.mSupportsLeanbackOnly && isVisible && r.isRecentsActivity()) { // Recents activity can only be visible if the home stack is the focused stack or we are // On devices that support leanback only (Android TV), Recents activity can only be // in split-screen mode. // visible if the home stack is the focused stack or we are in split-screen mode. isVisible = mStackSupervisor.getStack(DOCKED_STACK_ID) != null isVisible = mStackSupervisor.getStack(DOCKED_STACK_ID) != null || mStackSupervisor.isFocusedStack(this); || mStackSupervisor.isFocusedStack(this); } } Loading