diff --git a/app/src/main/java/org/eu/exodus_privacy/exodusprivacy/adapters/ApplicationListAdapter.java b/app/src/main/java/org/eu/exodus_privacy/exodusprivacy/adapters/ApplicationListAdapter.java index 4706270..aa7990e 100644 --- a/app/src/main/java/org/eu/exodus_privacy/exodusprivacy/adapters/ApplicationListAdapter.java +++ b/app/src/main/java/org/eu/exodus_privacy/exodusprivacy/adapters/ApplicationListAdapter.java @@ -174,6 +174,7 @@ public class ApplicationListAdapter extends RecyclerView.Adapter { appItemBinding.otherVersion.setVisibility(View.GONE); appItemBinding.analysed.setVisibility(View.GONE); appItemBinding.appTrackerNb.setVisibility(View.VISIBLE); + appItemBinding.appTracker.setVisibility(View.VISIBLE); String packageName = packageInfo.packageName; @@ -190,20 +191,33 @@ public class ApplicationListAdapter extends RecyclerView.Adapter { appItemBinding.appName.setText(packageManager.getApplicationLabel(packageInfo.applicationInfo)); //get permissions - if(packageInfo.requestedPermissions != null) { - appItemBinding.appPermissionNb.setText(context.getString(R.string.permissions) + " " + String.valueOf(data.requestedPermissions.length)); - } else { - appItemBinding.appPermissionNb.setText(context.getString(R.string.permissions) + " " + String.valueOf(0)); - } + long size = packageInfo.requestedPermissions != null ? data.requestedPermissions.length : 0; + appItemBinding.appPermissionNb.setText(String.valueOf(size)); + if(size == 0) + appItemBinding.appPermissionNb.setBackgroundResource(R.drawable.square_green); + else if (size < 5) + appItemBinding.appPermissionNb.setBackgroundResource(R.drawable.square_yellow); + else + appItemBinding.appPermissionNb.setBackgroundResource(R.drawable.square_red); + //get reports - Report report = null; + Report report; if(versionName != null) report = DatabaseManager.getInstance(context).getReportFor(packageName, versionName); else report = DatabaseManager.getInstance(context).getReportFor(packageName, versionCode); if(report != null) { Set trackers = DatabaseManager.getInstance(context).getTrackers(report.trackers); - appItemBinding.appTrackerNb.setText(context.getString(R.string.trackers) + " " + trackers.size()); + + size = trackers.size(); + appItemBinding.appTrackerNb.setText(String.valueOf(size)); + if(size == 0) + appItemBinding.appTrackerNb.setBackgroundResource(R.drawable.square_green); + else if (size < 5) + appItemBinding.appTrackerNb.setBackgroundResource(R.drawable.square_yellow); + else + appItemBinding.appTrackerNb.setBackgroundResource(R.drawable.square_red); + if(versionName != null && !report.version.equals(data.versionName)) { appItemBinding.otherVersion.setVisibility(View.VISIBLE); } else if (versionName == null && report.versionCode != versionCode) { @@ -212,6 +226,7 @@ public class ApplicationListAdapter extends RecyclerView.Adapter { } else { appItemBinding.appTrackerNb.setVisibility(View.GONE); + appItemBinding.appTracker.setVisibility(View.GONE); appItemBinding.analysed.setVisibility(View.VISIBLE); } } diff --git a/app/src/main/res/layout/app_item.xml b/app/src/main/res/layout/app_item.xml index dab2818..ee6d02a 100644 --- a/app/src/main/res/layout/app_item.xml +++ b/app/src/main/res/layout/app_item.xml @@ -29,15 +29,44 @@ android:layout_alignParentEnd="true" android:layout_width="wrap_content" android:layout_height="wrap_content"> - - + + + + - + android:layout_height="wrap_content" + android:layout_marginTop="5dp" + > + + + @@ -135,7 +135,7 @@ > Exodus Privacy Applikation Logo - Aufspürer: - Berechtigungen: + Aufspürer: + Berechtigungen: + Aufspürer + Berechtigungen Netzwerk nicht verfügbar Internetanschlusst nicht vorhanden JSON Fehler diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 4027186..eda5e6b 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -1,8 +1,10 @@ Exodus Privacy Logo de la application Logo - Rastreadores: - Autorizaciones: + Rastreadores: + Autorizaciones: + Rastreadores + Autorizaciones Red no disponible Sin conexión Internet Error JSON diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 776ff53..fd8f55e 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -1,8 +1,10 @@ Exodus Privacy Application Logo - Pisteurs : - Autorisations : + Pisteurs : + Autorisations : + Pisteurs + Autorisations Réseau indisponible Aucune connexion Internet Erreur JSON diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index d0cd33c..5716b47 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -1,8 +1,10 @@ Exodus Privacy Logo applicazione - Tracciatori: - Autorizzazioni: + Tracciatori: + Autorizzazioni + Tracciatori + Autorizzazioni: Rete non disponibile Nessuna connessione internet Errore JSON diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6abfe5f..05f296a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,8 +1,10 @@ Exodus Privacy Application Logo - Trackers: - Permissions: + Trackers: + Permissions: + Trackers + Permissions Network Unavailable No Internet Connection JSON Error