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

Commit b7270a5a authored by Fan Zhang's avatar Fan Zhang
Browse files

conditionally add FLAG_ACTIVITY_NEW_TASK when starting page

Subsettings must be started from Activity context, apparently.

Add a flag when it's not started from Activity context. This might not
be catching all cases but should at lesat cover most of them.

Change-Id: I8157ec0cb3d032bb44a0e7dec36637906fc8f1a0
Fixes: 72314527
Test: monkey
parent aaf307e7
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -515,7 +515,8 @@ public final class Utils extends com.android.settingslib.Utils {
            Fragment resultTo, int resultRequestCode, String titleResPackageName, int titleResId,
            CharSequence title, boolean isShortcut, int metricsCategory) {
        startWithFragment(context, fragmentName, args, resultTo, resultRequestCode,
                titleResPackageName, titleResId, title, isShortcut, metricsCategory, 0);
                titleResPackageName, titleResId, title, isShortcut, metricsCategory,
                Intent.FLAG_ACTIVITY_NEW_TASK);
    }