Home
last modified time | relevance | path

Searched refs:BackupIdRow (Results 1 – 7 of 7) sorted by relevance

/packages/providers/MediaProvider/tests/src/com/android/providers/media/stableuris/dao/
DBackupIdRowTest.java31 BackupIdRow row = BackupIdRow.newBuilder(5) in testSimple()
34 String s = BackupIdRow.serialize(row); in testSimple()
36 assertThat(BackupIdRow.deserialize(s)).isEqualTo(row); in testSimple()
41 BackupIdRow row = BackupIdRow.newBuilder(5) in testAllFields()
51 String s = BackupIdRow.serialize(row); in testAllFields()
53 assertThat(BackupIdRow.deserialize(s)).isEqualTo(row); in testAllFields()
55 BackupIdRow row2 = BackupIdRow.newBuilder(5) in testAllFields()
66 assertThat(BackupIdRow.deserialize(s)).isNotEqualTo(row2); in testAllFields()
/packages/providers/MediaProvider/src/com/android/providers/media/stableuris/dao/
DBackupIdRow.java33 public final class BackupIdRow implements Serializable { class
149 public BackupIdRow build() { in build()
150 BackupIdRow backupIdRow = new BackupIdRow(this.mId); in build()
165 return new BackupIdRow.Builder(id); in newBuilder()
168 private BackupIdRow(long id) { in BackupIdRow() method in BackupIdRow
229 if (!(o instanceof BackupIdRow)) return false; in equals()
230 BackupIdRow that = (BackupIdRow) o; in equals()
249 public static String serialize(BackupIdRow backupIdRow) throws IOException { in serialize()
260 public static BackupIdRow deserialize(String s) throws IOException, ClassNotFoundException { in deserialize()
266 BackupIdRow.Builder builder = BackupIdRow.newBuilder(Long.parseLong(fields[1])); in deserialize()
/packages/providers/MediaProvider/tests/src/com/android/providers/media/
DTestDatabaseBackupAndRecovery.java22 import com.android.providers.media.stableuris.dao.BackupIdRow;
35 private Map<String, BackupIdRow> mBackedUpData = new HashMap<>();
38 Map<String, BackupIdRow> backedUpData) { in TestDatabaseBackupAndRecovery()
68 protected Optional<BackupIdRow> readDataFromBackup(String volumeName, in readDataFromBackup()
87 public void setBackedUpData(Map<String, BackupIdRow> backedUpData) { in setBackedUpData()
DDatabaseHelperTest.java50 import com.android.providers.media.stableuris.dao.BackupIdRow;
296 Map<String, BackupIdRow> backedUpData = new HashMap<>(); in assertDowngradeWithStableUrisEnabledRecoversData()
297 backedUpData.put("/product/media/audio/alarms/a.ogg", BackupIdRow.newBuilder(1).setIsDirty( in assertDowngradeWithStableUrisEnabledRecoversData()
300 BackupIdRow.newBuilder(2).setIsDirty(false).build()); in assertDowngradeWithStableUrisEnabledRecoversData()
301 backedUpData.put("/product/media/audio/alarms/c.ogg", BackupIdRow.newBuilder(3).setIsDirty( in assertDowngradeWithStableUrisEnabledRecoversData()
303 backedUpData.put("/product/media/audio/alarms/d.ogg", BackupIdRow.newBuilder(4).setIsDirty( in assertDowngradeWithStableUrisEnabledRecoversData()
305 backedUpData.put("/product/media/audio/alarms/e.ogg", BackupIdRow.newBuilder(5).setIsDirty( in assertDowngradeWithStableUrisEnabledRecoversData()
/packages/providers/MediaProvider/src/com/android/providers/media/
DDatabaseBackupAndRecovery.java50 import com.android.providers.media.stableuris.dao.BackupIdRow;
337 protected Optional<BackupIdRow> readDataFromBackup(String volumeName, String filePath) { in readDataFromBackup()
350 return Optional.of(BackupIdRow.deserialize(data)); in readDataFromBackup()
497 BackupIdRow backupIdRow = createBackupIdRow(externalPrimaryFuseDaemon, id, mediaType, in backupDataValues()
501 BackupIdRow.serialize(backupIdRow)); in backupDataValues()
505 BackupIdRow.serialize(backupIdRow)); in backupDataValues()
589 final BackupIdRow value = createBackupIdRow(fuseDaemonExternalPrimary, insertedRow); in backupVolumeDbData()
592 insertedRow.getPath(), BackupIdRow.serialize(value)); in backupVolumeDbData()
598 insertedRow.getPath(), BackupIdRow.serialize(value)); in backupVolumeDbData()
605 private BackupIdRow createBackupIdRow(FuseDaemon fuseDaemon, FileRow insertedRow) in createBackupIdRow()
[all …]
DMediaProvider.java303 import com.android.providers.media.stableuris.dao.BackupIdRow;
7378 Optional<BackupIdRow> backupIdRowOptional =
7383 data = backupIdRowOptional.isPresent() ? BackupIdRow.serialize(
/packages/providers/MediaProvider/tests/src/com/android/providers/media/stableuris/job/
DStableUriIdleMaintenanceServiceTest.java46 import com.android.providers.media.stableuris.dao.BackupIdRow;
120 BackupIdRow backupIdRow = BackupIdRow.deserialize(MediaStore.readBackup(resolver, in testDataMigrationForInternalVolume()
168 BackupIdRow backupIdRow = BackupIdRow.deserialize( in testDataMigrationForExternalVolume()
233 BackupIdRow backupIdRow = BackupIdRow.deserialize( in testDataMigrationForPublicVolume()