diff --git a/app/src/main/java/com/amaze/fileutilities/home_page/ui/analyse/ReviewAnalysisAdapter.kt b/app/src/main/java/com/amaze/fileutilities/home_page/ui/analyse/ReviewAnalysisAdapter.kt index 4ec92041..9f6349e1 100644 --- a/app/src/main/java/com/amaze/fileutilities/home_page/ui/analyse/ReviewAnalysisAdapter.kt +++ b/app/src/main/java/com/amaze/fileutilities/home_page/ui/analyse/ReviewAnalysisAdapter.kt @@ -32,7 +32,6 @@ import com.amaze.fileutilities.utilis.EmptyViewHolder import com.amaze.fileutilities.utilis.FileUtils import com.amaze.fileutilities.utilis.Utils import java.lang.ref.WeakReference -import java.util.concurrent.TimeUnit class ReviewAnalysisAdapter( val context: Context, @@ -102,10 +101,15 @@ class ReviewAnalysisAdapter( holder.infoSummary.text = totalSize } } else if (analysisType == ReviewImagesFragment.TYPE_MOST_USED_APPS) { - val timeForeground = Utils.convertMillisToHoursMinutes(this.mediaFileInfo?.extraInfo?.apkMetaData?.timeForeground ?: 0L) - val size = this.mediaFileInfo?.getFormattedSize(context) + val timeForeground = + Utils.convertMillisToHoursMinutes( + this.mediaFileInfo?.extraInfo + ?.apkMetaData?.timeForeground ?: 0L + ) + val size = this.mediaFileInfo?.getFormattedSize(context) holder.infoSummary.text = "${context.getString(R.string.size)}: $size" - holder.extraInfo.text = "${context.getString(R.string.usage)}: $timeForeground" + holder.extraInfo.text = "${context.getString(R.string.usage)}: " + + "$timeForeground" } else { holder.infoSummary.text = this.mediaFileInfo?.getFormattedSize(context) } diff --git a/app/src/main/java/com/amaze/fileutilities/home_page/ui/files/FilesViewModel.kt b/app/src/main/java/com/amaze/fileutilities/home_page/ui/files/FilesViewModel.kt index 26489952..dee633c5 100644 --- a/app/src/main/java/com/amaze/fileutilities/home_page/ui/files/FilesViewModel.kt +++ b/app/src/main/java/com/amaze/fileutilities/home_page/ui/files/FilesViewModel.kt @@ -1742,7 +1742,7 @@ class FilesViewModel(val applicationContext: Application) : usageStats.filter { it.lastTimeUsed != 0L }.forEach { - var timeForeground = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) + var timeForeground = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) it.totalTimeVisible else it.totalTimeInForeground if (freqMap[it.packageName] != null) { timeForeground += freqMap[it.packageName]!! diff --git a/app/src/main/java/com/amaze/fileutilities/image_viewer/ImageViewerActivity.kt b/app/src/main/java/com/amaze/fileutilities/image_viewer/ImageViewerActivity.kt index 8c9eeccd..d35e6c65 100644 --- a/app/src/main/java/com/amaze/fileutilities/image_viewer/ImageViewerActivity.kt +++ b/app/src/main/java/com/amaze/fileutilities/image_viewer/ImageViewerActivity.kt @@ -29,10 +29,9 @@ import com.amaze.fileutilities.R import com.amaze.fileutilities.databinding.GenericPagerViewerActivityBinding import com.amaze.fileutilities.utilis.Utils.Companion.showProcessingDialog import com.amaze.fileutilities.utilis.showToastInCenter -import java.io.File import org.slf4j.Logger import org.slf4j.LoggerFactory - +import java.io.File class ImageViewerActivity : PermissionsActivity() {