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

Commit 730c2bc7 authored by Guillaume Jacquart's avatar Guillaume Jacquart
Browse files

219 highlight active trackers

parent fa5d60f9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -110,8 +110,8 @@ dependencies {
    //googleImplementation project(":privacymodulesgoogle")
    // include the e specific version of the modules, just for the e flavor

    implementation 'foundation.e:privacymodule.trackerfilter:0.6.1'
    implementation 'foundation.e:privacymodule.api:1.0.0'
    implementation 'foundation.e:privacymodule.trackerfilter:0.7.0'
    implementation 'foundation.e:privacymodule.api:1.1.0'
    e29Implementation 'foundation.e:privacymodule.e-29:0.4.2'
    e30Implementation 'foundation.e:privacymodule.e-30:0.4.2'
    implementation 'foundation.e:privacymodule.tor:0.2.2'
+2 −1
Original line number Diff line number Diff line
@@ -63,7 +63,8 @@
            android:launchMode="singleTask">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.INFO"/>
                <category android:name="android.intent.category.LAUNCHER"/>
<!--                <category android:name="android.intent.category.INFO"/>-->
            </intent-filter>
        </activity>
    </application>
+2 −1
Original line number Diff line number Diff line
@@ -41,7 +41,8 @@ class AppsAdapter(
            counts.text = itemView.context.getString(
                R.string.trackers_app_trackers_counts,
                item.blockedTrackersCount,
                item.trackersCount
                item.trackersCount,
                item.leaks
            )
            icon.setImageDrawable(item.icon)

+4 −0
Original line number Diff line number Diff line
@@ -66,6 +66,10 @@ class AppListsRepository(
        return appDescriptions.value.first.find { it.packageName == packageName }
    }

    fun getApplicationDescription(appUid: Int): ApplicationDescription? {
        return appDescriptions.value.first.find { it.uid == appUid }
    }

    fun foldForHiddenSystemApp(appUid: Int, appValueGetter: (Int) -> Int): Int {
        return if (appUid == dummySystemApp.uid) {
            getHiddenSystemApps().fold(0) { acc, app ->
+9 −3
Original line number Diff line number Diff line
@@ -27,13 +27,17 @@ data class AppWithCounts(
    var icon: Drawable?,
    val isWhitelisted: Boolean = false,
    val trackersCount: Int = 0,
    val whiteListedTrackersCount: Int = 0
    val whiteListedTrackersCount: Int = 0,
    val blockedLeaks: Int = 0,
    val leaks: Int = 0,
) {
    constructor(
        app: ApplicationDescription,
        isWhitelisted: Boolean,
        trackersCount: Int,
        whiteListedTrackersCount: Int
        whiteListedTrackersCount: Int,
        blockedLeaks: Int,
        leaks: Int,
    ) :
        this(
            packageName = app.packageName,
@@ -42,7 +46,9 @@ data class AppWithCounts(
            icon = app.icon,
            isWhitelisted = isWhitelisted,
            trackersCount = trackersCount,
            whiteListedTrackersCount = whiteListedTrackersCount
            whiteListedTrackersCount = whiteListedTrackersCount,
            blockedLeaks = blockedLeaks,
            leaks = leaks
        )

    val blockedTrackersCount get() = if (isWhitelisted) 0
Loading