Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76fbeede authored by Nicholas Sauer's avatar Nicholas Sauer
Browse files

Remove a break so that FLAG_PERMISSION_REVOKE_WHEN_REQUESTED is applied

to permissions in all users.

This addresses failures in SplitPermissionTest when run on secondary
users.

bug: 140274903
Test: cts-tradefed run cts-dev -m CtsPermissionTestCases -t android.permission.cts.SplitPermissionTest

and...

$ adb install CtsAppThatRequestsLocationPermission28.apk
$ adb shell pm grant --user 10 android.permission.cts.appthatrequestpermission android.permission.ACCESS_COARSE_LOCATION
$ adb shell pm grant --user 10 android.permission.cts.appthatrequestpermission android.permission.ACCESS_BACKGROUND_LOCATION
$ adb install CtsAppThatRequestsLocationAndBackgroundPermission29.apk
$ adb shell dumpsys package android.permission.cts.appthatrequestpermission
and verify: USER_SENSITIVE_WHEN_GRANTED|USER_SENSITIVE_WHEN_DENIED]
        android.permission.ACCESS_BACKGROUND_LOCATION: granted=false

Change-Id: I7191f06ea2e311113e0982d3b0b66aa5b1749ad9
parent 07d866a1
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -1595,8 +1595,6 @@ public class PermissionManagerService {
                                Slog.i(TAG, newPerm + " does not inherit from " + sourcePerms
                                        + " for " + pkgName + " as split permission is also new");
                            }

                            break;
                        } else {
                            // Inherit from new install or existing runtime permissions
                            inheritPermissionStateToNewImplicitPermissionLocked(sourcePerms,