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

Commit 7657c723 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Updater: Check dev options toggle for test channel

Change-Id: Ifecac146e3f637fa589241e513a269f3306764ed
parent 6749a03d
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import android.os.Environment;
import android.os.StatFs;
import android.os.SystemProperties;
import android.os.storage.StorageManager;
import android.provider.Settings;
import android.util.Log;
import android.widget.Toast;

@@ -210,7 +211,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)
@@ -442,6 +443,11 @@ public class Utils {
        return isAB;
    }

    public static boolean isDevModeOn(Context context) {
        return Settings.Secure.getInt(context.getContentResolver(),
                Settings.Global.DEVELOPMENT_SETTINGS_ENABLED , 0) == 1;
    }

    public static boolean hasTouchscreen(Context context) {
        return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN);
    }