summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorJorim Jaggi <jjaggi@google.com>2020-06-25 02:25:08 +0200
committerJorim Jaggi <jjaggi@google.com>2020-06-25 12:34:03 +0000
commitb2410eb4f91fdf9a9dc528f8329cfb29f1100da7 (patch)
tree2a28b4008f9f0948947b2fd85bffa700040ed9c1 /core/java/android
parentb3f5a7a9fe0e8306f09da493c590bd119caa466e (diff)
Fix issue in InsetsState.set
Test: InsetsStateTest Fixes: 159610005 Change-Id: I7e64c4f7d93caae13b43f595a7ec8af901316399
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/view/InsetsState.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/java/android/view/InsetsState.java b/core/java/android/view/InsetsState.java
index 9bf2e01a6bd1..91e7591193f1 100644
--- a/core/java/android/view/InsetsState.java
+++ b/core/java/android/view/InsetsState.java
@@ -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++) {