Pass the originating app's versionCode along with a restore set
This change amends the doRestore() / onRestore() interface to backup agents to provide the integer android:versionCode of the app that stored the backup set. This should help agents figure out how to handle whatever historical data set they're handed at restore time.
This commit is contained in:
@@ -192,7 +192,7 @@ public class PackageManagerBackupAgent extends BackupAgent {
|
||||
// "Restore" here is a misnomer. What we're really doing is reading back the
|
||||
// set of app signatures associated with each backed-up app in this restore
|
||||
// image. We'll use those later to determine what we can legitimately restore.
|
||||
public void onRestore(BackupDataInput data, ParcelFileDescriptor newState)
|
||||
public void onRestore(BackupDataInput data, int appVersionCode, ParcelFileDescriptor newState)
|
||||
throws IOException {
|
||||
List<ApplicationInfo> restoredApps = new ArrayList<ApplicationInfo>();
|
||||
HashMap<String, Metadata> sigMap = new HashMap<String, Metadata>();
|
||||
|
||||
Reference in New Issue
Block a user