Merge "Hide IME adjust dims when divider is hidden" into rvc-dev
This commit is contained in:
@@ -277,7 +277,8 @@ public class Divider extends SystemUI implements DividerView.DividerCallbacks,
|
|||||||
mView = (DividerView)
|
mView = (DividerView)
|
||||||
LayoutInflater.from(dctx).inflate(R.layout.docked_stack_divider, null);
|
LayoutInflater.from(dctx).inflate(R.layout.docked_stack_divider, null);
|
||||||
DisplayLayout displayLayout = mDisplayController.getDisplayLayout(mContext.getDisplayId());
|
DisplayLayout displayLayout = mDisplayController.getDisplayLayout(mContext.getDisplayId());
|
||||||
mView.injectDependencies(mWindowManager, mDividerState, this, mSplits, mSplitLayout);
|
mView.injectDependencies(mWindowManager, mDividerState, this, mSplits, mSplitLayout,
|
||||||
|
mImePositionProcessor);
|
||||||
mView.setVisibility(mVisible ? View.VISIBLE : View.INVISIBLE);
|
mView.setVisibility(mVisible ? View.VISIBLE : View.INVISIBLE);
|
||||||
mView.setMinimizedDockStack(mMinimized, mHomeStackResizable);
|
mView.setMinimizedDockStack(mMinimized, mHomeStackResizable);
|
||||||
final int size = dctx.getResources().getDimensionPixelSize(
|
final int size = dctx.getResources().getDimensionPixelSize(
|
||||||
|
|||||||
@@ -266,6 +266,18 @@ class DividerImeController implements DisplayImeController.ImePositionProcessor
|
|||||||
mLastSecondaryDim * invProg + progress * mTargetSecondaryDim);
|
mLastSecondaryDim * invProg + progress * mTargetSecondaryDim);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setDimsHidden(SurfaceControl.Transaction t, boolean hidden) {
|
||||||
|
final DividerView view = getView();
|
||||||
|
if (hidden) {
|
||||||
|
view.setResizeDimLayer(t, true /* primary */, 0.f /* alpha */);
|
||||||
|
view.setResizeDimLayer(t, false /* primary */, 0.f /* alpha */);
|
||||||
|
} else {
|
||||||
|
updateDimTargets();
|
||||||
|
view.setResizeDimLayer(t, true /* primary */, mTargetPrimaryDim);
|
||||||
|
view.setResizeDimLayer(t, false /* primary */, mTargetSecondaryDim);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void onEnd(boolean cancelled, SurfaceControl.Transaction t) {
|
private void onEnd(boolean cancelled, SurfaceControl.Transaction t) {
|
||||||
if (!cancelled) {
|
if (!cancelled) {
|
||||||
onProgress(1.f, t);
|
onProgress(1.f, t);
|
||||||
|
|||||||
@@ -143,6 +143,7 @@ public class DividerView extends FrameLayout implements OnTouchListener,
|
|||||||
private VelocityTracker mVelocityTracker;
|
private VelocityTracker mVelocityTracker;
|
||||||
private FlingAnimationUtils mFlingAnimationUtils;
|
private FlingAnimationUtils mFlingAnimationUtils;
|
||||||
private SplitDisplayLayout mSplitLayout;
|
private SplitDisplayLayout mSplitLayout;
|
||||||
|
private DividerImeController mImeController;
|
||||||
private DividerCallbacks mCallback;
|
private DividerCallbacks mCallback;
|
||||||
private final AnimationHandler mAnimationHandler = new AnimationHandler();
|
private final AnimationHandler mAnimationHandler = new AnimationHandler();
|
||||||
|
|
||||||
@@ -358,12 +359,14 @@ public class DividerView extends FrameLayout implements OnTouchListener,
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void injectDependencies(DividerWindowManager windowManager, DividerState dividerState,
|
public void injectDependencies(DividerWindowManager windowManager, DividerState dividerState,
|
||||||
DividerCallbacks callback, SplitScreenTaskOrganizer tiles, SplitDisplayLayout sdl) {
|
DividerCallbacks callback, SplitScreenTaskOrganizer tiles, SplitDisplayLayout sdl,
|
||||||
|
DividerImeController imeController) {
|
||||||
mWindowManager = windowManager;
|
mWindowManager = windowManager;
|
||||||
mState = dividerState;
|
mState = dividerState;
|
||||||
mCallback = callback;
|
mCallback = callback;
|
||||||
mTiles = tiles;
|
mTiles = tiles;
|
||||||
mSplitLayout = sdl;
|
mSplitLayout = sdl;
|
||||||
|
mImeController = imeController;
|
||||||
|
|
||||||
if (mState.mRatioPositionBeforeMinimized == 0) {
|
if (mState.mRatioPositionBeforeMinimized == 0) {
|
||||||
// Set the middle target as the initial state
|
// Set the middle target as the initial state
|
||||||
@@ -403,6 +406,7 @@ public class DividerView extends FrameLayout implements OnTouchListener,
|
|||||||
} else {
|
} else {
|
||||||
t.show(sc);
|
t.show(sc);
|
||||||
}
|
}
|
||||||
|
mImeController.setDimsHidden(t, hidden);
|
||||||
t.apply();
|
t.apply();
|
||||||
mTiles.releaseTransaction(t);
|
mTiles.releaseTransaction(t);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user