Loading core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -2407,4 +2407,7 @@ that have not requested doing so (via the WindowManager.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS flag). --> <bool name="config_forceWindowDrawsStatusBarBackground">true</bool> <!-- Default bounds [left top right bottom] on screen for picture-in-picture windows. --> <string translatable="false" name="config_defaultPictureInPictureBounds">"0 0 100 100"</string> </resources> core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -303,6 +303,7 @@ <java-symbol type="bool" name="config_supportMicNearUltrasound" /> <java-symbol type="bool" name="config_supportSpeakerNearUltrasound" /> <java-symbol type="bool" name="config_freeformWindowManagement" /> <java-symbol type="string" name="config_defaultPictureInPictureBounds" /> <java-symbol type="integer" name="config_wifi_framework_5GHz_preference_boost_threshold" /> <java-symbol type="integer" name="config_wifi_framework_5GHz_preference_boost_factor" /> <java-symbol type="integer" name="config_wifi_framework_5GHz_preference_penalty_threshold" /> Loading services/core/java/com/android/server/am/ActivityManagerService.java +8 −1 Original line number Diff line number Diff line Loading @@ -1281,6 +1281,7 @@ public final class ActivityManagerService extends ActivityManagerNative boolean mForceResizableActivities; boolean mSupportsFreeformWindowManagement; boolean mSupportsPictureInPicture; Rect mDefaultPinnedStackBounds; IActivityController mController = null; String mProfileApp = null; ProcessRecord mProfileProc = null; Loading Loading @@ -7224,8 +7225,12 @@ public final class ActivityManagerService extends ActivityManagerNative + "Picture-In-Picture not supported for r=" + r); } // Use the default launch bounds for pinned stack if it doesn't exist yet. final Rect bounds = (mStackSupervisor.getStack(PINNED_STACK_ID) == null) ? mDefaultPinnedStackBounds : null; mStackSupervisor.moveActivityToStackLocked( r, PINNED_STACK_ID, "enterPictureInPictureMode", null); r, PINNED_STACK_ID, "enterPictureInPictureMode", bounds); } } finally { Binder.restoreCallingIdentity(origId); Loading Loading @@ -12102,6 +12107,8 @@ public final class ActivityManagerService extends ActivityManagerNative com.android.internal.R.dimen.thumbnail_width); mThumbnailHeight = res.getDimensionPixelSize( com.android.internal.R.dimen.thumbnail_height); mDefaultPinnedStackBounds = Rect.unflattenFromString(res.getString( com.android.internal.R.string.config_defaultPictureInPictureBounds)); } } Loading services/core/java/com/android/server/am/ActivityStackSupervisor.java +2 −2 Original line number Diff line number Diff line Loading @@ -3635,8 +3635,8 @@ public final class ActivityStackSupervisor implements DisplayListener { moveTaskToStackLocked( task.taskId, stackId, ON_TOP, FORCE_FOCUS, reason, true /* animate */); } else { final ActivityStack pinnedStack = getStack(PINNED_STACK_ID, CREATE_IF_NEEDED, ON_TOP); pinnedStack.moveActivityToStack(r); final ActivityStack stack = getStack(stackId, CREATE_IF_NEEDED, ON_TOP); stack.moveActivityToStack(r); } if (bounds != null) { Loading Loading
core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -2407,4 +2407,7 @@ that have not requested doing so (via the WindowManager.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS flag). --> <bool name="config_forceWindowDrawsStatusBarBackground">true</bool> <!-- Default bounds [left top right bottom] on screen for picture-in-picture windows. --> <string translatable="false" name="config_defaultPictureInPictureBounds">"0 0 100 100"</string> </resources>
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -303,6 +303,7 @@ <java-symbol type="bool" name="config_supportMicNearUltrasound" /> <java-symbol type="bool" name="config_supportSpeakerNearUltrasound" /> <java-symbol type="bool" name="config_freeformWindowManagement" /> <java-symbol type="string" name="config_defaultPictureInPictureBounds" /> <java-symbol type="integer" name="config_wifi_framework_5GHz_preference_boost_threshold" /> <java-symbol type="integer" name="config_wifi_framework_5GHz_preference_boost_factor" /> <java-symbol type="integer" name="config_wifi_framework_5GHz_preference_penalty_threshold" /> Loading
services/core/java/com/android/server/am/ActivityManagerService.java +8 −1 Original line number Diff line number Diff line Loading @@ -1281,6 +1281,7 @@ public final class ActivityManagerService extends ActivityManagerNative boolean mForceResizableActivities; boolean mSupportsFreeformWindowManagement; boolean mSupportsPictureInPicture; Rect mDefaultPinnedStackBounds; IActivityController mController = null; String mProfileApp = null; ProcessRecord mProfileProc = null; Loading Loading @@ -7224,8 +7225,12 @@ public final class ActivityManagerService extends ActivityManagerNative + "Picture-In-Picture not supported for r=" + r); } // Use the default launch bounds for pinned stack if it doesn't exist yet. final Rect bounds = (mStackSupervisor.getStack(PINNED_STACK_ID) == null) ? mDefaultPinnedStackBounds : null; mStackSupervisor.moveActivityToStackLocked( r, PINNED_STACK_ID, "enterPictureInPictureMode", null); r, PINNED_STACK_ID, "enterPictureInPictureMode", bounds); } } finally { Binder.restoreCallingIdentity(origId); Loading Loading @@ -12102,6 +12107,8 @@ public final class ActivityManagerService extends ActivityManagerNative com.android.internal.R.dimen.thumbnail_width); mThumbnailHeight = res.getDimensionPixelSize( com.android.internal.R.dimen.thumbnail_height); mDefaultPinnedStackBounds = Rect.unflattenFromString(res.getString( com.android.internal.R.string.config_defaultPictureInPictureBounds)); } } Loading
services/core/java/com/android/server/am/ActivityStackSupervisor.java +2 −2 Original line number Diff line number Diff line Loading @@ -3635,8 +3635,8 @@ public final class ActivityStackSupervisor implements DisplayListener { moveTaskToStackLocked( task.taskId, stackId, ON_TOP, FORCE_FOCUS, reason, true /* animate */); } else { final ActivityStack pinnedStack = getStack(PINNED_STACK_ID, CREATE_IF_NEEDED, ON_TOP); pinnedStack.moveActivityToStack(r); final ActivityStack stack = getStack(stackId, CREATE_IF_NEEDED, ON_TOP); stack.moveActivityToStack(r); } if (bounds != null) { Loading