[Provider Model] Modify the class name to GenericSwitchController

- The generic class can be used for multiple controllers

Bug: 174022082
Test:
- atest -c AirplaneSafeNetworksPreferenceControllerTest
- make RunSettingsRoboTests
ROBOTEST_FILTER=AllInOneTetherPreferenceControllerTest
- make RunSettingsRoboTests
ROBOTEST_FILTER=AutomaticStorageManagementSwitchPreferenceControllerTest
- make RunSettingsRoboTests
ROBOTEST_FILTER=WifiPrimarySwitchPreferenceControllerTest

Change-Id: I7d50ae3e6228005eb6dfb0a6c1a2f870c41330f2
This commit is contained in:
Weng Su
2020-12-03 17:36:47 +00:00
parent 25cca45c09
commit 6c430b370d
5 changed files with 12 additions and 13 deletions

View File

@@ -42,7 +42,7 @@ import androidx.preference.PreferenceScreen;
import com.android.settings.R;
import com.android.settings.core.BasePreferenceController;
import com.android.settings.core.FeatureFlags;
import com.android.settings.widget.PrimarySwitchController;
import com.android.settings.widget.GenericSwitchController;
import com.android.settings.widget.PrimarySwitchPreference;
import com.android.settingslib.TetherUtil;
@@ -191,7 +191,7 @@ public class AllInOneTetherPreferenceController extends BasePreferenceController
void initEnabler(Lifecycle lifecycle) {
if (mPreference != null) {
mTetherEnabler = new TetherEnabler(
mContext, new PrimarySwitchController(mPreference), mBluetoothPan);
mContext, new GenericSwitchController(mPreference), mBluetoothPan);
if (lifecycle != null) {
lifecycle.addObserver(mTetherEnabler);
}