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

Commit 0fa46de5 authored by dev-12's avatar dev-12
Browse files

build: adapt changes from `3.5.0`

parent dbf8df12
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ package foundation.e.apps.data.database.install

import androidx.room.TypeConverter
import com.aurora.gplayapi.data.models.ContentRating
import com.aurora.gplayapi.data.models.File
import com.aurora.gplayapi.data.models.PlayFile
import com.google.gson.Gson
import com.google.gson.reflect.TypeToken

@@ -25,11 +25,11 @@ class AppInstallConverter {
        gson.fromJson(value, object : TypeToken<MutableMap<Long, Boolean>>() {}.type)

    @TypeConverter
    fun filesToJsonString(value: List<File>): String = gson.toJson(value)
    fun filesToJsonString(value: List<PlayFile>): String = gson.toJson(value)

    @TypeConverter
    fun jsonStringToFiles(value: String) =
        gson.fromJson(value, Array<File>::class.java).toMutableList()
        gson.fromJson(value, Array<PlayFile>::class.java).toMutableList()

    @TypeConverter
    fun fromContentRating(contentRating: ContentRating): String {
+2 −2
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ import java.io.File
import javax.inject.Inject
import javax.inject.Named
import javax.inject.Singleton
import com.aurora.gplayapi.data.models.File as AuroraFile
import com.aurora.gplayapi.data.models.PlayFile as AuroraFile

@Singleton
class AppManagerImpl @Inject constructor(
@@ -240,7 +240,7 @@ class AppManagerImpl @Inject constructor(
        count: Int
    ): File {
        val downloadingFile = appInstall.files[appInstall.downloadURLList.indexOf(it)]
        return if (downloadingFile.type == AuroraFile.FileType.BASE || downloadingFile.type == AuroraFile.FileType.SPLIT) {
        return if (downloadingFile.type == AuroraFile.Type.BASE || downloadingFile.type == AuroraFile.Type.SPLIT) {
            File(parentPath, "${appInstall.packageName}_$count.apk")
        } else {
            createObbFileForDownload(appInstall, it)
+2 −2
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ import androidx.room.Entity
import androidx.room.Ignore
import androidx.room.PrimaryKey
import com.aurora.gplayapi.data.models.ContentRating
import com.aurora.gplayapi.data.models.File
import com.aurora.gplayapi.data.models.PlayFile
import foundation.e.apps.data.cleanapk.CleanApkRetrofit
import foundation.e.apps.data.enums.Source
import foundation.e.apps.data.enums.Status
@@ -26,7 +26,7 @@ data class AppInstall(
    val offerType: Int = -1,
    val isFree: Boolean = true,
    var appSize: Long = 0,
    var files: List<File> = mutableListOf(),
    var files: List<PlayFile> = mutableListOf(),
    var signature: String = String(),
    var contentRating: ContentRating = ContentRating()
) {
+4 −4
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ package foundation.e.apps.data.playstore
import android.content.Context
import com.aurora.gplayapi.data.models.Category
import com.aurora.gplayapi.data.models.ContentRating
import com.aurora.gplayapi.data.models.File
import com.aurora.gplayapi.data.models.PlayFile
import com.aurora.gplayapi.data.models.StreamCluster
import com.aurora.gplayapi.helpers.AppDetailsHelper
import com.aurora.gplayapi.helpers.ContentRatingHelper
@@ -235,7 +235,7 @@ class PlayStoreRepository @Inject constructor(
        idOrPackageName: String,
        versionCode: Int,
        offerType: Int
    ): List<File> = withContext(Dispatchers.IO) {
    ): List<PlayFile> = withContext(Dispatchers.IO) {
        var version = versionCode
        var offer = offerType

@@ -262,8 +262,8 @@ class PlayStoreRepository @Inject constructor(
        moduleName: String,
        versionCode: Int,
        offerType: Int
    ): List<File> {
        val downloadData = mutableListOf<File>()
    ): List<PlayFile> {
        val downloadData = mutableListOf<PlayFile>()
        val authData = authenticatorRepository.getGPlayAuthOrThrow()

        withContext(Dispatchers.IO) {