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

Commit 35c060ef authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Updater: Simplify the update url checks

parent ac6c1f5d
Loading
Loading
Loading
Loading
+4 −12
Original line number Diff line number Diff line
@@ -223,18 +223,10 @@ public class Utils {
        String eLicenseID = Settings.Secure.getString(context.getContentResolver(),
                Settings.Secure.E_LICENSE_ID);

        String serverUrl = "";
        if (retrieveStatus(context) != null) {
            if (retrieveStatus(context).equals("true") && isDevModeOn(context)) {
        String serverUrl = SystemProperties.get(Constants.PROP_UPDATER_URI);
        if (retrieveStatus(context) != null && retrieveStatus(context).equals("true")
                && isDevModeOn(context)) {
            serverUrl = context.getString(R.string.ota_staging_server_url);
                return serverUrl.replace("{device}", device)
                        .replace("{type}", type)
                        .replace("{incr}", incrementalVersion);
            } else {
                serverUrl = SystemProperties.get(Constants.PROP_UPDATER_URI);
            }
        } else {
            serverUrl = SystemProperties.get(Constants.PROP_UPDATER_URI);
        }

        if (serverUrl.trim().isEmpty()) {