Loading core/java/android/view/InsetsSourceConsumer.java +5 −6 Original line number Diff line number Diff line Loading @@ -180,10 +180,7 @@ public class InsetsSourceConsumer { // If we have a new leash, make sure visibility is up-to-date, even though we // didn't want to run an animation above. SurfaceControl newLeash = mSourceControl.getLeash(); if (oldLeash == null || newLeash == null || !oldLeash.isSameSurface(newLeash)) { applyHiddenToControl(); } applyRequestedVisibilityToControl(); // Remove the surface that owned by last control when it lost. if (!requestedVisible && !mIsAnimationPending && lastControl == null) { Loading Loading @@ -388,18 +385,20 @@ public class InsetsSourceConsumer { } } private void applyHiddenToControl() { private void applyRequestedVisibilityToControl() { if (mSourceControl == null || mSourceControl.getLeash() == null) { return; } final Transaction t = mTransactionSupplier.get(); if (DEBUG) Log.d(TAG, "applyHiddenToControl: " + mRequestedVisible); if (DEBUG) Log.d(TAG, "applyRequestedVisibilityToControl: " + mRequestedVisible); if (mRequestedVisible) { t.show(mSourceControl.getLeash()); } else { t.hide(mSourceControl.getLeash()); } // Ensure the alpha value is aligned with the actual requested visibility. t.setAlpha(mSourceControl.getLeash(), mRequestedVisible ? 1 : 0); t.apply(); onPerceptible(mRequestedVisible); } Loading Loading
core/java/android/view/InsetsSourceConsumer.java +5 −6 Original line number Diff line number Diff line Loading @@ -180,10 +180,7 @@ public class InsetsSourceConsumer { // If we have a new leash, make sure visibility is up-to-date, even though we // didn't want to run an animation above. SurfaceControl newLeash = mSourceControl.getLeash(); if (oldLeash == null || newLeash == null || !oldLeash.isSameSurface(newLeash)) { applyHiddenToControl(); } applyRequestedVisibilityToControl(); // Remove the surface that owned by last control when it lost. if (!requestedVisible && !mIsAnimationPending && lastControl == null) { Loading Loading @@ -388,18 +385,20 @@ public class InsetsSourceConsumer { } } private void applyHiddenToControl() { private void applyRequestedVisibilityToControl() { if (mSourceControl == null || mSourceControl.getLeash() == null) { return; } final Transaction t = mTransactionSupplier.get(); if (DEBUG) Log.d(TAG, "applyHiddenToControl: " + mRequestedVisible); if (DEBUG) Log.d(TAG, "applyRequestedVisibilityToControl: " + mRequestedVisible); if (mRequestedVisible) { t.show(mSourceControl.getLeash()); } else { t.hide(mSourceControl.getLeash()); } // Ensure the alpha value is aligned with the actual requested visibility. t.setAlpha(mSourceControl.getLeash(), mRequestedVisible ? 1 : 0); t.apply(); onPerceptible(mRequestedVisible); } Loading