Move some subsetting launch to SubSettingLauncher

Bug: 73250851
Test: robotests
Change-Id: I1c3620d335eaf99bb110bcbb3e33ff3b2a05f84e
This commit is contained in:
Fan Zhang
2018-02-15 16:34:40 -08:00
parent 615563db0c
commit 3fff7bc35f
2 changed files with 8 additions and 33 deletions

View File

@@ -412,26 +412,6 @@ public final class Utils extends com.android.settingslib.Utils {
metricsCategory);
}
/**
* Start a new instance of the activity, showing only the given fragment.
* When launched in this mode, the given preference fragment will be instantiated and fill the
* entire activity.
*
* @param context The context.
* @param fragmentName The name of the fragment to display.
* @param titleResId resource id for the String to display for the title of this set
* of preferences.
* @param metricsCategory The current metricsCategory for logging source when fragment starts
* @param intentFlags flag that should be added to the intent.
*/
public static void startWithFragment(Context context, String fragmentName, int titleResId,
int metricsCategory, int intentFlags) {
startWithFragment(context, fragmentName, null, null, 0,
null /* titleResPackageName */, titleResId, null, false /* not a shortcut */,
metricsCategory, intentFlags);
}
/**
* Start a new instance of the activity, showing only the given fragment.
* When launched in this mode, the given preference fragment will be instantiated and fill the
@@ -463,17 +443,9 @@ public final class Utils extends com.android.settingslib.Utils {
public static void startWithFragment(Context context, String fragmentName, Bundle args,
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,
Intent.FLAG_ACTIVITY_NEW_TASK);
}
public static void startWithFragment(Context context, String fragmentName, Bundle args,
Fragment resultTo, int resultRequestCode, String titleResPackageName, int titleResId,
CharSequence title, boolean isShortcut, int metricsCategory, int flags) {
Intent intent = onBuildStartFragmentIntent(context, fragmentName, args, titleResPackageName,
titleResId, title, isShortcut, metricsCategory);
intent.addFlags(flags);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
if (resultTo == null) {
context.startActivity(intent);
} else {