Merge "Fix NPE in bluetooth Permission Activity" into jb-mr1-dev
diff --git a/res/values-af/strings.xml b/res/values-af/strings.xml
index c5f2d94..aabe835 100644
--- a/res/values-af/strings.xml
+++ b/res/values-af/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s wil toegang hê tot jou kontakte en oproepgeskiedenis. Gee toegang aan %2$s?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Moenie weer vra nie"</string>
<string name="date_and_time" msgid="4114084177056654663">"Datum- en tydinstellings"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1:00 nm"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Kies tydsone"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Volgens streek (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Voorskou:"</string>
diff --git a/res/values-am/strings.xml b/res/values-am/strings.xml
index 9392e14..02145fa 100644
--- a/res/values-am/strings.xml
+++ b/res/values-am/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s የአንተን ዕውቂያዎች እና የጥሪ ታሪኮች ለመድረስ ይፈልጋል ። ለ%2$s መድረስ ይሰጥ?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"ዳግመኛ አትጠይቅ"</string>
<string name="date_and_time" msgid="4114084177056654663">"ቀን& የሰዓትቅንብሮች"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"ከሰዓት በኃላ1:00"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"የጊዜ ሰቅ ምረጥ"</string>
<string name="normal_date_format" msgid="7636406984925498359">"የአካባቢው (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"ቅድመ-ዕይታ"</string>
diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml
index e9c2eeb..d297678 100644
--- a/res/values-ar/strings.xml
+++ b/res/values-ar/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"يريد %1$s الدخول إلى جهات الاتصال وسجل المكالمات. هل تريد منحه حق الدخول إلى %2$s؟"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"لا تسألني مرة أخرى"</string>
<string name="date_and_time" msgid="4114084177056654663">"إعدادات التاريخ والوقت"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1:00 م"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"اختيار المنطقة الزمنية"</string>
<string name="normal_date_format" msgid="7636406984925498359">"إقليمي (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"معاينة:"</string>
diff --git a/res/values-be/strings.xml b/res/values-be/strings.xml
index c7535f8..ed27ea8 100644
--- a/res/values-be/strings.xml
+++ b/res/values-be/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s спрабуе атрымаць доступ да вашых кантактаў і гісторыі выклікаў. Дазволіць доступ тэлефоннай кнiзе %2$s?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Больш не пытацца"</string>
<string name="date_and_time" msgid="4114084177056654663">"Налады даты і часу"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1:00 пасля поўдню"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Вылучыце гадзінны пояс"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Рэгіянальны фармат даты (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Прагляд:"</string>
diff --git a/res/values-bg/strings.xml b/res/values-bg/strings.xml
index 3aff202..4d8bde5 100644
--- a/res/values-bg/strings.xml
+++ b/res/values-bg/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"От %1$s се иска достъп до вашите контакти и история на обажданията. Да се даде ли достъп до %2$s?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Без повторно питане"</string>
<string name="date_and_time" msgid="4114084177056654663">"Настройки за дата и час"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"13:00"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Избор на часова зона"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Регионално (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Визуализация:"</string>
diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml
index 5d86d32..342f3c1 100644
--- a/res/values-ca/strings.xml
+++ b/res/values-ca/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"A %1$s li agradaria accedir als teus contactes i a l\'historial de trucades. Vols donar accés a %2$s?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"No m\'ho tornis a preguntar"</string>
<string name="date_and_time" msgid="4114084177056654663">"Configuració de data i hora"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1:00 p. m."</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Selecció de la zona horària"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Regional (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Previsualitza:"</string>
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index 004d6ee..d10e387 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"Zařízení %1$s žádá o přístup k vašim kontaktům a historii hovorů. Povolit zařízení %2$s přístup?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Příště se neptat"</string>
<string name="date_and_time" msgid="4114084177056654663">"Nastavení data a času"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"13:00"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Vybrat časové pásmo"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Regionální (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Náhled:"</string>
diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml
index 159d64f..bbe3f59 100644
--- a/res/values-da/strings.xml
+++ b/res/values-da/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s vil gerne have adgang til dine kontaktpersoner og opkaldsoversigt. Vil du give %2$s adgang?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Spørg ikke igen"</string>
<string name="date_and_time" msgid="4114084177056654663">"Indstillinger for dato og tid"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1:00 pm"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Vælg tidszone"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Regional (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Eksempelvisning:"</string>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index b82b88b..583898b 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s möchte auf Ihre Kontakte und Ihre Anrufliste zugreifen. Möchten Sie %2$s den Zugriff erlauben?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Nicht mehr fragen"</string>
<string name="date_and_time" msgid="4114084177056654663">"Einstellungen für Datum & Uhrzeit"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1:00"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Zeitzone wählen"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Lokal (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Vorschau:"</string>
diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml
index d82ffb7..802350e 100644
--- a/res/values-el/strings.xml
+++ b/res/values-el/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"Το %1$s ζητά πρόσβαση στις επαφές και στο ιστορικό κλήσεών σας. Να εκχωρηθεί πρόσβαση στο %2$s;"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Να μην ερωτηθώ ξανά"</string>
<string name="date_and_time" msgid="4114084177056654663">"Ρυθμίσεις ημερομηνίας & ώρας"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1:00 μμ"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Επιλέξτε ζώνη ώρας"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Τοπική (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Προεπισκόπηση:"</string>
diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml
index 63c37a2..93e46ac 100644
--- a/res/values-en-rGB/strings.xml
+++ b/res/values-en-rGB/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s wants to access your contacts and call history. Give access to %2$s?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Don\'t ask again"</string>
<string name="date_and_time" msgid="4114084177056654663">"Date & time settings"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1:00 P.M."</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Choose time zone"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Regional (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Preview:"</string>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index 0f33492..e7bb64e 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s desea acceder a tus contactos y a tu historial de llamadas. ¿Deseas darle acceso a %2$s?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"No volver a preguntar"</string>
<string name="date_and_time" msgid="4114084177056654663">"Configuración de fecha y hora"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1:00 p. m."</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Elige la zona horaria"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Regional (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Vista previa:"</string>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 0e5df23..cc76e3b 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s quiere acceder a tus contactos y a tu historial de llamadas. ¿Quieres permitir el acceso a %2$s?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"No volver a preguntar"</string>
<string name="date_and_time" msgid="4114084177056654663">"Ajustes de fecha y hora"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1:00 p.m."</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Seleccionar zona horaria"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Regional (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Vista previa:"</string>
diff --git a/res/values-et/strings.xml b/res/values-et/strings.xml
index 7579c22..aa40f78 100644
--- a/res/values-et/strings.xml
+++ b/res/values-et/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s soovib juurdepääsu teie kontaktisikutele ja kõneajaloole. Kas lubate juurdepääsu kasutajale %2$s?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Ära enam küsi"</string>
<string name="date_and_time" msgid="4114084177056654663">"Kuupäeva ja kellaaja seaded"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"13:00"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Ajavööndi valimine"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Piirkondlik (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Eelvaade:"</string>
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index 63c7bf5..2311c5e 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s میخواهد به مخاطبین و سابقه تماس شما دسترسی پیدا کند. اجازهٔ دسترسی به %2$s داده شود؟"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"دوباره سؤال نشود"</string>
<string name="date_and_time" msgid="4114084177056654663">"تنظیمات تاریخ و ساعت"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1:00 ب.ظ"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"انتخاب منطقهٔ زمانی"</string>
<string name="normal_date_format" msgid="7636406984925498359">"منطقهای (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"پیشنمایش:"</string>
diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml
index 8f150b0..d7e7cbf 100644
--- a/res/values-fi/strings.xml
+++ b/res/values-fi/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s pyytää yhteystietojesi ja puheluhistoriasi käyttöoikeutta. Annetaanko käyttöoikeus (%2$s)?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Älä kysy uudestaan"</string>
<string name="date_and_time" msgid="4114084177056654663">"Päivämäärä- ja aika-asetukset"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1.00 ip"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13.00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Valitse aikavyöhyke"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Paikallinen (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Esikatselu:"</string>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index ad9bcbd..90f3f96 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s souhaite accéder à vos contacts et à l\'historique de vos appels. Autoriser l\'accès à %2$s ?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Ne plus me demander"</string>
<string name="date_and_time" msgid="4114084177056654663">"Paramètres d\'heure et de date"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1:00 pm"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Sélectionner le fuseau horaire"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Format régional (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Aperçu :"</string>
diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml
index 70dc4f1..29600d3 100644
--- a/res/values-hi/strings.xml
+++ b/res/values-hi/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s आपके संपर्कों और कॉल इतिहास में पहुंच प्राप्त करना चाहता है. %2$s पर पहुंच दें?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"फिर से न पूछें"</string>
<string name="date_and_time" msgid="4114084177056654663">"दिनांक और समय सेटिंग"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1:00 सायं"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"समय क्षेत्र चुनें"</string>
<string name="normal_date_format" msgid="7636406984925498359">"क्षेत्रीय (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"पूर्वावलोकन:"</string>
diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml
index 32b5ec2..ad33552 100644
--- a/res/values-hr/strings.xml
+++ b/res/values-hr/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"Korisnik %1$s želio bi pristupiti vašim kontaktima i povijesti poziva. Dati pristup korisniku %2$s?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Više me ne pitaj"</string>
<string name="date_and_time" msgid="4114084177056654663">"Postavke datuma i vremena"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"13 h"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13 h"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Odabir vremenske zone"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Regionalno (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Pregled:"</string>
diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml
index 39fc2c7..ea6fce23 100644
--- a/res/values-hu/strings.xml
+++ b/res/values-hu/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"A(z) %1$s szeretne hozzáférni névjegyeihez és a híváselőzményekhez. Megadja a hozzáférést a(z) %2$s eszköznek?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Ne jelenjen meg többé"</string>
<string name="date_and_time" msgid="4114084177056654663">"Dátum és idő beállításai"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"du. 1:00"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Válasszon időzónát"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Regionális (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Előnézet:"</string>
diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml
index 571fc5a..7ba0a86 100644
--- a/res/values-in/strings.xml
+++ b/res/values-in/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s ingin mengakses kontak dan riwayat panggilan Anda. Berikan akses ke %2$s?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Jangan tanya lagi"</string>
<string name="date_and_time" msgid="4114084177056654663">"Setelan tanggal & waktu"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1.00 pm"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13.00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Pilih zona waktu"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Daerah (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Pratinjau:"</string>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index 6d31699..cd1ea3d 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s desidera accedere ai tuoi contatti e alla tua cronologia chiamate. Consentire l\'accesso a %2$s?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Non chiedermelo più"</string>
<string name="date_and_time" msgid="4114084177056654663">"Impostazioni data e ora"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"13:00"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Scegli il fuso orario"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Regionale (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Anteprima:"</string>
diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml
index d188ce9..f621d7d 100644
--- a/res/values-iw/strings.xml
+++ b/res/values-iw/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s רוצה לגשת לאנשי הקשר ולהיסטוריית השיחות שלך. האם להעניק ל-%2$s גישה?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"אל תשאל שוב"</string>
<string name="date_and_time" msgid="4114084177056654663">"הגדרות תאריך ושעה"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"13:00"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"בחר אזור זמן"</string>
<string name="normal_date_format" msgid="7636406984925498359">"אזורי (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"תצוגה מקדימה:"</string>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index 991be5d..8ebdae5 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -164,8 +164,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$sが連絡先と通話履歴にアクセスしようとしています。%2$sにアクセスを許可しますか?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"次回から表示しない"</string>
<string name="date_and_time" msgid="4114084177056654663">"日付と時刻"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1:00 PM"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"タイムゾーンの選択"</string>
<string name="normal_date_format" msgid="7636406984925498359">"地域(<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"プレビュー:"</string>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index 96dde1c..0aa796e 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s이(가) 주소록과 통화 기록에 액세스하려고 합니다. %2$s에 액세스 권한을 제공하시겠습니까?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"다시 묻지 않음"</string>
<string name="date_and_time" msgid="4114084177056654663">"날짜 및 시간 설정"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1:00 PM"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"시간대 선택"</string>
<string name="normal_date_format" msgid="7636406984925498359">"기본값(<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"미리보기:"</string>
diff --git a/res/values-lt/strings.xml b/res/values-lt/strings.xml
index 00aafe6..02063df 100644
--- a/res/values-lt/strings.xml
+++ b/res/values-lt/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s nori pasiekti jūsų kontaktus ir skambučių istoriją. Suteikti prieigą %2$s?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Daugiau neklausti"</string>
<string name="date_and_time" msgid="4114084177056654663">"Datos ir laiko nustatymai"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"13:00"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Pasirinkite laiko juostą"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Pagal vietovę (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Peržiūra:"</string>
diff --git a/res/values-lv/strings.xml b/res/values-lv/strings.xml
index a000cdd..ad2c087 100644
--- a/res/values-lv/strings.xml
+++ b/res/values-lv/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"Ierīce %1$s vēlas piekļūt jūsu kontaktpersonām un zvanu vēsturei. Vai sniegt piekļuvi ierīcei %2$s?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Nejautāt atkārtoti"</string>
<string name="date_and_time" msgid="4114084177056654663">"Datuma un laika iestatījumi"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"13.00"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13.00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Laika joslas izvēle"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Reģionāls (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Priekšskatījums:"</string>
diff --git a/res/values-ms/strings.xml b/res/values-ms/strings.xml
index 1a6e670..e54a3eb 100644
--- a/res/values-ms/strings.xml
+++ b/res/values-ms/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s mahu mengakses kenalan dan sejarah panggilan anda. Beri akses kepada %2$s?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Jangan tanya lagi"</string>
<string name="date_and_time" msgid="4114084177056654663">"Tetapan tarikh & masa"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1:00 tengah hari"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Pilih zon masa"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Wilayah (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Pratonton:"</string>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index 0aee698..2bce46c 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s ønsker adgang til kontaktene og ringeloggen din. Vil du gi %2$s tilgang?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Ikke spør igjen"</string>
<string name="date_and_time" msgid="4114084177056654663">"Innstillinger for dato og tid"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1:00 ettermiddag"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Velg tidssone"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Regional (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Forhåndsvisning:"</string>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index c0418c5..9acd3ad 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s wil toegang tot uw contacten en oproepgeschiedenis. Toegang verlenen aan %2$s?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Niet meer vragen"</string>
<string name="date_and_time" msgid="4114084177056654663">"Datum- en tijdinstellingen"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"13:00 uur"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"01:00:00 PM"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Een tijdzone kiezen"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Regionaal (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Voorbeeld:"</string>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index 8c33a66..b8a3b11 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s chce uzyskać dostęp do Twoich kontaktów i historii połączeń. Zezwolić %2$s na dostęp?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Nie pytaj ponownie"</string>
<string name="date_and_time" msgid="4114084177056654663">"Ustawienia daty i godziny"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1:00 (po południu)"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Wybierz strefę czasową"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Regionalny (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Podgląd:"</string>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index 249e7e5..e921ac1 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s pretende aceder aos seus contactos e histórico de chamadas. Conceder acesso a %2$s?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Não perguntar novamente"</string>
<string name="date_and_time" msgid="4114084177056654663">"Definições de data e hora"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1:00 pm"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Escolher o fuso horário"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Regional (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Pré-visualização:"</string>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index f00de19..529b5a9 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s deseja acessar seus contatos e o histórico de chamadas. Conceder acesso a %2$s?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Não perguntar novamente"</string>
<string name="date_and_time" msgid="4114084177056654663">"Configurações de data e hora"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1:00 pm"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Selecione o fuso horário"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Regional (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Visualizar:"</string>
diff --git a/res/values-rm/strings.xml b/res/values-rm/strings.xml
index adc69546..d375bb2 100644
--- a/res/values-rm/strings.xml
+++ b/res/values-rm/strings.xml
@@ -223,8 +223,6 @@
<!-- no translation found for bluetooth_pb_remember_choice (2901499974259177202) -->
<skip />
<string name="date_and_time" msgid="4114084177056654663">"Parameters da data e da temp"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1:00:00"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00:00"</string>
<!-- no translation found for choose_timezone (1362834506479536274) -->
<skip />
<!-- no translation found for normal_date_format (7636406984925498359) -->
diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml
index 77a46b2..c4980b7 100644
--- a/res/values-ro/strings.xml
+++ b/res/values-ro/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s doreşte să acceseze Agenda dvs. şi istoricul apelurilor. Permiteţi accesul pentru %2$s?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Nu doresc să fiu întrebat(ă) din nou"</string>
<string name="date_and_time" msgid="4114084177056654663">"Setări privind data şi ora"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"13:00"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Selectaţi fusul orar"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Regional (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Previzualizaţi:"</string>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index 3c053e2..4b757b8 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"Устройство \"%1$s\" пытается получить доступ к вашим контактам и журналу вызовов. Разрешить доступ для %2$s?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Больше не спрашивать"</string>
<string name="date_and_time" msgid="4114084177056654663">"Настройки даты и времени"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1:00 pm"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Выбрать часовой пояс"</string>
<string name="normal_date_format" msgid="7636406984925498359">"По умолчанию (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Предварительный просмотр:"</string>
diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml
index b7c9cd2..7e19d66 100644
--- a/res/values-sk/strings.xml
+++ b/res/values-sk/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"Zariadenie %1$s žiada o prístup k vašim kontaktom a histórii hovorov. Povoliť zariadeniu %2$s prístup?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Nabudúce sa nepýtať"</string>
<string name="date_and_time" msgid="4114084177056654663">"Nastavenia dátumu a času"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1:00 pop."</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Zvoľte časové pásmo"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Miestne nastavenie (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Ukážka:"</string>
diff --git a/res/values-sl/strings.xml b/res/values-sl/strings.xml
index 049ad66..c214d9a 100644
--- a/res/values-sl/strings.xml
+++ b/res/values-sl/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s želi dostop do vaših stikov in zgodovine klicev. Želite dovoliti dostop osebi %2$s?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Ne vprašaj me več"</string>
<string name="date_and_time" msgid="4114084177056654663">"Datum in nastavitve"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"13.00"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13.00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Izberite časovni pas"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Območni (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Predogled:"</string>
diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml
index 6e1a603..de8dba3 100644
--- a/res/values-sr/strings.xml
+++ b/res/values-sr/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s жели да приступи вашим контактима и историји позива. Желите ли да одобрите приступ за %2$s?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Не питај поново"</string>
<string name="date_and_time" msgid="4114084177056654663">"Подешавања датума и времена"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"13:00"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Избор временске зоне"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Регионално (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Преглед:"</string>
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index 282350a..e533984 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s vill ha åtkomst till dina kontakter och din samtalshistorik. Vill du ge %2$s åtkomst?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Fråga inte igen"</string>
<string name="date_and_time" msgid="4114084177056654663">"Inställningar för datum och tid"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"Kl. 13:00"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Välj tidszon"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Lokalt (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Förhandsgranska:"</string>
diff --git a/res/values-sw/strings.xml b/res/values-sw/strings.xml
index 2dccc32..4aac1e7 100644
--- a/res/values-sw/strings.xml
+++ b/res/values-sw/strings.xml
@@ -164,8 +164,6 @@
<skip />
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Usiniulize tena"</string>
<string name="date_and_time" msgid="4114084177056654663">"Mipangilio ya tarehe na saa"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1:00 mchana"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Chagua ukanda wa saa"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Mkoa ( <xliff:g id="DATE">%s</xliff:g> )"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Hakiki:"</string>
diff --git a/res/values-th/strings.xml b/res/values-th/strings.xml
index ab511b4..f7d22e4 100644
--- a/res/values-th/strings.xml
+++ b/res/values-th/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s ต้องการเข้าถึงสมุดติดต่อและประวัติการโทรของคุณ อนุญาตให้ %2$s เข้าถึงหรือไม่"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"ไม่ต้องถามอีก"</string>
<string name="date_and_time" msgid="4114084177056654663">"การตั้งเวลาและวันที่"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1:00 pm"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"เลือกเขตเวลา"</string>
<string name="normal_date_format" msgid="7636406984925498359">"ท้องถิ่น (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"แสดงตัวอย่าง:"</string>
diff --git a/res/values-tl/strings.xml b/res/values-tl/strings.xml
index 82e64c7..c0d6b1d 100644
--- a/res/values-tl/strings.xml
+++ b/res/values-tl/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"Nais na i-access ni %1$s ang iyong mga contact at kasaysayan ng tawag. Bigyan ng access si %2$s?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Huwag nang tatanungin muli"</string>
<string name="date_and_time" msgid="4114084177056654663">"Mga setting ng petsa & oras"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1:00 pm"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Pumili ng time zone"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Panrehiyon (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Preview:"</string>
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index e1f3075..88d6c2b 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s, kişilerinize ve çağrı geçmişinize erişmek istiyor. %2$s uygulamasına erişim izni verilsin mi?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Tekrar sorma"</string>
<string name="date_and_time" msgid="4114084177056654663">"Tarih ve saat ayarları"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"13:00"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Saat dilimini seçin"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Bölgesel (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Önizleme:"</string>
diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml
index 402bffa..0054dfc 100644
--- a/res/values-uk/strings.xml
+++ b/res/values-uk/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s хоче отримати доступ до ваших контактів й історії викликів. Надати %2$s доступ?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Не запитувати знову"</string>
<string name="date_and_time" msgid="4114084177056654663">"Налаштування дати та часу"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1:00 пп"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Вибрати часовий пояс"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Регіональний (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Перегляд:"</string>
diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml
index 8d34abc..61f758b 100644
--- a/res/values-vi/strings.xml
+++ b/res/values-vi/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s muốn truy cập danh bạ và lịch sử cuộc gọi của bạn. Cấp quyền truy cập cho %2$s?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Không hỏi lại"</string>
<string name="date_and_time" msgid="4114084177056654663">"Cài đặt ngày & giờ"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1:00 ch"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Chọn múi giờ"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Khu vực (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Xem trước:"</string>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index bf42803..70615bd 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s想访问您的联系人信息和通话记录。要向%2$s授予访问权限吗?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"下次不再询问"</string>
<string name="date_and_time" msgid="4114084177056654663">"日期和时间设置"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"下午 1:00"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"选择时区"</string>
<string name="normal_date_format" msgid="7636406984925498359">"所在区域 (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"预览:"</string>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index 2ec5259..67d7d96 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"%1$s 想存取您的通訊錄和通話記錄。要將存取權授予 %2$s 嗎?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"不要再詢問"</string>
<string name="date_and_time" msgid="4114084177056654663">"日期與時間設定"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"下午 1:00"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"選擇時區"</string>
<string name="normal_date_format" msgid="7636406984925498359">"本地 (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"預覽:"</string>
diff --git a/res/values-zu/strings.xml b/res/values-zu/strings.xml
index b3c505d..e18cc50 100644
--- a/res/values-zu/strings.xml
+++ b/res/values-zu/strings.xml
@@ -162,8 +162,6 @@
<string name="bluetooth_pb_acceptance_dialog_text" msgid="6555508756987053866">"I-%1$s ifuna ukufinyelela kothintana nabo nomlando wekholi. Nikeza ukufinyelela ku-%2$s?"</string>
<string name="bluetooth_pb_remember_choice" msgid="2901499974259177202">"Ungabuzi futhi"</string>
<string name="date_and_time" msgid="4114084177056654663">"Usuku nezilungiselelo zesikhathi"</string>
- <string name="date_time_12_hour_sample" msgid="3259617262618020574">"1:00 pm"</string>
- <string name="date_time_24_hour_sample" msgid="8916857570746212357">"13:00"</string>
<string name="choose_timezone" msgid="1362834506479536274">"Khetha isikhathi sendawo"</string>
<string name="normal_date_format" msgid="7636406984925498359">"Okwesifunda (<xliff:g id="DATE">%s</xliff:g>)"</string>
<string name="display_preview_label" msgid="1127597250917274792">"Buka kuqala:"</string>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 2f209e7..42f4198 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -350,10 +350,6 @@
<!-- Date & time settings screen title -->
<string name="date_and_time">Date & time settings</string>
- <!-- Date/time settings. Summary of the checkbox for choosing between 12 hour time or 24 hour time. Sample of 12-hour time -->
- <string name="date_time_12_hour_sample">1:00 pm</string>
- <!-- Date/time settings. Summary of the checkbox for choosing between 12 hour time or 24 hour time. Sample of 24-hour time -->
- <string name="date_time_24_hour_sample">13:00</string>
<!-- The title of the activity to pick a time zone. -->
<string name="choose_timezone">Choose time zone</string>
<!-- Do not translate. Used as the value for a setting. -->
@@ -1969,6 +1965,9 @@
<!-- Storage setting. Summary for PTP checkbox [CHAR LIMIT=NONE]-->
<string name="usb_label_installer_cd">"Install file-transfer tools"</string>
+ <!-- Section header above list of other users storage [CHAR LIMIT=32] -->
+ <string name="storage_other_users">Other users</string>
+
<!-- Phone info screen, section titles: -->
<string name="battery_status_title">Battery status</string>
<!-- Phone info screen, section titles: -->
@@ -2386,6 +2385,10 @@
from unknown sources. You agree that you are solely responsible for any
damage to your phone or loss of data that may result from using
these apps.</string>
+ <!-- Applications settings screen, setting check box title. If checked, the system will send package verification requests to package verifiers on the device who will ultimately allow or reject the installation of applications. [CHAR LIMIT=30] -->
+ <string name="verify_applications">App check</string>
+ <!-- Applications settings screen, setting check box summary. This is the summary for "App Check" checkbox. [CHAR LIMIT=none] -->
+ <string name="verify_applications_summary">Disallow or warn before installation of apps that may cause harm</string>
<!-- Applications settings screen, setting check box title. If checked, applications show more settings options. -->
<string name="advanced_settings">Advanced settings</string>
<!-- Applications settings screen, setting check box summary. This is the summary for "Advanced settings" checkbox -->
@@ -2977,30 +2980,52 @@
<string name="accessibility_settings">Accessibility</string>
<!-- Settings title for accessibility settings screen -->
<string name="accessibility_settings_title">Accessibility settings</string>
-
<!-- Title for the accessibility preference category of accessibility services. [CHAR LIMIT=25] -->
<string name="accessibility_services_title">Services</string>
-
<!-- Title for the accessibility preference category of system related preferences. [CHAR LIMIT=25] -->
<string name="accessibility_system_title">System</string>
+ <!-- Title for the accessibility preference screen to enable screen magnification. [CHAR LIMIT=35] -->
+ <string name="accessibility_screen_magnification_title">Screen magnification</string>
+ <!-- Summary for the accessibility preference screen to enable screen magnification. [CHAR LIMIT=35] -->
+ <string name="accessibility_screen_magnification_summary">
+ When screen magnification is on, you can:\n
+ \n
+ Temporary zoom-in: Triple-tap & hold.\n
+ Toggle permanent zoom state: Triple-tap & release.\n
+ \n
+ Adjust zoomed area: Triple-tap & hold to zoom, then drag your finger across the screen.\n
+ Pan when zoomed-in: Drag two or more fingers across the screen.\n
+ \n
+ Adjust zoom level when zoomed-out: Triple-tap & hold to zoom, then drag one or more fingers.\n
+ Adjust zoom level when zoomed-in: Pinch with two or more fingers.\n
+ </string>
+
<!-- Title for the accessibility preference to enable large text. [CHAR LIMIT=35] -->
- <string name="accessibility_toggle_large_text_title">Large text</string>
+ <string name="accessibility_toggle_large_text_preference_title">Large text</string>
+ <!-- Title for the accessibility preference to enable screen magnification. [CHAR LIMIT=35] -->
+ <string name="accessibility_toggle_screen_magnification_preference_title">Screen magnification</string>
+ <!-- Title for the accessibility preference to auto update screen magnification. [CHAR LIMIT=35] -->
+ <string name="accessibility_toggle_screen_magnification_auto_update_preference_title">Auto
+ update screen magnification</string>
+ <!-- Summary for the accessibility preference to auto update screen magnification. [CHAR LIMIT=50] -->
+ <string name="accessibility_toggle_screen_magnification_auto_update_preference_summary">Update
+ screen magnification on app transitions</string>
<!-- Title for the accessibility preference to power button to end a call. [CHAR LIMIT=35] -->
- <string name="accessibility_power_button_ends_call_title">Power button ends call</string>
+ <string name="accessibility_power_button_ends_call_prerefence_title">Power button ends call</string>
<!-- Title for the accessibility preference to speak passwords. [CHAR LIMIT=35] -->
- <string name="accessibility_speak_password_title">Speak passwords</string>
+ <string name="accessibility_toggle_speak_password_preference_title">Speak passwords</string>
<!-- Title for accessibility preference to choose long-press delay i.e. timeout before it is detected. [CHAR LIMIT=35] -->
- <string name="accessibility_long_press_timeout_title">Touch & hold delay</string>
+ <string name="accessibility_long_press_timeout_preference_title">Touch & hold delay</string>
<!-- Title for accessibility preference to install accessibility scripts from Google. [CHAR LIMIT=35] -->
- <string name="accessibility_script_injection_title">Enhance web accessibility</string>
+ <string name="accessibility_toggle_script_injection_preference_title">Enhance web accessibility</string>
<!-- Title for accessibility menu item to lauch a settings activity. [CHAR LIMIT=15] -->
<string name="accessibility_menu_item_settings">Settings</string>
- <!-- Summary for the enabled state of an accessiblity serivce. [CHAR LIMIT=10] -->
- <string name="accessibility_service_state_on">On</string>
- <!-- Summary for the disabled state of an accessiblity serivce. [CHAR LIMIT=10] -->
- <string name="accessibility_service_state_off">Off</string>
+ <!-- Summary for the enabled state of an accessiblity feature. [CHAR LIMIT=10] -->
+ <string name="accessibility_feature_state_on">On</string>
+ <!-- Summary for the disabled state of an accessiblity feature. [CHAR LIMIT=10] -->
+ <string name="accessibility_feature_state_off">Off</string>
<!-- Summary for the allowed state of script injection. [CHAR LIMIT=15] -->
<string name="accessibility_script_injection_allowed">Allowed</string>
@@ -3856,6 +3881,15 @@
<string name="show_all_anrs_summary">Show App Not Responding dialog
for background apps</string>
+ <!-- Preference category for accessibility debugging development settings. [CHAR LIMIT=25] -->
+ <string name="debug_accessibility_category">Accessibility</string>
+
+ <!-- Accessibility debug setting: automatically update magnification state [CHAR LIMIT=50] -->
+ <string name="display_magnification_auto_update">Auto update magnification</string>
+ <!-- Accessibility debug setting: automatically update magnification state summary [CHAR LIMIT=100] -->
+ <string name="display_magnification_auto_update_summary">Zoom out on rotation or activity
+ start and pan to popped up windows.</string>
+
<!-- Activity title for network data usage summary. [CHAR LIMIT=25] -->
<string name="data_usage_summary_title">Data usage</string>
<!-- Title for option to pick visible time range from a list available usage periods. [CHAR LIMIT=25] -->
diff --git a/res/xml/accessibility_settings.xml b/res/xml/accessibility_settings.xml
index bf93eb5..e86dff6 100644
--- a/res/xml/accessibility_settings.xml
+++ b/res/xml/accessibility_settings.xml
@@ -27,14 +27,19 @@
android:key="system_category"
android:title="@string/accessibility_system_title">
+ <PreferenceScreen
+ android:fragment="com.android.settings.AccessibilitySettings$ToggleScreenMagnificationPreferenceFragment"
+ android:key="screen_magnification_preference_screen"
+ android:title="@string/accessibility_screen_magnification_title"/>
+
<CheckBoxPreference
android:key="toggle_large_text_preference"
- android:title="@string/accessibility_toggle_large_text_title"
+ android:title="@string/accessibility_toggle_large_text_preference_title"
android:persistent="false"/>
<CheckBoxPreference
android:key="toggle_power_button_ends_call_preference"
- android:title="@string/accessibility_power_button_ends_call_title"
+ android:title="@string/accessibility_power_button_ends_call_prerefence_title"
android:persistent="false"/>
<CheckBoxPreference
@@ -44,15 +49,15 @@
<CheckBoxPreference
android:key="toggle_speak_password_preference"
- android:title="@string/accessibility_speak_password_title"
+ android:title="@string/accessibility_toggle_speak_password_preference_title"
android:persistent="false"/>
- <PreferenceScreen android:key="tts_settings"
+ <PreferenceScreen android:key="tts_settings_preference"
android:fragment="com.android.settings.tts.TextToSpeechSettings"
- android:title="@string/tts_settings_title" />
+ android:title="@string/tts_settings_title"/>
<ListPreference android:key="select_long_press_timeout_preference"
- android:title="@string/accessibility_long_press_timeout_title"
+ android:title="@string/accessibility_long_press_timeout_preference_title"
android:entries="@array/long_press_timeout_selector_titles"
android:entryValues="@array/long_press_timeout_selector_values"
android:persistent="false"/>
@@ -60,7 +65,7 @@
<!-- We want a dialog with no title, so use an empty string to avoid a fall back to the preference title. -->
<com.android.settings.AccessibilityEnableScriptInjectionPreference
android:key="toggle_script_injection_preference"
- android:title="@string/accessibility_script_injection_title"
+ android:title="@string/accessibility_toggle_script_injection_preference_title"
android:dialogTitle=""
android:dialogIcon="@android:drawable/ic_dialog_alert"
android:dialogMessage="@string/accessibility_script_injection_security_warning_summary"
diff --git a/res/xml/date_time_prefs.xml b/res/xml/date_time_prefs.xml
index 657d6b3..1e7ac58 100644
--- a/res/xml/date_time_prefs.xml
+++ b/res/xml/date_time_prefs.xml
@@ -42,8 +42,7 @@
/>
<CheckBoxPreference android:key="24 hour"
android:title="@string/date_time_24hour"
- android:summaryOn="@string/date_time_24_hour_sample"
- android:summaryOff="@string/date_time_12_hour_sample"/>
+ />
<ListPreference
android:key="date_format"
android:title="@string/date_time_date_format"
diff --git a/res/xml/development_prefs.xml b/res/xml/development_prefs.xml
index 34c0ae3..575f802 100644
--- a/res/xml/development_prefs.xml
+++ b/res/xml/development_prefs.xml
@@ -202,4 +202,14 @@
</PreferenceCategory>
+ <PreferenceCategory android:key="debug_accessibility_category"
+ android:title="@string/debug_accessibility_category">
+
+ <CheckBoxPreference
+ android:key="accessibility_display_magnification_auto_update"
+ android:title="@string/display_magnification_auto_update"
+ android:summary="@string/display_magnification_auto_update_summary"/>
+
+ </PreferenceCategory>
+
</PreferenceScreen>
diff --git a/res/xml/security_settings_misc.xml b/res/xml/security_settings_misc.xml
index 9f78820..6f9311a 100644
--- a/res/xml/security_settings_misc.xml
+++ b/res/xml/security_settings_misc.xml
@@ -52,6 +52,12 @@
android:summaryOn="@string/install_unknown_applications"
android:persistent="false" />
+ <CheckBoxPreference
+ android:key="toggle_verify_applications"
+ android:title="@string/verify_applications"
+ android:summaryOff="@string/verify_applications_summary"
+ android:summaryOn="@string/verify_applications_summary"
+ android:persistent="false" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/credentials_title"
diff --git a/src/com/android/settings/AccessibilitySettings.java b/src/com/android/settings/AccessibilitySettings.java
index 4047555..592706c 100644
--- a/src/com/android/settings/AccessibilitySettings.java
+++ b/src/com/android/settings/AccessibilitySettings.java
@@ -30,7 +30,6 @@
import android.content.pm.ResolveInfo;
import android.content.pm.ServiceInfo;
import android.content.res.Configuration;
-import android.database.ContentObserver;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
@@ -75,38 +74,42 @@
public class AccessibilitySettings extends SettingsPreferenceFragment implements DialogCreatable,
Preference.OnPreferenceChangeListener {
private static final String DEFAULT_SCREENREADER_MARKET_LINK =
- "market://search?q=pname:com.google.android.marvin.talkback";
+ "market://search?q=pname:com.google.android.marvin.talkback";
private static final float LARGE_FONT_SCALE = 1.3f;
private static final String SYSTEM_PROPERTY_MARKET_URL = "ro.screenreader.market";
// Timeout before we update the services if packages are added/removed since
- // the AccessibilityManagerService has to do that processing first to generate
+ // the AccessibilityManagerService has to do that processing first to
+ // generate
// the AccessibilityServiceInfo we need for proper presentation.
private static final long DELAY_UPDATE_SERVICES_MILLIS = 1000;
private static final char ENABLED_ACCESSIBILITY_SERVICES_SEPARATOR = ':';
private static final String KEY_INSTALL_ACCESSIBILITY_SERVICE_OFFERED_ONCE =
- "key_install_accessibility_service_offered_once";
+ "key_install_accessibility_service_offered_once";
// Preference categories
private static final String SERVICES_CATEGORY = "services_category";
private static final String SYSTEM_CATEGORY = "system_category";
// Preferences
- private static final String TOGGLE_LARGE_TEXT_PREFERENCE = "toggle_large_text_preference";
+ private static final String TOGGLE_LARGE_TEXT_PREFERENCE =
+ "toggle_large_text_preference";
private static final String TOGGLE_POWER_BUTTON_ENDS_CALL_PREFERENCE =
- "toggle_power_button_ends_call_preference";
+ "toggle_power_button_ends_call_preference";
private static final String TOGGLE_LOCK_SCREEN_ROTATION_PREFERENCE =
- "toggle_lock_screen_rotation_preference";
+ "toggle_lock_screen_rotation_preference";
private static final String TOGGLE_SPEAK_PASSWORD_PREFERENCE =
- "toggle_speak_password_preference";
+ "toggle_speak_password_preference";
private static final String SELECT_LONG_PRESS_TIMEOUT_PREFERENCE =
- "select_long_press_timeout_preference";
+ "select_long_press_timeout_preference";
private static final String TOGGLE_SCRIPT_INJECTION_PREFERENCE =
- "toggle_script_injection_preference";
+ "toggle_script_injection_preference";
+ private static final String DISPLAY_MAGNIFICATION_PREFERENCE_SCREEN =
+ "screen_magnification_preference_screen";
// Extras passed to sub-fragments.
private static final String EXTRA_PREFERENCE_KEY = "preference_key";
@@ -125,12 +128,12 @@
// Auxiliary members.
private final static SimpleStringSplitter sStringColonSplitter =
- new SimpleStringSplitter(ENABLED_ACCESSIBILITY_SERVICES_SEPARATOR);
+ new SimpleStringSplitter(ENABLED_ACCESSIBILITY_SERVICES_SEPARATOR);
private static final Set<ComponentName> sInstalledServices = new HashSet<ComponentName>();
private final Map<String, String> mLongPressTimeoutValuetoTitleMap =
- new HashMap<String, String>();
+ new HashMap<String, String>();
private final Configuration mCurConfig = new Configuration();
@@ -147,11 +150,11 @@
private final RotationPolicy.RotationPolicyListener mRotationPolicyListener =
new RotationPolicy.RotationPolicyListener() {
- @Override
- public void onChange() {
- updateLockScreenRotationCheckbox();
- }
- };
+ @Override
+ public void onChange() {
+ updateLockScreenRotationCheckbox();
+ }
+ };
// Preference controls.
private PreferenceCategory mServicesCategory;
@@ -164,6 +167,7 @@
private ListPreference mSelectLongPressTimeoutPreference;
private AccessibilityEnableScriptInjectionPreference mToggleScriptInjectionPreference;
private Preference mNoServicesMessagePreference;
+ private PreferenceScreen mDisplayMagnificationPreferenceScreen;
private int mLongPressTimeoutDefault;
@@ -207,6 +211,12 @@
return false;
}
+
+
+
+
+
+
@Override
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
if (mToggleLargeTextPreference == preference) {
@@ -220,6 +230,10 @@
return true;
} else if (mToggleSpeakPasswordPreference == preference) {
handleToggleSpeakPasswordPreferenceClick();
+ return true;
+ } else if (mDisplayMagnificationPreferenceScreen == preference) {
+ handleDisplayMagnificationPreferenceScreenClick();
+ return true;
}
return super.onPreferenceTreeClick(preferenceScreen, preference);
}
@@ -252,17 +266,29 @@
mToggleSpeakPasswordPreference.isChecked() ? 1 : 0);
}
+ private void handleDisplayMagnificationPreferenceScreenClick() {
+ Bundle extras = mDisplayMagnificationPreferenceScreen.getExtras();
+ extras.putString(EXTRA_TITLE, getString(
+ R.string.accessibility_screen_magnification_title));
+ extras.putString(EXTRA_SUMMARY, getString(
+ R.string.accessibility_screen_magnification_summary));
+ extras.putBoolean(EXTRA_CHECKED, Settings.Secure.getInt(getContentResolver(),
+ Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED, 0) == 1);
+ super.onPreferenceTreeClick(mDisplayMagnificationPreferenceScreen,
+ mDisplayMagnificationPreferenceScreen);
+ }
+
private void initializeAllPreferences() {
mServicesCategory = (PreferenceCategory) findPreference(SERVICES_CATEGORY);
mSystemsCategory = (PreferenceCategory) findPreference(SYSTEM_CATEGORY);
// Large text.
mToggleLargeTextPreference =
- (CheckBoxPreference) findPreference(TOGGLE_LARGE_TEXT_PREFERENCE);
+ (CheckBoxPreference) findPreference(TOGGLE_LARGE_TEXT_PREFERENCE);
// Power button ends calls.
mTogglePowerButtonEndsCallPreference =
- (CheckBoxPreference) findPreference(TOGGLE_POWER_BUTTON_ENDS_CALL_PREFERENCE);
+ (CheckBoxPreference) findPreference(TOGGLE_POWER_BUTTON_ENDS_CALL_PREFERENCE);
if (!KeyCharacterMap.deviceHasKey(KeyEvent.KEYCODE_POWER)
|| !Utils.isVoiceCapable(getActivity())) {
mSystemsCategory.removePreference(mTogglePowerButtonEndsCallPreference);
@@ -270,15 +296,15 @@
// Lock screen rotation.
mToggleLockScreenRotationPreference =
- (CheckBoxPreference) findPreference(TOGGLE_LOCK_SCREEN_ROTATION_PREFERENCE);
+ (CheckBoxPreference) findPreference(TOGGLE_LOCK_SCREEN_ROTATION_PREFERENCE);
// Speak passwords.
mToggleSpeakPasswordPreference =
- (CheckBoxPreference) findPreference(TOGGLE_SPEAK_PASSWORD_PREFERENCE);
+ (CheckBoxPreference) findPreference(TOGGLE_SPEAK_PASSWORD_PREFERENCE);
// Long press timeout.
mSelectLongPressTimeoutPreference =
- (ListPreference) findPreference(SELECT_LONG_PRESS_TIMEOUT_PREFERENCE);
+ (ListPreference) findPreference(SELECT_LONG_PRESS_TIMEOUT_PREFERENCE);
mSelectLongPressTimeoutPreference.setOnPreferenceChangeListener(this);
if (mLongPressTimeoutValuetoTitleMap.size() == 0) {
String[] timeoutValues = getResources().getStringArray(
@@ -288,13 +314,17 @@
R.array.long_press_timeout_selector_titles);
final int timeoutValueCount = timeoutValues.length;
for (int i = 0; i < timeoutValueCount; i++) {
- mLongPressTimeoutValuetoTitleMap.put(timeoutValues[i], timeoutTitles[i]);
+ mLongPressTimeoutValuetoTitleMap.put(timeoutValues[i], timeoutTitles[i]);
}
}
// Script injection.
mToggleScriptInjectionPreference = (AccessibilityEnableScriptInjectionPreference)
- findPreference(TOGGLE_SCRIPT_INJECTION_PREFERENCE);
+ findPreference(TOGGLE_SCRIPT_INJECTION_PREFERENCE);
+
+ // Display magnification.
+ mDisplayMagnificationPreferenceScreen = (PreferenceScreen) findPreference(
+ DISPLAY_MAGNIFICATION_PREFERENCE_SCREEN);
}
private void updateAllPreferences() {
@@ -313,7 +343,7 @@
AccessibilityManager accessibilityManager = AccessibilityManager.getInstance(getActivity());
List<AccessibilityServiceInfo> installedServices =
- accessibilityManager.getInstalledAccessibilityServiceList();
+ accessibilityManager.getInstalledAccessibilityServiceList();
Set<ComponentName> enabledServices = getEnabledServicesFromSettings(getActivity());
final boolean accessibilityEnabled = Settings.Secure.getInt(getContentResolver(),
@@ -334,11 +364,11 @@
preference.setTitle(title);
final boolean serviceEnabled = accessibilityEnabled
- && enabledServices.contains(componentName);
+ && enabledServices.contains(componentName);
if (serviceEnabled) {
- preference.setSummary(getString(R.string.accessibility_service_state_on));
+ preference.setSummary(getString(R.string.accessibility_feature_state_on));
} else {
- preference.setSummary(getString(R.string.accessibility_service_state_off));
+ preference.setSummary(getString(R.string.accessibility_feature_state_off));
}
preference.setOrder(i);
@@ -390,7 +420,7 @@
super.onBindView(view);
LinearLayout containerView =
- (LinearLayout) view.findViewById(R.id.message_container);
+ (LinearLayout) view.findViewById(R.id.message_container);
containerView.setGravity(Gravity.CENTER);
TextView summaryView = (TextView) view.findViewById(R.id.summary);
@@ -423,7 +453,7 @@
Settings.Secure.INCALL_POWER_BUTTON_BEHAVIOR,
Settings.Secure.INCALL_POWER_BUTTON_BEHAVIOR_DEFAULT);
final boolean powerButtonEndsCall =
- (incallPowerBehavior == Settings.Secure.INCALL_POWER_BUTTON_BEHAVIOR_HANGUP);
+ (incallPowerBehavior == Settings.Secure.INCALL_POWER_BUTTON_BEHAVIOR_HANGUP);
mTogglePowerButtonEndsCallPreference.setChecked(powerButtonEndsCall);
}
@@ -443,9 +473,20 @@
mSelectLongPressTimeoutPreference.setSummary(mLongPressTimeoutValuetoTitleMap.get(value));
// Script injection.
- final boolean scriptInjectionAllowed = (Settings.Secure.getInt(getContentResolver(),
+ final boolean scriptInjectionAllowed = (Settings.Secure.getInt(getContentResolver(),
Settings.Secure.ACCESSIBILITY_SCRIPT_INJECTION, 0) == 1);
mToggleScriptInjectionPreference.setInjectionAllowed(scriptInjectionAllowed);
+
+ // Screen magnification.
+ final boolean magnificationEnabled = Settings.Secure.getInt(getContentResolver(),
+ Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED, 0) == 1;
+ if (magnificationEnabled) {
+ mDisplayMagnificationPreferenceScreen.setSummary(
+ R.string.accessibility_feature_state_on);
+ } else {
+ mDisplayMagnificationPreferenceScreen.setSummary(
+ R.string.accessibility_feature_state_off);
+ }
}
private void updateLockScreenRotationCheckbox() {
@@ -489,25 +530,28 @@
switch (dialogId) {
case DIALOG_ID_NO_ACCESSIBILITY_SERVICES:
return new AlertDialog.Builder(getActivity())
- .setTitle(R.string.accessibility_service_no_apps_title)
- .setMessage(R.string.accessibility_service_no_apps_message)
- .setPositiveButton(android.R.string.ok,
- new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- // dismiss the dialog before launching the activity otherwise
- // the dialog removal occurs after onSaveInstanceState which
- // triggers an exception
- removeDialog(DIALOG_ID_NO_ACCESSIBILITY_SERVICES);
- String screenreaderMarketLink = SystemProperties.get(
- SYSTEM_PROPERTY_MARKET_URL,
- DEFAULT_SCREENREADER_MARKET_LINK);
- Uri marketUri = Uri.parse(screenreaderMarketLink);
- Intent marketIntent = new Intent(Intent.ACTION_VIEW, marketUri);
- startActivity(marketIntent);
- }
- })
- .setNegativeButton(android.R.string.cancel, null)
- .create();
+ .setTitle(R.string.accessibility_service_no_apps_title)
+ .setMessage(R.string.accessibility_service_no_apps_message)
+ .setPositiveButton(android.R.string.ok,
+ new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ // dismiss the dialog before launching
+ // the activity otherwise
+ // the dialog removal occurs after
+ // onSaveInstanceState which
+ // triggers an exception
+ removeDialog(DIALOG_ID_NO_ACCESSIBILITY_SERVICES);
+ String screenreaderMarketLink = SystemProperties.get(
+ SYSTEM_PROPERTY_MARKET_URL,
+ DEFAULT_SCREENREADER_MARKET_LINK);
+ Uri marketUri = Uri.parse(screenreaderMarketLink);
+ Intent marketIntent = new Intent(Intent.ACTION_VIEW,
+ marketUri);
+ startActivity(marketIntent);
+ }
+ })
+ .setNegativeButton(android.R.string.cancel, null)
+ .create();
default:
return null;
}
@@ -515,8 +559,8 @@
private void loadInstalledServices() {
List<AccessibilityServiceInfo> installedServiceInfos =
- AccessibilityManager.getInstance(getActivity())
- .getInstalledAccessibilityServiceList();
+ AccessibilityManager.getInstance(getActivity())
+ .getInstalledAccessibilityServiceList();
Set<ComponentName> installedServices = sInstalledServices;
installedServices.clear();
final int installedServiceInfoCount = installedServiceInfos.size();
@@ -576,20 +620,6 @@
}
}
- private static ToggleSwitch createAndAddActionBarToggleSwitch(Activity activity) {
- ToggleSwitch toggleSwitch = new ToggleSwitch(activity);
- final int padding = activity.getResources().getDimensionPixelSize(
- R.dimen.action_bar_switch_padding);
- toggleSwitch.setPadding(0, 0, padding, 0);
- activity.getActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM,
- ActionBar.DISPLAY_SHOW_CUSTOM);
- activity.getActionBar().setCustomView(toggleSwitch,
- new ActionBar.LayoutParams(ActionBar.LayoutParams.WRAP_CONTENT,
- ActionBar.LayoutParams.WRAP_CONTENT,
- Gravity.CENTER_VERTICAL | Gravity.END));
- return toggleSwitch;
- }
-
public static class ToggleSwitch extends Switch {
private OnBeforeCheckedChangeListener mOnBeforeListener;
@@ -621,87 +651,21 @@
}
public static class ToggleAccessibilityServicePreferenceFragment
- extends SettingsPreferenceFragment implements DialogInterface.OnClickListener {
+ extends ToggleFeaturePreferenceFragment implements DialogInterface.OnClickListener {
private static final int DIALOG_ID_ENABLE_WARNING = 1;
private static final int DIALOG_ID_DISABLE_WARNING = 2;
- private String mPreferenceKey;
-
- private ToggleSwitch mToggleSwitch;
-
private CharSequence mEnableWarningTitle;
private CharSequence mEnableWarningMessage;
private CharSequence mDisableWarningTitle;
private CharSequence mDisableWarningMessage;
- private Preference mSummaryPreference;
-
- private CharSequence mSettingsTitle;
- private Intent mSettingsIntent;
-
private int mShownDialogId;
- // TODO: Showing sub-sub fragment does not handle the activity title
- // so we do it but this is wrong. Do a real fix when there is time.
- private CharSequence mOldActivityTitle;
-
@Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- PreferenceScreen preferenceScreen = getPreferenceManager().createPreferenceScreen(
- getActivity());
- setPreferenceScreen(preferenceScreen);
- mSummaryPreference = new Preference(getActivity()) {
- @Override
- protected void onBindView(View view) {
- super.onBindView(view);
- TextView summaryView = (TextView) view.findViewById(R.id.summary);
- summaryView.setText(getSummary());
- sendAccessibilityEvent(summaryView);
- }
-
- private void sendAccessibilityEvent(View view) {
- // Since the view is still not attached we create, populate,
- // and send the event directly since we do not know when it
- // will be attached and posting commands is not as clean.
- AccessibilityManager accessibilityManager =
- AccessibilityManager.getInstance(getActivity());
- if (accessibilityManager.isEnabled()) {
- AccessibilityEvent event = AccessibilityEvent.obtain();
- event.setEventType(AccessibilityEvent.TYPE_VIEW_FOCUSED);
- view.onInitializeAccessibilityEvent(event);
- view.dispatchPopulateAccessibilityEvent(event);
- accessibilityManager.sendAccessibilityEvent(event);
- }
- }
- };
- mSummaryPreference.setPersistent(false);
- mSummaryPreference.setLayoutResource(R.layout.text_description_preference);
- preferenceScreen.addPreference(mSummaryPreference);
- }
-
- @Override
- public void onViewCreated(View view, Bundle savedInstanceState) {
- super.onViewCreated(view, savedInstanceState);
- installActionBarToggleSwitch();
- processArguments();
- getListView().setDivider(null);
- getListView().setEnabled(false);
- }
-
- @Override
- public void onDestroyView() {
- getActivity().getActionBar().setCustomView(null);
- if (mOldActivityTitle != null) {
- getActivity().getActionBar().setTitle(mOldActivityTitle);
- }
- mToggleSwitch.setOnBeforeCheckedChangeListener(null);
- super.onDestroyView();
- }
-
public void onPreferenceToggled(String preferenceKey, boolean enabled) {
- // Parse the enabled services.
+ // Parse the enabled services.
Set<ComponentName> enabledServices = getEnabledServicesFromSettings(getActivity());
// Determine enabled services and accessibility state.
@@ -722,16 +686,17 @@
}
// Disabling the last service disables accessibility.
accessibilityEnabled = enabledAndInstalledServiceCount > 1
- || (enabledAndInstalledServiceCount == 1
- && !installedServices.contains(toggledService));
+ || (enabledAndInstalledServiceCount == 1
+ && !installedServices.contains(toggledService));
enabledServices.remove(toggledService);
}
// Update the enabled services setting.
StringBuilder enabledServicesBuilder = new StringBuilder();
- // Keep the enabled services even if they are not installed since we have
- // no way to know whether the application restore process has completed.
- // In general the system should be responsible for the clean up not settings.
+ // Keep the enabled services even if they are not installed since we
+ // have no way to know whether the application restore process has
+ // completed. In general the system should be responsible for the
+ // clean up not settings.
for (ComponentName enabledService : enabledServices) {
enabledServicesBuilder.append(enabledService.flattenToString());
enabledServicesBuilder.append(ENABLED_ACCESSIBILITY_SERVICES_SEPARATOR);
@@ -750,14 +715,6 @@
}
@Override
- public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
- super.onCreateOptionsMenu(menu, inflater);
- MenuItem menuItem = menu.add(mSettingsTitle);
- menuItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
- menuItem.setIntent(mSettingsIntent);
- }
-
- @Override
public Dialog onCreateDialog(int dialogId) {
CharSequence title = null;
CharSequence message = null;
@@ -776,13 +733,13 @@
throw new IllegalArgumentException();
}
return new AlertDialog.Builder(getActivity())
- .setTitle(title)
- .setIconAttribute(android.R.attr.alertDialogIcon)
- .setMessage(message)
- .setCancelable(true)
- .setPositiveButton(android.R.string.ok, this)
- .setNegativeButton(android.R.string.cancel, this)
- .create();
+ .setTitle(title)
+ .setIconAttribute(android.R.attr.alertDialogIcon)
+ .setMessage(message)
+ .setCancelable(true)
+ .setPositiveButton(android.R.string.ok, this)
+ .setNegativeButton(android.R.string.cancel, this)
+ .create();
}
@Override
@@ -806,8 +763,9 @@
}
}
- private void installActionBarToggleSwitch() {
- mToggleSwitch = createAndAddActionBarToggleSwitch(getActivity());
+ @Override
+ protected void onInstallActionBarToggleSwitch() {
+ super.onInstallActionBarToggleSwitch();
mToggleSwitch.setOnBeforeCheckedChangeListener(new OnBeforeCheckedChangeListener() {
@Override
public boolean onBeforeCheckedChanged(ToggleSwitch toggleSwitch, boolean checked) {
@@ -833,28 +791,9 @@
});
}
- private void processArguments() {
- Bundle arguments = getArguments();
-
- // Key.
- mPreferenceKey = arguments.getString(EXTRA_PREFERENCE_KEY);
-
- // Enabled.
- final boolean enabled = arguments.getBoolean(EXTRA_CHECKED);
- mToggleSwitch.setCheckedInternal(enabled);
-
- // Title.
- PreferenceActivity activity = (PreferenceActivity) getActivity();
- if (!activity.onIsMultiPane() || activity.onIsHidingHeaders()) {
- mOldActivityTitle = getActivity().getTitle();
- String title = arguments.getString(EXTRA_TITLE);
- getActivity().getActionBar().setTitle(title);
- }
-
- // Summary.
- String summary = arguments.getString(EXTRA_SUMMARY);
- mSummaryPreference.setSummary(summary);
-
+ @Override
+ protected void onProcessArguments(Bundle arguments) {
+ super.onProcessArguments(arguments);
// Settings title and intent.
String settingsTitle = arguments.getString(EXTRA_SETTINGS_TITLE);
String settingsComponentName = arguments.getString(EXTRA_SETTINGS_COMPONENT_NAME);
@@ -867,22 +806,157 @@
setHasOptionsMenu(true);
}
}
-
// Enable warning title.
mEnableWarningTitle = arguments.getCharSequence(
AccessibilitySettings.EXTRA_ENABLE_WARNING_TITLE);
-
// Enable warning message.
mEnableWarningMessage = arguments.getCharSequence(
AccessibilitySettings.EXTRA_ENABLE_WARNING_MESSAGE);
-
// Disable warning title.
mDisableWarningTitle = arguments.getString(
AccessibilitySettings.EXTRA_DISABLE_WARNING_TITLE);
-
// Disable warning message.
mDisableWarningMessage = arguments.getString(
AccessibilitySettings.EXTRA_DISABLE_WARNING_MESSAGE);
}
}
+
+ public static class ToggleScreenMagnificationPreferenceFragment
+ extends ToggleFeaturePreferenceFragment {
+ @Override
+ protected void onPreferenceToggled(String preferenceKey, boolean enabled) {
+ Settings.Secure.putInt(getContentResolver(),
+ Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED, enabled? 1 : 0);
+ }
+
+ @Override
+ protected void onInstallActionBarToggleSwitch() {
+ super.onInstallActionBarToggleSwitch();
+ mToggleSwitch.setOnBeforeCheckedChangeListener(new OnBeforeCheckedChangeListener() {
+ @Override
+ public boolean onBeforeCheckedChanged(ToggleSwitch toggleSwitch, boolean checked) {
+ toggleSwitch.setCheckedInternal(checked);
+ getArguments().putBoolean(EXTRA_CHECKED, checked);
+ onPreferenceToggled(mPreferenceKey, checked);
+ return false;
+ }
+ });
+ }
+ }
+
+ public static abstract class ToggleFeaturePreferenceFragment
+ extends SettingsPreferenceFragment {
+
+ protected ToggleSwitch mToggleSwitch;
+
+ protected String mPreferenceKey;
+ protected Preference mSummaryPreference;
+
+ protected CharSequence mSettingsTitle;
+ protected Intent mSettingsIntent;
+
+ // TODO: Showing sub-sub fragment does not handle the activity title
+ // so we do it but this is wrong. Do a real fix when there is time.
+ private CharSequence mOldActivityTitle;
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ PreferenceScreen preferenceScreen = getPreferenceManager().createPreferenceScreen(
+ getActivity());
+ setPreferenceScreen(preferenceScreen);
+ mSummaryPreference = new Preference(getActivity()) {
+ @Override
+ protected void onBindView(View view) {
+ super.onBindView(view);
+ TextView summaryView = (TextView) view.findViewById(R.id.summary);
+ summaryView.setText(getSummary());
+ sendAccessibilityEvent(summaryView);
+ }
+
+ private void sendAccessibilityEvent(View view) {
+ // Since the view is still not attached we create, populate,
+ // and send the event directly since we do not know when it
+ // will be attached and posting commands is not as clean.
+ AccessibilityManager accessibilityManager =
+ AccessibilityManager.getInstance(getActivity());
+ if (accessibilityManager.isEnabled()) {
+ AccessibilityEvent event = AccessibilityEvent.obtain();
+ event.setEventType(AccessibilityEvent.TYPE_VIEW_FOCUSED);
+ view.onInitializeAccessibilityEvent(event);
+ view.dispatchPopulateAccessibilityEvent(event);
+ accessibilityManager.sendAccessibilityEvent(event);
+ }
+ }
+ };
+ mSummaryPreference.setPersistent(false);
+ mSummaryPreference.setLayoutResource(R.layout.text_description_preference);
+ preferenceScreen.addPreference(mSummaryPreference);
+ }
+
+ @Override
+ public void onViewCreated(View view, Bundle savedInstanceState) {
+ super.onViewCreated(view, savedInstanceState);
+ onInstallActionBarToggleSwitch();
+ onProcessArguments(getArguments());
+ getListView().setDivider(null);
+ getListView().setEnabled(false);
+ }
+
+ @Override
+ public void onDestroyView() {
+ getActivity().getActionBar().setCustomView(null);
+ if (mOldActivityTitle != null) {
+ getActivity().getActionBar().setTitle(mOldActivityTitle);
+ }
+ mToggleSwitch.setOnBeforeCheckedChangeListener(null);
+ super.onDestroyView();
+ }
+
+ protected abstract void onPreferenceToggled(String preferenceKey, boolean enabled);
+
+ @Override
+ public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
+ super.onCreateOptionsMenu(menu, inflater);
+ MenuItem menuItem = menu.add(mSettingsTitle);
+ menuItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
+ menuItem.setIntent(mSettingsIntent);
+ }
+
+ protected void onInstallActionBarToggleSwitch() {
+ mToggleSwitch = createAndAddActionBarToggleSwitch(getActivity());
+ }
+
+ private ToggleSwitch createAndAddActionBarToggleSwitch(Activity activity) {
+ ToggleSwitch toggleSwitch = new ToggleSwitch(activity);
+ final int padding = activity.getResources().getDimensionPixelSize(
+ R.dimen.action_bar_switch_padding);
+ toggleSwitch.setPadding(0, 0, padding, 0);
+ activity.getActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM,
+ ActionBar.DISPLAY_SHOW_CUSTOM);
+ activity.getActionBar().setCustomView(toggleSwitch,
+ new ActionBar.LayoutParams(ActionBar.LayoutParams.WRAP_CONTENT,
+ ActionBar.LayoutParams.WRAP_CONTENT,
+ Gravity.CENTER_VERTICAL | Gravity.END));
+ return toggleSwitch;
+ }
+
+ protected void onProcessArguments(Bundle arguments) {
+ // Key.
+ mPreferenceKey = arguments.getString(EXTRA_PREFERENCE_KEY);
+ // Enabled.
+ final boolean enabled = arguments.getBoolean(EXTRA_CHECKED);
+ mToggleSwitch.setCheckedInternal(enabled);
+ // Title.
+ PreferenceActivity activity = (PreferenceActivity) getActivity();
+ if (!activity.onIsMultiPane() || activity.onIsHidingHeaders()) {
+ mOldActivityTitle = getActivity().getTitle();
+ String title = arguments.getString(EXTRA_TITLE);
+ getActivity().getActionBar().setTitle(title);
+ }
+ // Summary.
+ String summary = arguments.getString(EXTRA_SUMMARY);
+ mSummaryPreference.setSummary(summary);
+ }
+ }
}
diff --git a/src/com/android/settings/BrightnessPreference.java b/src/com/android/settings/BrightnessPreference.java
index 858d50f..2cf6b43 100644
--- a/src/com/android/settings/BrightnessPreference.java
+++ b/src/com/android/settings/BrightnessPreference.java
@@ -39,7 +39,8 @@
public class BrightnessPreference extends SeekBarDialogPreference implements
SeekBar.OnSeekBarChangeListener, CheckBox.OnCheckedChangeListener {
// If true, enables the use of the screen auto-brightness adjustment setting.
- private static final boolean USE_SCREEN_AUTO_BRIGHTNESS_ADJUSTMENT = false;
+ private static final boolean USE_SCREEN_AUTO_BRIGHTNESS_ADJUSTMENT =
+ PowerManager.useScreenAutoBrightnessAdjustmentFeature();
private final int mScreenBrightnessMinimum;
private final int mScreenBrightnessMaximum;
diff --git a/src/com/android/settings/DataUsageSummary.java b/src/com/android/settings/DataUsageSummary.java
index d0ec1e7..9837193 100644
--- a/src/com/android/settings/DataUsageSummary.java
+++ b/src/com/android/settings/DataUsageSummary.java
@@ -869,14 +869,14 @@
private boolean getDataRoaming() {
final ContentResolver resolver = getActivity().getContentResolver();
- return Settings.Secure.getInt(resolver, Settings.Secure.DATA_ROAMING, 0) != 0;
+ return Settings.Global.getInt(resolver, Settings.Global.DATA_ROAMING, 0) != 0;
}
private void setDataRoaming(boolean enabled) {
// TODO: teach telephony DataConnectionTracker to watch and apply
// updates when changed.
final ContentResolver resolver = getActivity().getContentResolver();
- Settings.Secure.putInt(resolver, Settings.Secure.DATA_ROAMING, enabled ? 1 : 0);
+ Settings.Global.putInt(resolver, Settings.Global.DATA_ROAMING, enabled ? 1 : 0);
mMenuDataRoaming.setChecked(enabled);
}
@@ -1899,7 +1899,7 @@
/**
* Dialog to request user confirmation before setting
- * {@link android.provider.Settings.Secure#DATA_ROAMING}.
+ * {@link android.provider.Settings.Global#DATA_ROAMING}.
*/
public static class ConfirmDataRoamingFragment extends DialogFragment {
public static void show(DataUsageSummary parent) {
diff --git a/src/com/android/settings/DateTimeSettings.java b/src/com/android/settings/DateTimeSettings.java
index 1d8e341..30d4f0a 100644
--- a/src/com/android/settings/DateTimeSettings.java
+++ b/src/com/android/settings/DateTimeSettings.java
@@ -171,12 +171,15 @@
java.text.DateFormat shortDateFormat = DateFormat.getDateFormat(context);
final Calendar now = Calendar.getInstance();
mDummyDate.setTimeZone(now.getTimeZone());
+ // We use December 31st because it's unambiguous when demonstrating the date format.
+ // We use 13:00 so we can demonstrate the 12/24 hour options.
mDummyDate.set(now.get(Calendar.YEAR), 11, 31, 13, 0, 0);
Date dummyDate = mDummyDate.getTime();
mTimePref.setSummary(DateFormat.getTimeFormat(getActivity()).format(now.getTime()));
mTimeZone.setSummary(getTimeZoneText(now.getTimeZone()));
mDatePref.setSummary(shortDateFormat.format(now.getTime()));
mDateFormat.setSummary(shortDateFormat.format(dummyDate));
+ mTime24Pref.setSummary(DateFormat.getTimeFormat(getActivity()).format(dummyDate));
}
@Override
@@ -334,8 +337,6 @@
}
}
- /* Helper routines to format timezone */
-
/* package */ static void setDate(int year, int month, int day) {
Calendar c = Calendar.getInstance();
@@ -363,45 +364,40 @@
}
}
+ /* Helper routines to format timezone */
+
/* package */ static String getTimeZoneText(TimeZone tz) {
- boolean daylight = tz.inDaylightTime(new Date());
- StringBuilder sb = new StringBuilder();
-
- sb.append(formatOffset(tz.getRawOffset() +
- (daylight ? tz.getDSTSavings() : 0))).
+ // Similar to new SimpleDateFormat("'GMT'Z, zzzz").format(new Date()), but
+ // we want "GMT-03:00" rather than "GMT-0300".
+ Date now = new Date();
+ return formatOffset(new StringBuilder(), tz, now).
append(", ").
- append(tz.getDisplayName(daylight, TimeZone.LONG));
-
- return sb.toString();
+ append(tz.getDisplayName(tz.inDaylightTime(now), TimeZone.LONG)).toString();
}
- private static char[] formatOffset(int off) {
- off = off / 1000 / 60;
+ private static StringBuilder formatOffset(StringBuilder sb, TimeZone tz, Date d) {
+ int off = tz.getOffset(d.getTime()) / 1000 / 60;
- char[] buf = new char[9];
- buf[0] = 'G';
- buf[1] = 'M';
- buf[2] = 'T';
-
+ sb.append("GMT");
if (off < 0) {
- buf[3] = '-';
+ sb.append('-');
off = -off;
} else {
- buf[3] = '+';
+ sb.append('+');
}
int hours = off / 60;
int minutes = off % 60;
- buf[4] = (char) ('0' + hours / 10);
- buf[5] = (char) ('0' + hours % 10);
+ sb.append((char) ('0' + hours / 10));
+ sb.append((char) ('0' + hours % 10));
- buf[6] = ':';
+ sb.append(':');
- buf[7] = (char) ('0' + minutes / 10);
- buf[8] = (char) ('0' + minutes % 10);
+ sb.append((char) ('0' + minutes / 10));
+ sb.append((char) ('0' + minutes % 10));
- return buf;
+ return sb;
}
private BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java
index 7708aa7..f590ea6 100644
--- a/src/com/android/settings/DevelopmentSettings.java
+++ b/src/com/android/settings/DevelopmentSettings.java
@@ -98,6 +98,8 @@
private static final String TRANSITION_ANIMATION_SCALE_KEY = "transition_animation_scale";
private static final String ANIMATOR_DURATION_SCALE_KEY = "animator_duration_scale";
private static final String OVERLAY_DISPLAY_DEVICES_KEY = "overlay_display_devices";
+ private static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE_KEY =
+ "accessibility_display_magnification_auto_update";
private static final String ENABLE_TRACES_KEY = "enable_traces";
@@ -142,6 +144,7 @@
private CheckBoxPreference mShowHwScreenUpdates;
private CheckBoxPreference mShowHwLayersUpdates;
private CheckBoxPreference mDebugLayout;
+ private CheckBoxPreference mDisplayMangificationAutoUpdate;
private ListPreference mWindowAnimationScale;
private ListPreference mTransitionAnimationScale;
private ListPreference mAnimatorDurationScale;
@@ -237,6 +240,9 @@
mAllPrefs.add(hdcpChecking);
}
removeHdcpOptionsForProduction();
+
+ mDisplayMangificationAutoUpdate = findAndInitCheckboxPref(
+ ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE_KEY);
}
private CheckBoxPreference findAndInitCheckboxPref(String key) {
@@ -316,8 +322,8 @@
}
final ContentResolver cr = getActivity().getContentResolver();
- mLastEnabledState = Settings.Secure.getInt(cr,
- Settings.Secure.DEVELOPMENT_SETTINGS_ENABLED, 0) != 0;
+ mLastEnabledState = Settings.Global.getInt(cr,
+ Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0) != 0;
mEnabledSwitch.setChecked(mLastEnabledState);
setPrefsEnabledState(mLastEnabledState);
@@ -326,8 +332,8 @@
// settings that are enabled. This is an invalid state. Switch
// to debug settings being enabled, so the user knows there is
// stuff enabled and can turn it all off if they want.
- Settings.Secure.putInt(getActivity().getContentResolver(),
- Settings.Secure.DEVELOPMENT_SETTINGS_ENABLED, 1);
+ Settings.Global.putInt(getActivity().getContentResolver(),
+ Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 1);
mLastEnabledState = true;
setPrefsEnabledState(mLastEnabledState);
}
@@ -342,12 +348,12 @@
final Context context = getActivity();
final ContentResolver cr = context.getContentResolver();
mHaveDebugSettings = false;
- updateCheckBox(mEnableAdb, Settings.Secure.getInt(cr,
- Settings.Secure.ADB_ENABLED, 0) != 0);
+ updateCheckBox(mEnableAdb, Settings.Global.getInt(cr,
+ Settings.Global.ADB_ENABLED, 0) != 0);
updateCheckBox(mBugreportInPower, Settings.Secure.getInt(cr,
Settings.Secure.BUGREPORT_IN_POWER_MENU, 0) != 0);
- updateCheckBox(mKeepScreenOn, Settings.System.getInt(cr,
- Settings.System.STAY_ON_WHILE_PLUGGED_IN, 0) != 0);
+ updateCheckBox(mKeepScreenOn, Settings.Global.getInt(cr,
+ Settings.Global.STAY_ON_WHILE_PLUGGED_IN, 0) != 0);
updateCheckBox(mEnforceReadExternal, isPermissionEnforced(READ_EXTERNAL_STORAGE));
updateCheckBox(mAllowMockLocation, Settings.Secure.getInt(cr,
Settings.Secure.ALLOW_MOCK_LOCATION, 0) != 0);
@@ -370,6 +376,7 @@
updateImmediatelyDestroyActivitiesOptions();
updateAppProcessLimitOptions();
updateShowAllANRsOptions();
+ updateDisplayMagnificationAutoUpdate();
}
private void resetDangerousOptions() {
@@ -623,6 +630,12 @@
pokeSystemProperties();
}
+ private void writeDisplayMagnificationAutoUpdate() {
+ Settings.Secure.putInt(getActivity().getContentResolver(),
+ Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE,
+ mDisplayMangificationAutoUpdate.isChecked() ? 1 : 0);
+ }
+
private void updateCpuUsageOptions() {
updateCheckBox(mShowCpuUsage, Settings.System.getInt(getActivity().getContentResolver(),
Settings.System.SHOW_PROCESSES, 0) != 0);
@@ -756,6 +769,12 @@
getActivity().getContentResolver(), Settings.Secure.ANR_SHOW_BACKGROUND, 0) != 0);
}
+ private void updateDisplayMagnificationAutoUpdate() {
+ updateCheckBox(mDisplayMangificationAutoUpdate,
+ Settings.Secure.getInt(getActivity().getContentResolver(),
+ Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE, 0) != 0);
+ }
+
private void updateEnableTracesOptions() {
long flags = SystemProperties.getLong(Trace.PROPERTY_TRACE_TAG_ENABLEFLAGS, 0);
String[] values = mEnableTracesPref.getEntryValues();
@@ -815,8 +834,8 @@
mEnableDialog.setOnDismissListener(this);
} else {
resetDangerousOptions();
- Settings.Secure.putInt(getActivity().getContentResolver(),
- Settings.Secure.DEVELOPMENT_SETTINGS_ENABLED, 0);
+ Settings.Global.putInt(getActivity().getContentResolver(),
+ Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0);
mLastEnabledState = isChecked;
setPrefsEnabledState(mLastEnabledState);
}
@@ -857,16 +876,16 @@
.show();
mAdbDialog.setOnDismissListener(this);
} else {
- Settings.Secure.putInt(getActivity().getContentResolver(),
- Settings.Secure.ADB_ENABLED, 0);
+ Settings.Global.putInt(getActivity().getContentResolver(),
+ Settings.Global.ADB_ENABLED, 0);
}
} else if (preference == mBugreportInPower) {
Settings.Secure.putInt(getActivity().getContentResolver(),
Settings.Secure.BUGREPORT_IN_POWER_MENU,
mBugreportInPower.isChecked() ? 1 : 0);
} else if (preference == mKeepScreenOn) {
- Settings.System.putInt(getActivity().getContentResolver(),
- Settings.System.STAY_ON_WHILE_PLUGGED_IN,
+ Settings.Global.putInt(getActivity().getContentResolver(),
+ Settings.Global.STAY_ON_WHILE_PLUGGED_IN,
mKeepScreenOn.isChecked() ?
(BatteryManager.BATTERY_PLUGGED_AC | BatteryManager.BATTERY_PLUGGED_USB) : 0);
} else if (preference == mEnforceReadExternal) {
@@ -909,6 +928,8 @@
writeShowHwLayersUpdatesOptions();
} else if (preference == mDebugLayout) {
writeDebugLayoutOptions();
+ } else if (preference == mDisplayMangificationAutoUpdate) {
+ writeDisplayMagnificationAutoUpdate();
}
return false;
@@ -958,8 +979,8 @@
if (dialog == mAdbDialog) {
if (which == DialogInterface.BUTTON_POSITIVE) {
mDialogClicked = true;
- Settings.Secure.putInt(getActivity().getContentResolver(),
- Settings.Secure.ADB_ENABLED, 1);
+ Settings.Global.putInt(getActivity().getContentResolver(),
+ Settings.Global.ADB_ENABLED, 1);
} else {
// Reset the toggle
mEnableAdb.setChecked(false);
@@ -967,8 +988,8 @@
} else if (dialog == mEnableDialog) {
if (which == DialogInterface.BUTTON_POSITIVE) {
mDialogClicked = true;
- Settings.Secure.putInt(getActivity().getContentResolver(),
- Settings.Secure.DEVELOPMENT_SETTINGS_ENABLED, 1);
+ Settings.Global.putInt(getActivity().getContentResolver(),
+ Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 1);
mLastEnabledState = true;
setPrefsEnabledState(mLastEnabledState);
} else {
diff --git a/src/com/android/settings/LocationSettings.java b/src/com/android/settings/LocationSettings.java
index d5c4d9f..4153485 100644
--- a/src/com/android/settings/LocationSettings.java
+++ b/src/com/android/settings/LocationSettings.java
@@ -129,7 +129,7 @@
mAssistedGps.setEnabled(enabled);
}
} else if (preference == mAssistedGps) {
- Settings.Secure.putInt(cr, Settings.Secure.ASSISTED_GPS_ENABLED,
+ Settings.Global.putInt(cr, Settings.Global.ASSISTED_GPS_ENABLED,
mAssistedGps.isChecked() ? 1 : 0);
} else {
// If we didn't handle it, let preferences handle it.
@@ -152,8 +152,8 @@
mNetwork.setChecked(networkEnabled);
mLocationAccess.setChecked(gpsEnabled || networkEnabled);
if (mAssistedGps != null) {
- mAssistedGps.setChecked(Settings.Secure.getInt(res,
- Settings.Secure.ASSISTED_GPS_ENABLED, 2) == 1);
+ mAssistedGps.setChecked(Settings.Global.getInt(res,
+ Settings.Global.ASSISTED_GPS_ENABLED, 2) == 1);
mAssistedGps.setEnabled(gpsEnabled);
}
}
diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java
index 8f33b9b..e309c37 100644
--- a/src/com/android/settings/SecuritySettings.java
+++ b/src/com/android/settings/SecuritySettings.java
@@ -25,6 +25,9 @@
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.net.Uri;
import android.os.Bundle;
import android.os.UserHandle;
import android.os.Vibrator;
@@ -43,6 +46,7 @@
import com.android.internal.widget.LockPatternUtils;
import java.util.ArrayList;
+import java.util.List;
/**
* Gesture lock pattern settings.
@@ -69,7 +73,9 @@
private static final String KEY_SHOW_PASSWORD = "show_password";
private static final String KEY_RESET_CREDENTIALS = "reset_credentials";
private static final String KEY_TOGGLE_INSTALL_APPLICATIONS = "toggle_install_applications";
+ private static final String KEY_TOGGLE_VERIFY_APPLICATIONS = "toggle_verify_applications";
private static final String KEY_POWER_INSTANTLY_LOCKS = "power_button_instantly_locks";
+ private static final String PACKAGE_MIME_TYPE = "application/vnd.android.package-archive";
DevicePolicyManager mDPM;
@@ -87,6 +93,7 @@
private CheckBoxPreference mToggleAppInstallation;
private DialogInterface mWarnInstallApps;
+ private CheckBoxPreference mToggleVerifyApps;
private CheckBoxPreference mPowerButtonInstantlyLocks;
@Override
@@ -225,20 +232,43 @@
KEY_TOGGLE_INSTALL_APPLICATIONS);
mToggleAppInstallation.setChecked(isNonMarketAppsAllowed());
+ // Package verification
+ mToggleVerifyApps = (CheckBoxPreference) findPreference(KEY_TOGGLE_VERIFY_APPLICATIONS);
+ if (isVerifierInstalled()) {
+ mToggleVerifyApps.setChecked(isVerifyAppsEnabled());
+ } else {
+ mToggleVerifyApps.setChecked(false);
+ mToggleVerifyApps.setEnabled(false);
+ }
+
return root;
}
private boolean isNonMarketAppsAllowed() {
- return Settings.Secure.getInt(getContentResolver(),
- Settings.Secure.INSTALL_NON_MARKET_APPS, 0) > 0;
+ return Settings.Global.getInt(getContentResolver(),
+ Settings.Global.INSTALL_NON_MARKET_APPS, 0) > 0;
}
private void setNonMarketAppsAllowed(boolean enabled) {
// Change the system setting
- Settings.Secure.putInt(getContentResolver(), Settings.Secure.INSTALL_NON_MARKET_APPS,
+ Settings.Global.putInt(getContentResolver(), Settings.Global.INSTALL_NON_MARKET_APPS,
enabled ? 1 : 0);
}
+ private boolean isVerifyAppsEnabled() {
+ return Settings.Global.getInt(getContentResolver(),
+ Settings.Global.PACKAGE_VERIFIER_ENABLE, 1) > 0;
+ }
+
+ private boolean isVerifierInstalled() {
+ final PackageManager pm = getPackageManager();
+ final Intent verification = new Intent(Intent.ACTION_PACKAGE_NEEDS_VERIFICATION);
+ verification.setType(PACKAGE_MIME_TYPE);
+ verification.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
+ final List<ResolveInfo> receivers = pm.queryBroadcastReceivers(verification, 0);
+ return (receivers.size() > 0) ? true : false;
+ }
+
private void warnAppInstallation() {
// TODO: DialogFragment?
mWarnInstallApps = new AlertDialog.Builder(getActivity()).setTitle(
@@ -420,6 +450,9 @@
} else {
setNonMarketAppsAllowed(false);
}
+ } else if (KEY_TOGGLE_VERIFY_APPLICATIONS.equals(key)) {
+ Settings.Global.putInt(getContentResolver(), Settings.Global.PACKAGE_VERIFIER_ENABLE,
+ mToggleVerifyApps.isChecked() ? 1 : 0);
} else {
// If we didn't handle it, let preferences handle it.
return super.onPreferenceTreeClick(preferenceScreen, preference);
diff --git a/src/com/android/settings/deviceinfo/Memory.java b/src/com/android/settings/deviceinfo/Memory.java
index f1c7fbe..794c478 100644
--- a/src/com/android/settings/deviceinfo/Memory.java
+++ b/src/com/android/settings/deviceinfo/Memory.java
@@ -23,7 +23,6 @@
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
-import android.content.res.Resources;
import android.hardware.usb.UsbManager;
import android.os.Bundle;
import android.os.Environment;
@@ -46,30 +45,32 @@
import com.android.settings.R;
import com.android.settings.SettingsPreferenceFragment;
import com.android.settings.Utils;
+import com.google.common.collect.Lists;
+import java.util.ArrayList;
+
+/**
+ * Panel showing storage usage on disk for known {@link StorageVolume} returned
+ * by {@link StorageManager}. Calculates and displays usage of data types.
+ */
public class Memory extends SettingsPreferenceFragment {
private static final String TAG = "MemorySettings";
private static final int DLG_CONFIRM_UNMOUNT = 1;
private static final int DLG_ERROR_UNMOUNT = 2;
- private Resources mResources;
-
// The mountToggle Preference that has last been clicked.
// Assumes no two successive unmount event on 2 different volumes are performed before the first
// one's preference is disabled
- private static Preference mLastClickedMountToggle;
- private static String mClickedMountPoint;
+ private static Preference sLastClickedMountToggle;
+ private static String sClickedMountPoint;
// Access using getMountService()
private IMountService mMountService = null;
-
private StorageManager mStorageManager = null;
-
private UsbManager mUsbManager = null;
- private StorageVolumePreferenceCategory mInternalStorageVolumePreferenceCategory;
- private StorageVolumePreferenceCategory[] mStorageVolumePreferenceCategories;
+ private ArrayList<StorageVolumePreferenceCategory> mCategories = Lists.newArrayList();
@Override
public void onCreate(Bundle icicle) {
@@ -84,32 +85,28 @@
addPreferencesFromResource(R.xml.device_info_memory);
- mResources = getResources();
-
if (!Environment.isExternalStorageEmulated()) {
// External storage is separate from internal storage; need to
// show internal storage as a separate item.
- mInternalStorageVolumePreferenceCategory = new StorageVolumePreferenceCategory(
- getActivity(), mResources, null, mStorageManager, false);
- getPreferenceScreen().addPreference(mInternalStorageVolumePreferenceCategory);
- mInternalStorageVolumePreferenceCategory.init();
+ addCategoryForVolume(null);
}
- StorageVolume[] storageVolumes = mStorageManager.getVolumeList();
- int length = storageVolumes.length;
- mStorageVolumePreferenceCategories = new StorageVolumePreferenceCategory[length];
- for (int i = 0; i < length; i++) {
- StorageVolume storageVolume = storageVolumes[i];
- boolean isPrimary = i == 0;
- mStorageVolumePreferenceCategories[i] = new StorageVolumePreferenceCategory(
- getActivity(), mResources, storageVolume, mStorageManager, isPrimary);
- getPreferenceScreen().addPreference(mStorageVolumePreferenceCategories[i]);
- mStorageVolumePreferenceCategories[i].init();
+ final StorageVolume[] storageVolumes = mStorageManager.getVolumeList();
+ for (StorageVolume volume : storageVolumes) {
+ addCategoryForVolume(volume);
}
setHasOptionsMenu(true);
}
+ private void addCategoryForVolume(StorageVolume volume) {
+ final StorageVolumePreferenceCategory category = new StorageVolumePreferenceCategory(
+ getActivity(), volume);
+ mCategories.add(category);
+ getPreferenceScreen().addPreference(category);
+ category.init();
+ }
+
private boolean isMassStorageEnabled() {
// mass storage is enabled if primary volume supports it
final StorageVolume[] storageVolumes = mStorageManager.getVolumeList();
@@ -128,11 +125,8 @@
intentFilter.addAction(UsbManager.ACTION_USB_STATE);
getActivity().registerReceiver(mMediaScannerReceiver, intentFilter);
- if (mInternalStorageVolumePreferenceCategory != null) {
- mInternalStorageVolumePreferenceCategory.onResume();
- }
- for (int i = 0; i < mStorageVolumePreferenceCategories.length; i++) {
- mStorageVolumePreferenceCategories[i].onResume();
+ for (StorageVolumePreferenceCategory category : mCategories) {
+ category.onResume();
}
}
@@ -141,10 +135,10 @@
public void onStorageStateChanged(String path, String oldState, String newState) {
Log.i(TAG, "Received storage state changed notification that " + path +
" changed state from " + oldState + " to " + newState);
- for (int i = 0; i < mStorageVolumePreferenceCategories.length; i++) {
- StorageVolumePreferenceCategory svpc = mStorageVolumePreferenceCategories[i];
- if (path.equals(svpc.getStorageVolume().getPath())) {
- svpc.onStorageStateChanged();
+ for (StorageVolumePreferenceCategory category : mCategories) {
+ final StorageVolume volume = category.getStorageVolume();
+ if (volume != null && path.equals(volume.getPath())) {
+ category.onStorageStateChanged();
break;
}
}
@@ -155,11 +149,8 @@
public void onPause() {
super.onPause();
getActivity().unregisterReceiver(mMediaScannerReceiver);
- if (mInternalStorageVolumePreferenceCategory != null) {
- mInternalStorageVolumePreferenceCategory.onPause();
- }
- for (int i = 0; i < mStorageVolumePreferenceCategories.length; i++) {
- mStorageVolumePreferenceCategories[i].onPause();
+ for (StorageVolumePreferenceCategory category : mCategories) {
+ category.onPause();
}
}
@@ -214,9 +205,8 @@
@Override
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
- for (int i = 0; i < mStorageVolumePreferenceCategories.length; i++) {
- StorageVolumePreferenceCategory svpc = mStorageVolumePreferenceCategories[i];
- Intent intent = svpc.intentForClick(preference);
+ for (StorageVolumePreferenceCategory category : mCategories) {
+ Intent intent = category.intentForClick(preference);
if (intent != null) {
// Don't go across app boundary if monkey is running
if (!Utils.isMonkeyRunning()) {
@@ -225,11 +215,11 @@
return true;
}
- if (svpc.mountToggleClicked(preference)) {
- mLastClickedMountToggle = preference;
- final StorageVolume storageVolume = svpc.getStorageVolume();
- mClickedMountPoint = storageVolume.getPath();
- String state = mStorageManager.getVolumeState(storageVolume.getPath());
+ final StorageVolume volume = category.getStorageVolume();
+ if (volume != null && category.mountToggleClicked(preference)) {
+ sLastClickedMountToggle = preference;
+ sClickedMountPoint = volume.getPath();
+ String state = mStorageManager.getVolumeState(volume.getPath());
if (Environment.MEDIA_MOUNTED.equals(state) ||
Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {
unmount();
@@ -250,13 +240,12 @@
if (action.equals(UsbManager.ACTION_USB_STATE)) {
boolean isUsbConnected = intent.getBooleanExtra(UsbManager.USB_CONNECTED, false);
String usbFunction = mUsbManager.getDefaultFunction();
- for (int i = 0; i < mStorageVolumePreferenceCategories.length; i++) {
- mStorageVolumePreferenceCategories[i].onUsbStateChanged(isUsbConnected, usbFunction);
+ for (StorageVolumePreferenceCategory category : mCategories) {
+ category.onUsbStateChanged(isUsbConnected, usbFunction);
}
} else if (action.equals(Intent.ACTION_MEDIA_SCANNER_FINISHED)) {
- // mInternalStorageVolumePreferenceCategory is not affected by the media scanner
- for (int i = 0; i < mStorageVolumePreferenceCategories.length; i++) {
- mStorageVolumePreferenceCategories[i].onMediaScannerFinished();
+ for (StorageVolumePreferenceCategory category : mCategories) {
+ category.onMediaScannerFinished();
}
}
}
@@ -290,10 +279,10 @@
Toast.makeText(getActivity(), R.string.unmount_inform_text, Toast.LENGTH_SHORT).show();
IMountService mountService = getMountService();
try {
- mLastClickedMountToggle.setEnabled(false);
- mLastClickedMountToggle.setTitle(mResources.getString(R.string.sd_ejecting_title));
- mLastClickedMountToggle.setSummary(mResources.getString(R.string.sd_ejecting_summary));
- mountService.unmountVolume(mClickedMountPoint, true, false);
+ sLastClickedMountToggle.setEnabled(false);
+ sLastClickedMountToggle.setTitle(getString(R.string.sd_ejecting_title));
+ sLastClickedMountToggle.setSummary(getString(R.string.sd_ejecting_summary));
+ mountService.unmountVolume(sClickedMountPoint, true, false);
} catch (RemoteException e) {
// Informative dialog to user that unmount failed.
showDialogInner(DLG_ERROR_UNMOUNT);
@@ -307,7 +296,7 @@
private boolean hasAppsAccessingStorage() throws RemoteException {
IMountService mountService = getMountService();
- int stUsers[] = mountService.getStorageUsers(mClickedMountPoint);
+ int stUsers[] = mountService.getStorageUsers(sClickedMountPoint);
if (stUsers != null && stUsers.length > 0) {
return true;
}
@@ -345,7 +334,7 @@
IMountService mountService = getMountService();
try {
if (mountService != null) {
- mountService.mountVolume(mClickedMountPoint);
+ mountService.mountVolume(sClickedMountPoint);
} else {
Log.e(TAG, "Mount service is null, can't mount");
}
diff --git a/src/com/android/settings/deviceinfo/MiscFilesHandler.java b/src/com/android/settings/deviceinfo/MiscFilesHandler.java
index 5c803ad..7f5c746 100644
--- a/src/com/android/settings/deviceinfo/MiscFilesHandler.java
+++ b/src/com/android/settings/deviceinfo/MiscFilesHandler.java
@@ -195,7 +195,7 @@
final StorageVolume storageVolume = activity.getIntent().getParcelableExtra(
StorageVolume.EXTRA_STORAGE_VOLUME);
StorageMeasurement mMeasurement = StorageMeasurement.getInstance(
- activity, storageVolume, new UserHandle(UserHandle.USER_CURRENT), false);
+ activity, storageVolume, UserHandle.CURRENT);
if (mMeasurement == null) return;
mData = (ArrayList<StorageMeasurement.FileInfo>) mMeasurement.mFileInfoForMisc;
if (mData != null) {
diff --git a/src/com/android/settings/deviceinfo/PercentageBarChart.java b/src/com/android/settings/deviceinfo/PercentageBarChart.java
index b45eb69..cb25b81 100644
--- a/src/com/android/settings/deviceinfo/PercentageBarChart.java
+++ b/src/com/android/settings/deviceinfo/PercentageBarChart.java
@@ -16,8 +16,6 @@
package com.android.settings.deviceinfo;
-import com.android.settings.R;
-
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
@@ -26,10 +24,13 @@
import android.util.AttributeSet;
import android.view.View;
+import com.android.settings.R;
+
import java.util.Collection;
/**
- *
+ * Draws a horizontal bar chart with colored slices, each represented by
+ * {@link Entry}.
*/
public class PercentageBarChart extends View {
private final Paint mEmptyPaint = new Paint();
@@ -38,14 +39,21 @@
private int mMinTickWidth = 1;
- public static class Entry {
+ public static class Entry implements Comparable<Entry> {
+ public final int order;
public final float percentage;
public final Paint paint;
- protected Entry(float percentage, Paint paint) {
+ protected Entry(int order, float percentage, Paint paint) {
+ this.order = order;
this.percentage = percentage;
this.paint = paint;
}
+
+ @Override
+ public int compareTo(Entry another) {
+ return order - another.order;
+ }
}
public PercentageBarChart(Context context, AttributeSet attrs) {
@@ -139,12 +147,11 @@
* @param percentage the total width that
* @param color the color to draw the entry
*/
- public static Entry createEntry(float percentage, int color) {
+ public static Entry createEntry(int order, float percentage, int color) {
final Paint p = new Paint();
p.setColor(color);
p.setStyle(Paint.Style.FILL);
-
- return new Entry(percentage, p);
+ return new Entry(order, percentage, p);
}
public void setEntries(Collection<Entry> entries) {
diff --git a/src/com/android/settings/deviceinfo/StorageMeasurement.java b/src/com/android/settings/deviceinfo/StorageMeasurement.java
index ccdd600..c137b70 100644
--- a/src/com/android/settings/deviceinfo/StorageMeasurement.java
+++ b/src/com/android/settings/deviceinfo/StorageMeasurement.java
@@ -115,12 +115,11 @@
public void updateExact(StorageMeasurement meas, Bundle bundle);
}
- private StorageMeasurement(
- Context context, StorageVolume storageVolume, UserHandle user, boolean isPrimary) {
- mStorageVolume = storageVolume;
+ private StorageMeasurement(Context context, StorageVolume volume, UserHandle user) {
+ mStorageVolume = volume;
mUser = Preconditions.checkNotNull(user);
- mIsInternal = storageVolume == null;
- mIsPrimary = !mIsInternal && isPrimary;
+ mIsInternal = volume == null;
+ mIsPrimary = volume != null ? volume.isPrimary() : false;
// Start the thread that will measure the disk usage.
final HandlerThread handlerThread = new HandlerThread("MemoryMeasurement");
@@ -139,14 +138,14 @@
* @param isPrimary true when this storage volume is the primary volume
*/
public static StorageMeasurement getInstance(
- Context context, StorageVolume storageVolume, UserHandle user, boolean isPrimary) {
+ Context context, StorageVolume storageVolume, UserHandle user) {
final Pair<StorageVolume, UserHandle> key = new Pair<StorageVolume, UserHandle>(
storageVolume, user);
synchronized (sInstances) {
StorageMeasurement value = sInstances.get(key);
if (value == null) {
value = new StorageMeasurement(
- context.getApplicationContext(), storageVolume, user, isPrimary);
+ context.getApplicationContext(), storageVolume, user);
sInstances.put(key, value);
}
return value;
diff --git a/src/com/android/settings/deviceinfo/StorageVolumePreferenceCategory.java b/src/com/android/settings/deviceinfo/StorageVolumePreferenceCategory.java
index cb4d1c0..4c7c3e6 100644
--- a/src/com/android/settings/deviceinfo/StorageVolumePreferenceCategory.java
+++ b/src/com/android/settings/deviceinfo/StorageVolumePreferenceCategory.java
@@ -43,6 +43,7 @@
import com.google.android.collect.Lists;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.List;
import java.util.Set;
@@ -65,10 +66,14 @@
private Preference mFormatPreference;
private Preference mStorageLow;
- private final Resources mResources;
+ private final StorageVolume mVolume;
- private final StorageVolume mStorageVolume;
+ private final boolean mIsEmulated;
+ private final boolean mIsPrimary;
+
+ private final Resources mResources;
private final StorageManager mStorageManager;
+ private final UserManager mUserManager;
/** Measurement for local user. */
private StorageMeasurement mLocalMeasure;
@@ -76,7 +81,6 @@
private List<StorageMeasurement> mAllMeasures = Lists.newArrayList();
private boolean mAllowFormat;
- private final boolean mMeasureUsers;
private boolean mUsbConnected;
private String mUsbFunction;
@@ -166,26 +170,30 @@
}
};
- public StorageVolumePreferenceCategory(Context context, Resources resources,
- StorageVolume storageVolume, StorageManager storageManager, boolean isPrimary) {
+ public StorageVolumePreferenceCategory(Context context, StorageVolume volume) {
super(context);
- mResources = resources;
- mStorageVolume = storageVolume;
- mStorageManager = storageManager;
- setTitle(storageVolume != null ? storageVolume.getDescription(context)
- : resources.getText(R.string.internal_storage));
- mLocalMeasure = StorageMeasurement.getInstance(
- context, storageVolume, new UserHandle(UserHandle.USER_CURRENT), isPrimary);
+
+ mVolume = volume;
+
+ mIsPrimary = volume != null ? volume.isPrimary() : false;
+ mIsEmulated = volume != null ? volume.isEmulated() : false;
+
+ mResources = context.getResources();
+ mStorageManager = (StorageManager) context.getSystemService(Context.STORAGE_SERVICE);
+ mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE);
+
+ setTitle(volume != null ? volume.getDescription(context)
+ : context.getText(R.string.internal_storage));
+
+ mLocalMeasure = StorageMeasurement.getInstance(context, volume, UserHandle.CURRENT);
mAllMeasures.add(mLocalMeasure);
// Cannot format emulated storage
- mAllowFormat = mStorageVolume != null && !mStorageVolume.isEmulated();
+ mAllowFormat = mVolume != null && !mVolume.isEmulated();
+
// For now we are disabling reformatting secondary external storage
// until some interoperability problems with MTP are fixed
- if (!isPrimary) mAllowFormat = false;
-
- // Measure other users when showing primary emulated storage
- mMeasureUsers = (mStorageVolume != null && mStorageVolume.isEmulated()) && isPrimary;
+ if (!mIsPrimary) mAllowFormat = false;
}
private void addStorageItem(String key, int titleRes, int colorRes) {
@@ -199,41 +207,43 @@
public void init() {
final Context context = getContext();
+ final UserInfo currentUser;
+ try {
+ currentUser = ActivityManagerNative.getDefault().getCurrentUser();
+ } catch (RemoteException e) {
+ throw new RuntimeException("Failed to get current user");
+ }
+
+ final List<UserInfo> otherUsers = getUsersExcluding(currentUser);
+ final boolean measureUsers = mIsEmulated && mIsPrimary && otherUsers.size() > 0;
+
mUsageBarPreference = new UsageBarPreference(context);
mUsageBarPreference.setOrder(ORDER_USAGE_BAR);
addPreference(mUsageBarPreference);
addStorageItem(KEY_TOTAL_SIZE, R.string.memory_size, 0);
+ addStorageItem(KEY_AVAILABLE, R.string.memory_available, R.color.memory_avail);
+
+ if (measureUsers) {
+ addPreference(new PreferenceHeader(context, currentUser.name));
+ }
+
addStorageItem(KEY_APPLICATIONS, R.string.memory_apps_usage, R.color.memory_apps_usage);
addStorageItem(KEY_DCIM, R.string.memory_dcim_usage, R.color.memory_dcim);
addStorageItem(KEY_MUSIC, R.string.memory_music_usage, R.color.memory_music);
addStorageItem(KEY_DOWNLOADS, R.string.memory_downloads_usage, R.color.memory_downloads);
addStorageItem(KEY_MISC, R.string.memory_media_misc_usage, R.color.memory_misc);
- addStorageItem(KEY_AVAILABLE, R.string.memory_available, R.color.memory_avail);
- if (mMeasureUsers) {
- final UserManager userManager = (UserManager) context.getSystemService(
- Context.USER_SERVICE);
-
- final UserInfo currentUser;
- try {
- currentUser = ActivityManagerNative.getDefault().getCurrentUser();
- } catch (RemoteException e) {
- throw new RuntimeException("Failed to get current user");
- }
+ if (measureUsers) {
+ addPreference(new PreferenceHeader(context, R.string.storage_other_users));
int count = 0;
- for (UserInfo info : userManager.getUsers()) {
- // Only measure other users
- if (info.id == currentUser.id) {
- continue;
- }
-
+ for (UserInfo info : otherUsers) {
final UserHandle user = new UserHandle(info.id);
final String key = buildUserKey(user);
final StorageMeasurement measure = StorageMeasurement.getInstance(
- context, mStorageVolume, user, true);
+ context, mVolume, user);
measure.setIncludeAppCodeSize(false);
mAllMeasures.add(measure);
@@ -272,14 +282,14 @@
}
public StorageVolume getStorageVolume() {
- return mStorageVolume;
+ return mVolume;
}
private void updatePreferencesFromState() {
mMountTogglePreference.setEnabled(true);
- String state = mStorageVolume != null
- ? mStorageManager.getVolumeState(mStorageVolume.getPath())
+ String state = mVolume != null
+ ? mStorageManager.getVolumeState(mVolume.getPath())
: Environment.MEDIA_MOUNTED;
String readOnly = "";
@@ -291,7 +301,7 @@
}
}
- if ((mStorageVolume == null || !mStorageVolume.isRemovable())
+ if ((mVolume == null || !mVolume.isRemovable())
&& !Environment.MEDIA_UNMOUNTED.equals(state)) {
// This device has built-in storage that is not removable.
// There is no reason for the user to unmount it.
@@ -350,7 +360,7 @@
final long usedSize = totalSize - availSize;
mUsageBarPreference.clear();
- mUsageBarPreference.addEntry(usedSize / (float) totalSize, android.graphics.Color.GRAY);
+ mUsageBarPreference.addEntry(0, usedSize / (float) totalSize, android.graphics.Color.GRAY);
mUsageBarPreference.commit();
mShowingApprox = true;
@@ -369,7 +379,8 @@
if (mLocalMeasure.isExternalSDCard()) {
// TODO FIXME: external SD card will not report any size. Show used space in bar graph
final long usedSize = totalSize - availSize;
- mUsageBarPreference.addEntry(usedSize / (float) totalSize, android.graphics.Color.GRAY);
+ mUsageBarPreference.addEntry(
+ 0, usedSize / (float) totalSize, android.graphics.Color.GRAY);
}
updatePreference(appsSize, totalSize, KEY_APPLICATIONS);
@@ -411,13 +422,15 @@
updatePreference(size, totalSize, category, true);
}
- private void updatePreference(long size, long totalSize, String category, boolean showBar) {
+ private void updatePreference(long size, long totalSize, String category, boolean addBar) {
final StorageItemPreference pref = (StorageItemPreference) findPreference(category);
+
if (pref != null) {
if (size > 0) {
pref.setSummary(formatSize(size));
- if (showBar) {
- mUsageBarPreference.addEntry(size / (float) totalSize, pref.getColor());
+ if (addBar) {
+ final int order = pref.getOrder();
+ mUsageBarPreference.addEntry(order, size / (float) totalSize, pref.getColor());
}
} else {
removePreference(pref);
@@ -448,6 +461,7 @@
mUsbFunction = usbFunction;
measure();
}
+
public void onMediaScannerFinished() {
measure();
}
@@ -492,7 +506,7 @@
if (pref == mFormatPreference) {
intent = new Intent(Intent.ACTION_VIEW);
intent.setClass(getContext(), com.android.settings.MediaFormat.class);
- intent.putExtra(StorageVolume.EXTRA_STORAGE_VOLUME, mStorageVolume);
+ intent.putExtra(StorageVolume.EXTRA_STORAGE_VOLUME, mVolume);
} else if (KEY_APPLICATIONS.equals(key)) {
intent = new Intent(Intent.ACTION_MANAGE_PACKAGE_STORAGE);
intent.setClass(getContext(),
@@ -512,10 +526,42 @@
Context context = getContext().getApplicationContext();
if (mLocalMeasure.getMiscSize() > 0) {
intent = new Intent(context, MiscFilesHandler.class);
- intent.putExtra(StorageVolume.EXTRA_STORAGE_VOLUME, mStorageVolume);
+ intent.putExtra(StorageVolume.EXTRA_STORAGE_VOLUME, mVolume);
}
}
return intent;
}
+
+ public static class PreferenceHeader extends Preference {
+ public PreferenceHeader(Context context, int titleRes) {
+ super(context, null, com.android.internal.R.attr.preferenceCategoryStyle);
+ setTitle(titleRes);
+ }
+
+ public PreferenceHeader(Context context, CharSequence title) {
+ super(context, null, com.android.internal.R.attr.preferenceCategoryStyle);
+ setTitle(title);
+ }
+
+ @Override
+ public boolean isEnabled() {
+ return false;
+ }
+ }
+
+
+ /**
+ * Return list of other users, excluding the current user.
+ */
+ private List<UserInfo> getUsersExcluding(UserInfo excluding) {
+ final List<UserInfo> users = mUserManager.getUsers();
+ final Iterator<UserInfo> i = users.iterator();
+ while (i.hasNext()) {
+ if (i.next().id == excluding.id) {
+ i.remove();
+ }
+ }
+ return users;
+ }
}
diff --git a/src/com/android/settings/deviceinfo/UsageBarPreference.java b/src/com/android/settings/deviceinfo/UsageBarPreference.java
index 5aeaef5..2f3fd03 100644
--- a/src/com/android/settings/deviceinfo/UsageBarPreference.java
+++ b/src/com/android/settings/deviceinfo/UsageBarPreference.java
@@ -17,6 +17,7 @@
package com.android.settings.deviceinfo;
import com.android.settings.R;
+import com.google.common.collect.Lists;
import android.content.Context;
import android.preference.Preference;
@@ -25,6 +26,8 @@
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
/**
* Creates a percentage bar chart inside a preference.
@@ -32,7 +35,7 @@
public class UsageBarPreference extends Preference {
private PercentageBarChart mChart = null;
- private final Collection<PercentageBarChart.Entry> mEntries = new ArrayList<PercentageBarChart.Entry>();
+ private final List<PercentageBarChart.Entry> mEntries = Lists.newArrayList();
public UsageBarPreference(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
@@ -49,8 +52,9 @@
setLayoutResource(R.layout.preference_memoryusage);
}
- public void addEntry(float percentage, int color) {
- mEntries.add(PercentageBarChart.createEntry(percentage, color));
+ public void addEntry(int order, float percentage, int color) {
+ mEntries.add(PercentageBarChart.createEntry(order, percentage, color));
+ Collections.sort(mEntries);
}
@Override
@@ -58,7 +62,6 @@
super.onBindView(view);
mChart = (PercentageBarChart) view.findViewById(R.id.percentage_bar_chart);
-
mChart.setEntries(mEntries);
}
diff --git a/src/com/android/settings/wifi/WifiApEnabler.java b/src/com/android/settings/wifi/WifiApEnabler.java
index 86a7cb4..f3fd566 100644
--- a/src/com/android/settings/wifi/WifiApEnabler.java
+++ b/src/com/android/settings/wifi/WifiApEnabler.java
@@ -117,7 +117,7 @@
if (enable && ((wifiState == WifiManager.WIFI_STATE_ENABLING) ||
(wifiState == WifiManager.WIFI_STATE_ENABLED))) {
mWifiManager.setWifiEnabled(false);
- Settings.Secure.putInt(cr, Settings.Secure.WIFI_SAVED_STATE, 1);
+ Settings.Global.putInt(cr, Settings.Global.WIFI_SAVED_STATE, 1);
}
if (mWifiManager.setWifiApEnabled(null, enable)) {
@@ -133,13 +133,13 @@
if (!enable) {
int wifiSavedState = 0;
try {
- wifiSavedState = Settings.Secure.getInt(cr, Settings.Secure.WIFI_SAVED_STATE);
+ wifiSavedState = Settings.Global.getInt(cr, Settings.Global.WIFI_SAVED_STATE);
} catch (Settings.SettingNotFoundException e) {
;
}
if (wifiSavedState == 1) {
mWifiManager.setWifiEnabled(true);
- Settings.Secure.putInt(cr, Settings.Secure.WIFI_SAVED_STATE, 0);
+ Settings.Global.putInt(cr, Settings.Global.WIFI_SAVED_STATE, 0);
}
}
}