/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/ |
D | PipBoundsStateTest.java | 67 private PipBoundsState mPipBoundsState; field in PipBoundsStateTest 81 mPipBoundsState = new PipBoundsState(mContext, mSizeSpecSource, pipDisplayLayoutState); in setUp() 89 mPipBoundsState.setBounds(bounds); in testSetBounds() 91 assertEquals(bounds, mPipBoundsState.getBounds()); in testSetBounds() 96 mPipBoundsState.setMaxSize(300, 300); in testBoundsScale() 97 mPipBoundsState.setBounds(new Rect(0, 0, 100, 100)); in testBoundsScale() 99 final int currentWidth = mPipBoundsState.getBounds().width(); in testBoundsScale() 100 final Point maxSize = mPipBoundsState.getMaxSize(); in testBoundsScale() 104 assertEquals(expectedBoundsScale, mPipBoundsState.getBoundsScale(), MARGIN_OF_ERROR); in testBoundsScale() 107 mPipBoundsState.setBounds(new Rect(0, 0, maxSize.x, maxSize.y)); in testBoundsScale() [all …]
|
D | PipBoundsAlgorithmTest.java | 69 private PipBoundsState mPipBoundsState; field in PipBoundsAlgorithmTest 80 mPipBoundsState = new PipBoundsState(mContext, mSizeSpecSource, mPipDisplayLayoutState); in setUp() 81 mPipBoundsAlgorithm = new PipBoundsAlgorithm(mContext, mPipBoundsState, in setUp() 145 mPipBoundsState.setOverrideMinSize(null); in getDefaultBounds_noOverrideMinSize_matchesDefaultSizeAndAspectRatio() 159 mPipBoundsState.setOverrideMinSize(overrideMinSize); in getDefaultBounds_widerOverrideMinSize_matchesMinSizeWidthAndDefaultAspectRatio() 175 mPipBoundsState.setOverrideMinSize(overrideMinSize); in getDefaultBounds_tallerOverrideMinSize_matchesMinSizeHeightAndDefaultAspectRatio() 188 mPipBoundsState.setImeVisibility(false, 0); in getDefaultBounds_imeShowing_offsetByImeHeight() 191 mPipBoundsState.setImeVisibility(true, imeHeight); in getDefaultBounds_imeShowing_offsetByImeHeight() 200 mPipBoundsState.setShelfVisibility(false, 0); in getDefaultBounds_shelfShowing_offsetByShelfHeight() 203 mPipBoundsState.setShelfVisibility(true, shelfHeight); in getDefaultBounds_shelfShowing_offsetByShelfHeight() [all …]
|
D | PipTaskOrganizerTest.java | 96 private PipBoundsState mPipBoundsState; field in PipTaskOrganizerTest 112 mPipBoundsState = new PipBoundsState(mContext, mSizeSpecSource, mPipDisplayLayoutState); in setUp() 114 mPipBoundsAlgorithm = new PipBoundsAlgorithm(mContext, mPipBoundsState, in setUp() 119 mPipTransitionState, mPipBoundsState, mPipDisplayLayoutState, in setUp() 146 assertEquals(aspectRatio.floatValue(), mPipBoundsState.getAspectRatio(), 0.01f); in startSwipePipToHome_updatesAspectRatio() 153 assertEquals(mComponent1, mPipBoundsState.getLastPipComponentName()); in startSwipePipToHome_updatesLastPipComponentName() 163 assertEquals(minSize, mPipBoundsState.getOverrideMinSize()); in startSwipePipToHome_updatesOverrideMinSize() 173 assertEquals(aspectRatio.floatValue(), mPipBoundsState.getAspectRatio(), 0.01f); in onTaskAppeared_updatesAspectRatio() 181 assertEquals(mComponent1, mPipBoundsState.getLastPipComponentName()); in onTaskAppeared_updatesLastPipComponentName() 192 assertEquals(minSize, mPipBoundsState.getOverrideMinSize()); in onTaskAppeared_updatesOverrideMinSize() [all …]
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/common/pip/ |
D | PipDoubleTapHelper.java | 65 private static int getMaxOrDefaultPipSizeSpec(@NonNull PipBoundsState mPipBoundsState) { in getMaxOrDefaultPipSizeSpec() argument 67 int averageWidth = (mPipBoundsState.getMaxSize().x in getMaxOrDefaultPipSizeSpec() 68 + mPipBoundsState.getMinSize().x) / 2; in getMaxOrDefaultPipSizeSpec() 72 return (mPipBoundsState.getBounds().width() > averageWidth) in getMaxOrDefaultPipSizeSpec() 85 public static int nextSizeSpec(@NonNull PipBoundsState mPipBoundsState, in nextSizeSpec() argument 88 boolean isScreenMax = mPipBoundsState.getBounds().width() in nextSizeSpec() 89 == mPipBoundsState.getMaxSize().x; in nextSizeSpec() 92 boolean isScreenDefault = (mPipBoundsState.getBounds().width() in nextSizeSpec() 93 == mPipBoundsState.getNormalBounds().width()) in nextSizeSpec() 94 && (mPipBoundsState.getBounds().height() in nextSizeSpec() [all …]
|
D | PipBoundsAlgorithm.java | 47 @NonNull private final PipBoundsState mPipBoundsState; field in PipBoundsAlgorithm 63 mPipBoundsState = pipBoundsState; in PipBoundsAlgorithm() 72 mPipBoundsState.setAspectRatio(mDefaultAspectRatio); in PipBoundsAlgorithm() 107 mPipBoundsState.getAspectRatio(), false /* useCurrentMinEdgeSize */, in getNormalBounds() 125 mPipBoundsState.getRestrictedKeepClearAreas(), in getEntryDestinationBounds() 126 mPipBoundsState.getUnrestrictedKeepClearAreas(), insets); in getEntryDestinationBounds() 131 final PipBoundsState.PipReentryState reentryState = mPipBoundsState.getReentryState(); in getEntryDestinationBoundsIgnoringKeepClearAreas() 136 Math.round(mPipBoundsState.getMaxSize().x * reentryState.getBoundsScale()), in getEntryDestinationBoundsIgnoringKeepClearAreas() 137 Math.round(mPipBoundsState.getMaxSize().y * reentryState.getBoundsScale())); in getEntryDestinationBoundsIgnoringKeepClearAreas() 143 mPipBoundsState.getAspectRatio(), false /* useCurrentMinEdgeSize */, in getEntryDestinationBoundsIgnoringKeepClearAreas() [all …]
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/ |
D | PipMotionHelper.java | 78 private @NonNull PipBoundsState mPipBoundsState; field in PipMotionHelper 130 if (mPipBoundsState.getBounds().equals(newBounds)) { 135 mPipBoundsState.setBounds(newBounds); 181 mPipBoundsState = pipBoundsState; in PipMotionHelper() 188 if (mPipBoundsState.getMotionBoundsState().isInMotion()) { in PipMotionHelper() 190 mPipBoundsState.getMotionBoundsState().getBoundsInMotion(), null); in PipMotionHelper() 197 mPipBoundsState.getMotionBoundsState().getBoundsInMotion()); in init() 203 return !mPipBoundsState.getMotionBoundsState().getAnimatingToBounds().isEmpty() in getFloatingBoundsOnScreen() 204 ? mPipBoundsState.getMotionBoundsState().getAnimatingToBounds() : getBounds(); in getFloatingBoundsOnScreen() 223 mPipBoundsState.getMotionBoundsState().onAllAnimationsEnded(); in synchronizePinnedStackBounds() [all …]
|
D | PipTouchHandler.java | 83 @NonNull private final PipBoundsState mPipBoundsState; field in PipTouchHandler 163 mMenuController.showMenu(MENU_STATE_FULL, mPipBoundsState.getBounds(), in onPipShowMenu() 186 mPipBoundsState = pipBoundsState; in PipTouchHandler() 199 if (mPipBoundsState.isStashed()) { in PipTouchHandler() 203 mPipBoundsState.setStashed(STASH_TYPE_NONE); in PipTouchHandler() 206 mPipBoundsState.getBounds(), true /* allowMenuTimeout */, in PipTouchHandler() 222 mPipBoundsState.addOnAspectRatioChangedCallback(this::updateMinMaxSize); in PipTouchHandler() 302 mMenuController.showMenu(MENU_STATE_FULL, mPipBoundsState.getBounds(), in showPictureInPictureMenu() 332 mPipResizeGestureHandler.setUserResizeBounds(mPipBoundsState.getBounds()); in onPinnedStackAnimationEnded() 369 final int prevBottom = mPipBoundsState.getMovementBounds().bottom in adjustBoundsForRotation() [all …]
|
D | PipController.java | 136 private PipBoundsState mPipBoundsState; field in PipController 163 if (mPipBoundsState.isStashed()) { in onKeepClearAreasChangedCallback() 186 Rect destBounds = mPipKeepClearAlgorithm.adjust(mPipBoundsState, in updatePipPositionForKeepClearAreas() 189 if (!destBounds.equals(mPipBoundsState.getBounds())) { in updatePipPositionForKeepClearAreas() 245 if (mPipBoundsState.getDisplayLayout().rotation() == toRotation) { 251 mPipBoundsState.updateBoundsScale(); 261 updateMovementBounds(mPipBoundsState.getNormalBounds(), true /* fromRotation */, 276 mTouchHandler.adjustBoundsForRotation(outBounds, mPipBoundsState.getBounds(), 288 mPipBoundsState.setShelfVisibility(false /* showing */, 0 /* height */, 290 mPipBoundsState.setImeVisibility(false /* showing */, 0 /* height */); [all …]
|
D | PipAccessibilityInteractionConnection.java | 61 private final @NonNull PipBoundsState mPipBoundsState; field in PipAccessibilityInteractionConnection 83 mPipBoundsState = pipBoundsState; in PipAccessibilityInteractionConnection() 120 if (mPipBoundsState.getBounds().width() == mNormalBounds.width() in performAccessibilityAction() 121 && mPipBoundsState.getBounds().height() == mNormalBounds.height()) { in performAccessibilityAction() 132 mPipBoundsState.setStashed(STASH_TYPE_NONE); in performAccessibilityAction() 150 pipBounds.set(mPipBoundsState.getBounds()); in performAccessibilityAction() 173 mPipBoundsState.getBounds(), mNormalMovementBounds); in setToExpandedBounds() 184 mPipBoundsState.getBounds(), mExpandedMovementBounds); in setToNormalBounds()
|
D | PipResizeGestureHandler.java | 65 private final PipBoundsState mPipBoundsState; field in PipResizeGestureHandler 124 mPipBoundsState = pipBoundsState; in PipResizeGestureHandler() 225 if (mPipBoundsState.isStashed()) { in onInputEvent() 232 final Rect pipBounds = mPipBoundsState.getBounds(); in onInputEvent() 304 final Rect pipBounds = mPipBoundsState.getBounds(); in onPinchResize() 362 mPipBoundsState.setHasUserResizedPip(true); in onPinchResize() 401 mPipTaskOrganizer.scheduleUserResizePip(mPipBoundsState.getBounds(), finalBounds, null); 403 mPipBoundsState.setHasUserResizedPip(true);
|
D | PhonePipMenuController.java | 99 private final PipBoundsState mPipBoundsState; field in PhonePipMenuController 133 mPipBoundsState = pipBoundsState; in PhonePipMenuController() 473 mPipMenuView.setActions(mPipBoundsState.getBounds(), in updateMenuActions()
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/ |
D | PipMotionHelper.java | 79 private @NonNull PipBoundsState mPipBoundsState; field in PipMotionHelper 133 if (mPipBoundsState.getBounds().equals(newBounds)) { 138 mPipBoundsState.setBounds(newBounds); 171 mPipBoundsState = pipBoundsState; in PipMotionHelper() 179 if (mPipBoundsState.getMotionBoundsState().isInMotion()) { in PipMotionHelper() 181 mPipBoundsState.getMotionBoundsState().getBoundsInMotion()); in PipMotionHelper() 190 mPipBoundsState.getMotionBoundsState().getBoundsInMotion()); in init() 196 return !mPipBoundsState.getMotionBoundsState().getAnimatingToBounds().isEmpty() in getFloatingBoundsOnScreen() 197 ? mPipBoundsState.getMotionBoundsState().getAnimatingToBounds() : getBounds(); in getFloatingBoundsOnScreen() 216 mPipBoundsState.getMotionBoundsState().onAllAnimationsEnded(); in synchronizePinnedStackBounds() [all …]
|
D | PipTouchHandler.java | 87 @NonNull private final PipBoundsState mPipBoundsState; field in PipTouchHandler 167 mMenuController.showMenu(MENU_STATE_FULL, mPipBoundsState.getBounds(), in onPipShowMenu() 193 mPipBoundsState = pipBoundsState; in PipTouchHandler() 209 if (mPipBoundsState.isStashed()) { in PipTouchHandler() 213 mPipBoundsState.setStashed(STASH_TYPE_NONE); in PipTouchHandler() 216 mPipBoundsState.getBounds(), true /* allowMenuTimeout */, in PipTouchHandler() 227 mPipBoundsState.addOnAspectRatioChangedCallback(this::updateMinMaxSize); in PipTouchHandler() 311 mMenuController.showMenu(MENU_STATE_FULL, mPipBoundsState.getBounds(), in showPictureInPictureMenu() 339 mPipResizeGestureHandler.setUserResizeBounds(mPipBoundsState.getBounds()); in onPinnedStackAnimationEnded() 378 final int prevBottom = mPipBoundsState.getMovementBounds().bottom in adjustBoundsForRotation() [all …]
|
D | PipResizeGestureHandler.java | 68 private final PipBoundsState mPipBoundsState; field in PipResizeGestureHandler 133 mPipBoundsState = pipBoundsState; in PipResizeGestureHandler() 149 mPipBoundsState.setBounds(rect); in PipResizeGestureHandler() 237 if (mPipBoundsState.isStashed()) { in onInputEvent() 244 final Rect pipBounds = mPipBoundsState.getBounds(); in onInputEvent() 313 final Rect pipBounds = mPipBoundsState.getBounds(); in onPinchResize() 370 mPipBoundsState.setHasUserResizedPip(true); in onPinchResize() 411 mPipBoundsState.setHasUserResizedPip(true); 523 if (mPipBoundsState.getBounds().equals(mLastResizeBounds)) { in onPipTransitionStateChanged() 528 mPipBoundsState.getBounds()); in onPipTransitionStateChanged() [all …]
|
D | PipScheduler.java | 54 private final PipBoundsState mPipBoundsState; field in PipScheduler 100 mPipBoundsState = pipBoundsState; in PipScheduler() 220 final float scale = (float) toBounds.width() / mPipBoundsState.getBounds().width(); in scheduleUserResizePip()
|
D | PipController.java | 81 private final PipBoundsState mPipBoundsState; field in PipController 134 mPipBoundsState = pipBoundsState; in PipController() 282 mPipBoundsState.setBoundsStateForEntry(componentName, activityInfo, pictureInPictureParams, in getSwipePipToHomeBounds() 353 mPipBoundsState.dump(pw, innerPrefix); in dump()
|
D | PhonePipMenuController.java | 99 private final PipBoundsState mPipBoundsState; field in PhonePipMenuController 131 mPipBoundsState = pipBoundsState; in PhonePipMenuController() 471 mPipMenuView.setActions(mPipBoundsState.getBounds(), in updateMenuActions()
|
D | PipTransition.java | 451 mPipBoundsState.setBoundsStateForEntry(pipTask.topActivity, pipTask.topActivityInfo, in getEnterPipTransaction() 456 mPipBoundsState.setBounds(entryBounds); in getEnterPipTransaction()
|
/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/phone/ |
D | PipTouchHandlerTest.java | 93 private PipBoundsState mPipBoundsState; field in PipTouchHandlerTest 115 mPipBoundsState = new PipBoundsState(mContext, mSizeSpecSource, mPipDisplayLayoutState); in setUp() 117 mPipBoundsAlgorithm = new PipBoundsAlgorithm(mContext, mPipBoundsState, mPipSnapAlgorithm, in setUp() 119 PipMotionHelper pipMotionHelper = new PipMotionHelper(mContext, mPipBoundsState, in setUp() 124 mPipBoundsAlgorithm, mPipBoundsState, mSizeSpecSource, mPipTaskOrganizer, in setUp() 136 mInsetBounds = new Rect(mPipBoundsState.getDisplayBounds().left + INSET, in setUp() 137 mPipBoundsState.getDisplayBounds().top + INSET, in setUp() 138 mPipBoundsState.getDisplayBounds().right - INSET, in setUp() 139 mPipBoundsState.getDisplayBounds().bottom - INSET); in setUp() 141 mPipBounds = new Rect(mPipBoundsState.getDisplayBounds().right - INSET - PIP_LENGTH, in setUp() [all …]
|
D | PipResizeGestureHandlerTest.java | 94 private PipBoundsState mPipBoundsState; field in PipResizeGestureHandlerTest 110 mPipBoundsState = new PipBoundsState(mContext, mSizeSpecSource, mPipDisplayLayoutState); in setUp() 115 mPipBoundsState, pipSnapAlgorithm, pipKeepClearAlgorithm, mPipDisplayLayoutState, in setUp() 117 final PipMotionHelper motionHelper = new PipMotionHelper(mContext, mPipBoundsState, in setUp() 125 mPipBoundsState, motionHelper, mPipTouchState, mPipTaskOrganizer, in setUp() 152 mPipBoundsState.setBounds(new Rect(topLeft, topLeft, bottomRight, bottomRight)); in twoInput_triggersPinchResize_getBigger() 184 > mPipBoundsState.getBounds().width()); in twoInput_triggersPinchResize_getBigger() 193 mPipBoundsState.setBounds(new Rect(topLeft, topLeft, bottomRight, bottomRight)); in twoInput_triggersPinchResize_getSmaller() 223 < mPipBoundsState.getBounds().width()); in twoInput_triggersPinchResize_getSmaller() 229 mPipResizeGestureHandler.userResizeTo(mPipBoundsState.getNormalBounds(), in testUserResizeTo() [all …]
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/ |
D | PipTaskOrganizer.java | 132 private final PipBoundsState mPipBoundsState; field in PipTaskOrganizer 397 mPipBoundsState = pipBoundsState; in PipTaskOrganizer() 444 return mPipBoundsState.getBounds(); in getCurrentOrAnimatingBounds() 515 mPipBoundsState.setBounds(destinationBounds); in stopSwipePipToHome() 589 mPipBoundsState.setBoundsStateForEntry(componentName, activityInfo, params, in setBoundsStateForEntry() 666 mPipBoundsState.getBounds()); in exitPip() 722 animateResizePip(mPipBoundsState.getBounds(), destinationBounds, sourceHintRect, in exitPip() 738 return mPipBoundsState.getDisplayBounds(); in getExitDestinationBounds() 770 .getAnimator(mTaskInfo, mLeash, mPipBoundsState.getBounds(), in removePip() 978 final Rect destinationBounds = mPipBoundsState.getBounds(); in onEndOfSwipePipToHomeTransition() [all …]
|
D | PipTransitionController.java | 65 protected final PipBoundsState mPipBoundsState; field in PipTransitionController 86 mPipBoundsState.setBounds(animator.getDestinationBounds()); 155 mPipBoundsState = pipBoundsState; in PipTransitionController() 190 final Rect pipBounds = mPipBoundsState.getBounds(); in sendOnPipTransitionStarted() 247 mPipBoundsState.setBoundsStateForEntry(componentName, activityInfo, params, in setBoundsStateForEntry()
|
D | PipTransition.java | 449 mPipBoundsState.getBounds(), mPipBoundsState.getBounds(), in onTransitionConsumed() 699 final Rect currentBounds = mPipBoundsState.getBounds(); in startExitAnimation() 706 mPipBoundsState.getDisplayBounds()); in startExitAnimation() 1056 mPipBoundsState.getLauncherState().getAppIconSizePx()); in startEnterAnimation() 1114 mPipBoundsState.updateMinMaxSize(mPipBoundsState.getAspectRatio()); in computeEnterPipRotatedBounds() 1169 mPipBoundsState.setBounds(destinationBounds); in handleSwipePipToHomeTransition() 1305 .getAnimator(taskInfo, leash, mPipBoundsState.getBounds(), alphaStart, alphaEnd) in fadeExistingPip()
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/pip/tv/ |
D | TvPipTransition.java | 248 final Rect currentBounds = mPipBoundsState.getBounds(); in startAnimation() 338 final Rect pipBounds = mPipBoundsState.getBounds(); in startCloseAnimation() 413 mPipBoundsState.setBounds(pipBounds); in startEnterAnimation()
|