summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2015-04-01 00:43:34 (GMT)
committerSteve Kondik <steve@cyngn.com>2015-04-01 00:43:34 (GMT)
commitb6a9f52ec30cbfa2d349fe2d98a10dc3b9acf4b4 (patch)
treee392dc71628f7990293d7cfb26ac899dd2584762
parent0a796c8767ab382db849e13b94069b265451f454 (diff)
parentaba5c809387d78b1ddf583a8a201c9cdfd1dd71b (diff)
downloadandroid_packages_apps_Trebuchet-b6a9f52ec30cbfa2d349fe2d98a10dc3b9acf4b4.zip
android_packages_apps_Trebuchet-b6a9f52ec30cbfa2d349fe2d98a10dc3b9acf4b4.tar.gz
android_packages_apps_Trebuchet-b6a9f52ec30cbfa2d349fe2d98a10dc3b9acf4b4.tar.bz2
Merge branch 'cm-12.0' of git://github.com/CyanogenMod/android_packages_apps_Trebuchet into cm-12.1
-rw-r--r--res/values-af/cm_strings.xml5
-rw-r--r--res/values-ca/cm_strings.xml9
-rw-r--r--res/values-cs/cm_strings.xml5
-rw-r--r--res/values-da/cm_strings.xml4
-rw-r--r--res/values-de/cm_strings.xml5
-rw-r--r--res/values-el/cm_strings.xml5
-rw-r--r--res/values-en-rAU/cm_arrays.xml35
-rw-r--r--res/values-en-rAU/cm_strings.xml5
-rw-r--r--res/values-en-rIN/cm_arrays.xml35
-rw-r--r--res/values-en-rIN/cm_strings.xml51
-rw-r--r--res/values-es/cm_strings.xml5
-rw-r--r--res/values-fi/cm_strings.xml5
-rw-r--r--res/values-fr/cm_strings.xml4
-rw-r--r--res/values-hu/cm_strings.xml5
-rw-r--r--res/values-in/cm_strings.xml5
-rw-r--r--res/values-it/cm_strings.xml5
-rw-r--r--res/values-iw/cm_strings.xml5
-rw-r--r--res/values-ja/cm_strings.xml5
-rw-r--r--res/values-ko/cm_strings.xml4
-rw-r--r--res/values-lb/strings.xml2
-rw-r--r--res/values-lt/cm_strings.xml5
-rw-r--r--res/values-nb/cm_strings.xml4
-rw-r--r--res/values-nl/cm_strings.xml5
-rw-r--r--res/values-pl/cm_strings.xml5
-rw-r--r--res/values-pt-rBR/cm_strings.xml5
-rw-r--r--res/values-pt-rPT/cm_strings.xml11
-rw-r--r--res/values-ro/cm_strings.xml1
-rw-r--r--res/values-ru/cm_strings.xml9
-rw-r--r--res/values-sk/cm_strings.xml5
-rw-r--r--res/values-sr/cm_strings.xml4
-rw-r--r--res/values-tr/cm_strings.xml5
-rw-r--r--res/values-ug/cm_arrays.xml35
-rw-r--r--res/values-uk/cm_strings.xml5
-rw-r--r--res/values-zh-rCN/cm_strings.xml5
-rw-r--r--res/values/cm_strings.xml3
-rw-r--r--src/com/android/launcher3/DeviceProfile.java26
-rw-r--r--src/com/android/launcher3/Folder.java16
-rw-r--r--src/com/android/launcher3/HiddenFolderFragment.java41
-rw-r--r--src/com/android/launcher3/Launcher.java8
-rw-r--r--src/com/android/launcher3/OverviewSettingsPanel.java5
-rw-r--r--src/com/android/launcher3/Utilities.java9
-rw-r--r--src/com/android/launcher3/WidgetPreviewLoader.java6
-rw-r--r--src/com/android/launcher3/list/SettingsPinnedHeaderAdapter.java40
-rw-r--r--src/com/android/launcher3/settings/SettingsProvider.java4
44 files changed, 427 insertions, 39 deletions
diff --git a/res/values-af/cm_strings.xml b/res/values-af/cm_strings.xml
index 44d5573..5f343f2 100644
--- a/res/values-af/cm_strings.xml
+++ b/res/values-af/cm_strings.xml
@@ -43,4 +43,9 @@
<string name="icon_labels_hide">Wegsteek</string>
<string name="protected_app_settings">Beskermde programme</string>
<string name="dialog_confirm">Bevestig</string>
+ <string name="drawer_type">Uitleg</string>
+ <string name="drawer_type_drawer">Vertikaal</string>
+ <string name="drawer_type_pager">Bladsye</string>
+ <string name="setting_state_disabled">Gedeaktiveer</string>
+ <string name="search_activity_not_found">\'n Soektog aktiwiteit kon nie gevind word nie!</string>
</resources>
diff --git a/res/values-ca/cm_strings.xml b/res/values-ca/cm_strings.xml
index 665cb3c..19edb47 100644
--- a/res/values-ca/cm_strings.xml
+++ b/res/values-ca/cm_strings.xml
@@ -18,7 +18,7 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="home_screen_settings">CONFIGURACIÓ DE LA PANTALLA D\'INICI</string>
<string name="drawer_settings">CONFIGURACIÓ DEL CALAIX</string>
- <string name="app_settings">CONFIGURACIÓ DE L\'APP</string>
+ <string name="app_settings">CONFIGURACIÓ DE L\'APLICACIÓ</string>
<string name="setting_state_on">SÍ</string>
<string name="setting_state_off">NO</string>
<string name="themes_button_text">Temes</string>
@@ -41,6 +41,11 @@
<string name="icon_labels">Etiquetes de les icones</string>
<string name="icon_labels_show">Mostra</string>
<string name="icon_labels_hide">Amaga</string>
- <string name="protected_app_settings">Apps protegides</string>
+ <string name="protected_app_settings">Aplicacions protegides</string>
<string name="dialog_confirm">Confirma</string>
+ <string name="drawer_type">Disposició</string>
+ <string name="drawer_type_drawer">Vertical</string>
+ <string name="drawer_type_pager">Paginada</string>
+ <string name="setting_state_disabled">DESHABILITAT</string>
+ <string name="search_activity_not_found">No s\'ha pogut trobar una activitat de cerca!</string>
</resources>
diff --git a/res/values-cs/cm_strings.xml b/res/values-cs/cm_strings.xml
index 2b42571..2c195ec 100644
--- a/res/values-cs/cm_strings.xml
+++ b/res/values-cs/cm_strings.xml
@@ -43,4 +43,9 @@
<string name="icon_labels_hide">Skrýt</string>
<string name="protected_app_settings">Chráněné aplikace</string>
<string name="dialog_confirm">Potvrdit</string>
+ <string name="drawer_type">Rozložení</string>
+ <string name="drawer_type_drawer">Vertikální</string>
+ <string name="drawer_type_pager">Stránkové</string>
+ <string name="setting_state_disabled">ZAKÁZÁNO</string>
+ <string name="search_activity_not_found">Vyhledávací aktivita nenalezena!</string>
</resources>
diff --git a/res/values-da/cm_strings.xml b/res/values-da/cm_strings.xml
index 0f571e5..f49271e 100644
--- a/res/values-da/cm_strings.xml
+++ b/res/values-da/cm_strings.xml
@@ -43,4 +43,8 @@
<string name="icon_labels_hide">Skjul</string>
<string name="protected_app_settings">Beskyttede apps</string>
<string name="dialog_confirm">Bekræft</string>
+ <string name="drawer_type">Layout</string>
+ <string name="drawer_type_drawer">Lodret</string>
+ <string name="drawer_type_pager">Sideinddelt</string>
+ <string name="setting_state_disabled">HANDICAPPET</string>
</resources>
diff --git a/res/values-de/cm_strings.xml b/res/values-de/cm_strings.xml
index 872d728..be752f8 100644
--- a/res/values-de/cm_strings.xml
+++ b/res/values-de/cm_strings.xml
@@ -43,4 +43,9 @@
<string name="icon_labels_hide">Verbergen</string>
<string name="protected_app_settings">Geschützte Apps</string>
<string name="dialog_confirm">Bestätigen</string>
+ <string name="drawer_type">Layout</string>
+ <string name="drawer_type_drawer">Vertikal</string>
+ <string name="drawer_type_pager">Seiten</string>
+ <string name="setting_state_disabled">DEAKTIVIERT</string>
+ <string name="search_activity_not_found">Es konnte keine Suche-Aktivität gefunden werden!</string>
</resources>
diff --git a/res/values-el/cm_strings.xml b/res/values-el/cm_strings.xml
index a49e891..48b5237 100644
--- a/res/values-el/cm_strings.xml
+++ b/res/values-el/cm_strings.xml
@@ -43,4 +43,9 @@
<string name="icon_labels_hide">Απόκρυψη</string>
<string name="protected_app_settings">Προστατευμένες εφαρμογές</string>
<string name="dialog_confirm">Επιβεβαίωση</string>
+ <string name="drawer_type">Διάταξη</string>
+ <string name="drawer_type_drawer">Κάθετη</string>
+ <string name="drawer_type_pager">Οριζόντια</string>
+ <string name="setting_state_disabled">ΑΠΕΝΕΡΓΟΠΟΙΗΜΕΝΟ</string>
+ <string name="search_activity_not_found">Δεν βρέθηκε καμία δραστηριότητα αναζήτησης!</string>
</resources>
diff --git a/res/values-en-rAU/cm_arrays.xml b/res/values-en-rAU/cm_arrays.xml
new file mode 100644
index 0000000..3700853
--- /dev/null
+++ b/res/values-en-rAU/cm_arrays.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
+ Copyright (C) 2014 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources>
+ <string-array name="transition_effect_entries">
+ <item>None</item>
+ <item>Zoom in</item>
+ <item>Zoom out</item>
+ <item>Rotate up</item>
+ <item>Rotate down</item>
+ <item>Cube in</item>
+ <item>Cube out</item>
+ <item>Stack</item>
+ <item>Accordion</item>
+ <item>Flip</item>
+ <item>Cylinder in</item>
+ <item>Cylinder out</item>
+ <item>Carousel</item>
+ <item>Overview</item>
+ </string-array>
+</resources>
diff --git a/res/values-en-rAU/cm_strings.xml b/res/values-en-rAU/cm_strings.xml
index 4b4145c..bb88aa4 100644
--- a/res/values-en-rAU/cm_strings.xml
+++ b/res/values-en-rAU/cm_strings.xml
@@ -43,4 +43,9 @@
<string name="icon_labels_hide">Hide</string>
<string name="protected_app_settings">Protected apps</string>
<string name="dialog_confirm">Confirm</string>
+ <string name="drawer_type">Layout</string>
+ <string name="drawer_type_drawer">Vertical</string>
+ <string name="drawer_type_pager">Paged</string>
+ <string name="setting_state_disabled">DISABLED</string>
+ <string name="search_activity_not_found">A search activity could not be found!</string>
</resources>
diff --git a/res/values-en-rIN/cm_arrays.xml b/res/values-en-rIN/cm_arrays.xml
new file mode 100644
index 0000000..3700853
--- /dev/null
+++ b/res/values-en-rIN/cm_arrays.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
+ Copyright (C) 2014 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources>
+ <string-array name="transition_effect_entries">
+ <item>None</item>
+ <item>Zoom in</item>
+ <item>Zoom out</item>
+ <item>Rotate up</item>
+ <item>Rotate down</item>
+ <item>Cube in</item>
+ <item>Cube out</item>
+ <item>Stack</item>
+ <item>Accordion</item>
+ <item>Flip</item>
+ <item>Cylinder in</item>
+ <item>Cylinder out</item>
+ <item>Carousel</item>
+ <item>Overview</item>
+ </string-array>
+</resources>
diff --git a/res/values-en-rIN/cm_strings.xml b/res/values-en-rIN/cm_strings.xml
new file mode 100644
index 0000000..bb88aa4
--- /dev/null
+++ b/res/values-en-rIN/cm_strings.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
+ Copyright (C) 2014 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="home_screen_settings">HOME SCREEN SETTINGS</string>
+ <string name="drawer_settings">DRAWER SETTINGS</string>
+ <string name="app_settings">APP SETTINGS</string>
+ <string name="setting_state_on">ON</string>
+ <string name="setting_state_off">OFF</string>
+ <string name="themes_button_text">Themes</string>
+ <string name="scrolling_page_outlines">Page outlines</string>
+ <string name="scrolling_fade_adjacent">Fade side pages</string>
+ <string name="scrolling_wallpaper">Scroll wallpaper</string>
+ <string name="grid_size_text">Grid size</string>
+ <string name="grid_size_comfortable">Comfortable</string>
+ <string name="grid_size_cozy">Cozy</string>
+ <string name="grid_size_condensed">Condensed</string>
+ <string name="grid_size_custom">Custom (<xliff:g id="rows">%1$d</xliff:g> \u00d7 <xliff:g id="columns">%2$d</xliff:g>)</string>
+ <string name="preferences_interface_homescreen_custom">Select custom size</string>
+ <string name="scroll_effect_text">Scroll effect</string>
+ <string name="drawer_sorting_text">Sorting mode</string>
+ <string name="sort_mode_title">Title</string>
+ <string name="sort_mode_launch_count">Launch count</string>
+ <string name="sort_mode_install_time">Install time</string>
+ <string name="home_screen_search_text">Search bar</string>
+ <string name="larger_icons_text">Larger icons</string>
+ <string name="icon_labels">Icon labels</string>
+ <string name="icon_labels_show">Show</string>
+ <string name="icon_labels_hide">Hide</string>
+ <string name="protected_app_settings">Protected apps</string>
+ <string name="dialog_confirm">Confirm</string>
+ <string name="drawer_type">Layout</string>
+ <string name="drawer_type_drawer">Vertical</string>
+ <string name="drawer_type_pager">Paged</string>
+ <string name="setting_state_disabled">DISABLED</string>
+ <string name="search_activity_not_found">A search activity could not be found!</string>
+</resources>
diff --git a/res/values-es/cm_strings.xml b/res/values-es/cm_strings.xml
index 15880f3..88be19f 100644
--- a/res/values-es/cm_strings.xml
+++ b/res/values-es/cm_strings.xml
@@ -43,4 +43,9 @@
<string name="icon_labels_hide">Ocultar</string>
<string name="protected_app_settings">Aplicaciones protegidas</string>
<string name="dialog_confirm">Confirmar</string>
+ <string name="drawer_type">Disposición</string>
+ <string name="drawer_type_drawer">Vertical</string>
+ <string name="drawer_type_pager">Paginado</string>
+ <string name="setting_state_disabled">DESHABILITADO</string>
+ <string name="search_activity_not_found">¡No se pudo encontrar un asistente de búsqueda!</string>
</resources>
diff --git a/res/values-fi/cm_strings.xml b/res/values-fi/cm_strings.xml
index a6eab9f..643f501 100644
--- a/res/values-fi/cm_strings.xml
+++ b/res/values-fi/cm_strings.xml
@@ -43,4 +43,9 @@
<string name="icon_labels_hide">Piilota</string>
<string name="protected_app_settings">Suojatut sovellukset</string>
<string name="dialog_confirm">Vahvista</string>
+ <string name="drawer_type">Asettelu</string>
+ <string name="drawer_type_drawer">Pysty</string>
+ <string name="drawer_type_pager">Vaaka</string>
+ <string name="setting_state_disabled">POIS KÄYTÖSTÄ</string>
+ <string name="search_activity_not_found">Hakuhistoriaa ei löytynyt!</string>
</resources>
diff --git a/res/values-fr/cm_strings.xml b/res/values-fr/cm_strings.xml
index a7d826a..12fa3cc 100644
--- a/res/values-fr/cm_strings.xml
+++ b/res/values-fr/cm_strings.xml
@@ -43,4 +43,8 @@
<string name="icon_labels_hide">Masquer</string>
<string name="protected_app_settings">Applications protégées</string>
<string name="dialog_confirm">Confirmer</string>
+ <string name="drawer_type">Disposition</string>
+ <string name="drawer_type_drawer">Verticale</string>
+ <string name="drawer_type_pager">Paginée</string>
+ <string name="setting_state_disabled">DÉSACTIVÉ</string>
</resources>
diff --git a/res/values-hu/cm_strings.xml b/res/values-hu/cm_strings.xml
index 2b177b1..123bbb8 100644
--- a/res/values-hu/cm_strings.xml
+++ b/res/values-hu/cm_strings.xml
@@ -43,4 +43,9 @@
<string name="icon_labels_hide">Elrejtés</string>
<string name="protected_app_settings">Védett alkalmazások</string>
<string name="dialog_confirm">Megerősítés</string>
+ <string name="drawer_type">Kinézet</string>
+ <string name="drawer_type_drawer">Függőleges</string>
+ <string name="drawer_type_pager">Lapozható</string>
+ <string name="setting_state_disabled">LETILTVA</string>
+ <string name="search_activity_not_found">Keresési tevékenység nem található!</string>
</resources>
diff --git a/res/values-in/cm_strings.xml b/res/values-in/cm_strings.xml
index 92c473f..f3c79ae 100644
--- a/res/values-in/cm_strings.xml
+++ b/res/values-in/cm_strings.xml
@@ -43,4 +43,9 @@
<string name="icon_labels_hide">Sembunyikan</string>
<string name="protected_app_settings">Aplikasi yang di lindungi</string>
<string name="dialog_confirm">Konfirmasi</string>
+ <string name="drawer_type">Tata letak</string>
+ <string name="drawer_type_drawer">Vertikal</string>
+ <string name="drawer_type_pager">Berhalaman</string>
+ <string name="setting_state_disabled">DINONAKTIFKAN</string>
+ <string name="search_activity_not_found">Aktivitas pencarian tidak dapat ditemukan!</string>
</resources>
diff --git a/res/values-it/cm_strings.xml b/res/values-it/cm_strings.xml
index bd7b960..c6b2b7a 100644
--- a/res/values-it/cm_strings.xml
+++ b/res/values-it/cm_strings.xml
@@ -43,4 +43,9 @@
<string name="icon_labels_hide">Nascondi</string>
<string name="protected_app_settings">App protette</string>
<string name="dialog_confirm">Conferma</string>
+ <string name="drawer_type">Disposizione</string>
+ <string name="drawer_type_drawer">Verticale</string>
+ <string name="drawer_type_pager">Paginato</string>
+ <string name="setting_state_disabled">DISATTIVATO</string>
+ <string name="search_activity_not_found">Impossibile trovare un\'activity di ricerca!</string>
</resources>
diff --git a/res/values-iw/cm_strings.xml b/res/values-iw/cm_strings.xml
index ea9316d..4c91856 100644
--- a/res/values-iw/cm_strings.xml
+++ b/res/values-iw/cm_strings.xml
@@ -43,4 +43,9 @@
<string name="icon_labels_hide">הסתר</string>
<string name="protected_app_settings">יישומים מוגנים</string>
<string name="dialog_confirm">אשר</string>
+ <string name="drawer_type">פריסה</string>
+ <string name="drawer_type_drawer">אנכי</string>
+ <string name="drawer_type_pager">דפים</string>
+ <string name="setting_state_disabled">כבוי</string>
+ <string name="search_activity_not_found">לא ניתן היה למצוא פעולת חיפוש!</string>
</resources>
diff --git a/res/values-ja/cm_strings.xml b/res/values-ja/cm_strings.xml
index 757417f..e480b16 100644
--- a/res/values-ja/cm_strings.xml
+++ b/res/values-ja/cm_strings.xml
@@ -43,4 +43,9 @@
<string name="icon_labels_hide">表示しない</string>
<string name="protected_app_settings">アプリの保護</string>
<string name="dialog_confirm">確認</string>
+ <string name="drawer_type">レイアウト</string>
+ <string name="drawer_type_drawer">縦</string>
+ <string name="drawer_type_pager">ページ</string>
+ <string name="setting_state_disabled">無効</string>
+ <string name="search_activity_not_found">検索アクティビティが見つかりませんでした。</string>
</resources>
diff --git a/res/values-ko/cm_strings.xml b/res/values-ko/cm_strings.xml
index 743a859..0d4ee11 100644
--- a/res/values-ko/cm_strings.xml
+++ b/res/values-ko/cm_strings.xml
@@ -43,4 +43,8 @@
<string name="icon_labels_hide">숨기기</string>
<string name="protected_app_settings">보호된 앱</string>
<string name="dialog_confirm">확인</string>
+ <string name="drawer_type">레이아웃</string>
+ <string name="drawer_type_drawer">수직</string>
+ <string name="drawer_type_pager">페이징</string>
+ <string name="setting_state_disabled">사용 안함</string>
</resources>
diff --git a/res/values-lb/strings.xml b/res/values-lb/strings.xml
index f56d6b9..082bbcd 100644
--- a/res/values-lb/strings.xml
+++ b/res/values-lb/strings.xml
@@ -88,7 +88,7 @@
<string name="first_run_cling_description">Fill dech wéi doheem.</string>
<string name="first_run_cling_create_screens_hint">Méi Schiermer fir Appen an Dossieren dobäisetzen</string>
<string name="migration_cling_title">App-Symboler kopéieren</string>
- <string name="migration_cling_description">Symboler an Dossieren vun dengem ale Startschierm importéieren?</string>
+ <string name="migration_cling_description">Symboler an Dossiere vun dengem ale Startschierm importéieren?</string>
<string name="migration_cling_copy_apps">SYMBOLER KOPÉIEREN</string>
<string name="migration_cling_use_default">FRËSCH UFÄNKEN</string>
<string name="workspace_cling_title">Aarbechtsberäich organiséieren</string>
diff --git a/res/values-lt/cm_strings.xml b/res/values-lt/cm_strings.xml
index 92753f4..9c27a69 100644
--- a/res/values-lt/cm_strings.xml
+++ b/res/values-lt/cm_strings.xml
@@ -43,4 +43,9 @@
<string name="icon_labels_hide">Paslėpti</string>
<string name="protected_app_settings">Apsaugotos programos</string>
<string name="dialog_confirm">Patvirtinti</string>
+ <string name="drawer_type">Išdėstymas</string>
+ <string name="drawer_type_drawer">Vertikalus</string>
+ <string name="drawer_type_pager">Puslapiai</string>
+ <string name="setting_state_disabled">NELEIDŽIAMA</string>
+ <string name="search_activity_not_found">Paieškos veikla negali būti rasta!</string>
</resources>
diff --git a/res/values-nb/cm_strings.xml b/res/values-nb/cm_strings.xml
index 5e2a935..dcf6edd 100644
--- a/res/values-nb/cm_strings.xml
+++ b/res/values-nb/cm_strings.xml
@@ -43,4 +43,8 @@
<string name="icon_labels_hide">Skjul</string>
<string name="protected_app_settings">Beskyttede apps</string>
<string name="dialog_confirm">Bekreft</string>
+ <string name="drawer_type">Oppsett</string>
+ <string name="drawer_type_drawer">Loddrett</string>
+ <string name="drawer_type_pager">Sidevekslet</string>
+ <string name="setting_state_disabled">DEAKTIVERT</string>
</resources>
diff --git a/res/values-nl/cm_strings.xml b/res/values-nl/cm_strings.xml
index 78008fd..f148659 100644
--- a/res/values-nl/cm_strings.xml
+++ b/res/values-nl/cm_strings.xml
@@ -43,4 +43,9 @@
<string name="icon_labels_hide">Uit</string>
<string name="protected_app_settings">Beschermde apps</string>
<string name="dialog_confirm">Bevestig</string>
+ <string name="drawer_type">Indeling</string>
+ <string name="drawer_type_drawer">Verticaal</string>
+ <string name="drawer_type_pager">Met pagina\'s</string>
+ <string name="setting_state_disabled">UITGESCHAKELD</string>
+ <string name="search_activity_not_found">Geen zoekactiviteit gevonden</string>
</resources>
diff --git a/res/values-pl/cm_strings.xml b/res/values-pl/cm_strings.xml
index 1d1fbd0..a37d25f 100644
--- a/res/values-pl/cm_strings.xml
+++ b/res/values-pl/cm_strings.xml
@@ -43,4 +43,9 @@
<string name="icon_labels_hide">Ukryj</string>
<string name="protected_app_settings">Chronione aplikacje</string>
<string name="dialog_confirm">Potwierdź</string>
+ <string name="drawer_type">Układ</string>
+ <string name="drawer_type_drawer">Pionowo</string>
+ <string name="drawer_type_pager">Strony</string>
+ <string name="setting_state_disabled">WYŁĄCZONE</string>
+ <string name="search_activity_not_found">Nie można odnaleźć aktywności związanej z wyszukiwaniem!</string>
</resources>
diff --git a/res/values-pt-rBR/cm_strings.xml b/res/values-pt-rBR/cm_strings.xml
index db3a1f2..2a73ee8 100644
--- a/res/values-pt-rBR/cm_strings.xml
+++ b/res/values-pt-rBR/cm_strings.xml
@@ -43,4 +43,9 @@
<string name="icon_labels_hide">Ocultar</string>
<string name="protected_app_settings">Aplicativos protegidos</string>
<string name="dialog_confirm">Confirmar</string>
+ <string name="drawer_type">Disposição</string>
+ <string name="drawer_type_drawer">Vertical</string>
+ <string name="drawer_type_pager">Paginada</string>
+ <string name="setting_state_disabled">DESATIVADO</string>
+ <string name="search_activity_not_found">Uma atividade de pesquisa não pôde ser encontrada!</string>
</resources>
diff --git a/res/values-pt-rPT/cm_strings.xml b/res/values-pt-rPT/cm_strings.xml
index b3faf63..4909a53 100644
--- a/res/values-pt-rPT/cm_strings.xml
+++ b/res/values-pt-rPT/cm_strings.xml
@@ -17,10 +17,10 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="home_screen_settings">DEFINIÇÕES DO ECRÃ INICIAL</string>
- <string name="drawer_settings">DEFINIÇÕES DA GAVETA APLICAÇÕES</string>
+ <string name="drawer_settings">DEFINIÇÕES DA GAVETA DE APLICAÇÕES</string>
<string name="app_settings">DEFINIÇÕES DA APLICAÇÃO</string>
- <string name="setting_state_on">LIG.</string>
- <string name="setting_state_off">DESL.</string>
+ <string name="setting_state_on">LIGADO</string>
+ <string name="setting_state_off">DESLIGADO</string>
<string name="themes_button_text">Temas</string>
<string name="scrolling_page_outlines">Contorno das páginas</string>
<string name="scrolling_fade_adjacent">Desvanecer as laterais das páginas</string>
@@ -43,4 +43,9 @@
<string name="icon_labels_hide">Ocultar</string>
<string name="protected_app_settings">Aplicações protegidas</string>
<string name="dialog_confirm">Confirmar</string>
+ <string name="drawer_type">Disposição</string>
+ <string name="drawer_type_drawer">Vertical</string>
+ <string name="drawer_type_pager">Paginada</string>
+ <string name="setting_state_disabled">DESATIVADO</string>
+ <string name="search_activity_not_found">Não foi encontrada nenhuma atividade de pesquisa!</string>
</resources>
diff --git a/res/values-ro/cm_strings.xml b/res/values-ro/cm_strings.xml
index 183467a..3189259 100644
--- a/res/values-ro/cm_strings.xml
+++ b/res/values-ro/cm_strings.xml
@@ -43,4 +43,5 @@
<string name="icon_labels_hide">Ascunde</string>
<string name="protected_app_settings">Aplicații protejate</string>
<string name="dialog_confirm">Confirmă</string>
+ <string name="setting_state_disabled">DEZACTIVAT</string>
</resources>
diff --git a/res/values-ru/cm_strings.xml b/res/values-ru/cm_strings.xml
index 2a6ba41..e00eb9d 100644
--- a/res/values-ru/cm_strings.xml
+++ b/res/values-ru/cm_strings.xml
@@ -18,7 +18,7 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="home_screen_settings">ДОМАШНИЙ ЭКРАН</string>
<string name="drawer_settings">МЕНЮ ПРИЛОЖЕНИЙ</string>
- <string name="app_settings">НАСТРОЙКИ ПРИЛОЖЕНИЯ</string>
+ <string name="app_settings">ОБЩИЕ НАСТРОЙКИ</string>
<string name="setting_state_on">ВКЛ.</string>
<string name="setting_state_off">ВЫКЛ.</string>
<string name="themes_button_text">Темы</string>
@@ -26,7 +26,7 @@
<string name="scrolling_fade_adjacent">Затемнять края при переходе</string>
<string name="scrolling_wallpaper">Прокрутка обоев</string>
<string name="grid_size_text">Размер сетки</string>
- <string name="grid_size_comfortable">Комфортная</string>
+ <string name="grid_size_comfortable">Просторная</string>
<string name="grid_size_cozy">Удобная</string>
<string name="grid_size_condensed">Сжатая</string>
<string name="grid_size_custom">Своя (<xliff:g id="rows">%1$d</xliff:g> \u00d7 <xliff:g id="columns">%2$d</xliff:g>)</string>
@@ -43,4 +43,9 @@
<string name="icon_labels_hide">Скрывать</string>
<string name="protected_app_settings">Заблокированные приложения</string>
<string name="dialog_confirm">Подтвердить</string>
+ <string name="drawer_type">Тип меню</string>
+ <string name="drawer_type_drawer">Вертикальное</string>
+ <string name="drawer_type_pager">Постраничное</string>
+ <string name="setting_state_disabled">ОТКЛЮЧЕНО</string>
+ <string name="search_activity_not_found">Невозможно запустить приложение поиска!</string>
</resources>
diff --git a/res/values-sk/cm_strings.xml b/res/values-sk/cm_strings.xml
index c37ad8f..c2d7740 100644
--- a/res/values-sk/cm_strings.xml
+++ b/res/values-sk/cm_strings.xml
@@ -43,4 +43,9 @@
<string name="icon_labels_hide">Skryť</string>
<string name="protected_app_settings">Chránené aplikácie</string>
<string name="dialog_confirm">Potvrdiť</string>
+ <string name="drawer_type">Rozloženie</string>
+ <string name="drawer_type_drawer">Zvislé</string>
+ <string name="drawer_type_pager">Stránkované</string>
+ <string name="setting_state_disabled">ZAKÁZANÉ</string>
+ <string name="search_activity_not_found">Aktivita vyhľadávania sa nenašla!</string>
</resources>
diff --git a/res/values-sr/cm_strings.xml b/res/values-sr/cm_strings.xml
index cddf785..11a7cc2 100644
--- a/res/values-sr/cm_strings.xml
+++ b/res/values-sr/cm_strings.xml
@@ -43,4 +43,8 @@
<string name="icon_labels_hide">Сакриј</string>
<string name="protected_app_settings">Заштићене апликације</string>
<string name="dialog_confirm">Потврди</string>
+ <string name="drawer_type">Распоред</string>
+ <string name="drawer_type_drawer">Вертикално</string>
+ <string name="drawer_type_pager">Поставка</string>
+ <string name="setting_state_disabled">ОНЕМОГУЋЕНО</string>
</resources>
diff --git a/res/values-tr/cm_strings.xml b/res/values-tr/cm_strings.xml
index 1eefcf3..784d1be 100644
--- a/res/values-tr/cm_strings.xml
+++ b/res/values-tr/cm_strings.xml
@@ -43,4 +43,9 @@
<string name="icon_labels_hide">Gizle</string>
<string name="protected_app_settings">Korunan uygulamalar</string>
<string name="dialog_confirm">Onayla</string>
+ <string name="drawer_type">Düzen</string>
+ <string name="drawer_type_drawer">Dikey</string>
+ <string name="drawer_type_pager">Sayfalı</string>
+ <string name="setting_state_disabled">DEVRE DIŞI</string>
+ <string name="search_activity_not_found">Arama etkinliği bulunamadı!</string>
</resources>
diff --git a/res/values-ug/cm_arrays.xml b/res/values-ug/cm_arrays.xml
new file mode 100644
index 0000000..57bcc9c
--- /dev/null
+++ b/res/values-ug/cm_arrays.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
+ Copyright (C) 2014 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources>
+ <string-array name="transition_effect_entries">
+ <item>يوق</item>
+ <item>يېقىنلاشتۇر</item>
+ <item>يىراقلاشتۇر</item>
+ <item>يۇقىرىغا ئايلاندۇر</item>
+ <item>تۆۋەنگە ئايلاندۇر</item>
+ <item>كۇب ئىچىدە</item>
+ <item>كۇب سىرتى</item>
+ <item>دەستىلە</item>
+ <item>ئاكوردىيون</item>
+ <item>ئۆرۈ</item>
+ <item>سىلىندېر ئىچى</item>
+ <item>سىلىندېر سىرتى</item>
+ <item>ئايلانما ياغاچ ئات</item>
+ <item>قىسقىچە بايان</item>
+ </string-array>
+</resources>
diff --git a/res/values-uk/cm_strings.xml b/res/values-uk/cm_strings.xml
index 88ad214..71cbbe1 100644
--- a/res/values-uk/cm_strings.xml
+++ b/res/values-uk/cm_strings.xml
@@ -43,4 +43,9 @@
<string name="icon_labels_hide">Приховати</string>
<string name="protected_app_settings">Заблоковані програми</string>
<string name="dialog_confirm">Підтвердити</string>
+ <string name="drawer_type">Тип меню</string>
+ <string name="drawer_type_drawer">Вертикальне</string>
+ <string name="drawer_type_pager">Сторінками</string>
+ <string name="setting_state_disabled">ВИМКНЕНО</string>
+ <string name="search_activity_not_found">Діяльність з пошуку не виявлена!</string>
</resources>
diff --git a/res/values-zh-rCN/cm_strings.xml b/res/values-zh-rCN/cm_strings.xml
index 275bed2..bdc64e6 100644
--- a/res/values-zh-rCN/cm_strings.xml
+++ b/res/values-zh-rCN/cm_strings.xml
@@ -43,4 +43,9 @@
<string name="icon_labels_hide">隐藏</string>
<string name="protected_app_settings">受保护的应用</string>
<string name="dialog_confirm">确认</string>
+ <string name="drawer_type">布局</string>
+ <string name="drawer_type_drawer">垂直</string>
+ <string name="drawer_type_pager">分页</string>
+ <string name="setting_state_disabled">已禁用</string>
+ <string name="search_activity_not_found">无法找到搜索活动!</string>
</resources>
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml
index 389605e..4169251 100644
--- a/res/values/cm_strings.xml
+++ b/res/values/cm_strings.xml
@@ -82,4 +82,7 @@
<string name="drawer_type_pager">Paged</string>
<string name="setting_state_disabled">DISABLED</string>
+
+ <!-- Search Manager doesn't exist -->
+ <string name="search_activity_not_found">A search activity could not be found!</string>
</resources>
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index 9bdfcf4..d6c401d 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -315,8 +315,7 @@ public class DeviceProfile {
updateAvailableDimensions(context);
computeAllAppsButtonSize(context);
// Search Bar
- searchBarVisible = SettingsProvider.getBoolean(context, SettingsProvider.SETTINGS_UI_HOMESCREEN_SEARCH,
- R.bool.preferences_interface_homescreen_search_default);
+ searchBarVisible = isSearchBarEnabled(context);
searchBarSpaceWidthPx = Math.min(searchBarSpaceMaxWidthPx, widthPx);
searchBarSpaceHeightPx = 2 * edgeMarginPx + (searchBarVisible ? searchBarHeightPx : 3 * edgeMarginPx);
}
@@ -780,8 +779,7 @@ public class DeviceProfile {
public void layout(Launcher launcher) {
// Update search bar for live settings
- searchBarVisible = SettingsProvider.getBoolean(launcher, SettingsProvider.SETTINGS_UI_HOMESCREEN_SEARCH,
- R.bool.preferences_interface_homescreen_search_default);
+ searchBarVisible = isSearchBarEnabled(launcher);
searchBarSpaceHeightPx = 2 * edgeMarginPx + (searchBarVisible ? searchBarHeightPx : 3 * edgeMarginPx);
FrameLayout.LayoutParams lp;
Resources res = launcher.getResources();
@@ -960,4 +958,24 @@ public class DeviceProfile {
}
}
}
+
+ private boolean isSearchBarEnabled(Context context) {
+ boolean searchActivityExists = Utilities.searchActivityExists(context);
+
+ boolean isSearchEnabled = SettingsProvider.getBoolean(context,
+ SettingsProvider.SETTINGS_UI_HOMESCREEN_SEARCH,
+ R.bool.preferences_interface_homescreen_search_default);
+
+ if (searchActivityExists) {
+ return isSearchEnabled;
+ } else {
+ if (isSearchEnabled) {
+ // Disable search bar
+ SettingsProvider.putBoolean(context,
+ SettingsProvider.SETTINGS_UI_HOMESCREEN_SEARCH, false);
+ }
+
+ return false;
+ }
+ }
}
diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java
index e4f935c..7267f32 100644
--- a/src/com/android/launcher3/Folder.java
+++ b/src/com/android/launcher3/Folder.java
@@ -299,7 +299,9 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
public void modifyProtectedApps(boolean protect) {
ArrayList<ComponentName> components = new ArrayList<ComponentName>();
for (Pair<ComponentName, CharSequence> item : getComponents()) {
- components.add(item.first);
+ if (item.first != null) {
+ components.add(item.first);
+ }
}
Intent intent = new Intent();
@@ -1490,6 +1492,18 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
return null;
}
+ public ShortcutInfo getShortcutForPosition(int position) {
+ if (position < 0 || position >= mItemsInReadingOrder.size()) {
+ return null;
+ }
+ View v = mItemsInReadingOrder.get(position);
+ Object tag = v.getTag();
+ if (tag instanceof ShortcutInfo) {
+ return (ShortcutInfo) tag;
+ }
+ return null;
+ }
+
public void getLocationInDragLayer(int[] loc) {
mLauncher.getDragLayer().getLocationInDragLayer(this, loc);
}
diff --git a/src/com/android/launcher3/HiddenFolderFragment.java b/src/com/android/launcher3/HiddenFolderFragment.java
index 94e1d2d..279448c 100644
--- a/src/com/android/launcher3/HiddenFolderFragment.java
+++ b/src/com/android/launcher3/HiddenFolderFragment.java
@@ -20,7 +20,9 @@ import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import android.widget.ArrayAdapter;
import android.widget.EditText;
+import android.widget.FrameLayout;
import android.widget.ImageView;
+import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
@@ -115,6 +117,14 @@ public class HiddenFolderFragment extends Fragment {
mListView = (ListView) v.findViewById(R.id.hidden_apps_list);
mListView.setAdapter(mAppsAdapter);
+ // Apply insets
+ Launcher launcher = (Launcher) getActivity();
+ LinearLayout.LayoutParams llp =
+ (LinearLayout.LayoutParams) mListView.getLayoutParams();
+ llp.bottomMargin += ((FrameLayout.LayoutParams) launcher.getOverviewPanel()
+ .findViewById(R.id.settings_container).getLayoutParams()).bottomMargin;
+ mListView.setLayoutParams(llp);
+
return v;
}
@@ -128,16 +138,25 @@ public class HiddenFolderFragment extends Fragment {
private ArrayList<AppEntry> loadApps(List<Pair<ComponentName, CharSequence>> items) {
ArrayList<AppEntry> apps = new ArrayList<AppEntry>();
+ int pos = 0;
for (Pair<ComponentName, CharSequence> item : items) {
- apps.add(new AppEntry(item.first, item.second));
+ apps.add(new AppEntry(item.first, item.second, pos));
+ pos++;
}
return apps;
}
private void removeComponentFromFolder(AppEntry app) {
- mLauncher.mHiddenFolderIcon.getFolderInfo().remove(
- mLauncher.mHiddenFolderIcon.getFolder()
- .getShortcutForComponent(app.componentName));
+ ShortcutInfo info;
+ if (app.componentName != null) {
+ info = mLauncher.mHiddenFolderIcon.getFolder()
+ .getShortcutForComponent(app.componentName);
+ } else {
+ // Shortcut does not have componentName, use position since it maps to
+ // reading order position in the folder
+ info = mLauncher.mHiddenFolderIcon.getFolder().getShortcutForPosition(app.position);
+ }
+ mLauncher.mHiddenFolderIcon.getFolderInfo().remove(info);
mAppEntries.remove(app);
mAppsAdapter.remove(app);
@@ -227,7 +246,10 @@ public class HiddenFolderFragment extends Fragment {
viewHolder.title.setText(app.title);
- Drawable icon = mIcons.get(app.componentName.getPackageName());
+ Drawable icon = null;
+ if (app.componentName != null) {
+ icon = mIcons.get(app.componentName.getPackageName());
+ }
viewHolder.icon.setImageDrawable(icon != null ? icon : mDefaultImg);
viewHolder.remove.setOnClickListener(new OnClickListener() {
@Override
@@ -284,8 +306,9 @@ public class HiddenFolderFragment extends Fragment {
protected Void doInBackground(AppEntry... apps) {
for (AppEntry app : apps) {
try {
- if (mIcons.containsKey(app.componentName
- .getPackageName())) {
+ // Widget icons do not have a
+ if (app.componentName == null ||
+ mIcons.containsKey(app.componentName.getPackageName())) {
continue;
}
Drawable icon = mPackageManager
@@ -311,10 +334,12 @@ public class HiddenFolderFragment extends Fragment {
private final class AppEntry {
public final ComponentName componentName;
public final CharSequence title;
+ public final int position;
- public AppEntry(ComponentName component, CharSequence title) {
+ public AppEntry(ComponentName component, CharSequence title, int position) {
this.componentName = component;
this.title = title;
+ this.position = position;
}
}
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index b1bafb1..5d857ce 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -2781,6 +2781,14 @@ public class Launcher extends Activity
} else if (f2 != null) {
mDynamicGridSizeFragment.setSize();
} else {
+ // if a user backs up twice very quickly from the widget add screen to the
+ // homescreen, the UI can get into a messed up state and mStateAnimation never
+ // completes or gets cancelled. Cancelling mStateAnimation here fixes this bug
+ if (mStateAnimation != null && mStateAnimation.isRunning()) {
+ mStateAnimation.cancel();
+ mStateAnimation = null;
+ }
+
mWorkspace.exitOverviewMode(true);
}
} else if (mWorkspace.getOpenFolder() != null) {
diff --git a/src/com/android/launcher3/OverviewSettingsPanel.java b/src/com/android/launcher3/OverviewSettingsPanel.java
index acc700a..fef1643 100644
--- a/src/com/android/launcher3/OverviewSettingsPanel.java
+++ b/src/com/android/launcher3/OverviewSettingsPanel.java
@@ -209,8 +209,9 @@ public class OverviewSettingsPanel {
frameAnimation.start();
if (mLauncher.updateGridIfNeeded()) {
- if (mLauncher.getWorkspace().isInOverviewMode()) {
- mLauncher.getWorkspace().showOutlines();
+ Workspace workspace = mLauncher.getWorkspace();
+ if (workspace.isInOverviewMode()) {
+ workspace.setChildrenOutlineAlpha(1.0f);
mLauncher.mSearchDropTargetBar.hideSearchBar(false);
}
}
diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java
index fcd4b85..a594fd9 100644
--- a/src/com/android/launcher3/Utilities.java
+++ b/src/com/android/launcher3/Utilities.java
@@ -17,6 +17,7 @@
package com.android.launcher3;
import android.app.Activity;
+import android.app.SearchManager;
import android.content.ActivityNotFoundException;
import android.content.ComponentName;
import android.content.Context;
@@ -566,4 +567,12 @@ public final class Utilities {
float px = dp * (metrics.densityDpi / (float) DisplayMetrics.DENSITY_DEFAULT);
return px;
}
+
+ public static boolean searchActivityExists(Context context) {
+ SearchManager searchManager =
+ (SearchManager) context.getSystemService(Context.SEARCH_SERVICE);
+ ComponentName activityName = searchManager.getGlobalSearchActivity();
+
+ return activityName != null;
+ }
}
diff --git a/src/com/android/launcher3/WidgetPreviewLoader.java b/src/com/android/launcher3/WidgetPreviewLoader.java
index d496c1c..7fcb9f9 100644
--- a/src/com/android/launcher3/WidgetPreviewLoader.java
+++ b/src/com/android/launcher3/WidgetPreviewLoader.java
@@ -378,9 +378,13 @@ public class WidgetPreviewLoader {
// Delete everything
try {
db.delete(CacheDb.TABLE_NAME, null, null);
+ } catch (SQLiteReadOnlyDatabaseException e) {
+ // After a DB update subsequent calls to getWritableDatabase seems always result in
+ // a SQLiteReadOnlyDatabaseException. Protect this code path for the time being to
+ // prevent FC
+ return;
} catch (SQLiteDiskIOException e) {
} catch (SQLiteCantOpenDatabaseException e) {
- } catch (SQLiteReadOnlyDatabaseException e) {
dumpOpenFiles();
throw e;
}
diff --git a/src/com/android/launcher3/list/SettingsPinnedHeaderAdapter.java b/src/com/android/launcher3/list/SettingsPinnedHeaderAdapter.java
index 93b34b4..9882c76 100644
--- a/src/com/android/launcher3/list/SettingsPinnedHeaderAdapter.java
+++ b/src/com/android/launcher3/list/SettingsPinnedHeaderAdapter.java
@@ -16,12 +16,14 @@ import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.TextView;
+import android.widget.Toast;
import com.android.launcher3.AppDrawerListAdapter;
import com.android.launcher3.AppsCustomizePagedView;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Launcher;
import com.android.launcher3.OverviewSettingsPanel;
import com.android.launcher3.R;
+import com.android.launcher3.Utilities;
import com.android.launcher3.settings.SettingsProvider;
public class SettingsPinnedHeaderAdapter extends PinnedHeaderListAdapter {
@@ -285,9 +287,7 @@ public class SettingsPinnedHeaderAdapter extends PinnedHeaderListAdapter {
case OverviewSettingsPanel.HOME_SETTINGS_POSITION:
switch (position) {
case 0:
- onSettingsBooleanChanged(v,
- SettingsProvider.SETTINGS_UI_HOMESCREEN_SEARCH,
- R.bool.preferences_interface_homescreen_search_default);
+ updateSearchBarVisibility(v);
mLauncher.setUpdateDynamicGrid();
break;
case 1:
@@ -354,17 +354,31 @@ public class SettingsPinnedHeaderAdapter extends PinnedHeaderListAdapter {
}
};
+ private void updateSearchBarVisibility(View v) {
+ boolean isSearchEnabled = SettingsProvider.getBoolean(mContext,
+ SettingsProvider.SETTINGS_UI_HOMESCREEN_SEARCH,
+ R.bool.preferences_interface_homescreen_search_default);
+
+ if (!isSearchEnabled) {
+ if (!Utilities.searchActivityExists(mContext)) {
+ Toast.makeText(mContext, mContext.getString(R.string.search_activity_not_found),
+ Toast.LENGTH_SHORT).show();
+ return;
+ }
+ }
+
+ onSettingsBooleanChanged(v,
+ SettingsProvider.SETTINGS_UI_HOMESCREEN_SEARCH,
+ R.bool.preferences_interface_homescreen_search_default);
+ }
+
private void onSettingsBooleanChanged(View v, String key, int res) {
boolean current = SettingsProvider.getBoolean(
mContext, key, res);
// Set new state
- SharedPreferences sharedPref = SettingsProvider
- .get(mContext);
- sharedPref.edit().putBoolean(key, !current).commit();
- sharedPref.edit()
- .putBoolean(SettingsProvider.SETTINGS_CHANGED, true)
- .commit();
+ SettingsProvider.putBoolean(mContext, key, !current);
+ SettingsProvider.putBoolean(mContext, SettingsProvider.SETTINGS_CHANGED, true);
String state = current ? mLauncher.getResources().getString(
R.string.setting_state_off) : mLauncher.getResources().getString(
@@ -377,12 +391,8 @@ public class SettingsPinnedHeaderAdapter extends PinnedHeaderListAdapter {
mContext, key, res);
// Set new state
- SharedPreferences sharedPref = SettingsProvider
- .get(mContext);
- sharedPref.edit().putBoolean(key, !current).commit();
- sharedPref.edit()
- .putBoolean(SettingsProvider.SETTINGS_CHANGED, true)
- .commit();
+ SettingsProvider.putBoolean(mContext, key, !current);
+ SettingsProvider.putBoolean(mContext, SettingsProvider.SETTINGS_CHANGED, true);
String state = current ? mLauncher.getResources().getString(
R.string.icon_labels_show) : mLauncher.getResources().getString(
diff --git a/src/com/android/launcher3/settings/SettingsProvider.java b/src/com/android/launcher3/settings/SettingsProvider.java
index 4d09ed9..042053c 100644
--- a/src/com/android/launcher3/settings/SettingsProvider.java
+++ b/src/com/android/launcher3/settings/SettingsProvider.java
@@ -88,4 +88,8 @@ public final class SettingsProvider {
public static void putInt(Context context, String key, int value) {
get(context).edit().putInt(key, value).commit();
}
+
+ public static void putBoolean(Context context, String key, boolean value) {
+ get(context).edit().putBoolean(key, value).commit();
+ }
}