ADeadTrousers/LineageOTAstatic

Updater throws org.json.JSONException

ADeadTrousers opened this issue · 2 comments

type org.json.JSONArray cannot be converted to JSONObject

Obviously I need a way to not serve all releases at once.

A possible solution would be to sort by timestamp and then publish the latest.
But how does the updater react if it finds the current version to be the one that's already on the device.
Maybe I also need to account for the {incr} value?

A little bit of research in https://github.com/LineageOS/android_packages_apps_Updater/blob/lineage-17.1/src/org/lineageos/updater/misc/Utils.java revealed that there is in fact a "response"-array that holds all available releases.

391375d