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

Commit 22a1c5fb authored by Tim Van Patten's avatar Tim Van Patten Committed by android-build-merger
Browse files

Merge "Verify Bundle is not null before using it" into qt-dev

am: 5012f5bd

Change-Id: I9349c9d4689cd61a89e877374551b6965650ded9
parents 23f2e292 5012f5bd
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -453,14 +453,22 @@ public class GraphicsEnvironment {
        final boolean appIsProfileable = isProfileable(context);
        final boolean deviceIsDebuggable = getCanLoadSystemLibraries() == 1;
        if (appIsDebuggable || appIsProfileable || deviceIsDebuggable) {
            String debugPackage;

            String debugPackage =
            if (coreSettings != null) {
                debugPackage =
                        coreSettings.getString(Settings.Global.GLOBAL_SETTINGS_ANGLE_DEBUG_PACKAGE);
            } else {
                ContentResolver contentResolver = context.getContentResolver();
                debugPackage = Settings.Global.getString(contentResolver,
                        Settings.Global.GLOBAL_SETTINGS_ANGLE_DEBUG_PACKAGE);
            }

            if ((debugPackage != null) && (!debugPackage.isEmpty())) {
                return debugPackage;
            }
        }

        return "";
    }