Merge "[Settings] Adjust the finish procedure when launching Settings UI"

This commit is contained in:
Bonian Chen
2022-10-31 11:38:25 +00:00
committed by Android (Google) Code Review
2 changed files with 2 additions and 2 deletions

View File

@@ -71,7 +71,7 @@ public class MobileNetworkListFragment extends DashboardFragment {
protected List<AbstractPreferenceController> createPreferenceControllers(Context context) { protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
final List<AbstractPreferenceController> controllers = new ArrayList<>(); final List<AbstractPreferenceController> controllers = new ArrayList<>();
if (!SubscriptionUtil.isSimHardwareVisible(getContext())) { if (!SubscriptionUtil.isSimHardwareVisible(getContext())) {
finishFragment(); finish();
return controllers; return controllers;
} }

View File

@@ -121,7 +121,7 @@ public class MobileNetworkSettings extends AbstractMobileNetworkSettings {
@Override @Override
protected List<AbstractPreferenceController> createPreferenceControllers(Context context) { protected List<AbstractPreferenceController> createPreferenceControllers(Context context) {
if (!SubscriptionUtil.isSimHardwareVisible(context)) { if (!SubscriptionUtil.isSimHardwareVisible(context)) {
finishFragment(); finish();
return Arrays.asList(); return Arrays.asList();
} }
if (getArguments() == null) { if (getArguments() == null) {