summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/build.gradle8
-rw-r--r--app/src/main/java/foundation/e/privacycentralapp/domain/usecases/FakeLocationStateUseCase.kt26
-rw-r--r--app/src/main/java/foundation/e/privacycentralapp/main/MainActivity.kt2
-rw-r--r--app/src/main/res/values-de/strings.xml3
-rw-r--r--app/src/main/res/values-es/strings.xml14
-rw-r--r--app/src/main/res/values-fi/strings.xml14
-rw-r--r--app/src/main/res/values-fr/strings.xml5
-rw-r--r--app/src/main/res/values-it/strings.xml3
-rw-r--r--app/src/main/res/values/strings.xml28
9 files changed, 37 insertions, 66 deletions
diff --git a/app/build.gradle b/app/build.gradle
index 7749f8f..fe5c8a8 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -12,7 +12,7 @@ android {
minSdkVersion buildConfig.minSdk
targetSdkVersion buildConfig.targetSdk
versionCode buildConfig.version.code
- versionName buildConfig.version.fullName
+ versionName buildConfig.version.name
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -75,10 +75,10 @@ android {
* Sets the output name of the variant outputs and also it setup signingConfig based on the product flavor.
*/
applicationVariants.all { variant ->
+ variant.outputs.all { output ->
+ outputFileName = "Advanced_Privacy-${variant.versionName}-${variant.getFlavorName()}-${variant.buildType.name}.apk"
+ }
if (variant.buildType.name == "debug") {
- variant.outputs.all { output ->
- outputFileName = "PrivacyCentral-${output.name}-${variant.versionName}.apk"
- }
if (variant.getFlavorName() == "e29" || variant.getFlavorName() == "e30") {
variant.mergedFlavor.signingConfig = signingConfigs.eDebug
} else {
diff --git a/app/src/main/java/foundation/e/privacycentralapp/domain/usecases/FakeLocationStateUseCase.kt b/app/src/main/java/foundation/e/privacycentralapp/domain/usecases/FakeLocationStateUseCase.kt
index fb773b2..c026275 100644
--- a/app/src/main/java/foundation/e/privacycentralapp/domain/usecases/FakeLocationStateUseCase.kt
+++ b/app/src/main/java/foundation/e/privacycentralapp/domain/usecases/FakeLocationStateUseCase.kt
@@ -23,6 +23,7 @@ import android.location.Location
import android.location.LocationListener
import android.location.LocationManager
import android.os.Bundle
+import android.os.Looper
import android.util.Log
import foundation.e.privacycentralapp.data.repositories.LocalStateRepository
import foundation.e.privacycentralapp.domain.entities.LocationMode
@@ -68,8 +69,8 @@ class FakeLocationStateUseCase(
)
}
- private fun applySettings(isQuickPrivacyEnabled: Boolean, fakeLocation: Pair<Float, Float>?) {
- _configuredLocationMode.value = computeLocationMode(fakeLocation)
+ private fun applySettings(isQuickPrivacyEnabled: Boolean, fakeLocation: Pair<Float, Float>?, isSpecificLocation: Boolean = false) {
+ _configuredLocationMode.value = computeLocationMode(fakeLocation, isSpecificLocation)
if (isQuickPrivacyEnabled && fakeLocation != null) {
if (permissionsModule.getAppOpMode(appDesc, AppOpsManager.OPSTR_MOCK_LOCATION) != AppOpModes.ALLOWED) {
@@ -89,7 +90,7 @@ class FakeLocationStateUseCase(
localStateRepository.setShowQuickPrivacyDisabledMessage(true)
}
- setFakeLocation(latitude to longitude)
+ setFakeLocation(latitude to longitude, true)
}
fun setRandomLocation() {
@@ -103,9 +104,9 @@ class FakeLocationStateUseCase(
setFakeLocation(location)
}
- private fun setFakeLocation(location: Pair<Float, Float>) {
+ private fun setFakeLocation(location: Pair<Float, Float>, isSpecificLocation: Boolean = false) {
localStateRepository.fakeLocation = location
- applySettings(localStateRepository.isQuickPrivacyEnabled, location)
+ applySettings(localStateRepository.isQuickPrivacyEnabled, location, isSpecificLocation)
}
fun stopFakeLocation() {
@@ -117,11 +118,11 @@ class FakeLocationStateUseCase(
applySettings(localStateRepository.isQuickPrivacyEnabled, null)
}
- private fun computeLocationMode(fakeLocation: Pair<Float, Float>?): Triple<LocationMode, Float?, Float?> {
+ private fun computeLocationMode(fakeLocation: Pair<Float, Float>?, isSpecificLocation: Boolean = false): Triple<LocationMode, Float?, Float?> {
return Triple(
when {
fakeLocation == null -> LocationMode.REAL_LOCATION
- fakeLocation in citiesRepository.citiesLocationsList -> LocationMode.RANDOM_LOCATION
+ fakeLocation in citiesRepository.citiesLocationsList && !isSpecificLocation -> LocationMode.RANDOM_LOCATION
else -> LocationMode.SPECIFIC_LOCATION
},
fakeLocation?.first, fakeLocation?.second
@@ -172,14 +173,9 @@ class FakeLocationStateUseCase(
LocationManager.NETWORK_PROVIDER, // TODO: tight this with fakelocation module.
0L,
0f,
- listener
- )
- // locationManager.requestLocationUpdates(
- // LocationManager.NETWORK_PROVIDER, // TODO: tight this with fakelocation module.
- // 0L,
- // 0f,
- // listener
- // )
+ listener,
+ Looper.getMainLooper()
+ )
val location: Location? = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER)
location?.let { listener.onLocationChanged(it) }
diff --git a/app/src/main/java/foundation/e/privacycentralapp/main/MainActivity.kt b/app/src/main/java/foundation/e/privacycentralapp/main/MainActivity.kt
index 92a156a..e1ccae8 100644
--- a/app/src/main/java/foundation/e/privacycentralapp/main/MainActivity.kt
+++ b/app/src/main/java/foundation/e/privacycentralapp/main/MainActivity.kt
@@ -57,10 +57,10 @@ open class MainActivity : FragmentActivity(R.layout.activity_main) {
)
ACTION_VIEW_TRACKERS -> {
add<TrackersFragment>(R.id.container)
- addToBackStack("dashboard")
}
else -> add<DashboardFragment>(R.id.container)
}
+ disallowAddToBackStack()
}
}
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index 090bdcd..3cfc811 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
- <string name="app_name">Fortgeschrittener Datenschutz</string>
<string name="dashboard_state_title_off">Dein Online-Datenschutz ist nicht gewährleistet</string>
<string name="dashboard_state_trackers_label">Tracker (Verfolger):</string>
<string name="dashboard_state_trackers_off">Verletzlich</string>
@@ -117,4 +116,4 @@
<string name="widget_state_title_custom">Benutzerdefinierte Datenschutz-Einstellungen werden angewandt</string>
<string name="widget_graph_view_trackers">Ansicht</string>
<string name="dashboard_graph_leaking_app">Ansicht</string>
-</resources> \ No newline at end of file
+</resources>
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index d907775..980c41a 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -81,7 +81,6 @@
<string name="apps_access_to_permission">Aplicaciones que tienen acceso al permiso %1$s</string>
<string name="user_location_permission_explanation">Esta aplicación necesita permisos de ubicación para poder mostrar su funcionalidad.</string>
<string name="enable_disable_tracker_info">Activar o desactivar este rastreador para las siguientes aplicaciones</string>
- <string name="app_name">Centro de Privacidad</string>
<string name="dashboard_state_title_on">Su privacidad en línea está protegida</string>
<string name="dashboard_graph_trackers_legend">%s rastreadores te han perfilado en las últimas 24 horas</string>
<string name="dashboard_location_title">Gestionar mi ubicación</string>
@@ -104,17 +103,6 @@
<string name="add_widget">Añadir widget</string>
<string name="widget_state_title_on">Su privacidad en línea está protegida</string>
<string name="widget_state_title_off">Su privacidad en línea está desprotegida</string>
- <string name="widget_state_trackers_label">\@string/dashboard_state_trackers_label</string>
- <string name="widget_state_trackers_off">\@string/dashboard_state_trackers_off</string>
- <string name="widget_state_geolocation_label">\@string/dashboard_state_geolocation_label</string>
- <string name="widget_state_geolocation_off">\@string/dashboard_state_geolocation_off</string>
- <string name="widget_state_geolocation_on">\@string/dashboard_state_geolocation_on</string>
- <string name="widget_state_ipaddress_label">\@string/dashboard_state_ipaddress_label</string>
- <string name="widget_state_ipaddress_on">\@string/dashboard_state_ipaddress_on</string>
- <string name="widget_graph_trackers_legend">\@string/dashboard_graph_trackers_legend</string>
- <string name="widget_title">\@string/app_name</string>
<string name="apptrackers_error_no_app">Aplicación no instalada.</string>
<string name="app_widget_description">Esta es la descripción de un widget de aplicación</string>
- <string name="widget_state_trackers_on">\@string/dashboard_state_trackers_on</string>
- <string name="widget_state_ipaddress_off">\@string/dashboard_state_ipaddress_off</string>
-</resources> \ No newline at end of file
+</resources>
diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml
index a12c29e..9ff16be 100644
--- a/app/src/main/res/values-fi/strings.xml
+++ b/app/src/main/res/values-fi/strings.xml
@@ -4,20 +4,9 @@
<string name="first_notification_summary">Napauta nädäksesi, miten helposti voit estää seuraimet, väärentää sijaintisi ja piilottaa IP-osoitteesi.</string>
<string name="first_notification_title">Tutustu Advanced Privacy:n</string>
<string name="widget_graph_view_trackers">Näytä</string>
- <string name="widget_graph_trackers_legend">\@string/dashboard_graph_trackers_legend</string>
- <string name="widget_state_ipaddress_on">\@string/dashboard_state_ipaddress_on</string>
- <string name="widget_state_ipaddress_off">\@string/dashboard_state_ipaddress_off</string>
- <string name="widget_state_ipaddress_label">\@string/dashboard_state_ipaddress_label</string>
- <string name="widget_state_geolocation_on">\@string/dashboard_state_geolocation_on</string>
- <string name="widget_state_geolocation_off">\@string/dashboard_state_geolocation_off</string>
- <string name="widget_state_geolocation_label">\@string/dashboard_state_geolocation_label</string>
- <string name="widget_state_trackers_on">\@string/dashboard_state_trackers_on</string>
- <string name="widget_state_trackers_off">\@string/dashboard_state_trackers_off</string>
- <string name="widget_state_trackers_label">\@string/dashboard_state_trackers_label</string>
<string name="widget_state_title_custom">Sovelletaan mukautettuja yksityisyysasetuksia</string>
<string name="widget_state_title_off">Yksityisyyttäsi verkossa ei ole suojattu</string>
<string name="widget_state_title_on">Yksityisyytesi verkossa on suojattu</string>
- <string name="widget_title">\@string/app_name</string>
<string name="app_widget_description">Tämä on sovelluksen widgetin kuvaus</string>
<string name="add_widget">Lisää widget</string>
<string name="appwidget_text">ESIMERKKI</string>
@@ -117,7 +106,6 @@
<string name="graph_legend_blocked">Estettyjä tietovuotoja</string>
<string name="graph_empty_message">Onnittelut! Yksikään seurain ei profiloi sinua.</string>
<string name="dummy_system_app_label">Järjestelmä</string>
- <string name="app_name">Advanced Privacy</string>
<string name="ipscrambling_hide_ip_subtitle">Olen anonyymi internetissä</string>
<string name="ipscrambling_hide_ip_label">Piilota todellinen IP-osoitteeni</string>
<string name="ipscrambling_real_ip_subtitle">Toimintojani voidaan seurata IP-osoitteeni perusteella</string>
@@ -128,4 +116,4 @@
<string name="ipscrambling_title">Hallitse internet-osoitettani</string>
<string name="dashboard_internet_activity_privacy_subtitle_on">Todellinen IP-osoite piilotettu</string>
<string name="dashboard_internet_activity_privacy_subtitle_off">Todellinen IP-osoite paljastettu</string>
-</resources> \ No newline at end of file
+</resources>
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index a37ac16..2370646 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -30,7 +30,6 @@
<string name="ipscrambling_location_label">Mon activité internet doit apparaître depuis :</string>
<string name="ipscrambling_any_location">Pays aléatoire</string>
<string name="ipscrambling_select_app">Appliquer ce paramètre à toutes les applications sélectionnées :</string>
- <string name="app_name">Advanced Privacy</string>
<string name="dashboard_graph_trackers_legend">%s pisteurs vous ont profilé au cours des dernières 24 heures</string>
<string name="dashboard_am_i_tracked_title">Gérer les pisteurs d\'applications</string>
<string name="dashboard_am_i_tracked_subtitle">%1$d pisteurs d\'apps, %2$d pisteurs autorisés</string>
@@ -83,7 +82,7 @@
<string name="following_trackers_in_use">Les pisteurs suivants sont en cours d\'utilisation</string>
<string name="enable_disable_tracker_info">Activer ou désactiver ce pisteur pour les apps suivantes</string>
<string name="tracker">Pisteur</string>
- <string name="ipscrambling_info">Votre adresse Internet ou adresse IP est l\'identifiant attribué à votre téléphone lorsqu\'il est connecté à internet.
+ <string name="ipscrambling_info">Votre adresse Internet ou adresse IP est l\'identifiant attribué à votre téléphone lorsqu\'il est connecté à internet.
\n
\n\"Gérer mon adresse internet\" vous permet d\'utiliser une fausse adresse IP au lieu de votre véritable adresse IP. Ainsi, votre activité Internet ne peut pas être liée à votre véritable adresse IP et à votre appareil.</string>
<string name="ipscrambling_error_quickprivacy_disabled">Activation de la confidentialité rapide pour utiliser les fonctionnalités</string>
@@ -117,4 +116,4 @@
<string name="dashboard_graph_leaking_app">Voir</string>
<string name="close">Fermer</string>
<string name="dummy_system_app_label">Système</string>
-</resources> \ No newline at end of file
+</resources>
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index 006cfa1..e5c829f 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -81,7 +81,6 @@
<string name="trackers">Trackers</string>
<string name="following_trackers_in_use">Sono attivi i seguenti trackers</string>
<string name="tracker">Tracker</string>
- <string name="app_name">AppCentralePrivacy</string>
<string name="dashboard_state_title_on">La tua privacy online è protetta</string>
<string name="dashboard_graph_trackers_legend">%s tracker ti hanno profilato nelle ultime 24 ore</string>
<string name="dashboard_location_subtitle_specific">Specifica geolocalizzazione fasulla</string>
@@ -99,4 +98,4 @@
<string name="random_location_mode">Modalità posizione casuale</string>
<string name="user_location_permission_explanation">Questa app necessita il permesso di conoscere la posizione per poter funzionare.</string>
<string name="enable_disable_tracker_info">Abilita o disabilita questo tracker per le app seguenti</string>
-</resources> \ No newline at end of file
+</resources>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index d5ffb0d..dc075d3 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
- <string name="app_name">Advanced Privacy</string>
+ <string name="app_name" translatable="false">Advanced Privacy</string>
+
<!-- Commons -->
<string name="dummy_system_app_label">System</string>
<string name="graph_empty_message">Congratulations! No trackers are profiling you.</string>
@@ -10,6 +11,7 @@
<string name="quickprivacy_disabled_message">Changes will only be effective when privacy protection toggle is enabled.</string>
<string name="close">Close</string>
<!-- Dashboard -->
+ <string name="dashboard_title" translatable="false">@string/app_name</string>
<string name="dashboard_state_title_on">Your online privacy is protected</string>
<string name="dashboard_state_title_off">Your online privacy is unprotected</string>
<string name="dashboard_state_title_custom">Custom privacy settings applied</string>
@@ -113,21 +115,21 @@
<string name="add_widget">Add widget</string>
<string name="app_widget_description">This is an app widget description</string>
<!-- Widget -->
- <string name="widget_title">@string/app_name</string>
+ <string name="widget_title" translatable="false">@string/app_name</string>
<string name="widget_state_title_on">Your online privacy is protected</string>
<string name="widget_state_title_off">Your online privacy is unprotected</string>
<string name="widget_state_title_custom">Custom privacy settings applied</string>
- <string name="widget_state_trackers_label">@string/dashboard_state_trackers_label</string>
- <string name="widget_state_trackers_off">@string/dashboard_state_trackers_off</string>
- <string name="widget_state_trackers_on">@string/dashboard_state_trackers_on</string>
- <string name="widget_state_geolocation_label">@string/dashboard_state_geolocation_label</string>
- <string name="widget_state_geolocation_off">@string/dashboard_state_geolocation_off</string>
- <string name="widget_state_geolocation_on">@string/dashboard_state_geolocation_on</string>
- <string name="widget_state_ipaddress_label">@string/dashboard_state_ipaddress_label</string>
- <string name="widget_state_ipaddress_off">@string/dashboard_state_ipaddress_off</string>
- <string name="widget_state_ipaddress_on">@string/dashboard_state_ipaddress_on</string>
- <string name="widget_graph_trackers_legend">@string/dashboard_graph_trackers_legend</string>
+ <string name="widget_state_trackers_label" translatable="false">@string/dashboard_state_trackers_label</string>
+ <string name="widget_state_trackers_off" translatable="false">@string/dashboard_state_trackers_off</string>
+ <string name="widget_state_trackers_on" translatable="false">@string/dashboard_state_trackers_on</string>
+ <string name="widget_state_geolocation_label" translatable="false">@string/dashboard_state_geolocation_label</string>
+ <string name="widget_state_geolocation_off" translatable="false">@string/dashboard_state_geolocation_off</string>
+ <string name="widget_state_geolocation_on" translatable="false">@string/dashboard_state_geolocation_on</string>
+ <string name="widget_state_ipaddress_label" translatable="false">@string/dashboard_state_ipaddress_label</string>
+ <string name="widget_state_ipaddress_off" translatable="false">@string/dashboard_state_ipaddress_off</string>
+ <string name="widget_state_ipaddress_on" translatable="false">@string/dashboard_state_ipaddress_on</string>
+ <string name="widget_graph_trackers_legend" translatable="false">@string/dashboard_graph_trackers_legend</string>
<string name="widget_graph_view_trackers">View</string>
<string name="first_notification_title">Discover Advanced Privacy</string>
<string name="first_notification_summary">Tap to find out how to easily block trackers, fake your location &amp; hide your IP address.</string>
-</resources> \ No newline at end of file
+</resources>