Fix issue in InsetsState.set
Test: InsetsStateTest Fixes: 159610005 Change-Id: I7e64c4f7d93caae13b43f595a7ec8af901316399
This commit is contained in:
@@ -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++) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user