Expose a testAPI in CrossProfileApps

Exposed canConfigureInteractAcrossProfiles as
a testAPI.

Test: confirmed the API is callable in CTS tests.
Bug: 180328483
Change-Id: I7c2b5ae986ca8ce6771d814bf7a3568b9896e82f
This commit is contained in:
kholoud mohamed
2021-03-01 11:38:23 +00:00
parent b80cfeeddb
commit baa7b228fa
2 changed files with 6 additions and 0 deletions

View File

@@ -695,6 +695,10 @@ package android.content.pm {
field public int privateFlags;
}
public class CrossProfileApps {
method public boolean canConfigureInteractAcrossProfiles(@NonNull String);
}
public class LauncherApps {
ctor public LauncherApps(android.content.Context);
}

View File

@@ -19,6 +19,7 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.app.Activity;
import android.app.AppOpsManager.Mode;
import android.content.ComponentName;
@@ -418,6 +419,7 @@ public class CrossProfileApps {
*
* @hide
*/
@TestApi
public boolean canConfigureInteractAcrossProfiles(@NonNull String packageName) {
try {
return mService.canConfigureInteractAcrossProfiles(packageName);