{ "methods": { "__constructor__(android.content.Context,android.content.pm.ICrossProfileApps)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "context", "service" ], "returnType": "void", "exceptions": [], "name": "__constructor__(android.content.Context,android.content.pm.ICrossProfileApps)" }, "addCrossProfilePackage(java.lang.String)": { "isImplementation": false, "modifiers": [ "public" ], "params": [ "packageName" ], "returnType": "void", "exceptions": [], "name": "addCrossProfilePackage(java.lang.String)" }, "addTargetUserProfile(android.os.UserHandle)": { "isImplementation": false, "modifiers": [ "public" ], "params": [ "userHandle" ], "returnType": "void", "exceptions": [], "name": "addTargetUserProfile(android.os.UserHandle)", "documentation": "Adds {@code userHandle} to the list of accessible handles. " }, "canConfigureInteractAcrossProfiles(java.lang.String)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "packageName" ], "returnType": "boolean", "exceptions": [], "name": "canConfigureInteractAcrossProfiles(java.lang.String)" }, "canUserAttemptToConfigureInteractAcrossProfiles(java.lang.String)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "packageName" ], "returnType": "boolean", "exceptions": [], "name": "canUserAttemptToConfigureInteractAcrossProfiles(java.lang.String)" }, "clearInteractAcrossProfilesAppOps()": { "isImplementation": true, "modifiers": [ "protected" ], "params": [], "returnType": "void", "exceptions": [], "minSdk": 30, "name": "clearInteractAcrossProfilesAppOps()" }, "clearNextStartedActivities()": { "isImplementation": false, "modifiers": [ "public" ], "params": [], "returnType": "void", "exceptions": [], "name": "clearNextStartedActivities()", "documentation": "Clears all records of {@link StartedActivity}s from calls to {@link\nCrossProfileApps#startActivity(ComponentName, UserHandle)} or {@link\nCrossProfileApps#startMainActivity(ComponentName, UserHandle)}.\n" }, "clearTargetUserProfiles()": { "isImplementation": false, "modifiers": [ "public" ], "params": [], "returnType": "void", "exceptions": [], "name": "clearTargetUserProfiles()", "documentation": "Clears the list of accessible handles. " }, "findAllPackageNames()": { "isImplementation": false, "modifiers": [ "private" ], "params": [], "returnType": "java.util.List\u003cjava.lang.String\u003e", "exceptions": [], "name": "findAllPackageNames()" }, "getInteractAcrossProfilesAppOp(java.lang.String)": { "isImplementation": false, "modifiers": [ "public" ], "params": [ "packageName" ], "returnType": "java.lang.Integer", "exceptions": [], "name": "getInteractAcrossProfilesAppOp(java.lang.String)", "documentation": "Returns the app-op mode associated with the given package name. If not set, returns {@code\nnull}.\n" }, "getNextStartedActivity()": { "isImplementation": false, "modifiers": [ "public" ], "params": [], "returnType": "org.robolectric.shadows.ShadowCrossProfileApps.StartedActivity", "exceptions": [], "name": "getNextStartedActivity()", "documentation": "Consumes the most recent {@link ComponentName}, {@link UserHandle} pair started by {@link\nCrossProfileApps#startMainActivity(ComponentName, UserHandle)} or {@link\nCrossProfileApps#startActivity(ComponentName, UserHandle)}, and returns it wrapped in {@link\nStartedActivity}.\n" }, "getProfileSwitchingIconDrawable(android.os.UserHandle)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "userHandle" ], "returnType": "android.graphics.drawable.Drawable", "exceptions": [], "name": "getProfileSwitchingIconDrawable(android.os.UserHandle)", "documentation": "Returns a {@link Drawable} that can be shown for profile switching, which is guaranteed to\nalways be the same for a particular user and to be distinct between users.\n" }, "getProfileSwitchingLabel(android.os.UserHandle)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "userHandle" ], "returnType": "java.lang.CharSequence", "exceptions": [], "name": "getProfileSwitchingLabel(android.os.UserHandle)", "documentation": "Returns a {@link CharSequence} that can be shown as a label for profile switching, which is\nguaranteed to always be the same for a particular user and to be distinct between users.\n" }, "getTargetUserProfiles()": { "isImplementation": true, "modifiers": [ "protected" ], "params": [], "returnType": "java.util.List\u003candroid.os.UserHandle\u003e", "exceptions": [], "name": "getTargetUserProfiles()", "documentation": "Returns a list of {@link UserHandle}s currently accessible. This list is populated from calls\nto {@link #addTargetUserProfile(UserHandle)}.\n" }, "peekNextStartedActivity()": { "isImplementation": false, "modifiers": [ "public" ], "params": [], "returnType": "org.robolectric.shadows.ShadowCrossProfileApps.StartedActivity", "exceptions": [], "name": "peekNextStartedActivity()", "documentation": "Returns the most recent {@link ComponentName}, {@link UserHandle} pair started by {@link\nCrossProfileApps#startMainActivity(ComponentName, UserHandle)} or {@link\nCrossProfileApps#startActivity(ComponentName, UserHandle)}, wrapped in {@link StartedActivity}.\n" }, "peekNextStartedMainActivity()": { "isImplementation": false, "modifiers": [ "public" ], "params": [], "returnType": "org.robolectric.shadows.ShadowCrossProfileApps.StartedMainActivity", "exceptions": [], "name": "peekNextStartedMainActivity()", "documentation": "Returns the most recent {@link ComponentName}, {@link UserHandle} pair started by {@link\nCrossProfileApps#startMainActivity(ComponentName, UserHandle)}, wrapped in {@link\nStartedMainActivity}.\n\n@deprecated Use {@link #peekNextStartedActivity()} instead.\n" }, "removeTargetUserProfile(android.os.UserHandle)": { "isImplementation": false, "modifiers": [ "public" ], "params": [ "userHandle" ], "returnType": "void", "exceptions": [], "name": "removeTargetUserProfile(android.os.UserHandle)", "documentation": "Removes {@code userHandle} from the list of accessible handles, if present. " }, "reset()": { "isImplementation": false, "modifiers": [ "public", "static" ], "params": [], "returnType": "void", "exceptions": [], "name": "reset()" }, "resetInteractAcrossProfilesAppOps(java.util.Collection\u003cjava.lang.String\u003e,java.util.Set\u003cjava.lang.String\u003e)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "previousCrossProfilePackages", "newCrossProfilePackages" ], "returnType": "void", "exceptions": [], "minSdk": 30, "name": "resetInteractAcrossProfilesAppOps(java.util.Collection\u003cjava.lang.String\u003e,java.util.Set\u003cjava.lang.String\u003e)" }, "setInteractAcrossProfilesAppOp(java.lang.String,int)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "packageName", "newMode" ], "returnType": "void", "exceptions": [], "minSdk": 30, "name": "setInteractAcrossProfilesAppOp(java.lang.String,int)" }, "startActivity(android.content.ComponentName,android.os.UserHandle)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "componentName", "targetUser" ], "returnType": "void", "exceptions": [], "minSdk": 29, "name": "startActivity(android.content.ComponentName,android.os.UserHandle)", "documentation": "Simulates starting the activity specified in the specified profile, performing the same\nsecurity checks done by the real {@link CrossProfileApps}.\n\n\u003cp\u003eThe most recent main activity started can be queried by {@link #peekNextStartedActivity()}\n()}.\n" }, "startMainActivity(android.content.ComponentName,android.os.UserHandle)": { "isImplementation": true, "modifiers": [ "protected" ], "params": [ "componentName", "targetUser" ], "returnType": "void", "exceptions": [], "name": "startMainActivity(android.content.ComponentName,android.os.UserHandle)", "documentation": "Simulates starting the main activity specified in the specified profile, performing the same\nsecurity checks done by the real {@link CrossProfileApps}.\n\n\u003cp\u003eThe most recent main activity started can be queried by {@link #peekNextStartedActivity()}\n()}.\n" }, "verifyActivityInManifest(android.content.ComponentName,boolean)": { "isImplementation": false, "modifiers": [ "private" ], "params": [ "component", "requireMainActivity" ], "returnType": "void", "exceptions": [], "name": "verifyActivityInManifest(android.content.ComponentName,boolean)", "documentation": "Ensures that {@code component} is present in the manifest as an exported and enabled activity.\nThis check and the error thrown are the same as the check done by the real {@link\nCrossProfileApps}.\n\n\u003cp\u003eIf {@code requireMainActivity} is true, then this also asserts that the activity is a\nlauncher activity.\n" }, "verifyCanAccessUser(android.os.UserHandle)": { "isImplementation": false, "modifiers": [ "private" ], "params": [ "userHandle" ], "returnType": "void", "exceptions": [], "name": "verifyCanAccessUser(android.os.UserHandle)" }, "verifyHasInteractAcrossProfilesPermission()": { "isImplementation": false, "modifiers": [ "private" ], "params": [], "returnType": "void", "exceptions": [], "name": "verifyHasInteractAcrossProfilesPermission()" } }, "imports": [ "android.content.pm.PackageManager.MATCH_DIRECT_BOOT_AWARE", "android.content.pm.PackageManager.MATCH_DIRECT_BOOT_UNAWARE", "android.os.Build.VERSION_CODES.P", "android.os.Build.VERSION_CODES.Q", "android.os.Build.VERSION_CODES.R", "com.google.common.base.Preconditions.checkNotNull", "android.Manifest", "android.Manifest.permission", "android.annotation.NonNull", "android.annotation.RequiresPermission", "android.annotation.SystemApi", "android.app.AppOpsManager", "android.app.AppOpsManager.Mode", "android.content.ComponentName", "android.content.Context", "android.content.Intent", "android.content.pm.ActivityInfo", "android.content.pm.CrossProfileApps", "android.content.pm.ICrossProfileApps", "android.content.pm.PackageInfo", "android.content.pm.PackageManager", "android.graphics.drawable.ColorDrawable", "android.graphics.drawable.Drawable", "android.os.Process", "android.os.UserHandle", "android.text.TextUtils", "com.google.common.collect.ImmutableList", "com.google.common.collect.Iterables", "org.robolectric.annotation.Implementation", "org.robolectric.annotation.Implements", "org.robolectric.annotation.Resetter", "java.util.ArrayList", "java.util.Arrays", "java.util.Collection", "java.util.Collections", "java.util.HashMap", "java.util.HashSet", "java.util.LinkedHashSet", "java.util.List", "java.util.Map", "java.util.Objects", "java.util.Set", "java.util.stream.Collectors", "javax.annotation.Nullable", "org.robolectric.shadows.ShadowCrossProfileApps.StartedMainActivity", "org.robolectric.shadows.ShadowCrossProfileApps.StartedActivity" ], "name": "org.robolectric.shadows.ShadowCrossProfileApps", "documentation": "Robolectric implementation of {@link CrossProfileApps}. " }