[Settings] Remove the legacy 2-pane registration
Test: atest Bug: 209606859 Change-Id: Ia1788cdfd9a9e4c6bfeb25be1257f82900867114
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
package com.android.settings.network;
|
||||
|
||||
import android.annotation.Nullable;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.settings.activityembedding.ActivityEmbeddingRulesController;
|
||||
|
||||
public class MobileNetworkTwoPaneUtils {
|
||||
|
||||
private static final String TAG = "MobileNetworkTwoPaneUtils";
|
||||
|
||||
/**
|
||||
* TODO: b/206061070, the problem of multi-instance should be fixed in Android T to apply the
|
||||
* Settings' architecture and 2 panes mode instead of registering the rule.
|
||||
*
|
||||
* The launchMode of MobileNetworkActivity is singleTask, set SplitPairRule to show in 2-pane.
|
||||
*/
|
||||
public static void registerTwoPaneForMobileNetwork(Context context, Intent intent,
|
||||
@Nullable String secondaryIntentAction) {
|
||||
Log.d(TAG, "registerTwoPaneForMobileNetwork");
|
||||
ActivityEmbeddingRulesController.registerTwoPanePairRuleForSettingsHome(
|
||||
context,
|
||||
intent.getComponent(),
|
||||
secondaryIntentAction /* secondaryIntentAction */,
|
||||
false /* clearTop */);
|
||||
}
|
||||
}
|
@@ -52,7 +52,6 @@ import android.util.Log;
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
import com.android.settings.HelpTrampoline;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.network.MobileNetworkTwoPaneUtils;
|
||||
import com.android.settings.network.SubscriptionUtil;
|
||||
import com.android.settings.network.telephony.MobileNetworkActivity;
|
||||
|
||||
@@ -264,9 +263,6 @@ public class SimSelectNotification extends BroadcastReceiver {
|
||||
Intent resultIntent = new Intent(Settings.ACTION_MMS_MESSAGE_SETTING);
|
||||
resultIntent.setClass(context, MobileNetworkActivity.class);
|
||||
resultIntent.putExtra(Settings.EXTRA_SUB_ID, subId);
|
||||
// MobileNetworkActivity is singleTask, set SplitPairRule to show in 2-pane.
|
||||
MobileNetworkTwoPaneUtils.registerTwoPaneForMobileNetwork(context, resultIntent,
|
||||
Settings.ACTION_MMS_MESSAGE_SETTING);
|
||||
PendingIntent resultPendingIntent = PendingIntent.getActivity(context, 0, resultIntent,
|
||||
PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE);
|
||||
builder.setContentIntent(resultPendingIntent);
|
||||
|
Reference in New Issue
Block a user