Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -1610,6 +1610,7 @@ package android { field public static final int alert_light_frame = 17301505; // 0x1080001 field public static final int arrow_down_float = 17301506; // 0x1080002 field public static final int arrow_up_float = 17301507; // 0x1080003 field public static final int autofilled_highlight = 17301684; // 0x10800b4 field public static final int bottom_bar = 17301658; // 0x108009a field public static final int btn_default = 17301508; // 0x1080004 field public static final int btn_default_small = 17301509; // 0x1080005 api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -1728,6 +1728,7 @@ package android { field public static final int alert_light_frame = 17301505; // 0x1080001 field public static final int arrow_down_float = 17301506; // 0x1080002 field public static final int arrow_up_float = 17301507; // 0x1080003 field public static final int autofilled_highlight = 17301684; // 0x10800b4 field public static final int bottom_bar = 17301658; // 0x108009a field public static final int btn_default = 17301508; // 0x1080004 field public static final int btn_default_small = 17301509; // 0x1080005 api/test-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -1610,6 +1610,7 @@ package android { field public static final int alert_light_frame = 17301505; // 0x1080001 field public static final int arrow_down_float = 17301506; // 0x1080002 field public static final int arrow_up_float = 17301507; // 0x1080003 field public static final int autofilled_highlight = 17301684; // 0x10800b4 field public static final int bottom_bar = 17301658; // 0x108009a field public static final int btn_default = 17301508; // 0x1080004 field public static final int btn_default_small = 17301509; // 0x1080005 Loading Loading @@ -46061,6 +46062,7 @@ package android.view { method public void setAnimation(android.view.animation.Animation); method public void setAutofillHints(java.lang.String...); method public void setAutofillMode(int); method public void setAutofilled(boolean); method public void setBackground(android.graphics.drawable.Drawable); method public void setBackgroundColor(int); method public deprecated void setBackgroundDrawable(android.graphics.drawable.Drawable); core/java/android/app/Activity.java +11 −0 Original line number Diff line number Diff line Loading @@ -724,6 +724,7 @@ public class Activity extends ContextThemeWrapper public static final int FINISH_TASK_WITH_ACTIVITY = 2; static final String FRAGMENTS_TAG = "android:fragments"; static final String AUTOFILL_RESET_NEEDED_TAG = "android:autofillResetNeeded"; private static final String WINDOW_HIERARCHY_TAG = "android:viewHierarchyState"; private static final String SAVED_DIALOG_IDS_KEY = "android:savedDialogIds"; Loading Loading @@ -1057,6 +1058,12 @@ public class Activity extends ContextThemeWrapper * @see #onSaveInstanceState */ protected void onRestoreInstanceState(Bundle savedInstanceState) { mAutoFillResetNeeded = savedInstanceState.getBoolean(AUTOFILL_RESET_NEEDED_TAG, false); if (mAutoFillResetNeeded) { getSystemService(AutofillManager.class).onRestoreInstanceState(savedInstanceState); } if (mWindow != null) { Bundle windowState = savedInstanceState.getBundle(WINDOW_HIERARCHY_TAG); if (windowState != null) { Loading Loading @@ -1502,6 +1509,10 @@ public class Activity extends ContextThemeWrapper if (p != null) { outState.putParcelable(FRAGMENTS_TAG, p); } if (mAutoFillResetNeeded) { outState.putBoolean(AUTOFILL_RESET_NEEDED_TAG, mAutoFillResetNeeded); getSystemService(AutofillManager.class).onSaveInstanceState(outState); } getApplication().dispatchActivitySaveInstanceState(this, outState); } Loading core/java/android/view/View.java +121 −5 Original line number Diff line number Diff line Loading @@ -2750,7 +2750,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * 1 PFLAG3_SCROLL_INDICATOR_END * 1 PFLAG3_ASSIST_BLOCKED * 1 PFLAG3_CLUSTER * x * NO LONGER NEEDED, SHOULD BE REUSED * * 1 PFLAG3_IS_AUTOFILLED * 1 PFLAG3_FINGER_DOWN * 1 PFLAG3_FOCUSED_BY_DEFAULT * 11 PFLAG3_AUTO_FILL_MODE_MASK Loading Loading @@ -2960,6 +2960,14 @@ public class View implements Drawable.Callback, KeyEvent.Callback, */ private static final int PFLAG3_CLUSTER = 0x8000; /** * Flag indicating that the view is autofilled * * @see #isAutofilled() * @see #setAutofilled(boolean) */ private static final int PFLAG3_IS_AUTOFILLED = 0x10000; /** * Indicates that the user is currently touching the screen. * Currently used for the tooltip positioning only. Loading Loading @@ -7462,10 +7470,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * <ol> * <li>Calling the proper getter method on {@link AutofillValue} to fetch the actual value. * <li>Passing the actual value to the equivalent setter in the view. * <ol> * </ol> * * <p>For example, a text-field view would call: * * <pre class="prettyprint"> * CharSequence text = value.getTextValue(); * if (text != null) { Loading @@ -7473,6 +7480,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * } * </pre> * * <p>If the value is updated asyncronously the next call to * {@link AutofillManager#notifyValueChanged(View)} must happen <u>after</u> the value was * changed to the autofilled value. If not, the view will not be considered autofilled. * * @param value value to be autofilled. */ public void autofill(@SuppressWarnings("unused") AutofillValue value) { Loading @@ -7483,6 +7494,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * * <p>See {@link #autofill(AutofillValue)} and * {@link #onProvideAutofillVirtualStructure(ViewStructure, int)} for more info. * <p>To indicate that a virtual view was autofilled * <code>@android:drawable/autofilled_highlight</code> should be drawn over it until the data * changes. * * @param values map of values to be autofilled, keyed by virtual child id. */ Loading Loading @@ -7512,6 +7526,13 @@ public class View implements Drawable.Callback, KeyEvent.Callback, return mAutofillHints; } /** * @hide */ public boolean isAutofilled() { return (mPrivateFlags3 & PFLAG3_IS_AUTOFILLED) != 0; } /** * Gets the {@link View}'s current autofill value. * Loading Loading @@ -9152,6 +9173,24 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } } /** * @hide */ @TestApi public void setAutofilled(boolean isAutofilled) { boolean wasChanged = isAutofilled != isAutofilled(); if (wasChanged) { if (isAutofilled) { mPrivateFlags3 |= PFLAG3_IS_AUTOFILLED; } else { mPrivateFlags3 &= ~PFLAG3_IS_AUTOFILLED; } invalidate(); } } /** * Set whether this view should have sound effects enabled for events such as * clicking and touching. Loading Loading @@ -17176,9 +17215,19 @@ public class View implements Drawable.Callback, KeyEvent.Callback, @CallSuper protected Parcelable onSaveInstanceState() { mPrivateFlags |= PFLAG_SAVE_STATE_CALLED; if (mStartActivityRequestWho != null) { if (mStartActivityRequestWho != null || isAutofilled()) { BaseSavedState state = new BaseSavedState(AbsSavedState.EMPTY_STATE); if (mStartActivityRequestWho != null) { state.mSavedData |= BaseSavedState.START_ACTIVITY_REQUESTED_WHO_SAVED; } if (isAutofilled()) { state.mSavedData |= BaseSavedState.IS_AUTOFILLED; } state.mStartActivityRequestWhoSaved = mStartActivityRequestWho; state.mIsAutofilled = isAutofilled(); return state; } return BaseSavedState.EMPTY_STATE; Loading Loading @@ -17248,7 +17297,14 @@ public class View implements Drawable.Callback, KeyEvent.Callback, + "other views do not use the same id."); } if (state != null && state instanceof BaseSavedState) { mStartActivityRequestWho = ((BaseSavedState) state).mStartActivityRequestWhoSaved; BaseSavedState baseState = (BaseSavedState) state; if ((baseState.mSavedData & BaseSavedState.START_ACTIVITY_REQUESTED_WHO_SAVED) != 0) { mStartActivityRequestWho = baseState.mStartActivityRequestWhoSaved; } if ((baseState.mSavedData & BaseSavedState.IS_AUTOFILLED) != 0) { setAutofilled(baseState.mIsAutofilled); } } } Loading Loading @@ -17629,6 +17685,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, // Fast path for layouts with no backgrounds if ((mPrivateFlags & PFLAG_SKIP_DRAW) == PFLAG_SKIP_DRAW) { dispatchDraw(canvas); drawAutofilledHighlight(canvas); if (mOverlay != null && !mOverlay.isEmpty()) { mOverlay.getOverlayView().draw(canvas); } Loading Loading @@ -17929,6 +17986,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, if ((mPrivateFlags & PFLAG_SKIP_DRAW) == PFLAG_SKIP_DRAW) { mPrivateFlags &= ~PFLAG_DIRTY_MASK; dispatchDraw(canvas); drawAutofilledHighlight(canvas); if (mOverlay != null && !mOverlay.isEmpty()) { mOverlay.getOverlayView().draw(canvas); } Loading Loading @@ -18005,6 +18063,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, // Fast path for layouts with no backgrounds if ((mPrivateFlags & PFLAG_SKIP_DRAW) == PFLAG_SKIP_DRAW) { dispatchDraw(canvas); drawAutofilledHighlight(canvas); if (mOverlay != null && !mOverlay.isEmpty()) { mOverlay.getOverlayView().draw(canvas); } Loading Loading @@ -18689,6 +18748,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, // Step 4, draw the children dispatchDraw(canvas); drawAutofilledHighlight(canvas); // Overlay is part of the content and draws beneath Foreground if (mOverlay != null && !mOverlay.isEmpty()) { mOverlay.getOverlayView().dispatchDraw(canvas); Loading Loading @@ -18845,6 +18906,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, canvas.restoreToCount(saveCount); drawAutofilledHighlight(canvas); // Overlay is part of the content and draws beneath Foreground if (mOverlay != null && !mOverlay.isEmpty()) { mOverlay.getOverlayView().dispatchDraw(canvas); Loading Loading @@ -20318,6 +20381,41 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } } /** * Get the drawable to be overlayed when a view is autofilled * * @return The drawable * * @throws IllegalStateException if the drawable could not be found. */ @NonNull private Drawable getAutofilledDrawable() { // Lazily load the isAutofilled drawable. if (mAttachInfo.mAutofilledDrawable == null) { mAttachInfo.mAutofilledDrawable = mContext.getDrawable(R.drawable.autofilled_highlight); if (mAttachInfo.mAutofilledDrawable == null) { throw new IllegalStateException( "Could not find android:drawable/autofilled_highlight"); } } return mAttachInfo.mAutofilledDrawable; } /** * Draw {@link View#isAutofilled()} highlight over view if the view is autofilled. * * @param canvas The canvas to draw on */ private void drawAutofilledHighlight(@NonNull Canvas canvas) { if (isAutofilled()) { Drawable autofilledHighlight = getAutofilledDrawable(); autofilledHighlight.setBounds(0, 0, getWidth(), getHeight()); autofilledHighlight.draw(canvas); } } /** * Draw any foreground content for this view. * Loading Loading @@ -24488,7 +24586,13 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * state in {@link android.view.View#onSaveInstanceState()}. */ public static class BaseSavedState extends AbsSavedState { static final int START_ACTIVITY_REQUESTED_WHO_SAVED = 0b1; static final int IS_AUTOFILLED = 0b10; // Flags that describe what data in this state is valid int mSavedData; String mStartActivityRequestWhoSaved; boolean mIsAutofilled; /** * Constructor used when reading from a parcel. Reads the state of the superclass. Loading @@ -24508,7 +24612,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback, */ public BaseSavedState(Parcel source, ClassLoader loader) { super(source, loader); mSavedData = source.readInt(); mStartActivityRequestWhoSaved = source.readString(); mIsAutofilled = source.readBoolean(); } /** Loading @@ -24523,7 +24629,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, @Override public void writeToParcel(Parcel out, int flags) { super.writeToParcel(out, flags); out.writeInt(mSavedData); out.writeString(mStartActivityRequestWhoSaved); out.writeBoolean(mIsAutofilled); } public static final Parcelable.Creator<BaseSavedState> CREATOR Loading Loading @@ -24923,6 +25032,13 @@ public class View implements Drawable.Callback, KeyEvent.Callback, */ Drawable mAccessibilityFocusDrawable; /** * The drawable for highlighting autofilled views. * * @see #isAutofilled() */ Drawable mAutofilledDrawable; /** * Show where the margins, bounds and layout bounds are for each view. */ Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -1610,6 +1610,7 @@ package android { field public static final int alert_light_frame = 17301505; // 0x1080001 field public static final int arrow_down_float = 17301506; // 0x1080002 field public static final int arrow_up_float = 17301507; // 0x1080003 field public static final int autofilled_highlight = 17301684; // 0x10800b4 field public static final int bottom_bar = 17301658; // 0x108009a field public static final int btn_default = 17301508; // 0x1080004 field public static final int btn_default_small = 17301509; // 0x1080005
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -1728,6 +1728,7 @@ package android { field public static final int alert_light_frame = 17301505; // 0x1080001 field public static final int arrow_down_float = 17301506; // 0x1080002 field public static final int arrow_up_float = 17301507; // 0x1080003 field public static final int autofilled_highlight = 17301684; // 0x10800b4 field public static final int bottom_bar = 17301658; // 0x108009a field public static final int btn_default = 17301508; // 0x1080004 field public static final int btn_default_small = 17301509; // 0x1080005
api/test-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -1610,6 +1610,7 @@ package android { field public static final int alert_light_frame = 17301505; // 0x1080001 field public static final int arrow_down_float = 17301506; // 0x1080002 field public static final int arrow_up_float = 17301507; // 0x1080003 field public static final int autofilled_highlight = 17301684; // 0x10800b4 field public static final int bottom_bar = 17301658; // 0x108009a field public static final int btn_default = 17301508; // 0x1080004 field public static final int btn_default_small = 17301509; // 0x1080005 Loading Loading @@ -46061,6 +46062,7 @@ package android.view { method public void setAnimation(android.view.animation.Animation); method public void setAutofillHints(java.lang.String...); method public void setAutofillMode(int); method public void setAutofilled(boolean); method public void setBackground(android.graphics.drawable.Drawable); method public void setBackgroundColor(int); method public deprecated void setBackgroundDrawable(android.graphics.drawable.Drawable);
core/java/android/app/Activity.java +11 −0 Original line number Diff line number Diff line Loading @@ -724,6 +724,7 @@ public class Activity extends ContextThemeWrapper public static final int FINISH_TASK_WITH_ACTIVITY = 2; static final String FRAGMENTS_TAG = "android:fragments"; static final String AUTOFILL_RESET_NEEDED_TAG = "android:autofillResetNeeded"; private static final String WINDOW_HIERARCHY_TAG = "android:viewHierarchyState"; private static final String SAVED_DIALOG_IDS_KEY = "android:savedDialogIds"; Loading Loading @@ -1057,6 +1058,12 @@ public class Activity extends ContextThemeWrapper * @see #onSaveInstanceState */ protected void onRestoreInstanceState(Bundle savedInstanceState) { mAutoFillResetNeeded = savedInstanceState.getBoolean(AUTOFILL_RESET_NEEDED_TAG, false); if (mAutoFillResetNeeded) { getSystemService(AutofillManager.class).onRestoreInstanceState(savedInstanceState); } if (mWindow != null) { Bundle windowState = savedInstanceState.getBundle(WINDOW_HIERARCHY_TAG); if (windowState != null) { Loading Loading @@ -1502,6 +1509,10 @@ public class Activity extends ContextThemeWrapper if (p != null) { outState.putParcelable(FRAGMENTS_TAG, p); } if (mAutoFillResetNeeded) { outState.putBoolean(AUTOFILL_RESET_NEEDED_TAG, mAutoFillResetNeeded); getSystemService(AutofillManager.class).onSaveInstanceState(outState); } getApplication().dispatchActivitySaveInstanceState(this, outState); } Loading
core/java/android/view/View.java +121 −5 Original line number Diff line number Diff line Loading @@ -2750,7 +2750,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * 1 PFLAG3_SCROLL_INDICATOR_END * 1 PFLAG3_ASSIST_BLOCKED * 1 PFLAG3_CLUSTER * x * NO LONGER NEEDED, SHOULD BE REUSED * * 1 PFLAG3_IS_AUTOFILLED * 1 PFLAG3_FINGER_DOWN * 1 PFLAG3_FOCUSED_BY_DEFAULT * 11 PFLAG3_AUTO_FILL_MODE_MASK Loading Loading @@ -2960,6 +2960,14 @@ public class View implements Drawable.Callback, KeyEvent.Callback, */ private static final int PFLAG3_CLUSTER = 0x8000; /** * Flag indicating that the view is autofilled * * @see #isAutofilled() * @see #setAutofilled(boolean) */ private static final int PFLAG3_IS_AUTOFILLED = 0x10000; /** * Indicates that the user is currently touching the screen. * Currently used for the tooltip positioning only. Loading Loading @@ -7462,10 +7470,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * <ol> * <li>Calling the proper getter method on {@link AutofillValue} to fetch the actual value. * <li>Passing the actual value to the equivalent setter in the view. * <ol> * </ol> * * <p>For example, a text-field view would call: * * <pre class="prettyprint"> * CharSequence text = value.getTextValue(); * if (text != null) { Loading @@ -7473,6 +7480,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * } * </pre> * * <p>If the value is updated asyncronously the next call to * {@link AutofillManager#notifyValueChanged(View)} must happen <u>after</u> the value was * changed to the autofilled value. If not, the view will not be considered autofilled. * * @param value value to be autofilled. */ public void autofill(@SuppressWarnings("unused") AutofillValue value) { Loading @@ -7483,6 +7494,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * * <p>See {@link #autofill(AutofillValue)} and * {@link #onProvideAutofillVirtualStructure(ViewStructure, int)} for more info. * <p>To indicate that a virtual view was autofilled * <code>@android:drawable/autofilled_highlight</code> should be drawn over it until the data * changes. * * @param values map of values to be autofilled, keyed by virtual child id. */ Loading Loading @@ -7512,6 +7526,13 @@ public class View implements Drawable.Callback, KeyEvent.Callback, return mAutofillHints; } /** * @hide */ public boolean isAutofilled() { return (mPrivateFlags3 & PFLAG3_IS_AUTOFILLED) != 0; } /** * Gets the {@link View}'s current autofill value. * Loading Loading @@ -9152,6 +9173,24 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } } /** * @hide */ @TestApi public void setAutofilled(boolean isAutofilled) { boolean wasChanged = isAutofilled != isAutofilled(); if (wasChanged) { if (isAutofilled) { mPrivateFlags3 |= PFLAG3_IS_AUTOFILLED; } else { mPrivateFlags3 &= ~PFLAG3_IS_AUTOFILLED; } invalidate(); } } /** * Set whether this view should have sound effects enabled for events such as * clicking and touching. Loading Loading @@ -17176,9 +17215,19 @@ public class View implements Drawable.Callback, KeyEvent.Callback, @CallSuper protected Parcelable onSaveInstanceState() { mPrivateFlags |= PFLAG_SAVE_STATE_CALLED; if (mStartActivityRequestWho != null) { if (mStartActivityRequestWho != null || isAutofilled()) { BaseSavedState state = new BaseSavedState(AbsSavedState.EMPTY_STATE); if (mStartActivityRequestWho != null) { state.mSavedData |= BaseSavedState.START_ACTIVITY_REQUESTED_WHO_SAVED; } if (isAutofilled()) { state.mSavedData |= BaseSavedState.IS_AUTOFILLED; } state.mStartActivityRequestWhoSaved = mStartActivityRequestWho; state.mIsAutofilled = isAutofilled(); return state; } return BaseSavedState.EMPTY_STATE; Loading Loading @@ -17248,7 +17297,14 @@ public class View implements Drawable.Callback, KeyEvent.Callback, + "other views do not use the same id."); } if (state != null && state instanceof BaseSavedState) { mStartActivityRequestWho = ((BaseSavedState) state).mStartActivityRequestWhoSaved; BaseSavedState baseState = (BaseSavedState) state; if ((baseState.mSavedData & BaseSavedState.START_ACTIVITY_REQUESTED_WHO_SAVED) != 0) { mStartActivityRequestWho = baseState.mStartActivityRequestWhoSaved; } if ((baseState.mSavedData & BaseSavedState.IS_AUTOFILLED) != 0) { setAutofilled(baseState.mIsAutofilled); } } } Loading Loading @@ -17629,6 +17685,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, // Fast path for layouts with no backgrounds if ((mPrivateFlags & PFLAG_SKIP_DRAW) == PFLAG_SKIP_DRAW) { dispatchDraw(canvas); drawAutofilledHighlight(canvas); if (mOverlay != null && !mOverlay.isEmpty()) { mOverlay.getOverlayView().draw(canvas); } Loading Loading @@ -17929,6 +17986,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, if ((mPrivateFlags & PFLAG_SKIP_DRAW) == PFLAG_SKIP_DRAW) { mPrivateFlags &= ~PFLAG_DIRTY_MASK; dispatchDraw(canvas); drawAutofilledHighlight(canvas); if (mOverlay != null && !mOverlay.isEmpty()) { mOverlay.getOverlayView().draw(canvas); } Loading Loading @@ -18005,6 +18063,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, // Fast path for layouts with no backgrounds if ((mPrivateFlags & PFLAG_SKIP_DRAW) == PFLAG_SKIP_DRAW) { dispatchDraw(canvas); drawAutofilledHighlight(canvas); if (mOverlay != null && !mOverlay.isEmpty()) { mOverlay.getOverlayView().draw(canvas); } Loading Loading @@ -18689,6 +18748,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, // Step 4, draw the children dispatchDraw(canvas); drawAutofilledHighlight(canvas); // Overlay is part of the content and draws beneath Foreground if (mOverlay != null && !mOverlay.isEmpty()) { mOverlay.getOverlayView().dispatchDraw(canvas); Loading Loading @@ -18845,6 +18906,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, canvas.restoreToCount(saveCount); drawAutofilledHighlight(canvas); // Overlay is part of the content and draws beneath Foreground if (mOverlay != null && !mOverlay.isEmpty()) { mOverlay.getOverlayView().dispatchDraw(canvas); Loading Loading @@ -20318,6 +20381,41 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } } /** * Get the drawable to be overlayed when a view is autofilled * * @return The drawable * * @throws IllegalStateException if the drawable could not be found. */ @NonNull private Drawable getAutofilledDrawable() { // Lazily load the isAutofilled drawable. if (mAttachInfo.mAutofilledDrawable == null) { mAttachInfo.mAutofilledDrawable = mContext.getDrawable(R.drawable.autofilled_highlight); if (mAttachInfo.mAutofilledDrawable == null) { throw new IllegalStateException( "Could not find android:drawable/autofilled_highlight"); } } return mAttachInfo.mAutofilledDrawable; } /** * Draw {@link View#isAutofilled()} highlight over view if the view is autofilled. * * @param canvas The canvas to draw on */ private void drawAutofilledHighlight(@NonNull Canvas canvas) { if (isAutofilled()) { Drawable autofilledHighlight = getAutofilledDrawable(); autofilledHighlight.setBounds(0, 0, getWidth(), getHeight()); autofilledHighlight.draw(canvas); } } /** * Draw any foreground content for this view. * Loading Loading @@ -24488,7 +24586,13 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * state in {@link android.view.View#onSaveInstanceState()}. */ public static class BaseSavedState extends AbsSavedState { static final int START_ACTIVITY_REQUESTED_WHO_SAVED = 0b1; static final int IS_AUTOFILLED = 0b10; // Flags that describe what data in this state is valid int mSavedData; String mStartActivityRequestWhoSaved; boolean mIsAutofilled; /** * Constructor used when reading from a parcel. Reads the state of the superclass. Loading @@ -24508,7 +24612,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback, */ public BaseSavedState(Parcel source, ClassLoader loader) { super(source, loader); mSavedData = source.readInt(); mStartActivityRequestWhoSaved = source.readString(); mIsAutofilled = source.readBoolean(); } /** Loading @@ -24523,7 +24629,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, @Override public void writeToParcel(Parcel out, int flags) { super.writeToParcel(out, flags); out.writeInt(mSavedData); out.writeString(mStartActivityRequestWhoSaved); out.writeBoolean(mIsAutofilled); } public static final Parcelable.Creator<BaseSavedState> CREATOR Loading Loading @@ -24923,6 +25032,13 @@ public class View implements Drawable.Callback, KeyEvent.Callback, */ Drawable mAccessibilityFocusDrawable; /** * The drawable for highlighting autofilled views. * * @see #isAutofilled() */ Drawable mAutofilledDrawable; /** * Show where the margins, bounds and layout bounds are for each view. */