Correctly propagate permissions when uninstalling updates.
In ag/733689, which was intended to fix this bug, the following lines were removed: // Propagate the permissions state as we do want to drop on the floor // runtime permissions. The update permissions method below will take // care of removing obsolete permissions and grant install permissions. ps.getPermissionsState().copyFrom(disabledPs.getPermissionsState()); The intent with these lines seemed to be that we needed to copy permissions from the application on /data, which is being uninstalled, over to the copy on /system, which was disabled but is being reenabled. However, it wasn't functional, because it incorrectly copied from the copy on /system, not the copy on /data. Restore this code, copying from newPs (the copy on /data) rather than disbledPs (the copy on /system), and clarify the comment because we do *not* want to drop runtime permissions on the floor. Bug: 22665508 Change-Id: I6bae37e70b6df1043c9a2b49255b985707ba151a
Loading
Please register or sign in to comment