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

Commit e1577f09 authored by Fahim M. Choudhury's avatar Fahim M. Choudhury
Browse files

Merge branch '2111-add-content-rating' into 'main'

feat: add content rating for Google Play apps shown in App Lounge

See merge request !439
parents 62bbb1a3 2a5fcb6c
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -153,7 +153,7 @@ dependencies {
    api files('libs/splitinstall-lib.jar')

    implementation 'foundation.e.lib:telemetry:0.0.11-alpha'
    implementation "foundation.e:gplayapi:3.2.10-1"
    implementation "foundation.e:gplayapi:3.2.10-2"
    implementation 'androidx.core:core-ktx:1.9.0'
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'androidx.fragment:fragment-ktx:1.5.6'
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@
    <ID>InstanceOfCheckForException:GPlayHttpClient.kt$GPlayHttpClient$e is SocketTimeoutException</ID>
    <ID>InvalidPackageDeclaration:Trackers.kt$package foundation.e.apps.data.exodus</ID>
    <ID>LargeClass:ApplicationFragment.kt$ApplicationFragment : TimeoutFragment</ID>
    <ID>LongParameterList:ApplicationDialogFragment.kt$ApplicationDialogFragment$( drawable: Int = -1, title: String, message: String, positiveButtonText: String = "", positiveButtonAction: (() -&gt; Unit)? = null, cancelButtonText: String = "", cancelButtonAction: (() -&gt; Unit)? = null, cancelable: Boolean = true, onDismissListener: (() -&gt; Unit)? = null, )</ID>
    <ID>LongParameterList:ApplicationDialogFragment.kt$ApplicationDialogFragment$( title: String, message: String, @DrawableRes drawableResId: Int = -1, drawable: Drawable? = null, positiveButtonText: String = "", positiveButtonAction: (() -&gt; Unit)? = null, cancelButtonText: String = "", cancelButtonAction: (() -&gt; Unit)? = null, cancelable: Boolean = true, onDismissListener: (() -&gt; Unit)? = null, )</ID>
    <ID>LongParameterList:ApplicationListRVAdapter.kt$ApplicationListRVAdapter$( private val applicationInstaller: ApplicationInstaller, private val privacyInfoViewModel: PrivacyInfoViewModel, private val appInfoFetchViewModel: AppInfoFetchViewModel, private val mainActivityViewModel: MainActivityViewModel, private val currentDestinationId: Int, private var lifecycleOwner: LifecycleOwner?, private var paidAppHandler: ((Application) -&gt; Unit)? = null )</ID>
    <ID>LongParameterList:ApplicationViewModel.kt$ApplicationViewModel$( id: String, packageName: String, origin: Origin, isFdroidLink: Boolean, authObjectList: List&lt;AuthObject&gt;, retryBlock: (failedObjects: List&lt;AuthObject&gt;) -&gt; Boolean, )</ID>
    <ID>LongParameterList:CleanApkRetrofit.kt$CleanApkRetrofit$( @Query("keyword") keyword: String, @Query("source") source: String = APP_SOURCE_FOSS, @Query("type") type: String = APP_TYPE_ANY, @Query("nres") nres: Int = 20, @Query("page") page: Int = 1, @Query("by") by: String? = null, )</ID>
+1 −1
Original line number Diff line number Diff line
@@ -413,7 +413,7 @@ class MainActivity : AppCompatActivity() {
        ApplicationDialogFragment(
            title = getString(R.string.account_unavailable),
            message = getString(R.string.too_many_requests_desc),
            drawable = R.drawable.ic_warning,
            drawableResId = R.drawable.ic_warning,
            positiveButtonText = getString(R.string.refresh_session),
            positiveButtonAction = {
                refreshSession()
+3 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ package foundation.e.apps.data.application.data
import android.content.Context
import android.net.Uri
import com.aurora.gplayapi.Constants.Restriction
import com.aurora.gplayapi.data.models.ContentRating
import com.google.gson.annotations.SerializedName
import foundation.e.apps.R
import foundation.e.apps.data.enums.FilterLevel
@@ -100,7 +101,8 @@ data class Application(
    var filterLevel: FilterLevel = FilterLevel.UNKNOWN,
    var isGplayReplaced: Boolean = false,
    @SerializedName(value = "on_fdroid")
    val isFDroidApp: Boolean = false
    val isFDroidApp: Boolean = false,
    val contentRating: ContentRating = ContentRating()
) {
    fun updateType() {
        this.type = if (this.is_pwa) PWA else NATIVE
+3 −2
Original line number Diff line number Diff line
/*
 * Copyright MURENA SAS 2023
 * Apps  Quickly and easily install Android apps onto your device!
 * Copyright (C) 2024 MURENA SAS
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
@@ -14,6 +13,7 @@
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 *
 */

package foundation.e.apps.data.application.utils
@@ -58,6 +58,7 @@ fun App.toApplication(context: Context): Application {
        isFree = this.isFree,
        price = this.price,
        restriction = this.restriction,
        contentRating = this.contentRating
    )
    return app
}
Loading