Remove the new task for mobile network page starts the sim onboarding
Bug: 349695880 Test: manually test Flag: EXEMPT bugfix Change-Id: Id5f35a9311da5e47f0417a45feadb1d1a0a2e35d
This commit is contained in:
@@ -24,6 +24,7 @@ import static android.telephony.UiccSlotInfo.CARD_STATE_INFO_PRESENT;
|
||||
import static com.android.internal.util.CollectionUtils.emptyIfNull;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkCapabilities;
|
||||
@@ -515,18 +516,23 @@ public class SubscriptionUtil {
|
||||
* @param context {@code Context}
|
||||
* @param subId The id of subscription need to be enabled or disabled.
|
||||
* @param enable Whether the subscription with {@code subId} should be enabled or disabled.
|
||||
* @param isNewTask Whether the start activity add the new task or not
|
||||
*/
|
||||
public static void startToggleSubscriptionDialogActivity(
|
||||
Context context, int subId, boolean enable) {
|
||||
Context context, int subId, boolean enable, boolean isNewTask) {
|
||||
if (!SubscriptionManager.isUsableSubscriptionId(subId)) {
|
||||
Log.i(TAG, "Unable to toggle subscription due to invalid subscription ID.");
|
||||
return;
|
||||
}
|
||||
if (enable && Flags.isDualSimOnboardingEnabled()) {
|
||||
SimOnboardingActivity.startSimOnboardingActivity(context, subId);
|
||||
SimOnboardingActivity.startSimOnboardingActivity(context, subId, isNewTask);
|
||||
return;
|
||||
}
|
||||
context.startActivity(ToggleSubscriptionDialogActivity.getIntent(context, subId, enable));
|
||||
Intent intent = ToggleSubscriptionDialogActivity.getIntent(context, subId, enable);
|
||||
if (isNewTask) {
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
}
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user