Remove the multi-SIM bottom nav in network and internet v2 mode

When a device has multiple SIMs, at the bottom of the SIM details page
we show a chooser with an icon for each SIM card. This UX design is
being supplanted by the new network and internet v2 design where there
is a list of networks you can get to from the Network & internet
homepage. So when the v2 mode is turned on, we don't want that bottom
navigation to appear.

Bug: 116349402
Test: visual (will remove existing tests for this feature eventually)
Change-Id: I9cae479a1f4e689adcc4f4262661b10edbbbf2d3
This commit is contained in:
Antony Sargent
2019-01-14 17:38:25 -08:00
parent f4ee4ef3bf
commit 33340366aa
2 changed files with 50 additions and 3 deletions

View File

@@ -37,7 +37,9 @@ import androidx.fragment.app.FragmentTransaction;
import com.android.internal.telephony.TelephonyIntents;
import com.android.internal.util.CollectionUtils;
import com.android.settings.R;
import com.android.settings.core.FeatureFlags;
import com.android.settings.core.SettingsBaseActivity;
import com.android.settings.development.featureflags.FeatureFlagPersistent;
import com.google.android.material.bottomnavigation.BottomNavigationView;
@@ -77,7 +79,11 @@ public class MobileNetworkActivity extends SettingsBaseActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.mobile_network_settings_container);
if (FeatureFlagPersistent.isEnabled(this, FeatureFlags.NETWORK_INTERNET_V2)) {
setContentView(R.layout.mobile_network_settings_container_v2);
} else {
setContentView(R.layout.mobile_network_settings_container);
}
setActionBar(findViewById(R.id.mobile_action_bar));
mPhoneChangeReceiver = new PhoneChangeReceiver();
mSubscriptionManager = getSystemService(SubscriptionManager.class);
@@ -132,7 +138,9 @@ public class MobileNetworkActivity extends SettingsBaseActivity {
void updateSubscriptions(Bundle savedInstanceState) {
mSubscriptionInfos = mSubscriptionManager.getActiveSubscriptionInfoList();
updateBottomNavigationView();
if (!FeatureFlagPersistent.isEnabled(this, FeatureFlags.NETWORK_INTERNET_V2)) {
updateBottomNavigationView();
}
if (savedInstanceState == null) {
switchFragment(new MobileNetworkSettings(), getSubscriptionId());
@@ -237,4 +245,4 @@ public class MobileNetworkActivity extends SettingsBaseActivity {
}
}
}
}
}