Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Commit

Permalink
Setting for browser user agent
Browse files Browse the repository at this point in the history
Fixes #608
  • Loading branch information
Marcel Bokhorst committed Aug 31, 2013
1 parent 32e709a commit 50c9ed0
Show file tree
Hide file tree
Showing 39 changed files with 58 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,7 @@ How to get beta releases:
* Split restriction cache timeout (15 seconds) and settings cache timeout (30 seconds)
* Fixed not handled exception ([issue](https://github.com/M66B/XPrivacy/issues/610))
* Send intent *biz.bokhorst.xprivacy.action.ACTIVE* after boot ([issue](https://github.com/M66B/XPrivacy/issues/606))
* Setting for browser user agent ([issue](https://github.com/M66B/XPrivacy/issues/608))
* Updated Lithuanian translation
* Updated Russian translation
* Updated Turkish translation
Expand Down
12 changes: 12 additions & 0 deletions res/layout/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,18 @@
android:maxLength="15" />
</TableRow>

<TableRow>

<TextView
android:text="@string/settings_ua"
android:textIsSelectable="false" />

<EditText
android:id="@+id/etUa"
android:hint="Mozilla/5.0 (Linux; U; Android; en-us) AppleWebKit/999+ (KHTML, like Gecko) Safari/999.9"
android:inputType="text|textNoSuggestions" />
</TableRow>

<TableRow>

<CheckBox
Expand Down
1 change: 1 addition & 0 deletions res/values-ar/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
<string name="settings_country">الدولة</string>
<string name="settings_operator">المُشغل</string>
<string name="settings_subscriber">IMSI</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">تصفية بواسطة الأُذونات</string>
<string name="settings_fapplication">تصفية بواسطة نوع التطبيق</string>
<string name="settings_log"> سِجِل تصحيح الأخطاء (يتطلب إعادة التشغيل) </string>
Expand Down
1 change: 1 addition & 0 deletions res/values-bg/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
<string name="settings_country">Държава</string>
<string name="settings_operator">Operator</string>
<string name="settings_subscriber">Абонатно ID</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">Филтриране по разрешения</string>
<string name="settings_fapplication">Filter by application type</string>
<string name="settings_log">Debug log (requires restart)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-ca/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
<string name="settings_country">País</string>
<string name="settings_operator">Operador</string>
<string name="settings_subscriber">ID de subscriptor</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">Filta per permís</string>
<string name="settings_fapplication">Filter by application type</string>
<string name="settings_log">Debug log (requires restart)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-cs/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ nicméně je nemožné zaručit bezchybnou funkčnost na všech zařízeních a
<string name="settings_country">Země</string>
<string name="settings_operator">Operátor</string>
<string name="settings_subscriber">IMSI</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">Filtrovat dle oprávnění</string>
<string name="settings_fapplication">Filter by application type</string>
<string name="settings_log">Debug log (requires restart)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-da/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ however it is impossible to guarantee it will work flawless on each and every de
<string name="settings_country">Land</string>
<string name="settings_operator">Operator</string>
<string name="settings_subscriber">Abonnent ID</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">Filtrer efter Restriktioner</string>
<string name="settings_fapplication">Filter by application type</string>
<string name="settings_log">Debug log (requires restart)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
<string name="settings_country">Land</string>
<string name="settings_operator">Mobilfunkanbieter</string>
<string name="settings_subscriber">Subscriber-ID</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">Nach Android-Berechtigungen filtern</string>
<string name="settings_fapplication">Nach App-Typ filtern</string>
<string name="settings_log">Debug Log (erfordert Neustart)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-el/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
<string name="settings_country">Χώρα</string>
<string name="settings_operator">Operator</string>
<string name="settings_subscriber">Αναγνωριστικό συνδρομητή</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">Φιλτράρισμα ανά άδεια</string>
<string name="settings_fapplication">Filter by application type</string>
<string name="settings_log">Debug log (requires restart)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ however it is impossible to guarantee it will work flawless on each and every de
<string name="settings_country">País</string>
<string name="settings_operator">Operator</string>
<string name="settings_subscriber">Subscriber ID</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">Ocultar permisos no utilizados</string>
<string name="settings_fapplication">Filter by application type</string>
<string name="settings_log">Debug log (requires restart)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-fa/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
<string name="settings_country">کشور</string>
<string name="settings_operator">اپراتور</string>
<string name="settings_subscriber">شناسه مشترک</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">فیلتر بر اساس مجوزها</string>
<string name="settings_fapplication">Filter by application type</string>
<string name="settings_log">لاگ ایرادیابی (نیازمند دوباره راه اندازی می باشد)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ il est impossible de garantir un fonctionnement parfait sur chaque appareil et p
<string name="settings_country">Pays</string>
<string name="settings_operator">Opérateur</string>
<string name="settings_subscriber">ID Abonné</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">Filtrer par permissions</string>
<string name="settings_fapplication">Filtrer par type d\'application</string>
<string name="settings_log">Debug log (redémarrage nécessaire)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-he/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ however it is impossible to guarantee it will work flawless on each and every de
<string name="settings_country">מדינה</string>
<string name="settings_operator">Operator</string>
<string name="settings_subscriber">מנוי ID</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">סינון לפי הרשאות</string>
<string name="settings_fapplication">Filter by application type</string>
<string name="settings_log">Debug log (requires restart)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-hi/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
<string name="settings_country">देश</string>
<string name="settings_operator">ऑपरेटर</string>
<string name="settings_subscriber">ग्राहक क्रमांक</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">अनुमति के द्वारा फिल्टर करे</string>
<string name="settings_fapplication">Application के प्रकार के द्वारा फिल्टर करे</string>
<string name="settings_log">Debug log (पुनरारंभ जरूरी)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-hu/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ de lehetetlen garantálni hogy tökéletesen működjön az összes eszközön
<string name="settings_country">Ország</string>
<string name="settings_operator">Operator</string>
<string name="settings_subscriber">Előfizető azonosító</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">Szűrés engedély szerint</string>
<string name="settings_fapplication">Filter by application type</string>
<string name="settings_log">Debug log (requires restart)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
<string name="settings_country">Nazione</string>
<string name="settings_operator">Operatore</string>
<string name="settings_subscriber">Subscriber ID</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">Filtra per permessi</string>
<string name="settings_fapplication">Filter by application type</string>
<string name="settings_log">Debug log (requires restart)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-iw/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ however it is impossible to guarantee it will work flawless on each and every de
<string name="settings_country">מדינה</string>
<string name="settings_operator">Operator</string>
<string name="settings_subscriber">מנוי ID</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">סינון לפי הרשאות</string>
<string name="settings_fapplication">Filter by application type</string>
<string name="settings_log">Debug log (requires restart)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-ja/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
<string name="settings_country">国</string>
<string name="settings_operator">キャリア</string>
<string name="settings_subscriber">契約者固有ID</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">権限でフィルタ</string>
<string name="settings_fapplication">アプリタイプでフィルタ</string>
<string name="settings_log">デバッグログ(要再起動)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-lt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ Tačiau neįmanoma garantuoti, kad dirbs nepriekaištingai su kiekvienu prietais
<string name="settings_country">Šalis</string>
<string name="settings_operator">Operatorius</string>
<string name="settings_subscriber">Abonento ID</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">Tik naudojami leidimai</string>
<string name="settings_fapplication">Filter by application type</string>
<string name="settings_log">DEBUG žurnalas (reikia paleisti iš naujo)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-nb-rNO/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
<string name="settings_country">Land</string>
<string name="settings_operator">Operator</string>
<string name="settings_subscriber">Abonnent ID</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">Velg etter tillatelse</string>
<string name="settings_fapplication">Filter by application type</string>
<string name="settings_log">Debug log (requires restart)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-nl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ maar het is onmogelijk om te garanderen dat het op elk apparaat en voor elke app
<string name="settings_country">Land</string>
<string name="settings_operator">Operator</string>
<string name="settings_subscriber">Abonnee ID</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">Filter op rechten</string>
<string name="settings_fapplication">Filter by application type</string>
<string name="settings_log">Debug log (herstart vereist)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-nn-rNO/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
<string name="settings_country">Land</string>
<string name="settings_operator">Operator</string>
<string name="settings_subscriber">Abonnent ID</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">Velg etter tillatelse</string>
<string name="settings_fapplication">Filter by application type</string>
<string name="settings_log">Debug log (requires restart)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-no-rNO/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
<string name="settings_country">Land</string>
<string name="settings_operator">Operator</string>
<string name="settings_subscriber">Abonnent ID</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">Velg etter tillatelse</string>
<string name="settings_fapplication">Filter by application type</string>
<string name="settings_log">Debug log (requires restart)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-pl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
<string name="settings_country">Kraj</string>
<string name="settings_operator">Operator</string>
<string name="settings_subscriber">Subscriber ID</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">Filtruj według uprawnień</string>
<string name="settings_fapplication">Filtruj według typu aplikacji</string>
<string name="settings_log">Debug log (wymaga restartu)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-pt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ porém é impossível garantir que irá funcionar sem problemas em todos os disp
<string name="settings_country">País</string>
<string name="settings_operator">Operador</string>
<string name="settings_subscriber">Identidade do subscritor</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">Filtrar por permissão</string>
<string name="settings_fapplication">Filter by application type</string>
<string name="settings_log">Relatório de depuração (requer reinicialização)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-ro/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ however it is impossible to guarantee it will work flawless on each and every de
<string name="settings_country">Country</string>
<string name="settings_operator">Operator</string>
<string name="settings_subscriber">Subscriber ID</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">Filter by permission</string>
<string name="settings_fapplication">Filter by application type</string>
<string name="settings_log">Debug log (requires restart)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
<string name="settings_country">Страна</string>
<string name="settings_operator">Оператор</string>
<string name="settings_subscriber">Subscriber ID</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">Фильтровать по разрешениям</string>
<string name="settings_fapplication">Фильтровать по типу приложения</string>
<string name="settings_log">Отладочный лог (требует перезагрузки)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-sk/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ avšak nie je nemožné zaručiť, že bude fungovať bezchybne na každom zaria
<string name="settings_country">Krajina</string>
<string name="settings_operator">Operátor</string>
<string name="settings_subscriber">IMSI</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">Filtrovať podľa povolenia</string>
<string name="settings_fapplication">Filtrovať podľa typu aplikácie</string>
<string name="settings_log">Záznam na ladenie (vyžaduje reštart)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-sl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
<string name="settings_country">Država</string>
<string name="settings_operator">Operater</string>
<string name="settings_subscriber">ID naročnika</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">Filtriraj po pravicah</string>
<string name="settings_fapplication">Filter by application type</string>
<string name="settings_log">Debug log (requires restart)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-sr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ however it is impossible to guarantee it will work flawless on each and every de
<string name="settings_country">Земља</string>
<string name="settings_operator">Operator</string>
<string name="settings_subscriber">Претплатнички ИД</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">Филтрирај по дозволи</string>
<string name="settings_fapplication">Filter by application type</string>
<string name="settings_log">Debug log (requires restart)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-sv/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ Det är emellertid omöjligt att garantera att appen fungerar på alla enheter o
<string name="settings_country">Land</string>
<string name="settings_operator">Operatör</string>
<string name="settings_subscriber">Abonnent-ID</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">Filtrera efter behörighet</string>
<string name="settings_fapplication">Filter by application type</string>
<string name="settings_log">Debug log (requires restart)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-tr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
<string name="settings_country">Ülke</string>
<string name="settings_operator">Operator</string>
<string name="settings_subscriber">Sim Numarası (IMSI)</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">İzne göre gizle</string>
<string name="settings_fapplication">Uygulama tipine göre gizle</string>
<string name="settings_log">Hata ayıklama modu (Yeniden başlatma gerekir)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-vi/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
<string name="settings_country">Nước</string>
<string name="settings_operator">Nhà mạng</string>
<string name="settings_subscriber">ID người đăng kí</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">Lọc theo quyền</string>
<string name="settings_fapplication">Lọc theo kiểu ứng dụng</string>
<string name="settings_log">Lưu thông tin gỡ rối (yêu cầu khởi động lại)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
<string name="settings_country">国家</string>
<string name="settings_operator">运营商</string>
<string name="settings_subscriber">IMSI</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">无关权限过滤</string>
<string name="settings_fapplication">按应用级别过滤</string>
<string name="settings_log">调试日志 (需要重启)</string>
Expand Down
1 change: 1 addition & 0 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ however it is impossible to guarantee it will work flawless on each and every de
<string name="settings_operator">Operator</string>
<string name="settings_iccid" translatable="false">ICC ID</string>
<string name="settings_subscriber">Subscriber ID</string>
<string name="settings_ua">User agent</string>
<string name="settings_fpermission">Filter by permission</string>
<string name="settings_fapplication">Filter by application type</string>
<string name="settings_log">Debug log (requires restart)</string>
Expand Down
4 changes: 4 additions & 0 deletions src/biz/bokhorst/xprivacy/ActivityMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,7 @@ private void optionSettings() {
final EditText etOperator = (EditText) dlgSettings.findViewById(R.id.etOperator);
final EditText etIccId = (EditText) dlgSettings.findViewById(R.id.etIccId);
final EditText etSubscriber = (EditText) dlgSettings.findViewById(R.id.etSubscriber);
final EditText etUa = (EditText) dlgSettings.findViewById(R.id.etUa);
final CheckBox cbLog = (CheckBox) dlgSettings.findViewById(R.id.cbLog);
final Button btnRandom = (Button) dlgSettings.findViewById(R.id.btnRandom);
final CheckBox cbRandom = (CheckBox) dlgSettings.findViewById(R.id.cbRandom);
Expand Down Expand Up @@ -645,6 +646,7 @@ private void optionSettings() {
etIccId.setText(PrivacyManager.getSetting(null, ActivityMain.this, 0, PrivacyManager.cSettingIccId, "", false));
etSubscriber.setText(PrivacyManager.getSetting(null, ActivityMain.this, 0, PrivacyManager.cSettingSubscriber,
"", false));
etUa.setText(PrivacyManager.getSetting(null, ActivityMain.this, 0, PrivacyManager.cSettingUa, "", false));
cbLog.setChecked(log);
cbRandom.setChecked(random);

Expand Down Expand Up @@ -749,6 +751,8 @@ public void onClick(View view) {
.toString());
PrivacyManager.setSetting(null, ActivityMain.this, 0, PrivacyManager.cSettingSubscriber, etSubscriber
.getText().toString());
PrivacyManager.setSetting(null, ActivityMain.this, 0, PrivacyManager.cSettingUa, etUa.getText()
.toString());

PrivacyManager.setSetting(null, ActivityMain.this, 0, PrivacyManager.cSettingLog,
Boolean.toString(cbLog.isChecked()));
Expand Down
Loading

0 comments on commit 50c9ed0

Please sign in to comment.