Loading api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -11417,7 +11417,7 @@ package android.content.pm.crossprofile { method public android.graphics.drawable.Drawable getProfileSwitchingIcon(android.os.UserHandle); method public java.lang.CharSequence getProfileSwitchingLabel(android.os.UserHandle); method public java.util.List<android.os.UserHandle> getTargetUserProfiles(); method public void startMainActivity(android.content.ComponentName, android.os.UserHandle, android.graphics.Rect, android.os.Bundle); method public void startMainActivity(android.content.ComponentName, android.os.UserHandle); } } core/java/android/app/ActivityOptions.java +16 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import android.os.IRemoteCallback; import android.os.Parcelable; import android.os.RemoteException; import android.os.ResultReceiver; import android.os.UserHandle; import android.transition.Transition; import android.transition.TransitionListenerAdapter; import android.transition.TransitionManager; Loading Loading @@ -265,6 +266,8 @@ public class ActivityOptions { public static final int ANIM_CUSTOM_IN_PLACE = 10; /** @hide */ public static final int ANIM_CLIP_REVEAL = 11; /** @hide */ public static final int ANIM_OPEN_CROSS_PROFILE_APPS = 12; private String mPackageName; private Rect mLaunchBounds; Loading Loading @@ -485,6 +488,19 @@ public class ActivityOptions { return opts; } /** * Creates an {@link ActivityOptions} object specifying an animation where the new activity * is started in another user profile by calling {@link * android.content.pm.crossprofile.CrossProfileApps#startMainActivity(ComponentName, UserHandle) * }. * @hide */ public static ActivityOptions makeOpenCrossProfileAppsAnimation() { ActivityOptions options = new ActivityOptions(); options.mAnimationType = ANIM_OPEN_CROSS_PROFILE_APPS; return options; } /** * Create an ActivityOptions specifying an animation where a thumbnail * is scaled from a given position to the new activity window that is Loading core/java/android/content/pm/crossprofile/CrossProfileApps.java +2 −8 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package android.content.pm.crossprofile; import android.annotation.NonNull; import android.annotation.Nullable; import android.content.ComponentName; import android.content.Context; import android.content.res.Resources; Loading Loading @@ -61,15 +60,10 @@ public class CrossProfileApps { * @param user The UserHandle of the profile, must be one of the users returned by * {@link #getTargetUserProfiles()}, otherwise a {@link SecurityException} will * be thrown. * @param sourceBounds The Rect containing the source bounds of the clicked icon, see * {@link android.content.Intent#setSourceBounds(Rect)}. * @param startActivityOptions Options to pass to startActivity */ public void startMainActivity(@NonNull ComponentName component, @NonNull UserHandle user, @Nullable Rect sourceBounds, @Nullable Bundle startActivityOptions) { public void startMainActivity(@NonNull ComponentName component, @NonNull UserHandle user) { try { mService.startActivityAsUser(mContext.getPackageName(), component, sourceBounds, startActivityOptions, user); mService.startActivityAsUser(mContext.getPackageName(), component, user); } catch (RemoteException ex) { throw ex.rethrowFromSystemServer(); } Loading core/java/android/content/pm/crossprofile/ICrossProfileApps.aidl +2 −1 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import android.os.UserHandle; * @hide */ interface ICrossProfileApps { void startActivityAsUser(in String callingPackage, in ComponentName component, in Rect sourceBounds, in Bundle startActivityOptions, in UserHandle user); void startActivityAsUser(in String callingPackage, in ComponentName component, in UserHandle user); List<UserHandle> getTargetUserProfiles(in String callingPackage); } No newline at end of file core/res/res/values/symbols.xml +2 −0 Original line number Diff line number Diff line Loading @@ -1574,6 +1574,8 @@ <java-symbol type="anim" name="voice_activity_close_enter" /> <java-symbol type="anim" name="voice_activity_open_exit" /> <java-symbol type="anim" name="voice_activity_open_enter" /> <java-symbol type="anim" name="activity_open_exit" /> <java-symbol type="anim" name="activity_open_enter" /> <java-symbol type="array" name="config_autoRotationTiltTolerance" /> <java-symbol type="array" name="config_keyboardTapVibePattern" /> Loading Loading
api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -11417,7 +11417,7 @@ package android.content.pm.crossprofile { method public android.graphics.drawable.Drawable getProfileSwitchingIcon(android.os.UserHandle); method public java.lang.CharSequence getProfileSwitchingLabel(android.os.UserHandle); method public java.util.List<android.os.UserHandle> getTargetUserProfiles(); method public void startMainActivity(android.content.ComponentName, android.os.UserHandle, android.graphics.Rect, android.os.Bundle); method public void startMainActivity(android.content.ComponentName, android.os.UserHandle); } }
core/java/android/app/ActivityOptions.java +16 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import android.os.IRemoteCallback; import android.os.Parcelable; import android.os.RemoteException; import android.os.ResultReceiver; import android.os.UserHandle; import android.transition.Transition; import android.transition.TransitionListenerAdapter; import android.transition.TransitionManager; Loading Loading @@ -265,6 +266,8 @@ public class ActivityOptions { public static final int ANIM_CUSTOM_IN_PLACE = 10; /** @hide */ public static final int ANIM_CLIP_REVEAL = 11; /** @hide */ public static final int ANIM_OPEN_CROSS_PROFILE_APPS = 12; private String mPackageName; private Rect mLaunchBounds; Loading Loading @@ -485,6 +488,19 @@ public class ActivityOptions { return opts; } /** * Creates an {@link ActivityOptions} object specifying an animation where the new activity * is started in another user profile by calling {@link * android.content.pm.crossprofile.CrossProfileApps#startMainActivity(ComponentName, UserHandle) * }. * @hide */ public static ActivityOptions makeOpenCrossProfileAppsAnimation() { ActivityOptions options = new ActivityOptions(); options.mAnimationType = ANIM_OPEN_CROSS_PROFILE_APPS; return options; } /** * Create an ActivityOptions specifying an animation where a thumbnail * is scaled from a given position to the new activity window that is Loading
core/java/android/content/pm/crossprofile/CrossProfileApps.java +2 −8 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package android.content.pm.crossprofile; import android.annotation.NonNull; import android.annotation.Nullable; import android.content.ComponentName; import android.content.Context; import android.content.res.Resources; Loading Loading @@ -61,15 +60,10 @@ public class CrossProfileApps { * @param user The UserHandle of the profile, must be one of the users returned by * {@link #getTargetUserProfiles()}, otherwise a {@link SecurityException} will * be thrown. * @param sourceBounds The Rect containing the source bounds of the clicked icon, see * {@link android.content.Intent#setSourceBounds(Rect)}. * @param startActivityOptions Options to pass to startActivity */ public void startMainActivity(@NonNull ComponentName component, @NonNull UserHandle user, @Nullable Rect sourceBounds, @Nullable Bundle startActivityOptions) { public void startMainActivity(@NonNull ComponentName component, @NonNull UserHandle user) { try { mService.startActivityAsUser(mContext.getPackageName(), component, sourceBounds, startActivityOptions, user); mService.startActivityAsUser(mContext.getPackageName(), component, user); } catch (RemoteException ex) { throw ex.rethrowFromSystemServer(); } Loading
core/java/android/content/pm/crossprofile/ICrossProfileApps.aidl +2 −1 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import android.os.UserHandle; * @hide */ interface ICrossProfileApps { void startActivityAsUser(in String callingPackage, in ComponentName component, in Rect sourceBounds, in Bundle startActivityOptions, in UserHandle user); void startActivityAsUser(in String callingPackage, in ComponentName component, in UserHandle user); List<UserHandle> getTargetUserProfiles(in String callingPackage); } No newline at end of file
core/res/res/values/symbols.xml +2 −0 Original line number Diff line number Diff line Loading @@ -1574,6 +1574,8 @@ <java-symbol type="anim" name="voice_activity_close_enter" /> <java-symbol type="anim" name="voice_activity_open_exit" /> <java-symbol type="anim" name="voice_activity_open_enter" /> <java-symbol type="anim" name="activity_open_exit" /> <java-symbol type="anim" name="activity_open_enter" /> <java-symbol type="array" name="config_autoRotationTiltTolerance" /> <java-symbol type="array" name="config_keyboardTapVibePattern" /> Loading