Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c646f22b authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Android (Google) Code Review
Browse files

Merge "Do not show splash screen icon in the same task by default." into main

parents 612fc1ba 4ff50108
Loading
Loading
Loading
Loading
+8 −9
Original line number Diff line number Diff line
@@ -7522,7 +7522,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
     *               use an icon or solid color splash screen will be made by WmShell.
     */
    private boolean shouldUseSolidColorSplashScreen(ActivityRecord sourceRecord,
            boolean startActivity, ActivityOptions options, int resolvedTheme) {
            boolean startActivity, ActivityOptions options, int resolvedTheme,
            boolean newTask) {
        if (sourceRecord == null && !startActivity) {
            // Use simple style if this activity is not top activity. This could happen when adding
            // a splash screen window to the warm start activity which is re-create because top is
@@ -7545,21 +7546,19 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        // Choose the default behavior when neither the ActivityRecord nor the activity theme have
        // specified a splash screen style.
        if (mLaunchSourceType == LAUNCH_SOURCE_TYPE_HOME || launchedFromUid == Process.SHELL_UID) {
            return false;
        } else if (mLaunchSourceType == LAUNCH_SOURCE_TYPE_SYSTEMUI) {
        if (mLaunchSourceType == LAUNCH_SOURCE_TYPE_SYSTEMUI) {
            return true;
        } else {
            // Need to check sourceRecord in case this activity is launched from a service.
            if (sourceRecord == null) {
                sourceRecord = searchCandidateLaunchingActivity();
            }
            if (sourceRecord != null) {
                return sourceRecord.mSplashScreenStyleSolidColor;
                return sourceRecord.mSplashScreenStyleSolidColor; // follow previous activity
            } else if (mLaunchSourceType == LAUNCH_SOURCE_TYPE_HOME
                    || launchedFromUid == Process.SHELL_UID) {
                return !newTask; // only show icon for new task
            }
            // Use an icon if the activity was launched from System for the first start.
            // Otherwise, must use solid color splash screen.
            return mLaunchSourceType != LAUNCH_SOURCE_TYPE_SYSTEM || !startActivity;
@@ -7627,7 +7626,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
                splashScreenTheme);
        mSplashScreenStyleSolidColor = shouldUseSolidColorSplashScreen(sourceRecord, startActivity,
                startOptions, resolvedTheme);
                startOptions, resolvedTheme, newTask);
        final boolean activityCreated =
                mState.ordinal() >= STARTED.ordinal() && mState.ordinal() <= STOPPED.ordinal();