Skip to content

Commit 3e94826

Browse files
committedJun 21, 2022
Dependency update
Bug fixes
1 parent 9e4a896 commit 3e94826

File tree

6 files changed

+19
-18
lines changed

6 files changed

+19
-18
lines changed
 

‎app/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ android {
1212
applicationId = "info.dvkr.screenstream"
1313
minSdkVersion(21)
1414
targetSdkVersion(32)
15-
versionCode = 30900
16-
versionName = "3.9.0"
15+
versionCode = 30902
16+
versionName = "3.9.2"
1717
resConfigs 'en', 'ru', 'pt-rBR', 'zh-rTW', 'fr-rFR', 'fa', 'it', 'pl', 'hi', 'de', 'sk', 'es', 'ar', 'ja', 'gl', 'ca', 'uk', 'nl'
1818

1919
vectorDrawables.useSupportLibrary = true
@@ -91,8 +91,8 @@ dependencies {
9191

9292
implementation(project(":data"))
9393

94-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.2")
95-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.2")
94+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.3")
95+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.3")
9696

9797
implementation("androidx.core:core-ktx:1.8.0")
9898
implementation("androidx.activity:activity-ktx:1.4.0")

‎app/src/firebase/kotlin/info/dvkr/screenstream/ui/activity/AppUpdateActivity.kt

+7-7
Original file line numberDiff line numberDiff line change
@@ -37,31 +37,31 @@ abstract class AppUpdateActivity(@LayoutRes contentLayoutId: Int) : BaseActivity
3737
AppUpdateManagerFactory.create(this).requestUpdateFlow().onEach { appUpdateResult ->
3838
when (appUpdateResult) {
3939
AppUpdateResult.NotAvailable -> {
40-
XLog.v(getLog("AppUpdateResult.NotAvailable"))
40+
XLog.v(this@AppUpdateActivity.getLog("AppUpdateResult.NotAvailable"))
4141
}
4242
is AppUpdateResult.Available -> {
43-
XLog.d(getLog("AppUpdateResult.Available"))
43+
XLog.d(this@AppUpdateActivity.getLog("AppUpdateResult.Available"))
4444
if (appUpdateResult.updateInfo.isFlexibleUpdateAllowed) {
45-
XLog.d(getLog("AppUpdateResult.Available", "FlexibleUpdateAllowed"))
45+
XLog.d(this@AppUpdateActivity.getLog("AppUpdateResult.Available", "FlexibleUpdateAllowed"))
4646
val lastRequestMillisPassed =
4747
System.currentTimeMillis() - settings.lastUpdateRequestMillisFlow.first()
4848
if (lastRequestMillisPassed >= APP_UPDATE_REQUEST_TIMEOUT) {
49-
XLog.d(getLog("AppUpdateResult.Available", "startFlexibleUpdate"))
49+
XLog.d(this@AppUpdateActivity.getLog("AppUpdateResult.Available", "startFlexibleUpdate"))
5050
settings.setLastUpdateRequestMillis(System.currentTimeMillis())
5151
appUpdateResult.startFlexibleUpdate(this, APP_UPDATE_FLEXIBLE_REQUEST_CODE)
5252
}
5353
}
5454
}
5555
is AppUpdateResult.InProgress -> {
56-
XLog.v(getLog("AppUpdateResult.InProgress", appUpdateResult.installState.toString()))
56+
XLog.v(this@AppUpdateActivity.getLog("AppUpdateResult.InProgress", appUpdateResult.installState.toString()))
5757
}
5858
is AppUpdateResult.Downloaded -> {
59-
XLog.d(getLog("AppUpdateResult.Downloaded"))
59+
XLog.d(this@AppUpdateActivity.getLog("AppUpdateResult.Downloaded"))
6060
showUpdateConfirmationDialog(appUpdateResult)
6161
}
6262
}
6363
}
64-
.catch { cause -> XLog.e(getLog("AppUpdateManager.requestUpdateFlow.catch: $cause"), cause) }
64+
.catch { cause -> XLog.e(this@AppUpdateActivity.getLog("AppUpdateManager.requestUpdateFlow.catch: $cause"), cause) }
6565
.launchIn(lifecycleScope)
6666
}
6767

‎app/src/main/kotlin/info/dvkr/screenstream/ui/activity/PermissionActivity.kt

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ abstract class PermissionActivity(@LayoutRes contentLayoutId: Int) : ServiceActi
7474
}
7575
}
7676

77+
@Deprecated("Deprecated in Java")
7778
@Suppress("DEPRECATION")
7879
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
7980
if (requestCode == SCREEN_CAPTURE_REQUEST_CODE) {

‎data/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ android {
2525
}
2626

2727
dependencies {
28-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.2")
28+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.3")
2929
implementation("org.jetbrains.kotlin:kotlin-reflect:1.7.0")
3030

3131
implementation("androidx.core:core:1.8.0")

‎data/src/main/kotlin/info/dvkr/screenstream/data/httpserver/HttpServer.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,13 @@ internal class HttpServer(
8484
XLog.d(getLog("startServer"))
8585

8686
val coroutineExceptionHandler = CoroutineExceptionHandler { _, throwable ->
87-
XLog.e(getLog("onCoroutineException", throwable.toString()), throwable)
8887
XLog.d(getLog("onCoroutineException", "ktorServer: ${ktorServer?.hashCode()}"))
88+
XLog.e(getLog("onCoroutineException", throwable.toString()), throwable)
89+
if (throwable is IOException) return@CoroutineExceptionHandler
8990
ktorServer?.stop(0, 250)
9091
ktorServer = null
9192
when (throwable) {
9293
is BindException -> sendEvent(Event.Error(FixableError.AddressInUseException))
93-
is IOException -> Unit // Ignore
9494
else -> sendEvent(Event.Error(FatalError.HttpServerException))
9595
}
9696
}

‎data/src/main/kotlin/info/dvkr/screenstream/data/state/AppStateMachineImpl.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -227,16 +227,16 @@ class AppStateMachineImpl(
227227

228228
override suspend fun destroy() {
229229
XLog.d(getLog("destroy"))
230+
wakeLock?.release()
231+
wakeLock = null
232+
230233
sendEvent(InternalEvent.Destroy)
231234
httpServer.destroy().await()
232235
broadcastHelper.stopListening()
233236
connectivityHelper.stopListening()
234237
coroutineScope.cancel()
235238

236239
mediaProjectionIntent = null
237-
238-
wakeLock?.release()
239-
wakeLock = null
240240
}
241241

242242
private fun onError(appError: AppError) {
@@ -322,7 +322,7 @@ class AppStateMachineImpl(
322322
}
323323

324324
private suspend fun startProjection(streamState: StreamState, intent: Intent): StreamState {
325-
XLog.d(getLog("startProjection"))
325+
XLog.d(getLog("startProjection", "Intent: ${intent?.toString()}"))
326326

327327
mediaProjectionIntent = intent
328328
val mediaProjection = withContext(Dispatchers.Main) {

0 commit comments

Comments
 (0)
Failed to load comments.