Merge "Use existing bounds when pinning an activity if there is already pinned stack" into nyc-dev

am: b420612696

* commit 'b42061269617b3ad84882749031413c223d6cb8c':
  Use existing bounds when pinning an activity if there is already pinned stack

Change-Id: Id6f6c7b2b4eb8262e5344d914d3024996191d87d
This commit is contained in:
Wale Ogunwale
2016-05-02 21:16:04 +00:00
committed by android-build-merger

View File

@@ -7340,9 +7340,11 @@ 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;
// Use the default launch bounds for pinned stack if it doesn't exist yet or use the
// current bounds.
final ActivityStack pinnedStack = mStackSupervisor.getStack(PINNED_STACK_ID);
final Rect bounds = (pinnedStack != null)
? pinnedStack.mBounds : mDefaultPinnedStackBounds;
mStackSupervisor.moveActivityToPinnedStackLocked(
r, "enterPictureInPictureMode", bounds);