Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aca96020 authored by Winson Chung's avatar Winson Chung
Browse files

Fixing NPE in accessing theme attribute.

Change-Id: I5d21645b5530f13e1709021bd818de6bdb1d6544
parent 918c0723
Loading
Loading
Loading
Loading
+10 −7
Original line number Diff line number Diff line
@@ -3499,7 +3499,9 @@ public class Activity extends ContextThemeWrapper
        }

        // Get the primary color and update the RecentsActivityValues for this activity
        TypedArray a = getTheme().obtainStyledAttributes(com.android.internal.R.styleable.Theme);
        Resources.Theme tmpTheme = getTheme();
        if (tmpTheme != null) {
            TypedArray a = tmpTheme.obtainStyledAttributes(com.android.internal.R.styleable.Theme);
            int colorPrimary = a.getColor(com.android.internal.R.styleable.Theme_colorPrimary, 0);
            a.recycle();
            if (colorPrimary != 0) {
@@ -3508,6 +3510,7 @@ public class Activity extends ContextThemeWrapper
                setRecentsActivityValues(v);
            }
        }
    }

    /**
     * Same as calling {@link #startActivityForResult(Intent, int, Bundle)}