summaryrefslogtreecommitdiff
path: root/core/java/android/widget/CompoundButton.java
diff options
context:
space:
mode:
authorFelipe Leme <felipeal@google.com>2017-03-06 15:44:06 -0800
committerFelipe Leme <felipeal@google.com>2017-03-09 08:14:49 -0800
commit640f30a7763b0a4b80c767acb84c740aac04768b (patch)
tree2d49838983fb5d64caafe4dd11964991ddea6a17 /core/java/android/widget/CompoundButton.java
parent16539f33785b59fa809295ec7def782983664489 (diff)
Replaced auto-fill by autofill to keep it consistent with API style.
This change will affects 2 types of apps: autofill service implementations and apps that use autofill APIs. Since just the former is known to be used at the moment, we're not trying to keep backward compatibility with the latter. Bug: 35956626 Test: CtsAutoFillServiceTestCases pass Test: android.provider.SettingsBackupTest pass Change-Id: Ia720083508716deae9e887f9faa7ae7c5a82f471
Diffstat (limited to 'core/java/android/widget/CompoundButton.java')
-rw-r--r--core/java/android/widget/CompoundButton.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/core/java/android/widget/CompoundButton.java b/core/java/android/widget/CompoundButton.java
index dce33a0e6fbb..81aec9ceee35 100644
--- a/core/java/android/widget/CompoundButton.java
+++ b/core/java/android/widget/CompoundButton.java
@@ -35,8 +35,8 @@ import android.view.ViewHierarchyEncoder;
import android.view.ViewStructure;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
-import android.view.autofill.AutoFillManager;
-import android.view.autofill.AutoFillValue;
+import android.view.autofill.AutofillManager;
+import android.view.autofill.AutofillValue;
import com.android.internal.R;
@@ -69,7 +69,7 @@ public abstract class CompoundButton extends Button implements Checkable {
private OnCheckedChangeListener mOnCheckedChangeWidgetListener;
// Indicates whether the toggle state was set from resources or dynamically, so it can be used
- // to sanitize auto-fill requests.
+ // to sanitize autofill requests.
private boolean mCheckedFromResource = false;
private static final int[] CHECKED_STATE_SET = {
@@ -171,7 +171,7 @@ public abstract class CompoundButton extends Button implements Checkable {
if (mOnCheckedChangeWidgetListener != null) {
mOnCheckedChangeWidgetListener.onCheckedChanged(this, mChecked);
}
- final AutoFillManager afm = mContext.getSystemService(AutoFillManager.class);
+ final AutofillManager afm = mContext.getSystemService(AutofillManager.class);
if (afm != null) {
afm.valueChanged(this);
}
@@ -572,17 +572,17 @@ public abstract class CompoundButton extends Button implements Checkable {
stream.addProperty("checked", isChecked());
}
- // TODO(b/33197203): add unit/CTS tests for auto-fill methods (and make sure they handle enable)
+ // TODO(b/33197203): add unit/CTS tests for autofill methods (and make sure they handle enable)
@Override
- public void onProvideAutoFillStructure(ViewStructure structure, int flags) {
- super.onProvideAutoFillStructure(structure, flags);
+ public void onProvideAutofillStructure(ViewStructure structure, int flags) {
+ super.onProvideAutofillStructure(structure, flags);
structure.setSanitized(mCheckedFromResource);
}
@Override
- public void autoFill(AutoFillValue value) {
+ public void autofill(AutofillValue value) {
if (!isEnabled()) return;
setChecked(value.getToggleValue());
@@ -594,7 +594,7 @@ public abstract class CompoundButton extends Button implements Checkable {
}
@Override
- public AutoFillValue getAutoFillValue() {
- return isEnabled() ? AutoFillValue.forToggle(isChecked()) : null;
+ public AutofillValue getAutofillValue() {
+ return isEnabled() ? AutofillValue.forToggle(isChecked()) : null;
}
}