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
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user