Merge "Persist the launcher keep clear area." into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
edf1ca06b3
@@ -103,7 +103,6 @@ import com.android.wm.shell.sysui.UserChangeListener;
|
|||||||
import com.android.wm.shell.transition.Transitions;
|
import com.android.wm.shell.transition.Transitions;
|
||||||
|
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
@@ -118,6 +117,8 @@ public class PipController implements PipTransitionController.PipTransitionCallb
|
|||||||
UserChangeListener {
|
UserChangeListener {
|
||||||
private static final String TAG = "PipController";
|
private static final String TAG = "PipController";
|
||||||
|
|
||||||
|
private static final String LAUNCHER_KEEP_CLEAR_AREA_TAG = "hotseat";
|
||||||
|
|
||||||
private static final long PIP_KEEP_CLEAR_AREAS_DELAY =
|
private static final long PIP_KEEP_CLEAR_AREAS_DELAY =
|
||||||
SystemProperties.getLong("persist.wm.debug.pip_keep_clear_areas_delay", 200);
|
SystemProperties.getLong("persist.wm.debug.pip_keep_clear_areas_delay", 200);
|
||||||
|
|
||||||
@@ -929,12 +930,10 @@ public class PipController implements PipTransitionController.PipTransitionCallb
|
|||||||
0, mPipBoundsState.getDisplayBounds().bottom - height,
|
0, mPipBoundsState.getDisplayBounds().bottom - height,
|
||||||
mPipBoundsState.getDisplayBounds().right,
|
mPipBoundsState.getDisplayBounds().right,
|
||||||
mPipBoundsState.getDisplayBounds().bottom);
|
mPipBoundsState.getDisplayBounds().bottom);
|
||||||
Set<Rect> restrictedKeepClearAreas = new HashSet<>(
|
mPipBoundsState.addNamedUnrestrictedKeepClearArea(LAUNCHER_KEEP_CLEAR_AREA_TAG, rect);
|
||||||
mPipBoundsState.getRestrictedKeepClearAreas());
|
|
||||||
restrictedKeepClearAreas.add(rect);
|
|
||||||
mPipBoundsState.setKeepClearAreas(restrictedKeepClearAreas,
|
|
||||||
mPipBoundsState.getUnrestrictedKeepClearAreas());
|
|
||||||
updatePipPositionForKeepClearAreas();
|
updatePipPositionForKeepClearAreas();
|
||||||
|
} else {
|
||||||
|
mPipBoundsState.removeNamedUnrestrictedKeepClearArea(LAUNCHER_KEEP_CLEAR_AREA_TAG);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user