Loading api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -11572,7 +11572,7 @@ package android.content.pm { public class CrossProfileApps { method public boolean canInteractAcrossProfiles(); method public boolean canRequestInteractAcrossProfiles(); method @Nullable public android.content.Intent createRequestInteractAcrossProfilesIntent(); method @NonNull public android.content.Intent createRequestInteractAcrossProfilesIntent(); method @NonNull public android.graphics.drawable.Drawable getProfileSwitchingIconDrawable(@NonNull android.os.UserHandle); method @NonNull public CharSequence getProfileSwitchingLabel(@NonNull android.os.UserHandle); method @NonNull public java.util.List<android.os.UserHandle> getTargetUserProfiles(); core/java/android/content/pm/CrossProfileApps.java +5 −4 Original line number Diff line number Diff line Loading @@ -334,7 +334,7 @@ public class CrossProfileApps { * Returns an {@link Intent} to open the settings page that allows the user to decide whether * the calling app can interact across profiles. * * <p>Returns {@code null} if {@link #canRequestInteractAcrossProfiles()} is {@code false}. * <p>The method {@link #canRequestInteractAcrossProfiles()} must be returning {@code true}. * * <p>Note that the user may already have given consent and the app may already be able to * interact across profiles, even if {@link #canRequestInteractAcrossProfiles()} is {@code Loading @@ -345,11 +345,12 @@ public class CrossProfileApps { * the app can interact across profiles * * @throws SecurityException if {@code mContext.getPackageName()} does not belong to the * calling UID. * calling UID, or {@link #canRequestInteractAcrossProfiles()} is {@code false}. */ public @Nullable Intent createRequestInteractAcrossProfilesIntent() { public @NonNull Intent createRequestInteractAcrossProfilesIntent() { if (!canRequestInteractAcrossProfiles()) { return null; throw new SecurityException( "The calling package can not request to interact across profiles."); } final Intent settingsIntent = new Intent(); settingsIntent.setAction(Settings.ACTION_MANAGE_CROSS_PROFILE_ACCESS); Loading Loading
api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -11572,7 +11572,7 @@ package android.content.pm { public class CrossProfileApps { method public boolean canInteractAcrossProfiles(); method public boolean canRequestInteractAcrossProfiles(); method @Nullable public android.content.Intent createRequestInteractAcrossProfilesIntent(); method @NonNull public android.content.Intent createRequestInteractAcrossProfilesIntent(); method @NonNull public android.graphics.drawable.Drawable getProfileSwitchingIconDrawable(@NonNull android.os.UserHandle); method @NonNull public CharSequence getProfileSwitchingLabel(@NonNull android.os.UserHandle); method @NonNull public java.util.List<android.os.UserHandle> getTargetUserProfiles();
core/java/android/content/pm/CrossProfileApps.java +5 −4 Original line number Diff line number Diff line Loading @@ -334,7 +334,7 @@ public class CrossProfileApps { * Returns an {@link Intent} to open the settings page that allows the user to decide whether * the calling app can interact across profiles. * * <p>Returns {@code null} if {@link #canRequestInteractAcrossProfiles()} is {@code false}. * <p>The method {@link #canRequestInteractAcrossProfiles()} must be returning {@code true}. * * <p>Note that the user may already have given consent and the app may already be able to * interact across profiles, even if {@link #canRequestInteractAcrossProfiles()} is {@code Loading @@ -345,11 +345,12 @@ public class CrossProfileApps { * the app can interact across profiles * * @throws SecurityException if {@code mContext.getPackageName()} does not belong to the * calling UID. * calling UID, or {@link #canRequestInteractAcrossProfiles()} is {@code false}. */ public @Nullable Intent createRequestInteractAcrossProfilesIntent() { public @NonNull Intent createRequestInteractAcrossProfilesIntent() { if (!canRequestInteractAcrossProfiles()) { return null; throw new SecurityException( "The calling package can not request to interact across profiles."); } final Intent settingsIntent = new Intent(); settingsIntent.setAction(Settings.ACTION_MANAGE_CROSS_PROFILE_ACCESS); Loading