DivestOS/Patches/LineageOS-16.0/android_packages_apps_Updater/0001-Server.patch

34 lines
1.5 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2017-08-26 19:11:54 +00:00
From: Tad <tad@spotco.us>
2018-09-20 21:41:19 +00:00
Date: Thu, 20 Sep 2018 16:43:46 -0400
2017-08-26 19:11:54 +00:00
Subject: [PATCH] Switch to our update server
2018-09-20 21:41:19 +00:00
Change-Id: I26dc2942736cf0cfe4e7b92ddfdd04b9d74dbae5
2017-08-26 19:11:54 +00:00
---
2018-09-20 21:41:19 +00:00
src/org/lineageos/updater/misc/Utils.java | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
2017-08-26 19:11:54 +00:00
diff --git a/src/org/lineageos/updater/misc/Utils.java b/src/org/lineageos/updater/misc/Utils.java
index eed4d56..f7f62e4 100644
2017-08-26 19:11:54 +00:00
--- a/src/org/lineageos/updater/misc/Utils.java
+++ b/src/org/lineageos/updater/misc/Utils.java
@@ -154,16 +154,10 @@ public class Utils {
2017-08-26 19:11:54 +00:00
String incrementalVersion = SystemProperties.get(Constants.PROP_BUILD_VERSION_INCREMENTAL);
2017-10-16 18:25:36 +00:00
String device = SystemProperties.get(Constants.PROP_NEXT_DEVICE,
SystemProperties.get(Constants.PROP_DEVICE));
2017-08-26 19:11:54 +00:00
- String type = SystemProperties.get(Constants.PROP_RELEASE_TYPE).toLowerCase(Locale.ROOT);
2018-04-07 01:50:20 +00:00
- String serverUrl = SystemProperties.get(Constants.PROP_UPDATER_URI);
- if (serverUrl.trim().isEmpty()) {
- serverUrl = context.getString(R.string.updater_server_url);
- }
2018-09-20 21:41:19 +00:00
+ String server = "0OTA_SERVER_CLEARNET0";
2018-04-07 01:50:20 +00:00
- return serverUrl.replace("{device}", device)
- .replace("{type}", type)
- .replace("{incr}", incrementalVersion);
2018-09-20 21:41:19 +00:00
+ return server + "?base=LineageOS&device=" + device + "&inc=" + incrementalVersion;
2017-08-26 19:11:54 +00:00
}
public static String getUpgradeBlockedURL(Context context) {