OSDN Git Service

Added missing permission check to isPackageDeviceAdminOnAnyUser.
authorVarun Shah <varunshah@google.com>
Wed, 20 Mar 2019 18:10:33 +0000 (11:10 -0700)
committerBryan Ferris <bferris@google.com>
Tue, 2 Apr 2019 22:28:52 +0000 (15:28 -0700)
commit18e7dedf6c35f07daf8b7239d501737745ac7f43
tree110e3bf1cb17a61001c75028faf151b1da32badd
parent809231680f4abe13cddb1e0ef2ef2688ac5ee5f8
Added missing permission check to isPackageDeviceAdminOnAnyUser.

Added a check for the MANAGE_USERS permission to
PackageManagerService#isPackageDeviceAdminOnAnyUser.

To test that the method is still usable:
1) Enable virtual storage via: adb shell sm set-virtual-disk true
2) Follow instructions by clicking on notification to set up virtual storage
3) Go to Settings -> Apps & notifications -> See all X apps
4) Click on any non-system app (example Instagram)
5) Tap Storage and you should see a "Change" button (if not, choose another app)
6) Tap Change and you should see Internal and Virtual storage options listed
7) The above step confirms the method is still usable by Settings

Bug: 128599183
Test: SafetyNet logging (steps listed above)
Change-Id: I989f1daf52a71f6c778ebd81baa6f1bf83e9a718
Merged-In: I36521fa43daab399e08869647326a7ac32d1e512
services/core/java/com/android/server/pm/PackageManagerService.java