Merge "Remove duplicate layout mobile_network_settings_container_v2"
This commit is contained in:
committed by
Android (Google) Code Review
commit
9aded56b70
@@ -56,7 +56,7 @@ public class NetworkDashboardFragment extends DashboardFragment implements
|
||||
|
||||
@Override
|
||||
protected int getPreferenceScreenResId() {
|
||||
return R.xml.network_and_internet_v2;
|
||||
return R.xml.network_and_internet;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -141,7 +141,7 @@ public class NetworkDashboardFragment extends DashboardFragment implements
|
||||
}
|
||||
|
||||
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
||||
new BaseSearchIndexProvider(R.xml.network_and_internet_v2) {
|
||||
new BaseSearchIndexProvider(R.xml.network_and_internet) {
|
||||
|
||||
@Override
|
||||
public List<AbstractPreferenceController> createPreferenceControllers(Context
|
||||
|
@@ -22,6 +22,8 @@ import android.os.Bundle;
|
||||
import android.os.UserManager;
|
||||
import android.provider.Settings;
|
||||
import android.telephony.SubscriptionInfo;
|
||||
import android.view.View;
|
||||
import android.widget.Toolbar;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
@@ -74,8 +76,14 @@ public class MobileNetworkActivity extends SettingsBaseActivity
|
||||
return;
|
||||
}
|
||||
|
||||
setContentView(R.layout.mobile_network_settings_container_v2);
|
||||
setActionBar(findViewById(R.id.mobile_action_bar));
|
||||
final Toolbar toolbar = findViewById(R.id.action_bar);
|
||||
toolbar.setVisibility(View.VISIBLE);
|
||||
setActionBar(toolbar);
|
||||
|
||||
final ActionBar actionBar = getActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
|
||||
mProxySubscriptionMgr = ProxySubscriptionManager.getInstance(this);
|
||||
mProxySubscriptionMgr.setLifecycle(getLifecycle());
|
||||
@@ -85,11 +93,6 @@ public class MobileNetworkActivity extends SettingsBaseActivity
|
||||
? savedInstanceState.getInt(Settings.EXTRA_SUB_ID, SUB_ID_NULL)
|
||||
: SUB_ID_NULL;
|
||||
|
||||
final ActionBar actionBar = getActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
|
||||
final SubscriptionInfo subscription = getSubscription();
|
||||
updateTitleAndNavigation(subscription);
|
||||
}
|
||||
@@ -178,7 +181,7 @@ public class MobileNetworkActivity extends SettingsBaseActivity
|
||||
|
||||
final Fragment fragment = new MobileNetworkSettings();
|
||||
fragment.setArguments(bundle);
|
||||
fragmentTransaction.replace(R.id.main_content, fragment, buildFragmentTag(subId));
|
||||
fragmentTransaction.replace(R.id.content_frame, fragment, buildFragmentTag(subId));
|
||||
fragmentTransaction.commit();
|
||||
}
|
||||
|
||||
|
@@ -195,7 +195,7 @@ public class MobileNetworkSettings extends RestrictedDashboardFragment {
|
||||
|
||||
@Override
|
||||
protected int getPreferenceScreenResId() {
|
||||
return R.xml.mobile_network_settings_v2;
|
||||
return R.xml.mobile_network_settings;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -259,7 +259,7 @@ public class MobileNetworkSettings extends RestrictedDashboardFragment {
|
||||
}
|
||||
|
||||
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
||||
new BaseSearchIndexProvider(R.xml.mobile_network_settings_v2) {
|
||||
new BaseSearchIndexProvider(R.xml.mobile_network_settings) {
|
||||
|
||||
/** suppress full page if user is not admin */
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user