OSDN Git Service

Extract class AppsBackedUpOnThisDeviceJournal from BackupManagerService
authorRobert Berry <robertberry@google.com>
Mon, 17 Jul 2017 08:56:44 +0000 (09:56 +0100)
committerMichal Karpinski <mkarpinski@google.com>
Mon, 7 Aug 2017 10:45:04 +0000 (11:45 +0100)
commit6d2fbdf10df2ff6794a2563b9af623f40e4f2915
treea767872ef8766ae9d093f268435945c37b500695
parent63d8adcfc6e7dedbc134c57ddfc32d97ead714e4
Extract class AppsBackedUpOnThisDeviceJournal from BackupManagerService

Puts all the logic for remembering what apps have been backed up on
the current device into own class. Also fixes bug where if an app was
uninstalled, it was removed from the journal. As the journal is used
to decide what restore set to use after a fresh install of an app (as
at this point we do try to restore previous state if it's available)
it doesn't make sense to forget apps that were uninstalled.

Bug: 36850431
Test: adb shell am instrument -w -e package com.android.server.backup com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I9300883e139ee0773acbf4a09b08c7f5955c66e5
services/backup/java/com/android/server/backup/AppsBackedUpOnThisDeviceJournal.java [new file with mode: 0644]
services/backup/java/com/android/server/backup/RefactoredBackupManagerService.java
services/tests/servicestests/src/com/android/server/backup/AppsBackedUpOnThisDeviceJournalTest.java [new file with mode: 0644]