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

34 lines
1.4 KiB
Diff
Raw Normal View History

2017-08-26 19:11:54 +00:00
From 91f6cf3814a5d7e90068683f5526a8a6abc1b7fd Mon Sep 17 00:00:00 2001
From: Tad <tad@spotco.us>
Date: Sat, 26 Aug 2017 16:06:23 -0400
Subject: [PATCH] Switch to our update server
Change-Id: I81967fd97e7c151100b93327501caf8d436a08e5
---
src/org/lineageos/updater/misc/Utils.java | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/src/org/lineageos/updater/misc/Utils.java b/src/org/lineageos/updater/misc/Utils.java
index f15be50..8e4fcb1 100644
--- a/src/org/lineageos/updater/misc/Utils.java
+++ b/src/org/lineageos/updater/misc/Utils.java
@@ -144,14 +144,9 @@ public class Utils {
}
public static String getServerURL(Context context) {
- String serverUrl = SystemProperties.get(Constants.PROP_UPDATER_URI);
- if (serverUrl.trim().isEmpty()) {
- serverUrl = context.getString(R.string.conf_update_server_url_def);
- }
String incrementalVersion = SystemProperties.get(Constants.PROP_BUILD_VERSION_INCREMENTAL);
String device = SystemProperties.get(Constants.PROP_DEVICE);
- String type = SystemProperties.get(Constants.PROP_RELEASE_TYPE).toLowerCase(Locale.ROOT);
- return serverUrl + "/v1/" + device + "/" + type + "/" + incrementalVersion;
+ return "https://divestos.xyz/updater.php?device=" + device + "&inc=" + incrementalVersion;
}
public static void triggerUpdate(Context context, String downloadId) {
--
2.14.1