Merge "Fix issue in InsetsState.set" into rvc-dev am: 2a60031116

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11987763

Change-Id: Iab65d955f9fa3859e70b33532636c88345588ea1
This commit is contained in:
TreeHugger Robot
2020-06-25 21:33:35 +00:00
committed by Automerger Merge Worker
2 changed files with 2 additions and 2 deletions

View File

@@ -427,8 +427,7 @@ public class InsetsState implements Parcelable {
if (copySources) {
for (int i = 0; i < SIZE; i++) {
InsetsSource source = other.mSources[i];
if (source == null) continue;
mSources[i] = new InsetsSource(source);
mSources[i] = source != null ? new InsetsSource(source) : null;
}
} else {
for (int i = 0; i < SIZE; i++) {

View File

@@ -304,6 +304,7 @@ public class InsetsStateTest {
mState.getSource(ITYPE_IME).setVisibleFrame(new Rect(0, 0, 50, 10));
mState.getSource(ITYPE_IME).setVisible(true);
mState.getSource(ITYPE_STATUS_BAR).setFrame(new Rect(0, 0, 100, 100));
mState2.getSource(ITYPE_NAVIGATION_BAR).setFrame(new Rect(0, 0, 100, 100));
mState2.set(mState, true);
assertEquals(mState, mState2);
}