diff --git a/src/org/lineageos/updater/misc/Utils.java b/src/org/lineageos/updater/misc/Utils.java index 7758b8ab2ecfbb0e426ea2bdb4d415a8712125a7..903714a4064d471ba3987316462ff3d12bb9d0f9 100644 --- a/src/org/lineageos/updater/misc/Utils.java +++ b/src/org/lineageos/updater/misc/Utils.java @@ -218,7 +218,7 @@ public class Utils { String serverUrl = ""; if (retrieveStatus(context) != null) { - if (retrieveStatus(context).equals("true")) { + if (retrieveStatus(context).equals("true") && isDevModeOn(context)) { serverUrl = context.getString(R.string.ota_staging_server_url); return serverUrl.replace("{device}", device) .replace("{type}", type) @@ -477,9 +477,8 @@ public class Utils { } public static boolean isDevModeOn(Context context) { - int devOptions = Settings.Secure.getInt(context.getContentResolver(), - Settings.Global.DEVELOPMENT_SETTINGS_ENABLED , 0); - return devOptions == 1; + return Settings.Secure.getInt(context.getContentResolver(), + Settings.Global.DEVELOPMENT_SETTINGS_ENABLED , 0) == 1; } public static boolean hasTouchscreen(Context context) {