Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference Bug: 161896447 Test: robotest & manual Change-Id: I32f369a608c8b4f513f2c32afca6d408ee273428
This commit is contained in:
@@ -31,32 +31,32 @@ import com.android.settingslib.TwoTargetPreference;
|
||||
* A custom preference that provides inline checkbox. It has a mandatory field for title, and
|
||||
* optional fields for icon and sub-text.
|
||||
*/
|
||||
public class MasterCheckBoxPreference extends TwoTargetPreference {
|
||||
public class PrimaryCheckBoxPreference extends TwoTargetPreference {
|
||||
|
||||
private CheckBox mCheckBox;
|
||||
private boolean mChecked;
|
||||
private boolean mEnableCheckBox = true;
|
||||
|
||||
public MasterCheckBoxPreference(Context context, AttributeSet attrs,
|
||||
public PrimaryCheckBoxPreference(Context context, AttributeSet attrs,
|
||||
int defStyleAttr, int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
}
|
||||
|
||||
public MasterCheckBoxPreference(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
public PrimaryCheckBoxPreference(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
public MasterCheckBoxPreference(Context context, AttributeSet attrs) {
|
||||
public PrimaryCheckBoxPreference(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public MasterCheckBoxPreference(Context context) {
|
||||
public PrimaryCheckBoxPreference(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getSecondTargetResId() {
|
||||
return R.layout.preference_widget_master_checkbox;
|
||||
return R.layout.preference_widget_primary_checkbox;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -98,6 +98,10 @@ public class MasterCheckBoxPreference extends TwoTargetPreference {
|
||||
return mCheckBox != null && mChecked;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the check status of checkbox
|
||||
* @param checked
|
||||
*/
|
||||
public void setChecked(boolean checked) {
|
||||
mChecked = checked;
|
||||
if (mCheckBox != null) {
|
||||
@@ -105,6 +109,10 @@ public class MasterCheckBoxPreference extends TwoTargetPreference {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the enabled status of CheckBox
|
||||
* @param enabled
|
||||
*/
|
||||
public void setCheckBoxEnabled(boolean enabled) {
|
||||
mEnableCheckBox = enabled;
|
||||
if (mCheckBox != null) {
|
||||
Reference in New Issue
Block a user