1 package com.android.settings.network;
2 
3 import android.annotation.Nullable;
4 import android.content.Context;
5 import android.content.Intent;
6 import android.util.Log;
7 
8 import com.android.settings.activityembedding.ActivityEmbeddingRulesController;
9 
10 public class MobileNetworkTwoPaneUtils {
11 
12     private static final String TAG = "MobileNetworkTwoPaneUtils";
13 
14     /**
15      * TODO: b/206061070, the problem of multi-instance should be fixed in Android T to apply the
16      * Settings' architecture and 2 panes mode instead of registering the rule.
17      *
18      * The launchMode of MobileNetworkActivity is singleTask, set SplitPairRule to show in 2-pane.
19      */
registerTwoPaneForMobileNetwork(Context context, Intent intent, @Nullable String secondaryIntentAction)20     public static void registerTwoPaneForMobileNetwork(Context context, Intent intent,
21             @Nullable String secondaryIntentAction) {
22         Log.d(TAG, "registerTwoPaneForMobileNetwork");
23         ActivityEmbeddingRulesController.registerTwoPanePairRuleForSettingsHome(
24                 context,
25                 intent.getComponent(),
26                 secondaryIntentAction /* secondaryIntentAction */,
27                 false /* clearTop */);
28     }
29 }
30