[Settings] Adjust the finish procedure when launching Settings UI

Replace finishFragment() by finish()

Bug: 240515161
Test: local testing
Change-Id: I3d8b9b02998f09122a63f2262817acff3ca84d2e
This commit is contained in:
Bonian Chen
2022-10-28 09:40:00 +00:00
parent c972af0ca7
commit 8cde98106c
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) {
final List<AbstractPreferenceController> controllers = new ArrayList<>();
if (!SubscriptionUtil.isSimHardwareVisible(getContext())) {
finishFragment();
finish();
return controllers;
}

View File

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