Merge "Fixing folder order persistence (issue 6176721)" into jb-dev
diff --git a/res/drawable-hdpi/hotseat_bg_panel.9.png b/res/drawable-hdpi/hotseat_bg_panel.9.png
deleted file mode 100644
index 6724b7a..0000000
--- a/res/drawable-hdpi/hotseat_bg_panel.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/search_bg_panel.9.png b/res/drawable-hdpi/search_bg_panel.9.png
deleted file mode 100644
index f2a63f9..0000000
--- a/res/drawable-hdpi/search_bg_panel.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/workspace_bg.9.png b/res/drawable-hdpi/workspace_bg.9.png
new file mode 100644
index 0000000..eeed8e7
--- /dev/null
+++ b/res/drawable-hdpi/workspace_bg.9.png
Binary files differ
diff --git a/res/drawable-land-hdpi/hotseat_bg_panel.9.png b/res/drawable-land-hdpi/hotseat_bg_panel.9.png
deleted file mode 100644
index 90177f8..0000000
--- a/res/drawable-land-hdpi/hotseat_bg_panel.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-land-hdpi/search_bg_panel.9.png b/res/drawable-land-hdpi/search_bg_panel.9.png
deleted file mode 100644
index 78f80c9..0000000
--- a/res/drawable-land-hdpi/search_bg_panel.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-land-hdpi/workspace_bg.9.png b/res/drawable-land-hdpi/workspace_bg.9.png
new file mode 100644
index 0000000..069bb1f
--- /dev/null
+++ b/res/drawable-land-hdpi/workspace_bg.9.png
Binary files differ
diff --git a/res/drawable-land-mdpi/hotseat_bg_panel.9.png b/res/drawable-land-mdpi/hotseat_bg_panel.9.png
deleted file mode 100644
index 83c4a55..0000000
--- a/res/drawable-land-mdpi/hotseat_bg_panel.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-land-mdpi/search_bg_panel.9.png b/res/drawable-land-mdpi/search_bg_panel.9.png
deleted file mode 100644
index 94bcf68..0000000
--- a/res/drawable-land-mdpi/search_bg_panel.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-land-mdpi/workspace_bg.9.png b/res/drawable-land-mdpi/workspace_bg.9.png
new file mode 100644
index 0000000..611bd5b
--- /dev/null
+++ b/res/drawable-land-mdpi/workspace_bg.9.png
Binary files differ
diff --git a/res/drawable-land-xhdpi/hotseat_bg_panel.9.png b/res/drawable-land-xhdpi/hotseat_bg_panel.9.png
deleted file mode 100644
index 8718040..0000000
--- a/res/drawable-land-xhdpi/hotseat_bg_panel.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-land-xhdpi/search_bg_panel.9.png b/res/drawable-land-xhdpi/search_bg_panel.9.png
deleted file mode 100644
index be3a3e8..0000000
--- a/res/drawable-land-xhdpi/search_bg_panel.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-land-xhdpi/workspace_bg.9.png b/res/drawable-land-xhdpi/workspace_bg.9.png
new file mode 100644
index 0000000..a1f60c6
--- /dev/null
+++ b/res/drawable-land-xhdpi/workspace_bg.9.png
Binary files differ
diff --git a/res/drawable-mdpi/hotseat_bg_panel.9.png b/res/drawable-mdpi/hotseat_bg_panel.9.png
deleted file mode 100644
index 75609d8..0000000
--- a/res/drawable-mdpi/hotseat_bg_panel.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/search_bg_panel.9.png b/res/drawable-mdpi/search_bg_panel.9.png
deleted file mode 100644
index 615e9a0..0000000
--- a/res/drawable-mdpi/search_bg_panel.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/workspace_bg.9.png b/res/drawable-mdpi/workspace_bg.9.png
new file mode 100644
index 0000000..a30d992
--- /dev/null
+++ b/res/drawable-mdpi/workspace_bg.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/hotseat_bg_panel.9.png b/res/drawable-xhdpi/hotseat_bg_panel.9.png
deleted file mode 100644
index 748a302..0000000
--- a/res/drawable-xhdpi/hotseat_bg_panel.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/search_bg_panel.9.png b/res/drawable-xhdpi/search_bg_panel.9.png
deleted file mode 100644
index f080337..0000000
--- a/res/drawable-xhdpi/search_bg_panel.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/workspace_bg.9.png b/res/drawable-xhdpi/workspace_bg.9.png
new file mode 100644
index 0000000..ceac4f2
--- /dev/null
+++ b/res/drawable-xhdpi/workspace_bg.9.png
Binary files differ
diff --git a/res/layout-land/hotseat.xml b/res/layout-land/hotseat.xml
index 6802ea0..d759196 100644
--- a/res/layout-land/hotseat.xml
+++ b/res/layout-land/hotseat.xml
@@ -16,7 +16,6 @@
<com.android.launcher2.Hotseat
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
- android:background="@drawable/hotseat_bg_panel"
launcher:cellCountX="1"
launcher:cellCountY="@integer/hotseat_cell_count">
<com.android.launcher2.CellLayout
diff --git a/res/layout-land/launcher.xml b/res/layout-land/launcher.xml
index 35f1a08..99d4181 100644
--- a/res/layout-land/launcher.xml
+++ b/res/layout-land/launcher.xml
@@ -19,6 +19,7 @@
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
android:id="@+id/drag_layer"
+ android:background="@drawable/workspace_bg"
android:layout_width="match_parent"
android:layout_height="match_parent">
diff --git a/res/layout-port/hotseat.xml b/res/layout-port/hotseat.xml
index b937043..376173a 100644
--- a/res/layout-port/hotseat.xml
+++ b/res/layout-port/hotseat.xml
@@ -16,7 +16,6 @@
<com.android.launcher2.Hotseat
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
- android:background="@drawable/hotseat_bg_panel"
launcher:cellCountX="@integer/hotseat_cell_count"
launcher:cellCountY="1">
<com.android.launcher2.CellLayout
diff --git a/res/layout-port/launcher.xml b/res/layout-port/launcher.xml
index 6030382..f60a204 100644
--- a/res/layout-port/launcher.xml
+++ b/res/layout-port/launcher.xml
@@ -19,6 +19,7 @@
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
android:id="@+id/drag_layer"
+ android:background="@drawable/workspace_bg"
android:layout_width="match_parent"
android:layout_height="match_parent">
@@ -79,6 +80,7 @@
android:layout_gravity="right"
android:clickable="true"
android:onClick="onClickVoiceButton"
+ android:importantForAccessibility="no"
launcher:sourceViewId="@+id/voice_button" />
<include layout="@layout/apps_customize_pane"
diff --git a/res/values-be/strings.xml b/res/values-be/strings.xml
index 8187f0f..77aeb42 100644
--- a/res/values-be/strings.xml
+++ b/res/values-be/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"Панэль запуску"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"На галоўную старонку"</string>
<string name="uid_name" msgid="3371120195364560632">"Асноўныя прыкладанні для Android"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Выбраць шпалеры"</string>
diff --git a/res/values-bg/strings.xml b/res/values-bg/strings.xml
index e38d62c..93c8a06 100644
--- a/res/values-bg/strings.xml
+++ b/res/values-bg/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"Стартов панел"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"Начало"</string>
<string name="uid_name" msgid="3371120195364560632">"Основни приложения на Android"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Избор на тапет от"</string>
diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml
index 22d5c63..aae1085 100644
--- a/res/values-ca/strings.xml
+++ b/res/values-ca/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"Barra d\'execució ràpida"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"Pàgina d\'inici"</string>
<string name="uid_name" msgid="3371120195364560632">"Aplicacions principals d\'Android"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Selecciona fons de pantalla de"</string>
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index f1bace6..3461b54 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"Launcher"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"Domovská stránka"</string>
<string name="uid_name" msgid="3371120195364560632">"Android Core Apps"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Vybrat tapetu z"</string>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 5dc3460..196e6e6 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"Übersicht"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"Startbildschirm"</string>
<string name="uid_name" msgid="3371120195364560632">"Android Core Apps"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Hintergrund auswählen von"</string>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index fa1ea16..7129662 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"Launcher"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"Casa"</string>
<string name="uid_name" msgid="3371120195364560632">"Aplicaciones del núcleo de Android"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Elegir un fondo de pantalla de"</string>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 7950a60..ddaab8d 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"Launcher"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"Casa"</string>
<string name="uid_name" msgid="3371120195364560632">"Aplicaciones básicas de Android"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Seleccionar fondo de pantalla de"</string>
diff --git a/res/values-et/strings.xml b/res/values-et/strings.xml
index 7f41e14..9cfa7a7 100644
--- a/res/values-et/strings.xml
+++ b/res/values-et/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"Käivitaja"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"Kodu"</string>
<string name="uid_name" msgid="3371120195364560632">"Androidi tuumrakendused"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Taustapildi valimiskoht:"</string>
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index d381660..2015c54 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"راه انداز"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"صفحه اصلی"</string>
<string name="uid_name" msgid="3371120195364560632">"برنامه های Android Core"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"انتخاب تصویر زمینه از"</string>
diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml
index 2d64230..6a6bae7 100644
--- a/res/values-fi/strings.xml
+++ b/res/values-fi/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"Käynnistysohjelma"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"Aloitusruutu"</string>
<string name="uid_name" msgid="3371120195364560632">"Android Core -sovellukset"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Valitse taustakuva"</string>
diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml
index 77f4b86..71ca811 100644
--- a/res/values-hi/strings.xml
+++ b/res/values-hi/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"लॉन्चर"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"मुखपृष्ठ"</string>
<string name="uid_name" msgid="3371120195364560632">"Android मुख्य एप्लिकेशन"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"वॉलपेपर यहां से चुनें:"</string>
diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml
index 8ff377a..4c8ef1c 100644
--- a/res/values-hr/strings.xml
+++ b/res/values-hr/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"Pokretač"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"Početna"</string>
<string name="uid_name" msgid="3371120195364560632">"Matične aplikacije za Android"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Odabir pozadinske slike iz"</string>
diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml
index a085dbe..63d9539 100644
--- a/res/values-hu/strings.xml
+++ b/res/values-hu/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"Indító"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"Főoldal"</string>
<string name="uid_name" msgid="3371120195364560632">"Alap Android-alkalmazások"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Válasszon tapétát innen:"</string>
diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml
index de042ba..ff351d4 100644
--- a/res/values-in/strings.xml
+++ b/res/values-in/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"Peluncur"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"Beranda"</string>
<string name="uid_name" msgid="3371120195364560632">"Android Core Apps"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Pilih wallpaper dari"</string>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index e8f7a10..0fc144d 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"ランチャー"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"Home"</string>
<string name="uid_name" msgid="3371120195364560632">"Android Core Apps"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"壁紙の選択"</string>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index 06e3fa7..9c6360a 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"Launcher"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"홈"</string>
<string name="uid_name" msgid="3371120195364560632">"Android Core 애플리케이션"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"배경화면 선택"</string>
diff --git a/res/values-lt/strings.xml b/res/values-lt/strings.xml
index 778eece..33a0a03 100644
--- a/res/values-lt/strings.xml
+++ b/res/values-lt/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"Paleidimo priemonė"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"Pagrindinis"</string>
<string name="uid_name" msgid="3371120195364560632">"Pagrindinės „Android“ programos"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Pasirinkti darbalaukio foną iš"</string>
diff --git a/res/values-lv/strings.xml b/res/values-lv/strings.xml
index ece00fa..9e2031a 100644
--- a/res/values-lv/strings.xml
+++ b/res/values-lv/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"Palaidējs"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"Sākums"</string>
<string name="uid_name" msgid="3371120195364560632">"Android kodola lietojumprogrammas"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Fona tapetes izvēle:"</string>
diff --git a/res/values-ms/strings.xml b/res/values-ms/strings.xml
index a66c882..162138b 100644
--- a/res/values-ms/strings.xml
+++ b/res/values-ms/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"Pelancar"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"Laman Utama"</string>
<string name="uid_name" msgid="3371120195364560632">"Apl Teras Android"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Pilih kertas dinding dari"</string>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index 038fefe..64cadd4 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"Utskytingsrampe"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"Home"</string>
<string name="uid_name" msgid="3371120195364560632">"Android-kjerneapplikasjoner"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Velg bakgrunnsbilde fra"</string>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index 83beefb..5b2897d 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"Program uruchamiający"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"Strona główna"</string>
<string name="uid_name" msgid="3371120195364560632">"Aplikacje główne systemu Android"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Wybierz tapetę z"</string>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index c3c5a28..792ff13 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"Launcher"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"Página Inicial"</string>
<string name="uid_name" msgid="3371120195364560632">"Aplicações Principais do Android"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Escolher imagem de fundo de"</string>
diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml
index 0449308..b98198e 100644
--- a/res/values-ro/strings.xml
+++ b/res/values-ro/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"Lansator"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"Ecran de pornire"</string>
<string name="uid_name" msgid="3371120195364560632">"Android Core Apps"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Alegeţi imaginea de fundal din"</string>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index 8b53be0..f62ff66 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"Launcher"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"Главный экран"</string>
<string name="uid_name" msgid="3371120195364560632">"Основные приложения"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Установка обоев"</string>
diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml
index cacff8f..52f1128 100644
--- a/res/values-sk/strings.xml
+++ b/res/values-sk/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"Spúšťač"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"Plocha"</string>
<string name="uid_name" msgid="3371120195364560632">"Android Core Apps"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Vybrať tapetu z"</string>
diff --git a/res/values-sl/strings.xml b/res/values-sl/strings.xml
index dfe4a0c..da7069c 100644
--- a/res/values-sl/strings.xml
+++ b/res/values-sl/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"Zaganjalnik"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"Začetna stran"</string>
<string name="uid_name" msgid="3371120195364560632">"Android Core Apps"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Izberite sliko za ozadje"</string>
diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml
index a8a2131..783ca57 100644
--- a/res/values-sr/strings.xml
+++ b/res/values-sr/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"Покретач"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"Кућни"</string>
<string name="uid_name" msgid="3371120195364560632">"Основне Android апликације"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Избор позадине из"</string>
diff --git a/res/values-th/strings.xml b/res/values-th/strings.xml
index 3d0a49c..d3796e8 100644
--- a/res/values-th/strings.xml
+++ b/res/values-th/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"ตัวเรียกใช้งาน"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"หน้าแรก"</string>
<string name="uid_name" msgid="3371120195364560632">"แอปหลัก Android"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"เลือกวอลเปเปอร์จาก"</string>
diff --git a/res/values-tl/strings.xml b/res/values-tl/strings.xml
index 99cd481..a26eea2 100644
--- a/res/values-tl/strings.xml
+++ b/res/values-tl/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"Launcher"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"Home"</string>
<string name="uid_name" msgid="3371120195364560632">"Android Core Apps"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Pumili ng wallpaper mula sa"</string>
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index 7767660..18036d4 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"Launcher"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"Ana Ekran"</string>
<string name="uid_name" msgid="3371120195364560632">"Android Core Apps"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Duvar kağıdı seçin:"</string>
@@ -42,7 +41,7 @@
<string name="group_shortcuts" msgid="9133529424900391877">"Kısayollar"</string>
<string name="group_widgets" msgid="6704978494073105844">"Widget\'lar"</string>
<string name="group_wallpapers" msgid="1568191644272224858">"Duvar Kağıtları"</string>
- <string name="completely_out_of_space" msgid="1759078539443491182">"Ana ekranlarınızda başka yer kalmadı."</string>
+ <string name="completely_out_of_space" msgid="1759078539443491182">"Ana ekranlarınızda yer kalmadı."</string>
<string name="out_of_space" msgid="8365249326091984698">"Bu Ana Sayfada yer yok."</string>
<string name="hotseat_out_of_space" msgid="6304886797358479361">"Favori kısayollarda yer yok"</string>
<string name="invalid_hotseat_item" msgid="6545340627805449250">"Bu widget, hotseat için çok büyük."</string>
diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml
index dd2818f..0e633ed 100644
--- a/res/values-uk/strings.xml
+++ b/res/values-uk/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"Пан. запуску"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"Домашня сторінка"</string>
<string name="uid_name" msgid="3371120195364560632">"Служби Android Core"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Вибрати фоновий малюнок з"</string>
diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml
index dc6d7f1..8963c9c 100644
--- a/res/values-vi/strings.xml
+++ b/res/values-vi/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"Trình khởi chạy"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"Trang chủ"</string>
<string name="uid_name" msgid="3371120195364560632">"Ứng dụng Lõi Android"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Chọn hình nền từ"</string>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 5043c22..00e60cd 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"启动器"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"主屏幕"</string>
<string name="uid_name" msgid="3371120195364560632">"Android 核心应用"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"选择壁纸来源"</string>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index fbb5db7..d6b2a8a 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"啟動器"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"住家"</string>
<string name="uid_name" msgid="3371120195364560632">"Android 核心應用程式"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"選擇桌布來源"</string>
diff --git a/res/values-zu/strings.xml b/res/values-zu/strings.xml
index 37a5cfe..c06b93b 100644
--- a/res/values-zu/strings.xml
+++ b/res/values-zu/strings.xml
@@ -20,8 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="application_name" msgid="8424725141379931883">"Isiqalisi"</string>
- <!-- no translation found for home (5921706419368316758) -->
- <skip />
+ <string name="home" msgid="5921706419368316758">"Ikhaya"</string>
<string name="uid_name" msgid="3371120195364560632">"I-Android Core Apps"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Khetha iphephalodonga kwi"</string>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index d9fbba2..1416d40 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -213,10 +213,13 @@
<!-- Accessibility -->
<skip />
+ <!-- The format string for Workspace descriptions [CHAR_LIMIT=none] -->
+ <string name="workspace_description_format">Home screen %1$d</string>
+
<!-- The format string for default page scroll text [CHAR_LIMIT=none] -->
<string name="default_scroll_format">Page %1$d of %2$d</string>
<!-- The format string for Workspace page scroll text [CHAR_LIMIT=none] -->
- <string name="workspace_scroll_format">Workspace %1$d of %2$d</string>
+ <string name="workspace_scroll_format">Home screen %1$d of %2$d</string>
<!-- The format string for AppsCustomize Apps page scroll text [CHAR_LIMIT=none] -->
<string name="apps_customize_apps_scroll_format">Apps page %1$d of %2$d</string>
<!-- The format string for AppsCustomize Apps page scroll text [CHAR_LIMIT=none] -->
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 6506f95..65b0f31 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -116,7 +116,6 @@
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">@dimen/qsb_bar_height</item>
<item name="android:layout_gravity">top|center_horizontal</item>
- <item name="android:background">@drawable/search_bg_panel</item>
<item name="android:paddingLeft">@dimen/qsb_padding_left</item>
<item name="android:paddingRight">@dimen/qsb_padding_right</item>
</style>
diff --git a/src/com/android/launcher2/ApplicationInfo.java b/src/com/android/launcher2/ApplicationInfo.java
index 1fc1d1f..281d59c 100644
--- a/src/com/android/launcher2/ApplicationInfo.java
+++ b/src/com/android/launcher2/ApplicationInfo.java
@@ -102,6 +102,12 @@
firstInstallTime = info.firstInstallTime;
}
+ /** Returns the package name that the shortcut's intent will resolve to, or an empty string if
+ * none exists. */
+ String getPackageName() {
+ return super.getPackageName(intent);
+ }
+
/**
* Creates the application intent based on a component name and various launch flags.
* Sets {@link #itemType} to {@link LauncherSettings.BaseLauncherColumns#ITEM_TYPE_APPLICATION}.
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java
index fe9334b..5bd0ac6 100644
--- a/src/com/android/launcher2/AppsCustomizePagedView.java
+++ b/src/com/android/launcher2/AppsCustomizePagedView.java
@@ -524,10 +524,6 @@
mPressedIcon.lockDrawableState();
}
- // NOTE: we need to re-enable the wallpaper visibility if we want correct transitions
- // between items that are launched from the workspace and all apps. It will be disabled
- // correctly the next time the window is visible in AppsCustomizeTabHost.
- mLauncher.updateWallpaperVisibility(true);
mLauncher.startActivitySafely(v, appInfo.intent, appInfo);
} else if (v instanceof PagedViewWidget) {
diff --git a/src/com/android/launcher2/AppsCustomizeTabHost.java b/src/com/android/launcher2/AppsCustomizeTabHost.java
index 7a2c247..d3afc3b 100644
--- a/src/com/android/launcher2/AppsCustomizeTabHost.java
+++ b/src/com/android/launcher2/AppsCustomizeTabHost.java
@@ -471,17 +471,6 @@
// Load the current page synchronously, and the neighboring pages asynchronously
mAppsCustomizePane.loadAssociatedPages(mAppsCustomizePane.getCurrentPage(), true);
mAppsCustomizePane.loadAssociatedPages(mAppsCustomizePane.getCurrentPage());
-
- // We had to enable the wallpaper visibility when launching apps from all apps (so that
- // the transitions would be the same as when launching from workspace) so we need to
- // re-disable the wallpaper visibility to ensure performance.
- int duration = getResources().getInteger(android.R.integer.config_shortAnimTime);
- postDelayed(new Runnable() {
- @Override
- public void run() {
- mLauncher.updateWallpaperVisibility(false);
- }
- }, duration);
}
}
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java
index 6f4759d..ba20a76 100644
--- a/src/com/android/launcher2/CellLayout.java
+++ b/src/com/android/launcher2/CellLayout.java
@@ -160,6 +160,9 @@
private static final int INVALID_DIRECTION = -100;
private DropTarget.DragEnforcer mDragEnforcer;
+ private final static PorterDuffXfermode sAddBlendMode =
+ new PorterDuffXfermode(PorterDuff.Mode.ADD);
+
public CellLayout(Context context) {
this(context, null);
}
@@ -506,7 +509,7 @@
if (mForegroundAlpha > 0) {
mOverScrollForegroundDrawable.setBounds(mForegroundRect);
Paint p = ((NinePatchDrawable) mOverScrollForegroundDrawable).getPaint();
- p.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.ADD));
+ p.setXfermode(sAddBlendMode);
mOverScrollForegroundDrawable.draw(canvas);
p.setXfermode(null);
}
diff --git a/src/com/android/launcher2/DragController.java b/src/com/android/launcher2/DragController.java
index b9d7dd4..b4b20c6 100644
--- a/src/com/android/launcher2/DragController.java
+++ b/src/com/android/launcher2/DragController.java
@@ -381,8 +381,8 @@
if (dragInfo != null &&
dragInfo.intent != null &&
info.intent != null) {
- boolean isSamePackage = dragInfo.intent.getPackage().equals(
- info.intent.getPackage());
+ boolean isSamePackage = dragInfo.getPackageName().equals(
+ info.getPackageName());
if (isSamePackage) {
cancelDrag();
return;
diff --git a/src/com/android/launcher2/Folder.java b/src/com/android/launcher2/Folder.java
index 8632370..36913ca 100644
--- a/src/com/android/launcher2/Folder.java
+++ b/src/com/android/launcher2/Folder.java
@@ -203,6 +203,9 @@
}
public boolean onLongClick(View v) {
+ // Return if global dragging is not enabled
+ if (!mLauncher.isDraggingEnabled()) return true;
+
Object tag = v.getTag();
if (tag instanceof ShortcutInfo) {
ShortcutInfo item = (ShortcutInfo) tag;
diff --git a/src/com/android/launcher2/InstallShortcutReceiver.java b/src/com/android/launcher2/InstallShortcutReceiver.java
index 66b3f5f..6d91602 100644
--- a/src/com/android/launcher2/InstallShortcutReceiver.java
+++ b/src/com/android/launcher2/InstallShortcutReceiver.java
@@ -28,6 +28,7 @@
import java.util.ArrayList;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.Set;
public class InstallShortcutReceiver extends BroadcastReceiver {
@@ -47,16 +48,33 @@
public static final String SHORTCUT_MIMETYPE =
"com.android.launcher/shortcut";
- private final int[] mCoordinates = new int[2];
+ // The set of shortcuts that are pending install
+ private static ArrayList<PendingInstallShortcutInfo> mInstallQueue =
+ new ArrayList<PendingInstallShortcutInfo>();
+
+ // Determines whether to defer installing shortcuts immediately until
+ // processAllPendingInstalls() is called.
+ private static boolean mUseInstallQueue = false;
+
+ private static class PendingInstallShortcutInfo {
+ Intent data;
+ Intent launchIntent;
+ String name;
+
+ public PendingInstallShortcutInfo(Intent rawData, String shortcutName,
+ Intent shortcutIntent) {
+ data = rawData;
+ name = shortcutName;
+ launchIntent = shortcutIntent;
+ }
+ }
public void onReceive(Context context, Intent data) {
if (!ACTION_INSTALL_SHORTCUT.equals(data.getAction())) {
return;
}
- String spKey = LauncherApplication.getSharedPreferencesKey();
- SharedPreferences sp = context.getSharedPreferences(spKey, Context.MODE_PRIVATE);
- final Intent intent = data.getParcelableExtra(Intent.EXTRA_SHORTCUT_INTENT);
+ Intent intent = data.getParcelableExtra(Intent.EXTRA_SHORTCUT_INTENT);
if (intent == null) {
return;
}
@@ -73,6 +91,36 @@
}
}
+ PendingInstallShortcutInfo info = new PendingInstallShortcutInfo(data, name, intent);
+ if (mUseInstallQueue) {
+ mInstallQueue.add(info);
+ } else {
+ processInstallShortcut(context, info);
+ }
+ }
+
+ static void enableInstallQueue() {
+ mUseInstallQueue = true;
+ }
+
+ static void disableAndFlushInstallQueue(Context context) {
+ mUseInstallQueue = false;
+ Iterator<PendingInstallShortcutInfo> iter = mInstallQueue.iterator();
+ while (iter.hasNext()) {
+ processInstallShortcut(context, iter.next());
+ iter.remove();
+ }
+ }
+
+ private static void processInstallShortcut(Context context,
+ PendingInstallShortcutInfo pendingInfo) {
+ String spKey = LauncherApplication.getSharedPreferencesKey();
+ SharedPreferences sp = context.getSharedPreferences(spKey, Context.MODE_PRIVATE);
+
+ final Intent data = pendingInfo.data;
+ final Intent intent = pendingInfo.launchIntent;
+ final String name = pendingInfo.name;
+
// Lock on the app so that we don't try and get the items while apps are being added
LauncherApplication app = (LauncherApplication) context.getApplicationContext();
final int[] result = {INSTALL_SHORTCUT_SUCCESSFUL};
@@ -106,10 +154,11 @@
}
}
- private boolean installShortcut(Context context, Intent data, ArrayList<ItemInfo> items,
+ private static boolean installShortcut(Context context, Intent data, ArrayList<ItemInfo> items,
String name, Intent intent, final int screen, boolean shortcutExists,
final SharedPreferences sharedPrefs, int[] result) {
- if (findEmptyCell(context, items, mCoordinates, screen)) {
+ int[] tmpCoordinates = new int[2];
+ if (findEmptyCell(context, items, tmpCoordinates, screen)) {
if (intent != null) {
if (intent.getAction() == null) {
intent.setAction(Intent.ACTION_VIEW);
@@ -145,7 +194,7 @@
LauncherApplication app = (LauncherApplication) context.getApplicationContext();
ShortcutInfo info = app.getModel().addShortcut(context, data,
LauncherSettings.Favorites.CONTAINER_DESKTOP, screen,
- mCoordinates[0], mCoordinates[1], true);
+ tmpCoordinates[0], tmpCoordinates[1], true);
if (info == null) {
return false;
}
diff --git a/src/com/android/launcher2/ItemInfo.java b/src/com/android/launcher2/ItemInfo.java
index 11a6c0d..dedc0f4 100644
--- a/src/com/android/launcher2/ItemInfo.java
+++ b/src/com/android/launcher2/ItemInfo.java
@@ -16,13 +16,14 @@
package com.android.launcher2;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-
import android.content.ContentValues;
+import android.content.Intent;
import android.graphics.Bitmap;
import android.util.Log;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
/**
* Represents an item in the launcher.
*/
@@ -109,6 +110,21 @@
container = info.container;
}
+ /** Returns the package name that the intent will resolve to, or an empty string if
+ * none exists. */
+ static String getPackageName(Intent intent) {
+ if (intent != null) {
+ String packageName = intent.getPackage();
+ if (packageName == null && intent.getComponent() != null) {
+ packageName = intent.getComponent().getPackageName();
+ }
+ if (packageName != null) {
+ return packageName;
+ }
+ }
+ return "";
+ }
+
/**
* Write the fields of this item to the DB
*
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index e5baf62..d0f4b86 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -33,8 +33,6 @@
import android.appwidget.AppWidgetProviderInfo;
import android.content.ActivityNotFoundException;
import android.content.BroadcastReceiver;
-import android.content.ClipData;
-import android.content.ClipDescription;
import android.content.ComponentCallbacks2;
import android.content.ComponentName;
import android.content.ContentResolver;
@@ -144,6 +142,10 @@
private static final String PREFERENCES = "launcher.preferences";
static final String FORCE_ENABLE_ROTATION_PROPERTY = "launcher.force_enable_rotation";
+ // The Intent extra that defines whether to ignore the launch animation
+ static final String INTENT_EXTRA_IGNORE_LAUNCH_ANIMATION =
+ "com.android.launcher.intent.extra.shortcut.INGORE_LAUNCH_ANIMATION";
+
// Type: int
private static final String RUNTIME_STATE_CURRENT_SCREEN = "launcher.current_screen";
// Type: int
@@ -494,6 +496,12 @@
return mDragLayer;
}
+ boolean isDraggingEnabled() {
+ // We prevent dragging when we are loading the workspace as it is possible to pick up a view
+ // that is subsequently removed from the workspace in startBinding().
+ return !mModel.isLoadingWorkspace();
+ }
+
static int getScreen() {
synchronized (sLock) {
return sScreen;
@@ -663,6 +671,11 @@
@Override
protected void onPause() {
+ // NOTE: We want all transitions from launcher to act as if the wallpaper were enabled
+ // to be consistent. So re-enable the flag here, and we will re-disable it as necessary
+ // when Launcher resumes and we are still in AllApps.
+ updateWallpaperVisibility(true);
+
super.onPause();
mPaused = true;
mDragController.cancelDrag();
@@ -1180,6 +1193,23 @@
// currently shown, because doing that may involve
// some communication back with the app.
mWorkspace.postDelayed(mBuildLayersRunnable, 500);
+
+ // We had to enable the wallpaper visibility when launching apps from all
+ // apps (so that the transitions would be the same as when launching from
+ // workspace) so take this time to see if we need to re-disable the
+ // wallpaper visibility to ensure performance.
+ mWorkspace.post(new Runnable() {
+ @Override
+ public void run() {
+ if (mState == State.APPS_CUSTOMIZE) {
+ if (mAppsCustomizeTabHost != null &&
+ !mAppsCustomizeTabHost.isTransitioning()) {
+ updateWallpaperVisibility(false);
+ }
+ }
+ }
+ });
+
observer.removeOnPreDrawListener(this);
return true;
}
@@ -1890,7 +1920,11 @@
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
try {
- if (v != null) {
+ // Only launch using the new animation if the shortcut has not opted out (this is a
+ // private contract between launcher and may be ignored in the future).
+ boolean useLaunchAnimation = (v != null) &&
+ !intent.hasExtra(INTENT_EXTRA_IGNORE_LAUNCH_ANIMATION);
+ if (useLaunchAnimation) {
ActivityOptions opts = ActivityOptions.makeScaleUpAnimation(v, 0, 0,
v.getMeasuredWidth(), v.getMeasuredHeight());
@@ -2054,14 +2088,9 @@
}
public boolean onLongClick(View v) {
-
- if (mState != State.WORKSPACE) {
- return false;
- }
-
- if (isWorkspaceLocked()) {
- return false;
- }
+ if (!isDraggingEnabled()) return false;
+ if (isWorkspaceLocked()) return false;
+ if (mState != State.WORKSPACE) return false;
if (!(v instanceof CellLayout)) {
v = (View) v.getParent().getParent();
@@ -2808,7 +2837,9 @@
if (voiceButtonContainer != null) voiceButtonContainer.setVisibility(View.GONE);
searchButton.setVisibility(View.GONE);
voiceButton.setVisibility(View.GONE);
- voiceButtonProxy.setVisibility(View.GONE);
+ if (voiceButtonProxy != null) {
+ voiceButtonProxy.setVisibility(View.GONE);
+ }
return false;
}
}
@@ -3097,6 +3128,9 @@
workspace.requestLayout();
+ AppWidgetResizeFrame.updateWidgetSizeRanges(item.hostView,
+ this, item.spanX, item.spanY);
+
if (DEBUG_WIDGETS) {
Log.d(TAG, "bound widget id="+item.appWidgetId+" in "
+ (SystemClock.uptimeMillis()-start) + "ms");
diff --git a/src/com/android/launcher2/LauncherModel.java b/src/com/android/launcher2/LauncherModel.java
index b76df39..bc88a98 100644
--- a/src/com/android/launcher2/LauncherModel.java
+++ b/src/com/android/launcher2/LauncherModel.java
@@ -745,6 +745,15 @@
return mAllAppsLoaded;
}
+ boolean isLoadingWorkspace() {
+ synchronized (mLock) {
+ if (mLoaderTask != null) {
+ return mLoaderTask.isLoadingWorkspace();
+ }
+ }
+ return false;
+ }
+
/**
* Runnable for the thread that loads the contents of the launcher:
* - workspace icons
@@ -755,6 +764,7 @@
private Context mContext;
private Thread mWaitThread;
private boolean mIsLaunching;
+ private boolean mIsLoadingAndBindingWorkspace;
private boolean mStopped;
private boolean mLoadAndBindStepFinished;
private HashMap<Object, CharSequence> mLabelCache;
@@ -769,7 +779,13 @@
return mIsLaunching;
}
+ boolean isLoadingWorkspace() {
+ return mIsLoadingAndBindingWorkspace;
+ }
+
private void loadAndBindWorkspace() {
+ mIsLoadingAndBindingWorkspace = true;
+
// Load the workspace
if (DEBUG_LOADERS) {
Log.d(TAG, "loadAndBindWorkspace mWorkspaceLoaded=" + mWorkspaceLoaded);
@@ -1374,13 +1390,16 @@
}
}
});
- // If we're profiling, this is the last thing in the queue.
+ // Cleanup
mHandler.post(new Runnable() {
public void run() {
+ // If we're profiling, ensure this is the last thing in the queue.
if (DEBUG_LOADERS) {
Log.d(TAG, "bound workspace in "
+ (SystemClock.uptimeMillis()-t) + "ms");
}
+
+ mIsLoadingAndBindingWorkspace = false;
}
});
}
@@ -1675,6 +1694,24 @@
}
/**
+ * Returns all the Workspace ShortcutInfos associated with a particular package.
+ * @param intent
+ * @return
+ */
+ ArrayList<ShortcutInfo> getShortcutInfosForPackage(String packageName) {
+ ArrayList<ShortcutInfo> infos = new ArrayList<ShortcutInfo>();
+ for (ItemInfo i : sWorkspaceItems) {
+ if (i instanceof ShortcutInfo) {
+ ShortcutInfo info = (ShortcutInfo) i;
+ if (packageName.equals(info.getPackageName())) {
+ infos.add(info);
+ }
+ }
+ }
+ return infos;
+ }
+
+ /**
* This is called from the code that adds shortcuts from the intent receiver. This
* doesn't have a Cursor, but
*/
diff --git a/src/com/android/launcher2/LauncherProvider.java b/src/com/android/launcher2/LauncherProvider.java
index 5e572a5..4cf87d2 100644
--- a/src/com/android/launcher2/LauncherProvider.java
+++ b/src/com/android/launcher2/LauncherProvider.java
@@ -66,7 +66,7 @@
private static final String DATABASE_NAME = "launcher.db";
- private static final int DATABASE_VERSION = 10;
+ private static final int DATABASE_VERSION = 11;
static final String AUTHORITY = "com.android.launcher2.settings";
@@ -477,12 +477,14 @@
version = 9;
}
- if (version < 10) {
+ // We bumped the version twice during JB, once to update the launch flags, and once to
+ // update the override for the default launch animation.
+ if (version < 11) {
// Contact shortcuts need a different set of flags to be launched now
// The updateContactsShortcuts change is idempotent, so we can keep using it like
// back in the Donut days
updateContactsShortcuts(db);
- version = 10;
+ version = 11;
}
if (version != DATABASE_VERSION) {
@@ -535,7 +537,8 @@
// detail activities.
newIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
Intent.FLAG_ACTIVITY_CLEAR_TASK);
-
+ newIntent.putExtra(
+ Launcher.INTENT_EXTRA_IGNORE_LAUNCH_ANIMATION, true);
newIntent.setData(uri);
final ContentValues values = new ContentValues();
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java
index adfe0de..a3080a8 100644
--- a/src/com/android/launcher2/PagedView.java
+++ b/src/com/android/launcher2/PagedView.java
@@ -627,7 +627,9 @@
if (isScrollingIndicatorEnabled()) {
updateScrollingIndicator();
}
- if (mFadeInAdjacentScreens) {
+ boolean isInOverscroll = mOverScrollX < 0 || mOverScrollX > mMaxScrollX;
+
+ if (mFadeInAdjacentScreens && !isInOverscroll) {
for (int i = 0; i < getChildCount(); i++) {
View child = getChildAt(i);
if (child != null) {
@@ -837,15 +839,15 @@
@Override
public void addFocusables(ArrayList<View> views, int direction, int focusableMode) {
if (mCurrentPage >= 0 && mCurrentPage < getPageCount()) {
- getPageAt(mCurrentPage).addFocusables(views, direction);
+ getPageAt(mCurrentPage).addFocusables(views, direction, focusableMode);
}
if (direction == View.FOCUS_LEFT) {
if (mCurrentPage > 0) {
- getPageAt(mCurrentPage - 1).addFocusables(views, direction);
+ getPageAt(mCurrentPage - 1).addFocusables(views, direction, focusableMode);
}
} else if (direction == View.FOCUS_RIGHT){
if (mCurrentPage < getPageCount() - 1) {
- getPageAt(mCurrentPage + 1).addFocusables(views, direction);
+ getPageAt(mCurrentPage + 1).addFocusables(views, direction, focusableMode);
}
}
}
diff --git a/src/com/android/launcher2/PagedViewWithDraggableItems.java b/src/com/android/launcher2/PagedViewWithDraggableItems.java
index a047970..22fd82b 100644
--- a/src/com/android/launcher2/PagedViewWithDraggableItems.java
+++ b/src/com/android/launcher2/PagedViewWithDraggableItems.java
@@ -107,6 +107,8 @@
// When we have exited all apps or are in transition, disregard long clicks
if (!mLauncher.isAllAppsCustomizeOpen() ||
mLauncher.getWorkspace().isSwitchingState()) return false;
+ // Return if global dragging is not enabled
+ if (!mLauncher.isDraggingEnabled()) return false;
return beginDragging(v);
}
diff --git a/src/com/android/launcher2/ShortcutInfo.java b/src/com/android/launcher2/ShortcutInfo.java
index 76892db..533059f 100644
--- a/src/com/android/launcher2/ShortcutInfo.java
+++ b/src/com/android/launcher2/ShortcutInfo.java
@@ -98,6 +98,12 @@
return mIcon;
}
+ /** Returns the package name that the shortcut's intent will resolve to, or an empty string if
+ * none exists. */
+ String getPackageName() {
+ return super.getPackageName(intent);
+ }
+
public void updateIcon(IconCache iconCache) {
mIcon = iconCache.getIcon(intent);
usingFallbackIcon = iconCache.isDefaultIcon(mIcon);
diff --git a/src/com/android/launcher2/UninstallShortcutReceiver.java b/src/com/android/launcher2/UninstallShortcutReceiver.java
index 3f6de7c..84b1ad5 100644
--- a/src/com/android/launcher2/UninstallShortcutReceiver.java
+++ b/src/com/android/launcher2/UninstallShortcutReceiver.java
@@ -17,38 +17,83 @@
package com.android.launcher2;
import android.content.BroadcastReceiver;
+import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
-import android.content.ContentResolver;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.net.Uri;
import android.widget.Toast;
-import java.net.URISyntaxException;
-import java.util.HashSet;
-import java.util.Set;
-
import com.android.launcher.R;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
public class UninstallShortcutReceiver extends BroadcastReceiver {
private static final String ACTION_UNINSTALL_SHORTCUT =
"com.android.launcher.action.UNINSTALL_SHORTCUT";
+ // The set of shortcuts that are pending uninstall
+ private static ArrayList<PendingUninstallShortcutInfo> mUninstallQueue =
+ new ArrayList<PendingUninstallShortcutInfo>();
+
+ // Determines whether to defer uninstalling shortcuts immediately until
+ // disableAndFlushUninstallQueue() is called.
+ private static boolean mUseUninstallQueue = false;
+
+ private static class PendingUninstallShortcutInfo {
+ Intent data;
+
+ public PendingUninstallShortcutInfo(Intent rawData) {
+ data = rawData;
+ }
+ }
+
public void onReceive(Context context, Intent data) {
if (!ACTION_UNINSTALL_SHORTCUT.equals(data.getAction())) {
return;
}
+
+ PendingUninstallShortcutInfo info = new PendingUninstallShortcutInfo(data);
+ if (mUseUninstallQueue) {
+ mUninstallQueue.add(info);
+ } else {
+ processUninstallShortcut(context, info);
+ }
+ }
+
+ static void enableUninstallQueue() {
+ mUseUninstallQueue = true;
+ }
+
+ static void disableAndFlushUninstallQueue(Context context) {
+ mUseUninstallQueue = false;
+ Iterator<PendingUninstallShortcutInfo> iter = mUninstallQueue.iterator();
+ while (iter.hasNext()) {
+ processUninstallShortcut(context, iter.next());
+ iter.remove();
+ }
+ }
+
+ private static void processUninstallShortcut(Context context,
+ PendingUninstallShortcutInfo pendingInfo) {
String spKey = LauncherApplication.getSharedPreferencesKey();
SharedPreferences sharedPrefs = context.getSharedPreferences(spKey, Context.MODE_PRIVATE);
+ final Intent data = pendingInfo.data;
+
LauncherApplication app = (LauncherApplication) context.getApplicationContext();
synchronized (app) {
removeShortcut(context, data, sharedPrefs);
}
}
- private void removeShortcut(Context context, Intent data, final SharedPreferences sharedPrefs) {
+ private static void removeShortcut(Context context, Intent data,
+ final SharedPreferences sharedPrefs) {
Intent intent = data.getParcelableExtra(Intent.EXTRA_SHORTCUT_INTENT);
String name = data.getStringExtra(Intent.EXTRA_SHORTCUT_NAME);
boolean duplicate = data.getBooleanExtra(Launcher.EXTRA_SHORTCUT_DUPLICATE, true);
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index ec18fb3..f0d3395 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -29,6 +29,7 @@
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
+import android.content.SharedPreferences;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
@@ -38,8 +39,6 @@
import android.graphics.Paint;
import android.graphics.Point;
import android.graphics.PointF;
-import android.graphics.PorterDuff;
-import android.graphics.PorterDuffColorFilter;
import android.graphics.Rect;
import android.graphics.Region.Op;
import android.graphics.drawable.Drawable;
@@ -60,8 +59,11 @@
import com.android.launcher2.FolderIcon.FolderRingAnimator;
import com.android.launcher2.LauncherSettings.Favorites;
+import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
/**
* The workspace is a wide area with a wallpaper and a finite number of pages.
@@ -180,6 +182,7 @@
private float mOverscrollFade = 0;
private boolean mOverscrollTransformsSet;
public static final int DRAG_BITMAP_PADDING = 2;
+ private boolean mWorkspaceFadeInAdjacentScreens;
// Camera and Matrix used to determine the final position of a neighboring CellLayout
private final Matrix mMatrix = new Matrix();
@@ -245,7 +248,6 @@
private float[] mOldScaleXs;
private float[] mOldScaleYs;
private float[] mOldBackgroundAlphas;
- private float[] mOldBackgroundAlphaMultipliers;
private float[] mOldAlphas;
private float[] mOldRotationYs;
private float[] mNewTranslationXs;
@@ -253,7 +255,6 @@
private float[] mNewScaleXs;
private float[] mNewScaleYs;
private float[] mNewBackgroundAlphas;
- private float[] mNewBackgroundAlphaMultipliers;
private float[] mNewAlphas;
private float[] mNewRotationYs;
private float mTransitionProgress;
@@ -284,7 +285,8 @@
setDataIsReady();
final Resources res = getResources();
- mFadeInAdjacentScreens = res.getBoolean(R.bool.config_workspaceFadeAdjacentScreens);
+ mWorkspaceFadeInAdjacentScreens = res.getBoolean(R.bool.config_workspaceFadeAdjacentScreens);
+ mFadeInAdjacentScreens = false;
mWallpaperManager = WallpaperManager.getInstance(context);
int cellCountX = DEFAULT_CELL_COUNT_X;
@@ -381,12 +383,20 @@
mIsDragOccuring = true;
updateChildrenLayersEnabled();
mLauncher.lockScreenOrientation();
+
+ // Prevent any Un/InstallShortcutReceivers from updating the db while we are dragging
+ InstallShortcutReceiver.enableInstallQueue();
+ UninstallShortcutReceiver.enableUninstallQueue();
}
public void onDragEnd() {
mIsDragOccuring = false;
updateChildrenLayersEnabled();
mLauncher.unlockScreenOrientation(false);
+
+ // Re-enable any Un/InstallShortcutReceiver and now process any queued items
+ InstallShortcutReceiver.disableAndFlushInstallQueue(getContext());
+ UninstallShortcutReceiver.disableAndFlushUninstallQueue(getContext());
}
/**
@@ -432,6 +442,8 @@
cl.setOnInterceptTouchListener(this);
cl.setClickable(true);
cl.enableHardwareLayers();
+ cl.setContentDescription(getContext().getString(
+ R.string.workspace_description_format, getChildCount()));
}
@Override
@@ -711,7 +723,7 @@
// If we are not fading in adjacent screens, we still need to restore the alpha in case the
// user scrolls while we are transitioning (should not affect dispatchDraw optimizations)
- if (!mFadeInAdjacentScreens) {
+ if (!mWorkspaceFadeInAdjacentScreens) {
for (int i = 0; i < getChildCount(); ++i) {
((CellLayout) getPageAt(i)).setShortcutAndWidgetAlpha(1f);
}
@@ -1182,55 +1194,26 @@
return Math.min(r / threshold, 1.0f);
}
- private void screenScrolledLargeUI(int screenCenter) {
- if (isSwitchingState()) return;
- boolean isInOverscroll = false;
- for (int i = 0; i < getChildCount(); i++) {
- CellLayout cl = (CellLayout) getChildAt(i);
- if (cl != null) {
- float scrollProgress = getScrollProgress(screenCenter, cl, i);
- float rotation = WORKSPACE_ROTATION * scrollProgress;
- float translationX = getOffsetXForRotation(rotation, cl.getWidth(), cl.getHeight());
+ @Override
+ protected void screenScrolled(int screenCenter) {
+ super.screenScrolled(screenCenter);
- // If the current page (i) is being over scrolled, we use a different
- // set of rules for setting the background alpha multiplier.
- if (!isSmall()) {
- if ((mOverScrollX < 0 && i == 0) || (mOverScrollX > mMaxScrollX &&
- i == getChildCount() -1)) {
- isInOverscroll = true;
- rotation *= -1;
- cl.setBackgroundAlphaMultiplier(
- overScrollBackgroundAlphaInterpolator(Math.abs(scrollProgress)));
- mOverScrollPageIndex = i;
- cl.setOverScrollAmount(Math.abs(scrollProgress), i == 0);
- if (!mOverscrollTransformsSet) {
- mOverscrollTransformsSet = true;
- cl.setPivotX(cl.getMeasuredWidth() * (i == 0 ? 0.75f : 0.25f));
- cl.setPivotY(cl.getMeasuredHeight() * 0.5f);
- cl.setOverscrollTransformsDirty(true);
- }
- } else if (mOverScrollPageIndex != i) {
- cl.setBackgroundAlphaMultiplier(
- backgroundAlphaInterpolator(Math.abs(scrollProgress)));
- }
- }
- cl.setTranslationX(translationX);
- cl.setRotationY(rotation);
- if (mFadeInAdjacentScreens && !isSmall()) {
+ boolean isInOverscroll = mOverScrollX < 0 || mOverScrollX > mMaxScrollX;
+ if (mWorkspaceFadeInAdjacentScreens &&
+ mState == State.NORMAL &&
+ !mIsSwitchingState &&
+ !isInOverscroll) {
+ for (int i = 0; i < getChildCount(); i++) {
+ CellLayout child = (CellLayout) getChildAt(i);
+ if (child != null) {
+ float scrollProgress = getScrollProgress(screenCenter, child, i);
float alpha = 1 - Math.abs(scrollProgress);
- cl.setShortcutAndWidgetAlpha(alpha);
+ child.getShortcutsAndWidgets().setAlpha(alpha);
}
}
+ invalidate();
}
- if (mOverscrollTransformsSet && !isInOverscroll) {
- mOverscrollTransformsSet = false;
- ((CellLayout) getChildAt(0)).resetOverscrollTransforms();
- ((CellLayout) getChildAt(getChildCount() - 1)).resetOverscrollTransforms();
- }
- invalidate();
- }
- private void screenScrolledStandardUI(int screenCenter) {
if (mOverScrollX < 0 || mOverScrollX > mMaxScrollX) {
int index = mOverScrollX < 0 ? 0 : getChildCount() - 1;
CellLayout cl = (CellLayout) getChildAt(index);
@@ -1259,24 +1242,8 @@
}
@Override
- protected void screenScrolled(int screenCenter) {
- if (LauncherApplication.isScreenLarge()) {
- // We don't call super.screenScrolled() here because we handle the adjacent pages alpha
- // ourselves (for efficiency), and there are no scrolling indicators to update.
- screenScrolledLargeUI(screenCenter);
- } else {
- super.screenScrolled(screenCenter);
- screenScrolledStandardUI(screenCenter);
- }
- }
-
- @Override
protected void overScroll(float amount) {
- if (LauncherApplication.isScreenLarge()) {
- dampedOverScroll(amount);
- } else {
- acceleratedOverScroll(amount);
- }
+ acceleratedOverScroll(amount);
}
protected void onAttachedToWindow() {
@@ -1509,7 +1476,6 @@
mOldScaleXs = new float[childCount];
mOldScaleYs = new float[childCount];
mOldBackgroundAlphas = new float[childCount];
- mOldBackgroundAlphaMultipliers = new float[childCount];
mOldAlphas = new float[childCount];
mOldRotationYs = new float[childCount];
mNewTranslationXs = new float[childCount];
@@ -1517,7 +1483,6 @@
mNewScaleXs = new float[childCount];
mNewScaleYs = new float[childCount];
mNewBackgroundAlphas = new float[childCount];
- mNewBackgroundAlphaMultipliers = new float[childCount];
mNewAlphas = new float[childCount];
mNewRotationYs = new float[childCount];
}
@@ -1572,11 +1537,10 @@
getResources().getInteger(R.integer.config_appsCustomizeWorkspaceShrinkTime);
for (int i = 0; i < getChildCount(); i++) {
final CellLayout cl = (CellLayout) getChildAt(i);
- float rotation = 0f;
- float initialAlpha = cl.getAlpha();
- float finalAlphaMultiplierValue = 1f;
- float finalAlpha = (!mFadeInAdjacentScreens || stateIsSpringLoaded ||
+ float finalAlpha = (!mWorkspaceFadeInAdjacentScreens || stateIsSpringLoaded ||
(i == mCurrentPage)) ? 1f : 0f;
+ float currentAlpha = cl.getShortcutsAndWidgets().getAlpha();
+ float initialAlpha = currentAlpha;
// Determine the pages alpha during the state transition
if ((oldStateIsSmall && stateIsNormal) ||
@@ -1586,29 +1550,12 @@
// or, if we're in spring-loaded mode
if (i == mCurrentPage || !animated || oldStateIsSpringLoaded) {
finalAlpha = 1f;
- finalAlphaMultiplierValue = 0f;
} else {
initialAlpha = 0f;
finalAlpha = 0f;
}
}
- // Update the rotation of the screen (don't apply rotation on Phone UI)
- if (LauncherApplication.isScreenLarge()) {
- if (i < mCurrentPage) {
- rotation = WORKSPACE_ROTATION;
- } else if (i > mCurrentPage) {
- rotation = -WORKSPACE_ROTATION;
- }
- }
-
- // If the screen is not xlarge, then don't rotate the CellLayouts
- // NOTE: If we don't update the side pages alpha, then we should not hide the side
- // pages. see unshrink().
- if (LauncherApplication.isScreenLarge()) {
- translationX = getOffsetXForRotation(rotation, cl.getWidth(), cl.getHeight());
- }
-
mOldAlphas[i] = initialAlpha;
mNewAlphas[i] = finalAlpha;
if (animated) {
@@ -1617,25 +1564,19 @@
mOldScaleXs[i] = cl.getScaleX();
mOldScaleYs[i] = cl.getScaleY();
mOldBackgroundAlphas[i] = cl.getBackgroundAlpha();
- mOldBackgroundAlphaMultipliers[i] = cl.getBackgroundAlphaMultiplier();
- mOldRotationYs[i] = cl.getRotationY();
mNewTranslationXs[i] = translationX;
mNewTranslationYs[i] = translationY;
mNewScaleXs[i] = finalScaleFactor;
mNewScaleYs[i] = finalScaleFactor;
mNewBackgroundAlphas[i] = finalBackgroundAlpha;
- mNewBackgroundAlphaMultipliers[i] = finalAlphaMultiplierValue;
- mNewRotationYs[i] = rotation;
} else {
cl.setTranslationX(translationX);
cl.setTranslationY(translationY);
cl.setScaleX(finalScaleFactor);
cl.setScaleY(finalScaleFactor);
cl.setBackgroundAlpha(finalBackgroundAlpha);
- cl.setBackgroundAlphaMultiplier(finalAlphaMultiplierValue);
cl.setShortcutAndWidgetAlpha(finalAlpha);
- cl.setRotationY(rotation);
}
}
@@ -1643,13 +1584,13 @@
for (int index = 0; index < getChildCount(); index++) {
final int i = index;
final CellLayout cl = (CellLayout) getChildAt(i);
+ float currentAlpha = cl.getShortcutsAndWidgets().getAlpha();
if (mOldAlphas[i] == 0 && mNewAlphas[i] == 0) {
cl.setTranslationX(mNewTranslationXs[i]);
cl.setTranslationY(mNewTranslationYs[i]);
cl.setScaleX(mNewScaleXs[i]);
cl.setScaleY(mNewScaleYs[i]);
cl.setBackgroundAlpha(mNewBackgroundAlphas[i]);
- cl.setBackgroundAlphaMultiplier(mNewBackgroundAlphaMultipliers[i]);
cl.setShortcutAndWidgetAlpha(mNewAlphas[i]);
cl.setRotationY(mNewRotationYs[i]);
} else {
@@ -1662,7 +1603,7 @@
.setInterpolator(mZoomInInterpolator);
anim.play(a);
- if (mOldAlphas[i] != mNewAlphas[i]) {
+ if (mOldAlphas[i] != mNewAlphas[i] || currentAlpha != mNewAlphas[i]) {
LauncherViewPropertyAnimator alphaAnim =
new LauncherViewPropertyAnimator(cl.getShortcutsAndWidgets());
alphaAnim.alpha(mNewAlphas[i])
@@ -1670,20 +1611,8 @@
.setInterpolator(mZoomInInterpolator);
anim.play(alphaAnim);
}
- if (mOldRotationYs[i] != 0 || mNewRotationYs[i] != 0) {
- ValueAnimator rotate = ValueAnimator.ofFloat(0f, 1f).setDuration(duration);
- rotate.setInterpolator(new DecelerateInterpolator(2.0f));
- rotate.addUpdateListener(new LauncherAnimatorUpdateListener() {
- public void onAnimationUpdate(float a, float b) {
- cl.setRotationY(a * mOldRotationYs[i] + b * mNewRotationYs[i]);
- }
- });
- anim.play(rotate);
- }
if (mOldBackgroundAlphas[i] != 0 ||
- mNewBackgroundAlphas[i] != 0 ||
- mOldBackgroundAlphaMultipliers[i] != 0 ||
- mNewBackgroundAlphaMultipliers[i] != 0) {
+ mNewBackgroundAlphas[i] != 0) {
ValueAnimator bgAnim = ValueAnimator.ofFloat(0f, 1f).setDuration(duration);
bgAnim.setInterpolator(mZoomInInterpolator);
bgAnim.addUpdateListener(new LauncherAnimatorUpdateListener() {
@@ -1691,9 +1620,6 @@
cl.setBackgroundAlpha(
a * mOldBackgroundAlphas[i] +
b * mNewBackgroundAlphas[i]);
- cl.setBackgroundAlphaMultiplier(
- a * mOldBackgroundAlphaMultipliers[i] +
- b * mNewBackgroundAlphaMultipliers[i]);
}
});
anim.play(bgAnim);
@@ -1741,7 +1667,7 @@
// ensure that only the current page is visible during (and subsequently, after) the
// transition animation. If fade adjacent pages is disabled, then re-enable the page
// visibility after the transition animation.
- if (!mFadeInAdjacentScreens) {
+ if (!mWorkspaceFadeInAdjacentScreens) {
for (int i = 0; i < getChildCount(); i++) {
final CellLayout cl = (CellLayout) getChildAt(i);
cl.setShortcutAndWidgetAlpha(1f);
@@ -3614,11 +3540,9 @@
final ComponentName name = intent.getComponent();
if (name != null) {
- for (String packageName: packageNames) {
- if (packageName.equals(name.getPackageName())) {
- LauncherModel.deleteItemFromDatabase(mLauncher, info);
- childrenToRemove.add(view);
- }
+ if (packageNames.contains(name.getPackageName())) {
+ LauncherModel.deleteItemFromDatabase(mLauncher, info);
+ childrenToRemove.add(view);
}
}
} else if (tag instanceof FolderInfo) {
@@ -3634,10 +3558,8 @@
final ComponentName name = intent.getComponent();
if (name != null) {
- for (String packageName: packageNames) {
- if (packageName.equals(name.getPackageName())) {
- appsToRemoveFromFolder.add(appInfo);
- }
+ if (packageNames.contains(name.getPackageName())) {
+ appsToRemoveFromFolder.add(appInfo);
}
}
}
@@ -3649,11 +3571,9 @@
final LauncherAppWidgetInfo info = (LauncherAppWidgetInfo) tag;
final ComponentName provider = info.providerName;
if (provider != null) {
- for (String packageName: packageNames) {
- if (packageName.equals(provider.getPackageName())) {
- LauncherModel.deleteItemFromDatabase(mLauncher, info);
- childrenToRemove.add(view);
- }
+ if (packageNames.contains(provider.getPackageName())) {
+ LauncherModel.deleteItemFromDatabase(mLauncher, info);
+ childrenToRemove.add(view);
}
}
}
@@ -3677,6 +3597,43 @@
}
});
}
+
+ // It is no longer the case the BubbleTextViews correspond 1:1 with the workspace items in
+ // the database (and LauncherModel) since shortcuts are not added and animated in until
+ // the user returns to launcher. As a result, we really should be cleaning up the Db
+ // regardless of whether the item was added or not (unlike the logic above). This is only
+ // relevant for direct workspace items.
+ post(new Runnable() {
+ @Override
+ public void run() {
+ String spKey = LauncherApplication.getSharedPreferencesKey();
+ SharedPreferences sp = getContext().getSharedPreferences(spKey,
+ Context.MODE_PRIVATE);
+ Set<String> newApps = sp.getStringSet(InstallShortcutReceiver.NEW_APPS_LIST_KEY,
+ null);
+
+ for (String packageName: packageNames) {
+ // Remove all items that have the same package, but were not removed above
+ ArrayList<ShortcutInfo> infos =
+ mLauncher.getModel().getShortcutInfosForPackage(packageName);
+ for (ShortcutInfo info : infos) {
+ LauncherModel.deleteItemFromDatabase(mLauncher, info);
+ }
+ // Remove all queued items that match the same package
+ if (newApps != null) {
+ for (String intentStr : newApps) {
+ try {
+ Intent intent = Intent.parseUri(intentStr, 0);
+ String pn = ItemInfo.getPackageName(intent);
+ if (packageNames.contains(pn)) {
+ newApps.remove(intentStr);
+ }
+ } catch (URISyntaxException e) {}
+ }
+ }
+ }
+ }
+ });
}
void updateShortcuts(ArrayList<ApplicationInfo> apps) {