Merge "Check that PIP is active before setting the PIP exclusion bounds" into sc-dev
This commit is contained in:
@@ -73,6 +73,7 @@ public class PipTouchHandler {
|
|||||||
// Allow PIP to resize to a slightly bigger state upon touch
|
// Allow PIP to resize to a slightly bigger state upon touch
|
||||||
private boolean mEnableResize;
|
private boolean mEnableResize;
|
||||||
private final Context mContext;
|
private final Context mContext;
|
||||||
|
private final PipTaskOrganizer mPipTaskOrganizer;
|
||||||
private final PipBoundsAlgorithm mPipBoundsAlgorithm;
|
private final PipBoundsAlgorithm mPipBoundsAlgorithm;
|
||||||
private final @NonNull PipBoundsState mPipBoundsState;
|
private final @NonNull PipBoundsState mPipBoundsState;
|
||||||
private final PipUiEventLogger mPipUiEventLogger;
|
private final PipUiEventLogger mPipUiEventLogger;
|
||||||
@@ -169,6 +170,7 @@ public class PipTouchHandler {
|
|||||||
mContext = context;
|
mContext = context;
|
||||||
mMainExecutor = mainExecutor;
|
mMainExecutor = mainExecutor;
|
||||||
mAccessibilityManager = context.getSystemService(AccessibilityManager.class);
|
mAccessibilityManager = context.getSystemService(AccessibilityManager.class);
|
||||||
|
mPipTaskOrganizer = pipTaskOrganizer;
|
||||||
mPipBoundsAlgorithm = pipBoundsAlgorithm;
|
mPipBoundsAlgorithm = pipBoundsAlgorithm;
|
||||||
mPipBoundsState = pipBoundsState;
|
mPipBoundsState = pipBoundsState;
|
||||||
mMenuController = menuController;
|
mMenuController = menuController;
|
||||||
@@ -982,7 +984,9 @@ public class PipTouchHandler {
|
|||||||
|
|
||||||
void setPipExclusionBoundsChangeListener(Consumer<Rect> pipExclusionBoundsChangeListener) {
|
void setPipExclusionBoundsChangeListener(Consumer<Rect> pipExclusionBoundsChangeListener) {
|
||||||
mPipExclusionBoundsChangeListener = new WeakReference<>(pipExclusionBoundsChangeListener);
|
mPipExclusionBoundsChangeListener = new WeakReference<>(pipExclusionBoundsChangeListener);
|
||||||
pipExclusionBoundsChangeListener.accept(mPipBoundsState.getBounds());
|
pipExclusionBoundsChangeListener.accept(mPipTaskOrganizer.isInPip()
|
||||||
|
? mPipBoundsState.getBounds() : new Rect());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user