Loading libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/education/data/AppHandleEducationDatastoreRepository.kt +5 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import androidx.datastore.core.CorruptionException import androidx.datastore.core.DataStore import androidx.datastore.core.DataStoreFactory import androidx.datastore.core.Serializer import androidx.datastore.core.handlers.ReplaceFileCorruptionHandler import androidx.datastore.dataStoreFile import com.android.framework.protobuf.InvalidProtocolBufferException import com.android.internal.annotations.VisibleForTesting Loading @@ -48,6 +49,10 @@ constructor(private val dataStore: DataStore<WindowingEducationProto>) { DataStoreFactory.create( serializer = WindowingEducationProtoSerializer, produceFile = { context.dataStoreFile(APP_HANDLE_EDUCATION_DATASTORE_FILEPATH) }, corruptionHandler = ReplaceFileCorruptionHandler( produceNewData = { WindowingEducationProto.getDefaultInstance() } ), ) ) Loading libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/education/data/AppToWebEducationDatastoreRepository.kt +5 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import androidx.datastore.core.CorruptionException import androidx.datastore.core.DataStore import androidx.datastore.core.DataStoreFactory import androidx.datastore.core.Serializer import androidx.datastore.core.handlers.ReplaceFileCorruptionHandler import androidx.datastore.dataStoreFile import com.android.framework.protobuf.InvalidProtocolBufferException import com.android.internal.annotations.VisibleForTesting Loading @@ -42,6 +43,10 @@ constructor(private val dataStore: DataStore<WindowingEducationProto>) { DataStoreFactory.create( serializer = WindowingEducationProtoSerializer, produceFile = { context.dataStoreFile(APP_TO_WEB_EDUCATION_DATASTORE_FILEPATH) }, corruptionHandler = ReplaceFileCorruptionHandler( produceNewData = { WindowingEducationProto.getDefaultInstance() } ), ) ) Loading libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/persistence/DesktopPersistentRepository.kt +9 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import androidx.datastore.core.CorruptionException import androidx.datastore.core.DataStore import androidx.datastore.core.DataStoreFactory import androidx.datastore.core.Serializer import androidx.datastore.core.handlers.ReplaceFileCorruptionHandler import androidx.datastore.dataStoreFile import com.android.framework.protobuf.InvalidProtocolBufferException import com.android.wm.shell.shared.annotations.ShellBackgroundThread Loading @@ -49,6 +50,10 @@ class DesktopPersistentRepository(private val dataStore: DataStore<DesktopPersis serializer = DesktopPersistentRepositoriesSerializer, produceFile = { context.dataStoreFile(DESKTOP_REPOSITORIES_DATASTORE_FILE) }, scope = bgCoroutineScope, corruptionHandler = ReplaceFileCorruptionHandler( produceNewData = { DesktopPersistentRepositories.getDefaultInstance() } ), ) ) Loading Loading @@ -127,7 +132,10 @@ class DesktopPersistentRepository(private val dataStore: DataStore<DesktopPersis .toBuilder() .putDesktopRepoByUser( userId, currentRepository.toBuilder().putDesktop(desktopId, desktop.build()).build(), currentRepository .toBuilder() .putDesktop(desktopId, desktop.build()) .build(), ) .build() } Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/education/data/AppHandleEducationDatastoreRepository.kt +5 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import androidx.datastore.core.CorruptionException import androidx.datastore.core.DataStore import androidx.datastore.core.DataStoreFactory import androidx.datastore.core.Serializer import androidx.datastore.core.handlers.ReplaceFileCorruptionHandler import androidx.datastore.dataStoreFile import com.android.framework.protobuf.InvalidProtocolBufferException import com.android.internal.annotations.VisibleForTesting Loading @@ -48,6 +49,10 @@ constructor(private val dataStore: DataStore<WindowingEducationProto>) { DataStoreFactory.create( serializer = WindowingEducationProtoSerializer, produceFile = { context.dataStoreFile(APP_HANDLE_EDUCATION_DATASTORE_FILEPATH) }, corruptionHandler = ReplaceFileCorruptionHandler( produceNewData = { WindowingEducationProto.getDefaultInstance() } ), ) ) Loading
libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/education/data/AppToWebEducationDatastoreRepository.kt +5 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import androidx.datastore.core.CorruptionException import androidx.datastore.core.DataStore import androidx.datastore.core.DataStoreFactory import androidx.datastore.core.Serializer import androidx.datastore.core.handlers.ReplaceFileCorruptionHandler import androidx.datastore.dataStoreFile import com.android.framework.protobuf.InvalidProtocolBufferException import com.android.internal.annotations.VisibleForTesting Loading @@ -42,6 +43,10 @@ constructor(private val dataStore: DataStore<WindowingEducationProto>) { DataStoreFactory.create( serializer = WindowingEducationProtoSerializer, produceFile = { context.dataStoreFile(APP_TO_WEB_EDUCATION_DATASTORE_FILEPATH) }, corruptionHandler = ReplaceFileCorruptionHandler( produceNewData = { WindowingEducationProto.getDefaultInstance() } ), ) ) Loading
libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/persistence/DesktopPersistentRepository.kt +9 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import androidx.datastore.core.CorruptionException import androidx.datastore.core.DataStore import androidx.datastore.core.DataStoreFactory import androidx.datastore.core.Serializer import androidx.datastore.core.handlers.ReplaceFileCorruptionHandler import androidx.datastore.dataStoreFile import com.android.framework.protobuf.InvalidProtocolBufferException import com.android.wm.shell.shared.annotations.ShellBackgroundThread Loading @@ -49,6 +50,10 @@ class DesktopPersistentRepository(private val dataStore: DataStore<DesktopPersis serializer = DesktopPersistentRepositoriesSerializer, produceFile = { context.dataStoreFile(DESKTOP_REPOSITORIES_DATASTORE_FILE) }, scope = bgCoroutineScope, corruptionHandler = ReplaceFileCorruptionHandler( produceNewData = { DesktopPersistentRepositories.getDefaultInstance() } ), ) ) Loading Loading @@ -127,7 +132,10 @@ class DesktopPersistentRepository(private val dataStore: DataStore<DesktopPersis .toBuilder() .putDesktopRepoByUser( userId, currentRepository.toBuilder().putDesktop(desktopId, desktop.build()).build(), currentRepository .toBuilder() .putDesktop(desktopId, desktop.build()) .build(), ) .build() } Loading