Defer writes to runtime-permissions.xml

In grantPermissionsLPw, use async version of writeRuntimePermissionsForUserLPr
to defer writes to runtime-permissions.xml.

Change-Id: I9dcae74199d26b6a988e35dff97b038d435e1e16
Bug: 21849928
This commit is contained in:
Fyodor Kupolov
2015-06-15 16:38:19 -07:00
parent efd79414bb
commit 3c13a2a5bc

View File

@@ -7726,7 +7726,7 @@ public class PackageManagerService extends IPackageManager.Stub {
}
}
}
if (pkgInfo != null) {
grantPermissionsLPw(pkgInfo, (flags&UPDATE_PERMISSIONS_REPLACE_PKG) != 0, changingPkg);
}
@@ -8006,7 +8006,7 @@ public class PackageManagerService extends IPackageManager.Stub {
// Persist the runtime permissions state for users with changes.
for (int userId : changedRuntimePermissionUserIds) {
mSettings.writeRuntimePermissionsForUserLPr(userId, true);
mSettings.writeRuntimePermissionsForUserLPr(userId, false);
}
}