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

58 lines
2.5 KiB
Diff
Raw Normal View History

2017-06-18 10:20:47 -04:00
From c4f32c685eb310b57285e26136c999be9cd2b770 Mon Sep 17 00:00:00 2001
2017-05-30 14:31:08 -04:00
From: Tad <tad@spotco.us>
2017-06-18 10:20:47 -04:00
Date: Sun, 18 Jun 2017 10:20:13 -0400
2017-05-30 14:31:08 -04:00
Subject: [PATCH] Switch to our update server
2017-06-18 10:20:47 -04:00
Change-Id: I53fc23e0e51ae03e449cd174591e1d3533bbdd74
2017-05-30 14:31:08 -04:00
---
2017-06-18 10:20:47 -04:00
.../updater/requests/UpdatesJsonObjectRequest.java | 3 ++-
src/com/cyanogenmod/updater/service/UpdateCheckService.java | 11 +----------
2 files changed, 3 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
2017-06-18 10:20:47 -04:00
index 9fc81d6..f76910a 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
2017-06-18 10:20:47 -04:00
@@ -200,16 +200,7 @@ 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);
2017-06-04 12:48:26 -04:00
+ return URI.create("https://divestos.xyz/updater.php?device=" + Utils.getDeviceType());
2017-05-30 14:31:08 -04:00
}
private void getAvailableUpdates() {
--
2017-06-18 10:20:47 -04:00
2.13.1
2017-05-30 14:31:08 -04:00