Loading core/java/android/view/InsetsAnimationControlImpl.java +6 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.view; import static android.view.InsetsState.INSET_SIDE_BOTTOM; import static android.view.InsetsState.INSET_SIDE_FLOATING; import static android.view.InsetsState.INSET_SIDE_LEFT; import static android.view.InsetsState.INSET_SIDE_RIGHT; import static android.view.InsetsState.INSET_SIDE_TOP; Loading Loading @@ -151,6 +152,8 @@ public class InsetsAnimationControlImpl implements WindowInsetsAnimationControll updateLeashesForSide(INSET_SIDE_RIGHT, offset.right, mPendingInsets.right, params, state); updateLeashesForSide(INSET_SIDE_BOTTOM, offset.bottom, mPendingInsets.bottom, params, state); updateLeashesForSide(INSET_SIDE_FLOATING, 0 /* offset */, 0 /* inset */, params, state); SyncRtSurfaceTransactionApplier applier = mTransactionApplierSupplier.get(); applier.scheduleApply(params.toArray(new SurfaceParams[params.size()])); mCurrentInsets = mPendingInsets; Loading Loading @@ -238,7 +241,9 @@ public class InsetsAnimationControlImpl implements WindowInsetsAnimationControll // If the system is controlling the insets source, the leash can be null. if (leash != null) { surfaceParams.add(new SurfaceParams(leash, 1f /* alpha */, mTmpMatrix, null /* windowCrop */, 0 /* layer */, 0f /* cornerRadius*/, inset != 0)); null /* windowCrop */, 0 /* layer */, 0f /* cornerRadius*/, side == INSET_SIDE_FLOATING ? consumer.isVisible() : inset != 0 /* visible */)); } } } Loading core/java/android/view/InsetsState.java +8 −3 Original line number Diff line number Diff line Loading @@ -109,6 +109,7 @@ public class InsetsState implements Parcelable { INSET_SIDE_TOP, INSET_SIDE_RIGHT, INSET_SIDE_BOTTOM, INSET_SIDE_FLOATING, INSET_SIDE_UNKNWON }) public @interface InsetSide {} Loading @@ -116,7 +117,8 @@ public class InsetsState implements Parcelable { static final int INSET_SIDE_TOP = 1; static final int INSET_SIDE_RIGHT = 2; static final int INSET_SIDE_BOTTOM = 3; static final int INSET_SIDE_UNKNWON = 4; static final int INSET_SIDE_FLOATING = 4; static final int INSET_SIDE_UNKNWON = 5; private final ArrayMap<Integer, InsetsSource> mSources = new ArrayMap<>(); Loading Loading @@ -224,10 +226,10 @@ public class InsetsState implements Parcelable { typeVisibilityMap[index] = source.isVisible(); } if (typeSideMap != null && !Insets.NONE.equals(insets)) { if (typeSideMap != null) { @InsetSide int insetSide = getInsetSide(insets); if (insetSide != INSET_SIDE_UNKNWON) { typeSideMap.put(source.getType(), getInsetSide(insets)); typeSideMap.put(source.getType(), insetSide); } } } Loading @@ -237,6 +239,9 @@ public class InsetsState implements Parcelable { * is set in order that this method returns a meaningful result. */ private @InsetSide int getInsetSide(Insets insets) { if (Insets.NONE.equals(insets)) { return INSET_SIDE_FLOATING; } if (insets.left != 0) { return INSET_SIDE_LEFT; } Loading Loading
core/java/android/view/InsetsAnimationControlImpl.java +6 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.view; import static android.view.InsetsState.INSET_SIDE_BOTTOM; import static android.view.InsetsState.INSET_SIDE_FLOATING; import static android.view.InsetsState.INSET_SIDE_LEFT; import static android.view.InsetsState.INSET_SIDE_RIGHT; import static android.view.InsetsState.INSET_SIDE_TOP; Loading Loading @@ -151,6 +152,8 @@ public class InsetsAnimationControlImpl implements WindowInsetsAnimationControll updateLeashesForSide(INSET_SIDE_RIGHT, offset.right, mPendingInsets.right, params, state); updateLeashesForSide(INSET_SIDE_BOTTOM, offset.bottom, mPendingInsets.bottom, params, state); updateLeashesForSide(INSET_SIDE_FLOATING, 0 /* offset */, 0 /* inset */, params, state); SyncRtSurfaceTransactionApplier applier = mTransactionApplierSupplier.get(); applier.scheduleApply(params.toArray(new SurfaceParams[params.size()])); mCurrentInsets = mPendingInsets; Loading Loading @@ -238,7 +241,9 @@ public class InsetsAnimationControlImpl implements WindowInsetsAnimationControll // If the system is controlling the insets source, the leash can be null. if (leash != null) { surfaceParams.add(new SurfaceParams(leash, 1f /* alpha */, mTmpMatrix, null /* windowCrop */, 0 /* layer */, 0f /* cornerRadius*/, inset != 0)); null /* windowCrop */, 0 /* layer */, 0f /* cornerRadius*/, side == INSET_SIDE_FLOATING ? consumer.isVisible() : inset != 0 /* visible */)); } } } Loading
core/java/android/view/InsetsState.java +8 −3 Original line number Diff line number Diff line Loading @@ -109,6 +109,7 @@ public class InsetsState implements Parcelable { INSET_SIDE_TOP, INSET_SIDE_RIGHT, INSET_SIDE_BOTTOM, INSET_SIDE_FLOATING, INSET_SIDE_UNKNWON }) public @interface InsetSide {} Loading @@ -116,7 +117,8 @@ public class InsetsState implements Parcelable { static final int INSET_SIDE_TOP = 1; static final int INSET_SIDE_RIGHT = 2; static final int INSET_SIDE_BOTTOM = 3; static final int INSET_SIDE_UNKNWON = 4; static final int INSET_SIDE_FLOATING = 4; static final int INSET_SIDE_UNKNWON = 5; private final ArrayMap<Integer, InsetsSource> mSources = new ArrayMap<>(); Loading Loading @@ -224,10 +226,10 @@ public class InsetsState implements Parcelable { typeVisibilityMap[index] = source.isVisible(); } if (typeSideMap != null && !Insets.NONE.equals(insets)) { if (typeSideMap != null) { @InsetSide int insetSide = getInsetSide(insets); if (insetSide != INSET_SIDE_UNKNWON) { typeSideMap.put(source.getType(), getInsetSide(insets)); typeSideMap.put(source.getType(), insetSide); } } } Loading @@ -237,6 +239,9 @@ public class InsetsState implements Parcelable { * is set in order that this method returns a meaningful result. */ private @InsetSide int getInsetSide(Insets insets) { if (Insets.NONE.equals(insets)) { return INSET_SIDE_FLOATING; } if (insets.left != 0) { return INSET_SIDE_LEFT; } Loading