Loading app/build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -150,7 +150,7 @@ dependencies { // TODO: Add splitinstall-lib to a repo https://gitlab.e.foundation/e/os/backlog/-/issues/628 api files('libs/splitinstall-lib.jar') implementation 'foundation.e.lib:telemetry:0.0.9-alpha' implementation 'foundation.e.lib:telemetry:0.0.11-alpha' implementation 'foundation.e:gplayapi:3.0.1-2' implementation 'androidx.core:core-ktx:1.9.0' implementation 'androidx.appcompat:appcompat:1.6.1' Loading app/src/main/java/foundation/e/apps/data/DownloadManager.kt +26 −3 Original line number Diff line number Diff line Loading @@ -167,19 +167,42 @@ class DownloadManager @Inject constructor( } private fun getDownloadStatus(downloadId: Long): Int { var status = -1 var reason = -1 try { downloadManager.query(downloadManagerQuery.setFilterById(downloadId)) .use { cursor -> if (cursor.moveToFirst()) { val status = status = cursor.getInt(cursor.getColumnIndexOrThrow(DownloadManager.COLUMN_STATUS)) reason = cursor.getInt(cursor.getColumnIndexOrThrow(DownloadManager.COLUMN_REASON)) Timber.d("Download Status: downloadId: $downloadId $status") } } } catch (e: Exception) { Timber.e(e) } if (status != DownloadManager.STATUS_SUCCESSFUL) { Timber.e("Download Issue: $downloadId status: $status reason: $reason") } return status } fun getDownloadFailureReason(downloadId: Long): Int { var reason = -1 try { downloadManager.query(downloadManagerQuery.setFilterById(downloadId)) .use { cursor -> if (cursor.moveToFirst()) { reason = cursor.getInt(cursor.getColumnIndexOrThrow(DownloadManager.COLUMN_REASON)) } } } catch (e: Exception) { Timber.e(e) } return DownloadManager.STATUS_FAILED return reason } } app/src/main/java/foundation/e/apps/data/blockedApps/BlockedAppRepository.kt +1 −3 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ package foundation.e.apps.data.blockedApps import com.google.gson.Gson import foundation.e.apps.data.DownloadManager import foundation.e.apps.data.fusedDownload.FileManager import foundation.e.lib.telemetry.Telemetry import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.launch import timber.log.Timber Loading Loading @@ -71,8 +70,7 @@ class BlockedAppRepository @Inject constructor( Timber.i("Blocked list file contents: $blockedAppInfoJson") gson.fromJson(blockedAppInfoJson, AppWarningInfo::class.java) } catch (exception: Exception) { exception.printStackTrace() Telemetry.reportException(exception) Timber.e(exception.localizedMessage ?: "", exception) AppWarningInfo(listOf()) } } Loading app/src/main/java/foundation/e/apps/install/download/DownloadManagerUtils.kt +5 −1 Original line number Diff line number Diff line Loading @@ -65,6 +65,10 @@ class DownloadManagerUtils @Inject constructor( if (downloadManager.hasDownloadFailed(downloadId)) { handleDownloadFailed(fusedDownload) Timber.e( "Download failed for ${fusedDownload.packageName}, " + "reason: ${downloadManager.getDownloadFailureReason(downloadId)}" ) return@launch } Loading @@ -86,7 +90,7 @@ class DownloadManagerUtils @Inject constructor( private suspend fun handleDownloadFailed(fusedDownload: FusedDownload) { fusedManagerRepository.installationIssue(fusedDownload) fusedManagerRepository.cancelDownload(fusedDownload) Timber.i("===> Download failed: ${fusedDownload.name} ${fusedDownload.status}") Timber.w("===> Download failed: ${fusedDownload.name} ${fusedDownload.status}") } private suspend fun validateDownload( Loading app/src/main/java/foundation/e/apps/install/pkg/InstallerService.kt +1 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ class InstallerService : Service() { return } Timber.e("App install is failed for: $packageName status: $status extra: $extra") updateInstallationIssue(packageName ?: "") if (status == PackageInstaller.STATUS_FAILURE_CONFLICT && extra?.contains( INSTALL_FAILED_UPDATE_INCOMPATIBLE Loading Loading
app/build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -150,7 +150,7 @@ dependencies { // TODO: Add splitinstall-lib to a repo https://gitlab.e.foundation/e/os/backlog/-/issues/628 api files('libs/splitinstall-lib.jar') implementation 'foundation.e.lib:telemetry:0.0.9-alpha' implementation 'foundation.e.lib:telemetry:0.0.11-alpha' implementation 'foundation.e:gplayapi:3.0.1-2' implementation 'androidx.core:core-ktx:1.9.0' implementation 'androidx.appcompat:appcompat:1.6.1' Loading
app/src/main/java/foundation/e/apps/data/DownloadManager.kt +26 −3 Original line number Diff line number Diff line Loading @@ -167,19 +167,42 @@ class DownloadManager @Inject constructor( } private fun getDownloadStatus(downloadId: Long): Int { var status = -1 var reason = -1 try { downloadManager.query(downloadManagerQuery.setFilterById(downloadId)) .use { cursor -> if (cursor.moveToFirst()) { val status = status = cursor.getInt(cursor.getColumnIndexOrThrow(DownloadManager.COLUMN_STATUS)) reason = cursor.getInt(cursor.getColumnIndexOrThrow(DownloadManager.COLUMN_REASON)) Timber.d("Download Status: downloadId: $downloadId $status") } } } catch (e: Exception) { Timber.e(e) } if (status != DownloadManager.STATUS_SUCCESSFUL) { Timber.e("Download Issue: $downloadId status: $status reason: $reason") } return status } fun getDownloadFailureReason(downloadId: Long): Int { var reason = -1 try { downloadManager.query(downloadManagerQuery.setFilterById(downloadId)) .use { cursor -> if (cursor.moveToFirst()) { reason = cursor.getInt(cursor.getColumnIndexOrThrow(DownloadManager.COLUMN_REASON)) } } } catch (e: Exception) { Timber.e(e) } return DownloadManager.STATUS_FAILED return reason } }
app/src/main/java/foundation/e/apps/data/blockedApps/BlockedAppRepository.kt +1 −3 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ package foundation.e.apps.data.blockedApps import com.google.gson.Gson import foundation.e.apps.data.DownloadManager import foundation.e.apps.data.fusedDownload.FileManager import foundation.e.lib.telemetry.Telemetry import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.launch import timber.log.Timber Loading Loading @@ -71,8 +70,7 @@ class BlockedAppRepository @Inject constructor( Timber.i("Blocked list file contents: $blockedAppInfoJson") gson.fromJson(blockedAppInfoJson, AppWarningInfo::class.java) } catch (exception: Exception) { exception.printStackTrace() Telemetry.reportException(exception) Timber.e(exception.localizedMessage ?: "", exception) AppWarningInfo(listOf()) } } Loading
app/src/main/java/foundation/e/apps/install/download/DownloadManagerUtils.kt +5 −1 Original line number Diff line number Diff line Loading @@ -65,6 +65,10 @@ class DownloadManagerUtils @Inject constructor( if (downloadManager.hasDownloadFailed(downloadId)) { handleDownloadFailed(fusedDownload) Timber.e( "Download failed for ${fusedDownload.packageName}, " + "reason: ${downloadManager.getDownloadFailureReason(downloadId)}" ) return@launch } Loading @@ -86,7 +90,7 @@ class DownloadManagerUtils @Inject constructor( private suspend fun handleDownloadFailed(fusedDownload: FusedDownload) { fusedManagerRepository.installationIssue(fusedDownload) fusedManagerRepository.cancelDownload(fusedDownload) Timber.i("===> Download failed: ${fusedDownload.name} ${fusedDownload.status}") Timber.w("===> Download failed: ${fusedDownload.name} ${fusedDownload.status}") } private suspend fun validateDownload( Loading
app/src/main/java/foundation/e/apps/install/pkg/InstallerService.kt +1 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ class InstallerService : Service() { return } Timber.e("App install is failed for: $packageName status: $status extra: $extra") updateInstallationIssue(packageName ?: "") if (status == PackageInstaller.STATUS_FAILURE_CONFLICT && extra?.contains( INSTALL_FAILED_UPDATE_INCOMPATIBLE Loading