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

Commit f8d2e3de authored by John Reck's avatar John Reck Committed by android-build-merger
Browse files

Merge "Fix NPE if app context is null" into pi-dev am: a08a8569

am: a25a677a

Change-Id: I79c6ee44487bb7bdae4ed3f4afcde21b5ac3f9a2
parents 57fd9e5b a25a677a
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -1068,12 +1068,16 @@ public final class ThreadedRenderer {
            mInitialized = true;
            mAppContext = context.getApplicationContext();

            nSetDebuggingEnabled(
                    (mAppContext.getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0
                    || Build.IS_DEBUGGABLE);
            initSched(renderProxy);

            if (mAppContext != null) {
                final boolean appDebuggable =
                        (mAppContext.getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE)
                        != 0;
                nSetDebuggingEnabled(appDebuggable || Build.IS_DEBUGGABLE);
                initGraphicsStats();
            }
        }

        private void initSched(long renderProxy) {
            try {