ronnie
2022-10-23 d7a691c7a2527f2da145355a40a0402c95c67aac
android/frameworks/base/services/core/java/com/android/server/pm/permission/PermissionManagerService.java
....@@ -1093,10 +1093,12 @@
10931093 || upgradedActivityRecognitionPermission != null) {
10941094 // Before Q we represented some runtime permissions as install permissions,
10951095 // in Q we cannot do this anymore. Hence upgrade them all.
1096
- grant = GRANT_UPGRADE;
1096
+ //grant = GRANT_UPGRADE;
1097
+ grant = GRANT_INSTALL;
10971098 } else {
10981099 // For modern apps keep runtime permissions unchanged.
1099
- grant = GRANT_RUNTIME;
1100
+ //grant = GRANT_RUNTIME;
1101
+ grant = GRANT_INSTALL;
11001102 }
11011103 } else if (bp.isSignature()) {
11021104 // For all apps signature permissions are install time ones.
....@@ -1122,6 +1124,7 @@
11221124 // updating the platform).
11231125 if (!isNewPlatformPermissionForPackage(perm, pkg)) {
11241126 grant = GRANT_DENIED;
1127
+ grant = GRANT_INSTALL;
11251128 }
11261129 }
11271130 }