mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-10-01 01:35:54 -04:00
59 lines
2.6 KiB
Diff
59 lines
2.6 KiB
Diff
From 1de0dbda5227a5f6be82df0575db75f354de486b Mon Sep 17 00:00:00 2001
|
|
From: Tad <tad@spotco.us>
|
|
Date: Wed, 12 Jul 2017 05:18:42 -0400
|
|
Subject: [PATCH] Switch to our update server
|
|
|
|
Change-Id: Ia0faf61ab2dd3b300ac65841f1ce7e15d403552c
|
|
---
|
|
.../updater/requests/UpdatesJsonObjectRequest.java | 3 ++-
|
|
src/com/cyanogenmod/updater/service/UpdateCheckService.java | 12 ++----------
|
|
2 files changed, 4 insertions(+), 11 deletions(-)
|
|
|
|
diff --git a/src/com/cyanogenmod/updater/requests/UpdatesJsonObjectRequest.java b/src/com/cyanogenmod/updater/requests/UpdatesJsonObjectRequest.java
|
|
index 13d22b7..af9980b 100644
|
|
--- a/src/com/cyanogenmod/updater/requests/UpdatesJsonObjectRequest.java
|
|
+++ b/src/com/cyanogenmod/updater/requests/UpdatesJsonObjectRequest.java
|
|
@@ -11,6 +11,7 @@ package com.cyanogenmod.updater.requests;
|
|
|
|
import com.android.volley.AuthFailureError;
|
|
import com.android.volley.Response;
|
|
+import com.android.volley.Request;
|
|
import com.android.volley.toolbox.JsonObjectRequest;
|
|
import org.json.JSONObject;
|
|
|
|
@@ -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
|
|
--- 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
|
|
}
|
|
|
|
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");
|
|
- updateUri += "/v1/" + Utils.getDeviceType() + "/" +
|
|
- Utils.getInstalledBuildType() + "/" + incrementalVersion;
|
|
-
|
|
- 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);
|
|
}
|
|
|
|
private void getAvailableUpdates() {
|
|
--
|
|
2.13.2
|
|
|