@ -19,7 +19,8 @@ package org.lineageos.settings.doze;
import android.os.Bundle ;
import android.os.Bundle ;
import android.os.Handler ;
import android.os.Handler ;
import android.widget.Switch ;
import android.widget.CompoundButton ;
import android.widget.CompoundButton.OnCheckedChangeListener ;
import androidx.preference.Preference ;
import androidx.preference.Preference ;
import androidx.preference.Preference.OnPreferenceChangeListener ;
import androidx.preference.Preference.OnPreferenceChangeListener ;
@ -27,12 +28,11 @@ import androidx.preference.PreferenceFragment;
import androidx.preference.SwitchPreference ;
import androidx.preference.SwitchPreference ;
import com.android.settingslib.widget.MainSwitchPreference ;
import com.android.settingslib.widget.MainSwitchPreference ;
import com.android.settingslib.widget.OnMainSwitchChangeListener ;
import org.lineageos.internal.util.ScreenType ;
import org.lineageos.internal.util.ScreenType ;
public class SamsungDozeSettings extends PreferenceFragment
public class SamsungDozeSettings extends PreferenceFragment
implements OnPreferenceChangeListener , OnMainSwitch ChangeListener {
implements OnPreferenceChangeListener , OnChecked ChangeListener {
private MainSwitchPreference mSwitchBar ;
private MainSwitchPreference mSwitchBar ;
@ -108,7 +108,7 @@ public class SamsungDozeSettings extends PreferenceFragment
}
}
@Override
@Override
public void onSwitchChanged ( Switch switch View , boolean isChecked ) {
public void onCheckedChanged ( CompoundButton button View , boolean isChecked ) {
Utils . enableDoze ( getActivity ( ) , isChecked ) ;
Utils . enableDoze ( getActivity ( ) , isChecked ) ;
Utils . checkDozeService ( getActivity ( ) ) ;
Utils . checkDozeService ( getActivity ( ) ) ;