Add a Preference into "Network & internet" for new tethering UI
Adding a MasterSwitchPreference into "Network & internet" and create corresponding controller. The preference is hidden by the feature flag. It does NOT affect the existing UI. Bug: 146147778 Test: CodeInspectionTest, TetherPreferenceControllerTest, NetworkDashboardFragmentTest Change-Id: Ida8e088efbb22d0c983acecbc420672206392dad
This commit is contained in:
@@ -20,6 +20,7 @@ import static com.android.settings.network.MobilePlanPreferenceController.MANAGE
|
||||
import android.app.Dialog;
|
||||
import android.app.settings.SettingsEnums;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
@@ -65,6 +66,13 @@ public class NetworkDashboardFragment extends DashboardFragment implements
|
||||
|
||||
use(MultiNetworkHeaderController.class).init(getSettingsLifecycle());
|
||||
use(AirplaneModePreferenceController.class).setFragment(this);
|
||||
use(AllInOneTetherPreferenceController.class).init(getSettingsLifecycle());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
|
||||
super.onCreatePreferences(savedInstanceState, rootKey);
|
||||
use(AllInOneTetherPreferenceController.class).initEnabler(getSettingsLifecycle());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user