Merge "Sanity-check existence of restore agent" into jb-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
4ea283a05f
@@ -4401,6 +4401,18 @@ class BackupManagerService extends IBackupManager.Stub {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (packageInfo.applicationInfo.backupAgentName == null
|
||||||
|
|| "".equals(packageInfo.applicationInfo.backupAgentName)) {
|
||||||
|
if (DEBUG) {
|
||||||
|
Slog.i(TAG, "Data exists for package " + packageName
|
||||||
|
+ " but app has no agent; skipping");
|
||||||
|
}
|
||||||
|
EventLog.writeEvent(EventLogTags.RESTORE_AGENT_FAILURE, packageName,
|
||||||
|
"Package has no agent");
|
||||||
|
executeNextState(RestoreState.RUNNING_QUEUE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (metaInfo.versionCode > packageInfo.versionCode) {
|
if (metaInfo.versionCode > packageInfo.versionCode) {
|
||||||
// Data is from a "newer" version of the app than we have currently
|
// Data is from a "newer" version of the app than we have currently
|
||||||
// installed. If the app has not declared that it is prepared to
|
// installed. If the app has not declared that it is prepared to
|
||||||
|
|||||||
Reference in New Issue
Block a user