Adds identifier to TaskSnapshot
This identifier is introduced to differentiate two task snapshots in
AiAi. Currently, the timestamp (in millis) is chosen as the identifier.
Bug: 136563752
Test: atest TaskSnapshotPersisterLoaderTest
Change-Id: I249511d1e4bb34a93d5db08d2b1cea3b1ee5d034
diff --git a/services/core/java/com/android/server/wm/TaskSnapshotPersister.java b/services/core/java/com/android/server/wm/TaskSnapshotPersister.java
index 72fc189..32a1d90 100644
--- a/services/core/java/com/android/server/wm/TaskSnapshotPersister.java
+++ b/services/core/java/com/android/server/wm/TaskSnapshotPersister.java
@@ -343,6 +343,7 @@
proto.isTranslucent = mSnapshot.isTranslucent();
proto.topActivityComponent = mSnapshot.getTopActivityComponent().flattenToString();
proto.scale = mSnapshot.getScale();
+ proto.id = mSnapshot.getId();
final byte[] bytes = TaskSnapshotProto.toByteArray(proto);
final File file = getProtoFile(mTaskId, mUserId);
final AtomicFile atomicFile = new AtomicFile(file);