[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

@@ -28,18 +28,17 @@ import com.android.settingslib.core.instrumentation.MetricsFeatureProvider;
* The switch controller that is used to update the switch widget in the PrimarySwitchPreference
* and RestrictedSwitchPreference layouts.
*/
// TODO(b/174022082): Modify the class name to GenericSwitchController.
public class PrimarySwitchController extends SwitchWidgetController implements
public class GenericSwitchController extends SwitchWidgetController implements
Preference.OnPreferenceChangeListener {
private Preference mPreference;
private MetricsFeatureProvider mMetricsFeatureProvider;
public PrimarySwitchController(PrimarySwitchPreference preference) {
public GenericSwitchController(PrimarySwitchPreference preference) {
setPreference(preference);
}
public PrimarySwitchController(RestrictedSwitchPreference preference) {
public GenericSwitchController(RestrictedSwitchPreference preference) {
setPreference(preference);
}