use of com.android.settings.widget.MasterSwitchController in project platform_packages_apps_Settings by BlissRoms.
the class AutomaticStorageManagementSwitchPreferenceController method onResume.
@Override
public void onResume() {
if (!isAvailable()) {
return;
}
boolean isStorageManagerEnabled = Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.AUTOMATIC_STORAGE_MANAGER_ENABLED, 0) != 0;
mSwitch.setChecked(isStorageManagerEnabled);
if (mSwitch != null) {
mSwitchController = new MasterSwitchController(mSwitch);
mSwitchController.setListener(this);
mSwitchController.startListening();
}
}
Aggregations