Protect unbindBackupAgent() with CONFIRM_FULL_BACKUP permission
To prevent any caller that is not signed w/ the platform certificate from calling this method. Bug: 79700331 Test: adb shell bmgr backupnow <package>, verify agents unbound Change-Id: I1409f015772057c84b4879dcd65bb0aaf2429803
This commit is contained in:
@@ -20588,6 +20588,7 @@ public class ActivityManagerService extends IActivityManager.Stub
|
||||
// done with this agent
|
||||
public void unbindBackupAgent(ApplicationInfo appInfo) {
|
||||
if (DEBUG_BACKUP) Slog.v(TAG_BACKUP, "unbindBackupAgent: " + appInfo);
|
||||
enforceCallingPermission("android.permission.CONFIRM_FULL_BACKUP", "unbindBackupAgent");
|
||||
if (appInfo == null) {
|
||||
Slog.w(TAG, "unbind backup agent for null app");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user