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

This commit is contained in:
Songchun Fan
2022-05-09 19:51:09 +00:00
committed by Android (Google) Code Review
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);
for (int i = 0; i < end; i++) {
final E val = Snapshots.maybeSnapshot(src.get(i));
dst.add(val);
dst.mStorage.add(val);
}
dst.seal();
}

View File

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

View File

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

View File

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

View File

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

View File

@@ -310,7 +310,7 @@ public class WatchedSparseBooleanArray extends WatchableImpl
}
final int end = src.size();
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();
}

View File

@@ -315,7 +315,7 @@ public class WatchedSparseIntArray extends WatchableImpl
}
final int end = src.size();
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();
}

View File

@@ -169,7 +169,7 @@ public class WatchedSparseSetArray<T> extends WatchableImpl implements Snappable
final ArraySet set = src.get(i);
final int setSize = set.size();
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();