mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-08-07 08:39:30 +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 client = OkHttpClient()
|
||||||
val response: Response = client.newCall(request).execute()
|
val response: Response = client.newCall(request).execute()
|
||||||
if (response.isSuccessful) {
|
return if (response.isSuccessful) {
|
||||||
val body = response.body?.string();
|
response.body?.string();
|
||||||
return if (body != null) Json.decodeFromString<String>(body) else null;
|
|
||||||
} else {
|
} else {
|
||||||
Logger.e("Failed to submit log.") { "Failed to submit logs (${response.code}): ${response.body?.string()}" };
|
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 isUnstableBuild: Boolean,
|
||||||
val brand: String,
|
val brand: String,
|
||||||
val manufacturer: String,
|
val manufacturer: String,
|
||||||
val model: String
|
val model: String,
|
||||||
|
val sdkVersion: Int
|
||||||
) { }
|
) { }
|
|
@ -39,7 +39,8 @@ class StateTelemetry {
|
||||||
BuildConfig.IS_UNSTABLE_BUILD,
|
BuildConfig.IS_UNSTABLE_BUILD,
|
||||||
Build.BRAND,
|
Build.BRAND,
|
||||||
Build.MANUFACTURER,
|
Build.MANUFACTURER,
|
||||||
Build.MODEL
|
Build.MODEL,
|
||||||
|
Build.VERSION.SDK_INT
|
||||||
);
|
);
|
||||||
|
|
||||||
val headers = hashMapOf(
|
val headers = hashMapOf(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue