Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit f048d35

Browse files
committed
add REQUEST_INSTALL_PACKAGES to GmsCore
When setting up a work profile, GmsCore tries to install Android Device Policy apk For this to work REQUEST_INSTALL_PACKAGES permission needs to be in manifest
1 parent ae9c004 commit f048d35

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

services/core/java/com/android/server/pm/ext/GmsCoreHooks.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ static class ParsingHooks extends GmsCompatPkgParsingHooks {
2020
@Override
2121
public List<ParsedUsesPermissionImpl> addUsesPermissions() {
2222
var res = super.addUsesPermissions();
23-
var l = createUsesPerms(Manifest.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS);
24-
res.addAll(l);
23+
res.addAll(createUsesPerms(
24+
Manifest.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS,
25+
Manifest.permission.REQUEST_INSTALL_PACKAGES
26+
));
2527
return res;
2628
}
2729

0 commit comments

Comments
 (0)