mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2026-05-16 04:52:39 +02:00
Fixed log submission and added telemetry OS version.
This commit is contained in:
@@ -64,12 +64,11 @@ class Logging {
|
||||
|
||||
val client = OkHttpClient()
|
||||
val response: Response = client.newCall(request).execute()
|
||||
if (response.isSuccessful) {
|
||||
val body = response.body?.string();
|
||||
return if (body != null) Json.decodeFromString<String>(body) else null;
|
||||
return if (response.isSuccessful) {
|
||||
response.body?.string();
|
||||
} else {
|
||||
Logger.e("Failed to submit log.") { "Failed to submit logs (${response.code}): ${response.body?.string()}" };
|
||||
return null;
|
||||
null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,5 +11,6 @@ data class Telemetry(
|
||||
val isUnstableBuild: Boolean,
|
||||
val brand: String,
|
||||
val manufacturer: String,
|
||||
val model: String
|
||||
val model: String,
|
||||
val sdkVersion: Int
|
||||
) { }
|
||||
@@ -39,7 +39,8 @@ class StateTelemetry {
|
||||
BuildConfig.IS_UNSTABLE_BUILD,
|
||||
Build.BRAND,
|
||||
Build.MANUFACTURER,
|
||||
Build.MODEL
|
||||
Build.MODEL,
|
||||
Build.VERSION.SDK_INT
|
||||
);
|
||||
|
||||
val headers = hashMapOf(
|
||||
|
||||
Reference in New Issue
Block a user