Merge "[snapshot] skip onChanged() in Watched* snapshot()" into tm-dev am: cd58d78988

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

Change-Id: I52d9f63eb2a924b289005a41dee270d68f4a1dbd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Songchun Fan
2022-05-09 21:11:10 +00:00
committed by Automerger Merge Worker
8 changed files with 8 additions and 8 deletions

View File

@@ -416,7 +416,7 @@ public class WatchedArrayList<E> extends WatchableImpl
dst.mStorage.ensureCapacity(end); dst.mStorage.ensureCapacity(end);
for (int i = 0; i < end; i++) { for (int i = 0; i < end; i++) {
final E val = Snapshots.maybeSnapshot(src.get(i)); final E val = Snapshots.maybeSnapshot(src.get(i));
dst.add(val); dst.mStorage.add(val);
} }
dst.seal(); dst.seal();
} }

View File

@@ -465,7 +465,7 @@ public class WatchedArrayMap<K, V> extends WatchableImpl
for (int i = 0; i < end; i++) { for (int i = 0; i < end; i++) {
final V val = Snapshots.maybeSnapshot(src.valueAt(i)); final V val = Snapshots.maybeSnapshot(src.valueAt(i));
final K key = src.keyAt(i); final K key = src.keyAt(i);
dst.put(key, val); dst.mStorage.put(key, val);
} }
dst.seal(); dst.seal();
} }

View File

@@ -427,7 +427,7 @@ public class WatchedArraySet<E> extends WatchableImpl
dst.mStorage.ensureCapacity(end); dst.mStorage.ensureCapacity(end);
for (int i = 0; i < end; i++) { for (int i = 0; i < end; i++) {
final E val = Snapshots.maybeSnapshot(src.valueAt(i)); final E val = Snapshots.maybeSnapshot(src.valueAt(i));
dst.append(val); dst.mStorage.append(val);
} }
dst.seal(); dst.seal();
} }

View File

@@ -410,7 +410,7 @@ public class WatchedLongSparseArray<E> extends WatchableImpl
for (int i = 0; i < end; i++) { for (int i = 0; i < end; i++) {
final E val = Snapshots.maybeSnapshot(src.valueAt(i)); final E val = Snapshots.maybeSnapshot(src.valueAt(i));
final long key = src.keyAt(i); final long key = src.keyAt(i);
dst.put(key, val); dst.mStorage.put(key, val);
} }
dst.seal(); dst.seal();
} }

View File

@@ -490,7 +490,7 @@ public class WatchedSparseArray<E> extends WatchableImpl
for (int i = 0; i < end; i++) { for (int i = 0; i < end; i++) {
final E val = Snapshots.maybeSnapshot(src.valueAt(i)); final E val = Snapshots.maybeSnapshot(src.valueAt(i));
final int key = src.keyAt(i); final int key = src.keyAt(i);
dst.put(key, val); dst.mStorage.put(key, val);
} }
dst.seal(); dst.seal();
} }

View File

@@ -310,7 +310,7 @@ public class WatchedSparseBooleanArray extends WatchableImpl
} }
final int end = src.size(); final int end = src.size();
for (int i = 0; i < end; i++) { for (int i = 0; i < end; i++) {
dst.put(src.keyAt(i), src.valueAt(i)); dst.mStorage.put(src.keyAt(i), src.valueAt(i));
} }
dst.seal(); dst.seal();
} }

View File

@@ -315,7 +315,7 @@ public class WatchedSparseIntArray extends WatchableImpl
} }
final int end = src.size(); final int end = src.size();
for (int i = 0; i < end; i++) { for (int i = 0; i < end; i++) {
dst.put(src.keyAt(i), src.valueAt(i)); dst.mStorage.put(src.keyAt(i), src.valueAt(i));
} }
dst.seal(); dst.seal();
} }

View File

@@ -169,7 +169,7 @@ public class WatchedSparseSetArray<T> extends WatchableImpl implements Snappable
final ArraySet set = src.get(i); final ArraySet set = src.get(i);
final int setSize = set.size(); final int setSize = set.size();
for (int j = 0; j < setSize; j++) { for (int j = 0; j < setSize; j++) {
dst.add(src.keyAt(i), set.valueAt(j)); dst.mStorage.add(src.keyAt(i), set.valueAt(j));
} }
} }
dst.seal(); dst.seal();