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:
Kirill Grouchnikov 2017-03-14 23:49:01 +00:00 committed by Travis Collins
parent 3bd7fdf7c1
commit 5d84aba7fc

View File

@ -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.");