diff options
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/view/InsetsSourceConsumer.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/core/java/android/view/InsetsSourceConsumer.java b/core/java/android/view/InsetsSourceConsumer.java index 3869484468ae..ae70a4971776 100644 --- a/core/java/android/view/InsetsSourceConsumer.java +++ b/core/java/android/view/InsetsSourceConsumer.java @@ -22,6 +22,8 @@ import static android.view.InsetsState.getDefaultVisibility; import static android.view.InsetsController.DEBUG; import static android.view.InsetsState.toPublicType; +import static com.android.internal.annotations.VisibleForTesting.Visibility.PACKAGE; + import android.annotation.IntDef; import android.annotation.Nullable; import android.graphics.Rect; @@ -271,10 +273,13 @@ public class InsetsSourceConsumer { // no-op for types that always return ShowResult#SHOW_IMMEDIATELY. } - void updateSource(InsetsSource newSource) { + @VisibleForTesting(visibility = PACKAGE) + public void updateSource(InsetsSource newSource) { InsetsSource source = mState.peekSource(mType); if (source == null || mController.getAnimationType(mType) == ANIMATION_TYPE_NONE || source.getFrame().equals(newSource.getFrame())) { + mPendingFrame = null; + mPendingVisibleFrame = null; mState.addSource(newSource); return; } @@ -292,7 +297,8 @@ public class InsetsSourceConsumer { if (DEBUG) Log.d(TAG, "updateSource: " + newSource); } - boolean notifyAnimationFinished() { + @VisibleForTesting(visibility = PACKAGE) + public boolean notifyAnimationFinished() { if (mPendingFrame != null) { InsetsSource source = mState.getSource(mType); source.setFrame(mPendingFrame); |
