Merge "Exposing custom actions using keyboard shortcut" into ub-launcher3-master
diff --git a/Android.mk b/Android.mk
index 9a3b09e..ad8ce02 100644
--- a/Android.mk
+++ b/Android.mk
@@ -52,6 +52,8 @@
LOCAL_FULL_LIBS_MANIFEST_FILES := $(LOCAL_PATH)/AndroidManifest-common.xml
+LOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.launcher3.*
+
include $(BUILD_PACKAGE)
#
diff --git a/protos/launcher_log.proto b/protos/launcher_log.proto
index 3730555..448cf64 100644
--- a/protos/launcher_log.proto
+++ b/protos/launcher_log.proto
@@ -62,6 +62,7 @@
WIDGET = 3;
FOLDER_ICON = 4;
DEEPSHORTCUT = 5;
+ SEARCHBOX = 6;
}
// Used to define what type of container a Target would represent.
diff --git a/res/layout-port/launcher.xml b/res/layout-port/launcher.xml
index a2e2f9b..dd981dd 100644
--- a/res/layout-port/launcher.xml
+++ b/res/layout-port/launcher.xml
@@ -77,8 +77,7 @@
android:id="@+id/apps_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:visibility="invisible"
- launcher:layout_ignoreInsets="true" />
+ android:visibility="invisible" />
</com.android.launcher3.dragndrop.DragLayer>
</com.android.launcher3.LauncherRootView>
diff --git a/res/layout-sw720dp/launcher.xml b/res/layout-sw720dp/launcher.xml
index 12c01b7..06cb550 100644
--- a/res/layout-sw720dp/launcher.xml
+++ b/res/layout-sw720dp/launcher.xml
@@ -76,8 +76,7 @@
android:id="@+id/apps_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:visibility="invisible"
- launcher:layout_ignoreInsets="true" />
+ android:visibility="invisible" />
</com.android.launcher3.dragndrop.DragLayer>
</com.android.launcher3.LauncherRootView>
diff --git a/res/layout/all_apps.xml b/res/layout/all_apps.xml
index 4909eb3..9268839 100644
--- a/res/layout/all_apps.xml
+++ b/res/layout/all_apps.xml
@@ -46,10 +46,10 @@
<!-- DO NOT CHANGE THE ID -->
<com.android.launcher3.allapps.AllAppsRecyclerView
android:id="@+id/apps_list_view"
+ android:layout_below="@+id/search_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal|top"
- android:layout_marginTop="@dimen/all_apps_search_bar_height"
android:clipToPadding="false"
android:descendantFocusability="afterDescendants"
android:focusable="true"
@@ -60,7 +60,6 @@
android:layout_width="match_parent"
android:layout_height="@dimen/all_apps_search_bar_height"
android:layout_gravity="center|top"
- android:paddingTop="@dimen/all_apps_search_bar_margin_top"
android:gravity="center|bottom"
android:orientation="horizontal"
android:saveEnabled="false">
@@ -68,8 +67,9 @@
<com.android.launcher3.ExtendedEditText
android:id="@+id/search_box_input"
android:layout_width="match_parent"
- android:layout_height="match_parent"
+ android:layout_height="@dimen/all_apps_search_bar_field_height"
android:background="@android:color/transparent"
+ android:layout_gravity="bottom"
android:focusableInTouchMode="true"
android:gravity="center"
android:imeOptions="actionSearch|flagNoExtractUi"
diff --git a/res/values-af/strings.xml b/res/values-af/strings.xml
index cde143e..9152ea5 100644
--- a/res/values-af/strings.xml
+++ b/res/values-af/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Raak en hou om \'n legstuk op te tel."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Dubbeltik en hou om \'n legstuk op te tel of gebruik gepasmaakte handelinge."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d breed by %2$d hoog"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Deursoek programme"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Laai tans programme …"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Geen programme gevind wat met \"<xliff:g id="QUERY">%1$s</xliff:g>\" ooreenstem nie"</string>
diff --git a/res/values-am/strings.xml b/res/values-am/strings.xml
index 53513a6..c20dc12 100644
--- a/res/values-am/strings.xml
+++ b/res/values-am/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"ፍርግም ለማንሳት ይንኩ እና ይያዙት"</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"አንድ ንዑስ ፕሮግራም ለመምረጥ ወይም ብጁ እርምጃዎችን ለመጠቀም ሁለቴ መታ አድርገው ይያዙ።"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d ስፋት በ%2$d ከፍታ"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"መተግበሪያዎችን ይፈልጉ"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"መተግበሪያዎችን በመጫን ላይ..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"ከ«<xliff:g id="QUERY">%1$s</xliff:g>» ጋር የሚዛመዱ ምንም መተግበሪያዎች አልተገኙም"</string>
diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml
index d7e57c3..c80d162 100644
--- a/res/values-ar/strings.xml
+++ b/res/values-ar/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"المس مع الاستمرار لاختيار إحدى الأدوات."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"انقر نقرًا مزدوجًا مع الاستمرار لاختيار أداة أو استخدم الإجراءات المخصصة."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"العرض %1$d الطول %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"البحث في التطبيقات"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"جارٍ تحميل التطبيقات…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"لم يتم العثور على أية تطبيقات تتطابق مع \"<xliff:g id="QUERY">%1$s</xliff:g>\""</string>
diff --git a/res/values-az-rAZ/strings.xml b/res/values-az-rAZ/strings.xml
index 625fa0c..1a4f31b 100644
--- a/res/values-az-rAZ/strings.xml
+++ b/res/values-az-rAZ/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Vidceti götürmək üçün toxunub saxlayın."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Vidceti götürmək üçün & iki dəfə toxunub saxlayın və ya fərdi fəaliyyətləri istifadə edin."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%2$d hündürlük %1$d enində"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Tətbiq Axtarın"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Tətbiqlər endirilir..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"\"<xliff:g id="QUERY">%1$s</xliff:g>\" sorğusuna uyğun Tətbiqlər tapılmadı"</string>
diff --git a/res/values-b+sr+Latn/strings.xml b/res/values-b+sr+Latn/strings.xml
index 9b0ca96..a9344f9 100644
--- a/res/values-b+sr+Latn/strings.xml
+++ b/res/values-b+sr+Latn/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Dodirnite i zadržite da biste izabrali vidžet."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Dvaput dodirnite i zadržite da biste izabrali vidžet ili koristite prilagođene radnje."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d×%2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"širina od %1$d i visina od %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Pretražite aplikacije"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Aplikacije se učitavaju..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Nije pronađena nijedna aplikacija za „<xliff:g id="QUERY">%1$s</xliff:g>“"</string>
diff --git a/res/values-be-rBY/strings.xml b/res/values-be-rBY/strings.xml
index f450091..f5dba2d 100644
--- a/res/values-be-rBY/strings.xml
+++ b/res/values-be-rBY/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Дакраніцеся і ўтрымлiвайце віджэт, каб выбр. яго."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Дакраніцеся двойчы і ўтрымлівайце, каб выбраць віджэт або выкарыстоўваць карыстальніцкія дзеянні."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"Шырына: %1$d, вышыня: %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Пошук у Праграмах"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Ідзе загрузка праграм…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Праграм, якія адпавядаюць запыту \"<xliff:g id="QUERY">%1$s</xliff:g>\", не знойдзена"</string>
diff --git a/res/values-bg/strings.xml b/res/values-bg/strings.xml
index 04786ab..2c6d3d4 100644
--- a/res/values-bg/strings.xml
+++ b/res/values-bg/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Докоснете и задръжте за избор на приспособление."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Докоснете двукратно и задръжте за избор на приспособление или използвайте персонализирани действия."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"Ширина %1$d и височина %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Търсене в приложенията"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Приложенията се зареждат…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Няма намерени приложения, съответстващи на „<xliff:g id="QUERY">%1$s</xliff:g>“"</string>
diff --git a/res/values-bn-rBD/strings.xml b/res/values-bn-rBD/strings.xml
index ca74b76..d5108e9 100644
--- a/res/values-bn-rBD/strings.xml
+++ b/res/values-bn-rBD/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"একটি উইজেট তুলতে তা স্পর্শ করে ধরে রাখুন৷"</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"কোনো উইজেট বেছে নিতে দুবার-আলতো চেপে ধরে থাকুন অথবা কাস্টম ক্রিয়াগুলি ব্যবহার করুন৷"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%2$d উচ্চতা অনুযায়ী %1$d প্রস্থ"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"অ্যাপ্লিকেশানগুলি অনুসন্ধান করুন"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"অ্যাপ্লিকেশানগুলি লোড হচ্ছে..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"\"<xliff:g id="QUERY">%1$s</xliff:g>\" এর সাথে মেলে এমন কোনো অ্যাপ্লিকেশান পাওয়া যায়নি"</string>
diff --git a/res/values-bs-rBA/strings.xml b/res/values-bs-rBA/strings.xml
index 560dde0..579b95a 100644
--- a/res/values-bs-rBA/strings.xml
+++ b/res/values-bs-rBA/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Dodirnite & i držite da biste uzeli dodatak."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Dvaput dodirnite & i držite da biste uzeli vidžet ili koristite prilagođene radnje."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"Širina %1$d, visina %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Pretraži aplikacije"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Aplikacije se učitavaju…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Nije pronađena nijedna aplikacija koja odgovara upitu \"<xliff:g id="QUERY">%1$s</xliff:g>\""</string>
diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml
index 4f174ae..4ba0498 100644
--- a/res/values-ca/strings.xml
+++ b/res/values-ca/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Mantén premut un widget per triar-lo."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Fes doble toc i mantén premut per seleccionar un widget o per utilitzar les accions personalitzades."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d d\'amplada per %2$d d\'alçada"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Cerca a les aplicacions"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"S\'estan carregant les aplicacions..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"No s\'ha trobat cap aplicació que coincideixi amb <xliff:g id="QUERY">%1$s</xliff:g>"</string>
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index a6a9dd6..373920c 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Widget vyberete dotykem a podržením."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Dvojitým klepnutím a podržením vyberte widget, případně použijte vlastní akce."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"šířka %1$d, výška %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Hledat aplikace"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Načítání aplikací…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Dotazu „<xliff:g id="QUERY">%1$s</xliff:g>“ neodpovídají žádné aplikace"</string>
diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml
index 99bc220..9304140 100644
--- a/res/values-da/strings.xml
+++ b/res/values-da/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Tryk på en widget, og hold den nede for at vælge."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Tryk to gange, og hold fingeren nede for at vælge en widget eller bruge tilpassede handlinger."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d i bredden og %2$d i højden"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Søg i Apps"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Indlæser apps…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Der blev ikke fundet nogen apps, som matcher \"<xliff:g id="QUERY">%1$s</xliff:g>\""</string>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 36ac06f..e461d46 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Zum Hinzufügen Widget berühren und halten"</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Zum Hinzufügen auf Widget doppeltippen und gedrückt halten oder benutzerdefinierte Aktionen verwenden."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d breit und %2$d hoch"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"In Apps suchen"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Apps werden geladen..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Keine Apps für \"<xliff:g id="QUERY">%1$s</xliff:g>\" gefunden"</string>
diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml
index 4d3f708..119232d 100644
--- a/res/values-el/strings.xml
+++ b/res/values-el/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Αγγίξτε παρατεταμένα για να πάρετε ένα γραφ.στοιχ."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Πατήστε δύο φορές παρατεταμένα για επιλογή γραφικού στοιχείου ή χρήση προσαρμοσμένων ενεργειών."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"Πλάτος %1$d επί ύψος %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Αναζήτηση εφαρμογών"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Φόρτωση εφαρμογών…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Δεν βρέθηκαν εφαρμογές για το ερώτημα \"<xliff:g id="QUERY">%1$s</xliff:g>\""</string>
diff --git a/res/values-en-rAU/strings.xml b/res/values-en-rAU/strings.xml
index 8c95ae1..44daaa8 100644
--- a/res/values-en-rAU/strings.xml
+++ b/res/values-en-rAU/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Touch & hold to pick up a widget."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Double-tap & hold to pick up a widget or use customised actions."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d wide by %2$d high"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Search Apps"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Loading Apps…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"No Apps found matching \"<xliff:g id="QUERY">%1$s</xliff:g>\""</string>
diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml
index 8c95ae1..44daaa8 100644
--- a/res/values-en-rGB/strings.xml
+++ b/res/values-en-rGB/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Touch & hold to pick up a widget."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Double-tap & hold to pick up a widget or use customised actions."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d wide by %2$d high"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Search Apps"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Loading Apps…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"No Apps found matching \"<xliff:g id="QUERY">%1$s</xliff:g>\""</string>
diff --git a/res/values-en-rIN/strings.xml b/res/values-en-rIN/strings.xml
index 8c95ae1..44daaa8 100644
--- a/res/values-en-rIN/strings.xml
+++ b/res/values-en-rIN/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Touch & hold to pick up a widget."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Double-tap & hold to pick up a widget or use customised actions."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d wide by %2$d high"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Search Apps"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Loading Apps…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"No Apps found matching \"<xliff:g id="QUERY">%1$s</xliff:g>\""</string>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index 4002b97..4bd6c88 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Mantén presionado el widget que desees elegir."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Presiona dos veces y mantén presionado para elegir un widget o usa una acción personalizada."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d de ancho por %2$d de alto"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Buscar aplicaciones"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Cargando aplicaciones…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"No hay aplicaciones que coincidan con <xliff:g id="QUERY">%1$s</xliff:g>."</string>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index a6340e0..a4fc620 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Mantén pulsado el widget que quieras seleccionar."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Toca dos veces y mantén pulsado el widget que quieras seleccionar o utiliza acciones personalizadas."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d de ancho por %2$d de alto"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Busca aplicaciones"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Cargando aplicaciones…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"No se han encontrado aplicaciones que contengan \"<xliff:g id="QUERY">%1$s</xliff:g>\""</string>
diff --git a/res/values-et-rEE/strings.xml b/res/values-et-rEE/strings.xml
index 9deeef9..feb63ca 100644
--- a/res/values-et-rEE/strings.xml
+++ b/res/values-et-rEE/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Vidina valimiseks vajutage ja hoidke seda all."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Topeltpuudutage ja hoidke vidina valimiseks või kohandatud toimingute kasutamiseks."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d lai ja %2$d kõrge"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Otsige rakendustest"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Rakenduste laadimine ..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Päringule „<xliff:g id="QUERY">%1$s</xliff:g>” ei vastanud ükski rakendus"</string>
diff --git a/res/values-eu-rES/strings.xml b/res/values-eu-rES/strings.xml
index 9bb9e36..76ef5c6 100644
--- a/res/values-eu-rES/strings.xml
+++ b/res/values-eu-rES/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Eduki sakatuta widgeta aukeratzeko."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Sakatu birritan eta eduki sakatuta widgeta aukeratzeko edo ekintza pertsonalizatuak erabiltzeko."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d zabal eta %2$d luze"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Bilatu aplikazioetan"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Aplikazioak kargatzen…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Ez da aurkitu \"<xliff:g id="QUERY">%1$s</xliff:g>\" bilaketarekin bat datorren aplikaziorik"</string>
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index 92f80f4..95675a7 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"برای انتخاب ابزارک لمس کنید و نگه دارید."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"برای انتخاب یک ابزارک، دو ضربه سریع بزنید و نگهدارید یا از اقدامات سفارشی استفاده کنید."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d عرض در %2$d طول"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"جستجوی برنامهها"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"در حال بارگیری برنامهها..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"هیچ برنامهای مطابق با «<xliff:g id="QUERY">%1$s</xliff:g>» پیدا نشد"</string>
diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml
index dd90ddc..40e6d96 100644
--- a/res/values-fi/strings.xml
+++ b/res/values-fi/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Valitse widget painamalla sitä pitkään."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Valitse widget tai käytä muokattuja toimintoja kaksoisnapauttamalla ja painamalla kohdetta pitkään."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"Leveys: %1$d, korkeus: %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Sovellushaku"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Ladataan sovelluksia…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"”<xliff:g id="QUERY">%1$s</xliff:g>” ei palauttanut sovelluksia."</string>
diff --git a/res/values-fr-rCA/strings.xml b/res/values-fr-rCA/strings.xml
index 1fb2e82..01d6b27 100644
--- a/res/values-fr-rCA/strings.xml
+++ b/res/values-fr-rCA/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Maintenez un doigt sur le widget pour l\'ajouter."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Touchez 2x un widget et maintenez doigt dessus pour l’ajouter ou utiliser des actions personnalisées"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d de largeur sur %2$d de hauteur"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Rechercher des applications"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Chargement des applications en cours..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Aucune application trouvée correspondant à « <xliff:g id="QUERY">%1$s</xliff:g> »"</string>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index 8154c66..f42748c 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"App. de manière prolongée pour sélectionner widget."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Appuyez 2 fois et maintenez la pression pour sélectionner widget ou utilisez actions personnalisées."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d x %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d de largeur et %2$d de hauteur"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Rechercher dans les applications"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Chargement des applications en cours…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Aucune application ne correspond à la requête \"<xliff:g id="QUERY">%1$s</xliff:g>\"."</string>
diff --git a/res/values-gl-rES/strings.xml b/res/values-gl-rES/strings.xml
index 06d95da..c03ecdc 100644
--- a/res/values-gl-rES/strings.xml
+++ b/res/values-gl-rES/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Mantén premido un widget para seleccionalo."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Toca dúas veces e mantén premido para seleccionar un widget ou utiliza accións personalizadas."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d de largo por %2$d de alto"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Aplicacións de busca"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Cargando aplicacións..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Non se atoparon aplicacións que coincidan con \"<xliff:g id="QUERY">%1$s</xliff:g>\""</string>
diff --git a/res/values-gu-rIN/strings.xml b/res/values-gu-rIN/strings.xml
index c5cdad3..39a176c 100644
--- a/res/values-gu-rIN/strings.xml
+++ b/res/values-gu-rIN/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"વિજેટ ચૂંટવા માટે ટચ કરો અને પકડી રાખો."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"વિજેટ ચૂંટવા અથવા કસ્ટમ ક્રિયાઓનો ઉપયોગ કરવા માટે બે વાર ટેપ કરો અને પકડી રાખો."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d પહોળાઈ X %2$d ઊંચાઈ"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"શોધ ઍપ્લિકેશનો"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"ઍપ્લિકેશનો લોડ કરી રહ્યું છે…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"\"<xliff:g id="QUERY">%1$s</xliff:g>\" થી મેળ ખાતી કોઈ ઍપ્લિકેશનો મળી નથી"</string>
diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml
index ee179c1..f534e1e 100644
--- a/res/values-hi/strings.xml
+++ b/res/values-hi/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"विजेट को चुनने के लिए स्पर्श करके रखें."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"कोई विजेट चुनने के लिए डबल टैप करके रखें या कस्टम कार्रवाइयां चुनें."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d चौड़ाई गुणा %2$d ऊंचाई"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"ऐप्स खोजें"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"ऐप्स लोड हो रहे हैं..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"\"<xliff:g id="QUERY">%1$s</xliff:g>\" से मिलान करने वाला कोई ऐप नहीं मिला"</string>
diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml
index 00bb190..b4fb50e 100644
--- a/res/values-hr/strings.xml
+++ b/res/values-hr/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Dodirnite i držite kako biste podigli widget."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Dodirnite dvaput i držite kako biste podigli widget ili pokušajte prilagođenim radnjama."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d širine i %2$d visine"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Pretraži aplikacije"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Učitavanje aplikacija…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Nema aplikacija podudarnih s upitom \"<xliff:g id="QUERY">%1$s</xliff:g>\""</string>
diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml
index 775365b..279749b 100644
--- a/res/values-hu/strings.xml
+++ b/res/values-hu/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Modul felvételéhez érintse meg, és tartsa lenyomva"</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Modul mozgatásához koppintson rá duplán és tartsa lenyomva, vagy használjon egyéni műveleteket."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d széles és %2$d magas"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Alkalmazások keresése"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Alkalmazások betöltése…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Egy alkalmazás sem található a(z) „<xliff:g id="QUERY">%1$s</xliff:g>” lekérdezésre."</string>
diff --git a/res/values-hy-rAM/strings.xml b/res/values-hy-rAM/strings.xml
index 1579614..c7401a9 100644
--- a/res/values-hy-rAM/strings.xml
+++ b/res/values-hy-rAM/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Հպեք և պահեք՝ վիջեթն ընտրելու համար:"</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Կրկնակի հպեք և պահեք՝ վիջեթ ավելացնելու համար կամ օգտվեք հարմարեցրած գործողություններից:"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"Լայնությունը՝ %1$d, բարձրությունը՝ %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Հավելվածների որոնում"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Հավելվածների բեռնում…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"«<xliff:g id="QUERY">%1$s</xliff:g>» հարցմանը համապատասխանող հավելվածներ չեն գտնվել"</string>
diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml
index 84f91a5..00e8d63 100644
--- a/res/values-in/strings.xml
+++ b/res/values-in/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Sentuh lama untuk memilih widget."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Ketuk dua kalip & tahan untuk mengambil widget atau menggunakan tindakan khusus."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"lebar %1$d x tinggi %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Telusuri Apps"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Memuat Aplikasi..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Tidak ditemukan Aplikasi yang cocok dengan \"<xliff:g id="QUERY">%1$s</xliff:g>\""</string>
diff --git a/res/values-is-rIS/strings.xml b/res/values-is-rIS/strings.xml
index 5937d96..7586ae3 100644
--- a/res/values-is-rIS/strings.xml
+++ b/res/values-is-rIS/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Haltu fingri á græju til að grípa hana."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Ýttu tvisvar og haltu fingri á græju til að grípa hana eða notaðu sérsniðnar aðgerðir."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d á breidd og %2$d á hæð"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Leita í forritum"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Hleður forrit…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Ekki fundust forrit sem samsvara „<xliff:g id="QUERY">%1$s</xliff:g>“"</string>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index 5db8c1a..b821222 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Tocca e tieni premuto per scegliere un widget."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Tocca due volte e tieni premuto per scegliere un widget o per utilizzare azioni personalizzate."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d di larghezza per %2$d di altezza"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Cerca app"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Caricamento di app…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Nessuna app trovata corrispondente a \"<xliff:g id="QUERY">%1$s</xliff:g>\""</string>
diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml
index c9721d8..ffea51f 100644
--- a/res/values-iw/strings.xml
+++ b/res/values-iw/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"גע נגיעה רציפה בווידג\'ט כדי לבחור בו."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"הקש פעמיים וגע נגיעה רציפה בווידג\'ט כדי לבחור בו, או השתמש בפעולות מותאמות אישית."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"רוחב %1$d על גובה %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"חפש אפליקציות"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"טוען אפליקציות…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"לא נמצאו אפליקציות התואמות ל-\"<xliff:g id="QUERY">%1$s</xliff:g>\""</string>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index 4961433..8729aba 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"ウィジェットを追加するには押し続けます。"</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"ダブルタップ後に押し続けてウィジェットを選択するか、カスタム操作を使用してください。"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$dx%2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"幅 %1$d、高さ %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"アプリを検索"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"アプリを読み込んでいます…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"「<xliff:g id="QUERY">%1$s</xliff:g>」に一致するアプリは見つかりませんでした"</string>
diff --git a/res/values-ka-rGE/strings.xml b/res/values-ka-rGE/strings.xml
index cac3b4d..1a200d7 100644
--- a/res/values-ka-rGE/strings.xml
+++ b/res/values-ka-rGE/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"შეეხეთ და დააყოვნეთ ვიჯეტის ასარჩევად."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"ორმაგად შეეხეთ და გეჭიროთ ვიჯეტის ასარჩევად ან მორგებული მოქმედებების გამოსაყენებლად."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"სიგრძე: %1$d, სიგანე: %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"აპების ძიება"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"აპები იტვირთება..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"„<xliff:g id="QUERY">%1$s</xliff:g>“-ის თანხვედრი აპები არ მოიძებნა"</string>
diff --git a/res/values-kk-rKZ/strings.xml b/res/values-kk-rKZ/strings.xml
index 68cd6c6..009fa4a 100644
--- a/res/values-kk-rKZ/strings.xml
+++ b/res/values-kk-rKZ/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Виджетті таңдау үшін түртіп, мықтап ұстаңыз."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Виджетті таңдау немесе арнаулы әрекеттерді таңдау үшін екі рет түртіп, ұстап тұрыңыз."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"Ені: %1$d, биіктігі: %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Қолданбаларды іздеу"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Қолданбалар жүктелуде…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"«<xliff:g id="QUERY">%1$s</xliff:g>» сұрауына сәйкес келетін қолданбалар жоқ"</string>
diff --git a/res/values-km-rKH/strings.xml b/res/values-km-rKH/strings.xml
index 87d31d5..864c979 100644
--- a/res/values-km-rKH/strings.xml
+++ b/res/values-km-rKH/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"ប៉ះ & សង្កត់ ដើម្បីជ្រើសធាតុក្រាហ្វិក។"</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"ប៉ះពីរដង ហើយចុចឲ្យជាប់ដើម្បីជ្រើសយកធាតុក្រាហ្វិក ឬប្រើសកម្មភាពផ្ទាល់ខ្លួន។"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"ទទឺង %1$d គុណនឹងកម្ពស់ %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"ស្វែងរកកម្មវិធី"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"កំពុងដំណើរការកម្មវិធី..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"គ្មានកម្មវិធីដែលត្រូវជាមួយ \"<xliff:g id="QUERY">%1$s</xliff:g>\" ទេ"</string>
diff --git a/res/values-kn-rIN/strings.xml b/res/values-kn-rIN/strings.xml
index eb5e8bd..befbd9a 100644
--- a/res/values-kn-rIN/strings.xml
+++ b/res/values-kn-rIN/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"ವಿಜೆಟ್ ಅನ್ನು ಆರಿಸಿಕೊಳ್ಳಲು ಸ್ಪರ್ಶಿಸಿ & ಹಿಡಿದುಕೊಳ್ಳಿ."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"ಡಬಲ್ ಟ್ಯಾಪ್ ಮಾಡಿ ಮತ್ತು ವಿಜೆಟ್ ಆರಿಸಿಕೊಳ್ಳಲು ಹೋಲ್ಡ್ ಮಾಡಿ ಅಥವಾ ಕಸ್ಟಮ್ ಕ್ರಿಯೆಗಳನ್ನು ಬಳಸಿ"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d ಅಗಲ ಮತ್ತು %2$d ಎತ್ತರ"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"ಅಪ್ಲಿಕೇಷನ್ಗಳನ್ನು ಹುಡುಕಿ"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"ಅಪ್ಲಿಕೇಶನ್ಗಳನ್ನು ಲೋಡ್ ಮಾಡಲಾಗುತ್ತಿದೆ..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"\"<xliff:g id="QUERY">%1$s</xliff:g>\" ಹೊಂದಿಕೆಯ ಯಾವುದೇ ಅಪ್ಲಿಕೇಶನ್ಗಳು ಕಂಡುಬಂದಿಲ್ಲ"</string>
@@ -70,7 +71,7 @@
<string name="allow_rotation_title" msgid="7728578836261442095">"ಮುಖಪುಟ ತಿರುಗುವಿಕೆಯನ್ನು ಅನುಮತಿಸಿ"</string>
<string name="allow_rotation_desc" msgid="8662546029078692509">"ಫೋನ್ ತಿರುಗಿಸಿದಾಗ"</string>
<string name="allow_rotation_blocked_desc" msgid="3212602545192996253">"ಪ್ರಸ್ತುತ ಪ್ರದರ್ಶನ ಸೆಟ್ಟಿಂಗ್ ತಿರುಗುವಿಕೆಯನ್ನು ಅನುಮತಿಸುವುದಿಲ್ಲ"</string>
- <string name="package_state_unknown" msgid="7592128424511031410">"ಅಜ್ಞಾತ"</string>
+ <string name="package_state_unknown" msgid="7592128424511031410">"ಅಪರಿಚಿತ"</string>
<string name="abandoned_clean_this" msgid="7610119707847920412">"ತೆಗೆದುಹಾಕಿ"</string>
<string name="abandoned_search" msgid="891119232568284442">"ಹುಡುಕು"</string>
<string name="abandoned_promises_title" msgid="7096178467971716750">"ಈ ಅಪ್ಲಿಕೇಶನ್ ಸ್ಥಾಪನೆಗೊಂಡಿಲ್ಲ"</string>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index bf8e780..1ef438f 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"위젯을 선택하려면 길게 터치하세요."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"위젯을 선택하려면 두 번 탭한 다음 길게 터치하거나 맞춤 액션을 사용합니다."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d×%2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"너비 %1$d, 높이 %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"앱 검색"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"앱 로드 중..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"\'<xliff:g id="QUERY">%1$s</xliff:g>\'와(과) 일치하는 앱이 없습니다."</string>
diff --git a/res/values-ky-rKG/strings.xml b/res/values-ky-rKG/strings.xml
index 817f8cc..71e02d0 100644
--- a/res/values-ky-rKG/strings.xml
+++ b/res/values-ky-rKG/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Виджетти тандаш үчүн, басып туруңуз"</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Виджет тандоо үчүн эки жолу таптап, кармап туруңуз же ыңгайлаштырылган аракеттерди колдонуңуз."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"Туурасы: %1$d, бийиктиги: %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Колдонмолорду издөө"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Колдонмолор жүктөлүүдө…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"\"<xliff:g id="QUERY">%1$s</xliff:g>\" дал келген колдонмолор табылган жок"</string>
diff --git a/res/values-lo-rLA/strings.xml b/res/values-lo-rLA/strings.xml
index 8329577..e231102 100644
--- a/res/values-lo-rLA/strings.xml
+++ b/res/values-lo-rLA/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"ສຳພັດຄ້າງໄວ້ ເພື່ອຈັບວິດເຈັດ."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"ແຕະຄ້າງໄວ້ ເພື່ອເລືອກວິດເຈັດ ຫຼື ໃຊ້ການດຳເນີນການກຳນົດເອງ."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"ກວ້າງ %1$d ຄູນສູງ %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"ຊອກຫາແອັບ"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"ກຳລັງໂຫລດແອັບ..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"ບໍ່ພົບແອັບໃດທີ່ກົງກັນ \"<xliff:g id="QUERY">%1$s</xliff:g>\""</string>
diff --git a/res/values-lt/strings.xml b/res/values-lt/strings.xml
index 272c559..13ebaa3 100644
--- a/res/values-lt/strings.xml
+++ b/res/values-lt/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Palieskite ir laikykite, kad pasirinkt. valdiklį."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Dukart palieskite ir laikykite, kad pasirinktumėte valdiklį ar naudotumėte tinkintus veiksmus."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d plotis ir %2$d aukštis"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Ieškoti programų"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Įkeliamos programos..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Nerasta jokių užklausą „<xliff:g id="QUERY">%1$s</xliff:g>“ atitinkančių programų"</string>
diff --git a/res/values-lv/strings.xml b/res/values-lv/strings.xml
index d60682e..924b399 100644
--- a/res/values-lv/strings.xml
+++ b/res/values-lv/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Lai izvēlētos logrīku, pieskarieties un turiet to."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Lai atlasītu logrīku, veiciet dubultskārienu uz tā un turiet to vai arī veiciet pielāgotas darbības."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d plats un %2$d augsts"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Meklēt lietotnes"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Notiek lietotņu ielāde…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Vaicājumam “<xliff:g id="QUERY">%1$s</xliff:g>” neatbilda neviena lietotne."</string>
diff --git a/res/values-mk-rMK/strings.xml b/res/values-mk-rMK/strings.xml
index 7e9abaf..7e44707 100644
--- a/res/values-mk-rMK/strings.xml
+++ b/res/values-mk-rMK/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Допри и задржи за да се избере виџетот."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Допрете двапати и задржете за да изберете додаток или да користите приспособени дејства."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d широк на %2$d висок"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Пребарување апликации"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Се вчитуваат апликации…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Не се најдени апликации што одговараат на „<xliff:g id="QUERY">%1$s</xliff:g>“"</string>
diff --git a/res/values-ml-rIN/strings.xml b/res/values-ml-rIN/strings.xml
index 607db55..941d1ac 100644
--- a/res/values-ml-rIN/strings.xml
+++ b/res/values-ml-rIN/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"ഒരു വിജറ്റ് ചേർക്കുന്നതിന് അത് സ്പർശിച്ച് പിടിക്കുക."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"വിജറ്റ് തിരഞ്ഞെടുക്കാനോ ഇഷ്ടാനുസൃത പ്രവർത്തനങ്ങൾ ഉപയോഗിക്കാനോ രണ്ടുതവണ ടാപ്പുചെയ്ത് പിടിക്കുക."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d വീതിയും %2$d ഉയരവും"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"ആപ്പ്സ് തിരയുക"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"ആപ്പ്സ് ലോഡുചെയ്യുന്നു..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"\"<xliff:g id="QUERY">%1$s</xliff:g>\" എന്നതുമായി പൊരുത്തപ്പെടുന്ന ആപ്പ്സൊന്നും കണ്ടെത്തിയില്ല"</string>
diff --git a/res/values-mn-rMN/strings.xml b/res/values-mn-rMN/strings.xml
index 600b5fc..45e1856 100644
--- a/res/values-mn-rMN/strings.xml
+++ b/res/values-mn-rMN/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Виджетийг авах бол хүрээд барина уу."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Жижиг хэрэгсэл авах болон тохируулсан үйлдлийг ашиглахын тулд 2 удаа товшоод барина уу."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d өргөн %2$d өндөр"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Апп хайх"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Аппликейшныг ачаалж байна..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"\"<xliff:g id="QUERY">%1$s</xliff:g>\"-д нийцэх апп олдсонгүй"</string>
diff --git a/res/values-mr-rIN/strings.xml b/res/values-mr-rIN/strings.xml
index b680fea..1ec443c 100644
--- a/res/values-mr-rIN/strings.xml
+++ b/res/values-mr-rIN/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"विजेट निवडण्यासाठी स्पर्श करा आणि धरून ठेवा."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"एक विजेट निवडण्यासाठी दोनदा टॅप करा आणि धरून ठेवा किंवा सानुकूल क्रिया वापरा."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d रूंद बाय %2$d उंच"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"अॅप्स शोधा"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"अॅप्स लोड करीत आहे..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"\"<xliff:g id="QUERY">%1$s</xliff:g>\" शी जुळणारे कोणतेही अॅप्स आढळले नाहीत"</string>
diff --git a/res/values-ms-rMY/strings.xml b/res/values-ms-rMY/strings.xml
index 6a2b104..215315a 100644
--- a/res/values-ms-rMY/strings.xml
+++ b/res/values-ms-rMY/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Sentuh & tahan untuk mengambil widget."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Ketik dua kali & tahan untuk mengambil widget atau menggunakan tindakan tersuai"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"Lebar %1$d kali tinggi %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Cari Apl"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Memuatkan Apl…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Tiada Apl yang ditemui sepadan dengan \"<xliff:g id="QUERY">%1$s</xliff:g>\""</string>
diff --git a/res/values-my-rMM/strings.xml b/res/values-my-rMM/strings.xml
index 6d3003a..bc4e484 100644
--- a/res/values-my-rMM/strings.xml
+++ b/res/values-my-rMM/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"ဝဒ်ဂျက်တစ်ခုကို ကောက်ယူရန် ဖိနှိပ်ထားပါ"</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"ဝစ်ဂျက်တစ်ခုကိုရယူရန် သို့မဟုတ် စိတ်ကြိုက်လုပ်ဆောင်မှုများကို အသုံးပြုရန် နှစ်ချက်တို့ပြီး ကိုင်ထားပါ။"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"အလျား %1$d နှင့် အမြင့် %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"ရှာဖွေမှု အက်ပ်များ"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"အက်ပ်များ ရယူနေစဉ်..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"\"<xliff:g id="QUERY">%1$s</xliff:g>\" နှင့်ကိုက်ညီသည့် အပ်ဖ်များမတွေ့ပါ"</string>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index 16f22ea..449094d 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Trykk og hold inne for å plukke opp en modul."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Dobbelttrykk og hold inne for å velge en modul eller bruke tilpassede handlinger."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d bredde x %2$d høyde"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Søk i apper"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Laster inn apper …"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Fant ingen apper som samsvarer med «<xliff:g id="QUERY">%1$s</xliff:g>»"</string>
diff --git a/res/values-ne-rNP/strings.xml b/res/values-ne-rNP/strings.xml
index 61d054f..8accfcc 100644
--- a/res/values-ne-rNP/strings.xml
+++ b/res/values-ne-rNP/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"एउटा विजेटलाई टिप्नको लागि टच गरेर होल्ड गर्नुहोस्।"</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"विजेटलाई छान्न वा अनुकूलन कार्यहरू प्रयोग गर्न डबल ट्याप गरी होल्ड गर्नुहोस्।"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d चौडाइ गुणा %2$d उचाइ"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"अनुप्रयोगहरू खोज्नुहोस्"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"अनुप्रयोगहरू लोड गरिँदै..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"\"<xliff:g id="QUERY">%1$s</xliff:g>\" सँग मिल्दो कुनै अनुप्रयोगहरू फेला परेनन्"</string>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index 24ee20d..0134ae1 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Blijf aanraken om een widget toe te voegen."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Dubbeltik en blijf aanraken om een widget toe te voegen of aangepaste acties te gebruiken."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d breed en %2$d hoog"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Apps zoeken"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Apps laden…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Er zijn geen apps gevonden die overeenkomen met \'<xliff:g id="QUERY">%1$s</xliff:g>\'"</string>
diff --git a/res/values-pa-rIN/strings.xml b/res/values-pa-rIN/strings.xml
index e41e46c..3be9bec 100644
--- a/res/values-pa-rIN/strings.xml
+++ b/res/values-pa-rIN/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"ਇੱਕ ਵਿਜੇਟ ਚੁਣਨ ਲਈ ਛੋਹਵੋT & ਹੋਲਡ ਕਰੋ।"</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"ਡਬਲ-ਟੈਪ & ਇੱਕ ਵਿਜੇਟ ਚੁਣਨ ਲਈ ਹੋਲਡ ਕਰੋ ਅਤੇ ਕਸਟਮ ਕਿਰਿਆਵਾਂ ਵਰਤੋ।"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d ਚੌੜਾਈ ਅਤੇ %2$d ਲੰਬਾਈ"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"ਐਪਸ ਖੋਜੋ"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"ਐਪਾਂ ਨੂੰ ਲੋਡ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"\"<xliff:g id="QUERY">%1$s</xliff:g>\" ਨਾਲ ਮਿਲਦੀਆਂ ਕੋਈ ਵੀ ਐਪਾਂ ਨਹੀਂ ਮਿਲੀਆਂ"</string>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index a230856..feb2a36 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Aby dodać widżet, kliknij go i przytrzymaj."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Kliknij dwukrotnie i przytrzymaj, by wybrać widżet lub użyć działań niestandardowych."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"Szerokość %1$d, wysokość %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Szukaj w aplikacjach"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Wczytuję aplikacje…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Nie znaleziono aplikacji pasujących do zapytania „<xliff:g id="QUERY">%1$s</xliff:g>”"</string>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index d1e37c1..6d684fa 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Prima sem soltar para escolher um widget."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Toque duas vezes sem soltar para escolher um widget ou utilize ações personalizadas."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d de largura por %2$d de altura"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Pesquisar aplicações"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"A carregar aplicações..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Não foram encontradas aplic. que correspondam a \"<xliff:g id="QUERY">%1$s</xliff:g>\""</string>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index ac0c828..82a756f 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Toque e pressione para selecionar um widget."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Toque duas vezes e segure para selecionar um widget ou usar ações personalizadas."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d de largura por %2$d de altura"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Pesquisar apps"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Carregando apps…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Nenhum app encontrado que corresponda a \"<xliff:g id="QUERY">%1$s</xliff:g>\""</string>
diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml
index 22a2e4e..5905bcf 100644
--- a/res/values-ro/strings.xml
+++ b/res/values-ro/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Atingeți lung un widget pentru a-l alege."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Atingeți de două ori și mențineți apăsat ca să alegeți un widget sau folosiți acțiuni personalizate."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d lățime și %2$d înălțime"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Căutați aplicații"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Se încarcă aplicațiile..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Nu s-a găsit nicio aplicație pentru „<xliff:g id="QUERY">%1$s</xliff:g>”"</string>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index 73bbbf8..ad30c97 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Чтобы выбрать виджет, нажмите на значок и удерживайте его."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Чтобы выбрать виджет, нажмите на него дважды и не отпускайте или выполните предложенные действия."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d x %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"Ширина %1$d, высота %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Поиск приложений"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Загрузка…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"По запросу \"<xliff:g id="QUERY">%1$s</xliff:g>\" ничего не найдено"</string>
diff --git a/res/values-si-rLK/strings.xml b/res/values-si-rLK/strings.xml
index 82bb226..1e0ed28 100644
--- a/res/values-si-rLK/strings.xml
+++ b/res/values-si-rLK/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"විජට් එක ස්පර්ශ කර අහුලා ගැනීමට අල්ලාගෙන සිටින්න."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"විජට් එකක් අහුලා ගැනීමට හෝ අභිරුචි ක්රියා කිරීමට ඩබල් ටැප් කර අල්ලා ගෙන සිටින්න."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"පළල %1$d උස %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"යෙදුම් සෙවීම"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"යෙදුම් පූරණය වෙමින්…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"\"<xliff:g id="QUERY">%1$s</xliff:g>\" සමග ගැළපෙන යෙදුම් හමු නොවිණි"</string>
diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml
index 4e541ce..7210d79 100644
--- a/res/values-sk/strings.xml
+++ b/res/values-sk/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Miniaplikáciu pridáte stlačením a podržaním."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Miniaplikáciu pridáte dvojitým klepnutím a pridržaním alebo pomocou vlastných akcií."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"šírka %1$d, výška %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Hľadať aplikácie"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Načítavajú sa aplikácie..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Nenašli sa žiadne aplikácie zodpovedajúce dopytu <xliff:g id="QUERY">%1$s</xliff:g>"</string>
diff --git a/res/values-sl/strings.xml b/res/values-sl/strings.xml
index c8693b8..b55cb0d 100644
--- a/res/values-sl/strings.xml
+++ b/res/values-sl/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Za izbiro pripomočka se ga dotaknite in pridržite."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Če želite izbrati pripomoček ali uporabiti dejanja po meri, se ga dvakrat dotaknite in ga pridržite."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"Širina %1$d, višina %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Iskanje po aplikacijah"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Nalaganje aplikacij …"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Ni aplikacij, ki bi ustrezale poizvedbi »<xliff:g id="QUERY">%1$s</xliff:g>«"</string>
diff --git a/res/values-sq-rAL/strings.xml b/res/values-sq-rAL/strings.xml
index caa65b2..c4fbaf3 100644
--- a/res/values-sq-rAL/strings.xml
+++ b/res/values-sq-rAL/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Prek dhe mbaj shtypur për të zgjedhur një miniaplikacion."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Prek dy herë dhe mbaj shtypur për të zgjedhur një miniaplikacion ose për të përdorur veprimet e personalizuara."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d i gjerë me %2$d i lartë"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Kërko për aplikacione"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Po ngarkon aplikacionet..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Nuk u gjet asnjë aplikacion që përputhet me \"<xliff:g id="QUERY">%1$s</xliff:g>\""</string>
diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml
index 856f647..67a63cf 100644
--- a/res/values-sr/strings.xml
+++ b/res/values-sr/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Додирните и задржите да бисте изабрали виџет."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Двапут додирните и задржите да бисте изабрали виџет или користите прилагођене радње."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d×%2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"ширина од %1$d и висина од %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Претражите апликације"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Апликације се учитавају..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Није пронађена ниједна апликација за „<xliff:g id="QUERY">%1$s</xliff:g>“"</string>
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index 1d405ba..dfcc1b0 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Tryck länge om du vill flytta en widget."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Tryck två gånger och håll kvar om du vill ta upp en widget eller använda anpassade åtgärder."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d bred gånger %2$d hög"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Sök efter appar"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Läser in appar …"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Det gick inte att hitta några appar som matchar <xliff:g id="QUERY">%1$s</xliff:g>"</string>
diff --git a/res/values-sw/strings.xml b/res/values-sw/strings.xml
index 0e7b768..03c8f06 100644
--- a/res/values-sw/strings.xml
+++ b/res/values-sw/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Gusa na ushikilie ili kuteua wijeti."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Gonga mara mbili na ushikilie ile uchague wijeti au utumie vitendo maalum."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"Upana wa %1$d na kimo cha %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Tafuta Programu"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Inapakia Programu..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Haikupata programu zinazolingana na \"<xliff:g id="QUERY">%1$s</xliff:g>\""</string>
diff --git a/res/values-ta-rIN/strings.xml b/res/values-ta-rIN/strings.xml
index 87081aa..7db0ae4 100644
--- a/res/values-ta-rIN/strings.xml
+++ b/res/values-ta-rIN/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"விட்ஜெட்டைத் தேர்வுசெய்ய தொட்டுப் பிடிக்கவும்."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"விட்ஜெட்டைத் தேர்ந்தெடுக்க இருமுறை தட்டிப் பிடிக்கவும் அல்லது தனிப்பயன் செயல்களைப் பயன்படுத்தவும்."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d அகலத்திற்கு %2$d உயரம்"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"பயன்பாடுகளில் தேடுக"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"பயன்பாடுகளை ஏற்றுகிறது..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"\"<xliff:g id="QUERY">%1$s</xliff:g>\" உடன் பொருந்தும் பயன்பாடுகள் இல்லை"</string>
diff --git a/res/values-te-rIN/strings.xml b/res/values-te-rIN/strings.xml
index 2fda6a5..4e8b86f 100644
--- a/res/values-te-rIN/strings.xml
+++ b/res/values-te-rIN/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"విడ్జెట్ను ఎంచుకోవడానికి తాకి & నొక్కి పెట్టండి."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"విడ్జెట్ను ఎంచుకోవడానికి లేదా అనుకూల చర్యలను ఉపయోగించడానికి రెండుసార్లు నొక్కి, ఉంచండి."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d వెడల్పు X %2$d ఎత్తు"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"అనువర్తనాలను శోధించండి"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"అనువర్తనాలను లోడ్ చేస్తోంది…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"\"<xliff:g id="QUERY">%1$s</xliff:g>\"కి సరిపోలే అనువర్తనాలేవీ కనుగొనబడలేదు"</string>
diff --git a/res/values-th/strings.xml b/res/values-th/strings.xml
index 8ad5a7c..90dec72 100644
--- a/res/values-th/strings.xml
+++ b/res/values-th/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"แตะค้างเพื่อรับวิดเจ็ต"</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"แตะ 2 ครั้งค้างไว้เพื่อเลือกวิดเจ็ตหรือใช้การกระทำที่กำหนดเอง"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"กว้าง %1$d x สูง %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"ค้นหาแอป"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"กำลังโหลดแอป…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"ไม่พบแอปที่ตรงกับ \"<xliff:g id="QUERY">%1$s</xliff:g>\""</string>
diff --git a/res/values-tl/strings.xml b/res/values-tl/strings.xml
index 922cb53..b944ebc 100644
--- a/res/values-tl/strings.xml
+++ b/res/values-tl/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Pindutin nang matagal upang kumuha ng widget."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"I-double tap nang matagal upang pumili ng widget o gumamit ng mga custom na pagkilos."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d ang lapad at %2$d ang taas"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Mga App sa Paghahanap"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Nilo-load ang Mga App…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Walang nakitang Mga App na tumutugma sa \"<xliff:g id="QUERY">%1$s</xliff:g>\""</string>
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index 08d5d52..e95ee2d 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Widget seçmek için dokunun ve basılı tutun."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Bir widget\'ı seçmek veya özel işlemleri kullanmak için iki kez hafifçe dokunun ve basılı tutun."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"genişlik: %1$d, yükseklik: %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Uygulamalarda Ara"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Uygulamalar Yükleniyor…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"\"<xliff:g id="QUERY">%1$s</xliff:g>\" ile eşleşen uygulama bulunamadı"</string>
diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml
index c24e02a..1f73f04 100644
--- a/res/values-uk/strings.xml
+++ b/res/values-uk/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Натисніть і утримуйте, щоб вибрати віджет."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Двічі натисніть і утримуйте, щоб вибрати віджет, або виконайте іншу дію."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"Ширина – %1$d, висота – %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Пошук додатків"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Завантаження додатків…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Немає додатків для запиту \"<xliff:g id="QUERY">%1$s</xliff:g>\""</string>
diff --git a/res/values-ur-rPK/strings.xml b/res/values-ur-rPK/strings.xml
index 5ed9ddb..e4c637d 100644
--- a/res/values-ur-rPK/strings.xml
+++ b/res/values-ur-rPK/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"کوئی ویجیٹ منتخب کرنے کیلئے ٹچ کریں اور پکڑے رہیں۔"</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"کوئی ویجٹ منتخب کرنے یا حسب ضرورت کاروائیاں استعمال کرنے کیلئے دو بار تھپتھپائیں اور پکڑے رکھیں۔"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d چوڑا اور %2$d اونچا"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"ایپس تلاش کریں"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"ایپس لوڈ ہو رہی ہیں…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"\"<xliff:g id="QUERY">%1$s</xliff:g>\" سے مماثل کوئی ایپس نہیں ملیں"</string>
diff --git a/res/values-uz-rUZ/strings.xml b/res/values-uz-rUZ/strings.xml
index a58b57c..0e541d3 100644
--- a/res/values-uz-rUZ/strings.xml
+++ b/res/values-uz-rUZ/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Vidjetni tanlash uchun bosib turing."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Ikki marta bosib va bosib turgan holatda vidjetni tanlang yoki maxsus amaldan foydalaning."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"Eni %1$d, bo‘yi %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Ilovalar ichidan qidirish"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Ilovalar yuklanmoqda…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"“<xliff:g id="QUERY">%1$s</xliff:g>” so‘rovi bo‘yicha hech narsa topilmadi"</string>
diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml
index 8440060..2bf5ad6 100644
--- a/res/values-vi/strings.xml
+++ b/res/values-vi/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Chạm và giữ để chọn tiện ích con."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Nhấn đúp và giữ để chọn tiện ích hoặc sử dụng tác vụ tùy chỉnh."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"Rộng %1$d x cao %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Tìm kiếm ứng dụng"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Đang tải ứng dụng..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Không tìm thấy ứng dụng nào phù hợp với \"<xliff:g id="QUERY">%1$s</xliff:g>\""</string>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index e487225..e3ed354 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"触摸并按住小部件即可选择。"</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"点按两次并按住小部件即可选择小部件,您也可以使用自定义操作。"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"宽 %1$d,高 %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"搜索应用"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"正在加载应用…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"未找到与“<xliff:g id="QUERY">%1$s</xliff:g>”相符的应用"</string>
diff --git a/res/values-zh-rHK/strings.xml b/res/values-zh-rHK/strings.xml
index 7b96d658..ad0f99a 100644
--- a/res/values-zh-rHK/strings.xml
+++ b/res/values-zh-rHK/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"輕觸並按住小工具即可選取。"</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"連扲兩下,然後扲住,就可以新增小工具,或者執行自訂操作。"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d 闊,%2$d 高"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"搜尋應用程式"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"正在載入應用程式…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"無法找到與「<xliff:g id="QUERY">%1$s</xliff:g>」相符的應用程式"</string>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index cf7a86a..24f391d 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"輕觸並按住小工具即可選取。"</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"輕觸兩下並按住小工具即可選取,您也可以使用自訂動作。"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"寬度為 %1$d,高度為 %2$d"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"搜尋應用程式"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"正在載入應用程式…"</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"找不到符合「<xliff:g id="QUERY">%1$s</xliff:g>」的應用程式"</string>
diff --git a/res/values-zu/strings.xml b/res/values-zu/strings.xml
index 06cfa20..10fbef4 100644
--- a/res/values-zu/strings.xml
+++ b/res/values-zu/strings.xml
@@ -30,6 +30,7 @@
<string name="long_press_widget_to_add" msgid="7699152356777458215">"Thinta uphinde ubambe ukuze uphakamise iwijethi."</string>
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Thepha kabili bese uyabamba ukuze uthathe iwijethi noma sebenzisa izenzo ezingokwezifiso."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
+ <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d ububanzi ngokungu-%2$d ukuya phezulu"</string>
<string name="all_apps_search_bar_hint" msgid="7084713969757597256">"Sesha Izinhlelo Zokusebenza"</string>
<string name="all_apps_loading_message" msgid="7557140873644765180">"Ilayisha izinhlelo zokusebenza..."</string>
<string name="all_apps_no_search_results" msgid="6332185285860416787">"Azikho izinhlelo zokusebenza ezitholakele ezifana ne-\"<xliff:g id="QUERY">%1$s</xliff:g>\""</string>
diff --git a/res/values/config.xml b/res/values/config.xml
index 2347f66..a942f02 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -93,6 +93,7 @@
<!-- Deep shortcuts -->
<integer name="config_deepShortcutOpenDuration">220</integer>
+ <integer name="config_deepShortcutArrowOpenDuration">80</integer>
<integer name="config_deepShortcutOpenStagger">40</integer>
<integer name="config_deepShortcutCloseDuration">150</integer>
<integer name="config_deepShortcutCloseStagger">20</integer>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 33466a8..47edadd 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -64,8 +64,8 @@
<dimen name="all_apps_grid_view_start_margin">0dp</dimen>
<dimen name="all_apps_grid_section_y_offset">8dp</dimen>
<dimen name="all_apps_grid_section_text_size">24sp</dimen>
+ <dimen name="all_apps_search_bar_field_height">48dp</dimen>
<dimen name="all_apps_search_bar_height">60dp</dimen>
- <dimen name="all_apps_search_bar_margin_top">12dp</dimen>
<dimen name="all_apps_search_bar_icon_margin_right">4dp</dimen>
<dimen name="all_apps_search_bar_icon_margin_top">1dp</dimen>
<dimen name="all_apps_list_bottom_padding">8dp</dimen>
@@ -164,7 +164,7 @@
<dimen name="bg_pill_height">48dp</dimen>
<dimen name="bg_pill_radius">24dp</dimen>
<dimen name="deep_shortcuts_spacing">4dp</dimen>
- <dimen name="deep_shortcuts_drag_view_scale">6dp</dimen>
+ <dimen name="deferred_drag_view_scale">6dp</dimen>
<!-- an icon with shortcuts must be dragged this far before the container is removed. -->
<dimen name="deep_shortcuts_start_drag_threshold">16dp</dimen>
<dimen name="deep_shortcut_icon_size">36dp</dimen>
@@ -182,4 +182,11 @@
also happens to equal 19dp-->
<dimen name="deep_shortcuts_arrow_horizontal_offset">19dp</dimen>
+<!-- Touch handling -->
+ <dimen name="edge_of_screen_threshold">8dp</dimen>
+
+<!-- Other -->
+ <!-- Approximates the system status bar height. Not guaranteed to be always be correct. -->
+ <dimen name="status_bar_height">24dp</dimen>
+
</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index ecc11b0..cd06b75 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -75,7 +75,7 @@
<item name="android:textColor">@color/quantum_panel_text_color</item>
<item name="android:shadowRadius">0</item>
<item name="android:textSize">@dimen/folder_child_text_size</item>
- <item name="android:gravity">center</item>
+ <item name="android:gravity">center_horizontal</item>
<item name="android:includeFontPadding">false</item>
<item name="customShadows">false</item>
<item name="iconDisplay">folder</item>
@@ -101,8 +101,8 @@
<!-- Drop targets -->
<style name="DropTargetButtonBase">
<item name="android:drawablePadding">7.5dp</item>
- <item name="android:paddingLeft">25dp</item>
- <item name="android:paddingRight">25dp</item>
+ <item name="android:paddingLeft">16dp</item>
+ <item name="android:paddingRight">16dp</item>
<item name="android:textColor">#FFFFFFFF</item>
<item name="android:textSize">@dimen/drop_target_text_size</item>
<item name="android:singleLine">true</item>
diff --git a/src/com/android/launcher3/AppWidgetResizeFrame.java b/src/com/android/launcher3/AppWidgetResizeFrame.java
index daeca3b..f0ec503 100644
--- a/src/com/android/launcher3/AppWidgetResizeFrame.java
+++ b/src/com/android/launcher3/AppWidgetResizeFrame.java
@@ -15,14 +15,17 @@
import android.graphics.Rect;
import android.view.Gravity;
import android.view.KeyEvent;
+import android.view.MotionEvent;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;
import com.android.launcher3.accessibility.DragViewStateAnnouncer;
import com.android.launcher3.util.FocusLogic;
+import com.android.launcher3.util.TouchController;
-public class AppWidgetResizeFrame extends FrameLayout implements View.OnKeyListener {
+public class AppWidgetResizeFrame extends FrameLayout
+ implements View.OnKeyListener, TouchController {
private static final int SNAP_DURATION = 150;
private static final float DIMMED_HANDLE_ALPHA = 0f;
private static final float RESIZE_THRESHOLD = 0.66f;
@@ -76,6 +79,8 @@
private int mTopTouchRegionAdjustment = 0;
private int mBottomTouchRegionAdjustment = 0;
+ private int mXDown, mYDown;
+
public AppWidgetResizeFrame(Context context,
LauncherAppWidgetHostView widgetView, CellLayout cellLayout, DragLayer dragLayer) {
@@ -205,7 +210,7 @@
}
}
- public void visualizeResizeForDelta(int deltaX, int deltaY) {
+ private void visualizeResizeForDelta(int deltaX, int deltaY) {
visualizeResizeForDelta(deltaX, deltaY, false);
}
@@ -398,7 +403,7 @@
requestLayout();
}
- public void onTouchUp() {
+ private void onTouchUp() {
int xThreshold = mCellLayout.getCellWidth() + mCellLayout.getWidthGap();
int yThreshold = mCellLayout.getCellHeight() + mCellLayout.getHeightGap();
@@ -493,10 +498,56 @@
public boolean onKey(View v, int keyCode, KeyEvent event) {
// Clear the frame and give focus to the widget host view when a directional key is pressed.
if (FocusLogic.shouldConsume(keyCode)) {
- mDragLayer.clearAllResizeFrames();
+ mDragLayer.clearResizeFrame();
mWidgetView.requestFocus();
return true;
}
return false;
}
+
+ private boolean handleTouchDown(MotionEvent ev) {
+ Rect hitRect = new Rect();
+ int x = (int) ev.getX();
+ int y = (int) ev.getY();
+
+ getHitRect(hitRect);
+ if (hitRect.contains(x, y)) {
+ if (beginResizeIfPointInRegion(x - getLeft(), y - getTop())) {
+ mXDown = x;
+ mYDown = y;
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public boolean onControllerTouchEvent(MotionEvent ev) {
+ int action = ev.getAction();
+ int x = (int) ev.getX();
+ int y = (int) ev.getY();
+
+ switch (action) {
+ case MotionEvent.ACTION_DOWN:
+ return handleTouchDown(ev);
+ case MotionEvent.ACTION_MOVE:
+ visualizeResizeForDelta(x - mXDown, y - mYDown);
+ break;
+ case MotionEvent.ACTION_CANCEL:
+ case MotionEvent.ACTION_UP:
+ visualizeResizeForDelta(x - mXDown, y - mYDown);
+ onTouchUp();
+ mXDown = mYDown = 0;
+ break;
+ }
+ return true;
+ }
+
+ @Override
+ public boolean onControllerInterceptTouchEvent(MotionEvent ev) {
+ if (ev.getAction() == MotionEvent.ACTION_DOWN && handleTouchDown(ev)) {
+ return true;
+ }
+ return false;
+ }
}
diff --git a/src/com/android/launcher3/BaseContainerView.java b/src/com/android/launcher3/BaseContainerView.java
index 96942ee..b7321d9 100644
--- a/src/com/android/launcher3/BaseContainerView.java
+++ b/src/com/android/launcher3/BaseContainerView.java
@@ -16,17 +16,24 @@
package com.android.launcher3;
+import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.TypedArray;
+import android.graphics.Point;
+import android.graphics.PointF;
+import android.graphics.Rect;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.InsetDrawable;
import android.util.AttributeSet;
+import android.view.MotionEvent;
import android.view.View;
+import android.view.ViewConfiguration;
import android.widget.FrameLayout;
import com.android.launcher3.allapps.AllAppsContainerView;
import com.android.launcher3.config.FeatureFlags;
+import com.android.launcher3.util.TransformingTouchDelegate;
/**
* A base container view, which supports resizing.
@@ -39,12 +46,16 @@
protected int mContainerPaddingTop;
protected int mContainerPaddingBottom;
- private InsetDrawable mRevealDrawable;
protected final Drawable mBaseDrawable;
+ private final Rect mBgPaddingRect = new Rect();
private View mRevealView;
private View mContent;
+ private TransformingTouchDelegate mTouchDelegate;
+
+ private final PointF mLastTouchDownPosPx = new PointF(-1.0f, -1.0f);
+
public BaseContainerView(Context context) {
this(context, null);
}
@@ -72,6 +83,12 @@
DeviceProfile grid = Launcher.getLauncher(getContext()).getDeviceProfile();
grid.addLauncherLayoutChangedListener(this);
+
+ View touchDelegateTargetView = getTouchDelegateTargetView();
+ if (touchDelegateTargetView != null) {
+ mTouchDelegate = new TransformingTouchDelegate(touchDelegateTargetView);
+ ((View) touchDelegateTargetView.getParent()).setTouchDelegate(mTouchDelegate);
+ }
}
@Override
@@ -93,10 +110,36 @@
}
@Override
+ protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
+ super.onLayout(changed, left, top, right, bottom);
+ getRevealView().getBackground().getPadding(mBgPaddingRect);
+
+ View touchDelegateTargetView = getTouchDelegateTargetView();
+ if (touchDelegateTargetView != null) {
+ mTouchDelegate.setBounds(
+ touchDelegateTargetView.getLeft() - mBgPaddingRect.left,
+ touchDelegateTargetView.getTop() - mBgPaddingRect.top,
+ touchDelegateTargetView.getRight() + mBgPaddingRect.right,
+ touchDelegateTargetView.getBottom() + mBgPaddingRect.bottom);
+ }
+ }
+
+ @Override
public void onLauncherLayoutChanged() {
updatePaddings();
}
+ @Override
+ public boolean onInterceptTouchEvent(MotionEvent ev) {
+ return handleTouchEvent(ev);
+ }
+
+ @SuppressLint("ClickableViewAccessibility")
+ @Override
+ public boolean onTouchEvent(MotionEvent ev) {
+ return handleTouchEvent(ev);
+ }
+
public void setRevealDrawableColor(int color) {
((ColorDrawable) mBaseDrawable).setColor(color);
}
@@ -130,14 +173,47 @@
}
}
- mRevealDrawable = new InsetDrawable(mBaseDrawable,
+ InsetDrawable revealDrawable = new InsetDrawable(mBaseDrawable,
mContainerPaddingLeft, mContainerPaddingTop, mContainerPaddingRight,
mContainerPaddingBottom);
- mRevealView.setBackground(mRevealDrawable);
- if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && this instanceof AllAppsContainerView) {
- // Skip updating the content background
- } else {
- mContent.setBackground(mRevealDrawable);
- }
+ mRevealView.setBackground(revealDrawable);
+ mContent.setBackground(revealDrawable);
}
+
+ /**
+ * Handles the touch events that shows the workspace when clicking outside the bounds of the
+ * touch delegate target view.
+ */
+ private boolean handleTouchEvent(MotionEvent ev) {
+ switch (ev.getAction()) {
+ case MotionEvent.ACTION_DOWN:
+ // Check if the touch is outside touch delegate target view
+ View touchDelegateTargetView = getTouchDelegateTargetView();
+ float leftBoundPx = touchDelegateTargetView.getLeft();
+ if (ev.getX() < leftBoundPx ||
+ ev.getX() > (touchDelegateTargetView.getWidth() + leftBoundPx)) {
+ mLastTouchDownPosPx.set((int) ev.getX(), (int) ev.getY());
+ }
+ break;
+ case MotionEvent.ACTION_UP:
+ if (mLastTouchDownPosPx.x > -1) {
+ ViewConfiguration viewConfig = ViewConfiguration.get(getContext());
+ float dx = ev.getX() - mLastTouchDownPosPx.x;
+ float dy = ev.getY() - mLastTouchDownPosPx.y;
+ float distance = PointF.length(dx, dy);
+ if (distance < viewConfig.getScaledTouchSlop()) {
+ // The background was clicked, so just go home
+ Launcher.getLauncher(getContext()).showWorkspace(true);
+ return true;
+ }
+ }
+ // Fall through
+ case MotionEvent.ACTION_CANCEL:
+ mLastTouchDownPosPx.set(-1, -1);
+ break;
+ }
+ return false;
+ }
+
+ public abstract View getTouchDelegateTargetView();
}
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index c4e6ed1..8e4567b 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -104,7 +104,7 @@
public int hotseatCellWidthPx;
public int hotseatCellHeightPx;
public int hotseatIconSizePx;
- private int hotseatBarHeightPx;
+ public int hotseatBarHeightPx;
private int hotseatBarTopPaddingPx;
private int hotseatLandGutterPx;
diff --git a/src/com/android/launcher3/ExtendedEditText.java b/src/com/android/launcher3/ExtendedEditText.java
index 0caab09..c06f727 100644
--- a/src/com/android/launcher3/ExtendedEditText.java
+++ b/src/com/android/launcher3/ExtendedEditText.java
@@ -97,6 +97,6 @@
private boolean showSoftInput() {
return requestFocus() &&
((InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE))
- .showSoftInput(this, InputMethodManager.SHOW_FORCED);
+ .showSoftInput(this, InputMethodManager.SHOW_IMPLICIT);
}
}
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 5a25069..f825e21 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -258,7 +258,6 @@
@Thunk WidgetsContainerView mWidgetsView;
@Thunk WidgetsModel mWidgetsModel;
- private Bundle mSavedState;
// We set the state in both onCreate and then onNewIntent in some cases, which causes both
// scroll issues (because the workspace may not have been measured yet) and extra work.
// Instead, just save the state that we need to restore Launcher to, and commit it in onResume.
@@ -281,9 +280,9 @@
private LauncherAccessibilityDelegate mAccessibilityDelegate;
private boolean mIsResumeFromActionScreenOff;
@Thunk boolean mUserPresent = true;
- private boolean mVisible = false;
- private boolean mHasFocus = false;
- private boolean mAttached = false;
+ private boolean mVisible;
+ private boolean mHasFocus;
+ private boolean mAttached;
/** Maps launcher activity components to their list of shortcut ids. */
private MultiHashMap<ComponentKey, String> mDeepShortcutMap = new MultiHashMap<>();
@@ -358,6 +357,9 @@
private UserEventDispatcher mUserEventDispatcher;
+ private float mLastDispatchTouchEventX = 0.0f;
+ private float mEdgeOfScreenThresholdPx = 0.0f;
+
public ViewGroupFocusHelper mFocusHandler;
private boolean mRotationEnabled = false;
@@ -428,6 +430,9 @@
setContentView(R.layout.launcher);
+ mEdgeOfScreenThresholdPx = getResources()
+ .getDimensionPixelSize(R.dimen.edge_of_screen_threshold);
+
setupViews();
mDeviceProfile.layout(this, false /* notifyListeners */);
mExtractedColors = new ExtractedColors();
@@ -438,8 +443,7 @@
lockAllApps();
- mSavedState = savedInstanceState;
- restoreState(mSavedState);
+ restoreState(savedInstanceState);
if (LauncherAppState.PROFILE_STARTUP) {
Trace.endSection();
@@ -447,11 +451,18 @@
// We only load the page synchronously if the user rotates (or triggers a
// configuration change) while launcher is in the foreground
- if (!mModel.startLoader(mWorkspace.getRestorePage())) {
+ int currentScreen = PagedView.INVALID_RESTORE_PAGE;
+ if (savedInstanceState != null) {
+ currentScreen = savedInstanceState.getInt(RUNTIME_STATE_CURRENT_SCREEN, currentScreen);
+ }
+ if (!mModel.startLoader(currentScreen)) {
// If we are not binding synchronously, show a fade in animation when
// the first page bind completes.
mDragLayer.setAlpha(0);
} else {
+ // Pages bound synchronously.
+ mWorkspace.setCurrentPage(currentScreen);
+
setWorkspaceLoading(true);
}
@@ -488,10 +499,33 @@
private void loadExtractedColorsAndColorItems() {
// TODO: do this in pre-N as well, once the extraction part is complete.
- if (mExtractedColors != null && Utilities.isNycOrAbove()) {
+ if (Utilities.isNycOrAbove()) {
mExtractedColors.load(this);
mHotseat.updateColor(mExtractedColors, !mPaused);
mWorkspace.getPageIndicator().updateColor(mExtractedColors);
+ // It's possible that All Apps is visible when this is run,
+ // so always use light status bar in that case.
+ activateLightStatusBar(isAllAppsVisible());
+ }
+ }
+
+ /**
+ * Sets the status bar to be light or not. Light status bar means dark icons.
+ * @param activate if true, make sure the status bar is light, otherwise base on wallpaper.
+ */
+ public void activateLightStatusBar(boolean activate) {
+ boolean lightStatusBar = activate
+ || mExtractedColors.getColor(ExtractedColors.STATUS_BAR_INDEX,
+ ExtractedColors.DEFAULT_DARK) == ExtractedColors.DEFAULT_LIGHT;
+ int oldSystemUiFlags = getWindow().getDecorView().getSystemUiVisibility();
+ int newSystemUiFlags = oldSystemUiFlags;
+ if (lightStatusBar) {
+ newSystemUiFlags |= View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
+ } else {
+ newSystemUiFlags &= ~(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
+ }
+ if (newSystemUiFlags != oldSystemUiFlags) {
+ getWindow().getDecorView().setSystemUiVisibility(newSystemUiFlags);
}
}
@@ -592,7 +626,7 @@
}
/**
- * Invoked by subclasses to signal a change to the {@link #addCustomContentToLeft} value to
+ * Invoked by subclasses to signal a change to the {@link #addToCustomContentPage} value to
* ensure the custom content page is added or removed if necessary.
*/
protected void invalidateHasCustomContentToLeft() {
@@ -1244,22 +1278,6 @@
}
/**
- * Given the integer (ordinal) value of a State enum instance, convert it to a variable of type
- * State
- */
- private static State intToState(int stateOrdinal) {
- State state = State.WORKSPACE;
- final State[] stateValues = State.values();
- for (int i = 0; i < stateValues.length; i++) {
- if (stateValues[i].ordinal() == stateOrdinal) {
- state = stateValues[i];
- break;
- }
- }
- return state;
- }
-
- /**
* Restores the previous state, if it exists.
*
* @param savedState The previous state.
@@ -1269,17 +1287,14 @@
return;
}
- State state = intToState(savedState.getInt(RUNTIME_STATE, State.WORKSPACE.ordinal()));
+ int stateOrdinal = savedState.getInt(RUNTIME_STATE, State.WORKSPACE.ordinal());
+ State[] stateValues = State.values();
+ State state = (stateOrdinal >= 0 && stateOrdinal < stateValues.length)
+ ? stateValues[stateOrdinal] : State.WORKSPACE;
if (state == State.APPS || state == State.WIDGETS) {
mOnResumeState = state;
}
- int currentScreen = savedState.getInt(RUNTIME_STATE_CURRENT_SCREEN,
- PagedView.INVALID_RESTORE_PAGE);
- if (currentScreen != PagedView.INVALID_RESTORE_PAGE) {
- mWorkspace.setRestorePage(currentScreen);
- }
-
PendingRequestArgs requestArgs = savedState.getParcelable(RUNTIME_STATE_PENDING_REQUEST_ARGS);
if (requestArgs != null) {
setWaitingForResult(requestArgs);
@@ -1569,7 +1584,7 @@
final String action = intent.getAction();
if (Intent.ACTION_SCREEN_OFF.equals(action)) {
mUserPresent = false;
- mDragLayer.clearAllResizeFrames();
+ mDragLayer.clearResizeFrame();
updateAutoAdvanceState();
// Reset AllApps to its initial state only if we are not in the middle of
@@ -1797,11 +1812,14 @@
}
super.onNewIntent(intent);
- // Close the menu
- Folder openFolder = mWorkspace.getOpenFolder();
boolean alreadyOnHome = mHasFocus && ((intent.getFlags() &
Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT)
!= Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT);
+
+ // Check this condition before handling isActionMain, as this will get reset.
+ boolean shouldMoveToDefaultScreen = alreadyOnHome &&
+ mState == State.WORKSPACE && getTopFloatingView() == null;
+
boolean isActionMain = Intent.ACTION_MAIN.equals(intent.getAction());
if (isActionMain) {
// also will cancel mWaitingForResult.
@@ -1856,10 +1874,10 @@
// as slow logic in the callbacks eat into the time the scroller expects for the snapToPage
// animation.
if (isActionMain) {
- boolean moveToDefaultScreen = mLauncherCallbacks != null ?
+ boolean callbackAllowsMoveToDefaultScreen = mLauncherCallbacks != null ?
mLauncherCallbacks.shouldMoveToDefaultScreenOnHomeIntent() : true;
- if (alreadyOnHome && mState == State.WORKSPACE && !mWorkspace.isTouchActive() &&
- openFolder == null && moveToDefaultScreen) {
+ if (shouldMoveToDefaultScreen && !mWorkspace.isTouchActive()
+ && callbackAllowsMoveToDefaultScreen) {
// We use this flag to suppress noisy callbacks above custom content state
// from onResume.
@@ -2759,6 +2777,7 @@
}
}
+ @TargetApi(Build.VERSION_CODES.M)
private Bundle getActivityLaunchOptions(View v) {
if (Utilities.ATLEAST_MARSHMALLOW) {
int left = 0, top = 0;
@@ -3059,6 +3078,12 @@
}
@Override
+ public boolean dispatchTouchEvent(MotionEvent ev) {
+ mLastDispatchTouchEventX = ev.getX();
+ return super.dispatchTouchEvent(ev);
+ }
+
+ @Override
public boolean onLongClick(View v) {
if (!isDraggingEnabled()) return false;
if (isWorkspaceLocked()) return false;
@@ -3070,9 +3095,12 @@
return true;
}
+ boolean fromEdgeOfScreen = mLastDispatchTouchEventX < mEdgeOfScreenThresholdPx
+ || mLastDispatchTouchEventX > (mDeviceProfile.widthPx - mEdgeOfScreenThresholdPx);
+
if (v instanceof Workspace) {
if (!mWorkspace.isInOverviewMode()) {
- if (!mWorkspace.isTouchActive()) {
+ if (!mWorkspace.isTouchActive() && !fromEdgeOfScreen) {
showOverviewMode(true);
mWorkspace.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS,
HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING);
@@ -3099,14 +3127,16 @@
if (!mDragController.isDragging()) {
if (itemUnderLongClick == null) {
// User long pressed on empty space
- mWorkspace.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS,
- HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING);
if (mWorkspace.isInOverviewMode()) {
mWorkspace.startReordering(v);
} else {
+ if (fromEdgeOfScreen) {
+ return false;
+ }
showOverviewMode(true);
- mHotseat.requestDisallowInterceptTouchEvent(true);
}
+ mWorkspace.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS,
+ HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING);
} else {
final boolean isAllAppsButton =
!FeatureFlags.NO_ALL_APPS_ICON && isHotseatLayout(v) &&
@@ -3114,7 +3144,17 @@
longClickCellInfo.cellX, longClickCellInfo.cellY));
if (!(itemUnderLongClick instanceof Folder || isAllAppsButton)) {
// User long pressed on an item
- mWorkspace.startDrag(longClickCellInfo, new DragOptions());
+ DragOptions dragOptions = new DragOptions();
+ if (itemUnderLongClick instanceof BubbleTextView) {
+ BubbleTextView icon = (BubbleTextView) itemUnderLongClick;
+ if (icon.hasDeepShortcuts()) {
+ DeepShortcutsContainer dsc = DeepShortcutsContainer.showForIcon(icon);
+ if (dsc != null) {
+ dragOptions.deferDragCondition = dsc.createDeferDragCondition(null);
+ }
+ }
+ }
+ mWorkspace.startDrag(longClickCellInfo, dragOptions);
}
}
}
@@ -3233,6 +3273,9 @@
mStateTransitionAnimation.startAnimationToWorkspace(mState, mWorkspace.getState(),
Workspace.State.OVERVIEW, animated, postAnimRunnable);
mState = State.WORKSPACE;
+ // If animated from long press, then don't allow any of the controller in the drag
+ // layer to intercept any remaining touch.
+ mWorkspace.requestDisallowInterceptTouchEvent(animated);
}
/**
@@ -3950,14 +3993,6 @@
if (LauncherAppState.PROFILE_STARTUP) {
Trace.beginSection("Page bind completed");
}
- if (mSavedState != null) {
- if (!mWorkspace.hasFocus()) {
- mWorkspace.getChildAt(mWorkspace.getCurrentPage()).requestFocus();
- }
-
- mSavedState = null;
- }
-
mWorkspace.restoreInstanceStateForRemainingPages();
setWorkspaceLoading(false);
@@ -4379,7 +4414,6 @@
*/
public void dumpState() {
Log.d(TAG, "BEGIN launcher3 dump state for launcher " + this);
- Log.d(TAG, "mSavedState=" + mSavedState);
Log.d(TAG, "mWorkspaceLoading=" + mWorkspaceLoading);
Log.d(TAG, "mPendingRequestArgs=" + mPendingRequestArgs);
Log.d(TAG, "mPendingActivityResult=" + mPendingActivityResult);
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index a812317..4afff18 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -3169,40 +3169,55 @@
public void run() {
mDeepShortcutManager.onShortcutsChanged(mShortcuts);
- Map<String, ShortcutInfoCompat> idsToShortcuts = new HashMap<>();
- for (ShortcutInfoCompat shortcut : mShortcuts) {
- idsToShortcuts.put(shortcut.getId(), shortcut);
- }
-
// Find ShortcutInfo's that have changed on the workspace.
+ final ArrayList<ShortcutInfo> removedShortcutInfos = new ArrayList<>();
MultiHashMap<String, ShortcutInfo> idsToWorkspaceShortcutInfos = new MultiHashMap<>();
for (ItemInfo itemInfo : sBgDataModel.itemsIdMap) {
if (itemInfo.itemType == LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT) {
ShortcutInfo si = (ShortcutInfo) itemInfo;
if (si.getPromisedIntent().getPackage().equals(mPackageName)
&& si.user.equals(mUser)) {
- String shortcutId = si.getDeepShortcutId();
- if (idsToShortcuts.containsKey(shortcutId)) {
- idsToWorkspaceShortcutInfos.addToList(shortcutId, si);
- }
+ idsToWorkspaceShortcutInfos.addToList(si.getDeepShortcutId(), si);
}
}
}
- // Update the workspace to reflect the changes to updated shortcuts residing on it.
- List<ShortcutInfoCompat> shortcuts = mDeepShortcutManager.queryForFullDetails(
- mPackageName, new ArrayList<>(idsToWorkspaceShortcutInfos.keySet()), mUser);
- ArrayList<ShortcutInfo> updatedShortcutInfos = new ArrayList<>();
- Context context = LauncherAppState.getInstance().getContext();
- for (ShortcutInfoCompat fullDetails : shortcuts) {
- List<ShortcutInfo> shortcutInfos = idsToWorkspaceShortcutInfos
- .get(fullDetails.getId());
- for (ShortcutInfo shortcutInfo : shortcutInfos) {
- shortcutInfo.updateFromDeepShortcutInfo(fullDetails, context);
- updatedShortcutInfos.add(shortcutInfo);
+ final Context context = LauncherAppState.getInstance().getContext();
+ final ArrayList<ShortcutInfo> updatedShortcutInfos = new ArrayList<>();
+ if (!idsToWorkspaceShortcutInfos.isEmpty()) {
+ // Update the workspace to reflect the changes to updated shortcuts residing on it.
+ List<ShortcutInfoCompat> shortcuts = mDeepShortcutManager.queryForFullDetails(
+ mPackageName, new ArrayList<>(idsToWorkspaceShortcutInfos.keySet()), mUser);
+ for (ShortcutInfoCompat fullDetails : shortcuts) {
+ List<ShortcutInfo> shortcutInfos = idsToWorkspaceShortcutInfos
+ .remove(fullDetails.getId());
+ if (!fullDetails.isPinned()) {
+ // The shortcut was previously pinned but is no longer, so remove it from
+ // the workspace and our pinned shortcut counts.
+ // Note that we put this check here, after querying for full details,
+ // because there's a possible race condition between pinning and
+ // receiving this callback.
+ removedShortcutInfos.addAll(shortcutInfos);
+ continue;
+ }
+ for (ShortcutInfo shortcutInfo : shortcutInfos) {
+ shortcutInfo.updateFromDeepShortcutInfo(fullDetails, context);
+ updatedShortcutInfos.add(shortcutInfo);
+ }
}
}
- bindUpdatedShortcuts(updatedShortcutInfos, mUser);
+
+ // If there are still entries in idsToWorkspaceShortcutInfos, that means that
+ // the corresponding shortcuts weren't passed in onShortcutsChanged(). This
+ // means they were cleared, so we remove and unpin them now.
+ for (String id : idsToWorkspaceShortcutInfos.keySet()) {
+ removedShortcutInfos.addAll(idsToWorkspaceShortcutInfos.get(id));
+ }
+
+ bindUpdatedShortcuts(updatedShortcutInfos, removedShortcutInfos, mUser);
+ if (!removedShortcutInfos.isEmpty()) {
+ deleteItemsFromDatabase(context, removedShortcutInfos);
+ }
if (mUpdateIdMap) {
// Update the deep shortcut map if the list of ids has changed for an activity.
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java
index bea55d2..0b9bf09 100644
--- a/src/com/android/launcher3/PagedView.java
+++ b/src/com/android/launcher3/PagedView.java
@@ -98,7 +98,6 @@
@ViewDebug.ExportedProperty(category = "launcher")
protected int mCurrentPage;
- protected int mRestorePage = INVALID_RESTORE_PAGE;
private int mChildCountOnLastLayout;
@ViewDebug.ExportedProperty(category = "launcher")
@@ -418,17 +417,6 @@
}
/**
- * The restore page will be set in place of the current page at the next (likely first)
- * layout.
- */
- void setRestorePage(int restorePage) {
- mRestorePage = restorePage;
- }
- int getRestorePage() {
- return mRestorePage;
- }
-
- /**
* Should be called whenever the page changes. In the case of a scroll, we wait until the page
* has settled.
*/
@@ -879,12 +867,7 @@
}
if (mScroller.isFinished() && mChildCountOnLastLayout != childCount) {
- if (mRestorePage != INVALID_RESTORE_PAGE) {
- setCurrentPage(mRestorePage);
- mRestorePage = INVALID_RESTORE_PAGE;
- } else {
- setCurrentPage(getNextPage());
- }
+ setCurrentPage(getNextPage());
}
mChildCountOnLastLayout = childCount;
diff --git a/src/com/android/launcher3/PinchToOverviewListener.java b/src/com/android/launcher3/PinchToOverviewListener.java
index 48a75d1..bc5ac24 100644
--- a/src/com/android/launcher3/PinchToOverviewListener.java
+++ b/src/com/android/launcher3/PinchToOverviewListener.java
@@ -61,12 +61,12 @@
mPinchDetector = new ScaleGestureDetector((Context) mLauncher, this);
}
- public boolean onInterceptTouchEvent(MotionEvent ev) {
+ public boolean onControllerInterceptTouchEvent(MotionEvent ev) {
mPinchDetector.onTouchEvent(ev);
return mPinchStarted;
}
- public boolean onTouchEvent(MotionEvent ev) {
+ public boolean onControllerTouchEvent(MotionEvent ev) {
if (mPinchStarted) {
if (ev.getPointerCount() > 2) {
// Using more than two fingers causes weird behavior, so just cancel the pinch.
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 3d58fc4..10fbc8e 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -25,7 +25,6 @@
import android.animation.ValueAnimator;
import android.animation.ValueAnimator.AnimatorUpdateListener;
import android.annotation.SuppressLint;
-import android.annotation.TargetApi;
import android.app.WallpaperManager;
import android.appwidget.AppWidgetHostView;
import android.appwidget.AppWidgetProviderInfo;
@@ -38,7 +37,6 @@
import android.graphics.PointF;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
-import android.os.Build;
import android.os.Handler;
import android.os.IBinder;
import android.os.Parcelable;
@@ -75,8 +73,6 @@
import com.android.launcher3.folder.Folder;
import com.android.launcher3.folder.FolderIcon;
import com.android.launcher3.graphics.DragPreviewProvider;
-import com.android.launcher3.shortcuts.DeepShortcutManager;
-import com.android.launcher3.shortcuts.ShortcutsContainerListener;
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.launcher3.userevent.nano.LauncherLogProto.Target;
import com.android.launcher3.util.ItemInfoMatcher;
@@ -602,6 +598,7 @@
if (shouldConsumeTouch(v)) return true;
if (super.onTouch(v, ev)) {
mLauncher.startSearch("", false, null, false);
+ return true;
}
return false;
}
@@ -613,6 +610,7 @@
if (shouldConsumeTouch(v)) return true;
if (super.onTouch(v, ev)) {
mLauncher.startSearch("", false, null, false);
+ return true;
}
return false;
}
@@ -738,11 +736,7 @@
addFullScreenPage(customScreen);
// Update the custom content hint
- if (mRestorePage != INVALID_RESTORE_PAGE) {
- mRestorePage = mRestorePage + 1;
- } else {
- setCurrentPage(getCurrentPage() + 1);
- }
+ setCurrentPage(getCurrentPage() + 1);
}
public void removeCustomContentPage() {
@@ -763,11 +757,7 @@
mCustomContentCallbacks = null;
// Update the custom content hint
- if (mRestorePage != INVALID_RESTORE_PAGE) {
- mRestorePage = mRestorePage - 1;
- } else {
- setCurrentPage(getCurrentPage() - 1);
- }
+ setCurrentPage(getCurrentPage() - 1);
}
public void addToCustomContentPage(View customContent, CustomContentCallbacks callbacks,
@@ -1176,10 +1166,6 @@
if (!(child instanceof Folder)) {
child.setHapticFeedbackEnabled(false);
child.setOnLongClickListener(mLongClickListener);
- if (child instanceof BubbleTextView && DeepShortcutManager.supportsShortcuts(info)) {
- // TODO: only add this listener if the item has shortcuts associated with it.
- child.setOnTouchListener(new ShortcutsContainerListener((BubbleTextView) child));
- }
}
if (child instanceof DropTarget) {
mDragController.addDropTarget((DropTarget) child);
@@ -1761,7 +1747,7 @@
}
public boolean isOnOrMovingToCustomContent() {
- return hasCustomContent() && getNextPage() == 0 && mRestorePage == INVALID_RESTORE_PAGE;
+ return hasCustomContent() && getNextPage() == 0;
}
private void updateStateForCustomContent(int screenCenter) {
@@ -2014,7 +2000,7 @@
public void exitWidgetResizeMode() {
DragLayer dragLayer = mLauncher.getDragLayer();
- dragLayer.clearAllResizeFrames();
+ dragLayer.clearResizeFrame();
}
@Override
@@ -2715,7 +2701,7 @@
public void run() {
if (!isPageMoving() && !mIsSwitchingState) {
DragLayer dragLayer = mLauncher.getDragLayer();
- dragLayer.addResizeFrame(info, hostView, cellLayout);
+ dragLayer.addResizeFrame(hostView, cellLayout);
}
}
};
@@ -2799,9 +2785,7 @@
mAddToExistingFolderOnDrop = false;
mDropToLayout = null;
- CellLayout layout = getCurrentDropLayout();
- setCurrentDropLayout(layout);
- setCurrentDragOverlappingLayout(layout);
+ setDropLayoutForDragObject(d);
if (!workspaceInModalState() && FeatureFlags.LAUNCHER3_LEGACY_WORKSPACE_DND) {
mLauncher.getDragLayer().showPageHints();
@@ -3060,7 +3044,6 @@
// Skip drag over events while we are dragging over side pages
if (mInScrollArea || !transitionStateShouldAllowDrop()) return;
- CellLayout layout = null;
ItemInfo item = d.dragInfo;
if (item == null) {
if (ProviderConfig.IS_DOGFOOD_BUILD) {
@@ -3074,43 +3057,15 @@
mDragViewVisualCenter = d.getVisualCenter(mDragViewVisualCenter);
final View child = (mDragInfo == null) ? null : mDragInfo.cell;
- // Identify whether we have dragged over a side page
- if (workspaceInModalState()) {
- if (mLauncher.getHotseat() != null && !isDragWidget(d)) {
- if (isPointInSelfOverHotseat(d.x, d.y)) {
- layout = mLauncher.getHotseat().getLayout();
+ if (setDropLayoutForDragObject(d)) {
+ boolean isInSpringLoadedMode = (mState == State.SPRING_LOADED);
+ if (isInSpringLoadedMode) {
+ if (mLauncher.isHotseatLayout(mDragTargetLayout)) {
+ mSpringLoadedDragController.cancel();
+ } else {
+ mSpringLoadedDragController.setAlarm(mDragTargetLayout);
}
}
- if (layout == null) {
- layout = findMatchingPageForDragOver(d.dragView, d.x, d.y, false);
- }
- if (layout != mDragTargetLayout) {
- setCurrentDropLayout(layout);
- setCurrentDragOverlappingLayout(layout);
-
- boolean isInSpringLoadedMode = (mState == State.SPRING_LOADED);
- if (isInSpringLoadedMode) {
- if (mLauncher.isHotseatLayout(layout)) {
- mSpringLoadedDragController.cancel();
- } else {
- mSpringLoadedDragController.setAlarm(mDragTargetLayout);
- }
- }
- }
- } else {
- // Test to see if we are over the hotseat otherwise just use the current page
- if (mLauncher.getHotseat() != null && !isDragWidget(d)) {
- if (isPointInSelfOverHotseat(d.x, d.y)) {
- layout = mLauncher.getHotseat().getLayout();
- }
- }
- if (layout == null) {
- layout = getCurrentDropLayout();
- }
- if (layout != mDragTargetLayout) {
- setCurrentDropLayout(layout);
- setCurrentDragOverlappingLayout(layout);
- }
}
// Handle the drag over
@@ -3175,6 +3130,40 @@
}
}
+ /**
+ * Updates {@link #mDragTargetLayout} and {@link #mDragOverlappingLayout}
+ * based on the DragObject's position.
+ *
+ * The layout will be:
+ * - The Hotseat if the drag object is over it
+ * - A side page if we are in spring-loaded mode and the drag object is over it
+ * - The current page otherwise
+ *
+ * @return whether the layout is different from the current {@link #mDragTargetLayout}.
+ */
+ private boolean setDropLayoutForDragObject(DragObject d) {
+ CellLayout layout = null;
+ // Test to see if we are over the hotseat first
+ if (mLauncher.getHotseat() != null && !isDragWidget(d)) {
+ if (isPointInSelfOverHotseat(d.x, d.y)) {
+ layout = mLauncher.getHotseat().getLayout();
+ }
+ }
+ if (layout == null) {
+ // Identify whether we have dragged over a side page,
+ // otherwise just use the current page
+ layout = workspaceInModalState() ?
+ findMatchingPageForDragOver(d.dragView, d.x, d.y, false)
+ : getCurrentDropLayout();
+ }
+ if (layout != mDragTargetLayout) {
+ setCurrentDropLayout(layout);
+ setCurrentDragOverlappingLayout(layout);
+ return true;
+ }
+ return false;
+ }
+
private void manageFolderFeedback(CellLayout targetLayout,
int[] targetCell, float distance, DragObject dragObject) {
if (distance > mMaxDistanceForFolderCreation) return;
diff --git a/src/com/android/launcher3/allapps/AllAppsContainerView.java b/src/com/android/launcher3/allapps/AllAppsContainerView.java
index 290accb..8fedc96 100644
--- a/src/com/android/launcher3/allapps/AllAppsContainerView.java
+++ b/src/com/android/launcher3/allapps/AllAppsContainerView.java
@@ -15,10 +15,8 @@
*/
package com.android.launcher3.allapps;
-import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.Resources;
-import android.graphics.Point;
import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.text.Selection;
@@ -31,17 +29,18 @@
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
-import android.view.ViewConfiguration;
import android.view.ViewGroup;
import com.android.launcher3.AppInfo;
import com.android.launcher3.BaseContainerView;
+import com.android.launcher3.BubbleTextView;
import com.android.launcher3.CellLayout;
import com.android.launcher3.DeleteDropTarget;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.DragSource;
import com.android.launcher3.DropTarget;
import com.android.launcher3.ExtendedEditText;
+import com.android.launcher3.Insettable;
import com.android.launcher3.ItemInfo;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherTransitionable;
@@ -53,6 +52,7 @@
import com.android.launcher3.folder.Folder;
import com.android.launcher3.graphics.TintedDrawableSpan;
import com.android.launcher3.keyboard.FocusedItemDecorator;
+import com.android.launcher3.shortcuts.DeepShortcutsContainer;
import com.android.launcher3.userevent.nano.LauncherLogProto.Target;
import com.android.launcher3.util.ComponentKey;
@@ -132,7 +132,8 @@
* The all apps view container.
*/
public class AllAppsContainerView extends BaseContainerView implements DragSource,
- LauncherTransitionable, View.OnLongClickListener, AllAppsSearchBarController.Callbacks {
+ LauncherTransitionable, View.OnLongClickListener, AllAppsSearchBarController.Callbacks,
+ Insettable {
private static final int MIN_ROWS_IN_MERGED_SECTION_PHONE = 3;
private static final int MAX_NUM_MERGES_PHONE = 2;
@@ -143,25 +144,18 @@
private final RecyclerView.LayoutManager mLayoutManager;
private final RecyclerView.ItemDecoration mItemDecoration;
- // The computed bounds of the container
- private final Rect mContentBounds = new Rect();
-
private AllAppsRecyclerView mAppsRecyclerView;
private AllAppsSearchBarController mSearchBarController;
private View mSearchContainer;
private ExtendedEditText mSearchInput;
private HeaderElevationController mElevationController;
- private int mSearchContainerOffsetTop;
private SpannableStringBuilder mSearchQueryBuilder = null;
private int mSectionNamesMargin;
private int mNumAppsPerRow;
private int mNumPredictedAppsPerRow;
- private int mRecyclerViewBottomPadding;
- // This coordinate is relative to this container view
- private final Point mBoundsCheckLastTouchDownPos = new Point(-1, -1);
public AllAppsContainerView(Context context) {
this(context, null);
@@ -182,14 +176,6 @@
mApps.setAdapter(mAdapter);
mLayoutManager = mAdapter.getLayoutManager();
mItemDecoration = mAdapter.getItemDecoration();
- DeviceProfile grid = mLauncher.getDeviceProfile();
- if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && !grid.isVerticalBarLayout()) {
- mRecyclerViewBottomPadding = 0;
- setPadding(0, 0, 0, 0);
- } else {
- mRecyclerViewBottomPadding =
- res.getDimensionPixelSize(R.dimen.all_apps_list_bottom_padding);
- }
mSearchQueryBuilder = new SpannableStringBuilder();
Selection.setSelection(mSearchQueryBuilder, 0);
}
@@ -338,9 +324,6 @@
0, 1, Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
mSearchInput.setHint(spanned);
- mSearchContainerOffsetTop = getResources().getDimensionPixelSize(
- R.dimen.all_apps_search_bar_margin_top);
-
mElevationController = Utilities.ATLEAST_LOLLIPOP
? new HeaderElevationController.ControllerVL(mSearchContainer)
: new HeaderElevationController.ControllerV16(mSearchContainer);
@@ -368,6 +351,19 @@
getContentView().setVisibility(View.VISIBLE);
getContentView().setBackground(null);
}
+
+ int maxScrollBarWidth = mAppsRecyclerView.getMaxScrollbarWidth();
+ int startInset = Math.max(mSectionNamesMargin, maxScrollBarWidth);
+ if (Utilities.isRtl(getResources())) {
+ mAppsRecyclerView.setPadding(maxScrollBarWidth, 0, startInset, 0);
+ } else {
+ mAppsRecyclerView.setPadding(startInset, 0, maxScrollBarWidth, 0);
+ }
+ }
+
+ @Override
+ public View getTouchDelegateTargetView() {
+ return mAppsRecyclerView;
}
@Override
@@ -375,11 +371,6 @@
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
- int widthPx = MeasureSpec.getSize(widthMeasureSpec);
- int heightPx = MeasureSpec.getSize(heightMeasureSpec);
- updatePaddingsAndMargins(widthPx, heightPx);
- mContentBounds.set(mContainerPaddingLeft, 0, widthPx - mContainerPaddingRight, heightPx);
-
DeviceProfile grid = mLauncher.getDeviceProfile();
grid.updateAppsViewNumCols();
if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP) {
@@ -391,17 +382,12 @@
mAppsRecyclerView.setNumAppsPerRow(grid, mNumAppsPerRow);
mAdapter.setNumAppsPerRow(mNumAppsPerRow);
mApps.setNumAppsPerRow(mNumAppsPerRow, mNumPredictedAppsPerRow, new FullMergeAlgorithm());
- if (mNumAppsPerRow > 0) {
- int rvPadding = mAppsRecyclerView.getPaddingStart(); // Assumes symmetry
- final int thumbMaxWidth =
- getResources().getDimensionPixelSize(
- R.dimen.container_fastscroll_thumb_max_width);
- mSearchContainer.setPadding(
- rvPadding - mContainerPaddingLeft + thumbMaxWidth,
- mSearchContainer.getPaddingTop(),
- rvPadding - mContainerPaddingRight + thumbMaxWidth,
- mSearchContainer.getPaddingBottom());
- }
+ }
+ if (!grid.isVerticalBarLayout()) {
+ MarginLayoutParams searchContainerLp =
+ (MarginLayoutParams) mSearchContainer.getLayoutParams();
+ searchContainerLp.height = grid.hotseatBarHeightPx;
+ mSearchContainer.setLayoutParams(searchContainerLp);
}
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
return;
@@ -435,73 +421,6 @@
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
- /**
- * Update the background and padding of the Apps view and children. Instead of insetting the
- * container view, we inset the background and padding of the recycler view to allow for the
- * recycler view to handle touch events (for fast scrolling) all the way to the edge.
- */
- private void updatePaddingsAndMargins(int widthPx, int heightPx) {
- Rect bgPadding = new Rect();
- getRevealView().getBackground().getPadding(bgPadding);
-
- mAppsRecyclerView.updateBackgroundPadding(bgPadding);
- mAdapter.updateBackgroundPadding(bgPadding);
- mElevationController.updateBackgroundPadding(bgPadding);
-
- // Pad the recycler view by the background padding plus the start margin (for the section
- // names)
- int maxScrollBarWidth = mAppsRecyclerView.getMaxScrollbarWidth();
- int startInset = Math.max(mSectionNamesMargin, maxScrollBarWidth);
- if (Utilities.isRtl(getResources())) {
- mAppsRecyclerView.setPadding(bgPadding.left + maxScrollBarWidth, 0, bgPadding.right
- + startInset, mRecyclerViewBottomPadding);
- } else {
- mAppsRecyclerView.setPadding(bgPadding.left + startInset, 0, bgPadding.right +
- maxScrollBarWidth, mRecyclerViewBottomPadding);
- }
-
- MarginLayoutParams lp = (MarginLayoutParams) mSearchContainer.getLayoutParams();
- lp.leftMargin = bgPadding.left;
- lp.rightMargin = bgPadding.right;
-
- // Clip the view to the left and right edge of the background to
- // to prevent shadows from rendering beyond the edges
- final Rect newClipBounds = new Rect(
- bgPadding.left, 0, widthPx - bgPadding.right, heightPx);
- setClipBounds(newClipBounds);
-
- // Allow the overscroll effect to reach the edges of the view
- mAppsRecyclerView.setClipToPadding(false);
-
- DeviceProfile grid = mLauncher.getDeviceProfile();
- if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP) {
- if (!grid.isVerticalBarLayout()) {
- MarginLayoutParams mlp = (MarginLayoutParams) mAppsRecyclerView.getLayoutParams();
-
- Rect insets = mLauncher.getDragLayer().getInsets();
- getContentView().setPadding(0, 0, 0, 0);
- int height = insets.top + grid.hotseatCellHeightPx;
-
- mlp.topMargin = height;
- mAppsRecyclerView.setLayoutParams(mlp);
-
- mSearchContainer.setPadding(
- mSearchContainer.getPaddingLeft(),
- insets.top + mSearchContainerOffsetTop,
- mSearchContainer.getPaddingRight(),
- mSearchContainer.getPaddingBottom());
- lp.height = height;
-
- View navBarBg = findViewById(R.id.nav_bar_bg);
- ViewGroup.LayoutParams params = navBarBg.getLayoutParams();
- params.height = insets.bottom;
- navBarBg.setLayoutParams(params);
- navBarBg.setVisibility(View.VISIBLE);
- }
- }
- mSearchContainer.setLayoutParams(lp);
- }
-
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
// Determine if the key event was actual text, if so, focus the search bar and then dispatch
@@ -524,17 +443,6 @@
}
@Override
- public boolean onInterceptTouchEvent(MotionEvent ev) {
- return handleTouchEvent(ev);
- }
-
- @SuppressLint("ClickableViewAccessibility")
- @Override
- public boolean onTouchEvent(MotionEvent ev) {
- return handleTouchEvent(ev);
- }
-
- @Override
public boolean onLongClick(View v) {
// Return early if this is not initiated from a touch
if (!v.isInTouchMode()) return false;
@@ -542,13 +450,32 @@
if (!mLauncher.isAppsViewVisible() ||
mLauncher.getWorkspace().isSwitchingState()) return false;
- // Return if global dragging is not enabled
+ // Return if global dragging is not enabled or we are already dragging
if (!mLauncher.isDraggingEnabled()) return false;
+ if (mLauncher.getDragController().isDragging()) return false;
// Start the drag
- mLauncher.getWorkspace().beginDragShared(v, this, new DragOptions());
- // Enter spring loaded mode
- mLauncher.enterSpringLoadedDragMode();
+ DragOptions dragOptions = new DragOptions();
+ if (v instanceof BubbleTextView) {
+ final BubbleTextView icon = (BubbleTextView) v;
+ if (icon.hasDeepShortcuts()) {
+ DeepShortcutsContainer dsc = DeepShortcutsContainer.showForIcon(icon);
+ if (dsc != null) {
+ dragOptions.deferDragCondition = dsc.createDeferDragCondition(new Runnable() {
+ @Override
+ public void run() {
+ icon.setVisibility(VISIBLE);
+ }
+ });
+ }
+ }
+ }
+ mLauncher.getWorkspace().beginDragShared(v, this, dragOptions);
+ if (FeatureFlags.LAUNCHER3_LEGACY_WORKSPACE_DND) {
+ // Enter spring loaded mode (the new workspace does this in
+ // onDragStart(), so we don't want to do it here)
+ mLauncher.enterSpringLoadedDragMode();
+ }
return false;
}
@@ -598,7 +525,7 @@
// target layout we were dropping on.
if (!success) {
boolean showOutOfSpaceMessage = false;
- if (target instanceof Workspace) {
+ if (target instanceof Workspace && !mLauncher.getDragController().isDeferringDrag()) {
int currentScreen = mLauncher.getCurrentWorkspaceScreen();
Workspace workspace = (Workspace) target;
CellLayout layout = (CellLayout) workspace.getChildAt(currentScreen);
@@ -639,55 +566,6 @@
}
}
- /**
- * Handles the touch events to dismiss all apps when clicking outside the bounds of the
- * recycler view.
- */
- private boolean handleTouchEvent(MotionEvent ev) {
- DeviceProfile grid = mLauncher.getDeviceProfile();
- int x = (int) ev.getX();
- int y = (int) ev.getY();
-
- switch (ev.getAction()) {
- case MotionEvent.ACTION_DOWN:
- if (!mContentBounds.isEmpty()) {
- // Outset the fixed bounds and check if the touch is outside all apps
- Rect tmpRect = new Rect(mContentBounds);
- tmpRect.inset(-grid.allAppsIconSizePx / 2, 0);
- if (ev.getX() < tmpRect.left || ev.getX() > tmpRect.right) {
- mBoundsCheckLastTouchDownPos.set(x, y);
- return true;
- }
- } else {
- // Check if the touch is outside all apps
- if (ev.getX() < getPaddingLeft() ||
- ev.getX() > (getWidth() - getPaddingRight())) {
- mBoundsCheckLastTouchDownPos.set(x, y);
- return true;
- }
- }
- break;
- case MotionEvent.ACTION_UP:
- if (mBoundsCheckLastTouchDownPos.x > -1) {
- ViewConfiguration viewConfig = ViewConfiguration.get(getContext());
- float dx = ev.getX() - mBoundsCheckLastTouchDownPos.x;
- float dy = ev.getY() - mBoundsCheckLastTouchDownPos.y;
- float distance = (float) Math.hypot(dx, dy);
- if (distance < viewConfig.getScaledTouchSlop()) {
- // The background was clicked, so just go home
- Launcher launcher = (Launcher) getContext();
- launcher.showWorkspace(true);
- return true;
- }
- }
- // Fall through
- case MotionEvent.ACTION_CANCEL:
- mBoundsCheckLastTouchDownPos.set(-1, -1);
- break;
- }
- return false;
- }
-
@Override
public void onSearchResult(String query, ArrayList<ComponentKey> apps) {
if (apps != null) {
@@ -718,4 +596,22 @@
public boolean shouldRestoreImeState() {
return !TextUtils.isEmpty(mSearchInput.getText());
}
+
+ @Override
+ public void setInsets(Rect insets) {
+ DeviceProfile grid = mLauncher.getDeviceProfile();
+ if (grid.isVerticalBarLayout()) {
+ ViewGroup.MarginLayoutParams mlp = (MarginLayoutParams) getLayoutParams();
+ mlp.leftMargin = insets.left;
+ mlp.topMargin = insets.top;
+ mlp.rightMargin = insets.right;
+ setLayoutParams(mlp);
+ } else {
+ View navBarBg = findViewById(R.id.nav_bar_bg);
+ ViewGroup.LayoutParams navBarBgLp = navBarBg.getLayoutParams();
+ navBarBgLp.height = insets.bottom;
+ navBarBg.setLayoutParams(navBarBgLp);
+ navBarBg.setVisibility(View.VISIBLE);
+ }
+ }
}
diff --git a/src/com/android/launcher3/allapps/AllAppsGridAdapter.java b/src/com/android/launcher3/allapps/AllAppsGridAdapter.java
index 39ab58b..7b6aef1 100644
--- a/src/com/android/launcher3/allapps/AllAppsGridAdapter.java
+++ b/src/com/android/launcher3/allapps/AllAppsGridAdapter.java
@@ -42,8 +42,6 @@
import com.android.launcher3.Launcher;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
-import com.android.launcher3.shortcuts.DeepShortcutManager;
-import com.android.launcher3.shortcuts.ShortcutsContainerListener;
import java.util.HashMap;
import java.util.List;
@@ -503,10 +501,6 @@
AppInfo info = mApps.getAdapterItems().get(position).appInfo;
BubbleTextView icon = (BubbleTextView) holder.mContent;
icon.applyFromApplicationInfo(info);
- if (DeepShortcutManager.supportsShortcuts(info)) {
- // TODO: only add this listener if the item has shortcuts associated with it.
- icon.setOnTouchListener(new ShortcutsContainerListener(icon));
- }
icon.setAccessibilityDelegate(mLauncher.getAccessibilityDelegate());
break;
}
@@ -514,10 +508,6 @@
AppInfo info = mApps.getAdapterItems().get(position).appInfo;
BubbleTextView icon = (BubbleTextView) holder.mContent;
icon.applyFromApplicationInfo(info);
- if (DeepShortcutManager.supportsShortcuts(info)) {
- // TODO: only add this listener if the item has shortcuts associated with it.
- icon.setOnTouchListener(new ShortcutsContainerListener(icon));
- }
icon.setAccessibilityDelegate(mLauncher.getAccessibilityDelegate());
break;
}
diff --git a/src/com/android/launcher3/allapps/AllAppsRecyclerViewContainerView.java b/src/com/android/launcher3/allapps/AllAppsRecyclerViewContainerView.java
index 1d5b209..cac388c 100644
--- a/src/com/android/launcher3/allapps/AllAppsRecyclerViewContainerView.java
+++ b/src/com/android/launcher3/allapps/AllAppsRecyclerViewContainerView.java
@@ -21,6 +21,7 @@
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
+import android.widget.RelativeLayout;
import com.android.launcher3.BubbleTextView;
import com.android.launcher3.BubbleTextView.BubbleTextShadowHandler;
@@ -33,7 +34,7 @@
* A container for RecyclerView to allow for the click shadow view to be shown behind an icon that
* is launching.
*/
-public class AllAppsRecyclerViewContainerView extends FrameLayout
+public class AllAppsRecyclerViewContainerView extends RelativeLayout
implements BubbleTextShadowHandler {
private final ClickShadowView mTouchFeedbackView;
diff --git a/src/com/android/launcher3/allapps/AllAppsTransitionController.java b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
index 9fcc6a4..adfad08 100644
--- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java
+++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
@@ -6,12 +6,15 @@
import android.animation.AnimatorSet;
import android.animation.ArgbEvaluator;
import android.animation.ObjectAnimator;
+import android.graphics.Color;
import android.support.v4.content.ContextCompat;
+import android.support.v4.graphics.ColorUtils;
import android.support.v4.view.animation.FastOutSlowInInterpolator;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.animation.AccelerateInterpolator;
+import android.view.animation.DecelerateInterpolator;
import android.view.animation.Interpolator;
import com.android.launcher3.DeviceProfile;
@@ -41,6 +44,7 @@
private static final boolean DBG = false;
private final Interpolator mAccelInterpolator = new AccelerateInterpolator(2f);
+ private final Interpolator mDecelInterpolator = new DecelerateInterpolator(3f);
private final Interpolator mFastOutSlowInInterpolator = new FastOutSlowInInterpolator();
private final ScrollInterpolator mScrollInterpolator = new ScrollInterpolator();
@@ -86,8 +90,6 @@
private AnimatorSet mCurrentAnimation;
private boolean mNoIntercept;
- private boolean mLightStatusBar;
-
// Used in discovery bounce animation to provide the transition without workspace changing.
private boolean mIsTranslateWithoutWorkspace = false;
private AnimatorSet mDiscoBounceAnimation;
@@ -106,10 +108,10 @@
}
@Override
- public boolean onInterceptTouchEvent(MotionEvent ev) {
+ public boolean onControllerInterceptTouchEvent(MotionEvent ev) {
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
mNoIntercept = false;
- if (mLauncher.getWorkspace().isInOverviewMode() || mLauncher.isWidgetsViewVisible()) {
+ if (!mLauncher.isAllAppsVisible() && mLauncher.getWorkspace().workspaceInModalState()) {
mNoIntercept = true;
} else if (mLauncher.isAllAppsVisible() &&
!mAppsView.shouldContainerScroll(ev)) {
@@ -160,9 +162,8 @@
return true;
}
} else {
- if ((mLauncher.getDragLayer().isEventOverHotseat(ev)
- || mLauncher.getDragLayer().isEventOverPageIndicator(ev))
- && !grid.isVerticalBarLayout()) {
+ if (mLauncher.getDragLayer().isEventOverHotseat(ev) ||
+ mLauncher.getDragLayer().isEventOverPageIndicator(ev)) {
return true;
}
}
@@ -173,7 +174,7 @@
}
@Override
- public boolean onTouchEvent(MotionEvent ev) {
+ public boolean onControllerTouchEvent(MotionEvent ev) {
return mDetector.onTouchEvent(ev);
}
@@ -274,26 +275,14 @@
}
private void updateLightStatusBar(float shift) {
- boolean enable = shift <= mStatusBarHeight / 2;
// Do not modify status bar on landscape as all apps is not full bleed.
if (mLauncher.getDeviceProfile().isVerticalBarLayout()) {
return;
}
- // Already set correctly
- if (mLightStatusBar == enable) {
- return;
- }
- int systemUiFlags = mLauncher.getWindow().getDecorView().getSystemUiVisibility();
- if (enable) {
- mLauncher.getWindow().getDecorView().setSystemUiVisibility(systemUiFlags
- | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
-
- } else {
- mLauncher.getWindow().getDecorView().setSystemUiVisibility(systemUiFlags
- & ~(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR));
-
- }
- mLightStatusBar = enable;
+ // Use a light status bar (dark icons) if all apps is behind at least half of the status
+ // bar. If the status bar is already light due to wallpaper extraction, keep it that way.
+ boolean forceLight = shift <= mStatusBarHeight / 2;
+ mLauncher.activateLightStatusBar(forceLight);
}
/**
@@ -306,12 +295,14 @@
float workspaceHotseatAlpha = Utilities.boundToRange(progress, 0f, 1f);
float alpha = 1 - workspaceHotseatAlpha;
-
float interpolation = mAccelInterpolator.getInterpolation(workspaceHotseatAlpha);
- int color = (Integer) mEvaluator.evaluate(alpha,
+ int color = (Integer) mEvaluator.evaluate(mDecelInterpolator.getInterpolation(alpha),
mHotseatBackgroundColor, mAllAppsBackgroundColor);
- mAppsView.setRevealDrawableColor(color);
+ int bgAlpha = Color.alpha((int) mEvaluator.evaluate(alpha,
+ mHotseatBackgroundColor, mAllAppsBackgroundColor));
+
+ mAppsView.setRevealDrawableColor(ColorUtils.setAlphaComponent(color, bgAlpha));
mAppsView.getContentView().setAlpha(alpha);
mAppsView.setTranslationY(shiftCurrent);
diff --git a/src/com/android/launcher3/compat/AlphabeticIndexCompat.java b/src/com/android/launcher3/compat/AlphabeticIndexCompat.java
index ec65c3e..c7a529d 100644
--- a/src/com/android/launcher3/compat/AlphabeticIndexCompat.java
+++ b/src/com/android/launcher3/compat/AlphabeticIndexCompat.java
@@ -1,12 +1,14 @@
package com.android.launcher3.compat;
+import android.annotation.TargetApi;
import android.content.Context;
-import android.content.res.Configuration;
+import android.icu.text.AlphabeticIndex;
+import android.os.Build;
+import android.os.LocaleList;
import android.util.Log;
import com.android.launcher3.Utilities;
-import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.util.Locale;
@@ -157,69 +159,39 @@
}
/**
- * Reflected android.icu.text.AlphabeticIndex implementation, falls back to the base
- * alphabetic index.
+ * Implementation based on {@link AlphabeticIndex}.
*/
+ @TargetApi(Build.VERSION_CODES.N)
private static class AlphabeticIndexVN extends BaseIndex {
- private Object mAlphabeticIndex;
- private Method mGetBucketIndexMethod;
+ private final AlphabeticIndex.ImmutableIndex mAlphabeticIndex;
- private Method mGetBucketMethod;
- private Method mGetLabelMethod;
+ public AlphabeticIndexVN(Context context) {
+ LocaleList locales = context.getResources().getConfiguration().getLocales();
+ int localeCount = locales.size();
- public AlphabeticIndexVN(Context context) throws Exception {
- // TODO: Replace this with locale list once available.
- Object locales = Configuration.class.getDeclaredMethod("getLocales").invoke(
- context.getResources().getConfiguration());
- int localeCount = (Integer) locales.getClass().getDeclaredMethod("size").invoke(locales);
- Method localeGetter = locales.getClass().getDeclaredMethod("get", int.class);
- Locale primaryLocale = localeCount == 0 ? Locale.ENGLISH :
- (Locale) localeGetter.invoke(locales, 0);
-
- Class clazz = Class.forName("android.icu.text.AlphabeticIndex");
- mAlphabeticIndex = clazz.getConstructor(Locale.class).newInstance(primaryLocale);
-
- Method addLocales = clazz.getDeclaredMethod("addLabels", Locale[].class);
+ Locale primaryLocale = localeCount == 0 ? Locale.ENGLISH : locales.get(0);
+ AlphabeticIndex indexBuilder = new AlphabeticIndex(primaryLocale);
for (int i = 1; i < localeCount; i++) {
- Locale l = (Locale) localeGetter.invoke(locales, i);
- addLocales.invoke(mAlphabeticIndex, new Object[]{ new Locale[] {l}});
+ indexBuilder.addLabels(locales.get(i));
}
- addLocales.invoke(mAlphabeticIndex, new Object[]{ new Locale[] {Locale.ENGLISH}});
+ indexBuilder.addLabels(Locale.ENGLISH);
- mAlphabeticIndex = mAlphabeticIndex.getClass()
- .getDeclaredMethod("buildImmutableIndex")
- .invoke(mAlphabeticIndex);
-
- mGetBucketIndexMethod = mAlphabeticIndex.getClass().getDeclaredMethod(
- "getBucketIndex", CharSequence.class);
- mGetBucketMethod = mAlphabeticIndex.getClass().getDeclaredMethod("getBucket", int.class);
- mGetLabelMethod = mGetBucketMethod.getReturnType().getDeclaredMethod("getLabel");
+ mAlphabeticIndex = indexBuilder.buildImmutableIndex();
}
/**
* Returns the index of the bucket in which {@param s} should appear.
*/
protected int getBucketIndex(String s) {
- try {
- return (Integer) mGetBucketIndexMethod.invoke(mAlphabeticIndex, s);
- } catch (Exception e) {
- e.printStackTrace();
- }
- return super.getBucketIndex(s);
+ return mAlphabeticIndex.getBucketIndex(s);
}
/**
* Returns the label for the bucket at the given index
*/
protected String getBucketLabel(int index) {
- try {
- return (String) mGetLabelMethod.invoke(
- mGetBucketMethod.invoke(mAlphabeticIndex, index));
- } catch (Exception e) {
- e.printStackTrace();
- }
- return super.getBucketLabel(index);
+ return mAlphabeticIndex.getBucket(index).getLabel();
}
}
}
diff --git a/src/com/android/launcher3/dragndrop/DragController.java b/src/com/android/launcher3/dragndrop/DragController.java
index a93ee90..c7b66e7 100644
--- a/src/com/android/launcher3/dragndrop/DragController.java
+++ b/src/com/android/launcher3/dragndrop/DragController.java
@@ -131,6 +131,8 @@
protected final int mFlingToDeleteThresholdVelocity;
private VelocityTracker mVelocityTracker;
+ private boolean mIsDragDeferred;
+
/**
* Interface to receive notifications when a drag starts or stops
*/
@@ -228,9 +230,14 @@
mDragObject = new DropTarget.DragObject();
+ mIsDragDeferred = !mOptions.deferDragCondition.shouldStartDeferredDrag(0);
+
final Resources res = mLauncher.getResources();
- final float scaleDps = FeatureFlags.LAUNCHER3_LEGACY_WORKSPACE_DND ?
- res.getDimensionPixelSize(R.dimen.dragViewScale) : 0f;
+ final float scaleDps = FeatureFlags.LAUNCHER3_LEGACY_WORKSPACE_DND
+ ? res.getDimensionPixelSize(R.dimen.dragViewScale)
+ : mIsDragDeferred
+ ? res.getDimensionPixelSize(R.dimen.deferred_drag_view_scale)
+ : 0f;
final DragView dragView = mDragObject.dragView = new DragView(mLauncher, b, registrationX,
registrationY, initialDragViewScale, scaleDps);
@@ -264,8 +271,10 @@
dragView.show(mMotionDownX, mMotionDownY);
mDistanceSinceScroll = 0;
- for (DragListener listener : new ArrayList<>(mListeners)) {
- listener.onDragStart(mDragObject, mOptions);
+ if (!mIsDragDeferred) {
+ startDeferredDrag();
+ } else {
+ mOptions.deferDragCondition.onDeferredDragStart();
}
mLastTouch[0] = mMotionDownX;
@@ -275,8 +284,16 @@
return dragView;
}
- public Point getMotionDown() {
- return new Point(mMotionDownX, mMotionDownY);
+ public boolean isDeferringDrag() {
+ return mIsDragDeferred;
+ }
+
+ public void startDeferredDrag() {
+ for (DragListener listener : new ArrayList<>(mListeners)) {
+ listener.onDragStart(mDragObject, mOptions);
+ }
+ mOptions.deferDragCondition.onDragStart();
+ mIsDragDeferred = false;
}
/**
@@ -439,7 +456,7 @@
/**
* Call this from a drag source view.
*/
- public boolean onInterceptTouchEvent(MotionEvent ev) {
+ public boolean onControllerInterceptTouchEvent(MotionEvent ev) {
if (mOptions != null && mOptions.isAccessibleDrag) {
return false;
}
@@ -518,6 +535,11 @@
mLastTouch[0] = x;
mLastTouch[1] = y;
checkScrollState(x, y);
+
+ if (mIsDragDeferred && mOptions.deferDragCondition.shouldStartDeferredDrag(
+ Math.hypot(x - mMotionDownX, y - mMotionDownY))) {
+ startDeferredDrag();
+ }
}
public float getDistanceDragged() {
@@ -582,7 +604,7 @@
/**
* Call this from a drag source view.
*/
- public boolean onTouchEvent(MotionEvent ev) {
+ public boolean onControllerTouchEvent(MotionEvent ev) {
if (mDragDriver == null || mOptions == null || mOptions.isAccessibleDrag) {
return false;
}
@@ -715,6 +737,9 @@
mDragObject.dragSource.onDropCompleted(
dropTargetAsView, mDragObject, flingVel != null, accepted);
mLauncher.getUserEventDispatcher().logDragNDrop(mDragObject, dropTargetAsView);
+ if (mIsDragDeferred) {
+ mOptions.deferDragCondition.onDropBeforeDeferredDrag();
+ }
}
private DropTarget findDropTarget(int x, int y, int[] dropCoordinates) {
diff --git a/src/com/android/launcher3/dragndrop/DragLayer.java b/src/com/android/launcher3/dragndrop/DragLayer.java
index 016347b..e1c74bf 100644
--- a/src/com/android/launcher3/dragndrop/DragLayer.java
+++ b/src/com/android/launcher3/dragndrop/DragLayer.java
@@ -36,7 +36,6 @@
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.util.AttributeSet;
-import android.util.Log;
import android.view.DragEvent;
import android.view.KeyEvent;
import android.view.MotionEvent;
@@ -53,8 +52,6 @@
import com.android.launcher3.CellLayout;
import com.android.launcher3.DropTargetBar;
import com.android.launcher3.InsettableFrameLayout;
-import com.android.launcher3.InstallShortcutReceiver;
-import com.android.launcher3.ItemInfo;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherAppWidgetHostView;
import com.android.launcher3.PinchToOverviewListener;
@@ -72,7 +69,6 @@
import com.android.launcher3.util.Thunk;
import com.android.launcher3.util.TouchController;
-import java.net.URISyntaxException;
import java.util.ArrayList;
/**
@@ -90,11 +86,9 @@
@Thunk DragController mDragController;
- private int mXDown, mYDown;
private Launcher mLauncher;
// Variables relating to resizing widgets
- private final ArrayList<AppWidgetResizeFrame> mResizeFrames = new ArrayList<>();
private final boolean mIsRtl;
private AppWidgetResizeFrame mCurrentResizeFrame;
@@ -209,23 +203,6 @@
}
private boolean handleTouchDown(MotionEvent ev, boolean intercept) {
- Rect hitRect = new Rect();
- int x = (int) ev.getX();
- int y = (int) ev.getY();
-
- for (AppWidgetResizeFrame child: mResizeFrames) {
- child.getHitRect(hitRect);
- if (hitRect.contains(x, y)) {
- if (child.beginResizeIfPointInRegion(x - child.getLeft(), y - child.getTop())) {
- mCurrentResizeFrame = child;
- mXDown = x;
- mYDown = y;
- requestDisallowInterceptTouchEvent(true);
- return true;
- }
- }
- }
-
// Remove the shortcuts container when touching outside of it.
DeepShortcutsContainer deepShortcutsContainer = mLauncher.getOpenShortcutsContainer();
if (deepShortcutsContainer != null) {
@@ -289,21 +266,27 @@
}
mTouchCompleteListener = null;
}
- clearAllResizeFrames();
-
mActiveController = null;
- if (mDragController.onInterceptTouchEvent(ev)) {
+ if (mCurrentResizeFrame != null
+ && mCurrentResizeFrame.onControllerInterceptTouchEvent(ev)) {
+ mActiveController = mCurrentResizeFrame;
+ return true;
+ } else {
+ clearResizeFrame();
+ }
+
+ if (mDragController.onControllerInterceptTouchEvent(ev)) {
mActiveController = mDragController;
return true;
}
- if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && mAllAppsController.onInterceptTouchEvent(ev)) {
+ if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP && mAllAppsController.onControllerInterceptTouchEvent(ev)) {
mActiveController = mAllAppsController;
return true;
}
- if (mPinchListener != null && mPinchListener.onInterceptTouchEvent(ev)) {
+ if (mPinchListener != null && mPinchListener.onControllerInterceptTouchEvent(ev)) {
// Stop listening for scrolling etc. (onTouchEvent() handles the rest of the pinch.)
mActiveController = mPinchListener;
return true;
@@ -405,12 +388,8 @@
@Override
public boolean onTouchEvent(MotionEvent ev) {
- boolean handled = false;
int action = ev.getAction();
- int x = (int) ev.getX();
- int y = (int) ev.getY();
-
if (action == MotionEvent.ACTION_DOWN) {
if (handleTouchDown(ev, false)) {
return true;
@@ -422,22 +401,8 @@
mTouchCompleteListener = null;
}
- if (mCurrentResizeFrame != null) {
- handled = true;
- switch (action) {
- case MotionEvent.ACTION_MOVE:
- mCurrentResizeFrame.visualizeResizeForDelta(x - mXDown, y - mYDown);
- break;
- case MotionEvent.ACTION_CANCEL:
- case MotionEvent.ACTION_UP:
- mCurrentResizeFrame.visualizeResizeForDelta(x - mXDown, y - mYDown);
- mCurrentResizeFrame.onTouchUp();
- mCurrentResizeFrame = null;
- }
- }
- if (handled) return true;
if (mActiveController != null) {
- return mActiveController.onTouchEvent(ev);
+ return mActiveController.onControllerTouchEvent(ev);
}
return false;
}
@@ -645,36 +610,24 @@
}
}
- public void clearAllResizeFrames() {
- if (mResizeFrames.size() > 0) {
- for (AppWidgetResizeFrame frame: mResizeFrames) {
- frame.commitResize();
- removeView(frame);
- }
- mResizeFrames.clear();
+ public void clearResizeFrame() {
+ if (mCurrentResizeFrame != null) {
+ mCurrentResizeFrame.commitResize();
+ removeView(mCurrentResizeFrame);
+ mCurrentResizeFrame = null;
}
}
- public boolean hasResizeFrames() {
- return mResizeFrames.size() > 0;
- }
+ public void addResizeFrame(LauncherAppWidgetHostView widget, CellLayout cellLayout) {
+ clearResizeFrame();
- public boolean isWidgetBeingResized() {
- return mCurrentResizeFrame != null;
- }
-
- public void addResizeFrame(ItemInfo itemInfo, LauncherAppWidgetHostView widget,
- CellLayout cellLayout) {
- AppWidgetResizeFrame resizeFrame = new AppWidgetResizeFrame(getContext(),
- widget, cellLayout, this);
+ mCurrentResizeFrame = new AppWidgetResizeFrame(getContext(), widget, cellLayout, this);
LayoutParams lp = new LayoutParams(-1, -1);
lp.customPosition = true;
- addView(resizeFrame, lp);
- mResizeFrames.add(resizeFrame);
-
- resizeFrame.snapToWidget(false);
+ addView(mCurrentResizeFrame, lp);
+ mCurrentResizeFrame.snapToWidget(false);
}
public void animateViewIntoPosition(DragView dragView, final int[] pos, float alpha,
diff --git a/src/com/android/launcher3/dragndrop/DragOptions.java b/src/com/android/launcher3/dragndrop/DragOptions.java
index 3d52a48..dbf46f3 100644
--- a/src/com/android/launcher3/dragndrop/DragOptions.java
+++ b/src/com/android/launcher3/dragndrop/DragOptions.java
@@ -28,4 +28,44 @@
/** Specifies the start location for the system DnD, null when using internal DnD */
public Point systemDndStartPoint = null;
+
+ /** Determines when a deferred drag should start. By default, drags aren't deferred at all. */
+ public DeferDragCondition deferDragCondition = new DeferDragCondition();
+
+ /**
+ * Specifies a condition that must be met before DragListener#onDragStart() is called.
+ * By default, there is no condition and onDragStart() is called immediately following
+ * DragController#startDrag().
+ *
+ * This condition can be overridden, and callbacks are provided for the following cases:
+ * - The drag starts, but onDragStart() is deferred (onDeferredDragStart()).
+ * - The drag ends before the condition is met (onDropBeforeDeferredDrag()).
+ * - The condition is met (onDragStart()).
+ */
+ public static class DeferDragCondition {
+ public boolean shouldStartDeferredDrag(double distanceDragged) {
+ return true;
+ }
+
+ /**
+ * The drag has started, but onDragStart() is deferred.
+ * This happens when shouldStartDeferredDrag() returns true.
+ */
+ public void onDeferredDragStart() {
+ // Do nothing.
+ }
+
+ /**
+ * User dropped before the deferred condition was met,
+ * i.e. before shouldStartDeferredDrag() returned true.
+ */
+ public void onDropBeforeDeferredDrag() {
+ // Do nothing
+ }
+
+ /** onDragStart() has been called, now we are in a normal drag. */
+ public void onDragStart() {
+ // Do nothing
+ }
+ }
}
diff --git a/src/com/android/launcher3/dynamicui/ColorExtractionService.java b/src/com/android/launcher3/dynamicui/ColorExtractionService.java
index 89594f4..c15b710 100644
--- a/src/com/android/launcher3/dynamicui/ColorExtractionService.java
+++ b/src/com/android/launcher3/dynamicui/ColorExtractionService.java
@@ -26,6 +26,7 @@
import com.android.launcher3.LauncherProvider;
import com.android.launcher3.LauncherSettings;
+import com.android.launcher3.R;
/**
* Extracts colors from the wallpaper, and saves results to {@link LauncherProvider}.
@@ -52,16 +53,21 @@
Bitmap wallpaper = ((BitmapDrawable) wallpaperManager.getDrawable()).getBitmap();
Palette palette = Palette.from(wallpaper).generate();
extractedColors.updatePalette(palette);
- // We extract colors for the hotseat separately,
- // since it only considers the lower part of the wallpaper.
- // TODO(twickham): update Palette library to 23.3.1 or higher,
- // which fixes a bug with using regions (b/28349435).
+ // We extract colors for the hotseat and status bar separately,
+ // since they only consider part of the wallpaper.
Palette hotseatPalette = Palette.from(wallpaper)
.setRegion(0, (int) (wallpaper.getHeight() * (1f - HOTSEAT_FRACTION)),
wallpaper.getWidth(), wallpaper.getHeight())
.clearFilters()
.generate();
extractedColors.updateHotseatPalette(hotseatPalette);
+
+ int statusBarHeight = getResources().getDimensionPixelSize(R.dimen.status_bar_height);
+ Palette statusBarPalette = Palette.from(wallpaper)
+ .setRegion(0, 0, wallpaper.getWidth(), statusBarHeight)
+ .clearFilters()
+ .generate();
+ extractedColors.updateStatusBarPalette(statusBarPalette);
}
// Save the extracted colors and wallpaper id to LauncherProvider.
diff --git a/src/com/android/launcher3/dynamicui/ExtractedColors.java b/src/com/android/launcher3/dynamicui/ExtractedColors.java
index e545288..4db0797 100644
--- a/src/com/android/launcher3/dynamicui/ExtractedColors.java
+++ b/src/com/android/launcher3/dynamicui/ExtractedColors.java
@@ -38,6 +38,7 @@
// loading extracted colors. New colors should always be added at the end.
public static final int VERSION_INDEX = 0;
public static final int HOTSEAT_INDEX = 1;
+ public static final int STATUS_BAR_INDEX = 2;
// public static final int VIBRANT_INDEX = 2;
// public static final int VIBRANT_DARK_INDEX = 3;
// public static final int VIBRANT_LIGHT_INDEX = 4;
@@ -45,8 +46,8 @@
// public static final int MUTED_DARK_INDEX = 6;
// public static final int MUTED_LIGHT_INDEX = 7;
- public static final int NUM_COLOR_PROFILES = 1;
- private static final int VERSION = 1;
+ public static final int NUM_COLOR_PROFILES = 2;
+ private static final int VERSION = 2;
private static final String COLOR_SEPARATOR = ",";
@@ -156,4 +157,9 @@
}
setColorAtIndex(HOTSEAT_INDEX, hotseatColor);
}
+
+ public void updateStatusBarPalette(Palette statusBarPalette) {
+ setColorAtIndex(STATUS_BAR_INDEX, ExtractionUtils.isSuperLight(statusBarPalette) ?
+ DEFAULT_LIGHT : DEFAULT_DARK);
+ }
}
diff --git a/src/com/android/launcher3/dynamicui/ExtractionUtils.java b/src/com/android/launcher3/dynamicui/ExtractionUtils.java
index 6dc0035..1e663a9 100644
--- a/src/com/android/launcher3/dynamicui/ExtractionUtils.java
+++ b/src/com/android/launcher3/dynamicui/ExtractionUtils.java
@@ -16,18 +16,18 @@
package com.android.launcher3.dynamicui;
+import android.annotation.TargetApi;
import android.app.WallpaperManager;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Color;
+import android.os.Build;
import android.support.v4.graphics.ColorUtils;
import android.support.v7.graphics.Palette;
import com.android.launcher3.Utilities;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
import java.util.List;
/**
@@ -37,7 +37,6 @@
public static final String EXTRACTED_COLORS_PREFERENCE_KEY = "pref_extractedColors";
public static final String WALLPAPER_ID_PREFERENCE_KEY = "pref_wallpaperId";
- private static final int FLAG_SET_SYSTEM = 1 << 0; // TODO: use WallpaperManager.FLAG_SET_SYSTEM
private static final float MIN_CONTRAST_RATIO = 2f;
/**
@@ -73,14 +72,10 @@
return wallpaperId != savedWallpaperId;
}
+ @TargetApi(Build.VERSION_CODES.N)
public static int getWallpaperId(WallpaperManager wallpaperManager) {
- // TODO: use WallpaperManager#getWallpaperId(WallpaperManager.FLAG_SET_SYSTEM) directly.
- try {
- Method getWallpaperId = WallpaperManager.class.getMethod("getWallpaperId", int.class);
- return (int) getWallpaperId.invoke(wallpaperManager, FLAG_SET_SYSTEM);
- } catch (InvocationTargetException | NoSuchMethodException | IllegalAccessException e) {
- return -1;
- }
+ return Utilities.isNycOrAbove() ?
+ wallpaperManager.getWallpaperId(WallpaperManager.FLAG_SYSTEM) : -1;
}
public static boolean isSuperLight(Palette p) {
diff --git a/src/com/android/launcher3/folder/Folder.java b/src/com/android/launcher3/folder/Folder.java
index b64d12c..ebbe641 100644
--- a/src/com/android/launcher3/folder/Folder.java
+++ b/src/com/android/launcher3/folder/Folder.java
@@ -51,6 +51,7 @@
import com.android.launcher3.Alarm;
import com.android.launcher3.AppInfo;
+import com.android.launcher3.BubbleTextView;
import com.android.launcher3.CellLayout;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.DragSource;
@@ -77,6 +78,7 @@
import com.android.launcher3.dragndrop.DragLayer;
import com.android.launcher3.dragndrop.DragOptions;
import com.android.launcher3.pageindicators.PageIndicatorDots;
+import com.android.launcher3.shortcuts.DeepShortcutsContainer;
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.launcher3.userevent.nano.LauncherLogProto.Target;
import com.android.launcher3.util.CircleRevealOutlineProvider;
@@ -279,7 +281,17 @@
public boolean onLongClick(View v) {
// Return if global dragging is not enabled
if (!mLauncher.isDraggingEnabled()) return true;
- return startDrag(v, new DragOptions());
+ DragOptions dragOptions = new DragOptions();
+ if (v instanceof BubbleTextView) {
+ BubbleTextView icon = (BubbleTextView) v;
+ if (icon.hasDeepShortcuts()) {
+ DeepShortcutsContainer dsc = DeepShortcutsContainer.showForIcon(icon);
+ if (dsc != null) {
+ dragOptions.deferDragCondition = dsc.createDeferDragCondition(null);
+ }
+ }
+ }
+ return startDrag(v, dragOptions);
}
public boolean startDrag(View v, DragOptions options) {
@@ -904,7 +916,7 @@
if (mDeleteFolderOnDropCompleted && !mItemAddedBackToSelfViaIcon && target != this) {
replaceFolderWithFinalItem();
}
- } else {
+ } else if (!mDragController.isDeferringDrag()) {
// The drag failed, we need to return the item to the folder
ShortcutInfo info = (ShortcutInfo) d.dragInfo;
View icon = (mCurrentDragView != null && mCurrentDragView.getTag() == info)
@@ -1297,7 +1309,9 @@
mIsExternalDrag = false;
} else {
currentDragView = mCurrentDragView;
- mContent.addViewForRank(currentDragView, si, mEmptyCellRank);
+ if (!mDragController.isDeferringDrag()) {
+ mContent.addViewForRank(currentDragView, si, mEmptyCellRank);
+ }
}
if (d.dragView.hasDrawn()) {
@@ -1318,9 +1332,11 @@
mItemsInvalidated = true;
rearrangeChildren();
- // Temporarily suppress the listener, as we did all the work already here.
- try (SuppressInfoChanges s = new SuppressInfoChanges()) {
- mInfo.add(si, false);
+ if (!mDragController.isDeferringDrag()) {
+ // Temporarily suppress the listener, as we did all the work already here.
+ try (SuppressInfoChanges s = new SuppressInfoChanges()) {
+ mInfo.add(si, false);
+ }
}
// Clear the drag info, as it is no longer being dragged.
diff --git a/src/com/android/launcher3/folder/FolderPagedView.java b/src/com/android/launcher3/folder/FolderPagedView.java
index 1171d48..c6b0671 100644
--- a/src/com/android/launcher3/folder/FolderPagedView.java
+++ b/src/com/android/launcher3/folder/FolderPagedView.java
@@ -44,10 +44,8 @@
import com.android.launcher3.Utilities;
import com.android.launcher3.Workspace.ItemOperator;
import com.android.launcher3.dragndrop.DragController;
-import com.android.launcher3.pageindicators.PageIndicator;
import com.android.launcher3.keyboard.ViewGroupFocusHelper;
-import com.android.launcher3.shortcuts.DeepShortcutManager;
-import com.android.launcher3.shortcuts.ShortcutsContainerListener;
+import com.android.launcher3.pageindicators.PageIndicator;
import com.android.launcher3.util.Thunk;
import java.util.ArrayList;
@@ -236,10 +234,6 @@
textView.applyFromShortcutInfo(item, mIconCache);
textView.setOnClickListener(mFolder);
textView.setOnLongClickListener(mFolder);
- if (DeepShortcutManager.supportsShortcuts(item)) {
- // TODO: only add this listener if the item has shortcuts associated with it.
- textView.setOnTouchListener(new ShortcutsContainerListener(textView));
- }
textView.setOnFocusChangeListener(mFocusIndicatorHelper);
textView.setOnKeyListener(mKeyListener);
diff --git a/src/com/android/launcher3/logging/UserEventDispatcher.java b/src/com/android/launcher3/logging/UserEventDispatcher.java
index 0356a9c..b5da049 100644
--- a/src/com/android/launcher3/logging/UserEventDispatcher.java
+++ b/src/com/android/launcher3/logging/UserEventDispatcher.java
@@ -37,6 +37,9 @@
/**
* Manages the creation of {@link LauncherEvent}.
+ * To debug this class, execute following command before sideloading a new apk.
+ *
+ * $ adb shell setprop log.tag.UserEvent VERBOSE
*/
public class UserEventDispatcher {
@@ -152,6 +155,15 @@
dispatchUserEvent(ev, intent);
}
+ public void logActionOnItem(int action, int itemType) {
+ LauncherEvent event = LoggerUtils.initLauncherEvent(Action.TOUCH, Target.ITEM);
+ event.action.touch = action;
+ event.srcTarget[0].itemType = itemType;
+ event.elapsedContainerMillis = SystemClock.uptimeMillis() - mElapsedContainerMillis;
+ event.elapsedSessionMillis = SystemClock.uptimeMillis() - mElapsedSessionMillis;
+ dispatchUserEvent(event, null);
+ }
+
public void logActionOnControl(int action, int controlType) {
LauncherEvent event = LoggerUtils.initLauncherEvent(Action.TOUCH, Target.CONTROL);
event.action.touch = action;
diff --git a/src/com/android/launcher3/shortcuts/DeepShortcutManager.java b/src/com/android/launcher3/shortcuts/DeepShortcutManager.java
index 49d6fa9..9037af4 100644
--- a/src/com/android/launcher3/shortcuts/DeepShortcutManager.java
+++ b/src/com/android/launcher3/shortcuts/DeepShortcutManager.java
@@ -42,13 +42,8 @@
public class DeepShortcutManager {
private static final String TAG = "DeepShortcutManager";
- // TODO: Replace this with platform constants when the new sdk is available.
- public static final int FLAG_MATCH_DYNAMIC = 1 << 0;
- public static final int FLAG_MATCH_MANIFEST = 1 << 3;
- public static final int FLAG_MATCH_PINNED = 1 << 1;
-
- private static final int FLAG_GET_ALL =
- FLAG_MATCH_DYNAMIC | FLAG_MATCH_PINNED | FLAG_MATCH_MANIFEST;
+ private static final int FLAG_GET_ALL = ShortcutQuery.FLAG_MATCH_DYNAMIC
+ | ShortcutQuery.FLAG_MATCH_MANIFEST | ShortcutQuery.FLAG_MATCH_PINNED;
private final LauncherApps mLauncherApps;
private boolean mWasLastCallSuccess;
@@ -86,7 +81,7 @@
*/
public List<ShortcutInfoCompat> queryForShortcutsContainer(ComponentName activity,
List<String> ids, UserHandleCompat user) {
- return query(FLAG_MATCH_MANIFEST | FLAG_MATCH_DYNAMIC,
+ return query(ShortcutQuery.FLAG_MATCH_MANIFEST | ShortcutQuery.FLAG_MATCH_DYNAMIC,
activity.getPackageName(), activity, ids, user);
}
@@ -172,7 +167,7 @@
*/
public List<ShortcutInfoCompat> queryForPinnedShortcuts(String packageName,
UserHandleCompat user) {
- return query(FLAG_MATCH_PINNED, packageName, null, null, user);
+ return query(ShortcutQuery.FLAG_MATCH_PINNED, packageName, null, null, user);
}
public List<ShortcutInfoCompat> queryForAllShortcuts(UserHandleCompat user) {
diff --git a/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java b/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java
index 19624fe..9ff4721 100644
--- a/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java
+++ b/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java
@@ -19,6 +19,7 @@
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
+import android.animation.TimeInterpolator;
import android.annotation.TargetApi;
import android.content.ComponentName;
import android.content.Context;
@@ -33,16 +34,13 @@
import android.os.Looper;
import android.util.AttributeSet;
import android.view.Gravity;
-import android.view.HapticFeedbackConstants;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
-import android.view.ViewConfiguration;
import android.view.accessibility.AccessibilityEvent;
import android.view.animation.DecelerateInterpolator;
import android.widget.LinearLayout;
-import com.android.launcher3.AppInfo;
import com.android.launcher3.BubbleTextView;
import com.android.launcher3.DragSource;
import com.android.launcher3.DropTarget;
@@ -54,10 +52,10 @@
import com.android.launcher3.LauncherModel;
import com.android.launcher3.LauncherSettings;
import com.android.launcher3.LauncherViewPropertyAnimator;
+import com.android.launcher3.LogAccelerateInterpolator;
import com.android.launcher3.R;
import com.android.launcher3.ShortcutInfo;
import com.android.launcher3.Utilities;
-import com.android.launcher3.Workspace;
import com.android.launcher3.accessibility.ShortcutMenuAccessibilityDelegate;
import com.android.launcher3.compat.UserHandleCompat;
import com.android.launcher3.dragndrop.DragController;
@@ -84,18 +82,12 @@
private final Launcher mLauncher;
private final DeepShortcutManager mDeepShortcutsManager;
- private final int mDragDeadzone;
private final int mStartDragThreshold;
private final ShortcutMenuAccessibilityDelegate mAccessibilityDelegate;
+ private final boolean mIsRtl;
private BubbleTextView mDeferredDragIcon;
- private int mActivePointerId;
- private int[] mTouchDown = null;
- private DragView mDragView;
- private float mLastX, mLastY;
- private float mDistanceDragged = 0;
private final Rect mTempRect = new Rect();
- private final int[] mTempXY = new int[2];
private Point mIconLastTouchPos = new Point();
private boolean mIsLeftAligned;
private boolean mIsAboveIcon;
@@ -105,16 +97,11 @@
private boolean mDeferContainerRemoval;
private boolean mIsOpen;
- private boolean mSrcIconDragStarted;
- private boolean mIsRtl;
- private int mArrowHorizontalOffset;
-
public DeepShortcutsContainer(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
mLauncher = Launcher.getLauncher(context);
mDeepShortcutsManager = LauncherAppState.getInstance().getShortcutManager();
- mDragDeadzone = ViewConfiguration.get(context).getScaledTouchSlop();
mStartDragThreshold = getResources().getDimensionPixelSize(
R.dimen.deep_shortcuts_start_drag_threshold);
mAccessibilityDelegate = new ShortcutMenuAccessibilityDelegate(mLauncher);
@@ -133,7 +120,7 @@
final Resources resources = getResources();
final int arrowWidth = resources.getDimensionPixelSize(R.dimen.deep_shortcuts_arrow_width);
final int arrowHeight = resources.getDimensionPixelSize(R.dimen.deep_shortcuts_arrow_height);
- mArrowHorizontalOffset = resources.getDimensionPixelSize(
+ final int arrowHorizontalOffset = resources.getDimensionPixelSize(
R.dimen.deep_shortcuts_arrow_horizontal_offset);
final int arrowVerticalOffset = resources.getDimensionPixelSize(
R.dimen.deep_shortcuts_arrow_vertical_offset);
@@ -158,7 +145,7 @@
orientAboutIcon(originalIcon, arrowHeight + arrowVerticalOffset);
// Add the arrow.
- mArrow = addArrowView(mArrowHorizontalOffset, arrowVerticalOffset, arrowWidth, arrowHeight);
+ mArrow = addArrowView(arrowHorizontalOffset, arrowVerticalOffset, arrowWidth, arrowHeight);
mArrow.setPivotX(arrowWidth / 2);
mArrow.setPivotY(mIsAboveIcon ? 0 : arrowHeight);
@@ -229,14 +216,19 @@
final long duration = getResources().getInteger(
R.integer.config_deepShortcutOpenDuration);
+ final long arrowScaleDuration = getResources().getInteger(
+ R.integer.config_deepShortcutArrowOpenDuration);
+ final long arrowScaleDelay = duration - arrowScaleDuration;
final long stagger = getResources().getInteger(
R.integer.config_deepShortcutOpenStagger);
+ final TimeInterpolator fadeInterpolator = new LogAccelerateInterpolator(100, 0);
// Animate shortcuts
DecelerateInterpolator interpolator = new DecelerateInterpolator();
for (int i = 0; i < shortcutCount; i++) {
final DeepShortcutView deepShortcutView = getShortcutAt(i);
deepShortcutView.setVisibility(INVISIBLE);
+ deepShortcutView.setAlpha(0);
Animator anim = deepShortcutView.createOpenAnimation(mIsAboveIcon, mIsLeftAligned);
anim.addListener(new AnimatorListenerAdapter() {
@@ -250,6 +242,12 @@
anim.setStartDelay(stagger * animationIndex);
anim.setInterpolator(interpolator);
shortcutAnims.play(anim);
+
+ Animator fadeAnim = new LauncherViewPropertyAnimator(deepShortcutView).alpha(1);
+ fadeAnim.setInterpolator(fadeInterpolator);
+ // We want the shortcut to be fully opaque before the arrow starts animating.
+ fadeAnim.setDuration(arrowScaleDelay);
+ shortcutAnims.play(fadeAnim);
}
shortcutAnims.addListener(new AnimatorListenerAdapter() {
@Override
@@ -265,8 +263,6 @@
// Animate the arrow
mArrow.setScaleX(0);
mArrow.setScaleY(0);
- final long arrowScaleDelay = duration / 6;
- final long arrowScaleDuration = duration - arrowScaleDelay;
Animator arrowScale = new LauncherViewPropertyAnimator(mArrow).scaleX(1).scaleY(1);
arrowScale.setStartDelay(arrowScaleDelay);
arrowScale.setDuration(arrowScaleDuration);
@@ -337,7 +333,6 @@
mIsAboveIcon = y > dragLayer.getTop() + insets.top;
if (!mIsAboveIcon) {
y = mTempRect.top + icon.getPaddingTop() + iconHeight;
- icon.setTextVisibility(false);
}
// Insets are added later, so subtract them now.
@@ -383,7 +378,6 @@
private void deferDrag(BubbleTextView originalIcon) {
mDeferredDragIcon = originalIcon;
- showDragView(originalIcon);
mLauncher.getDragController().addDragListener(this);
}
@@ -391,103 +385,39 @@
return mDeferredDragIcon;
}
- private void showDragView(BubbleTextView originalIcon) {
- // TODO: implement support for Drawable DragViews so we don't have to create a bitmap here.
- Bitmap b = LauncherIcons.createIconBitmap(originalIcon.getIcon(), mLauncher);
- float scale = mLauncher.getDragLayer().getLocationInDragLayer(originalIcon, mTempXY);
- int dragLayerX = Math.round(mTempXY[0] - (b.getWidth() - scale * originalIcon.getWidth()) / 2);
- int dragLayerY = Math.round(mTempXY[1] - (b.getHeight() - scale * b.getHeight()) / 2
- - Workspace.DRAG_BITMAP_PADDING / 2) + originalIcon.getPaddingTop();
- int motionDownX = mLauncher.getDragController().getMotionDown().x;
- int motionDownY = mLauncher.getDragController().getMotionDown().y;
- final int registrationX = motionDownX - dragLayerX;
- final int registrationY = motionDownY - dragLayerY;
-
- float scaleDps = getResources().getDimensionPixelSize(R.dimen.deep_shortcuts_drag_view_scale);
- mDragView = new DragView(mLauncher, b, registrationX, registrationY, 1f, scaleDps);
- mLastX = mLastY = mDistanceDragged = 0;
- mDragView.show(motionDownX, motionDownY);
- }
-
- public boolean onForwardedEvent(MotionEvent ev, int activePointerId, int[] touchDown) {
- mActivePointerId = activePointerId;
- mTouchDown = touchDown;
- return dispatchTouchEvent(ev);
- }
-
- @Override
- public boolean onTouchEvent(MotionEvent ev) {
- if (mDeferredDragIcon == null) {
- return false;
- }
-
- final int activePointerIndex = ev.findPointerIndex(mActivePointerId);
- if (activePointerIndex < 0) {
- return false;
- }
- final float x = ev.getX(activePointerIndex);
- final float y = ev.getY(activePointerIndex);
-
-
- int action = ev.getAction();
- // The event was in this container's coordinate system before this,
- // but will be in DragLayer's coordinate system from now on.
- Utilities.translateEventCoordinates(this, mLauncher.getDragLayer(), ev);
- final int dragLayerX = (int) ev.getX();
- final int dragLayerY = (int) ev.getY();
- if (action == MotionEvent.ACTION_MOVE) {
- if (mLastX != 0 || mLastY != 0) {
- mDistanceDragged += Math.hypot(mLastX - x, mLastY - y);
- }
- mLastX = x;
- mLastY = y;
-
- if (shouldStartDeferredDrag((int) x, (int) y)) {
- mSrcIconDragStarted = true;
- cleanupDeferredDrag(true);
- mDeferredDragIcon.getParent().requestDisallowInterceptTouchEvent(false);
- mDeferredDragIcon.getOnLongClickListener().onLongClick(mDeferredDragIcon);
- mLauncher.getDragController().onTouchEvent(ev);
- return true;
- } else if (mDistanceDragged > mDragDeadzone) {
- // After dragging further than a small deadzone,
- // have the drag view follow the user's finger.
- mDragView.setVisibility(VISIBLE);
- mDragView.move(dragLayerX, dragLayerY);
- mDeferredDragIcon.setVisibility(INVISIBLE);
- }
- } else if (action == MotionEvent.ACTION_UP) {
- cleanupDeferredDrag(true);
- mLauncher.getUserEventDispatcher().logDeepShortcutsOpen(mDeferredDragIcon);
- } else if (action == MotionEvent.ACTION_CANCEL) {
- // Do not change the source icon visibility if we are already dragging the source icon.
- cleanupDeferredDrag(!mSrcIconDragStarted);
- }
- return true;
- }
-
/**
- * Determines whether the deferred drag should be started based on touch coordinates
- * relative to the original icon and the shortcuts container.
+ * Determines when the deferred drag should be started.
*
* Current behavior:
* - Start the drag if the touch passes a certain distance from the original touch down.
- *
- * @param x the x touch coordinate relative to this container
- * @param y the y touch coordinate relative to this container
*/
- private boolean shouldStartDeferredDrag(int x, int y) {
- double distFromTouchDown = Math.hypot(x - mTouchDown[0], y - mTouchDown[1]);
- return distFromTouchDown > mStartDragThreshold;
- }
+ public DragOptions.DeferDragCondition createDeferDragCondition(final Runnable onDragStart) {
+ return new DragOptions.DeferDragCondition() {
+ @Override
+ public boolean shouldStartDeferredDrag(double distanceDragged) {
+ return distanceDragged > mStartDragThreshold;
+ }
- private void cleanupDeferredDrag(boolean updateSrcVisibility) {
- if (mDragView != null) {
- mDragView.remove();
- }
- if (updateSrcVisibility) {
- mDeferredDragIcon.setVisibility(VISIBLE);
- }
+ @Override
+ public void onDeferredDragStart() {
+ mDeferredDragIcon.setVisibility(INVISIBLE);
+ }
+
+ @Override
+ public void onDropBeforeDeferredDrag() {
+ mLauncher.getUserEventDispatcher().logDeepShortcutsOpen(mDeferredDragIcon);
+ if (!mIsAboveIcon) {
+ mDeferredDragIcon.setTextVisibility(false);
+ }
+ }
+
+ @Override
+ public void onDragStart() {
+ if (onDragStart != null) {
+ onDragStart.run();
+ }
+ }
+ };
}
@Override
@@ -571,9 +501,7 @@
@Override
public void onDragEnd() {
- if (mIsOpen) {
- animateClose();
- } else {
+ if (!mIsOpen) {
if (mOpenCloseAnimator != null) {
// Close animation is running.
mDeferContainerRemoval = false;
@@ -584,6 +512,7 @@
}
}
}
+ mDeferredDragIcon.setVisibility(VISIBLE);
}
@Override
@@ -612,12 +541,13 @@
}
final long duration = getResources().getInteger(
R.integer.config_deepShortcutCloseDuration);
+ final long arrowScaleDuration = getResources().getInteger(
+ R.integer.config_deepShortcutArrowOpenDuration);
final long stagger = getResources().getInteger(
R.integer.config_deepShortcutCloseStagger);
+ final TimeInterpolator fadeInterpolator = new LogAccelerateInterpolator(100, 0);
- long arrowDelay = (numOpenShortcuts - 1) * stagger + (duration * 4 / 6);
int firstOpenShortcutIndex = mIsAboveIcon ? shortcutCount - numOpenShortcuts : 0;
- int shortcutWithArrowIndex = mIsAboveIcon ? (numOpenShortcuts - 1) : 0;
for (int i = firstOpenShortcutIndex; i < firstOpenShortcutIndex + numOpenShortcuts; i++) {
final DeepShortcutView view = getShortcutAt(i);
Animator anim;
@@ -626,6 +556,13 @@
int animationIndex = mIsAboveIcon ? i - firstOpenShortcutIndex
: numOpenShortcuts - i - 1;
anim.setStartDelay(stagger * animationIndex);
+
+ Animator fadeAnim = new LauncherViewPropertyAnimator(view).alpha(0);
+ // Don't start fading until the arrow is gone.
+ fadeAnim.setStartDelay(stagger * animationIndex + arrowScaleDuration);
+ fadeAnim.setDuration(duration - arrowScaleDuration);
+ fadeAnim.setInterpolator(fadeInterpolator);
+ shortcutAnims.play(fadeAnim);
} else {
// The view is being dragged. Animate it such that it collapses with the drag view
anim = view.collapseToIcon();
@@ -644,10 +581,6 @@
.translationY(mIconShift.y);
anim2.setDuration(DragView.VIEW_ZOOM_DURATION);
shortcutAnims.play(anim2);
-
- if (i == shortcutWithArrowIndex) {
- arrowDelay = 0;
- }
}
anim.addListener(new AnimatorListenerAdapter() {
@Override
@@ -658,8 +591,8 @@
shortcutAnims.play(anim);
}
Animator arrowAnim = new LauncherViewPropertyAnimator(mArrow)
- .scaleX(0).scaleY(0).setDuration(duration / 6);
- arrowAnim.setStartDelay(arrowDelay);
+ .scaleX(0).scaleY(0).setDuration(arrowScaleDuration);
+ arrowAnim.setStartDelay(0);
shortcutAnims.play(arrowAnim);
shortcutAnims.addListener(new AnimatorListenerAdapter() {
@@ -691,8 +624,6 @@
}
mIsOpen = false;
mDeferContainerRemoval = false;
- // Make the original icon visible in All Apps, but not in Workspace or Folders.
- cleanupDeferredDrag(mDeferredDragIcon.getTag() instanceof AppInfo);
boolean isInHotseat = ((ItemInfo) mDeferredDragIcon.getTag()).container
== LauncherSettings.Favorites.CONTAINER_HOTSEAT;
mDeferredDragIcon.setTextVisibility(!isInHotseat);
@@ -724,8 +655,6 @@
container.setVisibility(View.INVISIBLE);
launcher.getDragLayer().addView(container);
container.populateAndShow(icon, ids);
- icon.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS,
- HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING);
return container;
}
return null;
diff --git a/src/com/android/launcher3/shortcuts/ShortcutsContainerListener.java b/src/com/android/launcher3/shortcuts/ShortcutsContainerListener.java
deleted file mode 100644
index 31f0969..0000000
--- a/src/com/android/launcher3/shortcuts/ShortcutsContainerListener.java
+++ /dev/null
@@ -1,252 +0,0 @@
-package com.android.launcher3.shortcuts;
-
-import android.os.SystemClock;
-import android.view.MotionEvent;
-import android.view.View;
-import android.view.ViewConfiguration;
-
-import com.android.launcher3.BubbleTextView;
-import com.android.launcher3.CheckLongPressHelper;
-import com.android.launcher3.Launcher;
-import com.android.launcher3.Utilities;
-import com.android.launcher3.dragndrop.DragLayer;
-
-/**
- * A {@link android.view.View.OnTouchListener} that creates a {@link DeepShortcutsContainer} and
- * forwards touch events to it. This listener should be put on any icon that supports shortcuts.
- */
-public class ShortcutsContainerListener implements View.OnTouchListener,
- View.OnAttachStateChangeListener {
-
- /** Scaled touch slop, used for detecting movement outside bounds. */
- private final float mScaledTouchSlop;
-
- /** Timeout before accepting a long-press to start forwarding. */
- private final int mLongPressTimeout;
-
- /** Source view from which events are forwarded. */
- private final BubbleTextView mSrcIcon;
-
- /** Runnable used to trigger forwarding on long-press. */
- private Runnable mTriggerLongPress;
-
- /** Whether this listener is currently forwarding touch events. */
- private boolean mForwarding;
-
- /** The id of the first pointer down in the current event stream. */
- private int mActivePointerId;
-
- private Launcher mLauncher;
- private DragLayer mDragLayer;
- /** The coordinates of the touch down, relative to the shortcuts container. */
- private final int[] mTouchDown;
- private boolean mHasMappedTouchDownToContainerCoord;
-
- /** If true, the gesture is not handled. The value is reset when next gesture starts. */
- private boolean mIgnoreCurrentGesture;
- private DeepShortcutsContainer mShortcutsContainer;
-
- public ShortcutsContainerListener(BubbleTextView icon) {
- mSrcIcon = icon;
- mScaledTouchSlop = ViewConfiguration.get(icon.getContext()).getScaledTouchSlop();
-
- mLongPressTimeout = CheckLongPressHelper.DEFAULT_LONG_PRESS_TIMEOUT;
-
- icon.addOnAttachStateChangeListener(this);
-
- mLauncher = Launcher.getLauncher(mSrcIcon.getContext());
- mDragLayer = mLauncher.getDragLayer();
- mTouchDown = new int[2];
- }
-
- @Override
- public boolean onTouch(View v, MotionEvent event) {
- if (event.getAction() == MotionEvent.ACTION_DOWN) {
- // There are no shortcuts associated with this item,
- // so return to normal touch handling.
- mIgnoreCurrentGesture = !mSrcIcon.hasDeepShortcuts();
-
- mTouchDown[0] = (int) event.getX();
- mTouchDown[1] = (int) event.getY();
- mDragLayer.getDescendantCoordRelativeToSelf(mSrcIcon, mTouchDown);
- mHasMappedTouchDownToContainerCoord = false;
- }
-
- if (mIgnoreCurrentGesture) {
- return false;
- }
-
- final boolean wasForwarding = mForwarding;
- final boolean forwarding;
- if (wasForwarding) {
- forwarding = onTouchForwarded(event) || !onForwardingStopped();
- } else {
- forwarding = onTouchObserved(event) && onForwardingStarted();
-
- if (forwarding) {
- // Make sure we cancel any ongoing source event stream.
- final long now = SystemClock.uptimeMillis();
- final MotionEvent e = MotionEvent.obtain(now, now, MotionEvent.ACTION_CANCEL,
- 0.0f, 0.0f, 0);
- mSrcIcon.onTouchEvent(e);
- e.recycle();
- }
- }
-
- mForwarding = forwarding;
- return forwarding || wasForwarding;
- }
-
- @Override
- public void onViewAttachedToWindow(View v) {
- }
-
- @Override
- public void onViewDetachedFromWindow(View v) {
- mForwarding = false;
- mActivePointerId = MotionEvent.INVALID_POINTER_ID;
- }
-
- /**
- * Called when forwarding would like to start.
- * <p>
- * This is when we populate the shortcuts container and add it to the DragLayer.
- *
- * @return true to start forwarding, false otherwise
- */
- protected boolean onForwardingStarted() {
- mShortcutsContainer = DeepShortcutsContainer.showForIcon(mSrcIcon);
- return mShortcutsContainer != null;
- }
-
- /**
- * Called when forwarding would like to stop.
- *
- * @return true to stop forwarding, false otherwise
- */
- protected boolean onForwardingStopped() {
- mShortcutsContainer = null;
- return true;
- }
-
- /**
- * Observes motion events and determines when to start forwarding.
- *
- * @param srcEvent motion event in source view coordinates
- * @return true to start forwarding motion events, false otherwise
- */
- private boolean onTouchObserved(MotionEvent srcEvent) {
- final View src = mSrcIcon;
- if (!src.isEnabled()) {
- return false;
- }
-
- final int actionMasked = srcEvent.getActionMasked();
- switch (actionMasked) {
- case MotionEvent.ACTION_DOWN:
- mActivePointerId = srcEvent.getPointerId(0);
-
- if (mTriggerLongPress == null) {
- mTriggerLongPress = new TriggerLongPress();
- }
- src.postDelayed(mTriggerLongPress, mLongPressTimeout);
- break;
- case MotionEvent.ACTION_MOVE:
- final int activePointerIndex = srcEvent.findPointerIndex(mActivePointerId);
- if (activePointerIndex >= 0) {
- final float x = srcEvent.getX(activePointerIndex);
- final float y = srcEvent.getY(activePointerIndex);
-
- // Has the pointer moved outside of the view?
- if (!Utilities.pointInView(src, x, y, mScaledTouchSlop)) {
- clearCallbacks();
-
- return false;
- }
- }
- break;
- case MotionEvent.ACTION_CANCEL:
- case MotionEvent.ACTION_UP:
- clearCallbacks();
- break;
- }
-
- return false;
- }
-
- private void clearCallbacks() {
- if (mTriggerLongPress != null) {
- mSrcIcon.removeCallbacks(mTriggerLongPress);
- }
- }
-
- private void onLongPress() {
- clearCallbacks();
-
- final BubbleTextView src = mSrcIcon;
- if (!src.isEnabled() || !src.hasDeepShortcuts()) {
- // Ignore long-press if the view is disabled or doesn't have shortcuts.
- return;
- }
-
- if (!onForwardingStarted()) {
- return;
- }
-
- // Don't let the parent intercept our events.
- src.getParent().requestDisallowInterceptTouchEvent(true);
-
- // Make sure we cancel any ongoing source event stream.
- final long now = SystemClock.uptimeMillis();
- final MotionEvent e = MotionEvent.obtain(now, now, MotionEvent.ACTION_CANCEL, 0, 0, 0);
- src.onTouchEvent(e);
- e.recycle();
-
- mForwarding = true;
- }
-
- /**
- * Handles forwarded motion events and determines when to stop
- * forwarding.
- *
- * @param srcEvent motion event in source view coordinates
- * @return true to continue forwarding motion events, false to cancel
- */
- private boolean onTouchForwarded(MotionEvent srcEvent) {
- final View src = mSrcIcon;
- final DeepShortcutsContainer dst = mShortcutsContainer;
- if (dst == null) {
- return false;
- }
- // Always cancel forwarding when the touch stream ends.
- final int action = srcEvent.getActionMasked();
- final boolean keepForwarding = action != MotionEvent.ACTION_UP
- && action != MotionEvent.ACTION_CANCEL;
- if (!dst.isLaidOut()) {
- return keepForwarding;
- }
-
- // Convert event to destination-local coordinates.
- final MotionEvent dstEvent = MotionEvent.obtainNoHistory(srcEvent);
- Utilities.translateEventCoordinates(src, dst, dstEvent);
-
- // Convert touch down event to destination-local coordinates.
- if (!mHasMappedTouchDownToContainerCoord) {
- mDragLayer.mapCoordInSelfToDescendent(dst, mTouchDown);
- mHasMappedTouchDownToContainerCoord = true;
- }
-
- // Forward converted event to destination view, then recycle it.
- final boolean handled = dst.onForwardedEvent(dstEvent, mActivePointerId, mTouchDown);
- dstEvent.recycle();
-
- return handled && keepForwarding;
- }
-
- private class TriggerLongPress implements Runnable {
- @Override
- public void run() {
- onLongPress();
- }
- }
-}
diff --git a/src/com/android/launcher3/util/NoLocaleSqliteContext.java b/src/com/android/launcher3/util/NoLocaleSqliteContext.java
index 3b258e4..c8a5ffb 100644
--- a/src/com/android/launcher3/util/NoLocaleSqliteContext.java
+++ b/src/com/android/launcher3/util/NoLocaleSqliteContext.java
@@ -11,9 +11,6 @@
*/
public class NoLocaleSqliteContext extends ContextWrapper {
- // TODO: Use the flag defined in Context when the new SDK is available
- private static final int MODE_NO_LOCALIZED_COLLATORS = 0x0010;
-
public NoLocaleSqliteContext(Context context) {
super(context);
}
@@ -22,6 +19,6 @@
public SQLiteDatabase openOrCreateDatabase(
String name, int mode, CursorFactory factory, DatabaseErrorHandler errorHandler) {
return super.openOrCreateDatabase(
- name, mode | MODE_NO_LOCALIZED_COLLATORS, factory, errorHandler);
+ name, mode | Context.MODE_NO_LOCALIZED_COLLATORS, factory, errorHandler);
}
}
diff --git a/src/com/android/launcher3/util/TouchController.java b/src/com/android/launcher3/util/TouchController.java
index d1409c8..3cca215 100644
--- a/src/com/android/launcher3/util/TouchController.java
+++ b/src/com/android/launcher3/util/TouchController.java
@@ -1,8 +1,32 @@
+/*
+ * 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.
+ */
+
package com.android.launcher3.util;
import android.view.MotionEvent;
public interface TouchController {
- boolean onTouchEvent(MotionEvent ev);
- boolean onInterceptTouchEvent(MotionEvent ev);
+
+ /**
+ * Called when the draglayer receives touch event.
+ */
+ boolean onControllerTouchEvent(MotionEvent ev);
+
+ /**
+ * Called when the draglayer receives a intercept touch event.
+ */
+ boolean onControllerInterceptTouchEvent(MotionEvent ev);
}
diff --git a/src/com/android/launcher3/widget/WidgetsContainerView.java b/src/com/android/launcher3/widget/WidgetsContainerView.java
index 6530c0e..8b72258 100644
--- a/src/com/android/launcher3/widget/WidgetsContainerView.java
+++ b/src/com/android/launcher3/widget/WidgetsContainerView.java
@@ -21,7 +21,6 @@
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.support.v7.widget.LinearLayoutManager;
-import android.support.v7.widget.RecyclerView.State;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
@@ -50,7 +49,6 @@
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.launcher3.userevent.nano.LauncherLogProto.Target;
import com.android.launcher3.util.Thunk;
-import com.android.launcher3.util.TransformingTouchDelegate;
/**
* The widgets list view container.
@@ -65,12 +63,9 @@
private DragController mDragController;
private IconCache mIconCache;
- private final Rect mTmpBgPaddingRect = new Rect();
-
/* Recycler view related member variables */
private WidgetsRecyclerView mRecyclerView;
private WidgetsListAdapter mAdapter;
- private TransformingTouchDelegate mRecyclerViewTouchDelegate;
/* Touch handling related member variables. */
private Toast mWidgetInstructionToast;
@@ -98,14 +93,8 @@
}
@Override
- protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
- super.onLayout(changed, left, top, right, bottom);
- getRevealView().getBackground().getPadding(mTmpBgPaddingRect);
- mRecyclerViewTouchDelegate.setBounds(
- mRecyclerView.getLeft() - mTmpBgPaddingRect.left,
- mRecyclerView.getTop() - mTmpBgPaddingRect.top,
- mRecyclerView.getRight() + mTmpBgPaddingRect.right,
- mRecyclerView.getBottom() + mTmpBgPaddingRect.bottom);
+ public View getTouchDelegateTargetView() {
+ return mRecyclerView;
}
@Override
@@ -114,13 +103,6 @@
mRecyclerView = (WidgetsRecyclerView) getContentView().findViewById(R.id.widgets_list_view);
mRecyclerView.setAdapter(mAdapter);
mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
- mRecyclerViewTouchDelegate = new TransformingTouchDelegate(mRecyclerView);
- }
-
- @Override
- protected void onAttachedToWindow() {
- super.onAttachedToWindow();
- ((View) mRecyclerView.getParent()).setTouchDelegate(mRecyclerViewTouchDelegate);
}
//