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

Commit 5384e86d authored by kholoud mohamed's avatar kholoud mohamed
Browse files

Expose some testAPIs in DPM

Exposed the following testAPIs in DevicePolicyManager:
* getDefaultCrossProfilePackages
* getDisallowedSystemApps

Test: confirmed the APIs are callable in CTS tests
Bug: 180500227
Change-Id: I75a9a479920f1ba2c71f0c9b7e0148f90f1832ec
parent b80cfeed
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -397,6 +397,8 @@ package android.app.admin {
    method @RequiresPermission("android.permission.MANAGE_PROFILE_AND_DEVICE_OWNERS") public void forceRemoveActiveAdmin(@NonNull android.content.ComponentName, int);
    method @RequiresPermission(android.Manifest.permission.FORCE_DEVICE_POLICY_MANAGER_LOGS) public long forceSecurityLogs();
    method public void forceUpdateUserSetupComplete();
    method @NonNull public java.util.Set<java.lang.String> getDefaultCrossProfilePackages();
    method @NonNull public java.util.Set<java.lang.String> getDisallowedSystemApps(@NonNull android.content.ComponentName, int, @NonNull String);
    method public long getLastBugReportRequestTime();
    method public long getLastNetworkLogRetrievalTime();
    method public long getLastSecurityLogRetrievalTime();
+4 −2
Original line number Diff line number Diff line
@@ -12239,8 +12239,9 @@ public class DevicePolicyManager {
     *
     * @hide
     */
    public Set<String> getDisallowedSystemApps(ComponentName admin, int userId,
            String provisioningAction) {
    @TestApi
    public @NonNull Set<String> getDisallowedSystemApps(@NonNull ComponentName admin,
            @UserIdInt int userId, @NonNull String provisioningAction) {
        try {
            return new ArraySet<>(
                    mService.getDisallowedSystemApps(admin, userId, provisioningAction));
@@ -13004,6 +13005,7 @@ public class DevicePolicyManager {
     *
     * @hide
     */
    @TestApi
    public @NonNull Set<String> getDefaultCrossProfilePackages() {
        throwIfParentInstance("getDefaultCrossProfilePackages");
        if (mService != null) {