diff --git a/res/drawable/application_filter_border.xml b/res/drawable/application_filter_border.xml
deleted file mode 100644
index d28a43728..000000000
--- a/res/drawable/application_filter_border.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/res/drawable/card_dark.xml b/res/drawable/card_dark.xml
new file mode 100644
index 000000000..1424b17c3
--- /dev/null
+++ b/res/drawable/card_dark.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
diff --git a/res/drawable/card_light.9.png b/res/drawable/card_light.9.png
new file mode 100644
index 000000000..1d350880a
Binary files /dev/null and b/res/drawable/card_light.9.png differ
diff --git a/res/drawable/check_holo_dark.png b/res/drawable/check_holo_dark.png
new file mode 100644
index 000000000..2e06dd01b
Binary files /dev/null and b/res/drawable/check_holo_dark.png differ
diff --git a/res/drawable/check_holo_light.png b/res/drawable/check_holo_light.png
new file mode 100644
index 000000000..bb19810bc
Binary files /dev/null and b/res/drawable/check_holo_light.png differ
diff --git a/res/drawable/divider_dark.9.png b/res/drawable/divider_dark.9.png
new file mode 100644
index 000000000..a6128ba33
Binary files /dev/null and b/res/drawable/divider_dark.9.png differ
diff --git a/res/drawable/divider_light.9.png b/res/drawable/divider_light.9.png
new file mode 100644
index 000000000..c76642a43
Binary files /dev/null and b/res/drawable/divider_light.9.png differ
diff --git a/res/layout/mainlist.xml b/res/layout/mainlist.xml
index 49fc120f3..183e4079b 100644
--- a/res/layout/mainlist.xml
+++ b/res/layout/mainlist.xml
@@ -2,25 +2,62 @@
-
+
+ android:background="?attr/drawable_card"
+ android:orientation="vertical"
+ android:paddingBottom="6dp"
+ android:paddingLeft="6dp"
+ android:paddingRight="6dp"
+ android:paddingTop="1dp" >
+
+
+
+
+
+
+
+
+
+
+
@@ -33,36 +70,26 @@
android:contentDescription="@string/title_category"
android:src="?attr/icon_expander_maximized" />
-
-
-
-
-
+ android:ems="10"
+ android:hint="@string/help_application"
+ android:inputType="textNoSuggestions"
+ android:textAppearance="?android:attr/textAppearanceSmall" />
-
-
+
+ android:layout_marginLeft="4dp" >
-
+
-
+
-
-
-
+
+
+
-
+ android:src="?attr/icon_system" />
-
-
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
-
+ android:layout_marginRight="@dimen/activity_vertical_margin" >
+
+
+
+
+
+
+
diff --git a/res/layout/restrictionlist.xml b/res/layout/restrictionlist.xml
index f8d9fd979..71ffbdb7d 100644
--- a/res/layout/restrictionlist.xml
+++ b/res/layout/restrictionlist.xml
@@ -1,7 +1,8 @@
IMSI
تصفية بواسطة الأُذونات
فلترة برامج النظام
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
التطبيق
لديه صلاحية الوصول للإنترنت
لديه صلاحية أندرويد
diff --git a/res/values-bg/strings.xml b/res/values-bg/strings.xml
index e135782fb..faef909c7 100644
--- a/res/values-bg/strings.xml
+++ b/res/values-bg/strings.xml
@@ -77,6 +77,9 @@
Абонатно ID
Филтриране по разрешения
Филтриране на системни приложения
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
Приложение
има разрешение за интернет
има разрешение в Android
diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml
index 591aa9dc7..a35cb78f8 100644
--- a/res/values-ca/strings.xml
+++ b/res/values-ca/strings.xml
@@ -75,6 +75,9 @@
ID de subscriptor
Filta per permís
Filtra aplicacions de sistema
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
Aplicació
té permís d\'Internet
té permisos d\'Android
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index d611a1bb4..20e99582a 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -78,6 +78,9 @@ nicméně je nemožné zaručit bezchybnou funkčnost na všech zařízeních a
IMSI
Filtrovat dle oprávnění
Nezobrazovat systémové aplikace
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
Aplikace
má oprávnění k Internetu
má Android oprávnění
diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml
index 5f0cd9955..8e0c5dd14 100644
--- a/res/values-da/strings.xml
+++ b/res/values-da/strings.xml
@@ -77,6 +77,9 @@ however it is impossible to guarantee it will work flawless on each and every de
Abonnent ID
Filtrer efter Restriktioner
Filtrer System Programmer
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
Program
har internet tilladelse
har Android tilladelse
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 980ad9384..86b0fe5ec 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -77,6 +77,9 @@
Subscriber-ID
Nach Android-Berechtigungen filtern
System-Apps ausblenden
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
App
hat Internet-Berechtigung
hat Android-Berechtigung
diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml
index ca9df4263..c192becb5 100644
--- a/res/values-el/strings.xml
+++ b/res/values-el/strings.xml
@@ -77,6 +77,9 @@
Αναγνωριστικό συνδρομητή
Φιλτράρισμα ανά άδεια
Φιλτράρισμα εφαρμογών συστήματος
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
Εφαρμογή
έχει άδεια internet
έχει άδεια Android
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 3c0f93413..59711c404 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -77,6 +77,9 @@ however it is impossible to guarantee it will work flawless on each and every de
Subscriber ID
Ocultar permisos no utilizados
Ocultar aplicaciones del sistema
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
Aplicación
Tiene permisos para Internet
Tiene permisos por Android
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index 5bb397bab..ff75af85a 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -76,7 +76,10 @@ il est impossible de garantir un fonctionnement parfait sur chaque appareil et p
Opérateur
ID Abonné
Filtrer par permissions
- Masquer les applications système
+ Masquer les applis système
+ Filtrer utilisation des données
+ Filtrer ayant accès à internet
+ Filtrer restreintes
Application
a les permissions Internet
a les permissions Android
diff --git a/res/values-he/strings.xml b/res/values-he/strings.xml
index c574a4fac..cf8eafb3f 100644
--- a/res/values-he/strings.xml
+++ b/res/values-he/strings.xml
@@ -77,6 +77,9 @@ however it is impossible to guarantee it will work flawless on each and every de
מנוי ID
סינון לפי הרשאות
סנן יישומי מערכת
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
יישום
כולל הרשאות גישה לאינטרנט
כולל הרשאות גישה לאנדרואיד
diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml
index f83e4217d..d70420201 100644
--- a/res/values-hu/strings.xml
+++ b/res/values-hu/strings.xml
@@ -77,6 +77,9 @@ de lehetetlen garantálni hogy tökéletesen működjön az összes eszközön
Előfizető azonosító
Szűrés engedély szerint
Rendszer alkalmazások szűrése
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
Alkalmazás
Internet engedély
Android engedély
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index 76e39c174..5ce78ef05 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -77,6 +77,9 @@ however it is impossible to guarantee it will work flawless on each and every de
Subscriber ID
Filtra per permessi
Filtra applicazioni di sistema
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
Applicazione
ha permesso internet
ha permesso Android
diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml
index c574a4fac..cf8eafb3f 100644
--- a/res/values-iw/strings.xml
+++ b/res/values-iw/strings.xml
@@ -77,6 +77,9 @@ however it is impossible to guarantee it will work flawless on each and every de
מנוי ID
סינון לפי הרשאות
סנן יישומי מערכת
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
יישום
כולל הרשאות גישה לאינטרנט
כולל הרשאות גישה לאנדרואיד
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index 0b37c54d4..1f36070e1 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -77,6 +77,9 @@
契約者固有ID
権限でフィルタ
システムアプリをフィルタ
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
アプリ
はインターネット権限を持っています
はAndroid権限を持っています
diff --git a/res/values-lt/strings.xml b/res/values-lt/strings.xml
index 94a8587db..1f35509c9 100644
--- a/res/values-lt/strings.xml
+++ b/res/values-lt/strings.xml
@@ -77,6 +77,9 @@ Tačiau neįmanoma garantuoti, kad dirbs nepriekaištingai su kiekvienu prietais
Abonento ID
Tik naudojami leidimai
Nerodyti sistemos programų
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
Programa
Interneto leidimai
Android leidimai
diff --git a/res/values-nb-rNO/strings.xml b/res/values-nb-rNO/strings.xml
index 9a5d1c343..33230baca 100644
--- a/res/values-nb-rNO/strings.xml
+++ b/res/values-nb-rNO/strings.xml
@@ -77,6 +77,9 @@
Abonnent ID
Velg etter tillatelse
Filtrer system applikasjoner
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
Applikasjon
har internet tillatelse
har Android tillatelse
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index 7ebb2f4c3..586d79d19 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -79,6 +79,9 @@ maar het is onmogelijk om te garanderen dat het op elk apparaat en voor elke app
Abonnee ID
Filter op rechten
Filter systeem applicaties
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
Applicatie
heeft internet rechten
heeft Android rechten
@@ -86,4 +89,4 @@ maar het is onmogelijk om te garanderen dat het op elk apparaat en voor elke app
is uitgezet
is gevaarlijk
-
\ No newline at end of file
+
diff --git a/res/values-nn-rNO/strings.xml b/res/values-nn-rNO/strings.xml
index 9a5d1c343..33230baca 100644
--- a/res/values-nn-rNO/strings.xml
+++ b/res/values-nn-rNO/strings.xml
@@ -77,6 +77,9 @@
Abonnent ID
Velg etter tillatelse
Filtrer system applikasjoner
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
Applikasjon
har internet tillatelse
har Android tillatelse
diff --git a/res/values-no-rNO/strings.xml b/res/values-no-rNO/strings.xml
index 9a5d1c343..33230baca 100644
--- a/res/values-no-rNO/strings.xml
+++ b/res/values-no-rNO/strings.xml
@@ -77,6 +77,9 @@
Abonnent ID
Velg etter tillatelse
Filtrer system applikasjoner
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
Applikasjon
har internet tillatelse
har Android tillatelse
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index 613f71ca5..346cba20e 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -78,6 +78,9 @@
Subscriber ID
Filtruj według uprawnień
Filtruj aplikacje systemowe
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
Aplikacja
wymaga dostępu do internetu
wymaga dostępu do tych uprawnień Androida
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index 35ec2bc94..11f87c1c7 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -79,6 +79,9 @@ porém é impossível garantir que irá funcionar sem problemas em todos os disp
Identidade do subscritor
Filtrar por permissão
Filtrar aplicações do sistema
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
Aplicação
Tem permissão da internet
Tem permissão do Android
diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml
index 709dcdc5d..ac2353276 100644
--- a/res/values-ro/strings.xml
+++ b/res/values-ro/strings.xml
@@ -77,6 +77,9 @@ however it is impossible to guarantee it will work flawless on each and every de
Subscriber ID
Filter by permission
Filter system applications
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
Aplicatie
are permisiune Internet
are permisiune Android
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index b08e2c873..e9e8b785d 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -77,6 +77,9 @@
Subscriber ID
Фильтровать по разрешениям
Скрывать системные приложения
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
Приложение
запрашивает доступ в интернет
имеет разрешение Android
diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml
index e047ee17e..dd51baa9f 100644
--- a/res/values-sk/strings.xml
+++ b/res/values-sk/strings.xml
@@ -78,6 +78,9 @@ avšak nie je nemožné zaručiť, že bude fungovať bezchybne na každom zaria
IMSI
Filtrovať podľa povolenia
Filtrovať systémové aplikácie
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
Aplikácia
má internetové povolenie
má Android povolenie
diff --git a/res/values-sl/strings.xml b/res/values-sl/strings.xml
index 7a07fbc46..f7284f62f 100644
--- a/res/values-sl/strings.xml
+++ b/res/values-sl/strings.xml
@@ -79,6 +79,9 @@
ID naročnika
Filtriraj po pravicah
Filtriraj sistemske programe
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
Program
uporablja internetne pravice
uporablja Android pravice
diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml
index 513d737e1..dc9a297d3 100644
--- a/res/values-sr/strings.xml
+++ b/res/values-sr/strings.xml
@@ -77,6 +77,9 @@ however it is impossible to guarantee it will work flawless on each and every de
Претплатнички ИД
Филтрирај по дозволи
Филтрирај системске апликације
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
Апликација
има дозволу за Интернет
има дозволу за Андроид
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index beb9a9a6d..35fbc220a 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -77,6 +77,9 @@ Det är emellertid omöjligt att garantera att appen fungerar på alla enheter o
Abonnent-ID
Filtrera efter behörighet
Filtrera systemappar
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
Applikation
har internetbehörighet
har Android-behörighet
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index 9bf4980a3..d1f348f32 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -76,6 +76,9 @@
Sim Numarası (IMSI)
İzne göre filtre et
Sistem uygulamalarını gösterme
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
Uygulama
internet izni var
Android izni var
diff --git a/res/values-v14/styles.xml b/res/values-v14/styles.xml
index 5dfa1d086..3621f2cf8 100644
--- a/res/values-v14/styles.xml
+++ b/res/values-v14/styles.xml
@@ -14,9 +14,13 @@
- @drawable/expander_ic_minimized_holo_dark
- @drawable/expander_ic_maximized_holo_dark
- @drawable/ic_launcher_holo_dark
+ - @drawable/check_holo_dark
- @drawable/cross_holo_dark
- @drawable/cross_grayed_out_holo_dark
- @drawable/frozen_holo_dark
+ - @android:color/black
+ - @drawable/card_dark
+ - @drawable/divider_dark
- @color/color_dangerous_dark
@@ -34,9 +38,13 @@
- @drawable/expander_ic_minimized_holo_light
- @drawable/expander_ic_maximized_holo_light
- @drawable/ic_launcher_holo_light
+ - @drawable/check_holo_light
- @drawable/cross_holo_light
- @drawable/cross_grayed_out_holo_light
- @drawable/frozen_holo_light
+ - @color/home_background_ligth
+ - @drawable/card_light
+ - @drawable/divider_light
- @color/color_dangerous_light
diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml
index ca176851c..763eecad6 100644
--- a/res/values-vi/strings.xml
+++ b/res/values-vi/strings.xml
@@ -76,6 +76,9 @@
ID người đăng kí
Lọc theo quyền
Lọc theo ứng dụng hệ thống
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
Ứng dụng
có quyền truy cập mạng
có các quyền của hệ điều hành
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 75df15196..8f35118d9 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -77,6 +77,9 @@
IMSI
隐藏无关权限
隐藏系统应用
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
应用
表示联网的权限
表示授予的权限
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index 07cc7a42f..00cca2b2c 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -1,6 +1,6 @@
-
+
@@ -17,6 +17,9 @@
+
+
+
\ No newline at end of file
diff --git a/res/values/colors.xml b/res/values/colors.xml
index e367d8b8e..e9149ee71 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -6,5 +6,6 @@
#70707070
#30404040
#30D0D0D0
+ #ffe5e5e5
\ No newline at end of file
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 8d213f7a8..16c3ecb0f 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -90,6 +90,9 @@ however it is impossible to guarantee it will work flawless on each and every de
Subscriber ID
Filter by permission
Filter system applications
+ Filter on data usage
+ Filter on internet access
+ Filter on restricted
Application
has internet permission
has Android permission
diff --git a/src/biz/bokhorst/xprivacy/ActivityMain.java b/src/biz/bokhorst/xprivacy/ActivityMain.java
index 47bead094..344bb772a 100644
--- a/src/biz/bokhorst/xprivacy/ActivityMain.java
+++ b/src/biz/bokhorst/xprivacy/ActivityMain.java
@@ -61,12 +61,12 @@
import android.widget.CheckBox;
import android.widget.CheckedTextView;
import android.widget.CompoundButton;
-import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.EditText;
import android.widget.Filter;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
+import android.widget.ProgressBar;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
@@ -75,8 +75,6 @@ public class ActivityMain extends Activity implements OnItemSelectedListener, Co
private int mThemeId;
private Spinner spRestriction = null;
private AppListAdapter mAppAdapter = null;
- private boolean mUsed = false;
- private boolean mInternet = false;
private boolean mFiltersHidden = false;
private static final int ACTIVITY_LICENSE = 0;
@@ -165,38 +163,12 @@ public void onClick(View view) {
spRestriction.setOnItemSelectedListener(this);
// Setup used filter
- final ImageView imgUsed = (ImageView) findViewById(R.id.imgUsed);
- if (savedInstanceState != null && savedInstanceState.containsKey("Used")) {
- mUsed = savedInstanceState.getBoolean("Used");
- imgUsed.setImageDrawable(getResources().getDrawable(
- getThemed(mUsed ? R.attr.icon_used : R.attr.icon_used_grayed)));
- }
- imgUsed.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View view) {
- mUsed = !mUsed;
- imgUsed.setImageDrawable(getResources().getDrawable(
- getThemed(mUsed ? R.attr.icon_used : R.attr.icon_used_grayed)));
- applyFilter();
- }
- });
+ CheckBox cbUsed = (CheckBox) findViewById(R.id.cbFUsed);
+ cbUsed.setOnCheckedChangeListener(this);
// Setup internet filter
- final ImageView imgInternet = (ImageView) findViewById(R.id.imgInternet);
- if (savedInstanceState != null && savedInstanceState.containsKey("Internet")) {
- mInternet = savedInstanceState.getBoolean("Internet");
- imgInternet.setImageDrawable(getResources().getDrawable(
- getThemed(mInternet ? R.attr.icon_internet : R.attr.icon_internet_grayed)));
- }
- imgInternet.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View view) {
- mInternet = !mInternet;
- imgInternet.setImageDrawable(getResources().getDrawable(
- getThemed(mInternet ? R.attr.icon_internet : R.attr.icon_internet_grayed)));
- applyFilter();
- }
- });
+ CheckBox cbInternet = (CheckBox) findViewById(R.id.cbFInternet);
+ cbInternet.setOnCheckedChangeListener(this);
// Setup name filter
final EditText etFilter = (EditText) findViewById(R.id.etFilter);
@@ -236,32 +208,14 @@ public void onClick(View view) {
PrivacyManager.cSettingFPermission, true, false);
CheckBox cbFPermission = (CheckBox) findViewById(R.id.cbFPermission);
cbFPermission.setChecked(fPermission);
- cbFPermission.setOnCheckedChangeListener(new OnCheckedChangeListener() {
- @Override
- public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
- PrivacyManager.setSetting(null, ActivityMain.this, PrivacyManager.cSettingFPermission,
- Boolean.toString(isChecked));
-
- AppListTask appListTask = new AppListTask();
- appListTask.executeOnExecutor(mExecutor, (Object) null);
- }
- });
+ cbFPermission.setOnCheckedChangeListener(this);
// Setup system filter
boolean fSystem = PrivacyManager.getSettingBool(null, ActivityMain.this, PrivacyManager.cSettingFSystem, true,
false);
CheckBox cbFSystem = (CheckBox) findViewById(R.id.cbFSystem);
cbFSystem.setChecked(fSystem);
- cbFSystem.setOnCheckedChangeListener(new OnCheckedChangeListener() {
- @Override
- public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
- PrivacyManager.setSetting(null, ActivityMain.this, PrivacyManager.cSettingFSystem,
- Boolean.toString(isChecked));
-
- AppListTask appListTask = new AppListTask();
- appListTask.executeOnExecutor(mExecutor, (Object) null);
- }
- });
+ cbFSystem.setOnCheckedChangeListener(this);
// Hide filters
if (savedInstanceState != null && savedInstanceState.containsKey("Filters"))
@@ -303,8 +257,6 @@ public void onClick(View view) {
@Override
protected void onSaveInstanceState(Bundle outState) {
- outState.putBoolean("Used", mUsed);
- outState.putBoolean("Internet", mInternet);
outState.putBoolean("Filters", mFiltersHidden);
super.onSaveInstanceState(outState);
}
@@ -483,16 +435,36 @@ private void selectRestriction(int pos) {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
CheckBox cbFilter = (CheckBox) findViewById(R.id.cbFilter);
- if (buttonView == cbFilter)
+ CheckBox cbUsed = (CheckBox) findViewById(R.id.cbFUsed);
+ CheckBox cbInternet = (CheckBox) findViewById(R.id.cbFInternet);
+ CheckBox cbPermission = (CheckBox) findViewById(R.id.cbFPermission);
+ CheckBox cbSystem = (CheckBox) findViewById(R.id.cbFSystem);
+ if (buttonView == cbFilter || buttonView == cbUsed || buttonView == cbInternet)
applyFilter();
+ else if (buttonView == cbPermission) {
+ PrivacyManager.setSetting(null, ActivityMain.this, PrivacyManager.cSettingFPermission,
+ Boolean.toString(isChecked));
+ applyFilter();
+ } else if (buttonView == cbSystem) {
+ PrivacyManager.setSetting(null, ActivityMain.this, PrivacyManager.cSettingFSystem,
+ Boolean.toString(isChecked));
+ applyFilter();
+ }
}
private void applyFilter() {
if (mAppAdapter != null) {
EditText etFilter = (EditText) findViewById(R.id.etFilter);
CheckBox cbFilter = (CheckBox) findViewById(R.id.cbFilter);
- String filter = String.format("%b\n%b\n%s\n%b", mUsed, mInternet, etFilter.getText().toString(),
- cbFilter.isChecked());
+ CheckBox cbUsed = (CheckBox) findViewById(R.id.cbFUsed);
+ CheckBox cbInternet = (CheckBox) findViewById(R.id.cbFInternet);
+ CheckBox cbSystem = (CheckBox) findViewById(R.id.cbFSystem);
+ ProgressBar pbFilter = (ProgressBar) findViewById(R.id.pbFilter);
+ TextView tvStats = (TextView) findViewById(R.id.tvStats);
+ String filter = String.format("%b\n%b\n%s\n%b\n%b", cbUsed.isChecked(), cbInternet.isChecked(), etFilter
+ .getText().toString(), cbFilter.isChecked(), cbSystem.isChecked());
+ pbFilter.setVisibility(ProgressBar.VISIBLE);
+ tvStats.setVisibility(TextView.GONE);
mAppAdapter.getFilter().filter(filter);
}
}
@@ -845,33 +817,32 @@ private void optionHelp() {
private void toggleFiltersVisibility() {
ImageView imgFilterToggle = (ImageView) findViewById(R.id.imgToggleFilters);
+ ImageView imgClear = (ImageView) findViewById(R.id.imgClear);
TextView tvFilters = (TextView) findViewById(R.id.tvFilterDetail);
- LinearLayout llCategory = (LinearLayout) findViewById(R.id.llCategory);
+ EditText etFilter = (EditText) findViewById(R.id.etFilter);
LinearLayout llFilters = (LinearLayout) findViewById(R.id.llFilters);
+ CheckBox cbFilter = (CheckBox) findViewById(R.id.cbFilter);
+ CheckBox cbFUsed = (CheckBox) findViewById(R.id.cbFUsed);
+ CheckBox cbFInternet = (CheckBox) findViewById(R.id.cbFInternet);
CheckBox cbFPermission = (CheckBox) findViewById(R.id.cbFPermission);
CheckBox cbFSystem = (CheckBox) findViewById(R.id.cbFSystem);
if (mFiltersHidden) {
// Change visibility
tvFilters.setVisibility(TextView.GONE);
- llCategory.setVisibility(LinearLayout.VISIBLE);
+ etFilter.setVisibility(EditText.VISIBLE);
+ imgClear.setVisibility(ImageView.VISIBLE);
llFilters.setVisibility(LinearLayout.VISIBLE);
- cbFPermission.setVisibility(CheckBox.VISIBLE);
- cbFSystem.setVisibility(CheckBox.VISIBLE);
} else {
int numberOfFilters = 0;
// Count number of activated filters
- if (spRestriction.getSelectedItemPosition() > 0)
- numberOfFilters++;
- if (mUsed)
+ if (cbFUsed.isChecked())
numberOfFilters++;
- if (mInternet)
+ if (cbFInternet.isChecked())
numberOfFilters++;
- EditText etFilter = (EditText) findViewById(R.id.etFilter);
if (etFilter.getText().length() > 0)
numberOfFilters++;
- CheckBox cbFilter = (CheckBox) findViewById(R.id.cbFilter);
if (cbFilter.isChecked())
numberOfFilters++;
if (cbFPermission.isChecked())
@@ -888,10 +859,9 @@ private void toggleFiltersVisibility() {
// Change visibility
tvFilters.setVisibility(TextView.VISIBLE);
- llCategory.setVisibility(LinearLayout.GONE);
+ etFilter.setVisibility(EditText.GONE);
+ imgClear.setVisibility(ImageView.GONE);
llFilters.setVisibility(LinearLayout.GONE);
- cbFPermission.setVisibility(CheckBox.GONE);
- cbFSystem.setVisibility(CheckBox.GONE);
}
imgFilterToggle.setImageDrawable(getResources().getDrawable(
@@ -1021,12 +991,6 @@ protected void onPreExecute() {
spRestriction.setEnabled(false);
// Reset filters
- final ImageView imgUsed = (ImageView) findViewById(R.id.imgUsed);
- imgUsed.setEnabled(false);
-
- final ImageView imgInternet = (ImageView) findViewById(R.id.imgInternet);
- imgInternet.setEnabled(false);
-
EditText etFilter = (EditText) findViewById(R.id.etFilter);
etFilter.setEnabled(false);
@@ -1059,12 +1023,6 @@ protected void onPostExecute(List listApp) {
}
// Enable filters
- final ImageView imgUsed = (ImageView) findViewById(R.id.imgUsed);
- imgUsed.setEnabled(true);
-
- final ImageView imgInternet = (ImageView) findViewById(R.id.imgInternet);
- imgInternet.setEnabled(true);
-
EditText etFilter = (EditText) findViewById(R.id.etFilter);
etFilter.setEnabled(true);
@@ -1170,6 +1128,7 @@ protected FilterResults performFiltering(CharSequence constraint) {
boolean fInternet = Boolean.parseBoolean(components[1]);
String fName = components[2];
boolean fRestricted = Boolean.parseBoolean(components[3]);
+ boolean fSystem = Boolean.parseBoolean(components[4]);
// Match applications
List lstApp = new ArrayList();
@@ -1203,10 +1162,15 @@ protected FilterResults performFiltering(CharSequence constraint) {
} else
someRestricted = PrivacyManager.getRestricted(null, getApplicationContext(),
xAppInfo.getUid(), mRestrictionName, null, false, false);
+
+ // Get if system
+ boolean system = false;
+ if (fSystem)
+ system = !xAppInfo.getIsSystem();
// Match application
if ((fUsed ? used : true) && (fInternet ? internet : true) && (fName.equals("") ? true : contains)
- && (fRestricted ? someRestricted : true))
+ && (fRestricted ? someRestricted : true) && (fSystem ? system : true))
lstApp.add(xAppInfo);
}
@@ -1222,6 +1186,11 @@ protected FilterResults performFiltering(CharSequence constraint) {
@SuppressWarnings("unchecked")
protected void publishResults(CharSequence constraint, FilterResults results) {
clear();
+ TextView tvStats = (TextView) findViewById(R.id.tvStats);
+ ProgressBar pbFilter = (ProgressBar) findViewById(R.id.pbFilter);
+ pbFilter.setVisibility(ProgressBar.GONE);
+ tvStats.setVisibility(TextView.VISIBLE);
+ tvStats.setText(results.count + "/" + AppListAdapter.this.mListAppSelected.size());
if (results.values == null)
notifyDataSetInvalidated();
else {
diff --git a/src/biz/bokhorst/xprivacy/ApplicationInfoEx.java b/src/biz/bokhorst/xprivacy/ApplicationInfoEx.java
index 89a79311a..a4da55956 100644
--- a/src/biz/bokhorst/xprivacy/ApplicationInfoEx.java
+++ b/src/biz/bokhorst/xprivacy/ApplicationInfoEx.java
@@ -83,7 +83,6 @@ private void Initialize(Context context, ApplicationInfo appInfo) {
public static List getXApplicationList(Context context, ProgressDialog dialog) {
// Get references
PackageManager pm = context.getPackageManager();
- boolean fSystem = PrivacyManager.getSettingBool(null, context, PrivacyManager.cSettingFSystem, true, false);
// Get app list
SparseArray mapApp = new SparseArray();
@@ -94,14 +93,12 @@ public static List getXApplicationList(Context context, Progr
try {
dialog.setProgress(app + 1);
ApplicationInfoEx xAppInfo = new ApplicationInfoEx(context, listAppInfo.get(app));
- if (fSystem ? !(xAppInfo.isFrozen() || xAppInfo.getIsSystem()) : true) {
- ApplicationInfoEx yAppInfo = mapApp.get(xAppInfo.getUid());
- if (yAppInfo == null) {
- mapApp.put(xAppInfo.getUid(), xAppInfo);
- listApp.add(xAppInfo);
- } else
- yAppInfo.AddApplicationName(getApplicationName(listAppInfo.get(app), pm));
- }
+ ApplicationInfoEx yAppInfo = mapApp.get(xAppInfo.getUid());
+ if (yAppInfo == null) {
+ mapApp.put(xAppInfo.getUid(), xAppInfo);
+ listApp.add(xAppInfo);
+ } else
+ yAppInfo.AddApplicationName(getApplicationName(listAppInfo.get(app), pm));
} catch (Throwable ex) {
Util.bug(null, ex);
}