Loading core/java/android/app/ActivityOptions.java +7 −6 Original line number Diff line number Diff line Loading @@ -419,7 +419,7 @@ public class ActivityOptions { private IBinder mLaunchCookie; private IRemoteTransition mRemoteTransition; private boolean mOverrideTaskTransition; private int mSplashScreenThemeResId; private String mSplashScreenThemeResName; @SplashScreen.SplashScreenStyle private int mSplashScreenStyle; private boolean mRemoveWithTaskOrganizer; Loading Loading @@ -1174,7 +1174,7 @@ public class ActivityOptions { mRemoteTransition = IRemoteTransition.Stub.asInterface(opts.getBinder( KEY_REMOTE_TRANSITION)); mOverrideTaskTransition = opts.getBoolean(KEY_OVERRIDE_TASK_TRANSITION); mSplashScreenThemeResId = opts.getInt(KEY_SPLASH_SCREEN_THEME); mSplashScreenThemeResName = opts.getString(KEY_SPLASH_SCREEN_THEME); mRemoveWithTaskOrganizer = opts.getBoolean(KEY_REMOVE_WITH_TASK_ORGANIZER); mLaunchedFromBubble = opts.getBoolean(KEY_LAUNCHED_FROM_BUBBLE); mTransientLaunch = opts.getBoolean(KEY_TRANSIENT_LAUNCH); Loading Loading @@ -1368,8 +1368,9 @@ public class ActivityOptions { * Gets whether the activity want to be launched as other theme for the splash screen. * @hide */ public int getSplashScreenThemeResId() { return mSplashScreenThemeResId; @Nullable public String getSplashScreenThemeResName() { return mSplashScreenThemeResName; } /** Loading Loading @@ -1945,8 +1946,8 @@ public class ActivityOptions { if (mOverrideTaskTransition) { b.putBoolean(KEY_OVERRIDE_TASK_TRANSITION, mOverrideTaskTransition); } if (mSplashScreenThemeResId != 0) { b.putInt(KEY_SPLASH_SCREEN_THEME, mSplashScreenThemeResId); if (mSplashScreenThemeResName != null && !mSplashScreenThemeResName.isEmpty()) { b.putString(KEY_SPLASH_SCREEN_THEME, mSplashScreenThemeResName); } if (mRemoveWithTaskOrganizer) { b.putBoolean(KEY_REMOVE_WITH_TASK_ORGANIZER, mRemoveWithTaskOrganizer); Loading core/java/android/content/pm/AppSearchShortcutInfo.java +1 −1 Original line number Diff line number Diff line Loading @@ -423,7 +423,7 @@ public class AppSearchShortcutInfo extends GenericDocument { shortLabelResName, longLabel, longLabelResId, longLabelResName, disabledMessage, disabledMessageResId, disabledMessageResName, categoriesSet, intents, rank, extras, getCreationTimestampMillis(), flags, iconResId, iconResName, bitmapPath, iconUri, disabledReason, persons, locusId, 0); disabledReason, persons, locusId, null); si.setImplicitRank(implicitRank); if ((implicitRank & ShortcutInfo.RANK_CHANGED_BIT) != 0) { si.setRankChanged(); Loading core/java/android/content/pm/ShortcutInfo.java +18 −15 Original line number Diff line number Diff line Loading @@ -449,7 +449,7 @@ public final class ShortcutInfo implements Parcelable { private int mDisabledReason; private int mStartingThemeResId; @Nullable private String mStartingThemeResName; private ShortcutInfo(Builder b) { mUserId = b.mContext.getUserId(); Loading Loading @@ -478,8 +478,9 @@ public final class ShortcutInfo implements Parcelable { mExtras = b.mExtras; mLocusId = b.mLocusId; mStartingThemeResName = b.mStartingThemeResId != 0 ? b.mContext.getResources().getResourceName(b.mStartingThemeResId) : null; updateTimestamp(); mStartingThemeResId = b.mStartingThemeResId; } /** Loading Loading @@ -626,7 +627,7 @@ public final class ShortcutInfo implements Parcelable { // Set this bit. mFlags |= FLAG_KEY_FIELDS_ONLY; } mStartingThemeResId = source.mStartingThemeResId; mStartingThemeResName = source.mStartingThemeResName; } /** Loading Loading @@ -950,8 +951,8 @@ public final class ShortcutInfo implements Parcelable { if (source.mLocusId != null) { mLocusId = source.mLocusId; } if (source.mStartingThemeResId != 0) { mStartingThemeResId = source.mStartingThemeResId; if (source.mStartingThemeResName != null && !source.mStartingThemeResName.isEmpty()) { mStartingThemeResName = source.mStartingThemeResName; } } Loading Loading @@ -1454,11 +1455,12 @@ public final class ShortcutInfo implements Parcelable { } /** * Returns the theme resource id used for the splash screen. * Returns the theme resource name used for the splash screen. * @hide */ public int getStartingThemeResId() { return mStartingThemeResId; @Nullable public String getStartingThemeResName() { return mStartingThemeResName; } /** @hide -- old signature, the internal code still uses it. */ Loading Loading @@ -2182,7 +2184,7 @@ public final class ShortcutInfo implements Parcelable { mPersons = source.readParcelableArray(cl, Person.class); mLocusId = source.readParcelable(cl); mIconUri = source.readString8(); mStartingThemeResId = source.readInt(); mStartingThemeResName = source.readString8(); } @Override Loading Loading @@ -2234,7 +2236,7 @@ public final class ShortcutInfo implements Parcelable { dest.writeParcelableArray(mPersons, flags); dest.writeParcelable(mLocusId, flags); dest.writeString8(mIconUri); dest.writeInt(mStartingThemeResId); dest.writeString8(mStartingThemeResName); } public static final @NonNull Creator<ShortcutInfo> CREATOR = Loading Loading @@ -2391,10 +2393,10 @@ public final class ShortcutInfo implements Parcelable { sb.append("disabledReason="); sb.append(getDisabledReasonDebugString(mDisabledReason)); if (mStartingThemeResId != 0) { if (mStartingThemeResName != null && !mStartingThemeResName.isEmpty()) { addIndentOrComma(sb, indent); sb.append("SplashScreenThemeResId="); sb.append(Integer.toHexString(mStartingThemeResId)); sb.append("SplashScreenThemeResName="); sb.append(mStartingThemeResName); } addIndentOrComma(sb, indent); Loading Loading @@ -2482,7 +2484,8 @@ public final class ShortcutInfo implements Parcelable { Set<String> categories, Intent[] intentsWithExtras, int rank, PersistableBundle extras, long lastChangedTimestamp, int flags, int iconResId, String iconResName, String bitmapPath, String iconUri, int disabledReason, Person[] persons, LocusId locusId, int startingThemeResId) { int disabledReason, Person[] persons, LocusId locusId, @Nullable String startingThemeResName) { mUserId = userId; mId = id; mPackageName = packageName; Loading Loading @@ -2511,6 +2514,6 @@ public final class ShortcutInfo implements Parcelable { mDisabledReason = disabledReason; mPersons = persons; mLocusId = locusId; mStartingThemeResId = startingThemeResId; mStartingThemeResName = startingThemeResName; } } core/java/android/content/pm/ShortcutServiceInternal.java +1 −1 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ public abstract class ShortcutServiceInternal { /** * Get the theme res ID of the starting window, it can be 0 if not specified. */ public abstract int getShortcutStartingThemeResId(int launcherUserId, public abstract @Nullable String getShortcutStartingThemeResName(int launcherUserId, @NonNull String callingPackage, @NonNull String packageName, @NonNull String shortcutId, int userId); Loading services/core/java/com/android/server/pm/LauncherAppsService.java +4 −5 Original line number Diff line number Diff line Loading @@ -1000,16 +1000,15 @@ public class LauncherAppsService extends SystemService { intents[0].setSourceBounds(sourceBounds); // Replace theme for splash screen final int splashScreenThemeResId = mShortcutServiceInternal.getShortcutStartingThemeResId(getCallingUserId(), final String splashScreenThemeResName = mShortcutServiceInternal.getShortcutStartingThemeResName(getCallingUserId(), callingPackage, packageName, shortcutId, targetUserId); if (splashScreenThemeResId != 0) { if (splashScreenThemeResName != null && !splashScreenThemeResName.isEmpty()) { if (startActivityOptions == null) { startActivityOptions = new Bundle(); } startActivityOptions.putInt(KEY_SPLASH_SCREEN_THEME, splashScreenThemeResId); startActivityOptions.putString(KEY_SPLASH_SCREEN_THEME, splashScreenThemeResName); } return startShortcutIntentsAsPublisher( intents, packageName, featureId, startActivityOptions, targetUserId); } Loading Loading
core/java/android/app/ActivityOptions.java +7 −6 Original line number Diff line number Diff line Loading @@ -419,7 +419,7 @@ public class ActivityOptions { private IBinder mLaunchCookie; private IRemoteTransition mRemoteTransition; private boolean mOverrideTaskTransition; private int mSplashScreenThemeResId; private String mSplashScreenThemeResName; @SplashScreen.SplashScreenStyle private int mSplashScreenStyle; private boolean mRemoveWithTaskOrganizer; Loading Loading @@ -1174,7 +1174,7 @@ public class ActivityOptions { mRemoteTransition = IRemoteTransition.Stub.asInterface(opts.getBinder( KEY_REMOTE_TRANSITION)); mOverrideTaskTransition = opts.getBoolean(KEY_OVERRIDE_TASK_TRANSITION); mSplashScreenThemeResId = opts.getInt(KEY_SPLASH_SCREEN_THEME); mSplashScreenThemeResName = opts.getString(KEY_SPLASH_SCREEN_THEME); mRemoveWithTaskOrganizer = opts.getBoolean(KEY_REMOVE_WITH_TASK_ORGANIZER); mLaunchedFromBubble = opts.getBoolean(KEY_LAUNCHED_FROM_BUBBLE); mTransientLaunch = opts.getBoolean(KEY_TRANSIENT_LAUNCH); Loading Loading @@ -1368,8 +1368,9 @@ public class ActivityOptions { * Gets whether the activity want to be launched as other theme for the splash screen. * @hide */ public int getSplashScreenThemeResId() { return mSplashScreenThemeResId; @Nullable public String getSplashScreenThemeResName() { return mSplashScreenThemeResName; } /** Loading Loading @@ -1945,8 +1946,8 @@ public class ActivityOptions { if (mOverrideTaskTransition) { b.putBoolean(KEY_OVERRIDE_TASK_TRANSITION, mOverrideTaskTransition); } if (mSplashScreenThemeResId != 0) { b.putInt(KEY_SPLASH_SCREEN_THEME, mSplashScreenThemeResId); if (mSplashScreenThemeResName != null && !mSplashScreenThemeResName.isEmpty()) { b.putString(KEY_SPLASH_SCREEN_THEME, mSplashScreenThemeResName); } if (mRemoveWithTaskOrganizer) { b.putBoolean(KEY_REMOVE_WITH_TASK_ORGANIZER, mRemoveWithTaskOrganizer); Loading
core/java/android/content/pm/AppSearchShortcutInfo.java +1 −1 Original line number Diff line number Diff line Loading @@ -423,7 +423,7 @@ public class AppSearchShortcutInfo extends GenericDocument { shortLabelResName, longLabel, longLabelResId, longLabelResName, disabledMessage, disabledMessageResId, disabledMessageResName, categoriesSet, intents, rank, extras, getCreationTimestampMillis(), flags, iconResId, iconResName, bitmapPath, iconUri, disabledReason, persons, locusId, 0); disabledReason, persons, locusId, null); si.setImplicitRank(implicitRank); if ((implicitRank & ShortcutInfo.RANK_CHANGED_BIT) != 0) { si.setRankChanged(); Loading
core/java/android/content/pm/ShortcutInfo.java +18 −15 Original line number Diff line number Diff line Loading @@ -449,7 +449,7 @@ public final class ShortcutInfo implements Parcelable { private int mDisabledReason; private int mStartingThemeResId; @Nullable private String mStartingThemeResName; private ShortcutInfo(Builder b) { mUserId = b.mContext.getUserId(); Loading Loading @@ -478,8 +478,9 @@ public final class ShortcutInfo implements Parcelable { mExtras = b.mExtras; mLocusId = b.mLocusId; mStartingThemeResName = b.mStartingThemeResId != 0 ? b.mContext.getResources().getResourceName(b.mStartingThemeResId) : null; updateTimestamp(); mStartingThemeResId = b.mStartingThemeResId; } /** Loading Loading @@ -626,7 +627,7 @@ public final class ShortcutInfo implements Parcelable { // Set this bit. mFlags |= FLAG_KEY_FIELDS_ONLY; } mStartingThemeResId = source.mStartingThemeResId; mStartingThemeResName = source.mStartingThemeResName; } /** Loading Loading @@ -950,8 +951,8 @@ public final class ShortcutInfo implements Parcelable { if (source.mLocusId != null) { mLocusId = source.mLocusId; } if (source.mStartingThemeResId != 0) { mStartingThemeResId = source.mStartingThemeResId; if (source.mStartingThemeResName != null && !source.mStartingThemeResName.isEmpty()) { mStartingThemeResName = source.mStartingThemeResName; } } Loading Loading @@ -1454,11 +1455,12 @@ public final class ShortcutInfo implements Parcelable { } /** * Returns the theme resource id used for the splash screen. * Returns the theme resource name used for the splash screen. * @hide */ public int getStartingThemeResId() { return mStartingThemeResId; @Nullable public String getStartingThemeResName() { return mStartingThemeResName; } /** @hide -- old signature, the internal code still uses it. */ Loading Loading @@ -2182,7 +2184,7 @@ public final class ShortcutInfo implements Parcelable { mPersons = source.readParcelableArray(cl, Person.class); mLocusId = source.readParcelable(cl); mIconUri = source.readString8(); mStartingThemeResId = source.readInt(); mStartingThemeResName = source.readString8(); } @Override Loading Loading @@ -2234,7 +2236,7 @@ public final class ShortcutInfo implements Parcelable { dest.writeParcelableArray(mPersons, flags); dest.writeParcelable(mLocusId, flags); dest.writeString8(mIconUri); dest.writeInt(mStartingThemeResId); dest.writeString8(mStartingThemeResName); } public static final @NonNull Creator<ShortcutInfo> CREATOR = Loading Loading @@ -2391,10 +2393,10 @@ public final class ShortcutInfo implements Parcelable { sb.append("disabledReason="); sb.append(getDisabledReasonDebugString(mDisabledReason)); if (mStartingThemeResId != 0) { if (mStartingThemeResName != null && !mStartingThemeResName.isEmpty()) { addIndentOrComma(sb, indent); sb.append("SplashScreenThemeResId="); sb.append(Integer.toHexString(mStartingThemeResId)); sb.append("SplashScreenThemeResName="); sb.append(mStartingThemeResName); } addIndentOrComma(sb, indent); Loading Loading @@ -2482,7 +2484,8 @@ public final class ShortcutInfo implements Parcelable { Set<String> categories, Intent[] intentsWithExtras, int rank, PersistableBundle extras, long lastChangedTimestamp, int flags, int iconResId, String iconResName, String bitmapPath, String iconUri, int disabledReason, Person[] persons, LocusId locusId, int startingThemeResId) { int disabledReason, Person[] persons, LocusId locusId, @Nullable String startingThemeResName) { mUserId = userId; mId = id; mPackageName = packageName; Loading Loading @@ -2511,6 +2514,6 @@ public final class ShortcutInfo implements Parcelable { mDisabledReason = disabledReason; mPersons = persons; mLocusId = locusId; mStartingThemeResId = startingThemeResId; mStartingThemeResName = startingThemeResName; } }
core/java/android/content/pm/ShortcutServiceInternal.java +1 −1 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ public abstract class ShortcutServiceInternal { /** * Get the theme res ID of the starting window, it can be 0 if not specified. */ public abstract int getShortcutStartingThemeResId(int launcherUserId, public abstract @Nullable String getShortcutStartingThemeResName(int launcherUserId, @NonNull String callingPackage, @NonNull String packageName, @NonNull String shortcutId, int userId); Loading
services/core/java/com/android/server/pm/LauncherAppsService.java +4 −5 Original line number Diff line number Diff line Loading @@ -1000,16 +1000,15 @@ public class LauncherAppsService extends SystemService { intents[0].setSourceBounds(sourceBounds); // Replace theme for splash screen final int splashScreenThemeResId = mShortcutServiceInternal.getShortcutStartingThemeResId(getCallingUserId(), final String splashScreenThemeResName = mShortcutServiceInternal.getShortcutStartingThemeResName(getCallingUserId(), callingPackage, packageName, shortcutId, targetUserId); if (splashScreenThemeResId != 0) { if (splashScreenThemeResName != null && !splashScreenThemeResName.isEmpty()) { if (startActivityOptions == null) { startActivityOptions = new Bundle(); } startActivityOptions.putInt(KEY_SPLASH_SCREEN_THEME, splashScreenThemeResId); startActivityOptions.putString(KEY_SPLASH_SCREEN_THEME, splashScreenThemeResName); } return startShortcutIntentsAsPublisher( intents, packageName, featureId, startActivityOptions, targetUserId); } Loading