resolve merge conflicts of f82aba0 to nyc-mr1-dev-plus-aosp

Change-Id: I9fdb4b870c11cd9ef1d46727496839743217fac3
This commit is contained in:
Hyunyoung Song
2016-04-20 17:03:16 -07:00
528 changed files with 8095 additions and 4071 deletions
+5 -19
View File
@@ -33,7 +33,7 @@ LOCAL_SRC_FILES := $(call all-java-files-under, src) \
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/WallpaperPicker/res \
$(LOCAL_PATH)/res \
$(LOCAL_PATH)/../../../frameworks/support/v7/recyclerview/res
frameworks/support/v7/recyclerview/res
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
@@ -54,34 +54,20 @@ include $(BUILD_PACKAGE)
#
# Protocol Buffer Debug Utility in Java
# Launcher proto buffer jar used for development
#
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-java-files-under, util) \
$(call all-proto-files-under, protos)
LOCAL_SRC_FILES := $(call all-proto-files-under, protos)
LOCAL_PROTOC_OPTIMIZE_TYPE := nano
LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/protos/
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := launcher_protoutil_lib
LOCAL_MODULE := launcher_proto_lib
LOCAL_IS_HOST_MODULE := true
LOCAL_JAR_MANIFEST := util/etc/manifest.txt
LOCAL_STATIC_JAVA_LIBRARIES := host-libprotobuf-java-nano
include $(BUILD_HOST_JAVA_LIBRARY)
#
# Protocol Buffer Debug Utility Wrapper Script
#
include $(CLEAR_VARS)
LOCAL_IS_HOST_MODULE := true
LOCAL_MODULE_CLASS := EXECUTABLES
LOCAL_MODULE := launcher_protoutil
LOCAL_SRC_FILES := util/etc/launcher_protoutil
LOCAL_REQUIRED_MODULES := launcher_protoutil_lib
include $(BUILD_PREBUILT)
INTERNAL_DALVIK_MODULES += $(LOCAL_INSTALLED_MODULE)
include $(call all-makefiles-under,$(LOCAL_PATH))
+50 -61
View File
@@ -81,6 +81,7 @@
android:theme="@style/Theme"
android:windowSoftInputMode="adjustPan"
android:screenOrientation="nosensor"
android:configChanges="keyboard|keyboardHidden|navigation"
android:resumeWhilePausing="true"
android:taskAffinity=""
android:enabled="true">
@@ -92,39 +93,6 @@
</intent-filter>
</activity>
<!-- ENABLE_FOR_TESTING
<activity
android:name="com.android.launcher3.testing.LauncherExtension"
android:launchMode="singleTask"
android:clearTaskOnLaunch="true"
android:stateNotNeeded="true"
android:theme="@style/Theme"
android:windowSoftInputMode="adjustPan"
android:screenOrientation="nosensor"
android:enabled="false">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.MONKEY"/>
</intent-filter>
</activity>
-->
<activity
android:name="com.android.launcher3.ToggleWeightWatcher"
android:label="@string/toggle_weight_watcher"
android:enabled="@bool/debug_memory_enabled"
android:icon="@mipmap/ic_launcher_home">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.android.launcher3.WallpaperPickerActivity"
android:theme="@style/Theme.WallpaperPicker"
@@ -159,34 +127,6 @@
android:process=":settings_process">
</activity>
<!-- Debugging tools -->
<activity
android:name="com.android.launcher3.MemoryDumpActivity"
android:theme="@android:style/Theme.NoDisplay"
android:label="@string/debug_memory_activity"
android:enabled="@bool/debug_memory_enabled"
android:excludeFromRecents="true"
android:icon="@mipmap/ic_launcher_home"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name="com.android.launcher3.MemoryTracker"
android:enabled="@bool/debug_memory_enabled"
>
</service>
<receiver
android:name="com.android.launcher3.WallpaperChangedReceiver">
<intent-filter>
<action android:name="android.intent.action.WALLPAPER_CHANGED" />
</intent-filter>
</receiver>
<!-- Intent received used to install shortcuts from other applications -->
<receiver
android:name="com.android.launcher3.InstallShortcutReceiver"
@@ -219,5 +159,54 @@
<meta-data android:name="android.nfc.disable_beam_default"
android:value="true" />
<!-- ENABLE_FOR_TESTING
<activity
android:name="com.android.launcher3.testing.LauncherExtension"
android:launchMode="singleTask"
android:clearTaskOnLaunch="true"
android:stateNotNeeded="true"
android:theme="@style/Theme"
android:windowSoftInputMode="adjustPan"
android:screenOrientation="nosensor"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.MONKEY"/>
</intent-filter>
</activity>
<activity
android:name="com.android.launcher3.testing.MemoryDumpActivity"
android:theme="@android:style/Theme.NoDisplay"
android:label="* HPROF"
android:excludeFromRecents="true"
android:icon="@mipmap/ic_launcher_home"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.android.launcher3.testing.ToggleWeightWatcher"
android:label="Show Mem"
android:icon="@mipmap/ic_launcher_home">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name="com.android.launcher3.testing.MemoryTracker" />
-->
</application>
</manifest>
+24
View File
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 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.
-->
<!-- startOffset is the same as the duration of the wallpaper_enter animation. We have this delay so
that we don't see the wallpaper changing before fading back to the home screen. -->
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:startOffset="@android:integer/config_longAnimTime"
android:duration="@android:integer/config_mediumAnimTime"
android:fromAlpha="1"
android:toAlpha="0"/>
@@ -28,5 +28,6 @@
android:drawableLeft="@drawable/ic_actionbar_accept"
android:drawablePadding="8dp"
android:gravity="start|center_vertical"
android:text="@string/wallpaper_instructions">
android:text="@string/wallpaper_instructions"
android:enabled="false">
</com.android.launcher3.AlphaDisableableButton>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Stel muurpapier"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Kon nie prent laai nie"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Kon nie prent as muurpapier laai nie"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Kon nie prent as muurpapier stel nie"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d gekies"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d gekies"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"ልጣፍ አዘጋጅ"</string>
<string name="image_load_fail" msgid="7538534580694411837">"ምስሉን መጫን አልተቻለም"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"ምስሉን እንደ ግድግዳ ወረቀት መጫን አልተቻለም"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"ምስሉን እንደ ግድግዳ ወረቀት ማዘጋጀት አልተቻለም"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d ተመርጧል"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d ተመርጧል"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"تعيين الخلفية"</string>
<string name="image_load_fail" msgid="7538534580694411837">"تعذر تحميل الصورة"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"تعذر تحميل الصورة كخلفية"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"تعذر تعيين الصورة كخلفية"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"‏تم تحديد %1$d"</item>
<item quantity="one" msgid="8409622005831789373">"‏تم تحديد %1$d"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Задаване на тапета"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Изображението не можа да бъде заредено"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Изображението не можа да бъде заредено като тапет"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Изображението не можа да бъде зададено като тапет"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"Избрахте %1$d"</item>
<item quantity="one" msgid="8409622005831789373">"Избрахте %1$d"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"ওয়ালপেপার সেট করুন"</string>
<string name="image_load_fail" msgid="7538534580694411837">"চিত্র লোড করা যায়নি"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"ওয়ালপেপার হিসাবে চিত্র লোড করা যায়নি"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"ওয়ালপেপার হিসাবে চিত্র সেট করা যায়নি"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$dটি নির্বাচন করা হয়েছে"</item>
<item quantity="one" msgid="8409622005831789373">"%1$dটি নির্বাচন করা হয়েছে"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Estableix el fons de pantalla"</string>
<string name="image_load_fail" msgid="7538534580694411837">"No s\'ha pogut carregar la imatge."</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"No s\'ha pogut carregar la imatge com a fons de pantalla."</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"No s\'ha pogut definir la imatge com a fons de pantalla"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"Seleccionats: %1$d"</item>
<item quantity="one" msgid="8409622005831789373">"Seleccionats: %1$d"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Nastavit jako tapetu"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Obrázek nelze načíst."</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Obrázek nelze načíst jako tapetu."</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Obrázek nelze nastavit jako tapetu"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"Vybráno: %1$d"</item>
<item quantity="one" msgid="8409622005831789373">"Vybráno: %1$d"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Angiv baggrund"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Billedet kunne ikke indlæses"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Billedet kunne ikke indlæses som baggrund"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Billedet kunne ikke indlæses som baggrund"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d er valgt"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d er valgt"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Hintergrund auswählen"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Bild konnte nicht geladen werden."</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Bild konnte nicht als Hintergrund geladen werden."</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Bild konnte nicht als Hintergrund festgelegt werden."</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d ausgewählt"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d ausgewählt"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Ορισμός ταπετσαρίας"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Δεν ήταν δυνατή η φόρτωση της εικόνας"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Δεν ήταν δυνατή η φόρτωση της εικόνας ως ταπετσαρία"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Δεν ήταν δυνατός ο ορισμός της εικόνας ως ταπετσαρία"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d επιλεγμένα"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d επιλεγμένα"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Set wallpaper"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Couldn\'t load image"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Couldn\'t load image as wallpaper"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Couldn\'t set image as wallpaper"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d selected"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d selected"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Set wallpaper"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Couldn\'t load image"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Couldn\'t load image as wallpaper"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Couldn\'t set image as wallpaper"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d selected"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d selected"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Set wallpaper"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Couldn\'t load image"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Couldn\'t load image as wallpaper"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Couldn\'t set image as wallpaper"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d selected"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d selected"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Establecer como fondo de pantalla"</string>
<string name="image_load_fail" msgid="7538534580694411837">"No se pudo cargar la imagen."</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"No se pudo cargar la imagen como fondo de pantalla."</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"No se pudo establecer la imagen como fondo de pantalla"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d seleccionado"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d seleccionado"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Establecer fondo"</string>
<string name="image_load_fail" msgid="7538534580694411837">"No se ha podido cargar la imagen"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"No se ha podido cargar la imagen como fondo de pantalla"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"No se ha podido establecer la imagen como fondo de pantalla"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"Seleccionados: %1$d"</item>
<item quantity="one" msgid="8409622005831789373">"Seleccionados: %1$d"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Määra taustapilt"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Kujutist ei õnnestunud laadida"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Kujutist ei õnnestunud taustapildina laadida"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Kujutist ei õnnestunud taustapildiks määrata"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"Valitud on %1$d"</item>
<item quantity="one" msgid="8409622005831789373">"Valitud on %1$d"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Ezarri horma-papera"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Ezin izan da irudia kargatu"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Ezin izan da irudia horma-paper gisa kargatu"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Ezin izan da ezarri irudia horma-paper gisa"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d hautatuta"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d hautatuta"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"تنظیم کاغذدیواری"</string>
<string name="image_load_fail" msgid="7538534580694411837">"تصویر بارگیری نشد"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"تصویر به‌عنوان کاغذدیواری بارگیری نشد"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"تصویر به‌عنوان کاغذدیواری تنظیم نشد"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d انتخاب شد"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d انتخاب شد"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Aseta taustakuva"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Kuvan lataus epäonnistui"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Kuvaa ei voitu ladata taustakuvaksi"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Kuvan asettaminen taustakuvaksi epäonnistui."</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d valittu"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d valittu"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Définir le fond d\'écran"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Impossible de charger l\'image"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Impossible de charger l\'image comme fond d\'écran"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Impossible d\'utiliser l\'image comme fond d\'écran"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d sélectionné"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d sélectionné"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Définir comme fond d\'écran"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Impossible de charger l\'image."</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Impossible de charger l\'image comme fond d\'écran."</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Impossible de définir l\'image comme fond d\'écran."</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d élément sélectionné"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d élément sélectionné"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Establecer fondo de pantalla"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Non se puido cargar a imaxe"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Non se puido cargar a imaxe como fondo de pantalla"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Non se puido definir a imaxe como fondo de pantalla"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"Seleccionaches %1$d"</item>
<item quantity="one" msgid="8409622005831789373">"Seleccionaches %1$d"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"वॉलपेपर सेट करें"</string>
<string name="image_load_fail" msgid="7538534580694411837">"चित्र लोड नहीं किया जा सका"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"चित्र को वॉलपेपर के रूप में लोड नहीं किया जा सका"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"चित्र को वॉलपेपर के रूप में सेट नहीं किया जा सका"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d चयनित"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d चयनित"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Postavi pozadinu"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Nije moguće učitati sliku"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Nije moguće učitati sliku kao pozadinu"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Postavljanje slike kao pozadine nije uspjelo"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"Odabrano je %1$d stavki"</item>
<item quantity="one" msgid="8409622005831789373">"Odabrana je %1$d stavka"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Háttérkép beállítása"</string>
<string name="image_load_fail" msgid="7538534580694411837">"A kép betöltése nem sikerült"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"A kép betöltése háttérképként nem sikerült"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"A kép beállítása háttérképként nem sikerült"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d kiválasztva"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d kiválasztva"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Սահմանել պաստառը"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Չհաջողվեց բեռնել նկարը"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Չհաջողվեց նկարը սահմանել որպես պաստառ"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Չհաջողվեց նկարը դնել որպես պաստառ"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d ընտրված"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d ընտրված"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Setel wallpaper"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Tidak dapat memuat gambar"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Tidak dapat memuat gambar sebagai wallpaper"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Tidak dapat menyetel gambar sebagai wallpaper"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d dipilih"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d dipilih"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Velja veggfóður"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Ekki var hægt að hlaða mynd"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Ekki var hægt að hlaða mynd sem veggfóður"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Ekki var hægt að nota mynd sem veggfóður"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d valin"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d valið"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Imposta sfondo"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Impossibile caricare l\'immagine"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Impossibile caricare l\'immagine come sfondo"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Impossibile impostare l\'immagine come sfondo"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d selezionati"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d selezionato"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"הגדר טפט"</string>
<string name="image_load_fail" msgid="7538534580694411837">"לא ניתן היה לטעון את התמונה"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"לא ניתן היה לטעון את התמונה כטפט"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"לא ניתן היה להגדיר את התמונה כטפט"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d נבחרו"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d נבחרו"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"壁紙を設定"</string>
<string name="image_load_fail" msgid="7538534580694411837">"画像を読み込めませんでした"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"画像を壁紙として読み込めませんでした"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"画像を壁紙として設定できませんでした"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d個選択済み"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d個選択済み"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"ფონის დაყენება"</string>
<string name="image_load_fail" msgid="7538534580694411837">"სურათი ვერ ჩაიტვირთა."</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"სურათი ფონად ვერ ჩაიტვირთა."</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"სურათი ფონად ვერ დაყენდა"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"არჩეულია %1$d"</item>
<item quantity="one" msgid="8409622005831789373">"არჩეულია %1$d"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Тұсқағаз орнату"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Суретті жүктей алмады"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Суретті артқы фон ретінде жүктей алмады"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Кескінді тұсқағаз ретінде орнату мүмкін болмады"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d таңдалған"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d таңдалған"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"កំណត់​ផ្ទាំង​រូបភាព"</string>
<string name="image_load_fail" msgid="7538534580694411837">"មិន​អាច​ផ្ទុក​រូបភាព"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"មិន​អាច​ផ្ទុក​រូបភាព​ជា​ផ្ទាំង​រូបភាព"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"មិនអាចកំណត់រូបភាពជាផ្ទាំងរូបភាពទេ"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"បាន​ជ្រើស %1$d"</item>
<item quantity="one" msgid="8409622005831789373">"បាន​ជ្រើស %1$d"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"ವಾಲ್‌ಪೇಪರ್ ಹೊಂದಿಸಿ"</string>
<string name="image_load_fail" msgid="7538534580694411837">"ಚಿತ್ರವನ್ನು ಲೋಡ್‌ ಮಾಡಲು ಸಾಧ್ಯವಾಗಲಿಲ್ಲ"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"ಚಿತ್ರವನ್ನು ವಾಲ್‌ಪೇಪರ್‌ ರೂಪದಲ್ಲಿ ಲೋಡ್‌ ಮಾಡಲು ಸಾಧ್ಯವಾಗಲಿಲ್ಲ"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"ಚಿತ್ರವನ್ನು ವಾಲ್‌ಪೇಪರ್‌ ರೂಪದಲ್ಲಿ ಹೊಂದಿಸಲಾಗಲಿಲ್ಲ"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d ಅನ್ನು ಆಯ್ಕೆ ಮಾಡಲಾಗಿದೆ"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d ಅನ್ನು ಆಯ್ಕೆ ಮಾಡಲಾಗಿದೆ"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"배경화면 설정"</string>
<string name="image_load_fail" msgid="7538534580694411837">"이미지를 로드할 수 없습니다."</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"이미지를 배경화면으로 로드할 수 없습니다."</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"이미지를 배경화면으로 설정할 수 없습니다."</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d개 선택됨"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d개 선택됨"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Тушкагаз орнотуу"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Сүрөт жүктөө мүмкүн болбоду"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Сүрөттү тушкагаз катары жүктөө кыйрады"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Сүрөт тушкагаз катары коюлбай койду"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d тандалды"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d тандалды"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"ຕັ້ງເປັນພາບພື້ນຫຼັງ"</string>
<string name="image_load_fail" msgid="7538534580694411837">"ບໍ່ສາມາດໂຫຼດຮູບໄດ້"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"ບໍ່ສາມາດໂຫຼດຮູບເປັນພາບພື້ນຫຼັງໄດ້"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"ບໍ່ສາມາດໂຫຼດຮູບເປັນພາບພື້ນຫຼັງໄດ້"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"ເລືອກ %1$d"</item>
<item quantity="one" msgid="8409622005831789373">"ເລືອກ %1$d"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Nustatyti ekrano foną"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Nepavyko įkelti vaizdo"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Nepavyko įkelti vaizdo kaip ekrano fono"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Nepavyko nustatyti vaizdo kaip ekrano fono"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"Pasirinkta: %1$d"</item>
<item quantity="one" msgid="8409622005831789373">"Pasirinkta: %1$d"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Iestatīt fona tapeti"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Nevarēja ielādēt attēlu."</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Nevarēja ielādēt attēlu kā fona tapeti."</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Nevarēja iestatīt attēlu kā fona tapeti."</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"Atlasīts: %1$d"</item>
<item quantity="one" msgid="8409622005831789373">"Atlasīta: %1$d"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Подеси тапет"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Сликата не можеше да се вчита"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Сликата не можеше да се вчита како тапет"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Сликата не може да се постави како тапет"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"Избрано %1$d"</item>
<item quantity="one" msgid="8409622005831789373">"Избрано %1$d"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"വാൾപേപ്പർ സജ്ജീകരിക്കുക"</string>
<string name="image_load_fail" msgid="7538534580694411837">"ചിത്രം ലോഡുചെയ്യാനായില്ല"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"വാൾപേപ്പറായി ചിത്രം ലോഡുചെയ്യാനായില്ല"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"വാൾപേപ്പറായി ചിത്രം ലോഡുചെയ്യാനായില്ല"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d തിരഞ്ഞെടുത്തു"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d തിരഞ്ഞെടുത്തു"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Ханын зургийг тохируулах"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Зургийг ачаалж чадсангүй"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Зургийг ханын зураг болгож ачаалж чадсангүй"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Зургийг ханын зураг болгож чадсангүй"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d сонгогдсон"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d сонгогдсон"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"वॉलपेपर सेट करा"</string>
<string name="image_load_fail" msgid="7538534580694411837">"प्रतिमा लोड करू शकलो नाही"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"वॉलपेपर म्हणून प्रतिमा लोड करू शकलो नाही"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"प्रतिमा वॉलपेपर म्हणून सेट करू शकलो नाही"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d निवडले"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d निवडले"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Tetapkan kertas dinding"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Tidak dapat memuatkan imej"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Tidak dapat memuatkan imej sebagai kertas dinding"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Tidak dapat menetapkan imej sebagai kertas dinding"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d dipilih"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d dipilih"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"နောက်ခံအား သတ်မှတ်ရန်"</string>
<string name="image_load_fail" msgid="7538534580694411837">"ပုံရိပ် တင် မရပါ"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"ပုံရိပ်အား နောက်ခံအဖြစ် တင် မရပါ"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"ပုံရိပ်အား နောက်ခံအဖြစ် တင်၍မရပါ"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d ရွေးချယ်ပြီး"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d ရွေးချယ်ပြီး"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Angi bakgrunn"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Kunne ikke laste inn bildet"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Kunne ikke laste inn bildet som bakgrunn"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Kunne ikke angi bildet som bakgrunn"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d valgt"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d valgt"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"वालपेपर मिलाउनुहोस्"</string>
<string name="image_load_fail" msgid="7538534580694411837">"तस्बिर लोड गर्न सकिएन"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"तस्बिरलाई वालपेपरका रूपमा लोड गर्न सकिएन"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"छविलाई वालपेपरको रूपमा सेट गर्न सकिएन"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d चयन भयो"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d चयन भयो"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Achtergrond instellen"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Kan afbeelding niet laden"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Kan afbeelding niet laden als achtergrond"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Kan afbeelding niet instellen als achtergrond"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d geselecteerd"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d geselecteerd"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Ustaw tapetę"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Nie udało się załadować obrazu"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Nie udało się załadować obrazu jako tapety"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Nie udało się ustawić obrazu jako tapety"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"Wybranych %1$d"</item>
<item quantity="one" msgid="8409622005831789373">"Wybrana %1$d"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Definir imagem fundo"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Não foi possível carregar a imagem"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Não foi possível carregar a imagem como imagem de fundo"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Não foi possível definir a imagem como imagem de fundo"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d selecionadas"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d selecionada"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Definir plano de fundo"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Não foi possível carregar a imagem"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Não foi possível carregar a imagem como plano de fundo"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Não foi possível definir a imagem como plano de fundo"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d selecionados"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d selecionado"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Setați imaginea de fundal"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Nu s-a putut încărca imaginea"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Nu s-a putut încărca imaginea ca fundal"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Nu s-a putut seta ca imagine de fundal"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d selectate"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d selectată"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Установить как обои"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Не удалось загрузить изображение"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Не удалось загрузить изображение"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Не удалось сменить обои"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"Выбрано: %1$d"</item>
<item quantity="one" msgid="8409622005831789373">"Выбрано: %1$d"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"වෝල්පේපරය සකසන්න"</string>
<string name="image_load_fail" msgid="7538534580694411837">"පින්තූරය පූරණය කිරීමට නොහැකි විය"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"පින්තූරය වෝල්පේපරයක් ලෙස පූරණය කිරීමට නොහැකි විය"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"පින්තූරය බිතුපතක් ලෙස සැකසීමට නොහැකි විය"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d තෝරා ගන්නා ලදි"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d තෝරා ගන්නා ලදි"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Nastaviť tapetu"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Obrázok nie je možné načítať"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Obrázok nie je možné načítať ako tapetu"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Obrázok nie je možné nastaviť ako tapetu"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"Počet vybratých položiek: %1$d"</item>
<item quantity="one" msgid="8409622005831789373">"Počet vybratých položiek: %1$d"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Nastavi ozadje"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Slike ni bilo mogoče naložiti"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Slike ni bilo mogoče naložiti kot ozadje"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Slike ni bilo mogoče nastaviti kot ozadje"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"Št. izbranih: %1$d"</item>
<item quantity="one" msgid="8409622005831789373">"Št. izbranih: %1$d"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Подеси позадину"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Није могуће учитати слику"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Није могуће учитати слику као позадину"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Учитавање слике као позадине није успело"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"Изабрано је %1$d"</item>
<item quantity="one" msgid="8409622005831789373">"Изабрана је %1$d"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Ange bakgrund"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Det gick inte att läsa in bilden"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Det gick inte att läsa in bilden som bakgrund"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Det gick inte att ange bilden som bakgrund"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d har valts"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d har valts"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Weka mandhari"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Haikuweza kupakia picha"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Haikuweza kupakia picha iwe mandhari"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Haikuweza kuweka picha kuwa mandhari"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d zimechaguliwa"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d zimechaguliwa"</item>
@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Copyright (C) 2013 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.
*/
-->
<resources>
<style name="Theme" parent="@android:style/Theme.DeviceDefault.Wallpaper.NoTitleBar">
<item name="android:windowActionModeOverlay">true</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
</style>
</resources>
@@ -18,7 +18,11 @@
-->
<resources>
<style name="Theme" parent="@android:style/Theme.DeviceDefault.Wallpaper.NoTitleBar">
<style name="BaseWallpaperTheme" parent="@android:style/Theme.DeviceDefault.Light.NoActionBar">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowShowWallpaper">true</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowActionModeOverlay">true</item>
</style>
</resources>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"வால்பேப்பரை அமை"</string>
<string name="image_load_fail" msgid="7538534580694411837">"படத்தை ஏற்ற முடியவில்லை"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"படத்தை வால்பேப்பராக ஏற்ற முடியவில்லை"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"படத்தை வால்பேப்பராக அமைக்க முடியவில்லை"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d தேர்ந்தெடுக்கப்பட்டன"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d தேர்ந்தெடுக்கப்பட்டது"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"వాల్‌పేపర్‌ను సెట్ చేయి"</string>
<string name="image_load_fail" msgid="7538534580694411837">"చిత్రాన్ని లోడ్ చేయడం సాధ్యపడలేదు"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"చిత్రాన్ని వాల్‌పేపర్‌గా లోడ్ చేయడం సాధ్యపడలేదు"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"చిత్రాన్ని వాల్‌పేపర్‌గా సెట్ చేయడం సాధ్యపడలేదు"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d ఎంచుకోబడింది"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d ఎంచుకోబడింది"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"ตั้งวอลเปเปอร์"</string>
<string name="image_load_fail" msgid="7538534580694411837">"ไม่สามารถโหลดรูปภาพ"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"ไม่สามารถโหลดรูปภาพเป็นวอลเปเปอร์"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"ไม่สามารถตั้งรูปภาพเป็นวอลเปเปอร์"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"เลือกไว้ %1$d"</item>
<item quantity="one" msgid="8409622005831789373">"เลือกไว้ %1$d"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Itakda ang wallpaper"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Hindi ma-load ang larawan"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Hindi ma-load ang larawan bilang wallpaper"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Hindi maitakda ang larawan bilang wallpaper"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d ang napili"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d ang napili"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Duvar kağıdını ayarla"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Resim yüklenemedi"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Resim duvar kağıdı olarak yüklenemedi"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Resim, duvar kağıdı olarak ayarlanamadı"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d tane seçildi"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d tane seçildi"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Установити фон"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Не вдалося завантажити зображення"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Не вдалося завантажити зображення як фоновий малюнок"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Не вдалося зробити зображення фоновим малюнком"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"Вибрано %1$d"</item>
<item quantity="one" msgid="8409622005831789373">"Вибрано %1$d"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"وال پیپر سیٹ کریں"</string>
<string name="image_load_fail" msgid="7538534580694411837">"تصویر کو لوڈ نہیں کیا جا سکا"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"تصویر کو وال پیپر کے بطور لوڈ نہیں کیا جا سکا"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"تصویر کو بطور وال پیپر سیٹ نہیں کیا جا سکا"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"‏%1$d کو منتخب کیا گیا"</item>
<item quantity="one" msgid="8409622005831789373">"‏%1$d کو منتخب کیا گیا"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Fonga rasm ornatish"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Rasm yuklanmadi"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Fon rasmi sifatida rasm yuklanmadi"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Rasmni fon rasmi sifatida ornatib bolmadi"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d ta tanlandi"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d ta tanlandi"</item>
+5 -2
View File
@@ -34,8 +34,11 @@
</style>
<style name="Theme" parent="@style/BaseWallpaperTheme">
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
<item name="android:windowTranslucentStatus">false</item>
<item name="android:windowTranslucentNavigation">false</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">#00000000</item>
<item name="android:navigationBarColor">#00000000</item>
<item name="android:colorControlActivated">@color/launcher_accent_color</item>
<item name="android:colorAccent">@color/launcher_accent_color</item>
<item name="android:colorPrimary">@color/launcher_accent_color</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Đặt hình nền"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Không thể tải hình ảnh"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Không thể tải hình ảnh làm hình nền"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Không thể đặt hình ảnh làm hình nền"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"Đã chọn %1$d"</item>
<item quantity="one" msgid="8409622005831789373">"Đã chọn %1$d"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"设置壁纸"</string>
<string name="image_load_fail" msgid="7538534580694411837">"无法加载图片"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"无法加载要设为壁纸的图片"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"无法将图片设为壁纸"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"已选择%1$d项"</item>
<item quantity="one" msgid="8409622005831789373">"已选择%1$d项"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"設定桌布"</string>
<string name="image_load_fail" msgid="7538534580694411837">"無法載入圖片"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"無法載入圖片設為桌布"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"無法將圖片設為桌布"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"已選取 %1$d 張"</item>
<item quantity="one" msgid="8409622005831789373">"已選取 %1$d 張"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"設定桌布"</string>
<string name="image_load_fail" msgid="7538534580694411837">"無法載入圖片"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"無法載入您要設為桌布的圖片"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"無法將圖片設為桌布"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"已選取 %1$d 個"</item>
<item quantity="one" msgid="8409622005831789373">"已選取 %1$d 個"</item>
@@ -22,6 +22,7 @@
<string name="wallpaper_instructions" msgid="3524143401182707094">"Setha isithombe sangemuva"</string>
<string name="image_load_fail" msgid="7538534580694411837">"Ayikwazanga ukulayisha isithombe"</string>
<string name="wallpaper_load_fail" msgid="4800700444605404650">"Ayikwazanga ukulayisha isithombe njengesithombe sangemuva"</string>
<string name="wallpaper_set_fail" msgid="7023180794008631780">"Ayikwazanga ukusetha isithombe njengesithombe sangemuva"</string>
<plurals name="number_of_items_selected">
<item quantity="zero" msgid="9015111147509924344">"%1$d khethiwe"</item>
<item quantity="one" msgid="8409622005831789373">"%1$d khethiwe"</item>
+22
View File
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 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.
-->
<resources>
<string-array name="which_wallpaper_options">
<item>@string/which_wallpaper_option_home_screen</item>
<item>@string/which_wallpaper_option_lock_screen</item>
<item>@string/which_wallpaper_option_home_screen_and_lock_screen</item>
</string-array>
</resources>
+10
View File
@@ -28,6 +28,9 @@
usually see this when using another app and trying to set
an image as the wallpaper -->
<string name="wallpaper_load_fail">Couldn\'t load image as wallpaper</string>
<!-- Error message when an image is selected as a wallpaper,
but something goes wrong when the user clicks "Set wallpaper" -->
<string name="wallpaper_set_fail">Couldn\'t set image as wallpaper</string>
<!-- Shown when wallpapers are selected in Wallpaper picker -->
<!-- String indicating how many media item(s) is(are) selected
eg. 1 selected [CHAR LIMIT=30] -->
@@ -50,4 +53,11 @@
<string name="pick_wallpaper">Wallpapers</string>
<!-- Title of activity for cropping wallpapers -->
<string name="crop_wallpaper">Crop wallpaper</string>
<!-- Option for setting the wallpaper only on the home screen. -->
<string name="which_wallpaper_option_home_screen">Home screen</string>
<!-- Option for setting the wallpaper only on the lock screen. -->
<string name="which_wallpaper_option_lock_screen">Lock screen</string>
<!-- Option for setting the wallpaper on both the home screen and lock screen. -->
<string name="which_wallpaper_option_home_screen_and_lock_screen">Home screen and lock screen</string>
</resources>
@@ -31,6 +31,11 @@ import android.graphics.RectF;
import android.net.Uri;
import android.os.AsyncTask;
import android.util.Log;
import android.widget.Toast;
import com.android.launcher3.NycWallpaperUtils;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;
@@ -39,10 +44,14 @@ import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
public class BitmapCropTask extends AsyncTask<Void, Void, Boolean> {
public class BitmapCropTask extends AsyncTask<Integer, Void, Boolean> {
public interface OnBitmapCroppedHandler {
public void onBitmapCropped(byte[] imageBytes);
public void onBitmapCropped(byte[] imageBytes, Rect cropHint);
}
public interface OnEndCropHandler {
public void run(boolean cropSucceeded);
}
private static final int DEFAULT_COMPRESS_QUALITY = 90;
@@ -59,56 +68,47 @@ public class BitmapCropTask extends AsyncTask<Void, Void, Boolean> {
boolean mSetWallpaper;
boolean mSaveCroppedBitmap;
Bitmap mCroppedBitmap;
Runnable mOnEndRunnable;
BitmapCropTask.OnEndCropHandler mOnEndCropHandler;
Resources mResources;
BitmapCropTask.OnBitmapCroppedHandler mOnBitmapCroppedHandler;
boolean mNoCrop;
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) {
boolean setWallpaper, boolean saveCroppedBitmap, OnEndCropHandler onEndCropHandler) {
mInImageBytes = imageBytes;
init(cropBounds, rotation,
outWidth, outHeight, setWallpaper, saveCroppedBitmap, onEndRunnable);
outWidth, outHeight, setWallpaper, saveCroppedBitmap, onEndCropHandler);
}
public BitmapCropTask(Context c, Uri inUri,
RectF cropBounds, int rotation, int outWidth, int outHeight,
boolean setWallpaper, boolean saveCroppedBitmap, Runnable onEndRunnable) {
boolean setWallpaper, boolean saveCroppedBitmap, OnEndCropHandler onEndCropHandler) {
mContext = c;
mInUri = inUri;
init(cropBounds, rotation,
outWidth, outHeight, setWallpaper, saveCroppedBitmap, onEndRunnable);
outWidth, outHeight, setWallpaper, saveCroppedBitmap, onEndCropHandler);
}
public BitmapCropTask(Context c, Resources res, int inResId,
RectF cropBounds, int rotation, int outWidth, int outHeight,
boolean setWallpaper, boolean saveCroppedBitmap, Runnable onEndRunnable) {
boolean setWallpaper, boolean saveCroppedBitmap, OnEndCropHandler onEndCropHandler) {
mContext = c;
mInResId = inResId;
mResources = res;
init(cropBounds, rotation,
outWidth, outHeight, setWallpaper, saveCroppedBitmap, onEndRunnable);
outWidth, outHeight, setWallpaper, saveCroppedBitmap, onEndCropHandler);
}
private void init(RectF cropBounds, int rotation, int outWidth, int outHeight,
boolean setWallpaper, boolean saveCroppedBitmap, Runnable onEndRunnable) {
boolean setWallpaper, boolean saveCroppedBitmap, OnEndCropHandler onEndCropHandler) {
mCropBounds = cropBounds;
mRotation = rotation;
mOutWidth = outWidth;
mOutHeight = outHeight;
mSetWallpaper = setWallpaper;
mSaveCroppedBitmap = saveCroppedBitmap;
mOnEndRunnable = onEndRunnable;
mOnEndCropHandler = onEndCropHandler;
}
public void setOnBitmapCropped(BitmapCropTask.OnBitmapCroppedHandler handler) {
@@ -119,8 +119,8 @@ public class BitmapCropTask extends AsyncTask<Void, Void, Boolean> {
mNoCrop = value;
}
public void setOnEndRunnable(Runnable onEndRunnable) {
mOnEndRunnable = onEndRunnable;
public void setOnEndRunnable(OnEndCropHandler onEndCropHandler) {
mOnEndCropHandler = onEndCropHandler;
}
// Helper to setup input stream
@@ -168,28 +168,45 @@ public class BitmapCropTask extends AsyncTask<Void, Void, Boolean> {
public Bitmap getCroppedBitmap() {
return mCroppedBitmap;
}
public boolean cropBitmap() {
public boolean cropBitmap(int whichWallpaper) {
boolean failure = false;
WallpaperManager wallpaperManager = null;
if (mSetWallpaper) {
wallpaperManager = WallpaperManager.getInstance(mContext.getApplicationContext());
}
if (mSetWallpaper && mNoCrop) {
try {
InputStream is = regenerateInputStream();
if (is != null) {
wallpaperManager.setStream(is);
Utils.closeSilently(is);
}
setWallpaper(is, null, whichWallpaper);
Utils.closeSilently(is);
} catch (IOException e) {
Log.w(LOGTAG, "cannot write stream to wallpaper", e);
failure = true;
}
return !failure;
} else if (mSetWallpaper && Utilities.isNycOrAbove()
&& mRotation == 0 && mOutWidth > 0 && mOutHeight > 0) {
Rect hint = new Rect();
mCropBounds.roundOut(hint);
InputStream is = null;
try {
is = regenerateInputStream();
if (is == null) {
Log.w(LOGTAG, "cannot get input stream for uri=" + mInUri.toString());
failure = true;
return false;
}
WallpaperManager.getInstance(mContext).suggestDesiredDimensions(mOutWidth, mOutHeight);
setWallpaper(is, hint, whichWallpaper);
if (mOnBitmapCroppedHandler != null) {
mOnBitmapCroppedHandler.onBitmapCropped(null, hint);
}
failure = false;
} catch (IOException e) {
Log.w(LOGTAG, "cannot open region decoder for file: " + mInUri.toString(), e);
} finally {
Utils.closeSilently(is);
}
} else {
// Find crop bounds (scaled to original image size)
Rect roundedTrueCrop = new Rect();
@@ -218,7 +235,6 @@ public class BitmapCropTask extends AsyncTask<Void, Void, Boolean> {
mCropBounds.offset(-rotatedBounds[0]/2, -rotatedBounds[1]/2);
inverseRotateMatrix.mapRect(mCropBounds);
mCropBounds.offset(bounds.x/2, bounds.y/2);
}
mCropBounds.roundOut(roundedTrueCrop);
@@ -289,22 +305,16 @@ public class BitmapCropTask extends AsyncTask<Void, Void, Boolean> {
roundedTrueCrop.right = roundedTrueCrop.left + fullSize.getWidth();
}
if (roundedTrueCrop.right > fullSize.getWidth()) {
// Adjust the left value
int adjustment = roundedTrueCrop.left -
Math.max(0, roundedTrueCrop.right - roundedTrueCrop.width());
roundedTrueCrop.left -= adjustment;
roundedTrueCrop.right -= adjustment;
// Adjust the left and right values.
roundedTrueCrop.offset(-(roundedTrueCrop.right - fullSize.getWidth()), 0);
}
if (roundedTrueCrop.height() > fullSize.getHeight()) {
// Adjust the height
roundedTrueCrop.bottom = roundedTrueCrop.top + fullSize.getHeight();
}
if (roundedTrueCrop.bottom > fullSize.getHeight()) {
// Adjust the top value
int adjustment = roundedTrueCrop.top -
Math.max(0, roundedTrueCrop.bottom - roundedTrueCrop.height());
roundedTrueCrop.top -= adjustment;
roundedTrueCrop.bottom -= adjustment;
// Adjust the top and bottom values.
roundedTrueCrop.offset(0, -(roundedTrueCrop.bottom - fullSize.getHeight()));
}
crop = Bitmap.createBitmap(fullSize, roundedTrueCrop.left,
@@ -371,12 +381,13 @@ public class BitmapCropTask extends AsyncTask<Void, Void, Boolean> {
ByteArrayOutputStream tmpOut = new ByteArrayOutputStream(2048);
if (crop.compress(CompressFormat.JPEG, DEFAULT_COMPRESS_QUALITY, tmpOut)) {
// If we need to set to the wallpaper, set it
if (mSetWallpaper && wallpaperManager != null) {
if (mSetWallpaper) {
try {
byte[] outByteArray = tmpOut.toByteArray();
wallpaperManager.setStream(new ByteArrayInputStream(outByteArray));
setWallpaper(new ByteArrayInputStream(outByteArray), null, whichWallpaper);
if (mOnBitmapCroppedHandler != null) {
mOnBitmapCroppedHandler.onBitmapCropped(outByteArray);
mOnBitmapCroppedHandler.onBitmapCropped(outByteArray,
new Rect(0, 0, crop.getWidth(), crop.getHeight()));
}
} catch (IOException e) {
Log.w(LOGTAG, "cannot write stream to wallpaper", e);
@@ -392,14 +403,25 @@ public class BitmapCropTask extends AsyncTask<Void, Void, Boolean> {
}
@Override
protected Boolean doInBackground(Void... params) {
return cropBitmap();
protected Boolean doInBackground(Integer... params) {
return cropBitmap(params.length == 0 ? NycWallpaperUtils.FLAG_SET_SYSTEM : params[0]);
}
@Override
protected void onPostExecute(Boolean result) {
if (mOnEndRunnable != null) {
mOnEndRunnable.run();
protected void onPostExecute(Boolean cropSucceeded) {
if (!cropSucceeded) {
Toast.makeText(mContext, R.string.wallpaper_set_fail, Toast.LENGTH_SHORT).show();
}
if (mOnEndCropHandler != null) {
mOnEndCropHandler.run(cropSucceeded);
}
}
private void setWallpaper(InputStream in, Rect crop, int whichWallpaper) throws IOException {
if (!Utilities.isNycOrAbove()) {
WallpaperManager.getInstance(mContext.getApplicationContext()).setStream(in);
} else {
NycWallpaperUtils.setStream(mContext, in, crop, true, whichWallpaper);
}
}
}
@@ -19,6 +19,7 @@ package com.android.launcher3;
import android.content.Context;
import android.graphics.Matrix;
import android.graphics.Point;
import android.graphics.PointF;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.view.MotionEvent;
@@ -31,7 +32,7 @@ import android.view.ViewTreeObserver.OnGlobalLayoutListener;
import com.android.photos.views.TiledImageRenderer.TileSource;
import com.android.photos.views.TiledImageView;
public class CropView extends TiledImageView implements OnScaleGestureListener {
public class CropView extends TiledImageView implements OnScaleGestureListener {
private ScaleGestureDetector mScaleGestureDetector;
private long mTouchDownTime;
@@ -148,12 +149,19 @@ public class CropView extends TiledImageView implements OnScaleGestureListener {
updateMinScale(w, h, mRenderer.source, false);
}
public void setScale(float scale) {
public void setScaleAndCenter(float scale, float x, float y) {
synchronized (mLock) {
mRenderer.scale = scale;
mCenterX = x;
mCenterY = y;
updateCenter();
}
}
public float getScale() {
return mRenderer.scale;
}
private void updateMinScale(int w, int h, TileSource source, boolean resetScale) {
synchronized (mLock) {
if (resetScale) {
@@ -211,6 +219,10 @@ public class CropView extends TiledImageView implements OnScaleGestureListener {
mRenderer.centerY = Math.round(mCenterY);
}
public PointF getCenter() {
return new PointF(mCenterX, mCenterY);
}
public void setTouchEnabled(boolean enabled) {
mTouchEnabled = enabled;
}
@@ -0,0 +1,79 @@
package com.android.launcher3;
import android.app.AlertDialog;
import android.app.WallpaperManager;
import android.content.Context;
import android.content.DialogInterface;
import android.graphics.Rect;
import android.os.AsyncTask;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/**
* Utility class used to help set lockscreen wallpapers on N+.
*/
public class NycWallpaperUtils {
public static final int FLAG_SET_SYSTEM = 1 << 0; // TODO: use WallpaperManager.FLAG_SET_SYSTEM
public static final int FLAG_SET_LOCK = 1 << 1; // TODO: use WallpaperManager.FLAG_SET_LOCK
/**
* Calls cropTask.execute(), once the user has selected which wallpaper to set. On pre-N
* devices, the prompt is not displayed since there is no API to set the lockscreen wallpaper.
*/
public static void executeCropTaskAfterPrompt(
Context context, final AsyncTask<Integer, ?, ?> cropTask,
DialogInterface.OnCancelListener onCancelListener) {
if (Utilities.isNycOrAbove()) {
new AlertDialog.Builder(context)
.setTitle(R.string.wallpaper_instructions)
.setItems(R.array.which_wallpaper_options, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int selectedItemIndex) {
int whichWallpaper;
if (selectedItemIndex == 0) {
whichWallpaper = FLAG_SET_SYSTEM;
} else if (selectedItemIndex == 1) {
whichWallpaper = FLAG_SET_LOCK;
} else {
whichWallpaper = FLAG_SET_SYSTEM | FLAG_SET_LOCK;
}
cropTask.execute(whichWallpaper);
}
})
.setOnCancelListener(onCancelListener)
.show();
} else {
cropTask.execute(FLAG_SET_SYSTEM);
}
}
public static void setStream(Context context, final InputStream data, Rect visibleCropHint,
boolean allowBackup, int whichWallpaper) throws IOException {
WallpaperManager wallpaperManager = WallpaperManager.getInstance(context);
try {
// TODO: use mWallpaperManager.setStream(data, visibleCropHint, allowBackup, which)
// without needing reflection.
Method setStream = WallpaperManager.class.getMethod("setStream", InputStream.class,
Rect.class, boolean.class, int.class);
setStream.invoke(wallpaperManager, data, visibleCropHint, allowBackup, whichWallpaper);
} catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) {
// Fall back to previous implementation (set system)
wallpaperManager.setStream(data);
}
}
public static void clear(Context context, int whichWallpaper) throws IOException {
WallpaperManager wallpaperManager = WallpaperManager.getInstance(context);
try {
// TODO: use mWallpaperManager.clear(whichWallpaper) without needing reflection.
Method clear = WallpaperManager.class.getMethod("clear", int.class);
clear.invoke(wallpaperManager, whichWallpaper);
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
// Fall back to previous implementation (clear system)
wallpaperManager.clear();
}
}
}
@@ -25,6 +25,8 @@ import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.text.TextUtils;
import android.util.Log;
import android.util.Pair;
import android.view.LayoutInflater;
@@ -33,9 +35,14 @@ import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ListAdapter;
import com.android.launcher3.WallpaperCropActivity.CropViewScaleAndOffsetProvider;
import com.android.photos.views.TiledImageRenderer.TileSource;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
@@ -48,15 +55,42 @@ public class SavedWallpaperImages extends BaseAdapter implements ListAdapter {
public static class SavedWallpaperTile extends WallpaperPickerActivity.FileWallpaperInfo {
private int mDbId;
public SavedWallpaperTile(int dbId, File target, Drawable thumb) {
// three floats representing scale, centerX and centerY of the crop view in order.
private Float[] mExtras;
public SavedWallpaperTile(int dbId, File target, Drawable thumb, Float[] extras) {
super(target, thumb);
mDbId = dbId;
mExtras = extras != null && extras.length == 3 ? extras : null;
}
@Override
public void onDelete(WallpaperPickerActivity a) {
a.getSavedImages().deleteImage(mDbId);
}
@Override
protected CropViewScaleAndOffsetProvider getCropViewScaleAndOffsetProvider() {
if (mExtras != null) {
return new CropViewScaleAndOffsetProvider() {
@Override
public void updateCropView(WallpaperCropActivity a, TileSource src) {
a.mCropView.setScaleAndCenter(mExtras[0], mExtras[1], mExtras[2]);
}
};
}
return null;
}
@Override
public void onSave(final WallpaperPickerActivity a) {
if (mExtras == null) {
super.onSave(a);
} else {
boolean shouldFadeOutOnFinish = a.getWallpaperParallaxOffset() == 0f;
a.cropImageAndSetWallpaper(Uri.fromFile(mFile), null, true, shouldFadeOutOnFinish);
}
}
}
public SavedWallpaperImages(Context context) {
@@ -74,7 +108,8 @@ public class SavedWallpaperImages extends BaseAdapter implements ListAdapter {
Cursor result = db.query(ImageDb.TABLE_NAME,
new String[] { ImageDb.COLUMN_ID,
ImageDb.COLUMN_IMAGE_THUMBNAIL_FILENAME,
ImageDb.COLUMN_IMAGE_FILENAME}, // cols to return
ImageDb.COLUMN_IMAGE_FILENAME,
ImageDb.COLUMN_EXTRAS}, // cols to return
null, // select query
null, // args to select query
null,
@@ -88,9 +123,25 @@ public class SavedWallpaperImages extends BaseAdapter implements ListAdapter {
Bitmap thumb = BitmapFactory.decodeFile(file.getAbsolutePath());
if (thumb != null) {
Float[] extras = null;
String extraStr = result.getString(3);
if (extraStr != null) {
String[] parts = extraStr.split(",");
extras = new Float[parts.length];
for (int i = 0; i < parts.length; i++) {
try {
extras[i] = Float.parseFloat(parts[i]);
} catch (Exception e) {
extras = null;
break;
}
}
}
mImages.add(new SavedWallpaperTile(result.getInt(0),
new File(mContext.getFilesDir(), result.getString(2)),
new BitmapDrawable(thumb)));
new BitmapDrawable(thumb), extras));
}
}
result.close();
@@ -155,34 +206,55 @@ public class SavedWallpaperImages extends BaseAdapter implements ListAdapter {
public void writeImage(Bitmap thumbnail, byte[] imageBytes) {
try {
File imageFile = File.createTempFile("wallpaper", "", mContext.getFilesDir());
FileOutputStream imageFileStream =
mContext.openFileOutput(imageFile.getName(), Context.MODE_PRIVATE);
imageFileStream.write(imageBytes);
imageFileStream.close();
File thumbFile = File.createTempFile("wallpaperthumb", "", mContext.getFilesDir());
FileOutputStream thumbFileStream =
mContext.openFileOutput(thumbFile.getName(), Context.MODE_PRIVATE);
thumbnail.compress(Bitmap.CompressFormat.JPEG, 95, thumbFileStream);
thumbFileStream.close();
SQLiteDatabase db = mDb.getWritableDatabase();
ContentValues values = new ContentValues();
values.put(ImageDb.COLUMN_IMAGE_THUMBNAIL_FILENAME, thumbFile.getName());
values.put(ImageDb.COLUMN_IMAGE_FILENAME, imageFile.getName());
db.insert(ImageDb.TABLE_NAME, null, values);
writeImage(thumbnail, new ByteArrayInputStream(imageBytes), null);
} catch (IOException e) {
Log.e(TAG, "Failed writing images to storage " + e);
}
}
public void writeImage(Bitmap thumbnail, Uri uri, Float[] extras) {
try {
writeImage(thumbnail, mContext.getContentResolver().openInputStream(uri), extras);
} catch (IOException e) {
Log.e(TAG, "Failed writing images to storage " + e);
}
}
private void writeImage(Bitmap thumbnail, InputStream in, Float[] extras) throws IOException {
File imageFile = File.createTempFile("wallpaper", "", mContext.getFilesDir());
FileOutputStream imageFileStream =
mContext.openFileOutput(imageFile.getName(), Context.MODE_PRIVATE);
byte[] buf = new byte[4096]; // 4k
int len;
while ((len = in.read(buf)) > 0) {
imageFileStream.write(buf, 0, len);
}
imageFileStream.close();
in.close();
File thumbFile = File.createTempFile("wallpaperthumb", "", mContext.getFilesDir());
FileOutputStream thumbFileStream =
mContext.openFileOutput(thumbFile.getName(), Context.MODE_PRIVATE);
thumbnail.compress(Bitmap.CompressFormat.JPEG, 95, thumbFileStream);
thumbFileStream.close();
SQLiteDatabase db = mDb.getWritableDatabase();
ContentValues values = new ContentValues();
values.put(ImageDb.COLUMN_IMAGE_THUMBNAIL_FILENAME, thumbFile.getName());
values.put(ImageDb.COLUMN_IMAGE_FILENAME, imageFile.getName());
if (extras != null) {
values.put(ImageDb.COLUMN_EXTRAS, TextUtils.join(",", extras));
}
db.insert(ImageDb.TABLE_NAME, null, values);
}
static class ImageDb extends SQLiteOpenHelper {
final static int DB_VERSION = 1;
final static int DB_VERSION = 2;
final static String TABLE_NAME = "saved_wallpaper_images";
final static String COLUMN_ID = "id";
final static String COLUMN_IMAGE_THUMBNAIL_FILENAME = "image_thumbnail";
final static String COLUMN_IMAGE_FILENAME = "image";
final static String COLUMN_EXTRAS = "extras";
Context mContext;
@@ -209,15 +281,20 @@ public class SavedWallpaperImages extends BaseAdapter implements ListAdapter {
COLUMN_ID + " INTEGER NOT NULL, " +
COLUMN_IMAGE_THUMBNAIL_FILENAME + " TEXT NOT NULL, " +
COLUMN_IMAGE_FILENAME + " TEXT NOT NULL, " +
COLUMN_EXTRAS + " TEXT, " +
"PRIMARY KEY (" + COLUMN_ID + " ASC) " +
");");
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
if (oldVersion != newVersion) {
if (oldVersion == 1) {
// Add extras column
db.execSQL("ALTER TABLE " + TABLE_NAME + " ADD COLUMN " + COLUMN_EXTRAS + " TEXT;");
} else if (oldVersion != newVersion) {
// Delete all the records; they'll be repopulated as this is a cache
db.execSQL("DELETE FROM " + TABLE_NAME);
onCreate(db);
}
}
}
@@ -54,7 +54,9 @@ public class ThirdPartyWallpaperPickerListAdapter extends BaseAdapter implements
final ComponentName itemComponentName = new ComponentName(
mResolveInfo.activityInfo.packageName, mResolveInfo.activityInfo.name);
Intent launchIntent = new Intent(Intent.ACTION_SET_WALLPAPER);
launchIntent.setComponent(itemComponentName);
launchIntent.setComponent(itemComponentName)
.putExtra(WallpaperPickerActivity.EXTRA_WALLPAPER_OFFSET,
a.getWallpaperParallaxOffset());
a.startActivityForResultSafely(
launchIntent, WallpaperPickerActivity.PICK_WALLPAPER_THIRD_PARTY_ACTIVITY);
}
@@ -21,6 +21,7 @@ import android.app.ActionBar;
import android.app.Activity;
import android.app.WallpaperManager;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Configuration;
@@ -28,6 +29,7 @@ import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Matrix;
import android.graphics.Point;
import android.graphics.PointF;
import android.graphics.RectF;
import android.net.Uri;
import android.os.Build;
@@ -86,6 +88,18 @@ public class WallpaperCropActivity extends BaseActivity implements Handler.Callb
@Thunk Set<Bitmap> mReusableBitmaps =
Collections.newSetFromMap(new WeakHashMap<Bitmap, Boolean>());
private final DialogInterface.OnCancelListener mOnDialogCancelListener =
new DialogInterface.OnCancelListener() {
@Override
public void onCancel(DialogInterface dialog) {
getActionBar().show();
View wallpaperStrip = findViewById(R.id.wallpaper_strip);
if (wallpaperStrip != null) {
wallpaperStrip.setVisibility(View.VISIBLE);
}
}
};
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -123,8 +137,13 @@ public class WallpaperCropActivity extends BaseActivity implements Handler.Callb
new View.OnClickListener() {
@Override
public void onClick(View v) {
actionBar.hide();
boolean finishActivityWhenDone = true;
cropImageAndSetWallpaper(imageUri, null, finishActivityWhenDone);
// Never fade on finish because we return to the app that started us (e.g.
// Photos), not the home screen.
boolean shouldFadeOutOnFinish = false;
cropImageAndSetWallpaper(imageUri, null, finishActivityWhenDone,
shouldFadeOutOnFinish);
}
});
mSetWallpaperButton = findViewById(R.id.set_wallpaper_button);
@@ -237,6 +256,10 @@ public class WallpaperCropActivity extends BaseActivity implements Handler.Callb
}
}
public DialogInterface.OnCancelListener getOnDialogCancelListener() {
return mOnDialogCancelListener;
}
protected void onLoadRequestComplete(LoadRequest req, boolean success) {
mCurrentLoadRequest = null;
if (success) {
@@ -246,8 +269,8 @@ public class WallpaperCropActivity extends BaseActivity implements Handler.Callb
if (req.moveToLeft) {
mCropView.moveToLeft();
}
if (req.scaleProvider != null) {
mCropView.setScale(req.scaleProvider.getScale(req.result));
if (req.scaleAndOffsetProvider != null) {
req.scaleAndOffsetProvider.updateCropView(this, req.result);
}
// Free last image
@@ -265,13 +288,13 @@ public class WallpaperCropActivity extends BaseActivity implements Handler.Callb
}
public final void setCropViewTileSource(BitmapSource bitmapSource, boolean touchEnabled,
boolean moveToLeft, CropViewScaleProvider scaleProvider, Runnable postExecute) {
boolean moveToLeft, CropViewScaleAndOffsetProvider scaleProvider, Runnable postExecute) {
final LoadRequest req = new LoadRequest();
req.moveToLeft = moveToLeft;
req.src = bitmapSource;
req.touchEnabled = touchEnabled;
req.postExecute = postExecute;
req.scaleProvider = scaleProvider;
req.scaleAndOffsetProvider = scaleProvider;
mCurrentLoadRequest = req;
// Remove any pending requests
@@ -295,54 +318,64 @@ public class WallpaperCropActivity extends BaseActivity implements Handler.Callb
return getResources().getBoolean(R.bool.allow_rotation);
}
protected void setWallpaper(Uri uri, final boolean finishActivityWhenDone) {
protected void setWallpaper(Uri uri, final boolean finishActivityWhenDone,
final boolean shouldFadeOutOnFinish) {
int rotation = BitmapUtils.getRotationFromExif(getContext(), uri);
BitmapCropTask cropTask = new BitmapCropTask(
getContext(), uri, null, rotation, 0, 0, true, false, null);
final Point bounds = cropTask.getImageBounds();
Runnable onEndCrop = new Runnable() {
public void run() {
BitmapCropTask.OnEndCropHandler onEndCrop = new BitmapCropTask.OnEndCropHandler() {
public void run(boolean cropSucceeded) {
updateWallpaperDimensions(bounds.x, bounds.y);
if (finishActivityWhenDone) {
setResult(Activity.RESULT_OK);
finish();
if (cropSucceeded && shouldFadeOutOnFinish) {
overridePendingTransition(0, R.anim.fade_out);
}
}
}
};
cropTask.setOnEndRunnable(onEndCrop);
cropTask.setNoCrop(true);
cropTask.execute();
NycWallpaperUtils.executeCropTaskAfterPrompt(this, cropTask, getOnDialogCancelListener());
}
protected void cropImageAndSetWallpaper(
Resources res, int resId, final boolean finishActivityWhenDone) {
protected void cropImageAndSetWallpaper(Resources res, int resId,
final boolean finishActivityWhenDone, final boolean shouldFadeOutOnFinish) {
// crop this image and scale it down to the default wallpaper size for
// this device
int rotation = BitmapUtils.getRotationFromExif(res, resId);
Point inSize = mCropView.getSourceDimensions();
Point outSize = WallpaperUtils.getDefaultWallpaperSize(getResources(),
getWindowManager());
Point outSize = WallpaperUtils.getDefaultWallpaperSize(getResources(), getWindowManager());
RectF crop = Utils.getMaxCropRect(
inSize.x, inSize.y, outSize.x, outSize.y, false);
Runnable onEndCrop = new Runnable() {
public void run() {
BitmapCropTask.OnEndCropHandler onEndCrop = new BitmapCropTask.OnEndCropHandler() {
public void run(boolean cropSucceeded) {
// Passing 0, 0 will cause launcher to revert to using the
// default wallpaper size
updateWallpaperDimensions(0, 0);
if (finishActivityWhenDone) {
setResult(Activity.RESULT_OK);
finish();
if (cropSucceeded && shouldFadeOutOnFinish) {
overridePendingTransition(0, R.anim.fade_out);
}
}
}
};
BitmapCropTask cropTask = new BitmapCropTask(getContext(), res, resId,
crop, rotation, outSize.x, outSize.y, true, false, onEndCrop);
cropTask.execute();
NycWallpaperUtils.executeCropTaskAfterPrompt(this, cropTask, getOnDialogCancelListener());
}
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
protected void cropImageAndSetWallpaper(Uri uri,
BitmapCropTask.OnBitmapCroppedHandler onBitmapCroppedHandler, final boolean finishActivityWhenDone) {
BitmapCropTask.OnBitmapCroppedHandler onBitmapCroppedHandler,
final boolean finishActivityWhenDone, final boolean shouldFadeOutOnFinish) {
// Give some feedback so user knows something is happening.
mProgressView.setVisibility(View.VISIBLE);
boolean centerCrop = getResources().getBoolean(R.bool.center_crop);
// Get the crop
boolean ltr = mCropView.getLayoutDirection() == View.LAYOUT_DIRECTION_LTR;
@@ -418,13 +451,16 @@ public class WallpaperCropActivity extends BaseActivity implements Handler.Callb
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() {
BitmapCropTask.OnEndCropHandler onEndCrop = new BitmapCropTask.OnEndCropHandler() {
public void run(boolean cropSucceeded) {
updateWallpaperDimensions(outWidth, outHeight);
if (finishActivityWhenDone) {
setResult(Activity.RESULT_OK);
finish();
}
if (cropSucceeded && shouldFadeOutOnFinish) {
overridePendingTransition(0, R.anim.fade_out);
}
}
};
BitmapCropTask cropTask = new BitmapCropTask(getContext(), uri,
@@ -432,7 +468,7 @@ public class WallpaperCropActivity extends BaseActivity implements Handler.Callb
if (onBitmapCroppedHandler != null) {
cropTask.setOnBitmapCropped(onBitmapCroppedHandler);
}
cropTask.execute();
NycWallpaperUtils.executeCropTaskAfterPrompt(this, cropTask, getOnDialogCancelListener());
}
protected void updateWallpaperDimensions(int width, int height) {
@@ -446,7 +482,7 @@ public class WallpaperCropActivity extends BaseActivity implements Handler.Callb
editor.remove(WALLPAPER_WIDTH_KEY);
editor.remove(WALLPAPER_HEIGHT_KEY);
}
editor.commit();
editor.apply();
WallpaperUtils.suggestWallpaperDimension(getResources(),
sp, getWindowManager(), WallpaperManager.getInstance(getContext()), true);
}
@@ -456,12 +492,37 @@ public class WallpaperCropActivity extends BaseActivity implements Handler.Callb
boolean touchEnabled;
boolean moveToLeft;
Runnable postExecute;
CropViewScaleProvider scaleProvider;
CropViewScaleAndOffsetProvider scaleAndOffsetProvider;
TileSource result;
}
interface CropViewScaleProvider {
float getScale(TileSource src);
public static class CropViewScaleAndOffsetProvider {
public float getScale(Point wallpaperSize, RectF crop) {
return 1f;
}
public float getParallaxOffset() {
return 0.5f;
}
public void updateCropView(WallpaperCropActivity a, TileSource src) {
Point wallpaperSize = WallpaperUtils.getDefaultWallpaperSize(
a.getResources(), a.getWindowManager());
RectF crop = Utils.getMaxCropRect(src.getImageWidth(), src.getImageHeight(),
wallpaperSize.x, wallpaperSize.y, false /* leftAligned */);
float scale = getScale(wallpaperSize, crop);
PointF center = a.mCropView.getCenter();
// Offsets wallpaper preview according to the state it will be displayed in upon
// returning home. Offset ranges from 0 to 1, where 0 is the leftmost parallax and
// 1 is the rightmost.
// Make sure the offset is in the correct range.
float offset = Math.max(0, Math.min(getParallaxOffset(), 1));
float screenWidth = a.mCropView.getWidth() / scale;
center.x = screenWidth / 2 + offset * (crop.width() - screenWidth) + crop.left;
a.mCropView.setScaleAndCenter(scale, center.x, center.y);
}
}
}
@@ -16,7 +16,7 @@
package com.android.launcher3;
import android.Manifest.permission;
import android.Manifest;
import android.animation.LayoutTransition;
import android.annotation.TargetApi;
import android.app.ActionBar;
@@ -31,20 +31,23 @@ import android.database.Cursor;
import android.database.DataSetObserver;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.BitmapRegionDecoder;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Point;
import android.graphics.PointF;
import android.graphics.PorterDuff;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.Manifest;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.os.Process;
import android.provider.MediaStore;
import android.support.annotation.NonNull;
import android.util.Log;
import android.util.Pair;
import android.view.ActionMode;
@@ -75,21 +78,24 @@ import com.android.gallery3d.common.BitmapCropTask;
import com.android.gallery3d.common.BitmapUtils;
import com.android.gallery3d.common.Utils;
import com.android.launcher3.util.Thunk;
import com.android.launcher3.util.WallpaperUtils;
import com.android.photos.BitmapRegionTileSource;
import com.android.photos.BitmapRegionTileSource.BitmapSource;
import com.android.photos.views.TiledImageRenderer.TileSource;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
public class WallpaperPickerActivity extends WallpaperCropActivity {
static final String TAG = "Launcher.WallpaperPickerActivity";
static final String TAG = "WallpaperPickerActivity";
public static final int IMAGE_PICK = 5;
public static final int PICK_WALLPAPER_THIRD_PARTY_ACTIVITY = 6;
/** An Intent extra used when opening the wallpaper picker from the workspace overlay. */
public static final String EXTRA_WALLPAPER_OFFSET = "com.android.launcher3.WALLPAPER_OFFSET";
private static final String TEMP_WALLPAPER_TILES = "TEMP_WALLPAPER_TILES";
private static final String SELECTED_INDEX = "SELECTED_INDEX";
private static final int FLAG_POST_DELAY_MILLIS = 200;
@@ -110,6 +116,7 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
ArrayList<Uri> mTempWallpaperTiles = new ArrayList<Uri>();
private SavedWallpaperImages mSavedImages;
@Thunk int mSelectedIndex = -1;
private float mWallpaperParallaxOffset;
public static abstract class WallpaperTileInfo {
protected View mView;
@@ -171,15 +178,49 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
public void onSave(final WallpaperPickerActivity a) {
boolean finishActivityWhenDone = true;
BitmapCropTask.OnBitmapCroppedHandler h = new BitmapCropTask.OnBitmapCroppedHandler() {
public void onBitmapCropped(byte[] imageBytes) {
@Override
public void onBitmapCropped(byte[] imageBytes, Rect hint) {
Bitmap thumb = null;
Point thumbSize = getDefaultThumbnailSize(a.getResources());
// 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);
if (imageBytes != null) {
// rotation is set to 0 since imageBytes has already been correctly rotated
thumb = createThumbnail(
thumbSize, null, null, imageBytes, null, 0, 0, true);
a.getSavedImages().writeImage(thumb, imageBytes);
} else {
try {
// Generate thumb
Point size = getDefaultThumbnailSize(a.getResources());
Rect finalCropped = new Rect();
Utils.getMaxCropRect(hint.width(), hint.height(), size.x, size.y, false)
.roundOut(finalCropped);
finalCropped.offset(hint.left, hint.top);
InputStream in = a.getContentResolver().openInputStream(mUri);
BitmapRegionDecoder decoder = BitmapRegionDecoder.newInstance(in, true);
BitmapFactory.Options options = new BitmapFactory.Options();
options.inSampleSize = finalCropped.width() / size.x;
thumb = decoder.decodeRegion(finalCropped, options);
decoder.recycle();
Utils.closeSilently(in);
if (thumb != null) {
thumb = Bitmap.createScaledBitmap(thumb, size.x, size.y, true);
}
} catch (IOException e) { }
PointF center = a.mCropView.getCenter();
Float[] extras = new Float[] {
a.mCropView.getScale(),
center.x,
center.y
};
a.getSavedImages().writeImage(thumb, mUri, extras);
}
}
};
a.cropImageAndSetWallpaper(mUri, h, finishActivityWhenDone);
boolean shouldFadeOutOnFinish = a.getWallpaperParallaxOffset() == 0f;
a.cropImageAndSetWallpaper(mUri, h, finishActivityWhenDone, shouldFadeOutOnFinish);
}
@Override
public boolean isSelectable() {
@@ -192,7 +233,7 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
}
public static class FileWallpaperInfo extends WallpaperTileInfo {
private File mFile;
protected File mFile;
public FileWallpaperInfo(File target, Drawable thumb) {
mFile = target;
@@ -203,19 +244,26 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
a.setWallpaperButtonEnabled(false);
final BitmapRegionTileSource.UriBitmapSource bitmapSource =
new BitmapRegionTileSource.UriBitmapSource(a.getContext(), Uri.fromFile(mFile));
a.setCropViewTileSource(bitmapSource, false, true, null, new Runnable() {
a.setCropViewTileSource(bitmapSource, false, true, getCropViewScaleAndOffsetProvider(),
new Runnable() {
@Override
public void run() {
if (bitmapSource.getLoadingState() == BitmapSource.State.LOADED) {
if (bitmapSource.getLoadingState() == BitmapSource.State.LOADED) {
a.setWallpaperButtonEnabled(true);
}
}
});
}
protected CropViewScaleAndOffsetProvider getCropViewScaleAndOffsetProvider() {
return null;
}
@Override
public void onSave(WallpaperPickerActivity a) {
a.setWallpaper(Uri.fromFile(mFile), true);
boolean shouldFadeOutOnFinish = a.getWallpaperParallaxOffset() == 0f;
a.setWallpaper(Uri.fromFile(mFile), true, shouldFadeOutOnFinish);
}
@Override
public boolean isSelectable() {
@@ -241,16 +289,16 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
a.setWallpaperButtonEnabled(false);
final BitmapRegionTileSource.ResourceBitmapSource bitmapSource =
new BitmapRegionTileSource.ResourceBitmapSource(mResources, mResId);
a.setCropViewTileSource(bitmapSource, false, false, new CropViewScaleProvider() {
a.setCropViewTileSource(bitmapSource, false, false, new CropViewScaleAndOffsetProvider() {
@Override
public float getScale(TileSource src) {
Point wallpaperSize = WallpaperUtils.getDefaultWallpaperSize(
a.getResources(), a.getWindowManager());
RectF crop = Utils.getMaxCropRect(
src.getImageWidth(), src.getImageHeight(),
wallpaperSize.x, wallpaperSize.y, false);
return wallpaperSize.x / crop.width();
public float getScale(Point wallpaperSize, RectF crop) {
return wallpaperSize.x /crop.width();
}
@Override
public float getParallaxOffset() {
return a.getWallpaperParallaxOffset();
}
}, new Runnable() {
@@ -265,7 +313,9 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
@Override
public void onSave(WallpaperPickerActivity a) {
boolean finishActivityWhenDone = true;
a.cropImageAndSetWallpaper(mResources, mResId, finishActivityWhenDone);
boolean shouldFadeOutOnFinish = true;
a.cropImageAndSetWallpaper(mResources, mResId, finishActivityWhenDone,
shouldFadeOutOnFinish);
}
@Override
public boolean isSelectable() {
@@ -296,27 +346,81 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
LoadRequest req = new LoadRequest();
req.moveToLeft = false;
req.touchEnabled = false;
req.scaleProvider = new CropViewScaleProvider() {
@Override
public float getScale(TileSource src) {
return 1f;
}
};
req.scaleAndOffsetProvider = new CropViewScaleAndOffsetProvider();
req.result = new DrawableTileSource(a.getContext(),
defaultWallpaper, DrawableTileSource.MAX_PREVIEW_SIZE);
a.onLoadRequestComplete(req, true);
}
@Override
public void onSave(WallpaperPickerActivity a) {
try {
WallpaperManager.getInstance(a.getContext()).clear();
a.setResult(Activity.RESULT_OK);
} catch (IOException e) {
Log.w("Setting wallpaper to default threw exception", e);
public void onSave(final WallpaperPickerActivity a) {
if (!Utilities.isNycOrAbove()) {
try {
WallpaperManager.getInstance(a.getContext()).clear();
a.setResult(Activity.RESULT_OK);
} catch (IOException e) {
Log.e(TAG, "Setting wallpaper to default threw exception", e);
} catch (SecurityException e) {
Log.w(TAG, "Setting wallpaper to default threw exception", e);
// In this case, clearing worked; the exception was thrown afterwards.
a.setResult(Activity.RESULT_OK);
}
a.finish();
} else {
BitmapCropTask.OnEndCropHandler onEndCropHandler
= new BitmapCropTask.OnEndCropHandler() {
@Override
public void run(boolean cropSucceeded) {
if (cropSucceeded) {
a.setResult(Activity.RESULT_OK);
}
a.finish();
}
};
BitmapCropTask setWallpaperTask = getDefaultWallpaperCropTask(a, onEndCropHandler);
NycWallpaperUtils.executeCropTaskAfterPrompt(a, setWallpaperTask,
a.getOnDialogCancelListener());
}
a.finish();
}
@NonNull
private BitmapCropTask getDefaultWallpaperCropTask(final WallpaperPickerActivity a,
final BitmapCropTask.OnEndCropHandler onEndCropHandler) {
return new BitmapCropTask(a, null, null, -1, -1, -1,
true, false, onEndCropHandler) {
@Override
protected Boolean doInBackground(Integer... params) {
int whichWallpaper = params[0];
boolean succeeded = true;
try {
if (whichWallpaper == NycWallpaperUtils.FLAG_SET_LOCK) {
Bitmap defaultWallpaper = ((BitmapDrawable) WallpaperManager
.getInstance(a.getApplicationContext()).getBuiltInDrawable())
.getBitmap();
ByteArrayOutputStream tmpOut = new ByteArrayOutputStream(2048);
if (defaultWallpaper.compress(Bitmap.CompressFormat.PNG, 100,
tmpOut)) {
byte[] outByteArray = tmpOut.toByteArray();
NycWallpaperUtils.setStream(a.getApplicationContext(),
new ByteArrayInputStream(outByteArray), null, true,
NycWallpaperUtils.FLAG_SET_LOCK);
}
} else {
NycWallpaperUtils.clear(a, whichWallpaper);
}
} catch (IOException e) {
Log.e(TAG, "Setting wallpaper to default threw exception", e);
succeeded = false;
} catch (SecurityException e) {
Log.w(TAG, "Setting wallpaper to default threw exception", e);
// In this case, clearing worked; the exception was thrown afterwards.
succeeded = true;
}
return succeeded;
}
};
}
@Override
public boolean isSelectable() {
return true;
@@ -433,10 +537,10 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
}
return;
}
setWallpaperButtonEnabled(true);
WallpaperTileInfo info = (WallpaperTileInfo) v.getTag();
if (info.isSelectable() && v.getVisibility() == View.VISIBLE) {
selectTile(v);
setWallpaperButtonEnabled(true);
}
info.onClick(WallpaperPickerActivity.this);
}
@@ -461,6 +565,8 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
}
};
mWallpaperParallaxOffset = getIntent().getFloatExtra(EXTRA_WALLPAPER_OFFSET, 0);
// Populate the built-in wallpapers
ArrayList<WallpaperTileInfo> wallpapers = findBundledWallpapers();
mWallpapersView = (LinearLayout) findViewById(R.id.wallpaper_list);
@@ -550,7 +656,7 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
new View.OnClickListener() {
@Override
public void onClick(View v) {
// Ensure that a tile is slelected and loaded.
// Ensure that a tile is selected and loaded.
if (mSelectedTile != null && mCropView.getTileSource() != null) {
// Prevent user from selecting any new tile.
mWallpaperStrip.setVisibility(View.GONE);
@@ -559,9 +665,9 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
WallpaperTileInfo info = (WallpaperTileInfo) mSelectedTile.getTag();
info.onSave(WallpaperPickerActivity.this);
} else {
// no tile was selected, so we just finish the activity and go back
setResult(Activity.RESULT_OK);
finish();
// This case shouldn't be possible, since "Set wallpaper" is disabled
// until user clicks on a title.
Log.w(TAG, "\"Set wallpaper\" was clicked when no tile was selected");
}
}
});
@@ -661,6 +767,10 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
mSetWallpaperButton.setEnabled(enabled);
}
public float getWallpaperParallaxOffset() {
return mWallpaperParallaxOffset;
}
@Thunk void selectTile(View v) {
if (mSelectedTile != null) {
mSelectedTile.setSelected(false);
@@ -834,7 +944,7 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
(int) rotatedBounds[0], (int) rotatedBounds[1], width, height, leftAligned);
cropTask.setCropBounds(cropRect);
if (cropTask.cropBitmap()) {
if (cropTask.cropBitmap(NycWallpaperUtils.FLAG_SET_SYSTEM)) {
return cropTask.getCroppedBitmap();
} else {
return null;
@@ -842,12 +952,31 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
}
private void addTemporaryWallpaperTile(final Uri uri, boolean fromRestore) {
mTempWallpaperTiles.add(uri);
// Add a tile for the image picked from Gallery
final FrameLayout pickedImageThumbnail = (FrameLayout) getLayoutInflater().
inflate(R.layout.wallpaper_picker_item, mWallpapersView, false);
pickedImageThumbnail.setVisibility(View.GONE);
mWallpapersView.addView(pickedImageThumbnail, 0);
// Add a tile for the image picked from Gallery, reusing the existing tile if there is one.
FrameLayout existingImageThumbnail = null;
int indexOfExistingTile = 0;
for (; indexOfExistingTile < mWallpapersView.getChildCount(); indexOfExistingTile++) {
FrameLayout thumbnail = (FrameLayout) mWallpapersView.getChildAt(indexOfExistingTile);
Object tag = thumbnail.getTag();
if (tag instanceof UriWallpaperInfo && ((UriWallpaperInfo) tag).mUri.equals(uri)) {
existingImageThumbnail = thumbnail;
break;
}
}
final FrameLayout pickedImageThumbnail;
if (existingImageThumbnail != null) {
pickedImageThumbnail = existingImageThumbnail;
// Always move the existing wallpaper to the front so user can see it without scrolling.
mWallpapersView.removeViewAt(indexOfExistingTile);
mWallpapersView.addView(existingImageThumbnail, 0);
} else {
// This is the first time this temporary wallpaper has been added
pickedImageThumbnail = (FrameLayout) getLayoutInflater()
.inflate(R.layout.wallpaper_picker_item, mWallpapersView, false);
pickedImageThumbnail.setVisibility(View.GONE);
mWallpapersView.addView(pickedImageThumbnail, 0);
mTempWallpaperTiles.add(uri);
}
// Load the thumbnail
final ImageView image = (ImageView) pickedImageThumbnail.findViewById(R.id.wallpaper_image);
@@ -857,7 +986,8 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
protected Bitmap doInBackground(Void...args) {
try {
int rotation = BitmapUtils.getRotationFromExif(context, uri);
return createThumbnail(defaultSize, context, uri, null, null, 0, rotation, false);
return createThumbnail(defaultSize, context, uri, null, null, 0, rotation,
false);
} catch (SecurityException securityException) {
if (isActivityDestroyed()) {
// Temporarily granted permissions are revoked when the activity
@@ -1160,11 +1290,6 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
@Override
public boolean enableRotation() {
// Check if rotation is enabled for this device.
if (Utilities.isRotationAllowedForDevice(getContext()))
return true;
// Check if the user has specifically enabled rotation via preferences.
return Utilities.isAllowRotationPrefEnabled(getApplicationContext(), true);
return true;
}
}
@@ -159,6 +159,7 @@ public class BitmapRegionTileSource implements TiledImageRenderer.TileSource {
public enum State { NOT_LOADED, LOADED, ERROR_LOADING };
private State mState = State.NOT_LOADED;
/** Returns whether loading was successful. */
public boolean loadInBackground(InBitmapProvider bitmapProvider) {
ExifInterface ei = new ExifInterface();
if (readExif(ei)) {
@@ -193,7 +194,7 @@ public class BitmapRegionTileSource implements TiledImageRenderer.TileSource {
try {
mPreview = loadPreviewBitmap(opts);
} catch (IllegalArgumentException e) {
Log.d(TAG, "Unable to reusage bitmap", e);
Log.d(TAG, "Unable to reuse bitmap", e);
opts.inBitmap = null;
mPreview = null;
}
@@ -202,6 +203,10 @@ public class BitmapRegionTileSource implements TiledImageRenderer.TileSource {
if (mPreview == null) {
mPreview = loadPreviewBitmap(opts);
}
if (mPreview == null) {
mState = State.ERROR_LOADING;
return false;
}
// Verify that the bitmap can be used on GL surface
try {
@@ -212,7 +217,7 @@ public class BitmapRegionTileSource implements TiledImageRenderer.TileSource {
Log.d(TAG, "Image cannot be rendered on a GL surface", e);
mState = State.ERROR_LOADING;
}
return true;
return mState == State.LOADED;
}
}
@@ -310,7 +315,7 @@ public class BitmapRegionTileSource implements TiledImageRenderer.TileSource {
Bitmap b = BitmapFactory.decodeStream(is, null, options);
Utils.closeSilently(is);
return b;
} catch (FileNotFoundException e) {
} catch (FileNotFoundException | OutOfMemoryError e) {
Log.e("BitmapRegionTileSource", "Failed to load URI " + mUri, e);
return null;
}
@@ -412,7 +417,8 @@ public class BitmapRegionTileSource implements TiledImageRenderer.TileSource {
"Failed to create preview of apropriate size! "
+ " in: %dx%d, out: %dx%d",
mWidth, mHeight,
preview.getWidth(), preview.getHeight()));
preview == null ? -1 : preview.getWidth(),
preview == null ? -1 : preview.getHeight()));
}
}
}
+17 -4
View File
@@ -3,7 +3,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.android.tools.build:gradle:1.5.0'
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.7.0'
}
}
@@ -21,6 +21,9 @@ android {
targetSdkVersion 23
versionCode 1
versionName "1.0"
testApplicationId "com.android.launcher3.tests"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
debug {
@@ -30,10 +33,16 @@ android {
sourceSets {
main {
res.srcDirs = ['res', 'WallpaperPicker/res']
main.java.srcDirs = ['src', 'WallpaperPicker/src']
java.srcDirs = ['src', 'WallpaperPicker/src']
manifest.srcFile 'AndroidManifest.xml'
proto.srcDirs 'protos/'
}
androidTest {
java.srcDirs = ['tests/src']
res.srcDirs = ['tests/res']
manifest.srcFile "tests/AndroidManifest.xml"
}
}
}
@@ -42,9 +51,13 @@ repositories {
}
dependencies {
compile 'com.android.support:support-v4:+'
compile 'com.android.support:recyclerview-v7:+'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-2'
testCompile 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
}
protobuf {
+11 -14
View File
@@ -4,6 +4,7 @@ import cgi
import codecs
import os
import pprint
import re
import shutil
import sys
import sqlite3
@@ -22,9 +23,10 @@ AUTO_FILE = DIR + "/launcher.db"
INDEX_FILE = DIR + "/index.html"
def usage():
print "usage: print_db.py launcher.db <sw600|sw720> -- prints a launcher.db"
print "usage: print_db.py <sw600|sw720> -- adb pulls a launcher.db from a device"
print " and prints it"
print "usage: print_db.py launcher.db <4x4|5x5|5x6|...> -- prints a launcher.db with"
print " the specified grid size (rows x cols)"
print "usage: print_db.py <4x4|5x5|5x6|...> -- adb pulls a launcher.db from a device"
print " and prints it with the specified grid size (rows x cols)"
print
print "The dump will be created in a directory called db_files in cwd."
print "This script will delete any db_files directory you have now"
@@ -41,7 +43,7 @@ def adb_root_remount():
def pull_file(fn):
print "pull_file: " + fn
rv = os.system("adb pull"
+ " /data/data/com.google.android.googlequicksearchbox/databases/launcher.db"
+ " /data/data/com.android.launcher3/databases/launcher.db"
+ " " + fn);
if rv != 0:
print "adb pull failed"
@@ -287,16 +289,11 @@ def process_file(fn):
def updateDeviceClassConstants(str):
global SCREENS, COLUMNS, ROWS, HOTSEAT_SIZE
devClass = str.lower()
if devClass == "sw600":
COLUMNS = 6
ROWS = 6
HOTSEAT_SIZE = 6
return True
elif devClass == "sw720":
COLUMNS = 8
ROWS = 6
HOTSEAT_SIZE = 8
match = re.search(r"(\d+)x(\d+)", str)
if match:
COLUMNS = int(match.group(1))
ROWS = int(match.group(2))
HOTSEAT_SIZE = 2 * int(COLUMNS / 2)
return True
return False
+11 -7
View File
@@ -15,11 +15,6 @@
public float getAlpha();
}
-keep class com.android.launcher3.BubbleTextView {
public void setFastScrollFocus(float);
public float getFastScrollFocus();
}
-keep class com.android.launcher3.ButtonDropTarget {
public int getTextColor();
}
@@ -52,8 +47,10 @@
}
-keep class com.android.launcher3.FastBitmapDrawable {
public int getBrightness();
public void setBrightness(int);
public void setDesaturation(float);
public float getDesaturation();
public void setBrightness(float);
public float getBrightness();
}
-keep class com.android.launcher3.MemoryDumpActivity {
@@ -69,3 +66,10 @@
public float getBackgroundAlpha();
public void setBackgroundAlpha(float);
}
# Proguard will strip new callbacks in LauncherApps.Callback from
# WrappedCallback if compiled against an older SDK. Don't let this happen.
-keep class com.android.launcher3.compat.** {
*;
}
+1 -2
View File
@@ -18,8 +18,7 @@ syntax = "proto2";
package launcher_backup;
option javanano_use_deprecated_package = true;
option java_package = "com.android.launcher3.backup";
option java_package = "com.android.launcher3.backup.nano";
option java_outer_classname = "BackupProtos";
message Key {
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1023 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Some files were not shown because too many files have changed in this diff Show More