Skip to content
Commit f150dc49 authored by Hongwei Wang's avatar Hongwei Wang
Browse files

Add API to differentiate PiP content

Added PictureInPictureParams.Builder#setSeamlessResizeEnabled that app
can specify its resize capability. For backward compatibility, this is
default to true and when it's set to false, SystemUI can perform
transition to overcome the artifacts due to resize.

Also included in this change, the primitives like mAutoEnterEnabled and
mSeamlessResizeEnabled would be problematic with the following patterns
from an Activity

```
PicureInPictureParams.Builder builder = new PictureInPictureParams.Builder();
builder.setAutoEnterEnabled(true);
setPictureInPictureParams(builder.build());
enterPictureInPictureMode();
```

with the code snippet above, the PictureInPictureParams#copyOnlySet will
override the mAutoEnterEnabled to false. Fixed by switching the
primitive to Boolean object.

Bug: 175052991
Test: atest PinnedStackTests
Change-Id: I4d52f59b49dcbb8998ed74237bdba93c0ad139e4
parent 42991d36
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment