mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-04-20 03:24:50 +00:00
Fixed log submission and added telemetry OS version.
This commit is contained in:
parent
a3aa61df6d
commit
70939cbac6
3 changed files with 7 additions and 6 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Reference in a new issue