Merge changes I20bdab1b,Id82f9081 into oc-dev
am: 64b044680c
Change-Id: I6bf7127bd9f46855e186e13fc4e06f27535c4916
This commit is contained in:
@@ -1244,7 +1244,7 @@ public class ActivityOptions {
|
|||||||
// Once we parcel the thumbnail for transfering over to the system, create a copy of
|
// Once we parcel the thumbnail for transfering over to the system, create a copy of
|
||||||
// the bitmap to a hardware bitmap and pass through the GraphicBuffer
|
// the bitmap to a hardware bitmap and pass through the GraphicBuffer
|
||||||
if (mThumbnail != null) {
|
if (mThumbnail != null) {
|
||||||
final Bitmap hwBitmap = mThumbnail.copy(Config.HARDWARE, true /* immutable */);
|
final Bitmap hwBitmap = mThumbnail.copy(Config.HARDWARE, false /* isMutable */);
|
||||||
if (hwBitmap != null) {
|
if (hwBitmap != null) {
|
||||||
b.putParcelable(KEY_ANIM_THUMBNAIL, hwBitmap.createGraphicBufferHandle());
|
b.putParcelable(KEY_ANIM_THUMBNAIL, hwBitmap.createGraphicBufferHandle());
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -155,6 +155,10 @@ class PinnedStackController {
|
|||||||
mSnapAlgorithm = new PipSnapAlgorithm(service.mContext);
|
mSnapAlgorithm = new PipSnapAlgorithm(service.mContext);
|
||||||
mDisplayInfo.copyFrom(mDisplayContent.getDisplayInfo());
|
mDisplayInfo.copyFrom(mDisplayContent.getDisplayInfo());
|
||||||
reloadResources();
|
reloadResources();
|
||||||
|
// Initialize the aspect ratio to the default aspect ratio. Don't do this in reload
|
||||||
|
// resources as it would clobber mAspectRatio when entering PiP from fullscreen which
|
||||||
|
// triggers a configuration change and the resources to be reloaded.
|
||||||
|
mAspectRatio = mDefaultAspectRatio;
|
||||||
}
|
}
|
||||||
|
|
||||||
void onConfigurationChanged() {
|
void onConfigurationChanged() {
|
||||||
@@ -171,7 +175,6 @@ class PinnedStackController {
|
|||||||
mCurrentMinSize = mDefaultMinSize;
|
mCurrentMinSize = mDefaultMinSize;
|
||||||
mDefaultAspectRatio = res.getFloat(
|
mDefaultAspectRatio = res.getFloat(
|
||||||
com.android.internal.R.dimen.config_pictureInPictureDefaultAspectRatio);
|
com.android.internal.R.dimen.config_pictureInPictureDefaultAspectRatio);
|
||||||
mAspectRatio = mDefaultAspectRatio;
|
|
||||||
final String screenEdgeInsetsDpString = res.getString(
|
final String screenEdgeInsetsDpString = res.getString(
|
||||||
com.android.internal.R.string.config_defaultPictureInPictureScreenEdgeInsets);
|
com.android.internal.R.string.config_defaultPictureInPictureScreenEdgeInsets);
|
||||||
final Size screenEdgeInsetsDp = !screenEdgeInsetsDpString.isEmpty()
|
final Size screenEdgeInsetsDp = !screenEdgeInsetsDpString.isEmpty()
|
||||||
|
|||||||
Reference in New Issue
Block a user