mirror of
https://github.com/material-components/material-components-android.git
synced 2026-02-20 08:39:55 +08:00
Remove unnecessary null check
If that variable is null, it would crash in the previous line Bug: 34129526 Test: run a few design lib tests Change-Id: Ic403d4ccf79899f4d2978856fbb02ffc65de0f3f PiperOrigin-RevId: 150132347
This commit is contained in:
parent
3bd7fdf7c1
commit
5d84aba7fc
@ -28,9 +28,8 @@ class ThemeUtils {
|
||||
static void checkAppCompatTheme(Context context) {
|
||||
TypedArray a = context.obtainStyledAttributes(APPCOMPAT_CHECK_ATTRS);
|
||||
final boolean failed = !a.hasValue(0);
|
||||
if (a != null) {
|
||||
a.recycle();
|
||||
}
|
||||
a.recycle();
|
||||
|
||||
if (failed) {
|
||||
throw new IllegalArgumentException(
|
||||
"You need to use a Theme.AppCompat theme " + "(or descendant) with the design library.");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user