Make sure PipBoundsHelper (on TVs) receives DisplayInfo
In order to make sure that PipBoundsHelper holds a valid DisplayInfo that it could use in its calculations, call PipBoundsHelper.onDisplayInfoChanhed() wich the current DisplayInfo from tv/PipManager constuctors (same as phone/PipManager does). Bug: 153711420 Bug: 153613389 Bug: 153050065 Test: manually Change-Id: Iab2d377bc7c816b614df3bfa2b6eafa080cd3b4d
This commit is contained in:
@@ -239,6 +239,12 @@ public class PipManager implements BasePipManager, PipTaskOrganizer.PipTransitio
|
||||
mInitialized = true;
|
||||
mContext = context;
|
||||
mPipBoundsHandler = pipBoundsHandler;
|
||||
// Ensure that we have the display info in case we get calls to update the bounds before the
|
||||
// listener calls back
|
||||
final DisplayInfo displayInfo = new DisplayInfo();
|
||||
context.getDisplay().getDisplayInfo(displayInfo);
|
||||
mPipBoundsHandler.onDisplayInfoChanged(displayInfo);
|
||||
|
||||
mResizeAnimationDuration = context.getResources()
|
||||
.getInteger(R.integer.config_pipResizeAnimationDuration);
|
||||
mPipTaskOrganizer = new PipTaskOrganizer(mContext, mPipBoundsHandler,
|
||||
|
||||
Reference in New Issue
Block a user