Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +8 −4 Original line number Diff line number Diff line Loading @@ -284,17 +284,21 @@ public class BubbleController { mSyncQueue = syncQueue; } private static void registerOneHandedState(OneHandedController oneHanded) { private void registerOneHandedState(OneHandedController oneHanded) { oneHanded.registerTransitionCallback( new OneHandedTransitionCallback() { @Override public void onStartFinished(Rect bounds) { // TODO(b/198403767) mStackView.offSetY(int bounds.top) if (mStackView != null) { mStackView.onVerticalOffsetChanged(bounds.top); } } @Override public void onStopFinished(Rect bounds) { // TODO(b/198403767) mStackView.offSetY(int bounds.top) if (mStackView != null) { mStackView.onVerticalOffsetChanged(bounds.top); } } }); } Loading Loading @@ -423,7 +427,7 @@ public class BubbleController { } }); mOneHandedOptional.ifPresent(BubbleController::registerOneHandedState); mOneHandedOptional.ifPresent(this::registerOneHandedState); } @VisibleForTesting Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java +10 −0 Original line number Diff line number Diff line Loading @@ -3014,6 +3014,16 @@ public class BubbleStackView extends FrameLayout return mStackViewState; } /** * Handles vertical offset changes, e.g. when one handed mode is switched on/off. * * @param offset new vertical offset. */ void onVerticalOffsetChanged(int offset) { // adjust dismiss view vertical position, so that it is still visible to the user mDismissView.setPadding(/* left = */ 0, /* top = */ 0, /* right = */ 0, offset); } /** * Holds some commonly queried information about the stack. */ Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleController.java +8 −4 Original line number Diff line number Diff line Loading @@ -284,17 +284,21 @@ public class BubbleController { mSyncQueue = syncQueue; } private static void registerOneHandedState(OneHandedController oneHanded) { private void registerOneHandedState(OneHandedController oneHanded) { oneHanded.registerTransitionCallback( new OneHandedTransitionCallback() { @Override public void onStartFinished(Rect bounds) { // TODO(b/198403767) mStackView.offSetY(int bounds.top) if (mStackView != null) { mStackView.onVerticalOffsetChanged(bounds.top); } } @Override public void onStopFinished(Rect bounds) { // TODO(b/198403767) mStackView.offSetY(int bounds.top) if (mStackView != null) { mStackView.onVerticalOffsetChanged(bounds.top); } } }); } Loading Loading @@ -423,7 +427,7 @@ public class BubbleController { } }); mOneHandedOptional.ifPresent(BubbleController::registerOneHandedState); mOneHandedOptional.ifPresent(this::registerOneHandedState); } @VisibleForTesting Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java +10 −0 Original line number Diff line number Diff line Loading @@ -3014,6 +3014,16 @@ public class BubbleStackView extends FrameLayout return mStackViewState; } /** * Handles vertical offset changes, e.g. when one handed mode is switched on/off. * * @param offset new vertical offset. */ void onVerticalOffsetChanged(int offset) { // adjust dismiss view vertical position, so that it is still visible to the user mDismissView.setPadding(/* left = */ 0, /* top = */ 0, /* right = */ 0, offset); } /** * Holds some commonly queried information about the stack. */ Loading