Loading api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -50805,7 +50805,7 @@ package android.view { method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getAlpha(); method public android.view.animation.Animation getAnimation(); method public android.os.IBinder getApplicationWindowToken(); method @NonNull public java.util.List<java.lang.Integer> getAttributeResolutionStack(); method @NonNull public java.util.List<java.lang.Integer> getAttributeResolutionStack(@AttrRes int); method @NonNull public java.util.Map<java.lang.Integer,java.lang.Integer> getAttributeSourceResourceMap(); method @android.view.ViewDebug.ExportedProperty @Nullable public String[] getAutofillHints(); method public final android.view.autofill.AutofillId getAutofillId(); core/java/android/view/View.java +16 −5 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import static java.lang.Math.max; import android.animation.AnimatorInflater; import android.animation.StateListAnimator; import android.annotation.AttrRes; import android.annotation.CallSuper; import android.annotation.ColorInt; import android.annotation.DrawableRes; Loading Loading @@ -5108,7 +5109,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, private SparseIntArray mAttributeSourceResId; @Nullable private int[] mAttributeResolutionStack; private SparseArray<int[]> mAttributeResolutionStacks; @StyleRes private int mExplicitStyle; Loading Loading @@ -5963,11 +5964,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * <b>Note:</b> this method will only return actual values if the view attribute debugging * is enabled in Android developer options. * * @param attribute Attribute resource ID for which the resolution stack should be returned. * @return ordered list of resource ID that are considered when resolving attribute values for * this {@link View}. */ @NonNull public List<Integer> getAttributeResolutionStack() { public List<Integer> getAttributeResolutionStack(@AttrRes int attribute) { ArrayList<Integer> stack = new ArrayList<>(); if (!sDebugViewAttributes) { return stack; Loading @@ -5975,8 +5977,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback, if (mSourceLayoutId != ID_NULL) { stack.add(mSourceLayoutId); } for (int i = 0; i < mAttributeResolutionStack.length; i++) { stack.add(mAttributeResolutionStack[i]); int[] attributeResolutionStack = mAttributeResolutionStacks.get(attribute); if (attributeResolutionStack == null) { return stack; } for (int i = 0; i < attributeResolutionStack.length; i++) { stack.add(attributeResolutionStack[i]); } return stack; } Loading Loading @@ -6143,9 +6149,13 @@ public class View implements Drawable.Callback, KeyEvent.Callback, return; } mAttributeResolutionStack = context.getTheme().getAttributeResolutionStack( int[] attributeResolutionStack = context.getTheme().getAttributeResolutionStack( defStyleAttr, defStyleRes, mExplicitStyle); if (mAttributeResolutionStacks == null) { mAttributeResolutionStacks = new SparseArray<>(); } if (mAttributeSourceResId == null) { mAttributeSourceResId = new SparseIntArray(); } Loading @@ -6154,6 +6164,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, for (int j = 0; j < indexCount; ++j) { final int index = t.getIndex(j); mAttributeSourceResId.append(styleable[index], t.getSourceResourceId(index, 0)); mAttributeResolutionStacks.append(styleable[index], attributeResolutionStack); } } Loading
api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -50805,7 +50805,7 @@ package android.view { method @android.view.ViewDebug.ExportedProperty(category="drawing") public float getAlpha(); method public android.view.animation.Animation getAnimation(); method public android.os.IBinder getApplicationWindowToken(); method @NonNull public java.util.List<java.lang.Integer> getAttributeResolutionStack(); method @NonNull public java.util.List<java.lang.Integer> getAttributeResolutionStack(@AttrRes int); method @NonNull public java.util.Map<java.lang.Integer,java.lang.Integer> getAttributeSourceResourceMap(); method @android.view.ViewDebug.ExportedProperty @Nullable public String[] getAutofillHints(); method public final android.view.autofill.AutofillId getAutofillId();
core/java/android/view/View.java +16 −5 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import static java.lang.Math.max; import android.animation.AnimatorInflater; import android.animation.StateListAnimator; import android.annotation.AttrRes; import android.annotation.CallSuper; import android.annotation.ColorInt; import android.annotation.DrawableRes; Loading Loading @@ -5108,7 +5109,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, private SparseIntArray mAttributeSourceResId; @Nullable private int[] mAttributeResolutionStack; private SparseArray<int[]> mAttributeResolutionStacks; @StyleRes private int mExplicitStyle; Loading Loading @@ -5963,11 +5964,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * <b>Note:</b> this method will only return actual values if the view attribute debugging * is enabled in Android developer options. * * @param attribute Attribute resource ID for which the resolution stack should be returned. * @return ordered list of resource ID that are considered when resolving attribute values for * this {@link View}. */ @NonNull public List<Integer> getAttributeResolutionStack() { public List<Integer> getAttributeResolutionStack(@AttrRes int attribute) { ArrayList<Integer> stack = new ArrayList<>(); if (!sDebugViewAttributes) { return stack; Loading @@ -5975,8 +5977,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback, if (mSourceLayoutId != ID_NULL) { stack.add(mSourceLayoutId); } for (int i = 0; i < mAttributeResolutionStack.length; i++) { stack.add(mAttributeResolutionStack[i]); int[] attributeResolutionStack = mAttributeResolutionStacks.get(attribute); if (attributeResolutionStack == null) { return stack; } for (int i = 0; i < attributeResolutionStack.length; i++) { stack.add(attributeResolutionStack[i]); } return stack; } Loading Loading @@ -6143,9 +6149,13 @@ public class View implements Drawable.Callback, KeyEvent.Callback, return; } mAttributeResolutionStack = context.getTheme().getAttributeResolutionStack( int[] attributeResolutionStack = context.getTheme().getAttributeResolutionStack( defStyleAttr, defStyleRes, mExplicitStyle); if (mAttributeResolutionStacks == null) { mAttributeResolutionStacks = new SparseArray<>(); } if (mAttributeSourceResId == null) { mAttributeSourceResId = new SparseIntArray(); } Loading @@ -6154,6 +6164,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, for (int j = 0; j < indexCount; ++j) { final int index = t.getIndex(j); mAttributeSourceResId.append(styleable[index], t.getSourceResourceId(index, 0)); mAttributeResolutionStacks.append(styleable[index], attributeResolutionStack); } }