Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b689e15 authored by Sayantan Roychowdhury's avatar Sayantan Roychowdhury
Browse files

miscellaneous lint warning fixes

parent 735370a7
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -304,8 +304,7 @@ class MainActivity : AppCompatActivity() {

    // TODO: move storage availability code to FileManager Class
    private fun isStorageAvailable(fusedDownload: FusedDownload): Boolean {
        var availableSpace = 0L
        availableSpace = calculateAvailableDiskSpace()
        val availableSpace = calculateAvailableDiskSpace()
        return availableSpace > fusedDownload.appSize + (500 * (1000 * 1000))
    }

+0 −2
Original line number Diff line number Diff line
@@ -103,8 +103,6 @@ class DownloadManager @Inject constructor(
            downloadManager.query(downloadManagerQuery.setFilterById(downloadId))
                .use { cursor ->
                    if (cursor.moveToFirst()) {
                        val id =
                            cursor.getLong(cursor.getColumnIndexOrThrow(DownloadManager.COLUMN_ID))
                        val status =
                            cursor.getInt(cursor.getColumnIndexOrThrow(DownloadManager.COLUMN_STATUS))
                        val totalSizeBytes =
+4 −4
Original line number Diff line number Diff line
@@ -50,15 +50,15 @@ class BlockedAppRepository @Inject constructor(
    fun fetchUpdateOfAppWarningList() {
        downloadManager.downloadFileInCache(
            APP_WARNING_LIST_FILE_URL,
            fileName = "app-lounge-warning-list.json"
        ) { success, path ->
            fileName = WARNING_LIST_FILE_NAME
        ) { success, _ ->
            if (success) {
                parseBlockedAppDataFromFile(path)
                parseBlockedAppDataFromFile()
            }
        }
    }

    private fun parseBlockedAppDataFromFile(path: String) {
    private fun parseBlockedAppDataFromFile() {
        coroutineScope.launch {
            val outputPath = "$cacheDir/warning_list/"
            FileManager.moveFile("$cacheDir/", WARNING_LIST_FILE_NAME, outputPath)
+1 −1
Original line number Diff line number Diff line
@@ -112,7 +112,7 @@ class ApplicationListFragment :

        recyclerView.apply {
            adapter = listAdapter
            layoutManager = LinearLayoutManager(view?.context)
            layoutManager = LinearLayoutManager(view.context)
        }
    }

+1 −0
Original line number Diff line number Diff line
@@ -281,6 +281,7 @@ class ApplicationListRVAdapter(
            Status.INSTALLATION_ISSUE -> {
                handleInstallationIssue(view, searchApp)
            }
            else -> {}
        }
    }

Loading