Loading src/org/lineageos/updater/UpdatesCheckReceiver.java +7 −4 Original line number Diff line number Diff line Loading @@ -53,12 +53,15 @@ public class UpdatesCheckReceiver extends BroadcastReceiver { @Override public void onReceive(final Context context, Intent intent) { if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) { // Check if the current value is empty or null and set license id. // Check if the current value is empty or null and set anon hash. String eLicenseID = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.E_LICENSE_ID); if (eLicenseID == null || eLicenseID.isEmpty()) { "e_license_id"); String anonHash = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.OTA_ANON_HASH); if (anonHash == null || anonHash.isEmpty()) { Settings.Secure.putString(context.getContentResolver(), Settings.Secure.E_LICENSE_ID, Utils.generateRandomID()); Settings.Secure.OTA_ANON_HASH, (eLicenseID != null && !eLicenseID.isEmpty()) ? eLicenseID : Utils.generateRandomID()); } Utils.cleanupDownloadsDir(context); Loading src/org/lineageos/updater/misc/Utils.java +4 −4 Original line number Diff line number Diff line Loading @@ -220,8 +220,8 @@ public class Utils { String device = SystemProperties.get(Constants.PROP_NEXT_DEVICE, SystemProperties.get(Constants.PROP_DEVICE)); String type = SystemProperties.get(Constants.PROP_RELEASE_TYPE).toLowerCase(Locale.ROOT); String eLicenseID = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.E_LICENSE_ID); String anonHash = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.OTA_ANON_HASH); String serverUrl = SystemProperties.get(Constants.PROP_UPDATER_URI); if (retrieveStatus(context) != null && retrieveStatus(context).equals("true") Loading @@ -233,8 +233,8 @@ public class Utils { serverUrl = context.getString(R.string.updater_server_url); } if (eLicenseID != null && !eLicenseID.isEmpty()) { serverUrl += "?license_id=" + eLicenseID; if (anonHash != null && !anonHash.isEmpty()) { serverUrl += "?ota_anon_hash=" + anonHash; } return serverUrl.replace("{device}", device) Loading Loading
src/org/lineageos/updater/UpdatesCheckReceiver.java +7 −4 Original line number Diff line number Diff line Loading @@ -53,12 +53,15 @@ public class UpdatesCheckReceiver extends BroadcastReceiver { @Override public void onReceive(final Context context, Intent intent) { if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) { // Check if the current value is empty or null and set license id. // Check if the current value is empty or null and set anon hash. String eLicenseID = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.E_LICENSE_ID); if (eLicenseID == null || eLicenseID.isEmpty()) { "e_license_id"); String anonHash = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.OTA_ANON_HASH); if (anonHash == null || anonHash.isEmpty()) { Settings.Secure.putString(context.getContentResolver(), Settings.Secure.E_LICENSE_ID, Utils.generateRandomID()); Settings.Secure.OTA_ANON_HASH, (eLicenseID != null && !eLicenseID.isEmpty()) ? eLicenseID : Utils.generateRandomID()); } Utils.cleanupDownloadsDir(context); Loading
src/org/lineageos/updater/misc/Utils.java +4 −4 Original line number Diff line number Diff line Loading @@ -220,8 +220,8 @@ public class Utils { String device = SystemProperties.get(Constants.PROP_NEXT_DEVICE, SystemProperties.get(Constants.PROP_DEVICE)); String type = SystemProperties.get(Constants.PROP_RELEASE_TYPE).toLowerCase(Locale.ROOT); String eLicenseID = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.E_LICENSE_ID); String anonHash = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.OTA_ANON_HASH); String serverUrl = SystemProperties.get(Constants.PROP_UPDATER_URI); if (retrieveStatus(context) != null && retrieveStatus(context).equals("true") Loading @@ -233,8 +233,8 @@ public class Utils { serverUrl = context.getString(R.string.updater_server_url); } if (eLicenseID != null && !eLicenseID.isEmpty()) { serverUrl += "?license_id=" + eLicenseID; if (anonHash != null && !anonHash.isEmpty()) { serverUrl += "?ota_anon_hash=" + anonHash; } return serverUrl.replace("{device}", device) Loading