Revert^2 "Migrate to CompoundButton.OnCheckedChangeListener"

8979681a8d

Change-Id: I60edd3aabf49afbe4aa016af780baa68d928bddf
This commit is contained in:
Chaohui Wang
2023-11-07 20:41:11 +08:00
parent 8979681a8d
commit 08a1c9876e
49 changed files with 174 additions and 188 deletions

View File

@@ -21,7 +21,6 @@ import static com.android.settingslib.RestrictedLockUtils.EnforcedAdmin;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.Switch;
import com.android.settings.overlay.FeatureFactory;
import com.android.settingslib.RestrictedLockUtils;
@@ -39,10 +38,9 @@ public class SettingsMainSwitchBar extends MainSwitchBar {
public interface OnBeforeCheckedChangeListener {
/**
* @param switchView The Switch view whose state has changed.
* @param isChecked The new checked state of switchView.
* @param isChecked The new checked state of switchView.
*/
boolean onBeforeCheckedChanged(Switch switchView, boolean isChecked);
boolean onBeforeCheckedChanged(boolean isChecked);
}
private EnforcedAdmin mEnforcedAdmin;
@@ -117,7 +115,7 @@ public class SettingsMainSwitchBar extends MainSwitchBar {
@Override
public void setChecked(boolean checked) {
if (mOnBeforeListener != null
&& mOnBeforeListener.onBeforeCheckedChanged(mSwitch, checked)) {
&& mOnBeforeListener.onBeforeCheckedChanged(checked)) {
return;
}
super.setChecked(checked);