Merge "Fixing regression where the proper rotation check was not being done. (Bug 6422040)" into jb-dev
diff --git a/res/values-af/strings.xml b/res/values-af/strings.xml
index 4d8b381..7d18d99 100644
--- a/res/values-af/strings.xml
+++ b/res/values-af/strings.xml
@@ -20,6 +20,8 @@
<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">"Lanseerpoort"</string>
+ <!-- no translation found for home (5921706419368316758) -->
+ <skip />
<string name="uid_name" msgid="3371120195364560632">"Android Kernprogramme"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Kies muurpapier uit"</string>
diff --git a/res/values-am/strings.xml b/res/values-am/strings.xml
index 375ba31..ab828cf 100644
--- a/res/values-am/strings.xml
+++ b/res/values-am/strings.xml
@@ -20,6 +20,8 @@
<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="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-ar/strings.xml b/res/values-ar/strings.xml
index d86eeb8..bb0fc48 100644
--- a/res/values-ar/strings.xml
+++ b/res/values-ar/strings.xml
@@ -20,6 +20,8 @@
<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="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-be/strings.xml b/res/values-be/strings.xml
index d04ee34..8187f0f 100644
--- a/res/values-be/strings.xml
+++ b/res/values-be/strings.xml
@@ -20,6 +20,8 @@
<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="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 dc0814a..e38d62c 100644
--- a/res/values-bg/strings.xml
+++ b/res/values-bg/strings.xml
@@ -20,6 +20,8 @@
<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="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 a71b9f1..22d5c63 100644
--- a/res/values-ca/strings.xml
+++ b/res/values-ca/strings.xml
@@ -20,6 +20,8 @@
<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="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 fb61ec7..f1bace6 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -20,6 +20,8 @@
<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="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-da/strings.xml b/res/values-da/strings.xml
index 0014d40..c581102 100644
--- a/res/values-da/strings.xml
+++ b/res/values-da/strings.xml
@@ -20,6 +20,8 @@
<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="uid_name" msgid="3371120195364560632">"Android-kerneprogrammer"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Vælg baggrund fra"</string>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 92f1809..5dc3460 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -20,6 +20,8 @@
<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="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-el/strings.xml b/res/values-el/strings.xml
index 2d12ca9..cacc5ee 100644
--- a/res/values-el/strings.xml
+++ b/res/values-el/strings.xml
@@ -20,6 +20,8 @@
<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="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-en-rGB/strings.xml b/res/values-en-rGB/strings.xml
index 941fa8e..76246d9 100644
--- a/res/values-en-rGB/strings.xml
+++ b/res/values-en-rGB/strings.xml
@@ -20,6 +20,8 @@
<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="uid_name" msgid="3371120195364560632">"Android Core Apps"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Choose wallpaper from"</string>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index fecbc40..d831d50 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -20,6 +20,8 @@
<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="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 dda1d9e..7950a60 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -20,6 +20,8 @@
<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="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 93fd351..7f41e14 100644
--- a/res/values-et/strings.xml
+++ b/res/values-et/strings.xml
@@ -20,6 +20,8 @@
<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="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 ea42c45..d381660 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -20,6 +20,8 @@
<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="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 a069565..2d64230 100644
--- a/res/values-fi/strings.xml
+++ b/res/values-fi/strings.xml
@@ -20,6 +20,8 @@
<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="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-fr/strings.xml b/res/values-fr/strings.xml
index 515ae7f..0c36614 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -20,6 +20,8 @@
<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">"Lanceur d\'applications"</string>
+ <!-- no translation found for home (5921706419368316758) -->
+ <skip />
<string name="uid_name" msgid="3371120195364560632">"Applications de base Android"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Sélectionnez un fond d\'écran dans"</string>
diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml
index 200382c..77f4b86 100644
--- a/res/values-hi/strings.xml
+++ b/res/values-hi/strings.xml
@@ -20,6 +20,8 @@
<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="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 4da1f90..8ff377a 100644
--- a/res/values-hr/strings.xml
+++ b/res/values-hr/strings.xml
@@ -20,6 +20,8 @@
<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="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 7c5b878..a085dbe 100644
--- a/res/values-hu/strings.xml
+++ b/res/values-hu/strings.xml
@@ -20,6 +20,8 @@
<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="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 f85e480..de042ba 100644
--- a/res/values-in/strings.xml
+++ b/res/values-in/strings.xml
@@ -20,6 +20,8 @@
<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="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-it/strings.xml b/res/values-it/strings.xml
index 8381be2..84d8b75 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -20,6 +20,8 @@
<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">"Avvio applicazioni"</string>
+ <!-- no translation found for home (5921706419368316758) -->
+ <skip />
<string name="uid_name" msgid="3371120195364560632">"Android Core Apps"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Scegli sfondo da"</string>
diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml
index 4978ea5..9a8a410 100644
--- a/res/values-iw/strings.xml
+++ b/res/values-iw/strings.xml
@@ -20,6 +20,8 @@
<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="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-ja/strings.xml b/res/values-ja/strings.xml
index 9038cc2..e8f7a10 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -20,6 +20,8 @@
<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="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 8b6e563..06e3fa7 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -20,6 +20,8 @@
<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="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 73810a9..778eece 100644
--- a/res/values-lt/strings.xml
+++ b/res/values-lt/strings.xml
@@ -20,6 +20,8 @@
<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="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 8eaffc4..ece00fa 100644
--- a/res/values-lv/strings.xml
+++ b/res/values-lv/strings.xml
@@ -20,6 +20,8 @@
<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="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 2c13cf1..a66c882 100644
--- a/res/values-ms/strings.xml
+++ b/res/values-ms/strings.xml
@@ -20,6 +20,8 @@
<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="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>
@@ -40,8 +42,7 @@
<string name="group_shortcuts" msgid="9133529424900391877">"Pintasan"</string>
<string name="group_widgets" msgid="6704978494073105844">"Widget"</string>
<string name="group_wallpapers" msgid="1568191644272224858">"Kertas dinding"</string>
- <!-- no translation found for completely_out_of_space (1759078539443491182) -->
- <skip />
+ <string name="completely_out_of_space" msgid="1759078539443491182">"Tiada lagi ruang pada skrin Utama anda."</string>
<string name="out_of_space" msgid="8365249326091984698">"Tiada lagi ruang pada skrin Utama ini"</string>
<string name="hotseat_out_of_space" msgid="6304886797358479361">"Tiada lagi ruang pada kerusi panas."</string>
<string name="invalid_hotseat_item" msgid="6545340627805449250">"Widget ini terlalu besar untuk kerusi panas."</string>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index b795c05..038fefe 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -20,6 +20,8 @@
<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="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-nl/strings.xml b/res/values-nl/strings.xml
index 3758b55..eb87f98 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -20,6 +20,8 @@
<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="uid_name" msgid="3371120195364560632">"Android-kerntoepassingen"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Achtergrond kiezen van"</string>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index 7a15e41..83beefb 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -20,6 +20,8 @@
<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="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>
@@ -40,8 +42,7 @@
<string name="group_shortcuts" msgid="9133529424900391877">"Skróty"</string>
<string name="group_widgets" msgid="6704978494073105844">"Widżety"</string>
<string name="group_wallpapers" msgid="1568191644272224858">"Tapety"</string>
- <!-- no translation found for completely_out_of_space (1759078539443491182) -->
- <skip />
+ <string name="completely_out_of_space" msgid="1759078539443491182">"Brak miejsca na Twoich ekranach głównych."</string>
<string name="out_of_space" msgid="8365249326091984698">"Brak miejsca na tej stronie głównej"</string>
<string name="hotseat_out_of_space" msgid="6304886797358479361">"Brak miejsca w kieszonce."</string>
<string name="invalid_hotseat_item" msgid="6545340627805449250">"Ten widżet jest za duży, aby umieścić go w kieszonce."</string>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index 8f0a4f3..c3c5a28 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -20,6 +20,8 @@
<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="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-pt/strings.xml b/res/values-pt/strings.xml
index e5fff9c..7eb4f07 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -20,6 +20,8 @@
<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="uid_name" msgid="3371120195364560632">"Principais aplicativos do Android"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Selecionar plano de fundo de"</string>
diff --git a/res/values-rm/strings.xml b/res/values-rm/strings.xml
index be22d75..5056d07 100644
--- a/res/values-rm/strings.xml
+++ b/res/values-rm/strings.xml
@@ -20,6 +20,8 @@
<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">"Lantschader"</string>
+ <!-- no translation found for home (5921706419368316758) -->
+ <skip />
<string name="uid_name" msgid="3371120195364560632">"Applicaziuns da basa dad Android"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<!-- no translation found for chooser_wallpaper (6063168087625352235) -->
diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml
index 957310a..0449308 100644
--- a/res/values-ro/strings.xml
+++ b/res/values-ro/strings.xml
@@ -20,6 +20,8 @@
<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="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 f12d681..8b53be0 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -20,6 +20,8 @@
<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="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 55d2b6b..cacff8f 100644
--- a/res/values-sk/strings.xml
+++ b/res/values-sk/strings.xml
@@ -20,6 +20,8 @@
<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="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 d8df7f4..dfe4a0c 100644
--- a/res/values-sl/strings.xml
+++ b/res/values-sl/strings.xml
@@ -20,6 +20,8 @@
<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="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 9aa5aef..a8a2131 100644
--- a/res/values-sr/strings.xml
+++ b/res/values-sr/strings.xml
@@ -20,6 +20,8 @@
<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="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-sv/strings.xml b/res/values-sv/strings.xml
index 46bd262..f11cad7 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -20,6 +20,8 @@
<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">"Startbild"</string>
+ <!-- no translation found for home (5921706419368316758) -->
+ <skip />
<string name="uid_name" msgid="3371120195364560632">"Android Core Apps"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Välj bakgrund från"</string>
diff --git a/res/values-sw/strings.xml b/res/values-sw/strings.xml
index 83db081..6b10119 100644
--- a/res/values-sw/strings.xml
+++ b/res/values-sw/strings.xml
@@ -20,6 +20,8 @@
<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">"Kizinduzi"</string>
+ <!-- no translation found for home (5921706419368316758) -->
+ <skip />
<string name="uid_name" msgid="3371120195364560632">"Programu Kuu za Android"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"Chagua mandhari kutoka"</string>
diff --git a/res/values-th/strings.xml b/res/values-th/strings.xml
index ba6d0c6..3d0a49c 100644
--- a/res/values-th/strings.xml
+++ b/res/values-th/strings.xml
@@ -20,6 +20,8 @@
<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="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 9e79b89..99cd481 100644
--- a/res/values-tl/strings.xml
+++ b/res/values-tl/strings.xml
@@ -20,6 +20,8 @@
<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="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 81ba10a..7767660 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -20,6 +20,8 @@
<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="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>
diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml
index bf8f165..dd2818f 100644
--- a/res/values-uk/strings.xml
+++ b/res/values-uk/strings.xml
@@ -20,6 +20,8 @@
<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="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 345e4b2..dc6d7f1 100644
--- a/res/values-vi/strings.xml
+++ b/res/values-vi/strings.xml
@@ -20,6 +20,8 @@
<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="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 a79c704..5043c22 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -20,6 +20,8 @@
<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="uid_name" msgid="3371120195364560632">"Android 核心应用"</string>
<string name="folder_name" msgid="8551881338202938211"></string>
<string name="chooser_wallpaper" msgid="6063168087625352235">"选择壁纸来源"</string>
@@ -40,8 +42,7 @@
<string name="group_shortcuts" msgid="9133529424900391877">"快捷方式"</string>
<string name="group_widgets" msgid="6704978494073105844">"窗口小部件"</string>
<string name="group_wallpapers" msgid="1568191644272224858">"壁纸"</string>
- <!-- no translation found for completely_out_of_space (1759078539443491182) -->
- <skip />
+ <string name="completely_out_of_space" msgid="1759078539443491182">"您的主屏幕上没有空间了。"</string>
<string name="out_of_space" msgid="8365249326091984698">"此主屏幕上已没有空间。"</string>
<string name="hotseat_out_of_space" msgid="6304886797358479361">"底部区域已无空间。"</string>
<string name="invalid_hotseat_item" msgid="6545340627805449250">"该窗口小部件太大,超出基座区域可用空间。"</string>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index e5c072e..fbb5db7 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -20,6 +20,8 @@
<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="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 ddff5b7..37a5cfe 100644
--- a/res/values-zu/strings.xml
+++ b/res/values-zu/strings.xml
@@ -20,6 +20,8 @@
<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="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/attrs.xml b/res/values/attrs.xml
index 9ed824b..cd939db 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -171,4 +171,8 @@
<attr name="title" format="reference" />
<attr name="uri" format="string" />
</declare-styleable>
+ <declare-styleable name="Extra">
+ <attr name="key" format="string" />
+ <attr name="value" format="string" />
+ </declare-styleable>
</resources>
diff --git a/src/com/android/launcher2/AppWidgetResizeFrame.java b/src/com/android/launcher2/AppWidgetResizeFrame.java
index 9df6f32..8824686 100644
--- a/src/com/android/launcher2/AppWidgetResizeFrame.java
+++ b/src/com/android/launcher2/AppWidgetResizeFrame.java
@@ -79,7 +79,7 @@
mWorkspace = (Workspace) dragLayer.findViewById(R.id.workspace);
final AppWidgetProviderInfo info = widgetView.getAppWidgetInfo();
- int[] result = mLauncher.getMinSpanForWidget(info);
+ int[] result = Launcher.getMinSpanForWidget(mLauncher, info);
mMinHSpan = result[0];
mMinVSpan = result[1];
@@ -307,11 +307,38 @@
lp.cellVSpan = spanY;
mRunningVInc += vSpanDelta;
mRunningHInc += hSpanDelta;
+ if (!onDismiss) {
+ updateWidgetSizeRanges(mWidgetView, mLauncher, spanX, spanY);
+ }
}
-
mWidgetView.requestLayout();
}
+ static void updateWidgetSizeRanges(AppWidgetHostView widgetView, Launcher launcher,
+ int spanX, int spanY) {
+ Rect landMetrics = Workspace.getCellLayoutMetrics(launcher, CellLayout.LANDSCAPE);
+ Rect portMetrics = Workspace.getCellLayoutMetrics(launcher, CellLayout.PORTRAIT);
+ final float density = launcher.getResources().getDisplayMetrics().density;
+
+ // Compute landscape size
+ int cellWidth = landMetrics.left;
+ int cellHeight = landMetrics.top;
+ int widthGap = landMetrics.right;
+ int heightGap = landMetrics.bottom;
+ int landWidth = (int) ((spanX * cellWidth + (spanX - 1) * widthGap) / density);
+ int landHeight = (int) ((spanY * cellHeight + (spanY - 1) * heightGap) / density);
+
+ // Compute portrait size
+ cellWidth = portMetrics.left;
+ cellHeight = portMetrics.top;
+ widthGap = portMetrics.right;
+ heightGap = portMetrics.bottom;
+ int portWidth = (int) ((spanX * cellWidth + (spanX - 1) * widthGap) / density);
+ int portHeight = (int) ((spanY * cellHeight + (spanY - 1) * heightGap) / density);
+
+ widgetView.updateAppWidgetSize(null, portWidth, landHeight, landWidth, portHeight);
+ }
+
/**
* This is the final step of the resize. Here we save the new widget size and position
* to LauncherModel and animate the resize frame.
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java
index 3050944..fe9334b 100644
--- a/src/com/android/launcher2/AppsCustomizePagedView.java
+++ b/src/com/android/launcher2/AppsCustomizePagedView.java
@@ -481,8 +481,8 @@
for (AppWidgetProviderInfo widget : widgets) {
if (widget.minWidth > 0 && widget.minHeight > 0) {
// Ensure that all widgets we show can be added on a workspace of this size
- int[] spanXY = mLauncher.getSpanForWidget(widget);
- int[] minSpanXY = mLauncher.getMinSpanForWidget(widget);
+ int[] spanXY = Launcher.getSpanForWidget(mLauncher, widget);
+ int[] minSpanXY = Launcher.getMinSpanForWidget(mLauncher, widget);
int minSpanX = Math.min(spanXY[0], minSpanXY[0]);
int minSpanY = Math.min(spanXY[1], minSpanXY[1]);
if (minSpanX <= LauncherModel.getCellCountX() &&
@@ -1225,10 +1225,10 @@
createItemInfo = new PendingAddWidgetInfo(info, null, null);
// Determine the widget spans and min resize spans.
- int[] spanXY = mLauncher.getSpanForWidget(info);
+ int[] spanXY = Launcher.getSpanForWidget(mLauncher, info);
createItemInfo.spanX = spanXY[0];
createItemInfo.spanY = spanXY[1];
- int[] minSpanXY = mLauncher.getMinSpanForWidget(info);
+ int[] minSpanXY = Launcher.getMinSpanForWidget(mLauncher, info);
createItemInfo.minSpanX = minSpanXY[0];
createItemInfo.minSpanY = minSpanXY[1];
@@ -1315,7 +1315,7 @@
Object rawInfo = items.get(i);
if (rawInfo instanceof AppWidgetProviderInfo) {
AppWidgetProviderInfo info = (AppWidgetProviderInfo) rawInfo;
- int[] cellSpans = mLauncher.getSpanForWidget(info);
+ int[] cellSpans = Launcher.getSpanForWidget(mLauncher, info);
int maxWidth = Math.min(data.maxImageWidth,
mWidgetSpacingLayout.estimateCellWidth(cellSpans[0]));
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java
index 24e4047..2772d5c 100644
--- a/src/com/android/launcher2/CellLayout.java
+++ b/src/com/android/launcher2/CellLayout.java
@@ -146,6 +146,9 @@
private static final boolean DESTRUCTIVE_REORDER = false;
private static final boolean DEBUG_VISUALIZE_OCCUPIED = false;
+ static final int LANDSCAPE = 0;
+ static final int PORTRAIT = 1;
+
private static final float REORDER_HINT_MAGNITUDE = 0.27f;
private static final int REORDER_ANIMATION_DURATION = 150;
private float mReorderHintAnimationMagnitude;
@@ -910,11 +913,10 @@
return r;
}
- final int LANDSCAPE = 0;
- final int PORTRAIT = 1;
- void getCellLayoutMetrics(int measureWidth, int measureHeight, int orientation, Rect metrics) {
- int numWidthGaps = mCountX - 1;
- int numHeightGaps = mCountY - 1;
+ static void getMetrics(Rect metrics, Resources res, int measureWidth, int measureHeight,
+ int countX, int countY, int orientation) {
+ int numWidthGaps = countX - 1;
+ int numHeightGaps = countY - 1;
int widthGap;
int heightGap;
@@ -925,7 +927,7 @@
int paddingTop;
int paddingBottom;
- Resources res = getContext().getResources();
+ int maxGap = res.getDimensionPixelSize(R.dimen.workspace_max_gap);
if (orientation == LANDSCAPE) {
cellWidth = res.getDimensionPixelSize(R.dimen.workspace_cell_width_land);
cellHeight = res.getDimensionPixelSize(R.dimen.workspace_cell_height_land);
@@ -950,18 +952,16 @@
if (widthGap < 0 || heightGap < 0) {
int hSpace = measureWidth - paddingLeft - paddingRight;
int vSpace = measureHeight - paddingTop - paddingBottom;
- int hFreeSpace = hSpace - (mCountX * cellWidth);
- int vFreeSpace = vSpace - (mCountY * cellHeight);
- widthGap = Math.min(mMaxGap, numWidthGaps > 0 ? (hFreeSpace / numWidthGaps) : 0);
- heightGap = Math.min(mMaxGap, numHeightGaps > 0 ? (vFreeSpace / numHeightGaps) : 0);
+ int hFreeSpace = hSpace - (countX * cellWidth);
+ int vFreeSpace = vSpace - (countY * cellHeight);
+ widthGap = Math.min(maxGap, numWidthGaps > 0 ? (hFreeSpace / numWidthGaps) : 0);
+ heightGap = Math.min(maxGap, numHeightGaps > 0 ? (vFreeSpace / numHeightGaps) : 0);
}
metrics.set(cellWidth, cellHeight, widthGap, heightGap);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
- // TODO: currently ignoring padding
-
int widthSpecMode = MeasureSpec.getMode(widthMeasureSpec);
int widthSpecSize = MeasureSpec.getSize(widthMeasureSpec);
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 876aa3b..e5baf62 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -162,6 +162,10 @@
private static final String RUNTIME_STATE_PENDING_FOLDER_RENAME_ID = "launcher.rename_folder_id";
private static final String TOOLBAR_ICON_METADATA_NAME = "com.android.launcher.toolbar_icon";
+ private static final String TOOLBAR_SEARCH_ICON_METADATA_NAME =
+ "com.android.launcher.toolbar_search_icon";
+ private static final String TOOLBAR_VOICE_SEARCH_ICON_METADATA_NAME =
+ "com.android.launcher.toolbar_voice_search_icon";
/** The different states that Launcher can be in. */
private enum State { WORKSPACE, APPS_CUSTOMIZE, APPS_CUSTOMIZE_SPRING_LOADED };
@@ -989,29 +993,30 @@
}
}
- int[] getSpanForWidget(ComponentName component, int minWidth, int minHeight) {
- Rect padding = AppWidgetHostView.getDefaultPaddingForWidget(this, component, null);
+ static int[] getSpanForWidget(Context context, ComponentName component, int minWidth,
+ int minHeight) {
+ Rect padding = AppWidgetHostView.getDefaultPaddingForWidget(context, component, null);
// We want to account for the extra amount of padding that we are adding to the widget
// to ensure that it gets the full amount of space that it has requested
int requiredWidth = minWidth + padding.left + padding.right;
int requiredHeight = minHeight + padding.top + padding.bottom;
- return CellLayout.rectToCell(getResources(), requiredWidth, requiredHeight, null);
+ return CellLayout.rectToCell(context.getResources(), requiredWidth, requiredHeight, null);
}
- int[] getSpanForWidget(AppWidgetProviderInfo info) {
- return getSpanForWidget(info.provider, info.minWidth, info.minHeight);
+ static int[] getSpanForWidget(Context context, AppWidgetProviderInfo info) {
+ return getSpanForWidget(context, info.provider, info.minWidth, info.minHeight);
}
- int[] getMinSpanForWidget(AppWidgetProviderInfo info) {
- return getSpanForWidget(info.provider, info.minResizeWidth, info.minResizeHeight);
+ static int[] getMinSpanForWidget(Context context, AppWidgetProviderInfo info) {
+ return getSpanForWidget(context, info.provider, info.minResizeWidth, info.minResizeHeight);
}
- int[] getSpanForWidget(PendingAddWidgetInfo info) {
- return getSpanForWidget(info.componentName, info.minWidth, info.minHeight);
+ static int[] getSpanForWidget(Context context, PendingAddWidgetInfo info) {
+ return getSpanForWidget(context, info.componentName, info.minWidth, info.minHeight);
}
- int[] getMinSpanForWidget(PendingAddWidgetInfo info) {
- return getSpanForWidget(info.componentName, info.minResizeWidth,
+ static int[] getMinSpanForWidget(Context context, PendingAddWidgetInfo info) {
+ return getSpanForWidget(context, info.componentName, info.minResizeWidth,
info.minResizeHeight);
}
@@ -1030,8 +1035,8 @@
// Calculate the grid spans needed to fit this widget
CellLayout layout = getCellLayout(container, screen);
- int[] minSpanXY = getMinSpanForWidget(appWidgetInfo);
- int[] spanXY = getSpanForWidget(appWidgetInfo);
+ int[] minSpanXY = getMinSpanForWidget(this, appWidgetInfo);
+ int[] spanXY = getSpanForWidget(this, appWidgetInfo);
// Try finding open space on Launcher screen
// We have saved the position to which the widget was dragged-- this really only matters
@@ -1095,6 +1100,8 @@
launcherInfo.hostView.setTag(launcherInfo);
launcherInfo.hostView.setVisibility(View.VISIBLE);
+ AppWidgetResizeFrame.updateWidgetSizeRanges(launcherInfo.hostView,
+ this, launcherInfo.spanX, launcherInfo.spanY);
mWorkspace.addInScreen(launcherInfo.hostView, container, screen, cellXY[0], cellXY[1],
launcherInfo.spanX, launcherInfo.spanY, isWorkspaceLocked());
@@ -1143,7 +1150,6 @@
public void onDetachedFromWindow() {
super.onDetachedFromWindow();
mVisible = false;
- mDragLayer.clearAllResizeFrames();
if (mAttached) {
unregisterReceiver(mReceiver);
@@ -1384,6 +1390,7 @@
getContentResolver().unregisterContentObserver(mWidgetObserver);
unregisterReceiver(mCloseSystemDialogsReceiver);
+ mDragLayer.clearAllResizeFrames();
((ViewGroup) mWorkspace.getParent()).removeAllViews();
mWorkspace.removeAllViews();
mWorkspace = null;
@@ -1527,34 +1534,6 @@
Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_CONFIGURE);
intent.setComponent(appWidget.configure);
intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
- if (info != null) {
- if (info.mimeType != null && !info.mimeType.isEmpty()) {
- intent.putExtra(InstallWidgetReceiver.
- EXTRA_APPWIDGET_CONFIGURATION_DATA_MIME_TYPE, info.mimeType);
-
- final String mimeType = info.mimeType;
- final ClipData clipData = (ClipData) info.configurationData;
- final ClipDescription clipDesc = clipData.getDescription();
- for (int i = 0; i < clipDesc.getMimeTypeCount(); ++i) {
- if (clipDesc.getMimeType(i).equals(mimeType)) {
- final ClipData.Item item = clipData.getItemAt(i);
- final CharSequence stringData = item.getText();
- final Uri uriData = item.getUri();
- final Intent intentData = item.getIntent();
- final String key = InstallWidgetReceiver.
- EXTRA_APPWIDGET_CONFIGURATION_DATA;
- if (uriData != null) {
- intent.putExtra(key, uriData);
- } else if (intentData != null) {
- intent.putExtra(key, intentData);
- } else if (stringData != null) {
- intent.putExtra(key, stringData);
- }
- break;
- }
- }
- }
- }
startActivityForResultSafely(intent, REQUEST_CREATE_APPWIDGET);
mWidgetBeingBoundOrConfigured = info;
} else {
@@ -1840,9 +1819,23 @@
public void onClickVoiceButton(View v) {
v.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY);
- Intent intent = new Intent(RecognizerIntent.ACTION_WEB_SEARCH);
- intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
- startActivitySafely(null, intent, "onClickVoiceButton");
+ try {
+ final SearchManager searchManager =
+ (SearchManager) getSystemService(Context.SEARCH_SERVICE);
+ ComponentName activityName = searchManager.getGlobalSearchActivity();
+ Intent intent = new Intent(RecognizerIntent.ACTION_WEB_SEARCH);
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
+ | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
+ if (activityName != null) {
+ intent.setPackage(activityName.getPackageName());
+ }
+ startActivitySafely(null, intent, "onClickVoiceButton");
+ } catch (ActivityNotFoundException e) {
+ Intent intent = new Intent(RecognizerIntent.ACTION_WEB_SEARCH);
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
+ | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
+ startActivitySafely(null, intent, "onClickVoiceButton");
+ }
}
/**
@@ -2688,14 +2681,14 @@
}
}
- private Drawable getExternalPackageToolbarIcon(ComponentName activityName) {
+ private Drawable getExternalPackageToolbarIcon(ComponentName activityName, String resourceName) {
try {
PackageManager packageManager = getPackageManager();
// Look for the toolbar icon specified in the activity meta-data
Bundle metaData = packageManager.getActivityInfo(
activityName, PackageManager.GET_META_DATA).metaData;
if (metaData != null) {
- int iconResId = metaData.getInt(TOOLBAR_ICON_METADATA_NAME);
+ int iconResId = metaData.getInt(resourceName);
if (iconResId != 0) {
Resources res = packageManager.getResourcesForActivity(activityName);
return res.getDrawable(iconResId);
@@ -2715,8 +2708,9 @@
// if successful in getting icon, return it; otherwise, set button to use default drawable
private Drawable.ConstantState updateTextButtonWithIconFromExternalActivity(
- int buttonId, ComponentName activityName, int fallbackDrawableId) {
- Drawable toolbarIcon = getExternalPackageToolbarIcon(activityName);
+ int buttonId, ComponentName activityName, int fallbackDrawableId,
+ String toolbarResourceName) {
+ Drawable toolbarIcon = getExternalPackageToolbarIcon(activityName, toolbarResourceName);
Resources r = getResources();
int w = r.getDimensionPixelSize(R.dimen.toolbar_external_icon_width);
int h = r.getDimensionPixelSize(R.dimen.toolbar_external_icon_height);
@@ -2741,9 +2735,10 @@
// if successful in getting icon, return it; otherwise, set button to use default drawable
private Drawable.ConstantState updateButtonWithIconFromExternalActivity(
- int buttonId, ComponentName activityName, int fallbackDrawableId) {
+ int buttonId, ComponentName activityName, int fallbackDrawableId,
+ String toolbarResourceName) {
ImageView button = (ImageView) findViewById(buttonId);
- Drawable toolbarIcon = getExternalPackageToolbarIcon(activityName);
+ Drawable toolbarIcon = getExternalPackageToolbarIcon(activityName, toolbarResourceName);
if (button != null) {
// If we were unable to find the icon via the meta-data, use a
@@ -2793,7 +2788,14 @@
if (activityName != null) {
int coi = getCurrentOrientationIndexForGlobalIcons();
sGlobalSearchIcon[coi] = updateButtonWithIconFromExternalActivity(
- R.id.search_button, activityName, R.drawable.ic_home_search_normal_holo);
+ R.id.search_button, activityName, R.drawable.ic_home_search_normal_holo,
+ TOOLBAR_SEARCH_ICON_METADATA_NAME);
+ if (sGlobalSearchIcon[coi] == null) {
+ sGlobalSearchIcon[coi] = updateButtonWithIconFromExternalActivity(
+ R.id.search_button, activityName, R.drawable.ic_home_search_normal_holo,
+ TOOLBAR_ICON_METADATA_NAME);
+ }
+
if (searchDivider != null) searchDivider.setVisibility(View.VISIBLE);
if (searchButtonContainer != null) searchButtonContainer.setVisibility(View.VISIBLE);
searchButton.setVisibility(View.VISIBLE);
@@ -2825,12 +2827,34 @@
final View voiceButtonProxy = findViewById(R.id.voice_button_proxy);
// We only show/update the voice search icon if the search icon is enabled as well
- Intent intent = new Intent(RecognizerIntent.ACTION_WEB_SEARCH);
- ComponentName activityName = intent.resolveActivity(getPackageManager());
+ final SearchManager searchManager =
+ (SearchManager) getSystemService(Context.SEARCH_SERVICE);
+ ComponentName globalSearchActivity = searchManager.getGlobalSearchActivity();
+
+ ComponentName activityName = null;
+ if (globalSearchActivity != null) {
+ // Check if the global search activity handles voice search
+ Intent intent = new Intent(RecognizerIntent.ACTION_WEB_SEARCH);
+ intent.setPackage(globalSearchActivity.getPackageName());
+ activityName = intent.resolveActivity(getPackageManager());
+ }
+
+ if (activityName == null) {
+ // Fallback: check if an activity other than the global search activity
+ // resolves this
+ Intent intent = new Intent(RecognizerIntent.ACTION_WEB_SEARCH);
+ activityName = intent.resolveActivity(getPackageManager());
+ }
if (searchVisible && activityName != null) {
int coi = getCurrentOrientationIndexForGlobalIcons();
sVoiceSearchIcon[coi] = updateButtonWithIconFromExternalActivity(
- R.id.voice_button, activityName, R.drawable.ic_home_voice_search_holo);
+ R.id.voice_button, activityName, R.drawable.ic_home_voice_search_holo,
+ TOOLBAR_VOICE_SEARCH_ICON_METADATA_NAME);
+ if (sVoiceSearchIcon[coi] == null) {
+ sVoiceSearchIcon[coi] = updateButtonWithIconFromExternalActivity(
+ R.id.voice_button, activityName, R.drawable.ic_home_voice_search_holo,
+ TOOLBAR_ICON_METADATA_NAME);
+ }
if (searchDivider != null) searchDivider.setVisibility(View.VISIBLE);
if (voiceButtonContainer != null) voiceButtonContainer.setVisibility(View.VISIBLE);
voiceButton.setVisibility(View.VISIBLE);
@@ -2870,7 +2894,8 @@
int coi = getCurrentOrientationIndexForGlobalIcons();
mAppMarketIntent = intent;
sAppMarketIcon[coi] = updateTextButtonWithIconFromExternalActivity(
- R.id.market_button, activityName, R.drawable.ic_launcher_market_holo);
+ R.id.market_button, activityName, R.drawable.ic_launcher_market_holo,
+ TOOLBAR_ICON_METADATA_NAME);
marketButton.setVisibility(View.VISIBLE);
} else {
// We should hide and disable the view so that we don't try and restore the visibility
diff --git a/src/com/android/launcher2/LauncherModel.java b/src/com/android/launcher2/LauncherModel.java
index 6d1cc75..b76df39 100644
--- a/src/com/android/launcher2/LauncherModel.java
+++ b/src/com/android/launcher2/LauncherModel.java
@@ -1175,6 +1175,9 @@
appWidgetInfo.cellY = c.getInt(cellYIndex);
appWidgetInfo.spanX = c.getInt(spanXIndex);
appWidgetInfo.spanY = c.getInt(spanYIndex);
+ int[] minSpan = Launcher.getMinSpanForWidget(context, provider);
+ appWidgetInfo.minSpanX = minSpan[0];
+ appWidgetInfo.minSpanY = minSpan[1];
container = c.getInt(containerIndex);
if (container != LauncherSettings.Favorites.CONTAINER_DESKTOP &&
diff --git a/src/com/android/launcher2/LauncherProvider.java b/src/com/android/launcher2/LauncherProvider.java
index 297c097..5e572a5 100644
--- a/src/com/android/launcher2/LauncherProvider.java
+++ b/src/com/android/launcher2/LauncherProvider.java
@@ -42,6 +42,7 @@
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
+import android.os.Bundle;
import android.provider.Settings;
import android.text.TextUtils;
import android.util.AttributeSet;
@@ -74,6 +75,9 @@
static final String DB_CREATED_BUT_DEFAULT_WORKSPACE_NOT_LOADED =
"DB_CREATED_BUT_DEFAULT_WORKSPACE_NOT_LOADED";
+ private static final String ACTION_APPWIDGET_DEFAULT_WORKSPACE_CONFIGURE =
+ "com.android.launcher.action.APPWIDGET_DEFAULT_WORKSPACE_CONFIGURE";
+
/**
* {@link Uri} triggered at any registered {@link android.database.ContentObserver} when
* {@link AppWidgetHost#deleteHost()} is called during database creation.
@@ -219,6 +223,7 @@
private static final String TAG_APPWIDGET = "appwidget";
private static final String TAG_SHORTCUT = "shortcut";
private static final String TAG_FOLDER = "folder";
+ private static final String TAG_EXTRA = "extra";
private final Context mContext;
private final AppWidgetHost mAppWidgetHost;
@@ -820,7 +825,7 @@
} else if (TAG_CLOCK.equals(name)) {
added = addClockWidget(db, values);
} else if (TAG_APPWIDGET.equals(name)) {
- added = addAppWidget(db, values, a, packageManager);
+ added = addAppWidget(parser, attrs, type, db, values, a, packageManager);
} else if (TAG_SHORTCUT.equals(name)) {
long id = addUriShortcut(db, values, a);
added = id >= 0;
@@ -972,17 +977,18 @@
private boolean addSearchWidget(SQLiteDatabase db, ContentValues values) {
ComponentName cn = getSearchWidgetProvider();
- return addAppWidget(db, values, cn, 4, 1);
+ return addAppWidget(db, values, cn, 4, 1, null);
}
private boolean addClockWidget(SQLiteDatabase db, ContentValues values) {
ComponentName cn = new ComponentName("com.android.alarmclock",
"com.android.alarmclock.AnalogAppWidgetProvider");
- return addAppWidget(db, values, cn, 2, 2);
+ return addAppWidget(db, values, cn, 2, 2, null);
}
- private boolean addAppWidget(SQLiteDatabase db, ContentValues values, TypedArray a,
- PackageManager packageManager) {
+ private boolean addAppWidget(XmlResourceParser parser, AttributeSet attrs, int type,
+ SQLiteDatabase db, ContentValues values, TypedArray a,
+ PackageManager packageManager) throws XmlPullParserException, IOException {
String packageName = a.getString(R.styleable.Favorite_packageName);
String className = a.getString(R.styleable.Favorite_className);
@@ -1009,14 +1015,39 @@
if (hasPackage) {
int spanX = a.getInt(R.styleable.Favorite_spanX, 0);
int spanY = a.getInt(R.styleable.Favorite_spanY, 0);
- return addAppWidget(db, values, cn, spanX, spanY);
+
+ // Read the extras
+ Bundle extras = new Bundle();
+ int widgetDepth = parser.getDepth();
+ while ((type = parser.next()) != XmlPullParser.END_TAG ||
+ parser.getDepth() > widgetDepth) {
+ if (type != XmlPullParser.START_TAG) {
+ continue;
+ }
+
+ TypedArray ar = mContext.obtainStyledAttributes(attrs, R.styleable.Extra);
+ if (TAG_EXTRA.equals(parser.getName())) {
+ String key = ar.getString(R.styleable.Extra_key);
+ String value = ar.getString(R.styleable.Extra_value);
+ if (key != null && value != null) {
+ extras.putString(key, value);
+ } else {
+ throw new RuntimeException("Widget extras must have a key and value");
+ }
+ } else {
+ throw new RuntimeException("Widgets can contain only extras");
+ }
+ ar.recycle();
+ }
+
+ return addAppWidget(db, values, cn, spanX, spanY, extras);
}
return false;
}
private boolean addAppWidget(SQLiteDatabase db, ContentValues values, ComponentName cn,
- int spanX, int spanY) {
+ int spanX, int spanY, Bundle extras) {
boolean allocatedAppWidgets = false;
final AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(mContext);
@@ -1034,6 +1065,15 @@
// TODO: need to check return value
appWidgetManager.bindAppWidgetIdIfAllowed(appWidgetId, cn);
+
+ // Send a broadcast to configure the widget
+ if (extras != null && !extras.isEmpty()) {
+ Intent intent = new Intent(ACTION_APPWIDGET_DEFAULT_WORKSPACE_CONFIGURE);
+ intent.setComponent(cn);
+ intent.putExtras(extras);
+ intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
+ mContext.sendBroadcast(intent);
+ }
} catch (RuntimeException ex) {
Log.e(TAG, "Problem allocating appWidgetId", ex);
}
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java
index 4bcb4c7..adfe0de 100644
--- a/src/com/android/launcher2/PagedView.java
+++ b/src/com/android/launcher2/PagedView.java
@@ -292,7 +292,9 @@
* the previous tab page.
*/
protected void updateCurrentPageScroll() {
- int newX = getChildOffset(mCurrentPage) - getRelativeChildOffset(mCurrentPage);
+ int offset = getChildOffset(mCurrentPage);
+ int relOffset = getRelativeChildOffset(mCurrentPage);
+ int newX = offset - relOffset;
scrollTo(newX, 0);
mScroller.setFinalX(newX);
mScroller.forceFinished(true);
@@ -505,6 +507,23 @@
setMeasuredDimension(widthSize, heightSize);
+ if (childCount > 0) {
+ if (DEBUG) Log.d(TAG, "getRelativeChildOffset(): " + getMeasuredWidth() + ", "
+ + getChildWidth(0));
+
+ // Calculate the variable page spacing if necessary
+ if (mPageSpacing < 0) {
+ // The gap between pages in the PagedView should be equal to the gap from the page
+ // to the edge of the screen (so it is not visible in the current screen). To
+ // account for unequal padding on each side of the paged view, we take the maximum
+ // of the left/right gap and use that as the gap between each page.
+ int offset = getRelativeChildOffset(0);
+ int spacing = Math.max(offset, widthSize - offset -
+ getChildAt(0).getMeasuredWidth());
+ setPageSpacing(spacing);
+ }
+ }
+
// We can't call getChildOffset/getRelativeChildOffset until we set the measured dimensions.
// We also wait until we set the measured dimensions before flushing the cache as well, to
// ensure that the cache is filled with good values.
@@ -577,24 +596,7 @@
if (DEBUG) Log.d(TAG, "PagedView.onLayout()");
final int verticalPadding = getPaddingTop() + getPaddingBottom();
final int childCount = getChildCount();
- int childLeft = 0;
- if (childCount > 0) {
- if (DEBUG) Log.d(TAG, "getRelativeChildOffset(): " + getMeasuredWidth() + ", "
- + getChildWidth(0));
- childLeft = getRelativeChildOffset(0);
-
- // Calculate the variable page spacing if necessary
- if (mPageSpacing < 0) {
- // The gap between pages in the PagedView should be equal to the gap from the page
- // to the edge of the screen (so it is not visible in the current screen). To
- // account for unequal padding on each side of the paged view, we take the maximum
- // of the left/right gap and use that as the gap between each page.
- int offset = getRelativeChildOffset(0);
- int spacing = Math.max(offset, (right - left) - offset -
- getChildAt(0).getMeasuredWidth());
- setPageSpacing(spacing);
- }
- }
+ int childLeft = getRelativeChildOffset(0);
for (int i = 0; i < childCount; i++) {
final View child = getPageAt(i);
@@ -619,10 +621,6 @@
setHorizontalScrollBarEnabled(true);
mFirstLayout = false;
}
-
- if (mFirstLayout && mCurrentPage >= 0 && mCurrentPage < getChildCount()) {
- mFirstLayout = false;
- }
}
protected void screenScrolled(int screenCenter) {
@@ -709,13 +707,6 @@
}
}
- protected int getScaledRelativeChildOffset(int index) {
- final int padding = getPaddingLeft() + getPaddingRight();
- final int offset = getPaddingLeft() + (getMeasuredWidth() - padding -
- getScaledMeasuredWidth(getPageAt(index))) / 2;
- return offset;
- }
-
protected int getScaledMeasuredWidth(View child) {
// This functions are called enough times that it actually makes a difference in the
// profiler -- so just inline the max() here
@@ -1702,10 +1693,12 @@
// found
if (mHasScrollIndicator && mScrollIndicator == null) {
ViewGroup parent = (ViewGroup) getParent();
- mScrollIndicator = (View) (parent.findViewById(R.id.paged_view_indicator));
- mHasScrollIndicator = mScrollIndicator != null;
- if (mHasScrollIndicator) {
- mScrollIndicator.setVisibility(View.VISIBLE);
+ if (parent != null) {
+ mScrollIndicator = (View) (parent.findViewById(R.id.paged_view_indicator));
+ mHasScrollIndicator = mScrollIndicator != null;
+ if (mHasScrollIndicator) {
+ mScrollIndicator.setVisibility(View.VISIBLE);
+ }
}
}
return mScrollIndicator;
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index f219d76..ec18fb3 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -122,6 +122,9 @@
private int mDragOverX = -1;
private int mDragOverY = -1;
+ static Rect mLandscapeCellLayoutMetrics = null;
+ static Rect mPortraitCellLayoutMetrics = null;
+
/**
* The CellLayout that is currently being dragged over
*/
@@ -2389,6 +2392,44 @@
}
}
+ static Rect getCellLayoutMetrics(Launcher launcher, int orientation) {
+ Resources res = launcher.getResources();
+ Display display = launcher.getWindowManager().getDefaultDisplay();
+ Point smallestSize = new Point();
+ Point largestSize = new Point();
+ display.getCurrentSizeRange(smallestSize, largestSize);
+ if (orientation == CellLayout.LANDSCAPE) {
+ if (mLandscapeCellLayoutMetrics == null) {
+ int paddingLeft = res.getDimensionPixelSize(R.dimen.workspace_left_padding_land);
+ int paddingRight = res.getDimensionPixelSize(R.dimen.workspace_right_padding_land);
+ int paddingTop = res.getDimensionPixelSize(R.dimen.workspace_top_padding_land);
+ int paddingBottom = res.getDimensionPixelSize(R.dimen.workspace_bottom_padding_land);
+ int width = largestSize.x - paddingLeft - paddingRight;
+ int height = smallestSize.y - paddingTop - paddingBottom;
+ mLandscapeCellLayoutMetrics = new Rect();
+ CellLayout.getMetrics(mLandscapeCellLayoutMetrics, res,
+ width, height, LauncherModel.getCellCountX(), LauncherModel.getCellCountY(),
+ orientation);
+ }
+ return mLandscapeCellLayoutMetrics;
+ } else if (orientation == CellLayout.PORTRAIT) {
+ if (mPortraitCellLayoutMetrics == null) {
+ int paddingLeft = res.getDimensionPixelSize(R.dimen.workspace_left_padding_land);
+ int paddingRight = res.getDimensionPixelSize(R.dimen.workspace_right_padding_land);
+ int paddingTop = res.getDimensionPixelSize(R.dimen.workspace_top_padding_land);
+ int paddingBottom = res.getDimensionPixelSize(R.dimen.workspace_bottom_padding_land);
+ int width = smallestSize.x - paddingLeft - paddingRight;
+ int height = largestSize.y - paddingTop - paddingBottom;
+ mPortraitCellLayoutMetrics = new Rect();
+ CellLayout.getMetrics(mPortraitCellLayoutMetrics, res,
+ width, height, LauncherModel.getCellCountX(), LauncherModel.getCellCountY(),
+ orientation);
+ }
+ return mPortraitCellLayoutMetrics;
+ }
+ return null;
+ }
+
public void onDragExit(DragObject d) {
mDragEnforcer.onDragExit();