Loading app/src/main/java/foundation/e/apps/manager/workmanager/InstallAppWorker.kt +5 −4 Original line number Diff line number Diff line Loading @@ -98,9 +98,7 @@ class InstallAppWorker @AssistedInject constructor( ) ) startAppInstallationProcess(it) Log.d(TAG, ">>> doWork: Locking mutex") mutex.lock() Log.d(TAG, ">>> doWork: released mutex") } } catch (e: Exception) { Log.e(TAG, ">>> doWork: Failed: ${e.stackTraceToString()}") Loading @@ -126,7 +124,7 @@ class InstallAppWorker @AssistedInject constructor( unlockMutex() } else { handleFusedDownloadStatusCheckingException(download) if (download.type == Type.NATIVE && download.status != Status.INSTALLED && download.status != Status.INSTALLATION_ISSUE) { if (isAppDownloading(download)) { checkDownloadProcess(download) } } Loading @@ -137,6 +135,10 @@ class InstallAppWorker @AssistedInject constructor( ) } private fun isAppDownloading(download: FusedDownload): Boolean { return download.type == Type.NATIVE && download.status != Status.INSTALLED && download.status != Status.INSTALLATION_ISSUE } private suspend fun handleFusedDownloadStatusCheckingException( download: FusedDownload ) { Loading Loading @@ -219,7 +221,6 @@ class InstallAppWorker @AssistedInject constructor( private fun unlockMutex() { if (mutex.isLocked) { mutex.unlock() Log.d(TAG, ">>> unlockMutex:") } } Loading Loading
app/src/main/java/foundation/e/apps/manager/workmanager/InstallAppWorker.kt +5 −4 Original line number Diff line number Diff line Loading @@ -98,9 +98,7 @@ class InstallAppWorker @AssistedInject constructor( ) ) startAppInstallationProcess(it) Log.d(TAG, ">>> doWork: Locking mutex") mutex.lock() Log.d(TAG, ">>> doWork: released mutex") } } catch (e: Exception) { Log.e(TAG, ">>> doWork: Failed: ${e.stackTraceToString()}") Loading @@ -126,7 +124,7 @@ class InstallAppWorker @AssistedInject constructor( unlockMutex() } else { handleFusedDownloadStatusCheckingException(download) if (download.type == Type.NATIVE && download.status != Status.INSTALLED && download.status != Status.INSTALLATION_ISSUE) { if (isAppDownloading(download)) { checkDownloadProcess(download) } } Loading @@ -137,6 +135,10 @@ class InstallAppWorker @AssistedInject constructor( ) } private fun isAppDownloading(download: FusedDownload): Boolean { return download.type == Type.NATIVE && download.status != Status.INSTALLED && download.status != Status.INSTALLATION_ISSUE } private suspend fun handleFusedDownloadStatusCheckingException( download: FusedDownload ) { Loading Loading @@ -219,7 +221,6 @@ class InstallAppWorker @AssistedInject constructor( private fun unlockMutex() { if (mutex.isLocked) { mutex.unlock() Log.d(TAG, ">>> unlockMutex:") } } Loading