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

Commit 07775c5c authored by Yi-Ling Chuang's avatar Yi-Ling Chuang
Browse files

Remove FLAG_ACTIVITY_NEW_TASK when startActivityAsUser

In the previous CL, we only remove the flag when the transition is
enabled. This CL remove it entirely regardless of the existing of the
transition since we'll be using the default transition.

Bug: 186858442
Test: click on any work profile app and don't see task transition.
Change-Id: Ie93e87156ca49e4bccef28d75afc54161919da62
parent 186254c6
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@ import androidx.fragment.app.Fragment;

import com.android.settings.SettingsActivity;
import com.android.settings.SubSettings;
import com.android.settings.Utils;
import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
import com.android.settingslib.transition.SettingsTransitionHelper.TransitionType;

@@ -182,10 +181,6 @@ public class SubSettingLauncher {

    @VisibleForTesting
    void launchAsUser(Intent intent, UserHandle userHandle) {
        if (!Utils.isPageTransitionEnabled(mContext)) {
            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
        }
        mContext.startActivityAsUser(intent, userHandle);
    }