[Large screen] Shows MobileNetworkActivity in 2-pane
MobileNetworkActivity has launchMode singleTask, it makes the Activity shows in full screen instead of 2-pane. This change register SplitPairRule for the Activity to show in 2-pane. However, there are other objects which starts MobileNetworkActivity, it still needs later CL to refine and register SplitPairRule for other objects which starts MobileNetworkActivity. Bug: 204039043 Test: manual Settings -> Network & Internet -> SIMs Change-Id: Ia15c17c88efd46c5bb2b41aa21848293b9ff5610
This commit is contained in:
@@ -33,9 +33,9 @@ import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.activityembedding.ActivityEmbeddingRulesController;
|
||||
import com.android.settings.core.PreferenceControllerMixin;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
import com.android.settings.network.helper.SelectableSubscriptions;
|
||||
import com.android.settings.network.helper.SubscriptionAnnotation;
|
||||
import com.android.settings.network.telephony.MobileNetworkActivity;
|
||||
import com.android.settings.overlay.FeatureFactory;
|
||||
@@ -202,6 +202,12 @@ public class MobileNetworkSummaryController extends AbstractPreferenceController
|
||||
|| mStatusCache.isPhysicalSimDisableSupport()) {
|
||||
final Intent intent = new Intent(mContext, MobileNetworkActivity.class);
|
||||
intent.putExtra(Settings.EXTRA_SUB_ID, info.getSubscriptionId());
|
||||
// MobilenetworkActivity is singleTask, set SplitPairRule to show in 2-pane.
|
||||
ActivityEmbeddingRulesController.registerTwoPanePairRuleForSettingsHome(
|
||||
mContext,
|
||||
intent.getComponent(),
|
||||
null /* secondaryIntentAction */,
|
||||
false /* clearTop */);
|
||||
mContext.startActivity(intent);
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user