public final class Resources.Theme {
method public void applyStyle(int, boolean);
method public void dump(int, String, String);
- method public int[] getAttributeResolutionStack(@AttrRes int, @StyleRes int, @StyleRes int);
+ method @NonNull public int[] getAttributeResolutionStack(@AttrRes int, @StyleRes int, @StyleRes int);
method public int getChangingConfigurations();
method public android.graphics.drawable.Drawable getDrawable(@DrawableRes int) throws android.content.res.Resources.NotFoundException;
method @StyleRes public int getExplicitStyle(@Nullable android.util.AttributeSet);
* @param explicitStyleRes A resource identifier of an explicit style resource.
* @return ordered list of resource ID that are considered when resolving attribute values.
*/
+ @NonNull
public int[] getAttributeResolutionStack(@AttrRes int defStyleAttr,
@StyleRes int defStyleRes, @StyleRes int explicitStyleRes) {
- return mThemeImpl.getAttributeResolutionStack(
+ int[] stack = mThemeImpl.getAttributeResolutionStack(
defStyleAttr, defStyleRes, explicitStyleRes);
+ if (stack == null) {
+ return new int[0];
+ } else {
+ return stack;
+ }
}
}
* @param explicitStyleRes A resource identifier of an explicit style resource.
* @return ordered list of resource ID that are considered when resolving attribute values.
*/
+ @Nullable
public int[] getAttributeResolutionStack(@AttrRes int defStyleAttr,
@StyleRes int defStyleRes, @StyleRes int explicitStyleRes) {
synchronized (mKey) {