diff options
author | Brint E. Kriebel <bekit@cyngn.com> | 2014-05-08 18:22:00 -0700 |
---|---|---|
committer | Brint E. Kriebel <bekit@cyngn.com> | 2014-05-08 18:22:00 -0700 |
commit | 5bd2daf53614d9d47514be7c6ac702474a523cef (patch) | |
tree | c1ddaa7e2236cb364437e9a613eacfcc32dd58fd | |
parent | 9ade3e01a20d6ff8d67331eed37b5c1511f586c3 (diff) | |
parent | 98adac0552dd188c2241636a2ddb7d1538f26f81 (diff) | |
download | android_packages_apps_Trebuchet-5bd2daf53614d9d47514be7c6ac702474a523cef.tar.gz android_packages_apps_Trebuchet-5bd2daf53614d9d47514be7c6ac702474a523cef.tar.bz2 android_packages_apps_Trebuchet-5bd2daf53614d9d47514be7c6ac702474a523cef.zip |
Merge remote-tracking branch 'github/cm-11.0' into HEAD
54 files changed, 2340 insertions, 241 deletions
diff --git a/Android.mk b/Android.mk index 0fd1ff77f..f5bdaca84 100644 --- a/Android.mk +++ b/Android.mk @@ -32,7 +32,7 @@ LOCAL_SRC_FILES := $(call all-java-files-under, src) \ LOCAL_PROTOC_OPTIMIZE_TYPE := nano LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/protos/ -LOCAL_SDK_VERSION := 19 +#LOCAL_SDK_VERSION := 19 LOCAL_PACKAGE_NAME := Trebuchet LOCAL_PRIVILEGED_MODULE := true diff --git a/AndroidManifest.xml b/AndroidManifest.xml index f8ef64f31..95e6f7fb9 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -52,6 +52,7 @@ <uses-permission android:name="android.permission.CALL_PHONE" /> <uses-permission android:name="android.permission.SET_WALLPAPER" /> <uses-permission android:name="android.permission.SET_WALLPAPER_HINTS" /> + <uses-permission android:name="android.permission.SET_KEYGUARD_WALLPAPER" /> <uses-permission android:name="android.permission.VIBRATE" /> <uses-permission android:name="android.permission.BIND_APPWIDGET" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> @@ -117,6 +118,19 @@ </activity> <activity + android:name="com.android.launcher3.LockWallpaperPickerActivity" + android:theme="@style/Theme.WallpaperCropper" + android:label="@string/pick_wallpaper" + android:icon="@mipmap/ic_launcher_wallpaper" + android:finishOnCloseSystemDialogs="true" + android:process=":wallpaper_chooser"> + <intent-filter> + <action android:name="android.intent.action.SET_KEYGUARD_WALLPAPER" /> + <category android:name="android.intent.category.DEFAULT" /> + </intent-filter> + </activity> + + <activity android:name="com.android.launcher3.WallpaperPickerActivity" android:theme="@style/Theme.WallpaperCropper" android:label="@string/pick_wallpaper" diff --git a/res/drawable-hdpi/ic_clear.png b/res/drawable-hdpi/ic_clear.png Binary files differnew file mode 100644 index 000000000..67e0e6695 --- /dev/null +++ b/res/drawable-hdpi/ic_clear.png diff --git a/res/drawable-mdpi/ic_clear.png b/res/drawable-mdpi/ic_clear.png Binary files differnew file mode 100644 index 000000000..9d08a42b7 --- /dev/null +++ b/res/drawable-mdpi/ic_clear.png diff --git a/res/drawable-xhdpi/ic_clear.png b/res/drawable-xhdpi/ic_clear.png Binary files differnew file mode 100644 index 000000000..d5925c795 --- /dev/null +++ b/res/drawable-xhdpi/ic_clear.png diff --git a/res/drawable-xxhdpi/ic_clear.png b/res/drawable-xxhdpi/ic_clear.png Binary files differnew file mode 100644 index 000000000..1472e7cc7 --- /dev/null +++ b/res/drawable-xxhdpi/ic_clear.png diff --git a/res/layout/wallpaper_picker_clear.xml b/res/layout/wallpaper_picker_clear.xml new file mode 100644 index 000000000..727c3b422 --- /dev/null +++ b/res/layout/wallpaper_picker_clear.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- 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. +--> + +<com.android.launcher3.CheckableFrameLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="@dimen/wallpaperThumbnailWidth" + android:layout_height="@dimen/wallpaperThumbnailHeight" + android:focusable="true" + android:clickable="true" + android:background="@drawable/wallpaper_tile_fg" + android:foreground="@drawable/wallpaper_tile_fg"> + <ImageView + android:id="@+id/wallpaper_image" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@color/wallpaper_picker_translucent_gray" + android:scaleType="centerCrop" /> + <TextView + android:id="@+id/wallpaper_item_label" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:ellipsize="marquee" + android:gravity="center" + android:layout_gravity="center" + android:text="@string/clear_keyguard_wallpaper" + android:drawableTop="@drawable/ic_clear" + android:drawablePadding="4dp" + android:textColor="@android:color/white"/> +</com.android.launcher3.CheckableFrameLayout> diff --git a/res/values-af/cm_strings.xml b/res/values-af/cm_strings.xml index 866924345..cc273425a 100644 --- a/res/values-af/cm_strings.xml +++ b/res/values-af/cm_strings.xml @@ -32,7 +32,19 @@ <string name="preferences_interface_homescreen_title">Tuis skerm</string> <string name="preferences_interface_homescreen_search_title">Soekbalk</string> <string name="preferences_interface_homescreen_search_summary">Wys soekbalk altyd aan die bokant van die skerm</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_title">Steek ikoon etikette weg</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_summary">Steek ikoon etikette op Tuis Skerm weg</string> <string name="preferences_interface_drawer_title">Laai</string> + <string name="preferences_interface_drawer_summary">Program en legstuk laai</string> + <string name="preferences_interface_drawer_apps_category">Programme</string> + <string name="preferences_interface_drawer_hidden_apps_title">Versteekte programme</string> + <string name="preferences_interface_drawer_hidden_apps_summary">Steek programme van die laai weg</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_title">Verwyder kortpaaie</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_summary">Verwyder kortpaaie of versteekte programme van die tuis skerm</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_title">Verwyder legstukke</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_summary">Verwyder legstukke of versteekte programme van die tuis skerm</string> + <string name="preferences_interface_drawer_hide_icon_labels_title">Steek ikoon etikette weg</string> + <string name="preferences_interface_drawer_hide_icon_labels_summary">Steek ikoon etikette weg in die laai</string> <string name="preferences_interface_dock_title">Dok</string> <string name="preferences_interface_general_title">Algemeen</string> <string name="preferences_interface_general_icons_category">Ikone</string> @@ -46,4 +58,6 @@ <string name="no_iconpacks_summary">Geen ikoon stelle geïnstalleer</string> <string name="all_apps_cling_cm">Verpersoonlik jou laai</string> <string name="all_apps_cling_summary">Tik die bladsy aanwyser vir bykomende konfigurasie-instellings</string> + <string name="menu_hidden_apps_delete">Herstel</string> + <string name="hidden_apps_title">Versteekte programme</string> </resources> diff --git a/res/values-ar/cm_strings.xml b/res/values-ar/cm_strings.xml index c701b720c..d0161cdce 100644 --- a/res/values-ar/cm_strings.xml +++ b/res/values-ar/cm_strings.xml @@ -32,18 +32,33 @@ <string name="preferences_interface_homescreen_title">الشاشة الرئيسية</string> <string name="preferences_interface_homescreen_search_title">شريط البحث</string> <string name="preferences_interface_homescreen_search_summary">إستمرار إظهار شريط البحث في أعلى الشاشة</string> - <string name="preferences_interface_drawer_title">السحاب</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_title">إخفاء تسميات الرمز</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_summary">إخفاء تسميات الرموز على الشاشة الرئيسية</string> + <string name="preferences_interface_drawer_title">الفراغ</string> + <string name="preferences_interface_drawer_summary">فراغ التطبيقات والمصغرات</string> + <string name="preferences_interface_drawer_apps_category">تطبيقات</string> + <string name="preferences_interface_drawer_hidden_apps_title">تطبيقات المخفية</string> + <string name="preferences_interface_drawer_hidden_apps_summary">إخفاء تطبيقات من الفراغ</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_title">إزالة اختصارات</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_summary">إزالة الاختصارات للتطبيقات المخفية من الشاشة الرئيسية</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_title">إزالة المصغرات</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_summary">إزالة مصغرات التطبيقات المخفية من الشاشة الرئيسية</string> + <string name="preferences_interface_drawer_hide_icon_labels_title">إخفاء تسميات الرمز</string> + <string name="preferences_interface_drawer_hide_icon_labels_summary">إخفاء تسميات الرمز في الفراغ</string> <string name="preferences_interface_dock_title">حوض</string> <string name="preferences_interface_general_title">عام</string> <string name="preferences_interface_general_icons_category">أيقونات</string> <string name="preferences_interface_general_icons_large_title">أيقونات كبيرة</string> - <string name="preferences_interface_general_icons_large_summary">استخدام الرموز إضافية كبيرة لي التطبيق في الشاشة الرئيسية و السحاب</string> + <string name="preferences_interface_general_icons_large_summary">استخدام الرموز إضافية كبيرة لي التطبيق في الشاشة الرئيسية و الفراغ</string> <string name="preferences_interface_general_icons_text_style_title">نمط خط النص</string> <string name="preferences_interface_general_icons_text_style_summary">شكل ونمط الخط لاستخدامه لرمز النص</string> <string name="dialog_pick_iconpack_title">اختر حزمة الأيقونة</string> <string name="default_iconpack_title">الإيقونات الافتراضية</string> <string name="icon_packs_title">حزم الإيقونات</string> <string name="no_iconpacks_summary">لا توجد حزم أيقونات لتثبيت</string> - <string name="all_apps_cling_cm">تخصيص السحاب</string> + <string name="clear_keyguard_wallpaper">تصفية</string> + <string name="all_apps_cling_cm">تخصيص الفراغ</string> <string name="all_apps_cling_summary">انقر فوق مؤشر الصفحة لعرض إعدادات التكوين الإضافي</string> + <string name="menu_hidden_apps_delete">إعادة تعيين</string> + <string name="hidden_apps_title">تطبيقات المخفية</string> </resources> diff --git a/res/values-ca/cm_strings.xml b/res/values-ca/cm_strings.xml index 841074b66..ff387a6e1 100644 --- a/res/values-ca/cm_strings.xml +++ b/res/values-ca/cm_strings.xml @@ -32,18 +32,33 @@ <string name="preferences_interface_homescreen_title">Pantalla d\'inici</string> <string name="preferences_interface_homescreen_search_title">Barra de cerca</string> <string name="preferences_interface_homescreen_search_summary">Mostra sempre la barra de cerca a la part superior de la pantalla</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_title">Amaga les etiquetes de les icones</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_summary">Amaga les etiquetes de les icones de la pantalla d\'inici</string> <string name="preferences_interface_drawer_title">Calaix</string> + <string name="preferences_interface_drawer_summary">Calaix d\'apps i widgets</string> + <string name="preferences_interface_drawer_apps_category">Apps</string> + <string name="preferences_interface_drawer_hidden_apps_title">Apps amagades</string> + <string name="preferences_interface_drawer_hidden_apps_summary">Amaga les apps del calaix</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_title">Treu les dreceres</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_summary">Treu les dreceres de les apps amagades de la pantalla d\'inici</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_title">Treu els widgets</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_summary">Treu els widgets de les apps amagades de la pantalla d\'inici</string> + <string name="preferences_interface_drawer_hide_icon_labels_title">Amaga les etiquetes de les icones</string> + <string name="preferences_interface_drawer_hide_icon_labels_summary">Amaga les etiquetes de les icones al calaix</string> <string name="preferences_interface_dock_title">Barra d\'aplicacions</string> <string name="preferences_interface_general_title">General</string> <string name="preferences_interface_general_icons_category">Icones</string> <string name="preferences_interface_general_icons_large_title">Icones més grans</string> <string name="preferences_interface_general_icons_large_summary">Utilitza icones d\'aplicació extra grans a la pantalla d\'inici i al calaix</string> - <string name="preferences_interface_general_icons_text_style_title">Estil de tipus de lletra del text</string> + <string name="preferences_interface_general_icons_text_style_title">Estil del tipus de lletra del text</string> <string name="preferences_interface_general_icons_text_style_summary">Variant i estil del tipus de lletra pel text de les icones</string> <string name="dialog_pick_iconpack_title">Escull un paquet d\'icones</string> <string name="default_iconpack_title">Icones per defecte</string> <string name="icon_packs_title">Paquets d\'icones</string> <string name="no_iconpacks_summary">No hi ha paquets d\'icones instal·lats</string> + <string name="clear_keyguard_wallpaper">Neteja</string> <string name="all_apps_cling_cm">Personalitza el teu calaix</string> <string name="all_apps_cling_summary">Pica l\'indicador de pàgina per veure les opcions de configuració addicionals</string> + <string name="menu_hidden_apps_delete">Reinicia</string> + <string name="hidden_apps_title">Apps amagades</string> </resources> diff --git a/res/values-cs/cm_strings.xml b/res/values-cs/cm_strings.xml index a298ba60a..449e1db3a 100644 --- a/res/values-cs/cm_strings.xml +++ b/res/values-cs/cm_strings.xml @@ -32,7 +32,19 @@ <string name="preferences_interface_homescreen_title">Domovská plocha</string> <string name="preferences_interface_homescreen_search_title">Vyhledávací lišta</string> <string name="preferences_interface_homescreen_search_summary">Trvale zobrazit lištu vyhledávání vždy u horní hrany plochy</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_title">Skrýt popisky ikon</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_summary">Skrýt popisky ikon na domovské ploše</string> <string name="preferences_interface_drawer_title">Aplikační složka</string> + <string name="preferences_interface_drawer_summary">Složka aplikací a widgetů</string> + <string name="preferences_interface_drawer_apps_category">Aplikace</string> + <string name="preferences_interface_drawer_hidden_apps_title">Skryté aplikace</string> + <string name="preferences_interface_drawer_hidden_apps_summary">Skrýt aplikace ve složce</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_title">Odebrat zástupce</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_summary">Odebrat zástupce skrytých aplikací z domovské plochy</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_title">Odebrat widgety</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_summary">Odebrat widgety skrytých aplikací z domovské plochy</string> + <string name="preferences_interface_drawer_hide_icon_labels_title">Skrýt popisky ikon</string> + <string name="preferences_interface_drawer_hide_icon_labels_summary">Skrýt popisky ikon ve složce</string> <string name="preferences_interface_dock_title">Dok</string> <string name="preferences_interface_general_title">Obecné</string> <string name="preferences_interface_general_icons_category">Ikony</string> @@ -44,6 +56,9 @@ <string name="default_iconpack_title">Výchozí ikony</string> <string name="icon_packs_title">Balíčky ikon</string> <string name="no_iconpacks_summary">Není nainstalován žádný balíček ikon</string> + <string name="clear_keyguard_wallpaper">Odstranit</string> <string name="all_apps_cling_cm">Upravit vlastní složku</string> <string name="all_apps_cling_summary">Dotykem na indikátor stránky zobrazit další možnosti nastavení</string> + <string name="menu_hidden_apps_delete">Obnovit</string> + <string name="hidden_apps_title">Skryté aplikace</string> </resources> diff --git a/res/values-da/cm_strings.xml b/res/values-da/cm_strings.xml index 68200dd22..0149c9c91 100644 --- a/res/values-da/cm_strings.xml +++ b/res/values-da/cm_strings.xml @@ -32,7 +32,19 @@ <string name="preferences_interface_homescreen_title">Startskærm</string> <string name="preferences_interface_homescreen_search_title">Søgelinje</string> <string name="preferences_interface_homescreen_search_summary">Vis permanent søgelinje i toppen af skærmen</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_title">Skjul ikontekster</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_summary">Skjul ikontekster på startskærmen</string> <string name="preferences_interface_drawer_title">Oversigt</string> + <string name="preferences_interface_drawer_summary">Oversigt over apps og widgets</string> + <string name="preferences_interface_drawer_apps_category">Apps</string> + <string name="preferences_interface_drawer_hidden_apps_title">Skjulte apps</string> + <string name="preferences_interface_drawer_hidden_apps_summary">Skjul apps fra oversigten</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_title">Fjern genveje</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_summary">Fjern genveje til skjulte apps fra startskærmen</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_title">Fjern widgets</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_summary">Fjern widgets fra skjulte apps fra startskærmen</string> + <string name="preferences_interface_drawer_hide_icon_labels_title">Skjul ikontekster</string> + <string name="preferences_interface_drawer_hide_icon_labels_summary">Skjul ikontekster i oversigten</string> <string name="preferences_interface_dock_title">Docklinje</string> <string name="preferences_interface_general_title">Generelt</string> <string name="preferences_interface_general_icons_category">Ikoner</string> @@ -44,6 +56,9 @@ <string name="default_iconpack_title">Standardikoner</string> <string name="icon_packs_title">Ikonpakker</string> <string name="no_iconpacks_summary">Ingen ikonpakker installeret</string> + <string name="clear_keyguard_wallpaper">Ryd</string> <string name="all_apps_cling_cm">Tilpas din oversigt</string> <string name="all_apps_cling_summary">Tryk på sideindikatoren for at vise yderligere konfigurationsindstillinger</string> + <string name="menu_hidden_apps_delete">Nulstil</string> + <string name="hidden_apps_title">Skjulte apps</string> </resources> diff --git a/res/values-de/cm_strings.xml b/res/values-de/cm_strings.xml index 4e46c4081..8e784472e 100644 --- a/res/values-de/cm_strings.xml +++ b/res/values-de/cm_strings.xml @@ -32,7 +32,19 @@ <string name="preferences_interface_homescreen_title">Startbildschirm</string> <string name="preferences_interface_homescreen_search_title">Suchleiste</string> <string name="preferences_interface_homescreen_search_summary">Dauerhafte Anzeige der Suchleiste am oberen Bildschirmrand</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_title">Beschriftung nicht anzeigen</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_summary">Symbolbeschriftungen auf den Startseiten ausblenden</string> <string name="preferences_interface_drawer_title">App-Übersicht</string> + <string name="preferences_interface_drawer_summary">App- und Widget-Übersicht</string> + <string name="preferences_interface_drawer_apps_category">Apps</string> + <string name="preferences_interface_drawer_hidden_apps_title">Versteckte Apps</string> + <string name="preferences_interface_drawer_hidden_apps_summary">Apps in der App-Übersicht verstecken</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_title">Verknüpfungen entfernen</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_summary">Verknüpfungen für versteckte Apps vom Startbildschirm entfernen</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_title">Widgets entfernen</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_summary">Widgets von versteckten Apps vom Startbildschirm entfernen</string> + <string name="preferences_interface_drawer_hide_icon_labels_title">Beschriftung nicht anzeigen</string> + <string name="preferences_interface_drawer_hide_icon_labels_summary">Symbolbeschriftungen in der App-Übersicht ausblenden</string> <string name="preferences_interface_dock_title">Dock</string> <string name="preferences_interface_general_title">Allgemein</string> <string name="preferences_interface_general_icons_category">Symbole</string> @@ -44,6 +56,9 @@ <string name="default_iconpack_title">Standardsymbole</string> <string name="icon_packs_title">Symbolpakete</string> <string name="no_iconpacks_summary">Es sind keine Symbolpakete installiert</string> + <string name="clear_keyguard_wallpaper">Zurücksetzen</string> <string name="all_apps_cling_cm">App-Übersicht konfigurieren</string> <string name="all_apps_cling_summary">Berühren Sie den Seitenindikator, um die erweiterten Einstellungen zu öffnen.</string> + <string name="menu_hidden_apps_delete">Zurücksetzen</string> + <string name="hidden_apps_title">Versteckte Apps</string> </resources> diff --git a/res/values-el/cm_strings.xml b/res/values-el/cm_strings.xml index b39a8f3b5..df3a2a6bb 100644 --- a/res/values-el/cm_strings.xml +++ b/res/values-el/cm_strings.xml @@ -32,7 +32,19 @@ <string name="preferences_interface_homescreen_title">Αρχική οθόνη</string> <string name="preferences_interface_homescreen_search_title">Μπάρα αναζήτησης</string> <string name="preferences_interface_homescreen_search_summary">Εμφάνιση της μπάρας αναζήτησης στο πάνω μέρος της οθόνης</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_title">Απόκρυψη ετικετών εικονιδίων</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_summary">Απόκρυψη ετικετών εικονιδίων στην αρχική οθόνη</string> <string name="preferences_interface_drawer_title">Συρτάρι</string> + <string name="preferences_interface_drawer_summary">Συρτάρι εφαρμογών και widget</string> + <string name="preferences_interface_drawer_apps_category">Εφαρμογές</string> + <string name="preferences_interface_drawer_hidden_apps_title">Κρυμμένες εφαρμογές</string> + <string name="preferences_interface_drawer_hidden_apps_summary">Απόκρυψη εφαρμογών από το συρτάρι</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_title">Αφαίρεση συντομεύσεων</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_summary">Αφαίρεση συντομεύσεων των κρυμμένων εφαρμογών από την αρχική οθόνη</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_title">Αφαίρεση widget</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_summary">Αφαίρεση widget των κρυμμένων εφαρμογών από την αρχική οθόνη</string> + <string name="preferences_interface_drawer_hide_icon_labels_title">Απόκρυψη ετικετών εικονιδίων</string> + <string name="preferences_interface_drawer_hide_icon_labels_summary">Απόκρυψη ετικετών εικονιδίων στο συρτάρι</string> <string name="preferences_interface_dock_title">Μπάρα εφαρμογών</string> <string name="preferences_interface_general_title">Γενικά</string> <string name="preferences_interface_general_icons_category">Εικονίδια</string> @@ -44,6 +56,9 @@ <string name="default_iconpack_title">Προεπιλεγμένα εικονίδια</string> <string name="icon_packs_title">Πακέτα εικονιδίων</string> <string name="no_iconpacks_summary">Δεν υπάρχουν εγκατεστημένα πακέτα εικονιδίων</string> + <string name="clear_keyguard_wallpaper">Εκκαθάριση</string> <string name="all_apps_cling_cm">Προσαρμόστε το συρτάρι σας</string> <string name="all_apps_cling_summary">Αγγίξτε την ένδειξη σελίδας για προβολή πρόσθετων ρυθμίσεων</string> + <string name="menu_hidden_apps_delete">Επαναφορά</string> + <string name="hidden_apps_title">Κρυμμένες εφαρμογές</string> </resources> diff --git a/res/values-es-rXA/cm_strings.xml b/res/values-es-rXA/cm_strings.xml index 2f9778814..df3dedecb 100644 --- a/res/values-es-rXA/cm_strings.xml +++ b/res/values-es-rXA/cm_strings.xml @@ -32,7 +32,19 @@ <string name="preferences_interface_homescreen_title">Pantalla d\'aniciu</string> <string name="preferences_interface_homescreen_search_title">Barra de gueta</string> <string name="preferences_interface_homescreen_search_summary">Habilitar permantentemente la barra de gueta</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_title">Anubrir etiquetes de los iconos</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_summary">Anubrir les etiquetes de los iconos na pantalla d\'aniciu</string> <string name="preferences_interface_drawer_title">Aplicaciones</string> + <string name="preferences_interface_drawer_summary">Aplicaciones y widgets</string> + <string name="preferences_interface_drawer_apps_category">Aplicaciones</string> + <string name="preferences_interface_drawer_hidden_apps_title">Aplicaciones anubríes</string> + <string name="preferences_interface_drawer_hidden_apps_summary">Anubrir aplicaciones pa que nun s\'amuesen</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_title">Desaniciar atayos</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_summary">Desaniciar atayos d\'aplicaciones anubríes de la pantalla d\'aniciu</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_title">Desaniciar widgets</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_summary">Desaniciar widgets d\'aplicaciones anubríes de la pantalla d\'aniciu</string> + <string name="preferences_interface_drawer_hide_icon_labels_title">Anubrir etiquetes de los iconos</string> + <string name="preferences_interface_drawer_hide_icon_labels_summary">Anubrir les etiquetes de los iconos de la pantalla d\'aniciu</string> <string name="preferences_interface_dock_title">Barra d\'aplicaciones</string> <string name="preferences_interface_general_title">Xeneral</string> <string name="preferences_interface_general_icons_category">Iconos</string> @@ -44,6 +56,9 @@ <string name="default_iconpack_title">Iconos por defeutu</string> <string name="icon_packs_title">Paquetes d\'iconos</string> <string name="no_iconpacks_summary">Nun hai paquetes d\'iconos instalaos</string> + <string name="clear_keyguard_wallpaper">Llimpiar</string> <string name="all_apps_cling_cm">Personaliza les tos aplicaciones</string> <string name="all_apps_cling_summary">Primi l\'indicador de páxina p\'amosar axustes adicionales</string> + <string name="menu_hidden_apps_delete">Restablecer</string> + <string name="hidden_apps_title">Aplicaciones anubríes</string> </resources> diff --git a/res/values-es/cm_strings.xml b/res/values-es/cm_strings.xml index 733dee6b9..e0478d8ea 100644 --- a/res/values-es/cm_strings.xml +++ b/res/values-es/cm_strings.xml @@ -32,7 +32,19 @@ <string name="preferences_interface_homescreen_title">Pantalla de inicio</string> <string name="preferences_interface_homescreen_search_title">Barra de búsqueda</string> <string name="preferences_interface_homescreen_search_summary">Habilitar la barra de búsqueda permanentemente</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_title">Ocultar etiquetas</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_summary">Ocultar las etiquetas de los iconos en la pantalla de inicio</string> <string name="preferences_interface_drawer_title">Aplicaciones</string> + <string name="preferences_interface_drawer_summary">Aplicaciones y widgets</string> + <string name="preferences_interface_drawer_apps_category">Aplicaciones</string> + <string name="preferences_interface_drawer_hidden_apps_title">Ocultar aplicaciones</string> + <string name="preferences_interface_drawer_hidden_apps_summary">Ocultar aplicaciones para que no se muestren</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_title">Eliminar iconos</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_summary">Eliminar iconos de aplicaciones ocultas de la pantalla de inicio</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_title">Eliminar widgets</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_summary">Eliminar widgets de aplicaciones ocultas de la pantalla de inicio</string> + <string name="preferences_interface_drawer_hide_icon_labels_title">Ocultar etiquetas</string> + <string name="preferences_interface_drawer_hide_icon_labels_summary">Ocultar las etiquetas de los iconos de la pantalla de inicio</string> <string name="preferences_interface_dock_title">Barra de aplicaciones</string> <string name="preferences_interface_general_title">General</string> <string name="preferences_interface_general_icons_category">Iconos</string> @@ -44,6 +56,9 @@ <string name="default_iconpack_title">Iconos por defecto</string> <string name="icon_packs_title">Paquetes de iconos</string> <string name="no_iconpacks_summary">No hay paquetes de iconos instalados</string> + <string name="clear_keyguard_wallpaper">Limpiar</string> <string name="all_apps_cling_cm">Personalizar tus aplicaciones</string> <string name="all_apps_cling_summary">Tocar el indicador de página para mostrar ajustes adicionales</string> + <string name="menu_hidden_apps_delete">Restablecer</string> + <string name="hidden_apps_title">Ocultar aplicaciones</string> </resources> diff --git a/res/values-fi/cm_strings.xml b/res/values-fi/cm_strings.xml index 1453e70b2..679510ca5 100644 --- a/res/values-fi/cm_strings.xml +++ b/res/values-fi/cm_strings.xml @@ -32,7 +32,19 @@ <string name="preferences_interface_homescreen_title">Kotinäyttö</string> <string name="preferences_interface_homescreen_search_title">Hakupalkki</string> <string name="preferences_interface_homescreen_search_summary">Näytä pysyvä hakupalkki näytön yläreunassa</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_title">Piilota kuvakkeiden tekstit</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_summary">Piilota kuvakkeiden tekstit kotinäytöllä</string> <string name="preferences_interface_drawer_title">Sovellusvalikko</string> + <string name="preferences_interface_drawer_summary">Sovellus- ja widgetvalikko</string> + <string name="preferences_interface_drawer_apps_category">Sovellukset</string> + <string name="preferences_interface_drawer_hidden_apps_title">Piilotetut sovellukset</string> + <string name="preferences_interface_drawer_hidden_apps_summary">Piilota sovellukset valikosta</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_title">Poista kuvakkeet</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_summary">Poista piilotettujen sovellusten kuvakkeet kotinäytöltä</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_title">Poista widgetit</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_summary">Poista piilotettujen sovellusten widgetit kotinäytöltä</string> + <string name="preferences_interface_drawer_hide_icon_labels_title">Piilota kuvakkeiden tekstit</string> + <string name="preferences_interface_drawer_hide_icon_labels_summary">Piilota kuvakkeiden tekstit valikossa</string> <string name="preferences_interface_dock_title">Alapalkki</string> <string name="preferences_interface_general_title">Yleiset</string> <string name="preferences_interface_general_icons_category">Kuvakkeet</string> @@ -44,6 +56,9 @@ <string name="default_iconpack_title">Oletuskuvakkeet</string> <string name="icon_packs_title">Kuvakepaketit</string> <string name="no_iconpacks_summary">Kuvakepaketteja ei asennettu</string> + <string name="clear_keyguard_wallpaper">Tyhjennä</string> <string name="all_apps_cling_cm">Muokkaa sovellusvalikkoa</string> <string name="all_apps_cling_summary">Napauta sivun ilmaisinta nähdäksesi lisää asetuksia</string> + <string name="menu_hidden_apps_delete">Nollaa</string> + <string name="hidden_apps_title">Piilotetut sovellukset</string> </resources> diff --git a/res/values-fr/cm_strings.xml b/res/values-fr/cm_strings.xml index ea5d6de13..1ba03261b 100644 --- a/res/values-fr/cm_strings.xml +++ b/res/values-fr/cm_strings.xml @@ -32,7 +32,19 @@ <string name="preferences_interface_homescreen_title">Écran d\'accueil</string> <string name="preferences_interface_homescreen_search_title">Barre de recherche</string> <string name="preferences_interface_homescreen_search_summary">Afficher la barre de recherche persistante en haut de l\'écran</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_title">Masquer le nom des icônes</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_summary">Masquer le nom des icônes sur l\'écran d\'accueil</string> <string name="preferences_interface_drawer_title">Liste d\'applications</string> + <string name="preferences_interface_drawer_summary">Applications et widgets de la liste des applications</string> + <string name="preferences_interface_drawer_apps_category">Applications</string> + <string name="preferences_interface_drawer_hidden_apps_title">Applications masquées</string> + <string name="preferences_interface_drawer_hidden_apps_summary">Masquer les applications de la liste des applications</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_title">Supprimer les raccourcis</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_summary">Supprimer les raccourcis sur l\'écran d\'accueil des applications masquées</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_title">Supprimer les widgets</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_summary">Supprimer les widgets sur l\'écran d\'accueil des applications masquées</string> + <string name="preferences_interface_drawer_hide_icon_labels_title">Masquer le nom des icônes</string> + <string name="preferences_interface_drawer_hide_icon_labels_summary">Masquer le nom des icônes dans la liste des applications</string> <string name="preferences_interface_dock_title">Dock</string> <string name="preferences_interface_general_title">Général</string> <string name="preferences_interface_general_icons_category">Icônes</string> @@ -44,6 +56,9 @@ <string name="default_iconpack_title">Icônes par défaut</string> <string name="icon_packs_title">Packs d\'icônes</string> <string name="no_iconpacks_summary">Aucun pack d\'icônes installé</string> + <string name="clear_keyguard_wallpaper">Supprimer</string> <string name="all_apps_cling_cm">Personnaliser votre affichage</string> <string name="all_apps_cling_summary">Appuyez sur l\'indicateur de page pour afficher les paramètres de configuration supplémentaires</string> + <string name="menu_hidden_apps_delete">Réinitialiser</string> + <string name="hidden_apps_title">Applications masquées</string> </resources> diff --git a/res/values-hu/cm_strings.xml b/res/values-hu/cm_strings.xml index ff2bad920..434fd319e 100644 --- a/res/values-hu/cm_strings.xml +++ b/res/values-hu/cm_strings.xml @@ -32,7 +32,19 @@ <string name="preferences_interface_homescreen_title">Kezdőképernyő</string> <string name="preferences_interface_homescreen_search_title">Keresési sáv</string> <string name="preferences_interface_homescreen_search_summary">Állandó keresési sáv megjelenítése a képernyő felső </string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_title">Ikon feliratok elrejtése</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_summary">Elrejti a kezdőképernyőn lévő ikonok neveit</string> <string name="preferences_interface_drawer_title">Alkalmazásképernyők</string> + <string name="preferences_interface_drawer_summary">Alkalmazások és modulok</string> + <string name="preferences_interface_drawer_apps_category">Alkalmazások</string> + <string name="preferences_interface_drawer_hidden_apps_title">Rejtett alkalmazások</string> + <string name="preferences_interface_drawer_hidden_apps_summary">Alkalmazások elrejtése az alkalmazásképernyőről</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_title">Rejtett alkalmazások (parancsikonok)</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_summary">Rejtett alkalmazások ikonjainak eltávolítása</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_title">Rejtett alkalmazások (modulok)</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_summary">Rejtett alkalmazás moduljának eltávolítása</string> + <string name="preferences_interface_drawer_hide_icon_labels_title">Ikon feliratok elrejtése</string> + <string name="preferences_interface_drawer_hide_icon_labels_summary">Ikon feliratok elrejtése az alkalmazásképernyőkről</string> <string name="preferences_interface_dock_title">Dokkoló</string> <string name="preferences_interface_general_title">Általános</string> <string name="preferences_interface_general_icons_category">Ikonok</string> @@ -44,6 +56,9 @@ <string name="default_iconpack_title">Alapértelmezett ikonok</string> <string name="icon_packs_title">Ikon csomagok</string> <string name="no_iconpacks_summary">Nincsenek telepítve ikoncsomagok</string> + <string name="clear_keyguard_wallpaper">Törlés</string> <string name="all_apps_cling_cm">Alkalmazásképernyők testreszabása</string> <string name="all_apps_cling_summary">Érintse meg az oldaljelölőt a további konfigurációs beállítások megtekintéséhez</string> + <string name="menu_hidden_apps_delete">Visszaállítás</string> + <string name="hidden_apps_title">Rejtett alkalmazások</string> </resources> diff --git a/res/values-it/cm_strings.xml b/res/values-it/cm_strings.xml index 5e388d740..c3c0743e1 100644 --- a/res/values-it/cm_strings.xml +++ b/res/values-it/cm_strings.xml @@ -32,7 +32,19 @@ <string name="preferences_interface_homescreen_title">Schermata Home</string> <string name="preferences_interface_homescreen_search_title">Barra di ricerca</string> <string name="preferences_interface_homescreen_search_summary">Mostra la barra di ricerca persistente nella parte superiore dello schermo</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_title">Nascondi etichette icone</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_summary">Nascondi le etichette delle icone sulla schermata Home</string> <string name="preferences_interface_drawer_title">Drawer</string> + <string name="preferences_interface_drawer_summary">Drawer app e widget</string> + <string name="preferences_interface_drawer_apps_category">App</string> + <string name="preferences_interface_drawer_hidden_apps_title">App nascoste</string> + <string name="preferences_interface_drawer_hidden_apps_summary">Nascondi le app dal drawer</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_title">Rimuovi scorciatoie</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_summary">Rimuovi le scorciatoie delle app nascoste dalla schermata Home</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_title">Rimuovi widget</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_summary">Rimuovi i widget delle app nascoste dalla schermata Home</string> + <string name="preferences_interface_drawer_hide_icon_labels_title">Nascondi etichette icone</string> + <string name="preferences_interface_drawer_hide_icon_labels_summary">Nascondi le etichette delle icone nel drawer</string> <string name="preferences_interface_dock_title">Dock</string> <string name="preferences_interface_general_title">Generale</string> <string name="preferences_interface_general_icons_category">Icone</string> @@ -44,6 +56,9 @@ <string name="default_iconpack_title">Icone predefinite</string> <string name="icon_packs_title">Pacchetti icone</string> <string name="no_iconpacks_summary">Nessun pacchetto di icone installato</string> + <string name="clear_keyguard_wallpaper">Svuota</string> <string name="all_apps_cling_cm">Personalizza il drawer</string> <string name="all_apps_cling_summary">Tocca l\'indicatore della pagina per visualizzare le impostazioni di configurazione aggiuntive</string> + <string name="menu_hidden_apps_delete">Ripristina</string> + <string name="hidden_apps_title">App nascoste</string> </resources> diff --git a/res/values-iw/cm_strings.xml b/res/values-iw/cm_strings.xml index 32e38a205..b8391073d 100644 --- a/res/values-iw/cm_strings.xml +++ b/res/values-iw/cm_strings.xml @@ -25,13 +25,26 @@ <string name="sort_mode_launch_count">מספר הפעלות</string> <string name="sort_mode_install_time">זמן התקנה</string> <string name="scrolling_page_outlines">תיאור דף</string> + <string name="scrolling_fade_adjacent">עימום דפים צדדיים</string> <string name="wallpaper_scroll">גלילת טפט</string> <string name="preferences_title">העדפות</string> <string name="preferences_application_title">יישום</string> <string name="preferences_interface_homescreen_title">מסך הבית</string> <string name="preferences_interface_homescreen_search_title">סרגל החיפוש</string> <string name="preferences_interface_homescreen_search_summary">הצג את שורת החיפוש תמיד בחלק העליון של המסך</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_title">הסתר תוויות הסמלים</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_summary">הסתר תוויות הסמלים על מסך הבית</string> <string name="preferences_interface_drawer_title">מגירה</string> + <string name="preferences_interface_drawer_summary">מגירת הווידג\'טים והיישומים</string> + <string name="preferences_interface_drawer_apps_category">יישומים</string> + <string name="preferences_interface_drawer_hidden_apps_title">יישומים מוסתרים</string> + <string name="preferences_interface_drawer_hidden_apps_summary">הסתר יישומים מהמגירה</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_title">הסר קיצורי דרך</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_summary">הסר את קיצורי הדרך של היישומים המוסתרים ממסך הבית</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_title">הסר ווידג\'טים</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_summary">הסר את הווידג\'טים של היישומים המוסתרים ממסך הבית</string> + <string name="preferences_interface_drawer_hide_icon_labels_title">הסתר תוויות הסמלים</string> + <string name="preferences_interface_drawer_hide_icon_labels_summary">הסתר תוויות הסמלים במגירה</string> <string name="preferences_interface_dock_title">עגינה</string> <string name="preferences_interface_general_title">כללי</string> <string name="preferences_interface_general_icons_category">סמלים</string> @@ -43,4 +56,8 @@ <string name="default_iconpack_title">סמלי ברירת מחדל</string> <string name="icon_packs_title">אוסף סמלים</string> <string name="no_iconpacks_summary">לא מותקנות ערכות סמל</string> + <string name="all_apps_cling_cm">התאמה אישית של מגירת היישומים</string> + <string name="all_apps_cling_summary">הקש על מחוון הדף כדי להציג הגדרות נוספות</string> + <string name="menu_hidden_apps_delete">אפס</string> + <string name="hidden_apps_title">יישומים מוסתרים</string> </resources> diff --git a/res/values-ja/cm_strings.xml b/res/values-ja/cm_strings.xml index c32c7969c..eb6f43f67 100644 --- a/res/values-ja/cm_strings.xml +++ b/res/values-ja/cm_strings.xml @@ -32,7 +32,19 @@ <string name="preferences_interface_homescreen_title">ホーム画面</string> <string name="preferences_interface_homescreen_search_title">検索バー</string> <string name="preferences_interface_homescreen_search_summary">画面の上部に検索バーを常に表示する</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_title">アイコンラベルを非表示にする</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_summary">ホーム画面でアイコンラベルを非表示にする</string> <string name="preferences_interface_drawer_title">ドロワー</string> + <string name="preferences_interface_drawer_summary">アプリとウィジェットのドロワー</string> + <string name="preferences_interface_drawer_apps_category">アプリ</string> + <string name="preferences_interface_drawer_hidden_apps_title">非表示にするアプリ</string> + <string name="preferences_interface_drawer_hidden_apps_summary">ドロワーからアプリを非表示にする</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_title">ショートカットを削除</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_summary">ホーム画面から非表示にしたアプリのショートカットを削除する</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_title">ウィジェットを削除</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_summary">ホーム画面から非表示にしたアプリのウィジェットを削除する</string> + <string name="preferences_interface_drawer_hide_icon_labels_title">アイコンラベルを非表示にする</string> + <string name="preferences_interface_drawer_hide_icon_labels_summary">ドロワーでアイコンラベルを非表示にする</string> <string name="preferences_interface_dock_title">ドック</string> <string name="preferences_interface_general_title">全般</string> <string name="preferences_interface_general_icons_category">アイコン</string> @@ -46,4 +58,6 @@ <string name="no_iconpacks_summary">アイコンパックがインストールされていません</string> <string name="all_apps_cling_cm">ドロワーをカスタマイズ</string> <string name="all_apps_cling_summary">追加の構成設定を表示するには、ページインジケータをタップします。</string> + <string name="menu_hidden_apps_delete">リセット</string> + <string name="hidden_apps_title">非表示にするアプリ</string> </resources> diff --git a/res/values-lb/cm_arrays.xml b/res/values-lb/cm_arrays.xml new file mode 100644 index 000000000..6074c5ac9 --- /dev/null +++ b/res/values-lb/cm_arrays.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- + 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="preferences_interface_general_icons_text_font_family_entries"> + <item>Normal</item> + <item>Dënn</item> + <item>Schmuel</item> + </string-array> + <string-array name="transition_effect_entries"> + <item>Keen</item> + <item>Erazoomen</item> + <item>Erauszoomen</item> + <item>Eroprotéieren</item> + <item>Erofrotéieren</item> + <item>Wierfel bannen</item> + <item>Wierfel baussen</item> + <item>Koup</item> + <item>Akkordeon</item> + <item>Ëmdréinen</item> + <item>Zylinder bannen</item> + <item>Zylinder baussen</item> + <item>Karussell</item> + <item>Iwwersiicht</item> + </string-array> +</resources> diff --git a/res/values-lb/cm_strings.xml b/res/values-lb/cm_strings.xml new file mode 100644 index 000000000..19a760f55 --- /dev/null +++ b/res/values-lb/cm_strings.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- + 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 name="application_copyright">Copyright \u00A9 2014 The CyanogenMod Project</string> + <string name="sort_button_text">Zortéieren</string> + <string name="filter_button_text">Filteren</string> + <string name="default_screen_button_text">Standardsäit</string> + <string name="transition_effect_button_text">Scrolleffekt</string> + <string name="sort_mode_title">Titel</string> + <string name="sort_mode_launch_count">Startunzuel</string> + <string name="sort_mode_install_time">Installatiounszäit</string> + <string name="scrolling_page_outlines">Säiterummen</string> + <string name="scrolling_fade_adjacent">Säiten um Rand ausblenden</string> + <string name="wallpaper_scroll">Hannergrondbild scrollen</string> + <string name="preferences_title">Astellungen</string> + <string name="preferences_application_title">App</string> + <string name="preferences_interface_homescreen_title">Startschierm</string> + <string name="preferences_interface_homescreen_search_title">Sichkëscht</string> + <string name="preferences_interface_homescreen_search_summary">D\'Sichfeld um ieweschte Bord vum Schierm ëmmer uweisen</string> + <string name="preferences_interface_drawer_title">App-Iwwersiicht</string> + <string name="preferences_interface_drawer_apps_category">Apps</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_title">Ofkierzungen ewechhuelen</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_title">Widgets ewechhuelen</string> + <string name="preferences_interface_dock_title">Dock</string> + <string name="preferences_interface_general_title">Allgemeng</string> + <string name="preferences_interface_general_icons_category">Symboler</string> + <string name="preferences_interface_general_icons_large_title">Grouss Symboler</string> + <string name="preferences_interface_general_icons_large_summary">Grouss Symboler fir d\'Apps um Startschierm a bei der App-Iwwersiicht benotzen</string> + <string name="preferences_interface_general_icons_text_style_title">Schrëftstil</string> + <string name="preferences_interface_general_icons_text_style_summary">Schrëftaart a -stil vum Text ënner de Symboler</string> + <string name="dialog_pick_iconpack_title">Symbolpak auswielen</string> + <string name="default_iconpack_title">Standardsymboler</string> + <string name="icon_packs_title">Symbolpäck</string> + <string name="no_iconpacks_summary">Keng Symbolpäck installéiert</string> + <string name="all_apps_cling_cm">App-Iwwersiicht konfiguréieren</string> + <string name="all_apps_cling_summary">Dréck de Säitenindikator fir zousätzlech Astellungen ze gesinn</string> + <string name="menu_hidden_apps_delete">Zrécksetzen</string> +</resources> diff --git a/res/values-lt/cm_strings.xml b/res/values-lt/cm_strings.xml index 9f046b2e1..e4ffbbf75 100644 --- a/res/values-lt/cm_strings.xml +++ b/res/values-lt/cm_strings.xml @@ -32,7 +32,19 @@ <string name="preferences_interface_homescreen_title">Pagrindinis ekranas</string> <string name="preferences_interface_homescreen_search_title">Paieškos juosta</string> <string name="preferences_interface_homescreen_search_summary">Rodyti nuolatinę paieškos juostą ekrano viršuje</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_title">Paslėpti piktogramų pavadinimus</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_summary">Paslėpti piktogramų pavadinimus pagrindiniame ekrane</string> <string name="preferences_interface_drawer_title">Stalčius</string> + <string name="preferences_interface_drawer_summary">Programų ir valdiklių stalčius</string> + <string name="preferences_interface_drawer_apps_category">Programos</string> + <string name="preferences_interface_drawer_hidden_apps_title">Paslėptos programos</string> + <string name="preferences_interface_drawer_hidden_apps_summary">Paslėpti programas iš stalčiaus</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_title">Pašalinti nuorodas</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_summary">Pašalinti paslėptų programų nuorodas iš pagrindinio ekrano</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_title">Pašalinti valdiklius</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_summary">Pašalinti paslėptų programų valdiklius iš pagrindinio ekrano</string> + <string name="preferences_interface_drawer_hide_icon_labels_title">Paslėpti piktogramų pavadinimus</string> + <string name="preferences_interface_drawer_hide_icon_labels_summary">Paslėpti piktogramų pavadinimus iš stalčiaus</string> <string name="preferences_interface_dock_title">Dokas</string> <string name="preferences_interface_general_title">Bendra</string> <string name="preferences_interface_general_icons_category">Piktogramos</string> @@ -44,6 +56,9 @@ <string name="default_iconpack_title">Numatytosios piktogramos</string> <string name="icon_packs_title">Piktogramų paketai</string> <string name="no_iconpacks_summary">Piktogramų paketai neįdiegti</string> + <string name="clear_keyguard_wallpaper">Išvalyti</string> <string name="all_apps_cling_cm">Tinkinti savo stalčių</string> <string name="all_apps_cling_summary">Bakstelėkite puslapio indikatorių norėdami peržiūrėti papildomus konfigūracijos nustatymus</string> + <string name="menu_hidden_apps_delete">Atkurti</string> + <string name="hidden_apps_title">Paslėptos programos</string> </resources> diff --git a/res/values-nl/cm_strings.xml b/res/values-nl/cm_strings.xml index 30ee40934..bf5021141 100644 --- a/res/values-nl/cm_strings.xml +++ b/res/values-nl/cm_strings.xml @@ -20,7 +20,7 @@ <string name="sort_button_text">Sorteren</string> <string name="filter_button_text">Filteren</string> <string name="default_screen_button_text">Standaard\nscherm</string> - <string name="transition_effect_button_text">Overgangseffect</string> + <string name="transition_effect_button_text">Overgangs\neffect</string> <string name="sort_mode_title">Titel</string> <string name="sort_mode_launch_count">Aantal starts</string> <string name="sort_mode_install_time">Tijd van installatie</string> @@ -32,7 +32,19 @@ <string name="preferences_interface_homescreen_title">Startscherm</string> <string name="preferences_interface_homescreen_search_title">Zoekbalk</string> <string name="preferences_interface_homescreen_search_summary">Zoekbalk permanent tonen bovenaan het scherm</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_title">Labels verbergen</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_summary">Labels verbergen onder pictogrammen op het startscherm</string> <string name="preferences_interface_drawer_title">Overzicht</string> + <string name="preferences_interface_drawer_summary">App- en widgetoverzicht</string> + <string name="preferences_interface_drawer_apps_category">Apps</string> + <string name="preferences_interface_drawer_hidden_apps_title">Verborgen apps</string> + <string name="preferences_interface_drawer_hidden_apps_summary">Apps verbergen in het app-overzicht</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_title">Snelkoppelingen verbergen</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_summary">Snelkoppelingen van verborgen apps niet weergeven op startscherm</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_title">Widgets verbergen</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_summary">Widgets van verborgen apps niet weergeven op startscherm</string> + <string name="preferences_interface_drawer_hide_icon_labels_title">Labels verbergen</string> + <string name="preferences_interface_drawer_hide_icon_labels_summary">Labels verbergen onder pictogrammen in het appoverzicht</string> <string name="preferences_interface_dock_title">Dock</string> <string name="preferences_interface_general_title">Algemeen</string> <string name="preferences_interface_general_icons_category">Pictogrammen</string> @@ -44,6 +56,9 @@ <string name="default_iconpack_title">Standaard</string> <string name="icon_packs_title">Pictogram\npakket</string> <string name="no_iconpacks_summary">Geen pictogrampakketten geïnstalleerd</string> + <string name="clear_keyguard_wallpaper">Verwijderen</string> <string name="all_apps_cling_cm">App-overzicht aanpassen</string> <string name="all_apps_cling_summary">Tik op de pagina-indicator voor extra instellingen</string> + <string name="menu_hidden_apps_delete">Opnieuw instellen</string> + <string name="hidden_apps_title">Verborgen apps</string> </resources> diff --git a/res/values-pt-rBR/cm_strings.xml b/res/values-pt-rBR/cm_strings.xml index 573021061..01381a48e 100644 --- a/res/values-pt-rBR/cm_strings.xml +++ b/res/values-pt-rBR/cm_strings.xml @@ -32,7 +32,19 @@ <string name="preferences_interface_homescreen_title">Tela Inicial</string> <string name="preferences_interface_homescreen_search_title">Barra de pesquisa</string> <string name="preferences_interface_homescreen_search_summary">Exibir barra de pesquisa persistente no topo da tela</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_title">Ocultar as legendas dos ícones</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_summary">Oculta as legendas dos ícones na tela inicial</string> <string name="preferences_interface_drawer_title">Gaveta de apps</string> + <string name="preferences_interface_drawer_summary">Gaveta de aplicativos e widgets</string> + <string name="preferences_interface_drawer_apps_category">Aplicativos</string> + <string name="preferences_interface_drawer_hidden_apps_title">Aplicativos ocultos</string> + <string name="preferences_interface_drawer_hidden_apps_summary">Ocultar aplicativos da gaveta</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_title">Remover atalhos</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_summary">Remover os atalhos de aplicativos ocultos da tela inicial</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_title">Remover widgets</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_summary">Remover os widgets dos aplicativos ocultos da tela inicial</string> + <string name="preferences_interface_drawer_hide_icon_labels_title">Ocultar as legendas dos ícones</string> + <string name="preferences_interface_drawer_hide_icon_labels_summary">Ocultar as legendas dos ícones na gaveta</string> <string name="preferences_interface_dock_title">Dock</string> <string name="preferences_interface_general_title">Geral</string> <string name="preferences_interface_general_icons_category">Ícones</string> @@ -44,6 +56,9 @@ <string name="default_iconpack_title">Ícones padrão</string> <string name="icon_packs_title">Pacote de ícones</string> <string name="no_iconpacks_summary">Nenhum pacote de ícones instalado</string> + <string name="clear_keyguard_wallpaper">Limpar</string> <string name="all_apps_cling_cm">Personalizar sua gaveta de aplicativos</string> <string name="all_apps_cling_summary">Toque o indicador desta página para visualizar configurações adicionais</string> + <string name="menu_hidden_apps_delete">Redefinir</string> + <string name="hidden_apps_title">Aplicativos ocultos</string> </resources> diff --git a/res/values-pt-rPT/cm_strings.xml b/res/values-pt-rPT/cm_strings.xml index 980ee22c6..127a341d6 100644 --- a/res/values-pt-rPT/cm_strings.xml +++ b/res/values-pt-rPT/cm_strings.xml @@ -32,7 +32,19 @@ <string name="preferences_interface_homescreen_title">Ecrã inicial</string> <string name="preferences_interface_homescreen_search_title">Barra de pesquisa</string> <string name="preferences_interface_homescreen_search_summary">Mostrar barra de pesquisa persistente no topo do ecrã</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_title">Ocultar as legendas dos ícones</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_summary">Oculta as legendas dos ícones no ambiente de trabalho</string> <string name="preferences_interface_drawer_title">Gaveta de aplicações</string> + <string name="preferences_interface_drawer_summary">Gaveta de aplicações e widgets</string> + <string name="preferences_interface_drawer_apps_category">Aplicações</string> + <string name="preferences_interface_drawer_hidden_apps_title">Aplicações ocultas</string> + <string name="preferences_interface_drawer_hidden_apps_summary">Ocultar aplicações da gaveta</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_title">Remover atalhos</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_summary">Remover os atalhos de aplicações ocultas do ambiente de trabalho</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_title">Remover widgets</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_summary">Remover os widgets das aplicações ocultas do ambiente de trabalho</string> + <string name="preferences_interface_drawer_hide_icon_labels_title">Ocultar as legendas dos ícones</string> + <string name="preferences_interface_drawer_hide_icon_labels_summary">Ocultar as legendas dos ícones na gaveta de aplicações</string> <string name="preferences_interface_dock_title">Dock</string> <string name="preferences_interface_general_title">Geral</string> <string name="preferences_interface_general_icons_category">Ícones</string> @@ -44,6 +56,9 @@ <string name="default_iconpack_title">Ícones padrão</string> <string name="icon_packs_title">Pacotes de Ícones</string> <string name="no_iconpacks_summary">Nenhum pacote de ícones instalado</string> + <string name="clear_keyguard_wallpaper">Limpar</string> <string name="all_apps_cling_cm">Personalize a sua gaveta de aplicações</string> <string name="all_apps_cling_summary">Toque no indicador de página para ver definições adicionais</string> + <string name="menu_hidden_apps_delete">Restaurar</string> + <string name="hidden_apps_title">Aplicações ocultas</string> </resources> diff --git a/res/values-ru/cm_strings.xml b/res/values-ru/cm_strings.xml index d3009928c..af3f3baa0 100644 --- a/res/values-ru/cm_strings.xml +++ b/res/values-ru/cm_strings.xml @@ -32,7 +32,19 @@ <string name="preferences_interface_homescreen_title">Домашний экран</string> <string name="preferences_interface_homescreen_search_title">Строка поиска</string> <string name="preferences_interface_homescreen_search_summary">Показывать постоянную строку поиска вверху экрана</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_title">Скрывать подписи значков</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_summary">Не отображать текст у ярлыков на домашнем экране</string> <string name="preferences_interface_drawer_title">Меню приложений</string> + <string name="preferences_interface_drawer_summary">Список приложений и виджетов</string> + <string name="preferences_interface_drawer_apps_category">Приложения</string> + <string name="preferences_interface_drawer_hidden_apps_title">Скрытые приложения</string> + <string name="preferences_interface_drawer_hidden_apps_summary">Выбрать приложения, которые не будут отображаться в меню</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_title">Удалять ярлыки</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_summary">Убирать ярлыки скрытых приложений с домашнего экрана</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_title">Удалять виджеты</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_summary">Убирать виджеты скрытых приложений с домашнего экрана</string> + <string name="preferences_interface_drawer_hide_icon_labels_title">Скрывать подписи значков</string> + <string name="preferences_interface_drawer_hide_icon_labels_summary">Не отображать текст у ярлыков в меню приложений</string> <string name="preferences_interface_dock_title">Нижняя панель</string> <string name="preferences_interface_general_title">Общие</string> <string name="preferences_interface_general_icons_category">Значки</string> @@ -44,6 +56,9 @@ <string name="default_iconpack_title">Значки по умолчанию</string> <string name="icon_packs_title">Наборы значков</string> <string name="no_iconpacks_summary">Наборы значков не установлены</string> + <string name="clear_keyguard_wallpaper">Очистить</string> <string name="all_apps_cling_cm">Настройте меню приложений по своему вкусу</string> <string name="all_apps_cling_summary">Коснитесь индикатора страницы внизу для перехода к настройкам.</string> + <string name="menu_hidden_apps_delete">Сброс</string> + <string name="hidden_apps_title">Скрытые приложения</string> </resources> diff --git a/res/values-sk/cm_strings.xml b/res/values-sk/cm_strings.xml index c26ef915c..6a78d0a7d 100644 --- a/res/values-sk/cm_strings.xml +++ b/res/values-sk/cm_strings.xml @@ -32,7 +32,19 @@ <string name="preferences_interface_homescreen_title">Domovská obrazovka</string> <string name="preferences_interface_homescreen_search_title">Vyhľadávací panel</string> <string name="preferences_interface_homescreen_search_summary">Zobraziť pretrvávajúci vyhľadávací panel v hornej časti obrazovky</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_title">Skryť menovky ikon</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_summary">Skryť menovky ikon z domovskej obrazovky</string> <string name="preferences_interface_drawer_title">Ponuka aplikácií</string> + <string name="preferences_interface_drawer_summary">Aplikácie a miniaplikácie ponuky</string> + <string name="preferences_interface_drawer_apps_category">Aplikácie</string> + <string name="preferences_interface_drawer_hidden_apps_title">Skryté aplikácie</string> + <string name="preferences_interface_drawer_hidden_apps_summary">Skryť aplikácie zo zoznamu aplikácií</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_title">Vymazať odkazy</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_summary">Vymazať odkazy skrytých aplikácií z domovskej obrazovky</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_title">Vymazať miniaplikácie</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_summary">Vymazať miniaplikácie skrytých aplikácií z domovskej obrazovky</string> + <string name="preferences_interface_drawer_hide_icon_labels_title">Skryť menovky ikon</string> + <string name="preferences_interface_drawer_hide_icon_labels_summary">Skryť menovky ikon v ponuke aplikácií</string> <string name="preferences_interface_dock_title">Dok</string> <string name="preferences_interface_general_title">Všeobecné</string> <string name="preferences_interface_general_icons_category">Ikony</string> @@ -44,6 +56,9 @@ <string name="default_iconpack_title">Predvolené ikony</string> <string name="icon_packs_title">Balíky ikon</string> <string name="no_iconpacks_summary">Žiadne balíky ikon nie sú nainštalované</string> + <string name="clear_keyguard_wallpaper">Vymazať</string> <string name="all_apps_cling_cm">Prispôsobte si vašu ponuku</string> <string name="all_apps_cling_summary">Kliknite na ukazovateľ stránky pre zobrazenie ďalších nastavení</string> + <string name="menu_hidden_apps_delete">Obnoviť</string> + <string name="hidden_apps_title">Skryté aplikácie</string> </resources> diff --git a/res/values-sr/cm_strings.xml b/res/values-sr/cm_strings.xml index 94b204b37..04ef3fa4d 100644 --- a/res/values-sr/cm_strings.xml +++ b/res/values-sr/cm_strings.xml @@ -17,12 +17,12 @@ --> <resources> <string name="application_copyright">Copyright \u00A9 2014 The CyanogenMod Project</string> - <string name="sort_button_text">Врста</string> + <string name="sort_button_text">Приказ</string> <string name="filter_button_text">Филтер</string> <string name="default_screen_button_text">Подразумевани екран</string> <string name="transition_effect_button_text">Ефекат скроловања</string> <string name="sort_mode_title">Наслов</string> - <string name="sort_mode_launch_count">Тачка покретања</string> + <string name="sort_mode_launch_count">Број покретања</string> <string name="sort_mode_install_time">Време инсталирања</string> <string name="scrolling_page_outlines">Контура странице</string> <string name="scrolling_fade_adjacent">Замагљени крајеви страница</string> @@ -30,20 +30,35 @@ <string name="preferences_title">Подешавања</string> <string name="preferences_application_title">Апликације</string> <string name="preferences_interface_homescreen_title">Почетни екран</string> - <string name="preferences_interface_homescreen_search_title">Табла за претраживање</string> - <string name="preferences_interface_homescreen_search_summary">Покажите упорну таблу за претраживање на врху екрана</string> + <string name="preferences_interface_homescreen_search_title">Табла за претрагу</string> + <string name="preferences_interface_homescreen_search_summary">Прикажи упорну таблу за претрагу на врху екрана</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_title">Сакриј етикете икона</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_summary">Сакријте етикете икона на почетном екрану</string> <string name="preferences_interface_drawer_title">Фиока</string> + <string name="preferences_interface_drawer_summary">Фиока за апликације и виџете</string> + <string name="preferences_interface_drawer_apps_category">Апликације</string> + <string name="preferences_interface_drawer_hidden_apps_title">Скривене апликације</string> + <string name="preferences_interface_drawer_hidden_apps_summary">Сакријте апликације из фиоке</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_title">Уклони пречице</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_summary">Уклоните пречице скривених апликација са почетног екрана</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_title">Уклони виџете</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_summary">Уклоните виџете скривених апликација са почетног екрана</string> + <string name="preferences_interface_drawer_hide_icon_labels_title">Сакриј етикете икона</string> + <string name="preferences_interface_drawer_hide_icon_labels_summary">Сакријте етикете икона у фиоци</string> <string name="preferences_interface_dock_title">Доцк</string> <string name="preferences_interface_general_title">Oпште</string> <string name="preferences_interface_general_icons_category">Иконе</string> <string name="preferences_interface_general_icons_large_title">Веће иконе</string> - <string name="preferences_interface_general_icons_large_summary">Користите екстра велике апликационе иконе на почетном екрану и у фиоци</string> + <string name="preferences_interface_general_icons_large_summary">Користите екстра велике апликационе иконе на почетном екрану и фиоци</string> <string name="preferences_interface_general_icons_text_style_title">Стил фонта текста</string> <string name="preferences_interface_general_icons_text_style_summary">Варијанту и стил фонта користити за текст на иконама</string> <string name="dialog_pick_iconpack_title">Одаберите пакет икона</string> <string name="default_iconpack_title">Подразумеване иконе</string> <string name="icon_packs_title">Пакети икона</string> <string name="no_iconpacks_summary">Нема инсталираних пакета са иконама</string> + <string name="clear_keyguard_wallpaper">Чисто</string> <string name="all_apps_cling_cm">Прилагодите фиоку</string> - <string name="all_apps_cling_summary">Додирните индикатор странице да видите додатна подешавања конфигурације</string> + <string name="all_apps_cling_summary">Додирните индикатор странице да би сте видели додатна подешавања</string> + <string name="menu_hidden_apps_delete">Ресетовање</string> + <string name="hidden_apps_title">Скривене апликације</string> </resources> diff --git a/res/values-sv/cm_arrays.xml b/res/values-sv/cm_arrays.xml new file mode 100644 index 000000000..fddfd9e11 --- /dev/null +++ b/res/values-sv/cm_arrays.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- + 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="preferences_interface_general_icons_text_font_family_entries"> + <item>Vanlig</item> + <item>Ljus</item> + <item>Kondenserad</item> + </string-array> + <string-array name="transition_effect_entries"> + <item>Ingen</item> + <item>Zooma In</item> + <item>Zooma ut</item> + <item>Rotera upp</item> + <item>Rotera ner</item> + <item>Kub in</item> + <item>Kub ut</item> + <item>Stack</item> + <item>Dragspel</item> + <item>Flip</item> + <item>Cylinder in</item> + <item>Cylinder ut</item> + <item>Karusell</item> + <item>Översikt</item> + </string-array> +</resources> diff --git a/res/values-sv/cm_strings.xml b/res/values-sv/cm_strings.xml new file mode 100644 index 000000000..530ebab3a --- /dev/null +++ b/res/values-sv/cm_strings.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Generated by crowdin.net--> +<!-- + 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 name="application_copyright">Copyright \u00A9 2014 The CyanogenMod Project</string> + <string name="sort_button_text">Sortera</string> + <string name="filter_button_text">Filtrera</string> + <string name="default_screen_button_text">Standardskärm</string> + <string name="transition_effect_button_text">Rullningseffekt</string> + <string name="sort_mode_title">Titel</string> + <string name="sort_mode_launch_count">Startantal</string> + <string name="sort_mode_install_time">Installationstillfälle</string> + <string name="scrolling_page_outlines">Skärmkonturer</string> + <string name="scrolling_fade_adjacent">Tona skärmsidor</string> + <string name="wallpaper_scroll">Rulla bakgrundsbild</string> + <string name="preferences_title">Inställningar</string> + <string name="preferences_application_title">App</string> + <string name="preferences_interface_homescreen_title">Hemskärm</string> + <string name="preferences_interface_homescreen_search_title">Sökfält</string> + <string name="preferences_interface_homescreen_search_summary">Visa beständigt sökfält längst upp på skärmen</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_title">Dölj ikonetiketter</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_summary">Dölj ikonetiketter på hemskärmen</string> + <string name="preferences_interface_drawer_title">Appmeny</string> + <string name="preferences_interface_drawer_summary">App- och widgetmeny</string> + <string name="preferences_interface_drawer_apps_category">Appar</string> + <string name="preferences_interface_drawer_hidden_apps_title">Gömda appar</string> + <string name="preferences_interface_drawer_hidden_apps_summary">Göm appar från menyn</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_title">Ta bort genvägar</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_summary">Ta bort genvägarna till gömda appar från hemskärmen</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_title">Ta bort widgetar</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_summary">Ta bort widgetarna från gömda appar från hemskärmen</string> + <string name="preferences_interface_drawer_hide_icon_labels_title">Göm ikonetiketter</string> + <string name="preferences_interface_drawer_hide_icon_labels_summary">Göm ikonetiketter i appmenyn</string> + <string name="preferences_interface_dock_title">Docka</string> + <string name="preferences_interface_general_title">Allmänt</string> + <string name="preferences_interface_general_icons_category">Ikoner</string> + <string name="preferences_interface_general_icons_large_title">Större ikoner</string> + <string name="preferences_interface_general_icons_large_summary">Använda extra stora appikoner på hemskärmen och appmenyn</string> + <string name="preferences_interface_general_icons_text_style_title">Typsnitt</string> + <string name="preferences_interface_general_icons_text_style_summary">Variant och stil på typsnitt som används för ikontext</string> + <string name="dialog_pick_iconpack_title">Välj ikonpaket</string> + <string name="default_iconpack_title">Standardikoner</string> + <string name="icon_packs_title">Ikonpaket</string> + <string name="no_iconpacks_summary">Inga ikonpaket installerade</string> + <string name="clear_keyguard_wallpaper">Ta bort</string> + <string name="all_apps_cling_cm">Anpassa din appmeny</string> + <string name="all_apps_cling_summary">Tryck på sidindikatorn för att se ytterligare inställningar</string> + <string name="menu_hidden_apps_delete">Återställ</string> + <string name="hidden_apps_title">Gömda appar</string> +</resources> diff --git a/res/values-tr/cm_strings.xml b/res/values-tr/cm_strings.xml index fc9bd2eef..a2754e234 100644 --- a/res/values-tr/cm_strings.xml +++ b/res/values-tr/cm_strings.xml @@ -19,7 +19,10 @@ <string name="application_copyright">Telif Hakkı \u00A9 2014 CyanogenMod Projesi</string> <string name="sort_button_text">Sırala</string> <string name="filter_button_text">Filtrele</string> + <string name="default_screen_button_text">Varsayılan ekran</string> + <string name="transition_effect_button_text">Kaydırma efekti</string> <string name="sort_mode_title">Başlık</string> + <string name="sort_mode_install_time">Kurulum zamanı</string> <string name="scrolling_page_outlines">Sayfa anahatları</string> <string name="scrolling_fade_adjacent">Yan sayfaları soldur</string> <string name="wallpaper_scroll">Duvarkağıdını kaydır</string> @@ -28,7 +31,19 @@ <string name="preferences_interface_homescreen_title">Ana Ekran</string> <string name="preferences_interface_homescreen_search_title">Arama kutusu</string> <string name="preferences_interface_homescreen_search_summary">Ekranın üstünde kalıcı arama çubuğu göster</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_title">Simge etiketlerini gizle</string> + <string name="preferences_interface_homescreen_general_hide_icon_labels_summary">Ana ekranda simge etiketlerini gizle</string> <string name="preferences_interface_drawer_title">Uygulama çekmecesi</string> + <string name="preferences_interface_drawer_summary">Uygulama ve widget çekmecesi</string> + <string name="preferences_interface_drawer_apps_category">Uygulamalar</string> + <string name="preferences_interface_drawer_hidden_apps_title">Gizli uygulamalar</string> + <string name="preferences_interface_drawer_hidden_apps_summary">Uygulamaları menüden gizle</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_title">Kısayolları kaldır</string> + <string name="preferences_interface_drawer_hidden_apps_shortcuts_summary">Ana ekrandan gizli uygulamaların kısayollarını kaldır</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_title">Ekran araçlarını kaldır</string> + <string name="preferences_interface_drawer_hidden_apps_widgets_summary">Ana ekrandan gizli uygulamaların widgetlarını kaldır</string> + <string name="preferences_interface_drawer_hide_icon_labels_title">Simge etiketlerini gizle</string> + <string name="preferences_interface_drawer_hide_icon_labels_summary">Çekmecedeki simge etiketlerini gizle</string> <string name="preferences_interface_dock_title">Kilit</string> <string name="preferences_interface_general_title">Genel</string> <string name="preferences_interface_general_icons_category">Simgeler</string> @@ -40,6 +55,9 @@ <string name="default_iconpack_title">Varsayılan simgeler</string> <string name="icon_packs_title">Simge paketleri</string> <string name="no_iconpacks_summary">Yüklü simge paketi yok</string> + <string name="clear_keyguard_wallpaper">Temizle</string> <string name="all_apps_cling_cm">Uygulama çekmecesini özelleştir</string> <string name="all_apps_cling_summary">Ek ayarlara bakmak için sayfa göstergesine dokun</string> + <string name="menu_hidden_apps_delete">Sıfırla</string> + <string name="hidden_apps_title">Gizli uygulamalar</string> </resources> diff --git a/res/values-zh-rHK/cm_strings.xml b/res/values-zh-rHK/cm_strings.xml index fe9706723..140c9bc27 100644 --- a/res/values-zh-rHK/cm_strings.xml +++ b/res/values-zh-rHK/cm_strings.xml @@ -20,5 +20,6 @@ <string name="default_screen_button_text">預設螢幕</string> <string name="sort_mode_launch_count">啟動次數</string> <string name="wallpaper_scroll">滾動牆紙</string> + <string name="preferences_title">設定</string> <string name="default_iconpack_title">預設圖示</string> </resources> diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml index 7f5de470f..d4effcc40 100644 --- a/res/values/cm_strings.xml +++ b/res/values/cm_strings.xml @@ -86,6 +86,9 @@ <!-- Folder titles --> <string name="google_title" translatable="false">Google</string> + <!-- Clear keyguard wallpaper tile text --> + <string name="clear_keyguard_wallpaper">Clear</string> + <!-- The title text for the all apps cling [CHAR_LIMIT=60] --> <string name="all_apps_cling_cm">Customize your drawer</string> <!-- The description of how to access Trebuchet settings [CHAR_LIMIT=160] --> diff --git a/res/values/preferences_defaults.xml b/res/values/preferences_defaults.xml index 9d8e5f010..98d8bb7a8 100644 --- a/res/values/preferences_defaults.xml +++ b/res/values/preferences_defaults.xml @@ -5,7 +5,7 @@ <bool name="preferences_interface_homescreen_scrolling_wallpaper_scroll_default">true</bool> <bool name="preferences_interface_homescreen_scrolling_page_outlines_default">@bool/config_workspaceDefaultShowOutlines</bool> <bool name="preferences_interface_homescreen_scrolling_fade_adjacent_default">@bool/config_workspaceFadeAdjacentScreens</bool> - <bool name="preferences_interface_homescreen_hide_icon_labels">false</bool> + <bool name="preferences_interface_homescreen_hide_icon_labels_default">false</bool> <string name="preferences_interface_drawer_scrolling_transition_effect">stack</string> <bool name="preferences_interface_drawer_scrolling_fade_adjacent_default">false</bool> <bool name="preferences_interface_drawer_remove_hidden_apps_shortcuts_default">false</bool> diff --git a/res/xml/preferences_homescreen.xml b/res/xml/preferences_homescreen.xml index 4671a8a4a..1754cfa02 100644 --- a/res/xml/preferences_homescreen.xml +++ b/res/xml/preferences_homescreen.xml @@ -25,5 +25,5 @@ <CheckBoxPreference android:key="ui_homescreen_general_hide_icon_labels" android:title="@string/preferences_interface_homescreen_general_hide_icon_labels_title" android:summary="@string/preferences_interface_homescreen_general_hide_icon_labels_summary" - android:defaultValue="@bool/preferences_interface_homescreen_hide_icon_labels" /> + android:defaultValue="@bool/preferences_interface_homescreen_hide_icon_labels_default" /> </PreferenceScreen> diff --git a/src/android/util/Pools.java b/src/android/util/Pools.java deleted file mode 100644 index 40bab1eae..000000000 --- a/src/android/util/Pools.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source 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. - */ - -package android.util; - -/** - * Helper class for crating pools of objects. An example use looks like this: - * <pre> - * public class MyPooledClass { - * - * private static final SynchronizedPool<MyPooledClass> sPool = - * new SynchronizedPool<MyPooledClass>(10); - * - * public static MyPooledClass obtain() { - * MyPooledClass instance = sPool.acquire(); - * return (instance != null) ? instance : new MyPooledClass(); - * } - * - * public void recycle() { - * // Clear state if needed. - * sPool.release(this); - * } - * - * . . . - * } - * </pre> - * - * @hide - */ -public final class Pools { - - /** - * Interface for managing a pool of objects. - * - * @param <T> The pooled type. - */ - public static interface Pool<T> { - - /** - * @return An instance from the pool if such, null otherwise. - */ - public T acquire(); - - /** - * Release an instance to the pool. - * - * @param instance The instance to release. - * @return Whether the instance was put in the pool. - * - * @throws IllegalStateException If the instance is already in the pool. - */ - public boolean release(T instance); - } - - private Pools() { - /* do nothing - hiding constructor */ - } - - /** - * Simple (non-synchronized) pool of objects. - * - * @param <T> The pooled type. - */ - public static class SimplePool<T> implements Pool<T> { - private final Object[] mPool; - - private int mPoolSize; - - /** - * Creates a new instance. - * - * @param maxPoolSize The max pool size. - * - * @throws IllegalArgumentException If the max pool size is less than zero. - */ - public SimplePool(int maxPoolSize) { - if (maxPoolSize <= 0) { - throw new IllegalArgumentException("The max pool size must be > 0"); - } - mPool = new Object[maxPoolSize]; - } - - @Override - @SuppressWarnings("unchecked") - public T acquire() { - if (mPoolSize > 0) { - final int lastPooledIndex = mPoolSize - 1; - T instance = (T) mPool[lastPooledIndex]; - mPool[lastPooledIndex] = null; - mPoolSize--; - return instance; - } - return null; - } - - @Override - public boolean release(T instance) { - if (isInPool(instance)) { - throw new IllegalStateException("Already in the pool!"); - } - if (mPoolSize < mPool.length) { - mPool[mPoolSize] = instance; - mPoolSize++; - return true; - } - return false; - } - - private boolean isInPool(T instance) { - for (int i = 0; i < mPoolSize; i++) { - if (mPool[i] == instance) { - return true; - } - } - return false; - } - } - - /** - * Synchronized) pool of objects. - * - * @param <T> The pooled type. - */ - public static class SynchronizedPool<T> extends SimplePool<T> { - private final Object mLock = new Object(); - - /** - * Creates a new instance. - * - * @param maxPoolSize The max pool size. - * - * @throws IllegalArgumentException If the max pool size is less than zero. - */ - public SynchronizedPool(int maxPoolSize) { - super(maxPoolSize); - } - - @Override - public T acquire() { - synchronized (mLock) { - return super.acquire(); - } - } - - @Override - public boolean release(T element) { - synchronized (mLock) { - return super.release(element); - } - } - } -}
\ No newline at end of file diff --git a/src/com/android/launcher3/AppsCustomizePagedView.java b/src/com/android/launcher3/AppsCustomizePagedView.java index 7e67f7c60..ed504cf2e 100644 --- a/src/com/android/launcher3/AppsCustomizePagedView.java +++ b/src/com/android/launcher3/AppsCustomizePagedView.java @@ -1514,16 +1514,11 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen } else { if (mOverscrollTransformsSet) { mOverscrollTransformsSet = false; - View v0 = getPageAt(0); - View v1 = getPageAt(getChildCount() - 1); + View v0 = getPageAt(mCurrentPage); v0.setRotationY(0); - v1.setRotationY(0); v0.setCameraDistance(mDensity * mCameraDistance); - v1.setCameraDistance(mDensity * mCameraDistance); v0.setPivotX(v0.getMeasuredWidth() / 2); - v1.setPivotX(v1.getMeasuredWidth() / 2); v0.setPivotY(v0.getMeasuredHeight() / 2); - v1.setPivotY(v1.getMeasuredHeight() / 2); } } } diff --git a/src/com/android/launcher3/DragLayer.java b/src/com/android/launcher3/DragLayer.java index 89f8275bf..401f4ed52 100644 --- a/src/com/android/launcher3/DragLayer.java +++ b/src/com/android/launcher3/DragLayer.java @@ -800,7 +800,8 @@ public class DragLayer extends FrameLayout implements ViewGroup.OnHierarchyChang /** * Note: this is a reimplementation of View.isLayoutRtl() since that is currently hidden api. */ - private boolean isLayoutRtl() { + @Override + public boolean isLayoutRtl() { return (getLayoutDirection() == LAYOUT_DIRECTION_RTL); } diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java index 1fcfa1173..a00f3c1da 100644 --- a/src/com/android/launcher3/Folder.java +++ b/src/com/android/launcher3/Folder.java @@ -195,7 +195,7 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList if (SettingsProvider.getBoolean(mLauncher, SettingsProvider.SETTINGS_UI_HOMESCREEN_HIDE_ICON_LABELS, - R.bool.preferences_interface_homescreen_hide_icon_labels)) { + R.bool.preferences_interface_homescreen_hide_icon_labels_default)) { mFolderName.setVisibility(View.GONE); mFolderNameHeight = getPaddingBottom(); } @@ -276,7 +276,7 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList String newTitle = mFolderName.getText().toString(); if (!SettingsProvider.getBoolean(mLauncher, SettingsProvider.SETTINGS_UI_HOMESCREEN_HIDE_ICON_LABELS, - R.bool.preferences_interface_homescreen_hide_icon_labels)) { + R.bool.preferences_interface_homescreen_hide_icon_labels_default)) { mInfo.setTitle(newTitle); } LauncherModel.updateItemInDatabase(mLauncher, mInfo); diff --git a/src/com/android/launcher3/FolderIcon.java b/src/com/android/launcher3/FolderIcon.java index e80b0f4f2..9b7919b42 100644 --- a/src/com/android/launcher3/FolderIcon.java +++ b/src/com/android/launcher3/FolderIcon.java @@ -309,7 +309,8 @@ public class FolderIcon extends LinearLayout implements FolderListener { private boolean willAcceptItem(ItemInfo item) { final int itemType = item.itemType; return ((itemType == LauncherSettings.Favorites.ITEM_TYPE_APPLICATION || - itemType == LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT) && + itemType == LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT || + itemType == LauncherSettings.Favorites.ITEM_TYPE_FOLDER) && !mFolder.isFull() && item != mInfo && !mInfo.opened); } @@ -437,6 +438,15 @@ public class FolderIcon extends LinearLayout implements FolderListener { if (d.dragInfo instanceof AppInfo) { // Came from all apps -- make a copy item = ((AppInfo) d.dragInfo).makeShortcut(); + } else if (d.dragInfo instanceof FolderInfo) { + FolderInfo folder = (FolderInfo) d.dragInfo; + mFolder.notifyDrop(); + for (ShortcutInfo fItem : folder.contents) { + onDrop(fItem, d.dragView, null, 1.0f, mInfo.contents.size(), d.postAnimationRunnable, d); + } + mLauncher.removeFolder(folder); + LauncherModel.deleteItemFromDatabase(mLauncher, folder); + return; } else { item = (ShortcutInfo) d.dragInfo; } diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 29618422d..383204817 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -391,7 +391,7 @@ public class Launcher extends Activity mHideIconLabels = SettingsProvider.getBoolean(this, SettingsProvider.SETTINGS_UI_HOMESCREEN_HIDE_ICON_LABELS, - R.bool.preferences_interface_homescreen_hide_icon_labels); + R.bool.preferences_interface_homescreen_hide_icon_labels_default); // Determine the dynamic grid properties Point smallestSize = new Point(); diff --git a/src/com/android/launcher3/LiveWallpaperListAdapter.java b/src/com/android/launcher3/LiveWallpaperListAdapter.java index 54e0af749..43d8cfe0c 100644 --- a/src/com/android/launcher3/LiveWallpaperListAdapter.java +++ b/src/com/android/launcher3/LiveWallpaperListAdapter.java @@ -118,7 +118,7 @@ public class LiveWallpaperListAdapter extends BaseAdapter implements ListAdapter mInfo = info; } @Override - public void onClick(WallpaperPickerActivity a) { + public void onClick(WallpaperCropActivity a) { Intent preview = new Intent(WallpaperManager.ACTION_CHANGE_LIVE_WALLPAPER); preview.putExtra(WallpaperManager.EXTRA_LIVE_WALLPAPER_COMPONENT, mInfo.getComponent()); diff --git a/src/com/android/launcher3/LockWallpaperPickerActivity.java b/src/com/android/launcher3/LockWallpaperPickerActivity.java new file mode 100644 index 000000000..483568480 --- /dev/null +++ b/src/com/android/launcher3/LockWallpaperPickerActivity.java @@ -0,0 +1,1600 @@ +/* + * 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. + */ + +package com.android.launcher3; + +import android.animation.Animator; +import android.animation.LayoutTransition; +import android.app.ActionBar; +import android.app.Activity; +import android.app.WallpaperInfo; +import android.app.WallpaperManager; +import android.content.ContentResolver; +import android.content.Context; +import android.content.Intent; +import android.content.pm.ApplicationInfo; +import android.content.pm.PackageInfo; +import android.content.pm.PackageManager; +import android.content.pm.PackageManager.NameNotFoundException; +import android.content.res.AssetManager; +import android.content.res.Resources; +import android.database.Cursor; +import android.graphics.Bitmap; +import android.graphics.Bitmap.CompressFormat; +import android.graphics.BitmapFactory; +import android.graphics.BitmapRegionDecoder; +import android.graphics.Canvas; +import android.graphics.Matrix; +import android.graphics.Paint; +import android.graphics.Point; +import android.graphics.PorterDuff; +import android.graphics.Rect; +import android.graphics.RectF; +import android.graphics.drawable.BitmapDrawable; +import android.graphics.drawable.Drawable; +import android.graphics.drawable.LevelListDrawable; +import android.net.Uri; +import android.os.AsyncTask; +import android.os.Bundle; +import android.provider.MediaStore; +import android.provider.ThemesContract.ThemesColumns; +import android.util.Log; +import android.util.Pair; +import android.view.ActionMode; +import android.view.Display; +import android.view.LayoutInflater; +import android.view.Menu; +import android.view.MenuInflater; +import android.view.MenuItem; +import android.view.View; +import android.view.View.OnClickListener; +import android.view.ViewGroup; +import android.view.ViewTreeObserver; +import android.view.ViewTreeObserver.OnGlobalLayoutListener; +import android.view.animation.AccelerateInterpolator; +import android.view.animation.DecelerateInterpolator; +import android.widget.BaseAdapter; +import android.widget.FrameLayout; +import android.widget.HorizontalScrollView; +import android.widget.ImageView; +import android.widget.LinearLayout; +import android.widget.ListAdapter; + +import com.android.gallery3d.common.Utils; +import com.android.launcher3.WallpaperCropActivity.BitmapCropTask; +import com.android.launcher3.WallpaperCropActivity.OnBitmapCroppedHandler; +import com.android.photos.BitmapRegionTileSource; + +import java.io.BufferedInputStream; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; + +public class LockWallpaperPickerActivity extends WallpaperCropActivity { + static final String TAG = LockWallpaperPickerActivity.class.getSimpleName(); + + public static final int IMAGE_PICK = 5; + public static final int PICK_WALLPAPER_THIRD_PARTY_ACTIVITY = 6; + public static final int PICK_LIVE_WALLPAPER = 7; + private static final String TEMP_WALLPAPER_TILES = "TEMP_KEYGUARD_WALLPAPER_TILES"; + + private View mSelectedThumb; + private boolean mIgnoreNextTap; + private OnClickListener mThumbnailOnClickListener; + + private LinearLayout mWallpapersView; + private View mWallpaperStrip; + + private ActionMode.Callback mActionModeCallback; + private ActionMode mActionMode; + + private View.OnLongClickListener mLongClickListener; + + ArrayList<Uri> mTempWallpaperTiles = new ArrayList<Uri>(); + private SavedWallpaperImages mSavedImages; + + public static class PickImageInfo extends WallpaperTileInfo { + @Override + public void onClick(WallpaperCropActivity a) { + Intent intent = new Intent(Intent.ACTION_GET_CONTENT); + intent.setType("image/*"); + Utilities.startActivityForResultSafely(((LockWallpaperPickerActivity)a), intent, IMAGE_PICK); + } + } + + public static class UserDesktopWallpaperInfo extends WallpaperTileInfo { + @Override + public void onClick(WallpaperCropActivity a) { + WallpaperManager am = WallpaperManager.getInstance(a); + am.clearKeyguardWallpaper(); + a.setResult(RESULT_OK); + a.finish(); + } + } + + public static class UriWallpaperInfo extends WallpaperTileInfo { + private Uri mUri; + public UriWallpaperInfo(Uri uri) { + mUri = uri; + } + @Override + public void onClick(WallpaperCropActivity a) { + CropView v = a.getCropView(); + int rotation = WallpaperCropActivity.getRotationFromExif(a, mUri); + v.setTileSource(new BitmapRegionTileSource(a, mUri, 1024, rotation), null); + v.setTouchEnabled(true); + } + @Override + public void onSave(final WallpaperCropActivity a) { + boolean finishActivityWhenDone = true; + OnBitmapCroppedHandler h = new OnBitmapCroppedHandler() { + public void onBitmapCropped(byte[] imageBytes) { + Point thumbSize = getDefaultThumbnailSize(a.getResources()); + Bitmap thumb = createThumbnail( + thumbSize, null, null, imageBytes, null, 0, 0, true); + a.getSavedImages().writeImage(thumb, imageBytes); + } + }; + ((LockWallpaperPickerActivity)a).cropImageAndSetWallpaper(mUri, h, finishActivityWhenDone); + } + @Override + public boolean isSelectable() { + return true; + } + @Override + public boolean isNamelessWallpaper() { + return true; + } + } + + /** + * For themes which have regular wallpapers + */ + public static class ThemeWallpaperInfo extends WallpaperTileInfo { + String mPackageName; + boolean mIsLegacy; + Drawable mThumb; + Context mContext; + + public ThemeWallpaperInfo(Context context, String packageName, boolean legacy, Drawable thumb) { + this.mContext = context; + this.mPackageName = packageName; + this.mIsLegacy = legacy; + this.mThumb = thumb; + } + + @Override + public void onClick(WallpaperCropActivity a) { + CropView v = a.getCropView(); + try { + BitmapRegionTileSource source = null; + if (mIsLegacy) { + final PackageManager pm = a.getPackageManager(); + PackageInfo pi = pm.getPackageInfo(mPackageName, 0); + Resources res = a.getPackageManager().getResourcesForApplication(mPackageName); + int resId = pi.legacyThemeInfos[0].wallpaperResourceId; + + int rotation = WallpaperCropActivity.getRotationFromExif(res, resId); + source = new BitmapRegionTileSource( + res, a, resId, 1024, rotation); + } else { + Resources res = a.getPackageManager().getResourcesForApplication(mPackageName); + if (res == null) { + return; + } + + int rotation = 0; + source = new BitmapRegionTileSource( + res, a, "wallpapers", 1024, rotation, true); + } + v.setTileSource(source, null); + v.setTouchEnabled(true); + } catch (NameNotFoundException e) { + } + } + + @Override + public void onSave(WallpaperCropActivity a) { + ((LockWallpaperPickerActivity)a).cropImageAndSetWallpaper( + "wallpapers", + mPackageName, + mIsLegacy, + true); + } + + @Override + public boolean isNamelessWallpaper() { + return true; + } + + @Override + public boolean isSelectable() { + return true; + } + } + + /** + * For themes that have LOCKSCREEN wallpapers + */ + public static class ThemeLockWallpaperInfo extends WallpaperTileInfo { + String mPackageName; + Drawable mThumb; + Context mContext; + + public ThemeLockWallpaperInfo(Context context, String packageName, Drawable thumb) { + this.mContext = context; + this.mPackageName = packageName; + this.mThumb = thumb; + } + + @Override + public void onClick(WallpaperCropActivity a) { + CropView v = a.getCropView(); + try { + BitmapRegionTileSource source = null; + Resources res = a.getPackageManager().getResourcesForApplication(mPackageName); + if (res == null) { + return; + } + + int rotation = 0; + source = new BitmapRegionTileSource( + res, a, "lockscreen", 1024, rotation, true); + v.setTileSource(source, null); + v.setTouchEnabled(true); + } catch (NameNotFoundException e) { + } + } + + @Override + public void onSave(WallpaperCropActivity a) { + ((LockWallpaperPickerActivity)a).cropImageAndSetWallpaper( + "lockscreen", + mPackageName, + false, + true); + } + + @Override + public boolean isNamelessWallpaper() { + return true; + } + + @Override + public boolean isSelectable() { + return true; + } + } + + public static class ResourceWallpaperInfo extends WallpaperTileInfo { + private Resources mResources; + private int mResId; + private Drawable mThumb; + + public ResourceWallpaperInfo(Resources res, int resId, Drawable thumb) { + mResources = res; + mResId = resId; + mThumb = thumb; + } + @Override + public void onClick(WallpaperCropActivity a) { + int rotation = WallpaperCropActivity.getRotationFromExif(mResources, mResId); + BitmapRegionTileSource source = new BitmapRegionTileSource( + mResources, a, mResId, 1024, rotation); + CropView v = a.getCropView(); + v.setTileSource(source, null); + Point wallpaperSize = WallpaperCropActivity.getDefaultWallpaperSize( + a.getResources(), a.getWindowManager()); + RectF crop = WallpaperCropActivity.getMaxCropRect( + source.getImageWidth(), source.getImageHeight(), + wallpaperSize.x, wallpaperSize.y, false); + v.setScale(wallpaperSize.x / crop.width()); + v.setTouchEnabled(false); + } + @Override + public void onSave(WallpaperCropActivity a) { + boolean finishActivityWhenDone = true; + ((LockWallpaperPickerActivity)a).cropImageAndSetWallpaper(mResources, mResId, finishActivityWhenDone); + } + @Override + public boolean isSelectable() { + return true; + } + @Override + public boolean isNamelessWallpaper() { + return true; + } + } + + protected void cropImageAndSetWallpaper(String path, String packageName, final boolean legacy, + final boolean finishActivityWhenDone) { + + Point outSize = new Point(); + getWindowManager().getDefaultDisplay().getSize(outSize); + + final int outWidth = outSize.x; + final int outHeight = outSize.y; + Runnable onEndCrop = new Runnable() { + public void run() { + if (finishActivityWhenDone) { + setResult(Activity.RESULT_OK); + finish(); + } + } + }; + + RectF cropRect = new RectF(mCropView.getCrop()); + BitmapCropTask cropTask = null; + try { + if (legacy) { + final PackageManager pm = getPackageManager(); + PackageInfo pi = pm.getPackageInfo(packageName, 0); + Resources res = getPackageManager().getResourcesForApplication(packageName); + int resId = pi.legacyThemeInfos[0].wallpaperResourceId; + cropTask = new BitmapCropTask(this, res, resId, + cropRect, 0, outWidth, outHeight, true, false, onEndCrop); + } else { + Resources res = getPackageManager().getResourcesForApplication(packageName); + if (res == null) { + return; + } + cropTask = new BitmapCropTask(this, res, path, cropRect, + 0, outWidth, outHeight, true, false, onEndCrop); + } + } catch (NameNotFoundException e) { + return; + } + + if (cropTask != null) { + cropTask.execute(); + } + } + + @Override + protected void cropImageAndSetWallpaper(Uri uri, + OnBitmapCroppedHandler onBitmapCroppedHandler, final boolean finishActivityWhenDone) { + // Get the crop + boolean ltr = mCropView.getLayoutDirection() == View.LAYOUT_DIRECTION_LTR; + + Point minDims = new Point(); + Point maxDims = new Point(); + Display d = getWindowManager().getDefaultDisplay(); + d.getCurrentSizeRange(minDims, maxDims); + + Point displaySize = new Point(); + d.getSize(displaySize); + + int maxDim = Math.max(maxDims.x, maxDims.y); + final int minDim = Math.min(minDims.x, minDims.y); + int defaultWallpaperWidth; + if (isScreenLarge(getResources())) { + defaultWallpaperWidth = (int) (maxDim * + wallpaperTravelToScreenWidthRatio(maxDim, minDim)); + } else { + defaultWallpaperWidth = Math.max((int) + (minDim * WALLPAPER_SCREENS_SPAN), maxDim); + } + + boolean isPortrait = displaySize.x < displaySize.y; + int portraitHeight; + if (isPortrait) { + portraitHeight = mCropView.getHeight(); + } else { + // TODO: how to actually get the proper portrait height? + // This is not quite right: + portraitHeight = Math.max(maxDims.x, maxDims.y); + } + if (android.os.Build.VERSION.SDK_INT >= + android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) { + Point realSize = new Point(); + d.getRealSize(realSize); + portraitHeight = Math.max(realSize.x, realSize.y); + } + // Get the crop + RectF cropRect = mCropView.getCrop(); + int cropRotation = mCropView.getImageRotation(); + float cropScale = mCropView.getWidth() / (float) cropRect.width(); + + Point inSize = mCropView.getSourceDimensions(); + Matrix rotateMatrix = new Matrix(); + rotateMatrix.setRotate(cropRotation); + float[] rotatedInSize = new float[] { inSize.x, inSize.y }; + rotateMatrix.mapPoints(rotatedInSize); + rotatedInSize[0] = Math.abs(rotatedInSize[0]); + rotatedInSize[1] = Math.abs(rotatedInSize[1]); + + // ADJUST CROP WIDTH + // Extend the crop all the way to the right, for parallax + // (or all the way to the left, in RTL) + float extraSpace = ltr ? rotatedInSize[0] - cropRect.right : cropRect.left; + // Cap the amount of extra width + float maxExtraSpace = defaultWallpaperWidth / cropScale - cropRect.width(); + extraSpace = Math.min(extraSpace, maxExtraSpace); + + if (ltr) { + cropRect.right += extraSpace; + } else { + cropRect.left -= extraSpace; + } + + // ADJUST CROP HEIGHT + if (isPortrait) { + cropRect.bottom = cropRect.top + portraitHeight / cropScale; + } else { // LANDSCAPE + float extraPortraitHeight = + portraitHeight / cropScale - cropRect.height(); + float expandHeight = + Math.min(Math.min(rotatedInSize[1] - cropRect.bottom, cropRect.top), + extraPortraitHeight / 2); + cropRect.top -= expandHeight; + cropRect.bottom += expandHeight; + } + final int outWidth = (int) Math.round(cropRect.width() * cropScale); + final int outHeight = (int) Math.round(cropRect.height() * cropScale); + + Runnable onEndCrop = new Runnable() { + public void run() { + updateWallpaperDimensions(outWidth, outHeight); + if (finishActivityWhenDone) { + setResult(Activity.RESULT_OK); + finish(); + } + } + }; + BitmapCropTask cropTask = new BitmapCropTask(this, uri, + cropRect, cropRotation, outWidth, outHeight, true, false, onEndCrop); + if (onBitmapCroppedHandler != null) { + cropTask.setOnBitmapCropped(onBitmapCroppedHandler); + } + cropTask.execute(); + } + + @Override + protected void setWallpaper(String filePath, final boolean finishActivityWhenDone) { + int rotation = getRotationFromExif(filePath); + BitmapCropTask cropTask = new BitmapCropTask( + this, filePath, null, rotation, 0, 0, true, false, null); + final Point bounds = cropTask.getImageBounds(); + Runnable onEndCrop = new Runnable() { + public void run() { + updateWallpaperDimensions(bounds.x, bounds.y); + if (finishActivityWhenDone) { + setResult(Activity.RESULT_OK); + finish(); + } + } + }; + cropTask.setOnEndRunnable(onEndCrop); + cropTask.setNoCrop(true); + cropTask.execute(); + } + + protected static class BitmapCropTask extends AsyncTask<Void, Void, Boolean> { + Uri mInUri = null; + Context mContext; + String mInFilePath; + byte[] mInImageBytes; + int mInResId = 0; + InputStream mInStream; + RectF mCropBounds = null; + int mOutWidth, mOutHeight; + int mRotation; + String mOutputFormat = "jpg"; // for now + boolean mSetWallpaper; + boolean mSaveCroppedBitmap; + Bitmap mCroppedBitmap; + Runnable mOnEndRunnable; + Resources mResources; + OnBitmapCroppedHandler mOnBitmapCroppedHandler; + boolean mNoCrop; + boolean mImageFromAsset; + + public BitmapCropTask(Context c, Resources res , String assetPath, + RectF cropBounds, int rotation, int outWidth, int outHeight, + boolean setWallpaper, boolean saveCroppedBitmap, Runnable onEndRunnable) { + mContext = c; + mResources = res; + mInFilePath = assetPath; + mImageFromAsset = true; + init(cropBounds, rotation, + outWidth, outHeight, setWallpaper, saveCroppedBitmap, onEndRunnable); + } + + public BitmapCropTask(Context c, String filePath, + RectF cropBounds, int rotation, int outWidth, int outHeight, + boolean setWallpaper, boolean saveCroppedBitmap, Runnable onEndRunnable) { + mContext = c; + mInFilePath = filePath; + init(cropBounds, rotation, + outWidth, outHeight, setWallpaper, saveCroppedBitmap, onEndRunnable); + } + + public BitmapCropTask(byte[] imageBytes, + RectF cropBounds, int rotation, int outWidth, int outHeight, + boolean setWallpaper, boolean saveCroppedBitmap, Runnable onEndRunnable) { + mInImageBytes = imageBytes; + init(cropBounds, rotation, + outWidth, outHeight, setWallpaper, saveCroppedBitmap, onEndRunnable); + } + + public BitmapCropTask(Context c, Uri inUri, + RectF cropBounds, int rotation, int outWidth, int outHeight, + boolean setWallpaper, boolean saveCroppedBitmap, Runnable onEndRunnable) { + mContext = c; + mInUri = inUri; + init(cropBounds, rotation, + outWidth, outHeight, setWallpaper, saveCroppedBitmap, onEndRunnable); + } + + public BitmapCropTask(Context c, Resources res, int inResId, + RectF cropBounds, int rotation, int outWidth, int outHeight, + boolean setWallpaper, boolean saveCroppedBitmap, Runnable onEndRunnable) { + mContext = c; + mInResId = inResId; + mResources = res; + init(cropBounds, rotation, + outWidth, outHeight, setWallpaper, saveCroppedBitmap, onEndRunnable); + } + + private void init(RectF cropBounds, int rotation, int outWidth, int outHeight, + boolean setWallpaper, boolean saveCroppedBitmap, Runnable onEndRunnable) { + mCropBounds = cropBounds; + mRotation = rotation; + mOutWidth = outWidth; + mOutHeight = outHeight; + mSetWallpaper = setWallpaper; + mSaveCroppedBitmap = saveCroppedBitmap; + mOnEndRunnable = onEndRunnable; + } + + public void setOnBitmapCropped(OnBitmapCroppedHandler handler) { + mOnBitmapCroppedHandler = handler; + } + + public void setNoCrop(boolean value) { + mNoCrop = value; + } + + public void setOnEndRunnable(Runnable onEndRunnable) { + mOnEndRunnable = onEndRunnable; + } + + // Helper to setup input stream + private void regenerateInputStream() { + if (mInUri == null && mInResId == 0 && mInFilePath == null && mInImageBytes == null && !mImageFromAsset) { + Log.w(TAG, "cannot read original file, no input URI, resource ID, or " + + "image byte array given"); + } else { + Utils.closeSilently(mInStream); + try { + if (mImageFromAsset) { + AssetManager am = mResources.getAssets(); + String[] pathImages = am.list(mInFilePath); + if (pathImages == null || pathImages.length == 0) { + throw new IOException("did not find any images in path: " + mInFilePath); + } + InputStream is = am.open(mInFilePath + File.separator + pathImages[0]); + mInStream = new BufferedInputStream(is); + } else if (mInUri != null) { + mInStream = new BufferedInputStream( + mContext.getContentResolver().openInputStream(mInUri)); + } else if (mInFilePath != null) { + mInStream = mContext.openFileInput(mInFilePath); + } else if (mInImageBytes != null) { + mInStream = new BufferedInputStream( + new ByteArrayInputStream(mInImageBytes)); + } else { + mInStream = new BufferedInputStream( + mResources.openRawResource(mInResId)); + } + } catch (FileNotFoundException e) { + Log.w(TAG, "cannot read file: " + mInUri.toString(), e); + } catch (IOException e) { + Log.w(TAG, "cannot read file: " + mInUri.toString(), e); + } + } + } + + public Point getImageBounds() { + regenerateInputStream(); + if (mInStream != null) { + BitmapFactory.Options options = new BitmapFactory.Options(); + options.inJustDecodeBounds = true; + BitmapFactory.decodeStream(mInStream, null, options); + if (options.outWidth != 0 && options.outHeight != 0) { + return new Point(options.outWidth, options.outHeight); + } + } + return null; + } + + public void setCropBounds(RectF cropBounds) { + mCropBounds = cropBounds; + } + + public Bitmap getCroppedBitmap() { + return mCroppedBitmap; + } + public boolean cropBitmap() { + boolean failure = false; + + regenerateInputStream(); + + WallpaperManager wallpaperManager = null; + if (mSetWallpaper) { + wallpaperManager = WallpaperManager.getInstance(mContext.getApplicationContext()); + } + if (mSetWallpaper && mNoCrop && mInStream != null) { + try { + wallpaperManager.setKeyguardStream(mInStream); + } catch (IOException e) { + Log.w(TAG, "cannot write stream to wallpaper", e); + failure = true; + } + return !failure; + } + if (mInStream != null) { + // Find crop bounds (scaled to original image size) + Rect roundedTrueCrop = new Rect(); + Matrix rotateMatrix = new Matrix(); + Matrix inverseRotateMatrix = new Matrix(); + if (mRotation > 0) { + rotateMatrix.setRotate(mRotation); + inverseRotateMatrix.setRotate(-mRotation); + + mCropBounds.roundOut(roundedTrueCrop); + mCropBounds = new RectF(roundedTrueCrop); + + Point bounds = getImageBounds(); + + float[] rotatedBounds = new float[] { bounds.x, bounds.y }; + rotateMatrix.mapPoints(rotatedBounds); + rotatedBounds[0] = Math.abs(rotatedBounds[0]); + rotatedBounds[1] = Math.abs(rotatedBounds[1]); + + mCropBounds.offset(-rotatedBounds[0]/2, -rotatedBounds[1]/2); + inverseRotateMatrix.mapRect(mCropBounds); + mCropBounds.offset(bounds.x/2, bounds.y/2); + + regenerateInputStream(); + } + + mCropBounds.roundOut(roundedTrueCrop); + + if (roundedTrueCrop.width() <= 0 || roundedTrueCrop.height() <= 0) { + Log.w(TAG, "crop has bad values for full size image"); + failure = true; + return false; + } + + // See how much we're reducing the size of the image + int scaleDownSampleSize = Math.min(roundedTrueCrop.width() / mOutWidth, + roundedTrueCrop.height() / mOutHeight); + + // Attempt to open a region decoder + BitmapRegionDecoder decoder = null; + try { + decoder = BitmapRegionDecoder.newInstance(mInStream, true); + } catch (IOException e) { + Log.w(TAG, "cannot open region decoder for file: " + mInUri.toString(), e); + } + + Bitmap crop = null; + if (decoder != null) { + // Do region decoding to get crop bitmap + BitmapFactory.Options options = new BitmapFactory.Options(); + if (scaleDownSampleSize > 1) { + options.inSampleSize = scaleDownSampleSize; + } + crop = decoder.decodeRegion(roundedTrueCrop, options); + decoder.recycle(); + } + + if (crop == null) { + // BitmapRegionDecoder has failed, try to crop in-memory + regenerateInputStream(); + Bitmap fullSize = null; + if (mInStream != null) { + BitmapFactory.Options options = new BitmapFactory.Options(); + if (scaleDownSampleSize > 1) { + options.inSampleSize = scaleDownSampleSize; + } + fullSize = BitmapFactory.decodeStream(mInStream, null, options); + } + if (fullSize != null) { + mCropBounds.left /= scaleDownSampleSize; + mCropBounds.top /= scaleDownSampleSize; + mCropBounds.bottom /= scaleDownSampleSize; + mCropBounds.right /= scaleDownSampleSize; + mCropBounds.roundOut(roundedTrueCrop); + + crop = Bitmap.createBitmap(fullSize, roundedTrueCrop.left, + roundedTrueCrop.top, roundedTrueCrop.width(), + roundedTrueCrop.height()); + } + } + + if (crop == null) { + Log.w(TAG, "cannot decode file: " + mInUri.toString()); + failure = true; + return false; + } + if (mOutWidth > 0 && mOutHeight > 0 || mRotation > 0) { + float[] dimsAfter = new float[] { crop.getWidth(), crop.getHeight() }; + rotateMatrix.mapPoints(dimsAfter); + dimsAfter[0] = Math.abs(dimsAfter[0]); + dimsAfter[1] = Math.abs(dimsAfter[1]); + + if (!(mOutWidth > 0 && mOutHeight > 0)) { + mOutWidth = Math.round(dimsAfter[0]); + mOutHeight = Math.round(dimsAfter[1]); + } + + RectF cropRect = new RectF(0, 0, dimsAfter[0], dimsAfter[1]); + RectF returnRect = new RectF(0, 0, mOutWidth, mOutHeight); + + Matrix m = new Matrix(); + if (mRotation == 0) { + m.setRectToRect(cropRect, returnRect, Matrix.ScaleToFit.FILL); + } else { + Matrix m1 = new Matrix(); + m1.setTranslate(-crop.getWidth() / 2f, -crop.getHeight() / 2f); + Matrix m2 = new Matrix(); + m2.setRotate(mRotation); + Matrix m3 = new Matrix(); + m3.setTranslate(dimsAfter[0] / 2f, dimsAfter[1] / 2f); + Matrix m4 = new Matrix(); + m4.setRectToRect(cropRect, returnRect, Matrix.ScaleToFit.FILL); + + Matrix c1 = new Matrix(); + c1.setConcat(m2, m1); + Matrix c2 = new Matrix(); + c2.setConcat(m4, m3); + m.setConcat(c2, c1); + } + + Bitmap tmp = Bitmap.createBitmap((int) returnRect.width(), + (int) returnRect.height(), Bitmap.Config.ARGB_8888); + if (tmp != null) { + Canvas c = new Canvas(tmp); + Paint p = new Paint(); + p.setFilterBitmap(true); + c.drawBitmap(crop, m, p); + crop = tmp; + } + } + + if (mSaveCroppedBitmap) { + mCroppedBitmap = crop; + } + + // Get output compression format + CompressFormat cf = + convertExtensionToCompressFormat(getFileExtension(mOutputFormat)); + + // Compress to byte array + ByteArrayOutputStream tmpOut = new ByteArrayOutputStream(2048); + if (crop.compress(cf, DEFAULT_COMPRESS_QUALITY, tmpOut)) { + // If we need to set to the wallpaper, set it + if (mSetWallpaper && wallpaperManager != null) { + try { + byte[] outByteArray = tmpOut.toByteArray(); + wallpaperManager.setKeyguardStream(new ByteArrayInputStream(outByteArray)); + if (mOnBitmapCroppedHandler != null) { + mOnBitmapCroppedHandler.onBitmapCropped(outByteArray); + } + } catch (IOException e) { + Log.w(TAG, "cannot write stream to wallpaper", e); + failure = true; + } + } + } else { + Log.w(TAG, "cannot compress bitmap"); + failure = true; + } + } else { + Log.w(TAG, "could not complete crop task because input stream is null"); + } + return !failure; // True if any of the operations failed + } + + @Override + protected Boolean doInBackground(Void... params) { + return cropBitmap(); + } + + @Override + protected void onPostExecute(Boolean result) { + if (mOnEndRunnable != null) { + mOnEndRunnable.run(); + } + } + } + + @Override + protected void setWallpaperStripYOffset(int offset) { + mWallpaperStrip.setPadding(0, 0, 0, offset); + } + + // called by onCreate; this is subclassed to overwrite WallpaperCropActivity + protected void init() { + setContentView(R.layout.wallpaper_picker); + + mCropView = (CropView) findViewById(R.id.cropView); + mWallpaperStrip = findViewById(R.id.wallpaper_strip); + mCropView.setTouchCallback(new CropView.TouchCallback() { + LauncherViewPropertyAnimator mAnim; + @Override + public void onTouchDown() { + if (mAnim != null) { + mAnim.cancel(); + } + if (mWallpaperStrip.getAlpha() == 1f) { + mIgnoreNextTap = true; + } + mAnim = new LauncherViewPropertyAnimator(mWallpaperStrip); + mAnim.alpha(0f) + .setDuration(150) + .addListener(new Animator.AnimatorListener() { + public void onAnimationStart(Animator animator) { } + public void onAnimationEnd(Animator animator) { + mWallpaperStrip.setVisibility(View.INVISIBLE); + } + public void onAnimationCancel(Animator animator) { } + public void onAnimationRepeat(Animator animator) { } + }); + mAnim.setInterpolator(new AccelerateInterpolator(0.75f)); + mAnim.start(); + } + @Override + public void onTouchUp() { + mIgnoreNextTap = false; + } + @Override + public void onTap() { + boolean ignoreTap = mIgnoreNextTap; + mIgnoreNextTap = false; + if (!ignoreTap) { + if (mAnim != null) { + mAnim.cancel(); + } + mWallpaperStrip.setVisibility(View.VISIBLE); + mAnim = new LauncherViewPropertyAnimator(mWallpaperStrip); + mAnim.alpha(1f) + .setDuration(150) + .setInterpolator(new DecelerateInterpolator(0.75f)); + mAnim.start(); + } + } + }); + + mThumbnailOnClickListener = new OnClickListener() { + public void onClick(View v) { + if (mActionMode != null) { + // When CAB is up, clicking toggles the item instead + if (v.isLongClickable()) { + mLongClickListener.onLongClick(v); + } + return; + } + WallpaperTileInfo info = (WallpaperTileInfo) v.getTag(); + if (info.isSelectable()) { + if (mSelectedThumb != null) { + mSelectedThumb.setSelected(false); + mSelectedThumb = null; + } + mSelectedThumb = v; + v.setSelected(true); + // TODO: Remove this once the accessibility framework and + // services have better support for selection state. + v.announceForAccessibility( + getString(R.string.announce_selection, v.getContentDescription())); + } + info.onClick(LockWallpaperPickerActivity.this); + } + }; + mLongClickListener = new View.OnLongClickListener() { + // Called when the user long-clicks on someView + public boolean onLongClick(View view) { + CheckableFrameLayout c = (CheckableFrameLayout) view; + c.toggle(); + + if (mActionMode != null) { + mActionMode.invalidate(); + } else { + // Start the CAB using the ActionMode.Callback defined below + mActionMode = startActionMode(mActionModeCallback); + int childCount = mWallpapersView.getChildCount(); + for (int i = 0; i < childCount; i++) { + mWallpapersView.getChildAt(i).setSelected(false); + } + } + return true; + } + }; + + mWallpapersView = (LinearLayout) findViewById(R.id.wallpaper_list); + + // Add a tile for the Gallery + LinearLayout masterWallpaperList = (LinearLayout) findViewById(R.id.master_wallpaper_list); + FrameLayout pickImageTile = (FrameLayout) getLayoutInflater(). + inflate(R.layout.wallpaper_picker_image_picker_item, masterWallpaperList, false); + setWallpaperItemPaddingToZero(pickImageTile); + masterWallpaperList.addView(pickImageTile, 0); + + // Add tile for clear image + FrameLayout clearImageTile = (FrameLayout) getLayoutInflater(). + inflate(R.layout.wallpaper_picker_clear, masterWallpaperList, false); + setWallpaperItemPaddingToZero(clearImageTile); + masterWallpaperList.addView(clearImageTile, 0); + + // theme LOCKSCREEN wallpapers + ArrayList<ThemeLockWallpaperInfo> themeLockWallpapers = findThemeLockWallpapers(); + ThemeLockWallpapersAdapter tla = new ThemeLockWallpapersAdapter(this, themeLockWallpapers); + populateWallpapersFromAdapter(mWallpapersView, tla, false, true); + + // theme wallpapers + ArrayList<ThemeWallpaperInfo> themeWallpapers = findThemeWallpapers(); + ThemeWallpapersAdapter ta = new ThemeWallpapersAdapter(this, themeWallpapers); + populateWallpapersFromAdapter(mWallpapersView, ta, false, true); + + // Populate the saved wallpapers + mSavedImages = new SavedWallpaperImages(this); + mSavedImages.loadThumbnailsAndImageIdList(); + populateWallpapersFromAdapter(mWallpapersView, mSavedImages, true, true); + + // Make its background the last photo taken on external storage + Bitmap lastPhoto = getThumbnailOfLastPhoto(); + if (lastPhoto != null) { + ImageView galleryThumbnailBg = + (ImageView) pickImageTile.findViewById(R.id.wallpaper_image); + galleryThumbnailBg.setImageBitmap(getThumbnailOfLastPhoto()); + int colorOverlay = getResources().getColor(R.color.wallpaper_picker_translucent_gray); + galleryThumbnailBg.setColorFilter(colorOverlay, PorterDuff.Mode.SRC_ATOP); + } + + PickImageInfo pickImageInfo = new PickImageInfo(); + pickImageTile.setTag(pickImageInfo); + pickImageInfo.setView(pickImageTile); + pickImageTile.setOnClickListener(mThumbnailOnClickListener); + pickImageInfo.setView(pickImageTile); + + UserDesktopWallpaperInfo clearImageInfo = new UserDesktopWallpaperInfo(); + clearImageTile.setTag(clearImageInfo); + clearImageInfo.setView(clearImageTile); + clearImageTile.setOnClickListener(mThumbnailOnClickListener); + clearImageInfo.setView(clearImageTile); + + updateTileIndices(); + + // Update the scroll for RTL + initializeScrollForRtl(); + + // Create smooth layout transitions for when items are deleted + final LayoutTransition transitioner = new LayoutTransition(); + transitioner.setDuration(200); + transitioner.setStartDelay(LayoutTransition.CHANGE_DISAPPEARING, 0); + transitioner.setAnimator(LayoutTransition.DISAPPEARING, null); + mWallpapersView.setLayoutTransition(transitioner); + + // Action bar + // Show the custom action bar view + final ActionBar actionBar = getActionBar(); + actionBar.setCustomView(R.layout.actionbar_set_wallpaper); + actionBar.getCustomView().setOnClickListener( + new View.OnClickListener() { + @Override + public void onClick(View v) { + if (mSelectedThumb != null) { + WallpaperTileInfo info = (WallpaperTileInfo) mSelectedThumb.getTag(); + info.onSave(LockWallpaperPickerActivity.this); + } + } + }); + + // CAB for deleting items + mActionModeCallback = new ActionMode.Callback() { + // Called when the action mode is created; startActionMode() was called + @Override + public boolean onCreateActionMode(ActionMode mode, Menu menu) { + // Inflate a menu resource providing context menu items + MenuInflater inflater = mode.getMenuInflater(); + inflater.inflate(R.menu.cab_delete_wallpapers, menu); + return true; + } + + private int numCheckedItems() { + int childCount = mWallpapersView.getChildCount(); + int numCheckedItems = 0; + for (int i = 0; i < childCount; i++) { + CheckableFrameLayout c = (CheckableFrameLayout) mWallpapersView.getChildAt(i); + if (c.isChecked()) { + numCheckedItems++; + } + } + return numCheckedItems; + } + + // Called each time the action mode is shown. Always called after onCreateActionMode, + // but may be called multiple times if the mode is invalidated. + @Override + public boolean onPrepareActionMode(ActionMode mode, Menu menu) { + int numCheckedItems = numCheckedItems(); + if (numCheckedItems == 0) { + mode.finish(); + return true; + } else { + mode.setTitle(getResources().getQuantityString( + R.plurals.number_of_items_selected, numCheckedItems, numCheckedItems)); + return true; + } + } + + // Called when the user selects a contextual menu item + @Override + public boolean onActionItemClicked(ActionMode mode, MenuItem item) { + int itemId = item.getItemId(); + if (itemId == R.id.menu_delete) { + int childCount = mWallpapersView.getChildCount(); + ArrayList<View> viewsToRemove = new ArrayList<View>(); + for (int i = 0; i < childCount; i++) { + CheckableFrameLayout c = + (CheckableFrameLayout) mWallpapersView.getChildAt(i); + if (c.isChecked()) { + WallpaperTileInfo info = (WallpaperTileInfo) c.getTag(); + info.onDelete(LockWallpaperPickerActivity.this); + viewsToRemove.add(c); + } + } + for (View v : viewsToRemove) { + mWallpapersView.removeView(v); + } + updateTileIndices(); + mode.finish(); // Action picked, so close the CAB + return true; + } else { + return false; + } + } + + // Called when the user exits the action mode + @Override + public void onDestroyActionMode(ActionMode mode) { + int childCount = mWallpapersView.getChildCount(); + for (int i = 0; i < childCount; i++) { + CheckableFrameLayout c = (CheckableFrameLayout) mWallpapersView.getChildAt(i); + c.setChecked(false); + } + mSelectedThumb.setSelected(true); + mActionMode = null; + } + }; + } + + private void initializeScrollForRtl() { + final HorizontalScrollView scroll = + (HorizontalScrollView) findViewById(R.id.wallpaper_scroll_container); + + if (scroll.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL) { + final ViewTreeObserver observer = scroll.getViewTreeObserver(); + observer.addOnGlobalLayoutListener(new OnGlobalLayoutListener() { + public void onGlobalLayout() { + LinearLayout masterWallpaperList = + (LinearLayout) findViewById(R.id.master_wallpaper_list); + scroll.scrollTo(masterWallpaperList.getWidth(), 0); + scroll.getViewTreeObserver().removeOnGlobalLayoutListener(this); + } + }); + } + } + + public boolean enableRotation() { + return super.enableRotation() || Launcher.sForceEnableRotation; + } + + protected Bitmap getThumbnailOfLastPhoto() { + Cursor cursor = MediaStore.Images.Media.query(getContentResolver(), + MediaStore.Images.Media.EXTERNAL_CONTENT_URI, + new String[] { MediaStore.Images.ImageColumns._ID, + MediaStore.Images.ImageColumns.DATE_TAKEN}, + null, null, MediaStore.Images.ImageColumns.DATE_TAKEN + " DESC LIMIT 1"); + Bitmap thumb = null; + if (cursor != null) { + if (cursor.moveToFirst()) { + int id = cursor.getInt(0); + thumb = MediaStore.Images.Thumbnails.getThumbnail(getContentResolver(), + id, MediaStore.Images.Thumbnails.MINI_KIND, null); + } + cursor.close(); + } + return thumb; + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + return super.onCreateOptionsMenu(menu); + } + + @Override + public boolean onPrepareOptionsMenu(Menu menu) { + return super.onPrepareOptionsMenu(menu); + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + // Handle presses on the action bar items + switch (item.getItemId()) { + default: + return super.onOptionsItemSelected(item); + } + } + + protected void onStop() { + super.onStop(); + mWallpaperStrip = findViewById(R.id.wallpaper_strip); + if (mWallpaperStrip.getAlpha() < 1f) { + mWallpaperStrip.setAlpha(1f); + mWallpaperStrip.setVisibility(View.VISIBLE); + } + } + + @Override + protected void onDestroy() { + mWallpapersView.removeAllViews(); + super.onDestroy(); + } + + protected void onSaveInstanceState(Bundle outState) { + outState.putParcelableArrayList(TEMP_WALLPAPER_TILES, mTempWallpaperTiles); + } + + protected void onRestoreInstanceState(Bundle savedInstanceState) { + ArrayList<Uri> uris = savedInstanceState.getParcelableArrayList(TEMP_WALLPAPER_TILES); + for (Uri uri : uris) { + addTemporaryWallpaperTile(uri); + } + } + + private void populateWallpapersFromAdapter(ViewGroup parent, BaseAdapter adapter, + boolean addLongPressHandler, boolean selectFirstTile) { + for (int i = 0; i < adapter.getCount(); i++) { + FrameLayout thumbnail = (FrameLayout) adapter.getView(i, null, parent); + parent.addView(thumbnail, i); + WallpaperTileInfo info = (WallpaperTileInfo) adapter.getItem(i); + thumbnail.setTag(info); + info.setView(thumbnail); + if (addLongPressHandler) { + addLongPressHandler(thumbnail); + } + thumbnail.setOnClickListener(mThumbnailOnClickListener); + if (i == 0 && selectFirstTile) { + mThumbnailOnClickListener.onClick(thumbnail); + } + } + } + + private void updateTileIndices() { + LinearLayout masterWallpaperList = (LinearLayout) findViewById(R.id.master_wallpaper_list); + final int childCount = masterWallpaperList.getChildCount(); + final Resources res = getResources(); + + // Do two passes; the first pass gets the total number of tiles + int numTiles = 0; + for (int passNum = 0; passNum < 2; passNum++) { + int tileIndex = 0; + for (int i = 0; i < childCount; i++) { + View child = masterWallpaperList.getChildAt(i); + LinearLayout subList; + + int subListStart; + int subListEnd; + if (child.getTag() instanceof WallpaperTileInfo) { + subList = masterWallpaperList; + subListStart = i; + subListEnd = i + 1; + } else { // if (child instanceof LinearLayout) { + subList = (LinearLayout) child; + subListStart = 0; + subListEnd = subList.getChildCount(); + } + + for (int j = subListStart; j < subListEnd; j++) { + WallpaperTileInfo info = (WallpaperTileInfo) subList.getChildAt(j).getTag(); + if (info.isNamelessWallpaper()) { + if (passNum == 0) { + numTiles++; + } else { + CharSequence label = res.getString( + R.string.wallpaper_accessibility_name, ++tileIndex, numTiles); + info.onIndexUpdated(label); + } + } + } + } + } + } + + private static Point getDefaultThumbnailSize(Resources res) { + return new Point(res.getDimensionPixelSize(R.dimen.wallpaperThumbnailWidth), + res.getDimensionPixelSize(R.dimen.wallpaperThumbnailHeight)); + } + + private static Bitmap createThumbnail(Point size, Context context, Uri uri, byte[] imageBytes, + Resources res, int resId, int rotation, boolean leftAligned) { + int width = size.x; + int height = size.y; + + BitmapCropTask cropTask; + if (uri != null) { + cropTask = new BitmapCropTask( + context, uri, null, rotation, width, height, false, true, null); + } else if (imageBytes != null) { + cropTask = new BitmapCropTask( + imageBytes, null, rotation, width, height, false, true, null); + } else { + cropTask = new BitmapCropTask( + context, res, resId, null, rotation, width, height, false, true, null); + } + Point bounds = cropTask.getImageBounds(); + if (bounds == null || bounds.x == 0 || bounds.y == 0) { + return null; + } + + Matrix rotateMatrix = new Matrix(); + rotateMatrix.setRotate(rotation); + float[] rotatedBounds = new float[] { bounds.x, bounds.y }; + rotateMatrix.mapPoints(rotatedBounds); + rotatedBounds[0] = Math.abs(rotatedBounds[0]); + rotatedBounds[1] = Math.abs(rotatedBounds[1]); + + RectF cropRect = WallpaperCropActivity.getMaxCropRect( + (int) rotatedBounds[0], (int) rotatedBounds[1], width, height, leftAligned); + cropTask.setCropBounds(cropRect); + + if (cropTask.cropBitmap()) { + return cropTask.getCroppedBitmap(); + } else { + return null; + } + } + + private void addTemporaryWallpaperTile(Uri uri) { + mTempWallpaperTiles.add(uri); + // Add a tile for the image picked from Gallery + FrameLayout pickedImageThumbnail = (FrameLayout) getLayoutInflater(). + inflate(R.layout.wallpaper_picker_item, mWallpapersView, false); + setWallpaperItemPaddingToZero(pickedImageThumbnail); + + // Load the thumbnail + ImageView image = (ImageView) pickedImageThumbnail.findViewById(R.id.wallpaper_image); + Point defaultSize = getDefaultThumbnailSize(this.getResources()); + int rotation = WallpaperCropActivity.getRotationFromExif(this, uri); + Bitmap thumb = createThumbnail(defaultSize, this, uri, null, null, 0, rotation, false); + if (thumb != null) { + image.setImageBitmap(thumb); + Drawable thumbDrawable = image.getDrawable(); + thumbDrawable.setDither(true); + } else { + Log.e(TAG, "Error loading thumbnail for uri=" + uri); + } + mWallpapersView.addView(pickedImageThumbnail, 0); + + UriWallpaperInfo info = new UriWallpaperInfo(uri); + pickedImageThumbnail.setTag(info); + info.setView(pickedImageThumbnail); + addLongPressHandler(pickedImageThumbnail); + updateTileIndices(); + pickedImageThumbnail.setOnClickListener(mThumbnailOnClickListener); + mThumbnailOnClickListener.onClick(pickedImageThumbnail); + } + + protected void onActivityResult(int requestCode, int resultCode, Intent data) { + if (requestCode == IMAGE_PICK && resultCode == RESULT_OK) { + if (data != null && data.getData() != null) { + Uri uri = data.getData(); + addTemporaryWallpaperTile(uri); + } + } else if (requestCode == PICK_WALLPAPER_THIRD_PARTY_ACTIVITY) { + setResult(RESULT_OK); + finish(); + } + } + + static void setWallpaperItemPaddingToZero(FrameLayout frameLayout) { + frameLayout.setPadding(0, 0, 0, 0); + frameLayout.setForeground(new ZeroPaddingDrawable(frameLayout.getForeground())); + } + + private void addLongPressHandler(View v) { + v.setOnLongClickListener(mLongClickListener); + } + + private ArrayList<ThemeWallpaperInfo> findThemeWallpapers() { + ArrayList<ThemeWallpaperInfo> themeWallpapers = + new ArrayList<ThemeWallpaperInfo>(); + ContentResolver cr = getContentResolver(); + String[] projection = { ThemesColumns.PKG_NAME, ThemesColumns.IS_LEGACY_THEME }; + String selection = ThemesColumns.MODIFIES_LAUNCHER + "=? AND " + + ThemesColumns.PKG_NAME + "!=?"; + String[] selectoinArgs = {"1", "default"}; + String sortOrder = null; + Cursor c = cr.query(ThemesColumns.CONTENT_URI, projection, selection, + selectoinArgs, sortOrder); + if (c != null) { + Bitmap bmp; + while (c.moveToNext()) { + String pkgName = c.getString(c.getColumnIndexOrThrow(ThemesColumns.PKG_NAME)); + boolean isLegacy = c.getInt(c.getColumnIndexOrThrow( + ThemesColumns.IS_LEGACY_THEME)) == 1; + bmp = getThemeWallpaper(this, "wallpapers", pkgName, isLegacy, true /* thumb*/); + themeWallpapers.add( + new ThemeWallpaperInfo(this, pkgName, isLegacy, + new BitmapDrawable(getResources(), bmp))); + if (bmp != null) { + Log.d("", String.format("Loaded bitmap of size %dx%d for %s", + bmp.getWidth(), bmp.getHeight(), pkgName)); + } + } + c.close(); + } + return themeWallpapers; + } + + private ArrayList<ThemeLockWallpaperInfo> findThemeLockWallpapers() { + ArrayList<ThemeLockWallpaperInfo> themeWallpapers = + new ArrayList<ThemeLockWallpaperInfo>(); + ContentResolver cr = getContentResolver(); + String[] projection = { ThemesColumns.PKG_NAME }; + String selection = ThemesColumns.MODIFIES_LOCKSCREEN + "=? AND " + + ThemesColumns.PKG_NAME + "!=?"; + String[] selectoinArgs = {"1", "default"}; + String sortOrder = null; + Cursor c = cr.query(ThemesColumns.CONTENT_URI, projection, selection, + selectoinArgs, sortOrder); + if (c != null) { + Bitmap bmp; + while (c.moveToNext()) { + String pkgName = c.getString(c.getColumnIndexOrThrow(ThemesColumns.PKG_NAME)); + bmp = getThemeWallpaper(this, "lockscreen", pkgName, false, true /* thumb*/); + themeWallpapers.add( + new ThemeLockWallpaperInfo(this, pkgName, + new BitmapDrawable(getResources(), bmp))); + if (bmp != null) { + Log.d("", String.format("Loaded bitmap of size %dx%d for %s", + bmp.getWidth(), bmp.getHeight(), pkgName)); + } + } + c.close(); + } + return themeWallpapers; + } + + public Pair<ApplicationInfo, Integer> getWallpaperArrayResourceId() { + // Context.getPackageName() may return the "original" package name, + // com.android.launcher3; Resources needs the real package name, + // com.android.launcher3. So we ask Resources for what it thinks the + // package name should be. + final String packageName = getResources().getResourcePackageName(R.array.wallpapers); + try { + ApplicationInfo info = getPackageManager().getApplicationInfo(packageName, 0); + return new Pair<ApplicationInfo, Integer>(info, R.array.wallpapers); + } catch (PackageManager.NameNotFoundException e) { + return null; + } + } + + public CropView getCropView() { + return mCropView; + } + + public SavedWallpaperImages getSavedImages() { + return mSavedImages; + } + + static class ZeroPaddingDrawable extends LevelListDrawable { + public ZeroPaddingDrawable(Drawable d) { + super(); + addLevel(0, 0, d); + setLevel(0); + } + + @Override + public boolean getPadding(Rect padding) { + padding.set(0, 0, 0, 0); + return true; + } + } + + private static class ThemeLockWallpapersAdapter extends BaseAdapter implements ListAdapter { + private LayoutInflater mLayoutInflater; + private ArrayList<ThemeLockWallpaperInfo> mWallpapers; + + ThemeLockWallpapersAdapter(Activity activity, ArrayList<ThemeLockWallpaperInfo> wallpapers) { + mLayoutInflater = activity.getLayoutInflater(); + mWallpapers = wallpapers; + } + + public int getCount() { + return mWallpapers.size(); + } + + public ThemeLockWallpaperInfo getItem(int position) { + return mWallpapers.get(position); + } + + public long getItemId(int position) { + return position; + } + + public View getView(int position, View convertView, ViewGroup parent) { + Drawable thumb = mWallpapers.get(position).mThumb; + if (thumb == null) { + Log.e(TAG, "Error decoding thumbnail for wallpaper #" + position); + } + return createImageTileView(mLayoutInflater, position, convertView, parent, thumb); + } + } + + private static class ThemeWallpapersAdapter extends BaseAdapter implements ListAdapter { + private LayoutInflater mLayoutInflater; + private ArrayList<ThemeWallpaperInfo> mWallpapers; + + ThemeWallpapersAdapter(Activity activity, ArrayList<ThemeWallpaperInfo> wallpapers) { + mLayoutInflater = activity.getLayoutInflater(); + mWallpapers = wallpapers; + } + + public int getCount() { + return mWallpapers.size(); + } + + public ThemeWallpaperInfo getItem(int position) { + return mWallpapers.get(position); + } + + public long getItemId(int position) { + return position; + } + + public View getView(int position, View convertView, ViewGroup parent) { + Drawable thumb = mWallpapers.get(position).mThumb; + if (thumb == null) { + Log.e(TAG, "Error decoding thumbnail for wallpaper #" + position); + } + return createImageTileView(mLayoutInflater, position, convertView, parent, thumb); + } + } + + public static View createImageTileView(LayoutInflater layoutInflater, int position, + View convertView, ViewGroup parent, Drawable thumb) { + View view; + + if (convertView == null) { + view = layoutInflater.inflate(R.layout.wallpaper_picker_item, parent, false); + } else { + view = convertView; + } + + setWallpaperItemPaddingToZero((FrameLayout) view); + + ImageView image = (ImageView) view.findViewById(R.id.wallpaper_image); + + if (thumb != null) { + image.setImageDrawable(thumb); + thumb.setDither(true); + } + + return view; + } + + private static Bitmap getThemeWallpaper(Context context, String path, String pkgName, + boolean legacyTheme, boolean thumb) { + if (legacyTheme) { + return getLegacyThemeWallpaper(context, pkgName, thumb); + } + InputStream is = null; + try { + Resources res = context.getPackageManager().getResourcesForApplication(pkgName); + if (res == null) { + return null; + } + + AssetManager am = res.getAssets(); + String[] wallpapers = am.list(path); + if (wallpapers == null || wallpapers.length == 0) { + return null; + } + is = am.open(path + File.separator + wallpapers[0]); + + BitmapFactory.Options bounds = new BitmapFactory.Options(); + bounds.inJustDecodeBounds = true; + BitmapFactory.decodeStream(is, null, bounds); + if ((bounds.outWidth == -1) || (bounds.outHeight == -1)) + return null; + + int originalSize = (bounds.outHeight > bounds.outWidth) ? bounds.outHeight + : bounds.outWidth; + Point outSize; + + if (thumb) { + outSize = getDefaultThumbnailSize(context.getResources()); + } else { + outSize = getDefaultWallpaperSize(res, ((Activity) context).getWindowManager()); + } + int thumbSampleSize = (outSize.y > outSize.x) ? outSize.y : outSize.x; + + BitmapFactory.Options opts = new BitmapFactory.Options(); + opts.inSampleSize = originalSize / thumbSampleSize; + return BitmapFactory.decodeStream(is, null, opts); + } catch (IOException e) { + return null; + } catch (NameNotFoundException e) { + return null; + } catch (OutOfMemoryError e) { + return null; + } finally { + if (is != null) { + try { + is.close(); + } catch (IOException e) { + } + } + } + } + + private static Bitmap getLegacyThemeWallpaper(Context context, String pkgName, boolean thumb) { + try { + final PackageManager pm = context.getPackageManager(); + PackageInfo pi = pm.getPackageInfo(pkgName, 0); + Resources res = context.getPackageManager().getResourcesForApplication(pkgName); + + if (pi == null || res == null) { + return null; + } + int resId = pi.legacyThemeInfos[0].wallpaperResourceId; + + BitmapFactory.Options opts = new BitmapFactory.Options(); + opts.inJustDecodeBounds = true; + BitmapFactory.decodeResource(res, resId, opts); + if ((opts.outWidth == -1) || (opts.outHeight == -1)) + return null; + + int originalSize = (opts.outHeight > opts.outWidth) ? opts.outHeight + : opts.outWidth; + Point outSize; + if (thumb) { + outSize = getDefaultThumbnailSize(context.getResources()); + } else { + outSize = getDefaultWallpaperSize(res, ((Activity) context).getWindowManager()); + } + int thumbSampleSize = (outSize.y > outSize.x) ? outSize.y : outSize.x; + + opts.inJustDecodeBounds = false; + opts.inSampleSize = originalSize / thumbSampleSize; + + return BitmapFactory.decodeResource(res, resId, opts); + } catch (NameNotFoundException e) { + return null; + } catch (OutOfMemoryError e1) { + return null; + } + } +} diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java index 59b62604c..37cd1e9ca 100644 --- a/src/com/android/launcher3/PagedView.java +++ b/src/com/android/launcher3/PagedView.java @@ -2545,6 +2545,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc protected void onEndReordering() { mIsReordering = false; + mDragView = null; } public boolean startReordering(View v) { diff --git a/src/com/android/launcher3/SavedWallpaperImages.java b/src/com/android/launcher3/SavedWallpaperImages.java index 8d5b00535..a418b8f5c 100644 --- a/src/com/android/launcher3/SavedWallpaperImages.java +++ b/src/com/android/launcher3/SavedWallpaperImages.java @@ -49,7 +49,7 @@ public class SavedWallpaperImages extends BaseAdapter implements ListAdapter { Context mContext; LayoutInflater mLayoutInflater; - public static class SavedWallpaperTile extends WallpaperPickerActivity.WallpaperTileInfo { + public static class SavedWallpaperTile extends WallpaperCropActivity.WallpaperTileInfo { private int mDbId; private Drawable mThumb; public SavedWallpaperTile(int dbId, Drawable thumb) { @@ -57,7 +57,7 @@ public class SavedWallpaperImages extends BaseAdapter implements ListAdapter { mThumb = thumb; } @Override - public void onClick(WallpaperPickerActivity a) { + public void onClick(WallpaperCropActivity a) { String imageFilename = a.getSavedImages().getImageFilename(mDbId); File file = new File(a.getFilesDir(), imageFilename); CropView v = a.getCropView(); @@ -68,13 +68,13 @@ public class SavedWallpaperImages extends BaseAdapter implements ListAdapter { v.setTouchEnabled(false); } @Override - public void onSave(WallpaperPickerActivity a) { + public void onSave(WallpaperCropActivity a) { boolean finishActivityWhenDone = true; String imageFilename = a.getSavedImages().getImageFilename(mDbId); a.setWallpaper(imageFilename, finishActivityWhenDone); } @Override - public void onDelete(WallpaperPickerActivity a) { + public void onDelete(WallpaperCropActivity a) { a.getSavedImages().deleteImage(mDbId); } @Override diff --git a/src/com/android/launcher3/ThirdPartyWallpaperPickerListAdapter.java b/src/com/android/launcher3/ThirdPartyWallpaperPickerListAdapter.java index 494694cbd..81cd5a0f0 100644 --- a/src/com/android/launcher3/ThirdPartyWallpaperPickerListAdapter.java +++ b/src/com/android/launcher3/ThirdPartyWallpaperPickerListAdapter.java @@ -51,7 +51,7 @@ public class ThirdPartyWallpaperPickerListAdapter extends BaseAdapter implements mResolveInfo = resolveInfo; } @Override - public void onClick(WallpaperPickerActivity a) { + public void onClick(WallpaperCropActivity a) { final ComponentName itemComponentName = new ComponentName( mResolveInfo.activityInfo.packageName, mResolveInfo.activityInfo.name); Intent launchIntent = new Intent(Intent.ACTION_SET_WALLPAPER); diff --git a/src/com/android/launcher3/WallpaperCropActivity.java b/src/com/android/launcher3/WallpaperCropActivity.java index 30ec340b1..5796a5ddd 100644 --- a/src/com/android/launcher3/WallpaperCropActivity.java +++ b/src/com/android/launcher3/WallpaperCropActivity.java @@ -59,7 +59,7 @@ public class WallpaperCropActivity extends Activity { protected static final String WALLPAPER_WIDTH_KEY = "wallpaper.width"; protected static final String WALLPAPER_HEIGHT_KEY = "wallpaper.height"; - private static final int DEFAULT_COMPRESS_QUALITY = 90; + protected static final int DEFAULT_COMPRESS_QUALITY = 90; /** * The maximum bitmap size we allow to be returned through the intent. * Intents have a maximum of 1MB in total size. However, the Bitmap seems to @@ -68,11 +68,28 @@ public class WallpaperCropActivity extends Activity { * array instead of a Bitmap instance to avoid overhead. */ public static final int MAX_BMAP_IN_INTENT = 750000; - private static final float WALLPAPER_SCREENS_SPAN = 2f; + protected static final float WALLPAPER_SCREENS_SPAN = 2f; protected CropView mCropView; protected Uri mUri; + public static abstract class WallpaperTileInfo { + protected View mView; + public void setView(View v) { + mView = v; + } + public void onClick(WallpaperCropActivity a) {} + public void onSave(WallpaperCropActivity a) {} + public void onDelete(WallpaperCropActivity a) {} + public boolean isSelectable() { return false; } + public boolean isNamelessWallpaper() { return false; } + public void onIndexUpdated(CharSequence label) { + if (isNamelessWallpaper()) { + mView.setContentDescription(label); + } + } + } + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -123,7 +140,7 @@ public class WallpaperCropActivity extends Activity { // As a ratio of screen height, the total distance we want the parallax effect to span // horizontally - private static float wallpaperTravelToScreenWidthRatio(int width, int height) { + protected static float wallpaperTravelToScreenWidthRatio(int width, int height) { float aspectRatio = width / (float) height; // At an aspect ratio of 16/10, the wallpaper parallax effect should span 1.5 * screen width @@ -210,6 +227,8 @@ public class WallpaperCropActivity extends Activity { } } catch (IOException e) { Log.w(LOGTAG, "Getting exif data failed", e); + } catch (NullPointerException e) { + Log.w(LOGTAG, "Getting exif data failed", e); } return 0; } @@ -259,7 +278,7 @@ public class WallpaperCropActivity extends Activity { cropTask.execute(); } - private static boolean isScreenLarge(Resources res) { + protected static boolean isScreenLarge(Resources res) { Configuration config = res.getConfiguration(); return config.smallestScreenWidthDp >= 720; } @@ -752,4 +771,23 @@ public class WallpaperCropActivity extends Activity { ? "png" // We don't support gif compression. : "jpg"; } + + protected void setWallpaperStripYOffset(int bottom) { + // + } + + protected SavedWallpaperImages getSavedImages() { + // for subclasses + throw new UnsupportedOperationException("Not implemented for WallpaperCropActivity"); + } + + protected CropView getCropView() { + // for subclasses + throw new UnsupportedOperationException("Not implemented for WallpaperCropActivity"); + } + + protected void onLiveWallpaperPickerLaunch() { + // for subclasses + throw new UnsupportedOperationException("Not implemented for WallpaperCropActivity"); + } } diff --git a/src/com/android/launcher3/WallpaperPickerActivity.java b/src/com/android/launcher3/WallpaperPickerActivity.java index d1c616028..3502043ea 100644 --- a/src/com/android/launcher3/WallpaperPickerActivity.java +++ b/src/com/android/launcher3/WallpaperPickerActivity.java @@ -102,29 +102,12 @@ public class WallpaperPickerActivity extends WallpaperCropActivity { private SavedWallpaperImages mSavedImages; private WallpaperInfo mLiveWallpaperInfoOnPickerLaunch; - public static abstract class WallpaperTileInfo { - protected View mView; - public void setView(View v) { - mView = v; - } - public void onClick(WallpaperPickerActivity a) {} - public void onSave(WallpaperPickerActivity a) {} - public void onDelete(WallpaperPickerActivity a) {} - public boolean isSelectable() { return false; } - public boolean isNamelessWallpaper() { return false; } - public void onIndexUpdated(CharSequence label) { - if (isNamelessWallpaper()) { - mView.setContentDescription(label); - } - } - } - public static class PickImageInfo extends WallpaperTileInfo { @Override - public void onClick(WallpaperPickerActivity a) { + public void onClick(WallpaperCropActivity a) { Intent intent = new Intent(Intent.ACTION_GET_CONTENT); intent.setType("image/*"); - Utilities.startActivityForResultSafely(a, intent, IMAGE_PICK); + Utilities.startActivityForResultSafely(((WallpaperPickerActivity)a), intent, IMAGE_PICK); } } @@ -134,14 +117,14 @@ public class WallpaperPickerActivity extends WallpaperCropActivity { mUri = uri; } @Override - public void onClick(WallpaperPickerActivity a) { + public void onClick(WallpaperCropActivity a) { CropView v = a.getCropView(); int rotation = WallpaperCropActivity.getRotationFromExif(a, mUri); v.setTileSource(new BitmapRegionTileSource(a, mUri, 1024, rotation), null); v.setTouchEnabled(true); } @Override - public void onSave(final WallpaperPickerActivity a) { + public void onSave(final WallpaperCropActivity a) { boolean finishActivityWhenDone = true; OnBitmapCroppedHandler h = new OnBitmapCroppedHandler() { public void onBitmapCropped(byte[] imageBytes) { @@ -149,10 +132,10 @@ public class WallpaperPickerActivity extends WallpaperCropActivity { // rotation is set to 0 since imageBytes has already been correctly rotated Bitmap thumb = createThumbnail( thumbSize, null, null, imageBytes, null, 0, 0, true); - a.getSavedImages().writeImage(thumb, imageBytes); + ((WallpaperPickerActivity)a).getSavedImages().writeImage(thumb, imageBytes); } }; - a.cropImageAndSetWallpaper(mUri, h, finishActivityWhenDone); + ((WallpaperPickerActivity)a).cropImageAndSetWallpaper(mUri, h, finishActivityWhenDone); } @Override public boolean isSelectable() { @@ -175,7 +158,7 @@ public class WallpaperPickerActivity extends WallpaperCropActivity { mThumb = thumb; } @Override - public void onClick(WallpaperPickerActivity a) { + public void onClick(WallpaperCropActivity a) { int rotation = WallpaperCropActivity.getRotationFromExif(mResources, mResId); BitmapRegionTileSource source = new BitmapRegionTileSource( mResources, a, mResId, 1024, rotation); @@ -190,9 +173,9 @@ public class WallpaperPickerActivity extends WallpaperCropActivity { v.setTouchEnabled(false); } @Override - public void onSave(WallpaperPickerActivity a) { + public void onSave(WallpaperCropActivity a) { boolean finishActivityWhenDone = true; - a.cropImageAndSetWallpaper(mResources, mResId, finishActivityWhenDone); + ((WallpaperPickerActivity)a).cropImageAndSetWallpaper(mResources, mResId, finishActivityWhenDone); } @Override public boolean isSelectable() { @@ -204,8 +187,9 @@ public class WallpaperPickerActivity extends WallpaperCropActivity { } } - public void setWallpaperStripYOffset(float offset) { - mWallpaperStrip.setPadding(0, 0, 0, (int) offset); + @Override + protected void setWallpaperStripYOffset(int offset) { + mWallpaperStrip.setPadding(0, 0, 0, offset); } // called by onCreate; this is subclassed to overwrite WallpaperCropActivity diff --git a/src/com/android/launcher3/WallpaperRootView.java b/src/com/android/launcher3/WallpaperRootView.java index ceaa043a7..7b0d4f147 100644 --- a/src/com/android/launcher3/WallpaperRootView.java +++ b/src/com/android/launcher3/WallpaperRootView.java @@ -22,14 +22,14 @@ import android.util.AttributeSet; import android.widget.RelativeLayout; public class WallpaperRootView extends RelativeLayout { - private final WallpaperPickerActivity a; + private final WallpaperCropActivity a; public WallpaperRootView(Context context, AttributeSet attrs) { super(context, attrs); - a = (WallpaperPickerActivity) context; + a = (WallpaperCropActivity) context; } public WallpaperRootView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); - a = (WallpaperPickerActivity) context; + a = (WallpaperCropActivity) context; } protected boolean fitSystemWindows(Rect insets) { diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 83074aeda..37bd8aa73 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -315,7 +315,7 @@ public class Workspace extends SmoothPagedView R.bool.preferences_interface_homescreen_scrolling_page_outlines_default); mHideIconLabels = SettingsProvider.getBoolean(context, SettingsProvider.SETTINGS_UI_HOMESCREEN_HIDE_ICON_LABELS, - R.bool.preferences_interface_homescreen_hide_icon_labels); + R.bool.preferences_interface_homescreen_hide_icon_labels_default); mWorkspaceFadeInAdjacentScreens = SettingsProvider.getBoolean(context, SettingsProvider.SETTINGS_UI_HOMESCREEN_SCROLLING_FADE_ADJACENT, R.bool.preferences_interface_homescreen_scrolling_fade_adjacent_default); @@ -2878,7 +2878,9 @@ public class Workspace extends SmoothPagedView final ItemInfo info = (ItemInfo) cell.getTag(); if (hasMovedLayouts) { // Reparent the view - getParentCellLayoutForView(cell).removeView(cell); + CellLayout parent = getParentCellLayoutForView(cell); + if (parent != null) + parent.removeView(cell); addInScreen(cell, container, screenId, mTargetCell[0], mTargetCell[1], info.spanX, info.spanY); } diff --git a/src/com/android/photos/BitmapRegionTileSource.java b/src/com/android/photos/BitmapRegionTileSource.java index 5f6401868..4d1a84ed7 100644 --- a/src/com/android/photos/BitmapRegionTileSource.java +++ b/src/com/android/photos/BitmapRegionTileSource.java @@ -18,6 +18,7 @@ package com.android.photos; import android.annotation.TargetApi; import android.content.Context; +import android.content.res.AssetManager; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.Bitmap.Config; @@ -36,6 +37,7 @@ import com.android.gallery3d.glrenderer.BitmapTexture; import com.android.photos.views.TiledImageRenderer; import java.io.BufferedInputStream; +import java.io.File; import java.io.IOException; import java.io.InputStream; @@ -69,25 +71,38 @@ public class BitmapRegionTileSource implements TiledImageRenderer.TileSource { private Canvas mCanvas; public BitmapRegionTileSource(Context context, String path, int previewSize, int rotation) { - this(null, context, path, null, 0, previewSize, rotation); + this(null, context, path, null, 0, previewSize, rotation, false); + } + + public BitmapRegionTileSource(Resources res, Context context, String path, int previewSize, int rotation, boolean assetPath) { + this(res, context, path, null, 0, previewSize, rotation, assetPath); } public BitmapRegionTileSource(Context context, Uri uri, int previewSize, int rotation) { - this(null, context, null, uri, 0, previewSize, rotation); + this(null, context, null, uri, 0, previewSize, rotation, false); } public BitmapRegionTileSource(Resources res, Context context, int resId, int previewSize, int rotation) { - this(res, context, null, null, resId, previewSize, rotation); + this(res, context, null, null, resId, previewSize, rotation, false); } private BitmapRegionTileSource(Resources res, - Context context, String path, Uri uri, int resId, int previewSize, int rotation) { + Context context, String path, Uri uri, int resId, int previewSize, int rotation, boolean assetPath) { mTileSize = TiledImageRenderer.suggestedTileSize(context); mRotation = rotation; try { - if (path != null) { + if (path != null && !assetPath) { mDecoder = BitmapRegionDecoder.newInstance(path, true); + } else if (path != null && res != null && assetPath) { + AssetManager am = res.getAssets(); + String[] pathImages = am.list(path); + if (pathImages == null || pathImages.length == 0) { + throw new IOException("did not find any images in path: " + path); + } + InputStream is = am.open(path + File.separator + pathImages[0]); + BufferedInputStream bis = new BufferedInputStream(is); + mDecoder = BitmapRegionDecoder.newInstance(bis, true); } else if (uri != null) { InputStream is = context.getContentResolver().openInputStream(uri); BufferedInputStream bis = new BufferedInputStream(is); @@ -111,7 +126,7 @@ public class BitmapRegionTileSource implements TiledImageRenderer.TileSource { // Although this is the same size as the Bitmap that is likely already // loaded, the lifecycle is different and interactions are on a different // thread. Thus to simplify, this source will decode its own bitmap. - Bitmap preview = decodePreview(res, context, path, uri, resId, previewSize); + Bitmap preview = decodePreview(res, context, path, uri, resId, previewSize, assetPath); if (preview.getWidth() <= GL_SIZE_LIMIT && preview.getHeight() <= GL_SIZE_LIMIT) { mPreview = new BitmapTexture(preview); } else { @@ -216,13 +231,26 @@ public class BitmapRegionTileSource implements TiledImageRenderer.TileSource { * than the targetSize, but it will always be less than 2x the targetSize */ private Bitmap decodePreview( - Resources res, Context context, String file, Uri uri, int resId, int targetSize) { + Resources res, Context context, String file, Uri uri, int resId, int targetSize, boolean assetPath) { float scale = (float) targetSize / Math.max(mWidth, mHeight); mOptions.inSampleSize = BitmapUtils.computeSampleSizeLarger(scale); mOptions.inJustDecodeBounds = false; Bitmap result = null; - if (file != null) { + if (file != null && res != null && assetPath) { + try { + AssetManager am = res.getAssets(); + String[] pathImages = am.list(file); + if (pathImages == null || pathImages.length == 0) { + throw new IOException("did not find any images in path: " + file); + } + InputStream is = am.open(file + File.separator + pathImages[0]); + BufferedInputStream bis = new BufferedInputStream(is); + result = BitmapFactory.decodeStream(bis, null, mOptions); + } catch (IOException e) { + Log.w("BitmapRegionTileSource", "getting preview failed", e); + } + } else if (file != null) { result = BitmapFactory.decodeFile(file, mOptions); } else if (uri != null) { try { |