This commit is contained in:
Tad 2017-05-30 14:31:08 -04:00
parent 60f1dbc8eb
commit cb93855a57
3 changed files with 113 additions and 5 deletions

View File

@ -22,7 +22,6 @@
<remove-project name="LineageOS/android_hardware_intel_img_psb_video" />
<remove-project name="LineageOS/android_hardware_ti_omap4xxx" />
<remove-project name="LineageOS/android_packages_apps_CMBugreport" />
<remove-project name="LineageOS/android_packages_apps_CMUpdater" />
<remove-project name="LineageOS/android_packages_apps_LockClock" />
<remove-project name="LineageOS/android_packages_apps_ManagedProvisioning" />
<remove-project name="LineageOS/android_packages_apps_OpenWeatherMapProvider" />
@ -71,10 +70,10 @@
<!-- END OF UNNECESSARY REPO REMOVAL -->
<!-- START OF CUSTOM REPOS
<remote name="dsc" fetch="https://gogs.spotco.us:3000/DeblobbedAndroid/" />
<remote name="dsc" fetch="ssh://gitea@gogs.spotco.us:2222/DeblobbedAndroid/" />
<remove-project name="LineageOS/android_external_chromium-webview" />
<project path="external/chromium-webview" name="android_packages_apps_chromium-webview.git" remote="dsc" revision="cm-14.1" />
<project path="external/chromium" name="android_packages_apps_Chromium.git" remote="dsc" revision="master" />-->
<project path="external/chromium" name="android_packages_apps_Chromium.git" remote="dsc" revision="master" /> -->
<!-- END OF CUSTOM REPOS -->
<!-- START OF ADDITIONAL REPOS -->

View File

@ -0,0 +1,106 @@
From 0318e9e28c1534fe93404fa2cf4f40790e088e13 Mon Sep 17 00:00:00 2001
From: Tad <tad@spotco.us>
Date: Tue, 30 May 2017 14:30:19 -0400
Subject: [PATCH] Switch to our update server
Change-Id: I542009b3301c7344342164d62026ff1dbc61792b
---
.../updater/requests/UpdatesJsonObjectRequest.java | 3 ++-
.../updater/service/UpdateCheckService.java | 27 ++--------------------
src/com/cyanogenmod/updater/utils/Utils.java | 17 +-------------
3 files changed, 5 insertions(+), 42 deletions(-)
diff --git a/src/com/cyanogenmod/updater/requests/UpdatesJsonObjectRequest.java b/src/com/cyanogenmod/updater/requests/UpdatesJsonObjectRequest.java
index 13d22b7..10975df 100644
--- a/src/com/cyanogenmod/updater/requests/UpdatesJsonObjectRequest.java
+++ b/src/com/cyanogenmod/updater/requests/UpdatesJsonObjectRequest.java
@@ -10,6 +10,7 @@
package com.cyanogenmod.updater.requests;
import com.android.volley.AuthFailureError;
+import com.android.volley.Request;
import com.android.volley.Response;
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 319f68b..52d52a9 100644
--- a/src/com/cyanogenmod/updater/service/UpdateCheckService.java
+++ b/src/com/cyanogenmod/updater/service/UpdateCheckService.java
@@ -200,35 +200,12 @@ public class UpdateCheckService extends IntentService
}
private String getRomType() {
- String type;
- switch (Utils.getUpdateType()) {
- case Constants.UPDATE_TYPE_SNAPSHOT:
- type = Constants.CM_RELEASETYPE_SNAPSHOT;
- break;
- case Constants.UPDATE_TYPE_NIGHTLY:
- type = Constants.CM_RELEASETYPE_NIGHTLY;
- break;
- case Constants.UPDATE_TYPE_EXPERIMENTAL:
- type = Constants.CM_RELEASETYPE_EXPERIMENTAL;
- break;
- case Constants.UPDATE_TYPE_UNOFFICIAL:
- default:
- type = Constants.CM_RELEASETYPE_UNOFFICIAL;
- break;
- }
+ String type = Constants.CM_RELEASETYPE_NIGHTLY;
return type.toLowerCase();
}
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() + "/" + getRomType() + "/" + incrementalVersion;
-
- return URI.create(updateUri);
+ return URI.create("https://spotco.us/de/devices/" + Utils.getDeviceType() + "/um.json");
}
private void getAvailableUpdates() {
diff --git a/src/com/cyanogenmod/updater/utils/Utils.java b/src/com/cyanogenmod/updater/utils/Utils.java
index 72f12bd..6b89988 100644
--- a/src/com/cyanogenmod/updater/utils/Utils.java
+++ b/src/com/cyanogenmod/updater/utils/Utils.java
@@ -174,22 +174,7 @@ public class Utils {
releaseType = Constants.CM_RELEASETYPE_UNOFFICIAL;
}
- int updateType;
- switch (releaseType) {
- case Constants.CM_RELEASETYPE_SNAPSHOT:
- updateType = Constants.UPDATE_TYPE_SNAPSHOT;
- break;
- case Constants.CM_RELEASETYPE_NIGHTLY:
- updateType = Constants.UPDATE_TYPE_NIGHTLY;
- break;
- case Constants.CM_RELEASETYPE_EXPERIMENTAL:
- updateType = Constants.UPDATE_TYPE_EXPERIMENTAL;
- break;
- case Constants.CM_RELEASETYPE_UNOFFICIAL:
- default:
- updateType = Constants.UPDATE_TYPE_UNOFFICIAL;
- break;
- }
+ int updateType = Constants.UPDATE_TYPE_NIGHTLY;
return updateType;
}
--
2.13.0

View File

@ -1,6 +1,6 @@
#!/bin/bash
#TODO: Aggressive Doze (Verify Extended Doze First), Failed Unlock Shutdown, Optimized build flags, Optimized toolchain, OTA Updates, Ship Chromium, Wallpaper
#TODO: Aggressive Doze (Verify Extended Doze First), Failed Unlock Shutdown, Optimized build flags, Optimized toolchain, Ship Chromium, Wallpaper
#Delete Everything
#repo forall -c 'git add -A && git reset --hard' && rm -rf build external/noto-fonts external/sqlite frameworks/base packages/apps/CMParts packages/apps/FakeStore packages/apps/FDroid packages/apps/FDroidPrivilegedExtension packages/apps/GmsCore packages/apps/GsfProxy packages/apps/IchnaeaNlpBackend packages/apps/SetupWizard system/core vendor/cm frameworks/opt/net/ims packages/apps/Settings out
@ -89,6 +89,9 @@ rm -rf src/org/cyanogenmod/cmparts/cmstats/ res/xml/anonymous_stats.xml res/xml/
git fetch https://review.lineageos.org/LineageOS/android_packages_apps_CMParts refs/changes/15/113415/23 && git cherry-pick FETCH_HEAD #network traffic
patch -p1 < $patches"android_packages_apps_CMParts/0001-Remove_Analytics.patch" #Remove the rest of CMStats
enter "packages/apps/CMUpdater"
patch -p1 < $patches"android_packages_apps_CMUpdater/0001-Server.patch" #Switch to our server
enter "packages/apps/CustomTiles"
git fetch https://review.lineageos.org/LineageOS/android_packages_apps_CustomTiles refs/changes/69/167069/1 && git cherry-pick FETCH_HEAD #System profiles tile