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

59 lines
2.6 KiB
Diff
Raw Normal View History

From 1de0dbda5227a5f6be82df0575db75f354de486b Mon Sep 17 00:00:00 2001
2017-05-30 14:31:08 -04:00
From: Tad <tad@spotco.us>
Date: Wed, 12 Jul 2017 05:18:42 -0400
2017-05-30 14:31:08 -04:00
Subject: [PATCH] Switch to our update server
Change-Id: Ia0faf61ab2dd3b300ac65841f1ce7e15d403552c
2017-05-30 14:31:08 -04:00
---
.../updater/requests/UpdatesJsonObjectRequest.java | 3 ++-
src/com/cyanogenmod/updater/service/UpdateCheckService.java | 12 ++----------
2 files changed, 4 insertions(+), 11 deletions(-)
2017-05-30 14:31:08 -04:00
diff --git a/src/com/cyanogenmod/updater/requests/UpdatesJsonObjectRequest.java b/src/com/cyanogenmod/updater/requests/UpdatesJsonObjectRequest.java
2017-06-18 10:20:47 -04:00
index 13d22b7..af9980b 100644
2017-05-30 14:31:08 -04:00
--- a/src/com/cyanogenmod/updater/requests/UpdatesJsonObjectRequest.java
+++ b/src/com/cyanogenmod/updater/requests/UpdatesJsonObjectRequest.java
2017-06-18 10:20:47 -04:00
@@ -11,6 +11,7 @@ package com.cyanogenmod.updater.requests;
2017-05-30 14:31:08 -04:00
import com.android.volley.AuthFailureError;
import com.android.volley.Response;
2017-06-18 10:20:47 -04:00
+import com.android.volley.Request;
2017-05-30 14:31:08 -04:00
import com.android.volley.toolbox.JsonObjectRequest;
import org.json.JSONObject;
2017-06-18 10:20:47 -04:00
2017-05-30 14:31:08 -04:00
@@ -23,7 +24,7 @@ public class UpdatesJsonObjectRequest extends JsonObjectRequest {
public UpdatesJsonObjectRequest(String url, String userAgent, JSONObject jsonRequest,
Response.Listener<JSONObject> listener, Response.ErrorListener errorListener) {
- super(url, jsonRequest, listener, errorListener);
+ super(Request.Method.GET, url, jsonRequest, listener, errorListener);
mUserAgent = userAgent;
}
diff --git a/src/com/cyanogenmod/updater/service/UpdateCheckService.java b/src/com/cyanogenmod/updater/service/UpdateCheckService.java
index 9fc81d6..18a3bf0 100644
2017-05-30 14:31:08 -04:00
--- a/src/com/cyanogenmod/updater/service/UpdateCheckService.java
+++ b/src/com/cyanogenmod/updater/service/UpdateCheckService.java
@@ -200,16 +200,8 @@ public class UpdateCheckService extends IntentService
2017-05-30 14:31:08 -04:00
}
private URI getServerURI() {
- String updateUri = SystemProperties.get("cm.updater.uri");
- if (TextUtils.isEmpty(updateUri)) {
- updateUri = getString(R.string.conf_update_server_url_def);
- }
-
- String incrementalVersion = SystemProperties.get("ro.build.version.incremental");
2017-06-18 10:20:47 -04:00
- updateUri += "/v1/" + Utils.getDeviceType() + "/" +
- Utils.getInstalledBuildType() + "/" + incrementalVersion;
2017-05-30 14:31:08 -04:00
-
- return URI.create(updateUri);
+ String incrementalVersion = SystemProperties.get("ro.build.version.incremental");
+ return URI.create("https://divestos.xyz/updater.php?device=" + Utils.getDeviceType() + "&inc=" + incrementalVersion);
2017-05-30 14:31:08 -04:00
}
private void getAvailableUpdates() {
--
2.13.2
2017-05-30 14:31:08 -04:00