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

Commit f572e627 authored by Jonathan Klee's avatar Jonathan Klee
Browse files

Merge branch '0000-u-remove-debug-package' into 'main'

Get rid off debug specific Android package

See merge request !531
parents a9201d31 9085d878
Loading
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -66,10 +66,10 @@ android {
    signingConfigs {
        def keystore_password = System.getenv('KEYSTORE_PASSWORD')
        debugConfig {
            storeFile file("../keystore/platform.keystore")
            storePassword 'android'
            keyAlias 'platform'
            keyPassword 'android'
            storeFile file("keystore/platform.jks")
            storePassword "platform"
            keyAlias "platform"
            keyPassword "platform"
        }
        releaseTestConfig {
            storeFile file("../keystore/proprietary.keystore")
@@ -111,8 +111,6 @@ android {

    buildTypes {
        debug {
            versionNameSuffix ".debug"
            applicationIdSuffix ".debug"
            signingConfig signingConfigs.debugConfig
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
+2.98 KiB

File added.

No diff preview for this file type.

app/src/debug/AndroidManifest.xml

deleted100644 → 0
+0 −6
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

    <permission android:name="foundation.e.apps.debug.permission.PROVIDER_READ" />

</manifest>
 No newline at end of file
+5 −8
Original line number Diff line number Diff line
@@ -31,13 +31,11 @@ import dagger.hilt.EntryPoint
import dagger.hilt.InstallIn
import dagger.hilt.android.EntryPointAccessors
import dagger.hilt.components.SingletonComponent
import foundation.e.apps.BuildConfig
import foundation.e.apps.R
import foundation.e.apps.contract.ParentalControlContract.COLUMN_LOGIN_TYPE
import foundation.e.apps.contract.ParentalControlContract.COLUMN_PACKAGE_NAME
import foundation.e.apps.contract.ParentalControlContract.PATH_BLOCKLIST
import foundation.e.apps.contract.ParentalControlContract.PATH_LOGIN_TYPE
import foundation.e.apps.contract.ParentalControlContract.getAppLoungeProviderAuthority
import foundation.e.apps.data.ResultSupreme
import foundation.e.apps.data.blockedApps.BlockedAppRepository
import foundation.e.apps.data.enums.Origin
@@ -79,6 +77,7 @@ class AgeRatingProvider : ContentProvider() {
    companion object {
        private const val CHANNEL_ID = "applounge_provider"
        private const val NOTIFICATION_ID = 77
        private const val AUTHORITY = "foundation.e.apps.provider"
    }

    private lateinit var authenticatorRepository: AuthenticatorRepository
@@ -97,12 +96,10 @@ class AgeRatingProvider : ContentProvider() {
        ;
    }

    private val authority = getAppLoungeProviderAuthority(BuildConfig.DEBUG)

    private val uriMatcher by lazy {
        UriMatcher(UriMatcher.NO_MATCH).apply {
            addURI(authority, PATH_LOGIN_TYPE, UriCode.LoginType.code)
            addURI(authority, PATH_BLOCKLIST, UriCode.AgeRating.code)
            addURI(AUTHORITY, PATH_LOGIN_TYPE, UriCode.LoginType.code)
            addURI(AUTHORITY, PATH_BLOCKLIST, UriCode.AgeRating.code)
        }
    }

@@ -327,9 +324,9 @@ class AgeRatingProvider : ContentProvider() {
    override fun getType(uri: Uri): String {
        return when (uriMatcher.match(uri)) {
            UriCode.LoginType.code ->
                "vnd.android.cursor.item/${authority}.${UriCode.LoginType.code}"
                "vnd.android.cursor.item/${AUTHORITY}.${UriCode.LoginType.code}"
            UriCode.AgeRating.code ->
                "vnd.android.cursor.item/${authority}.${UriCode.AgeRating.code}"
                "vnd.android.cursor.item/${AUTHORITY}.${UriCode.AgeRating.code}"
            else -> throw IllegalArgumentException("Unknown URI: $uri")
        }
    }
+0 −3
Original line number Diff line number Diff line
@@ -25,7 +25,4 @@ object ParentalControlContract {

    const val PATH_LOGIN_TYPE = "login_type"
    const val PATH_BLOCKLIST = "block_list"

    fun getAppLoungeProviderAuthority(isDebug: Boolean = false) =
        "foundation.e.apps${if (isDebug) ".debug" else ""}.provider"
}