diff --git a/quickstep/res/values-af/strings.xml b/quickstep/res/values-af/strings.xml index 6aed173c7d..815ba042b2 100644 --- a/quickstep/res/values-af/strings.xml +++ b/quickstep/res/values-af/strings.xml @@ -78,8 +78,7 @@ "Skermkiekie" "Jou organisasie laat nie hierdie program toe nie" "Slaan navigasietutoriaal oor?" - - + "Jy kan dit later in die %1$s-program kry" "Kanselleer" "Slaan oor" diff --git a/quickstep/res/values-am/strings.xml b/quickstep/res/values-am/strings.xml index dd4f76d9a9..5a3df9d9bb 100644 --- a/quickstep/res/values-am/strings.xml +++ b/quickstep/res/values-am/strings.xml @@ -78,8 +78,7 @@ "ቅጽበታዊ ገጽ እይታ" "ይህ ድርጊት በመተግበሪያው ወይም በእርስዎ ድርጅት አይፈቀድም" "የአሰሳ አጋዥ ሥልጠናን ይዝለሉ?" - - + "ይህን በኋላ በ%1$s መተግበሪያው ውስጥ ማግኘት ይችላሉ" "ይቅር" "ዝለል" diff --git a/quickstep/res/values-ar/strings.xml b/quickstep/res/values-ar/strings.xml index ee58f170a5..8205f89444 100644 --- a/quickstep/res/values-ar/strings.xml +++ b/quickstep/res/values-ar/strings.xml @@ -78,8 +78,7 @@ "لقطة شاشة" "لا يسمح التطبيق أو لا تسمح مؤسستك بهذا الإجراء." "هل تريد تخطي الدليل التوجيهي؟" - - + "يمكنك العثور على هذا الدليل التوجيهي لاحقًا في التطبيق %1$s" "إلغاء" "التخطي" diff --git a/quickstep/res/values-as/strings.xml b/quickstep/res/values-as/strings.xml index be08f08dda..c1a746fdf1 100644 --- a/quickstep/res/values-as/strings.xml +++ b/quickstep/res/values-as/strings.xml @@ -78,8 +78,7 @@ "স্ক্ৰীনশ্বট" "এপ্‌টোৱে অথবা আপোনাৰ প্ৰতিষ্ঠানে এই কাৰ্যটোৰ অনুমতি নিদিয়ে" "নেভিগেশ্বনৰ টিউট’ৰিয়েল এৰিব বিচাৰে নেকি?" - - + "আপুনি এয়া পাছত %1$s এপ্‌টোত বিচাৰিব পাৰিব" "বাতিল কৰক" "এৰি যাওক" diff --git a/quickstep/res/values-az/strings.xml b/quickstep/res/values-az/strings.xml index 2c15eb025a..bd88392075 100644 --- a/quickstep/res/values-az/strings.xml +++ b/quickstep/res/values-az/strings.xml @@ -78,8 +78,7 @@ "Ekran şəkli" "Bu əməliyyata tətbiq və ya təşkilatınız tərəfindən icazə verilmir" "Naviqasiya dərsliyi ötürülsün?" - - + "Bunu sonra %1$s tətbiqində tapa bilərsiniz" "Ləğv edin" "Ötürün" diff --git a/quickstep/res/values-b+sr+Latn/strings.xml b/quickstep/res/values-b+sr+Latn/strings.xml index 3d13a4db6e..21295fc31a 100644 --- a/quickstep/res/values-b+sr+Latn/strings.xml +++ b/quickstep/res/values-b+sr+Latn/strings.xml @@ -78,8 +78,7 @@ "Snimak ekrana" "Aplikacija ili organizacija ne dozvoljavaju ovu radnju" "Želite da preskočite vodič za kretanje?" - - + "Možete da pronađete ovo kasnije u aplikaciji %1$s" "Otkaži" "Preskoči" diff --git a/quickstep/res/values-be/strings.xml b/quickstep/res/values-be/strings.xml index 930a296016..d31468c2fd 100644 --- a/quickstep/res/values-be/strings.xml +++ b/quickstep/res/values-be/strings.xml @@ -78,8 +78,7 @@ "Здымак экрана" "Гэта дзеянне не дазволена праграмай ці вашай арганізацыяй" "Прапусціць дапаможнік па навігацыі?" - - + "Знайсці дапаможнік можна ў праграме \"%1$s\"" "Скасаваць" "Прапусціць" diff --git a/quickstep/res/values-bg/strings.xml b/quickstep/res/values-bg/strings.xml index 3e8deda6c2..d2554d5809 100644 --- a/quickstep/res/values-bg/strings.xml +++ b/quickstep/res/values-bg/strings.xml @@ -78,8 +78,7 @@ "Екранна снимка" "Това действие не е разрешено от приложението или организацията ви" "Пропускане на урока за навигиране?" - - + "Урокът е налице в приложението %1$s" "Отказ" "Пропускане" diff --git a/quickstep/res/values-bn/strings.xml b/quickstep/res/values-bn/strings.xml index df706f93b9..48d26905c0 100644 --- a/quickstep/res/values-bn/strings.xml +++ b/quickstep/res/values-bn/strings.xml @@ -78,8 +78,7 @@ "স্ক্রিনশট নিন" "এই অ্যাপ বা আপনার প্রতিষ্ঠান এই অ্যাকশনটি পারফর্ম করার অনুমতি দেয়নি" "নেভিগেশন টিউটোরিয়াল এড়িয়ে যেতে চান?" - - + "আপনি %1$s অ্যাপে পরে এটি খুঁজে পাবেন" "বাতিল করুন" "এড়িয়ে যান" diff --git a/quickstep/res/values-bs/strings.xml b/quickstep/res/values-bs/strings.xml index 5a99a14581..18494a9c19 100644 --- a/quickstep/res/values-bs/strings.xml +++ b/quickstep/res/values-bs/strings.xml @@ -78,8 +78,7 @@ "Snimak ekrana" "Ovu radnju ne dozvoljava aplikacija ili vaša organizacija" "Preskočiti vodič za navigiranje?" - - + "To možete pronaći kasnije u aplikaciji %1$s" "Otkaži" "Preskoči" diff --git a/quickstep/res/values-ca/strings.xml b/quickstep/res/values-ca/strings.xml index f7006b018b..7c417effa0 100644 --- a/quickstep/res/values-ca/strings.xml +++ b/quickstep/res/values-ca/strings.xml @@ -78,8 +78,7 @@ "Captura de pantalla" "L\'aplicació o la teva organització no permeten aquesta acció" "Vols ometre el tutorial de navegació?" - - + "Pots trobar-ho més tard a l\'aplicació %1$s" "Cancel·la" "Omet" diff --git a/quickstep/res/values-cs/strings.xml b/quickstep/res/values-cs/strings.xml index 23515ffd10..9d1b94e9cd 100644 --- a/quickstep/res/values-cs/strings.xml +++ b/quickstep/res/values-cs/strings.xml @@ -30,7 +30,7 @@ "dnes zbývá: %1$s" "Návrhy aplikací" "Všechny aplikace" - "Vaše předpovídané aplikace" + "Návrhy aplikací pro vás" "Nechte si ve spodním řádku na ploše zobrazovat návrhy aplikací" "Nechte si na řádku oblíbených na ploše zobrazovat návrhy aplikací" "Mějte nejpoužívanější aplikace k dispozici přímo na ploše. Návrhy se budou měnit v závislosti na sledech činností. Aplikace ve spodním řádku se přesunou na vaši plochu." @@ -78,8 +78,7 @@ "Snímek obrazovky" "Aplikace nebo organizace zakazuje tuto akci" "Přeskočit výukový program k navigaci?" - - + "Program později najdete v aplikaci %1$s" "Zrušit" "Přeskočit" diff --git a/quickstep/res/values-da/strings.xml b/quickstep/res/values-da/strings.xml index 8d1166b302..42098dc036 100644 --- a/quickstep/res/values-da/strings.xml +++ b/quickstep/res/values-da/strings.xml @@ -78,8 +78,7 @@ "Screenshot" "Appen eller din organisation tillader ikke denne handling" "Vil du springe selvstudiet for navigation over?" - - + "Du kan finde dette senere i appen %1$s" "Annuller" "Spring over" diff --git a/quickstep/res/values-de/strings.xml b/quickstep/res/values-de/strings.xml index efee106a69..e7d9523c14 100644 --- a/quickstep/res/values-de/strings.xml +++ b/quickstep/res/values-de/strings.xml @@ -45,73 +45,40 @@ "Funktion \"App-Vorschläge\" aktiviert" "Funktion \"App-Vorschläge\" deaktiviert" "Vorgeschlagene App: %1$s" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + "Wische vom äußersten linken Bildschirmrand." + "Wische vom linken Bildschirmrand zur Bildschirmmitte und lass los." + "Gut gemacht. Versuch es jetzt mal vom rechten Rand aus." + "Wische vom äußersten rechten Bildschirmrand." + "Wische vom rechten Bildschirmrand zur Bildschirmmitte und lass los." + "Du hast die „Zurück“-Touch-Geste abgeschlossen. Nun lernst du, wie du zum Startbildschirm gelangst." + "Wische nicht zu nah am unteren Bildschirmrand." + "Du kannst die Empfindlichkeit von „Zurück“ in den Einstellungen ändern" + "Zum Zurückgehen wischen" + "Wenn du zum letzten Bildschirm zurückgehen möchtest, wische vom linken oder rechten Rand zur Mitte." + "Wische vom unteren Bildschirmrand nach oben." + "Achte darauf, nicht innezuhalten, bevor du loslässt." + "Wische gerade nach oben." + "Du hast die „Startbildschirm“-Touch-Geste abgeschlossen. Als Nächstes lernst du, wie du zwischen Apps wechseln kannst." + "Zum Startbildschirm gehen" + "Wenn du zum Startbildschirm gehen möchtest, wische einfach vom unteren Bildschirmrand nach oben." + "Wische vom unteren Bildschirmrand nach oben." + "Versuche, das Fenster länger festzuhalten, bevor du es loslässt." + "Wische gerade nach oben und halte dann inne." + "Du hast die „Apps wechseln“-Touch-Geste abgeschlossen. Nun bist du bereit, dein Smartphone zu verwenden!" + "Zwischen Apps wechseln" + "Wische auf dem Bildschirm von unten nach oben, halte ihn gedrückt und lass ihn dann los." + "Fertig" + "Weiter" + "Fertig" + "Einstellungen" + "Wiederholen" + "Sehr gut!" + "Anleitung %1$d/%2$d" "Teilen" "Screenshot" "Die App oder deine Organisation lässt diese Aktion nicht zu" - - - - - - - - + "Navigationstutorial überspringen?" + "Das findest du später in der %1$s App" + "Abbrechen" + "Überspringen" diff --git a/quickstep/res/values-el/strings.xml b/quickstep/res/values-el/strings.xml index baf1b87a13..21c29844f5 100644 --- a/quickstep/res/values-el/strings.xml +++ b/quickstep/res/values-el/strings.xml @@ -78,8 +78,7 @@ "Στιγμιότυπο οθόνης" "Αυτή η ενέργεια δεν επιτρέπεται από την εφαρμογή ή τον οργανισμό σας." "Παράβλεψη οδηγού πλοήγησης;" - - + "Βρείτε τον αργότερα στην εφαρμογή %1$s" "Ακύρωση" "Παράβλεψη" diff --git a/quickstep/res/values-es-rUS/strings.xml b/quickstep/res/values-es-rUS/strings.xml index a4cf4bd201..478d1cdb1e 100644 --- a/quickstep/res/values-es-rUS/strings.xml +++ b/quickstep/res/values-es-rUS/strings.xml @@ -78,8 +78,7 @@ "Captura de pantalla" "La app o tu organización no permiten realizar esta acción" "¿Omitir el instructivo de navegación?" - - + "Puedes encontrarlo en la app de %1$s" "Cancelar" "Omitir" diff --git a/quickstep/res/values-es/strings.xml b/quickstep/res/values-es/strings.xml index 4dd7f02d44..454bea7784 100644 --- a/quickstep/res/values-es/strings.xml +++ b/quickstep/res/values-es/strings.xml @@ -78,8 +78,7 @@ "Hacer captura" "No puedes hacerlo porque la aplicación o tu organización no lo permiten" "¿Saltar tutorial de navegación?" - - + "Puedes consultarlo en otro momento en la aplicación %1$s" "Cancelar" "Saltar" diff --git a/quickstep/res/values-et/strings.xml b/quickstep/res/values-et/strings.xml index c0339b96f5..b7299345ab 100644 --- a/quickstep/res/values-et/strings.xml +++ b/quickstep/res/values-et/strings.xml @@ -78,8 +78,7 @@ "Ekraanipilt" "Rakendus või teie organisatsioon on selle toimingu keelanud" "Kas jätta navigeerimise õpetused vahele?" - - + "Leiate selle hiljem rakendusest %1$s" "Tühista" "Jäta vahele" diff --git a/quickstep/res/values-eu/strings.xml b/quickstep/res/values-eu/strings.xml index 7671e778c2..f6d3f235c4 100644 --- a/quickstep/res/values-eu/strings.xml +++ b/quickstep/res/values-eu/strings.xml @@ -78,8 +78,7 @@ "Atera pantaila-argazki bat" "Aplikazioak edo erakundeak ez du eman ekintza hori gauzatzeko baimena" "Nabigazio-tutoriala saltatu nahi duzu?" - - + "Tutorial hau %1$s aplikazioan aurki dezakezu geroago" "Utzi" "Saltatu" diff --git a/quickstep/res/values-fa/strings.xml b/quickstep/res/values-fa/strings.xml index 60e31c5a6f..8ca0f95ec9 100644 --- a/quickstep/res/values-fa/strings.xml +++ b/quickstep/res/values-fa/strings.xml @@ -78,8 +78,7 @@ "نماگرفت" "برنامه یا سازمان شما اجازه نمی‌دهد این کنش انجام شود." "آموزش گام‌به‌گام پیمایش رد شود؟" - - + "می‌توانید آن را بعداً در برنامه %1$s پیدا کنید" "لغو" "رد شدن" diff --git a/quickstep/res/values-fi/strings.xml b/quickstep/res/values-fi/strings.xml index 2f524b5d66..9ce7e6b4f2 100644 --- a/quickstep/res/values-fi/strings.xml +++ b/quickstep/res/values-fi/strings.xml @@ -78,8 +78,7 @@ "Kuvakaappaus" "Sovellus tai organisaatio ei salli tätä toimintoa" "Ohitetaanko navigointiohje?" - - + "Löydät tämän myöhemmin sovelluksesta: %1$s" "Peru" "Ohita" diff --git a/quickstep/res/values-fr-rCA/strings.xml b/quickstep/res/values-fr-rCA/strings.xml index 1277366e5f..da738495c7 100644 --- a/quickstep/res/values-fr-rCA/strings.xml +++ b/quickstep/res/values-fr-rCA/strings.xml @@ -78,8 +78,7 @@ "Capture d\'écran" "L\'application ou votre organisation n\'autorise pas cette action" "Ignorer le tutoriel sur la navigation?" - - + "Vous trouverez le tutoriel dans l\'application %1$s" "Annuler" "Ignorer" diff --git a/quickstep/res/values-fr/strings.xml b/quickstep/res/values-fr/strings.xml index 5f9d6bb676..b6abea7bc9 100644 --- a/quickstep/res/values-fr/strings.xml +++ b/quickstep/res/values-fr/strings.xml @@ -78,8 +78,7 @@ "Capture d\'écran" "Cette action n\'est pas autorisée par l\'application ou par votre organisation" "Ignorer le tutoriel de navigation ?" - - + "Vous le retrouverez dans l\'appli %1$s" "Annuler" "Passer" diff --git a/quickstep/res/values-gl/strings.xml b/quickstep/res/values-gl/strings.xml index b158f311d8..846f68a4c5 100644 --- a/quickstep/res/values-gl/strings.xml +++ b/quickstep/res/values-gl/strings.xml @@ -78,8 +78,7 @@ "Facer captura" "A aplicación ou a túa organización non permite realizar esta acción" "Queres omitir o titorial de navegación?" - - + "Podes atopar isto máis tarde na aplicación %1$s" "Cancelar" "Omitir" diff --git a/quickstep/res/values-hi/strings.xml b/quickstep/res/values-hi/strings.xml index 51b8c13e75..a7711fe10c 100644 --- a/quickstep/res/values-hi/strings.xml +++ b/quickstep/res/values-hi/strings.xml @@ -78,8 +78,7 @@ "स्क्रीनशॉट" "ऐप्लिकेशन या आपका संगठन इस कार्रवाई की अनुमति नहीं देता" "नेविगेशन ट्यूटोरियल छोड़ना चाहते हैं?" - - + "आप बाद में, %1$s ऐप्लिकेशन पर इसे देख सकते हैं" "अभी नहीं" "छोड़ें" diff --git a/quickstep/res/values-hr/strings.xml b/quickstep/res/values-hr/strings.xml index 4b19eab254..d5e4b9dd93 100644 --- a/quickstep/res/values-hr/strings.xml +++ b/quickstep/res/values-hr/strings.xml @@ -78,8 +78,7 @@ "Snimka zaslona" "Aplikacija ili vaša organizacija ne dopuštaju ovu radnju" "Želite li preskočiti vodič za kretanje?" - - + "Kasnije ga možete pronaći u aplikaciji %1$s" "Odustani" "Preskoči" diff --git a/quickstep/res/values-hu/strings.xml b/quickstep/res/values-hu/strings.xml index 215023a86f..386ef3ee3f 100644 --- a/quickstep/res/values-hu/strings.xml +++ b/quickstep/res/values-hu/strings.xml @@ -78,8 +78,7 @@ "Képernyőkép" "Az alkalmazás vagy az Ön szervezete nem engedélyezi ezt a műveletet" "Kihagyja a navigáció bemutatóját?" - - + "Ezt később megtalálhatja a(z) %1$s alkalmazásban" "Mégse" "Kihagyás" diff --git a/quickstep/res/values-in/strings.xml b/quickstep/res/values-in/strings.xml index f9cf9ebd01..941bdb7dd0 100644 --- a/quickstep/res/values-in/strings.xml +++ b/quickstep/res/values-in/strings.xml @@ -78,8 +78,7 @@ "Screenshot" "Tindakan ini tidak diizinkan oleh aplikasi atau organisasi Anda" "Lewati tutorial navigasi?" - - + "Anda dapat menemukan tutorial ini di lain waktu di aplikasi %1$s" "Batal" "Lewati" diff --git a/quickstep/res/values-is/strings.xml b/quickstep/res/values-is/strings.xml index 4e8cce7d9d..6042b47e45 100644 --- a/quickstep/res/values-is/strings.xml +++ b/quickstep/res/values-is/strings.xml @@ -78,8 +78,7 @@ "Skjámynd" "Forritið eða fyrirtækið leyfir ekki þessa aðgerð" "Sleppa flettileiðsögn?" - - + "Þú getur fundið þetta síðar í forritinu %1$s" "Hætta við" "Sleppa" diff --git a/quickstep/res/values-it/strings.xml b/quickstep/res/values-it/strings.xml index a2877ac2f2..6c81d1720e 100644 --- a/quickstep/res/values-it/strings.xml +++ b/quickstep/res/values-it/strings.xml @@ -30,7 +30,7 @@ "Rimanente oggi: %1$s" "App suggerite" "Tutte le app" - "Le app previste" + "App previste per te" "Visualizza app suggerite nella riga inferiore della schermata Home" "Visualizza app suggerite nella riga dei Preferiti della schermata Home" "Accedi facilmente alle app più utilizzate direttamente dalla schermata Home. I suggerimenti varieranno in base alle tue routine. Le app nella riga inferiore verranno spostate più in alto sulla schermata Home." @@ -78,8 +78,7 @@ "Screenshot" "Questa azione non è consentita dall\'app o dall\'organizzazione" "Saltare il tutorial di navigazione?" - - + "Puoi trovarlo in un secondo momento nell\'app %1$s" "Annulla" "Salta" diff --git a/quickstep/res/values-iw/strings.xml b/quickstep/res/values-iw/strings.xml index 0532081654..b77faeb4fa 100644 --- a/quickstep/res/values-iw/strings.xml +++ b/quickstep/res/values-iw/strings.xml @@ -78,8 +78,7 @@ "צילום מסך" "האפליקציה או הארגון שלך אינם מתירים את הפעולה הזאת" "לדלג על המדריך לניווט?" - - + "ניתן למצוא את המדריך מאוחר יותר באפליקציה %1$s" "ביטול" "דילוג" diff --git a/quickstep/res/values-ja/strings.xml b/quickstep/res/values-ja/strings.xml index 87dbb950c8..1cbdf7331c 100644 --- a/quickstep/res/values-ja/strings.xml +++ b/quickstep/res/values-ja/strings.xml @@ -78,8 +78,7 @@ "スクリーンショット" "この操作はアプリまたは組織で許可されていません" "操作チュートリアルをスキップしますか?" - - + "これは後から %1$s アプリで確認できます" "キャンセル" "スキップ" diff --git a/quickstep/res/values-ka/strings.xml b/quickstep/res/values-ka/strings.xml index cdc70d6f88..5dd818d9ac 100644 --- a/quickstep/res/values-ka/strings.xml +++ b/quickstep/res/values-ka/strings.xml @@ -78,8 +78,7 @@ "ეკრანის ანაბეჭდი" "ეს მოქმედება არ არის დაშვებული აპის ან თქვენი ორგანიზაციის მიერ" "გსურთ, გამოტოვოთ ნავიგაციის სახელმძღვანელო?" - - + "ამის მოგვიანებით პოვნა %1$s აპში შეგიძლიათ" "გაუქმება" "გამოტოვება" diff --git a/quickstep/res/values-kk/strings.xml b/quickstep/res/values-kk/strings.xml index bd84c93af1..554d10dc82 100644 --- a/quickstep/res/values-kk/strings.xml +++ b/quickstep/res/values-kk/strings.xml @@ -78,8 +78,7 @@ "Скриншот" "Бұл әрекетке қолданба не ұйым рұқсат етпейді." "Қимылдар оқулығын өткізіп жіберу керек пе?" - - + "Мұны кейін %1$s қолданбасынан таба аласыз." "Бас тарту" "Өткізіп жіберу" diff --git a/quickstep/res/values-ko/strings.xml b/quickstep/res/values-ko/strings.xml index 4138b0f5a0..fbbddd6699 100644 --- a/quickstep/res/values-ko/strings.xml +++ b/quickstep/res/values-ko/strings.xml @@ -78,8 +78,7 @@ "스크린샷" "이 작업은 앱 또는 조직에서 허용되지 않습니다." "이동 방법 튜토리얼을 건너뛰시겠습니까?" - - + "이 튜토리얼은 %1$s 앱에서 다시 볼 수 있습니다" "취소" "건너뛰기" diff --git a/quickstep/res/values-ky/strings.xml b/quickstep/res/values-ky/strings.xml index 2ab089f117..bd50eed506 100644 --- a/quickstep/res/values-ky/strings.xml +++ b/quickstep/res/values-ky/strings.xml @@ -78,8 +78,7 @@ "Скриншот" "Бул аракетти аткарууга колдонмо же ишканаңыз тыюу салган" "Жаңсап өтүү үйрөткүчүн өт-рүп жибер-би?" - - + "Аны кийин %1$s колдонмосунан табасыз" "Жокко чыгаруу" "Өтк-п жиберүү" diff --git a/quickstep/res/values-lt/strings.xml b/quickstep/res/values-lt/strings.xml index 457db01962..2f1db5038a 100644 --- a/quickstep/res/values-lt/strings.xml +++ b/quickstep/res/values-lt/strings.xml @@ -78,8 +78,7 @@ "Ekrano kopija" "Jūsų organizacijoje arba naudojant šią programą neleidžiama atlikti šio veiksmo" "Praleisti naršymo mokymo programą?" - - + "Tai galėsite rasti vėliau programoje „%1$s“" "Atšaukti" "Praleisti" diff --git a/quickstep/res/values-lv/strings.xml b/quickstep/res/values-lv/strings.xml index 2a117be1eb..ce941bc3d9 100644 --- a/quickstep/res/values-lv/strings.xml +++ b/quickstep/res/values-lv/strings.xml @@ -78,8 +78,7 @@ "Veikt ekrānuzņēmumu" "Lietotne vai jūsu organizācija neatļauj veikt šo darbību." "Vai izlaist navigācijas mācības?" - - + "Varēsiet to vēlāk atrast lietotnē %1$s." "Atcelt" "Izlaist" diff --git a/quickstep/res/values-mk/strings.xml b/quickstep/res/values-mk/strings.xml index 120e63e066..f9fd8b3d06 100644 --- a/quickstep/res/values-mk/strings.xml +++ b/quickstep/res/values-mk/strings.xml @@ -78,8 +78,7 @@ "Слика од екранот" "Апликацијата или вашата организација не го дозволува дејствово" "Да се прескокне упатството за навигација?" - - + "Ова може да го најдете подоцна во апликацијата %1$s" "Откажи" "Прескокни" diff --git a/quickstep/res/values-ml/strings.xml b/quickstep/res/values-ml/strings.xml index e8d7f4ca72..fc6bc82d01 100644 --- a/quickstep/res/values-ml/strings.xml +++ b/quickstep/res/values-ml/strings.xml @@ -78,8 +78,7 @@ "സ്ക്രീൻഷോട്ട്" "ഈ നടപടി എടുക്കുന്നത് ആപ്പോ നിങ്ങളുടെ സ്ഥാപനമോ അനുവദിക്കുന്നില്ല" "നാവിഗേഷൻ ട്യൂട്ടോറിയൽ ഒഴിവാക്കണോ?" - - + "%1$s ആപ്പിൽ നിങ്ങൾക്ക് ഇത് പിന്നീട് കാണാനാകും" "റദ്ദാക്കുക" "ഒഴിവാക്കുക" diff --git a/quickstep/res/values-mn/strings.xml b/quickstep/res/values-mn/strings.xml index 86237e18aa..48513eb928 100644 --- a/quickstep/res/values-mn/strings.xml +++ b/quickstep/res/values-mn/strings.xml @@ -78,8 +78,7 @@ "Дэлгэцийн агшин дарах" "Энэ үйлдлийг апп эсвэл танай байгууллага зөвшөөрдөггүй" "Навигацын практик хичээлийг алгасах уу?" - - + "Та үүнийг дараа нь %1$s аппаас олох боломжтой" "Цуцлах" "Алгасах" diff --git a/quickstep/res/values-ms/strings.xml b/quickstep/res/values-ms/strings.xml index 6ec7a81ea9..74b9d086e8 100644 --- a/quickstep/res/values-ms/strings.xml +++ b/quickstep/res/values-ms/strings.xml @@ -78,8 +78,7 @@ "Tangkapan skrin" "Tindakan ini tidak dibenarkan oleh apl atau organisasi anda" "Langkau tutorial navigasi?" - - + "Anda boleh mendapatkan tutorial ini kemudian dalam apl %1$s" "Batal" "Langkau" diff --git a/quickstep/res/values-my/strings.xml b/quickstep/res/values-my/strings.xml index d9c4cfbbd4..919ad6efa7 100644 --- a/quickstep/res/values-my/strings.xml +++ b/quickstep/res/values-my/strings.xml @@ -78,8 +78,7 @@ "ဖန်သားပြင်ဓာတ်ပုံ" "ဤလုပ်ဆောင်ချက်ကို အက်ပ် သို့မဟုတ် သင်၏အဖွဲ့အစည်းက ခွင့်မပြုပါ" "လမ်းညွှန်ခြင်း ရှင်းလင်းပို့ချချက်ကို ကျော်မလား။" - - + "၎င်းကို နောက်မှ %1$s အက်ပ်တွင် ရှာနိုင်သည်" "မလုပ်တော့" "ကျော်ရန်" diff --git a/quickstep/res/values-nb/strings.xml b/quickstep/res/values-nb/strings.xml index 0b3117bfb8..6e7e4a3cf7 100644 --- a/quickstep/res/values-nb/strings.xml +++ b/quickstep/res/values-nb/strings.xml @@ -78,8 +78,7 @@ "Skjermdump" "Appen eller organisasjonen din tillater ikke denne handlingen" "Vil du hoppe over navigeringsveiledning?" - - + "Du kan finne dette i %1$s-appen senere" "Avbryt" "Hopp over" diff --git a/quickstep/res/values-nl/strings.xml b/quickstep/res/values-nl/strings.xml index ecf22eb484..be9329f000 100644 --- a/quickstep/res/values-nl/strings.xml +++ b/quickstep/res/values-nl/strings.xml @@ -78,8 +78,7 @@ "Screenshot" "Deze actie wordt niet toegestaan door de app of je organisatie" "Navigatietutorial overslaan?" - - + "Je vindt dit later terug in de app %1$s" "Annuleren" "Overslaan" diff --git a/quickstep/res/values-pa/strings.xml b/quickstep/res/values-pa/strings.xml index d9fad16a56..227c060230 100644 --- a/quickstep/res/values-pa/strings.xml +++ b/quickstep/res/values-pa/strings.xml @@ -78,8 +78,7 @@ "ਸਕ੍ਰੀਨਸ਼ਾਟ" "ਐਪ ਜਾਂ ਤੁਹਾਡੀ ਸੰਸਥਾ ਵੱਲੋਂ ਇਸ ਕਾਰਵਾਈ ਦੀ ਇਜਾਜ਼ਤ ਨਹੀਂ ਹੈ" "ਕੀ ਨੈਵੀਗੇਸ਼ਨ ਟਿਊਟੋਰੀਅਲ ਨੂੰ ਛੱਡਣਾ ਹੈ?" - - + "ਤੁਸੀਂ ਇਸਨੂੰ ਬਾਅਦ ਵਿੱਚ %1$s ਐਪ ਵਿੱਚ ਲੱਭ ਸਕਦੇ ਹੋ" "ਰੱਦ ਕਰੋ" "ਛੱਡੋ" diff --git a/quickstep/res/values-pl/strings.xml b/quickstep/res/values-pl/strings.xml index 0df44efc39..61d9b9377a 100644 --- a/quickstep/res/values-pl/strings.xml +++ b/quickstep/res/values-pl/strings.xml @@ -78,8 +78,7 @@ "Zrzut ekranu" "Nie możesz wykonać tego działania, bo nie zezwala na to aplikacja lub Twoja organizacja" "Pominąć samouczek nawigacji?" - - + "Znajdziesz to później w aplikacji %1$s" "Anuluj" "Pomiń" diff --git a/quickstep/res/values-pt-rPT/strings.xml b/quickstep/res/values-pt-rPT/strings.xml index 390596c06f..bbc4ce8811 100644 --- a/quickstep/res/values-pt-rPT/strings.xml +++ b/quickstep/res/values-pt-rPT/strings.xml @@ -78,8 +78,7 @@ "Fazer captura de ecrã" "Esta ação não é permitida pela app ou a sua entidade." "Ignorar o tutorial de navegação?" - - + "Pode encontrar isto mais tarde na app %1$s" "Cancelar" "Ignorar" diff --git a/quickstep/res/values-pt/strings.xml b/quickstep/res/values-pt/strings.xml index 1252e60de8..f533bbcbc3 100644 --- a/quickstep/res/values-pt/strings.xml +++ b/quickstep/res/values-pt/strings.xml @@ -78,8 +78,7 @@ "Capturar tela" "Essa ação não é permitida pelo app ou pela organização" "Pular o tutorial de navegação?" - - + "Veja o tutorial mais tarde no app %1$s" "Cancelar" "Pular" diff --git a/quickstep/res/values-ro/strings.xml b/quickstep/res/values-ro/strings.xml index 556acb5a9f..37d2935683 100644 --- a/quickstep/res/values-ro/strings.xml +++ b/quickstep/res/values-ro/strings.xml @@ -78,8 +78,7 @@ "Captură de ecran" "Această acțiune nu este permisă de aplicație sau de organizația dvs." "Omiteți tutorialul de navigare?" - - + "Îl puteți găsi mai târziu în aplicația %1$s" "Anulați" "Omiteți" diff --git a/quickstep/res/values-ru/strings.xml b/quickstep/res/values-ru/strings.xml index 3039a9a60b..8d4c40a210 100644 --- a/quickstep/res/values-ru/strings.xml +++ b/quickstep/res/values-ru/strings.xml @@ -78,8 +78,7 @@ "Скриншот" "Это действие заблокировано приложением или организацией." "Пропустить руководство по жестам?" - - + "Его можно найти в приложении \"%1$s\"." "Отмена" "Пропустить" diff --git a/quickstep/res/values-si/strings.xml b/quickstep/res/values-si/strings.xml index 8ffb580a4e..d526e139ee 100644 --- a/quickstep/res/values-si/strings.xml +++ b/quickstep/res/values-si/strings.xml @@ -78,8 +78,7 @@ "තිර රුව" "මෙම ක්‍රියාව යෙදුම හෝ ඔබේ සංවිධානය මගින් ඉඩ නොදේ" "නිබන්ධනය සංචාලනය මඟ හරින්නද?" - - + "ඔබට මෙය පසුව %1$s යෙදුම තුළ සොයා ගත හැකිය" "අවලංගු කරන්න" "මඟ හරින්න" diff --git a/quickstep/res/values-sk/strings.xml b/quickstep/res/values-sk/strings.xml index 86d0a8e296..24a4ac974f 100644 --- a/quickstep/res/values-sk/strings.xml +++ b/quickstep/res/values-sk/strings.xml @@ -78,8 +78,7 @@ "Snímka obrazovky" "Aplikácia alebo vaša organizácia túto akciu nepovoľuje" "Chcete preskočiť návod na navigáciu?" - - + "Tento návod nájdete v aplikácii %1$s" "Zrušiť" "Preskočiť" diff --git a/quickstep/res/values-sl/strings.xml b/quickstep/res/values-sl/strings.xml index 0d1f015ef2..fdc8a6a4b4 100644 --- a/quickstep/res/values-sl/strings.xml +++ b/quickstep/res/values-sl/strings.xml @@ -78,8 +78,7 @@ "Posnetek zaslona" "Aplikacija ali vaša organizacija ne dovoljuje tega dejanja" "Želite preskočiti vadnico za krmarjenje?" - - + "To lahko pozneje najdete v aplikaciji %1$s." "Prekliči" "Preskoči" diff --git a/quickstep/res/values-sq/strings.xml b/quickstep/res/values-sq/strings.xml index b50976fedc..36e0afc371 100644 --- a/quickstep/res/values-sq/strings.xml +++ b/quickstep/res/values-sq/strings.xml @@ -78,8 +78,7 @@ "Pamja e ekranit" "Ky veprim nuk lejohet nga aplikacioni ose organizata jote" "Të kapërcehet udhëzuesi i navigimit?" - - + "Këtë mund ta gjesh më vonë tek aplikacioni %1$s" "Anulo" "Kapërce" diff --git a/quickstep/res/values-sr/strings.xml b/quickstep/res/values-sr/strings.xml index c940c15646..8a462f982d 100644 --- a/quickstep/res/values-sr/strings.xml +++ b/quickstep/res/values-sr/strings.xml @@ -78,8 +78,7 @@ "Снимак екрана" "Апликација или организација не дозвољавају ову радњу" "Желите да прескочите водич за кретање?" - - + "Можете да пронађете ово касније у апликацији %1$s" "Откажи" "Прескочи" diff --git a/quickstep/res/values-sv/strings.xml b/quickstep/res/values-sv/strings.xml index b72f10294e..bf6985030c 100644 --- a/quickstep/res/values-sv/strings.xml +++ b/quickstep/res/values-sv/strings.xml @@ -78,8 +78,7 @@ "Skärmbild" "Appen eller organisationen tillåter inte den här åtgärden" "Vill du hoppa över självstudierna?" - - + "Du kan hitta det här igen i %1$s-appen" "Avbryt" "Hoppa över" diff --git a/quickstep/res/values-ta/strings.xml b/quickstep/res/values-ta/strings.xml index 1f25cc930c..089c95de7b 100644 --- a/quickstep/res/values-ta/strings.xml +++ b/quickstep/res/values-ta/strings.xml @@ -78,8 +78,7 @@ "ஸ்கிரீன்ஷாட்" "ஆப்ஸோ உங்கள் நிறுவனமோ இந்த செயலை அனுமதிப்பதில்லை" "வழிகாட்டுதல் பயிற்சியைத் தவிர்க்கவா?" - - + "%1$s ஆப்ஸில் பிறகு இதைக் கண்டறியலாம்" "ரத்துசெய்" "தவிர்" diff --git a/quickstep/res/values-th/strings.xml b/quickstep/res/values-th/strings.xml index 8ca076f57e..d7061089f2 100644 --- a/quickstep/res/values-th/strings.xml +++ b/quickstep/res/values-th/strings.xml @@ -78,8 +78,7 @@ "ภาพหน้าจอ" "แอปหรือองค์กรของคุณไม่อนุญาตการดำเนินการนี้" "ข้ามบทแนะนำการนำทางไหม" - - + "คุณดูบทแนะนำนี้ได้ภายหลังในแอป %1$s" "ยกเลิก" "ข้าม" diff --git a/quickstep/res/values-tl/strings.xml b/quickstep/res/values-tl/strings.xml index be9dc95338..5056481ccf 100644 --- a/quickstep/res/values-tl/strings.xml +++ b/quickstep/res/values-tl/strings.xml @@ -78,8 +78,7 @@ "Screenshot" "Hindi pinapayagan ng app o ng iyong organisasyon ang pagkilos na ito" "Laktawan ang tutorial sa pag-navigate?" - - + "Makikita mo ito sa %1$s app sa ibang pagkakataon" "Kanselahin" "Laktawan" diff --git a/quickstep/res/values-tr/strings.xml b/quickstep/res/values-tr/strings.xml index 7df01363a8..a22247b2de 100644 --- a/quickstep/res/values-tr/strings.xml +++ b/quickstep/res/values-tr/strings.xml @@ -78,8 +78,7 @@ "Ekran görüntüsü" "Uygulamanız veya kuruluşunuz bu işleme izin vermiyor" "Gezinme eğitici içeriği atlansın mı?" - - + "Bunu daha sonra %1$s uygulamasında bulabilirsiniz" "İptal" "Atla" diff --git a/quickstep/res/values-uk/strings.xml b/quickstep/res/values-uk/strings.xml index 6c11d95179..c63cec4c0a 100644 --- a/quickstep/res/values-uk/strings.xml +++ b/quickstep/res/values-uk/strings.xml @@ -78,8 +78,7 @@ "Знімок екрана" "Ця дія заборонена додатком або адміністратором організації" "Пропустити посібник із навігації?" - - + "Ви знайдете його пізніше в додатку %1$s" "Скасувати" "Пропустити" diff --git a/quickstep/res/values-vi/strings.xml b/quickstep/res/values-vi/strings.xml index 215125c6a6..fc3ef3ffff 100644 --- a/quickstep/res/values-vi/strings.xml +++ b/quickstep/res/values-vi/strings.xml @@ -78,8 +78,7 @@ "Chụp ảnh màn hình" "Ứng dụng hoặc tổ chức của bạn không cho phép thực hiện hành động này" "Bỏ qua phần hướng dẫn thao tác?" - - + "Bạn có thể tìm lại phần hướng dẫn này trong ứng dụng %1$s" "Hủy" "Bỏ qua" diff --git a/quickstep/res/values-zh-rCN/strings.xml b/quickstep/res/values-zh-rCN/strings.xml index 22d8393e32..9d39100128 100644 --- a/quickstep/res/values-zh-rCN/strings.xml +++ b/quickstep/res/values-zh-rCN/strings.xml @@ -78,8 +78,7 @@ "屏幕截图" "该应用或您所在的单位不允许执行此操作" "要跳过导航教程吗?" - - + "您之后可以在“%1$s”应用中找到此教程" "取消" "跳过" diff --git a/quickstep/res/values-zh-rHK/strings.xml b/quickstep/res/values-zh-rHK/strings.xml index b6efec28ef..5522a67f05 100644 --- a/quickstep/res/values-zh-rHK/strings.xml +++ b/quickstep/res/values-zh-rHK/strings.xml @@ -78,8 +78,7 @@ "螢幕截圖" "應用程式或您的機構不允許此操作" "要略過手勢操作教學課程嗎?" - - + "您之後可以在「%1$s」應用程式找到這些說明" "取消" "略過" diff --git a/quickstep/res/values-zh-rTW/strings.xml b/quickstep/res/values-zh-rTW/strings.xml index 410e70a67d..20af2b4f88 100644 --- a/quickstep/res/values-zh-rTW/strings.xml +++ b/quickstep/res/values-zh-rTW/strings.xml @@ -78,8 +78,7 @@ "擷取螢幕畫面" "這個應用程式或貴機構不允許執行這個動作" "要略過手勢操作教學課程嗎?" - - + "你之後可以在「%1$s」應用程式找到這些說明" "取消" "略過" diff --git a/quickstep/res/values-zu/strings.xml b/quickstep/res/values-zu/strings.xml index 4df1a45220..a118f1d773 100644 --- a/quickstep/res/values-zu/strings.xml +++ b/quickstep/res/values-zu/strings.xml @@ -78,8 +78,7 @@ "Isithombe-skrini" "Lesi senzo asivunyelwanga uhlelo lokusebenza noma inhlangano yakho" "Yeqa isifundo sokuzulazula?" - - + "Lokhu ungakuthola kamuva ku-app ye-%1$s" "Khansela" "Yeqa" diff --git a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java index b72cf394c5..009ca27603 100644 --- a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +++ b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java @@ -110,7 +110,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener private static final String TAG = "QuickstepTransition"; private static final boolean ENABLE_SHELL_STARTING_SURFACE = - SystemProperties.getBoolean("persist.debug.shell_starting_surface", true); + SystemProperties.getBoolean("persist.debug.shell_starting_surface", false); /** Duration of status bar animations. */ public static final int STATUS_BAR_TRANSITION_DURATION = 120; diff --git a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TwoButtonNavbarTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TwoButtonNavbarTouchController.java index c4263290f7..b0d0b1528c 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TwoButtonNavbarTouchController.java +++ b/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/TwoButtonNavbarTouchController.java @@ -98,23 +98,35 @@ public class TwoButtonNavbarTouchController extends AbstractStateChangeTouchCont return mLauncher.isInState(NORMAL); } + @Override + public boolean onControllerInterceptTouchEvent(MotionEvent ev) { + boolean intercept = super.onControllerInterceptTouchEvent(ev); + if (TestProtocol.sDebugTracing) { + Log.d(TestProtocol.TWO_BUTTON_NORMAL_NOT_OVERVIEW, + "2 button touch controller intercept touch? " + intercept); + } + return intercept; + } + @Override protected LauncherState getTargetState(LauncherState fromState, boolean isDragTowardPositive) { - final LauncherState targetState; if (mIsTransposed) { boolean draggingFromNav = mLauncher.getDeviceProfile().isSeascape() == isDragTowardPositive; - targetState = draggingFromNav ? HINT_STATE_TWO_BUTTON : NORMAL; + return draggingFromNav ? HINT_STATE_TWO_BUTTON : NORMAL; } else { LauncherState startState = mStartState != null ? mStartState : fromState; - targetState = isDragTowardPositive ^ (startState == OVERVIEW) - ? HINT_STATE_TWO_BUTTON : NORMAL; + return isDragTowardPositive ^ (startState == OVERVIEW) ? HINT_STATE_TWO_BUTTON : NORMAL; } + } + + @Override + protected void onReinitToState(LauncherState newToState) { + super.onReinitToState(newToState); if (TestProtocol.sDebugTracing) { - Log.d(TestProtocol.TWO_BUTTON_NORMAL_NOT_OVERVIEW, "Target state: " + targetState); + Log.d(TestProtocol.TWO_BUTTON_NORMAL_NOT_OVERVIEW, "onReinitToState: " + newToState); } - return targetState; } @Override @@ -163,6 +175,9 @@ public class TwoButtonNavbarTouchController extends AbstractStateChangeTouchCont @Override protected void onSwipeInteractionCompleted(LauncherState targetState) { super.onSwipeInteractionCompleted(targetState); + if (TestProtocol.sDebugTracing) { + Log.d(TestProtocol.TWO_BUTTON_NORMAL_NOT_OVERVIEW, "Reached state: " + targetState); + } if (!mIsTransposed) { mContinuousTouchCount++; } diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 0eb23920f8..4918036abc 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -1165,24 +1165,26 @@ public abstract class RecentsView LauncherState.OVERVIEW)); + Log.d(TestProtocol.LAUNCHER_NOT_TRANSPOSED, "testSwitchToOverview finished"); } @Test diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml index a742f2f44d..a7f99087a2 100644 --- a/res/values-cs/strings.xml +++ b/res/values-cs/strings.xml @@ -116,7 +116,7 @@ "Změnit nastavení" "Zobrazovat puntíky s oznámením" "Přidat na plochu ikony aplikací" - "Pro nové aplikace" + "U nových aplikací" "Neznámé" "Odstranit" "Hledat" diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index 63e5192067..77ddc86a8d 100644 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -26,47 +26,39 @@ "Heruntergeladene App im abgesicherten Modus deaktiviert" "Widgets im abgesicherten Modus deaktiviert" "Verknüpfung nicht verfügbar" - - - - - - - - + "Startbildschirm" + "Splitscreen" + "Tippen und halten, um ein Widget zu bewegen." + "Doppeltippen und halten, um ein Widget zu bewegen oder benutzerdefinierte Aktionen zu nutzen." "%1$d × %2$d" "%1$d breit und %2$d hoch" "Zum manuellen Hinzufügen gedrückt halten" "Automatisch hinzufügen" - - - - + + %1$d Widgets + %1$d Widget + + + %1$d Verknüpfungen + %1$d Verknüpfung + + "%1$s, %2$s" "Widgets" - - - - - - - - - - - - - - + "Suche" + "Text aus dem Suchfeld löschen" + "Keine Widgets verfügbar" + "Keine Suchergebnisse" + "Privat" + "Geschäftlich" + "Unterhaltungen" "Apps finden" "Apps werden geladen…" "Keine Apps für \"%1$s\" gefunden" "Weitere Apps suchen" "App" "Benachrichtigungen" - - - - + "Tippen und halten, um eine Verknüpfung zu bewegen." + "Doppeltippen und halten, um eine Verknüpfung zu bewegen oder benutzerdefinierte Aktionen zu nutzen." "Auf diesem Startbildschirm ist kein Platz mehr vorhanden." "Ablage \"Favoriten\" ist voll." "Liste der Apps" @@ -108,7 +100,7 @@ "Designs und Hintergründe" "Startbildschirm-Einstellungen" "Von deinem Administrator deaktiviert" - "Drehung des Startbildschirms zulassen" + "Drehen des Startbildschirms zulassen" "Beim Drehen des Smartphones" "App-Benachrichtigungspunkte" "An" @@ -124,8 +116,7 @@ "Suchen" "Diese App ist nicht installiert" "Die App für dieses Symbol ist nicht installiert. Du kannst das Symbol entfernen oder die App lokalisieren und dann manuell installieren." - - + "%1$s wird installiert, %2$s abgeschlossen" "%1$s wird heruntergeladen, %2$s abgeschlossen" "Warten auf Installation von %1$s" "Widgetliste" @@ -165,20 +156,13 @@ "Weiter" "OK" "Arbeitsprofil pausiert" - - - - - - - - - - - - - - + "Geschäftliche Apps können dir keine Benachrichtigungen senden, deinen Akku nicht nutzen und nicht auf deinen Standort zugreifen" + "Das Arbeitsprofil ist pausiert. Geschäftliche Apps können dir keine Benachrichtigungen senden, deinen Akku nicht nutzen und nicht auf deinen Standort zugreifen." + "Geschäftliche Apps sind gekennzeichnet und für deinen IT-Administrator sichtbar" + "OK" + "Geschäftliche Apps pausieren" + "Aktivieren" + "Filter" "Geschäftliche Apps und Benachrichtigungen pausieren" "Fehler: %1$s" diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml index 3cd084bc8d..8b9ab0cb5c 100644 --- a/res/values-es/strings.xml +++ b/res/values-es/strings.xml @@ -110,7 +110,7 @@ "Cambiar ajustes" "Mostrar puntos de notificación" "Añadir aplicaciones a la pantalla de inicio" - "Para aplicaciones nuevas" + "Añade el icono de una aplicación nueva instalada a la pantalla de inicio" "Desconocido" "Quitar" "Buscar" diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml index fe12e37e94..f336031a31 100644 --- a/res/values-fr/strings.xml +++ b/res/values-fr/strings.xml @@ -20,7 +20,7 @@ "Launcher3" - "Travail" + "Pro" "L\'application n\'est pas installée." "Application indisponible" "L\'application téléchargée est désactivée en mode sécurisé." @@ -98,7 +98,7 @@ "Dossier : %1$s, %2$d éléments ou plus" "Fonds d\'écran" "Styles et fonds d\'écran" - "Paramètres d\'accueil" + "Paramètres de l\'accueil" "Désactivé par votre administrateur" "Autoriser la rotation de l\'écran d\'accueil" "Lorsque vous faites pivoter le téléphone" diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml index 1bdbbcb74e..478d87ea35 100644 --- a/res/values-hi/strings.xml +++ b/res/values-hi/strings.xml @@ -124,7 +124,7 @@ "होम स्‍क्रीन में जोड़ें" "आइटम यहां ले जाएं" "होम स्क्रीन में आइटम जोड़ा गया" - "आइटम निकाला गया" + "आइटम हटाया गया" "पहले जैसा करें" "आइटम ले जाएं" "पंक्ति %1$s स्तंभ %2$s पर ले जाएं" diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml index 7589ea87bb..8ebc33ff47 100644 --- a/res/values-hr/strings.xml +++ b/res/values-hr/strings.xml @@ -68,7 +68,7 @@ "Popis radnih aplikacija" "Ukloni" "Deinstaliraj" - "Info o aplikaciji" + "Podaci o aplikaciji" "Instaliraj" "Ne predlaži aplikaciju" "Prikvači predviđenu apl." diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml index 7857feff3e..9e135763ae 100644 --- a/res/values-it/strings.xml +++ b/res/values-it/strings.xml @@ -98,7 +98,7 @@ "Cartella: %1$s, %2$d o più elementi" "Sfondi" "Stili e sfondi" - "Impostazioni Home" + "Impostazioni schermata Home" "Disattivata dall\'amministratore" "Consenti rotazione della schermata Home" "Con il telefono ruotato" @@ -109,7 +109,7 @@ "Per mostrare gli indicatori di notifica, attiva le notifiche per l\'app %1$s" "Modifica impostazioni" "Mostra indicatori di notifica" - "Aggiungi icone app a schermata Home" + "Aggiungi icone delle app alla schermata Home" "Per le nuove app" "Sconosciuto" "Rimuovi" diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml index 9636353be6..639aa86c3a 100644 --- a/res/values-iw/strings.xml +++ b/res/values-iw/strings.xml @@ -56,9 +56,9 @@ "עבודה" "שיחות" "חיפוש אפליקציות" - "טוען אפליקציות…" + "טעינת אפליקציות מתבצעת…" "לא נמצאו אפליקציות התואמות ל-\"%1$s\"" - "חפש אפליקציות נוספות" + "חיפוש אפליקציות נוספות" "אפליקציה" "התראות" "כדי להעביר קיצור דרך למקום אחר יש לגעת ולא להרפות." @@ -68,17 +68,17 @@ "רשימת אפליקציות" "רשימת אפליקציות אישיות" "רשימת אפליקציות עבודה" - "הסר" + "הסרה" "להסרת התקנה" "פרטי אפליקציה" "התקנה" "בלי להציע את האפליקציה" "הצמדת החיזוי" - "התקן קיצורי דרך" + "התקנת קיצורי דרך" "מאפשר לאפליקציה להוסיף קיצורי דרך ללא התערבות המשתמש." - "קרא הגדרות וקיצורי דרך של דף הבית" + "קריאת הגדרות וקיצורי דרך של דף הבית" "מאפשר לאפליקציה לקרוא את ההגדרות וקיצורי הדרך בדף הבית." - "כתוב הגדרות וקיצורי דרך של דף הבית" + "כתיבת הגדרות וקיצורי דרך של דף הבית" "מאפשר לאפליקציה לשנות את ההגדרות וקיצורי הדרך בדף הבית." "%1$s אינו רשאי להתקשר" "בעיה בטעינת ווידג\'ט" @@ -95,59 +95,59 @@ "‏דף %1$d מתוך %2$d" "‏מסך דף הבית %1$d מתוך %2$d" "מסך דף הבית חדש" - "תיקיה פתוחה, %1$d על %2$d" - "הקש כדי לסגור את התיקייה" - "הקש כדי לשמור שינוי שם" - "התיקיה נסגרה" - "שם התיקיה שונה ל-%1$s" + "תיקייה פתוחה, %1$d על %2$d" + "יש להקיש כדי לסגור את התיקייה" + "יש להקיש כדי לשמור שינוי שם" + "התיקייה נסגרה" + "שם התיקייה שונה ל-%1$s" "תיקייה: %1$s, מספר הפריטים: %2$d" "תיקייה: %1$s, %2$d פריטים או יותר" "טפטים" "סגנונות וטפטים" - "הגדרות דף הבית" + "הגדרות של מסך הבית" "הושבת על ידי מנהל המערכת שלך" - "אפשרות סיבוב של מסך דף הבית" + "סיבוב של מסך הבית" "כאשר הטלפון מסובב" "סימני ההתראות" "מופעל" "כבוי" "נדרשת גישה להתראות" "כדי להציג את סימני ההתראות,יש להפעיל התראות מהאפליקציה %1$s" - "שנה את ההגדרות" + "שינוי ההגדרות" "הצגת סימני ההתראות" "הוספת סמלי אפליקציות למסך הבית" "לאפליקציות חדשות" "לא ידוע" - "הסר" + "הסרה" "חיפוש" "אפליקציה זו אינה מותקנת" "האפליקציה של סמל זה אינה מותקנת. ניתן להסיר אותו, או לחפש את האפליקציה ולהתקין אותה ידנית." "%1$s בתהליך התקנה, %2$s הושלמו" - "מוריד את %1$s, %2$s הושלמו" + "הורדת %1$s מתבצעת, %2$s הושלמו" "מחכה להתקנה של %1$s" "רשימת ווידג\'טים" "רשימת הווידג\'טים נסגרה" "הוספה למסך דף הבית" - "העבר את הפריט לכאן" + "העברת הפריט לכאן" "הפריט הועבר אל מסך דף הבית" "הפריט הוסר" "ביטול" - "העבר את הפריט" - "העבר אל שורה %1$s עמודה %2$s" - "העבר אל מיקום %1$s" - "העבר אל מיקום %1$s במועדפים" + "העברת הפריט" + "העברה אל שורה %1$s עמודה %2$s" + "העברה אל מיקום %1$s" + "העברה אל מיקום %1$s במועדפים" "הפריט הועבר" - "הוסף לתיקייה: %1$s" - "העבר אל התיקייה עם %1$s" + "הוספה לתיקייה: %1$s" + "הוספה לתיקייה עם %1$s" "הפריט נוסף לתיקייה" - "צור תיקייה עם: %1$s" + "יצירת תיקייה עם: %1$s" "התיקייה נוצרה" "העבר אל מסך דף הבית" - "שנה גודל" - "הגדל רוחב" - "הגדל גובה" - "הקטן רוחב" - "הקטן גובה" + "שינוי גודל" + "הגדלת רוחב" + "הגדלת גובה" + "הקטנת רוחב" + "הקטנת גובה" "גודל הווידג\'ט שונה - רוחב %1$s גובה %2$s" "קיצורי דרך" "קיצורי דרך והתראות" diff --git a/res/values-ky/strings.xml b/res/values-ky/strings.xml index 7606ca10e2..50c36d58c9 100644 --- a/res/values-ky/strings.xml +++ b/res/values-ky/strings.xml @@ -50,7 +50,7 @@ "Издөө жыйынтыктары жок" "Жеке" "Жумуш" - "Жазышуулар" + "Сүйлөшүүлөр" "Колдонмолорду издөө" "Колдонмолор жүктөлүүдө…" "\"%1$s\" сурамына дал келген колдонмолор табылган жок" @@ -100,8 +100,8 @@ "Стилдер жана тушкагаздар" "Башкы бет жөндөөлөрү" "Администраторуңуз өчүрүп койгон" - "Башкы экранды айлантууга уруксат берүү" - "Телефон айланганда" + "Башкы экранды бурууга уруксат берүү" + "Телефон бурулганда" "Билдирмелер белгилери" "Күйүк" "Өчүк" diff --git a/res/values-mr/strings.xml b/res/values-mr/strings.xml index 8ae7bdfa0d..7fc330eb61 100644 --- a/res/values-mr/strings.xml +++ b/res/values-mr/strings.xml @@ -110,7 +110,7 @@ "सेटिंग्ज बदला" "सूचना बिंदू दाखवा" "होम स्क्रीनवर ॲप आयकन जोडा" - "नवीन ॲप्ससाठी" + "नवीन अ‍ॅप्ससाठी" "अज्ञात" "काढा" "Search" diff --git a/res/values-my/strings.xml b/res/values-my/strings.xml index c7960a663a..b42960204b 100644 --- a/res/values-my/strings.xml +++ b/res/values-my/strings.xml @@ -103,13 +103,13 @@ "ပင်မစာမျက်နှာလှည့်ခြင်းကို ခွင့်ပြုပါ" "ဖုန်းကိုလှည့်ထားစဉ်" "သတိပေးချက် အစက်များ" - "ဖွင့်ထားသည်" - "ပိတ်ထားသည်" + "ဖွင့်" + "ပိတ်" "အကြောင်းကြားချက် အသုံးပြုခွင့် လိုအပ်သည်" "အကြောင်းကြားချက် အစက်များကို ပြသရန် %1$s အတွက် အက်ပ်အကြောင်းကြားချက်များကို ဖွင့်ပါ" "ဆက်တင်များ ပြောင်းရန်" - "သတိပေးချက် အစက်များ ပြရန်" - "\'ပင်မစာမျက်နှာ\' တွင် အက်ပ်သင်္ကေတထည့်ရန်" + "အကြောင်းကြားချက် အစက်များ ပြရန်" + "ပင်မစာမျက်နှာတွင် အက်ပ်သင်္ကေတထည့်ရန်" "အက်ပ်အသစ်များအတွက်" "မသိ" "ဖယ်ရှားရန်" diff --git a/res/values/dimens.xml b/res/values/dimens.xml index a06b42cf56..8a160bd103 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -84,7 +84,7 @@ -26dp - 96dp + 300dp 48dp 30dp 40dp diff --git a/src/com/android/launcher3/ButtonDropTarget.java b/src/com/android/launcher3/ButtonDropTarget.java index 4740079f9d..7926862bd2 100644 --- a/src/com/android/launcher3/ButtonDropTarget.java +++ b/src/com/android/launcher3/ButtonDropTarget.java @@ -183,7 +183,6 @@ public abstract class ButtonDropTarget extends TextView hideTooltip(); if (!d.dragComplete) { - d.dragView.setColor(0); d.dragView.setAlpha(1f); } else { d.dragView.setAlpha(DRAG_VIEW_HOVER_OVER_OPACITY); diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java index bb83802d2a..c3816ccf0c 100644 --- a/src/com/android/launcher3/CellLayout.java +++ b/src/com/android/launcher3/CellLayout.java @@ -61,7 +61,6 @@ import com.android.launcher3.LauncherSettings.Favorites; import com.android.launcher3.accessibility.DragAndDropAccessibilityDelegate; import com.android.launcher3.anim.Interpolators; import com.android.launcher3.config.FeatureFlags; -import com.android.launcher3.dragndrop.AppWidgetHostViewDrawable; import com.android.launcher3.folder.PreviewBackground; import com.android.launcher3.model.data.ItemInfo; import com.android.launcher3.util.CellAndSpan; @@ -70,6 +69,7 @@ import com.android.launcher3.util.ParcelableSparseArray; import com.android.launcher3.util.Themes; import com.android.launcher3.util.Thunk; import com.android.launcher3.views.ActivityContext; +import com.android.launcher3.widget.LauncherAppWidgetHostView; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -1065,15 +1065,14 @@ public class CellLayout extends ViewGroup { private void applyColorExtractionOnWidget(DropTarget.DragObject dragObject, int[] targetCell, int spanX, int spanY) { // Apply local extracted color if the DragView is an AppWidgetHostViewDrawable. - Drawable drawable = dragObject.dragView.getDrawable(); - if (drawable instanceof AppWidgetHostViewDrawable) { + View view = dragObject.dragView.getContentView(); + if (view instanceof LauncherAppWidgetHostView) { Workspace workspace = Launcher.getLauncher(dragObject.dragView.getContext()).getWorkspace(); int screenId = workspace.getIdForScreen(this); int pageId = workspace.getPageIndexForScreenId(screenId); - AppWidgetHostViewDrawable hostViewDrawable = ((AppWidgetHostViewDrawable) drawable); cellToRect(targetCell[0], targetCell[1], spanX, spanY, mTempRect); - hostViewDrawable.getAppWidgetHostView().handleDrag(mTempRect, pageId); + ((LauncherAppWidgetHostView) view).handleDrag(mTempRect, pageId); } } diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index 985a445f81..dae4f3b8dd 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -25,6 +25,7 @@ import android.content.res.Resources; import android.graphics.Point; import android.graphics.PointF; import android.graphics.Rect; +import android.util.Log; import android.view.Surface; import android.view.WindowInsets; import android.view.WindowManager; @@ -35,6 +36,7 @@ import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.graphics.IconShape; import com.android.launcher3.icons.DotRenderer; import com.android.launcher3.icons.IconNormalizer; +import com.android.launcher3.testing.TestProtocol; import com.android.launcher3.util.DisplayController; import com.android.launcher3.util.DisplayController.Info; import com.android.launcher3.util.WindowBounds; @@ -973,6 +975,10 @@ public class DeviceProfile { mInfo = info; mTransposeLayoutWithOrientation = context.getResources() .getBoolean(R.bool.hotseat_transpose_layout_with_orientation); + if (TestProtocol.sDebugTracing) { + Log.d(TestProtocol.LAUNCHER_NOT_TRANSPOSED, + "transposeLayout=" + mTransposeLayoutWithOrientation); + } } public Builder setSizeRange(Point minSize, Point maxSize) { @@ -985,6 +991,10 @@ public class DeviceProfile { mWidth = width; mHeight = height; mIsLandscape = mWidth > mHeight; + if (TestProtocol.sDebugTracing) { + Log.d(TestProtocol.LAUNCHER_NOT_TRANSPOSED, + "isLandscape=" + mIsLandscape + " w=" + mWidth + " h=" + mHeight); + } return this; } diff --git a/src/com/android/launcher3/InvariantDeviceProfile.java b/src/com/android/launcher3/InvariantDeviceProfile.java index f19877793b..a863e6b55c 100644 --- a/src/com/android/launcher3/InvariantDeviceProfile.java +++ b/src/com/android/launcher3/InvariantDeviceProfile.java @@ -48,6 +48,7 @@ import androidx.annotation.Nullable; import androidx.annotation.VisibleForTesting; import com.android.launcher3.graphics.IconShape; +import com.android.launcher3.testing.TestProtocol; import com.android.launcher3.util.ConfigMonitor; import com.android.launcher3.util.DisplayController; import com.android.launcher3.util.DisplayController.Info; @@ -338,6 +339,10 @@ public class InvariantDeviceProfile { DeviceProfile.Builder builder = new DeviceProfile.Builder(context, this, displayInfo) .setSizeRange(new Point(displayInfo.smallestSize), new Point(displayInfo.largestSize)); + if (TestProtocol.sDebugTracing) { + Log.d(TestProtocol.LAUNCHER_NOT_TRANSPOSED, + "largeSide=" + largeSide + " smallSide=" + smallSide); + } landscapeProfile = builder.setSize(largeSide, smallSide).build(); portraitProfile = builder.setSize(smallSide, largeSide).build(); @@ -571,6 +576,10 @@ public class InvariantDeviceProfile { } public DeviceProfile getDeviceProfile(Context context) { + if (TestProtocol.sDebugTracing) { + Log.d(TestProtocol.LAUNCHER_NOT_TRANSPOSED, "getDeviceProfile: orientation=" + + context.getResources().getConfiguration().orientation, new Throwable()); + } return context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE ? landscapeProfile : portraitProfile; } diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 3236f5d542..30dd5481d2 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -566,7 +566,9 @@ public class Launcher extends StatefulActivity implements Launche } private void onIdpChanged(InvariantDeviceProfile idp) { - + if (TestProtocol.sDebugTracing) { + Log.d(TestProtocol.LAUNCHER_NOT_TRANSPOSED, "onIdpChanged", new Throwable()); + } initDeviceProfile(idp); dispatchDeviceProfileChanged(); reapplyUi(); diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java index 1776777934..6f12ec784f 100644 --- a/src/com/android/launcher3/Utilities.java +++ b/src/com/android/launcher3/Utilities.java @@ -600,7 +600,7 @@ public final class Utilities { LauncherActivityInfo activityInfo = launcher.getSystemService(LauncherApps.class) .resolveActivity(info.getIntent(), info.user); outObj[0] = activityInfo; - return activityInfo == null ? null : new IconProvider(launcher).getIconForUI( + return activityInfo == null ? null : new IconProvider(launcher).getIcon( activityInfo, launcher.getDeviceProfile().inv.fillResIconDpi); } else if (info.itemType == LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT) { if (info instanceof PendingAddShortcutInfo) { diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index c9e575d4a4..10091a18b8 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -69,7 +69,6 @@ import com.android.launcher3.anim.Interpolators; import com.android.launcher3.anim.PendingAnimation; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.dot.FolderDotInfo; -import com.android.launcher3.dragndrop.AppWidgetHostViewDrawable; import com.android.launcher3.dragndrop.DragController; import com.android.launcher3.dragndrop.DragLayer; import com.android.launcher3.dragndrop.DragOptions; @@ -414,7 +413,9 @@ public class Workspace extends PagedView } if (mDragInfo != null && mDragInfo.cell != null) { - CellLayout layout = (CellLayout) mDragInfo.cell.getParent().getParent(); + CellLayout layout = (CellLayout) (mDragInfo.cell instanceof LauncherAppWidgetHostView + ? dragObject.dragView.getContentViewParent().getParent() + : mDragInfo.cell.getParent().getParent()); layout.markCellsAsUnoccupiedForView(mDragInfo.cell); } @@ -1527,10 +1528,19 @@ public class Workspace extends PagedView draggableView = (DraggableView) child; } + final View contentView = previewProvider.getContentView(); + final float scale; // The draggable drawable follows the touch point around on the screen - final Drawable drawable = previewProvider.createDrawable(); + final Drawable drawable; + if (contentView == null) { + drawable = previewProvider.createDrawable(); + scale = previewProvider.getScaleAndPosition(drawable, mTempXY); + } else { + drawable = null; + scale = previewProvider.getScaleAndPosition(contentView, mTempXY); + } + int halfPadding = previewProvider.previewPadding / 2; - float scale = previewProvider.getScaleAndPosition(drawable, mTempXY); int dragLayerX = mTempXY[0]; int dragLayerY = mTempXY[1]; @@ -1556,22 +1566,37 @@ public class Workspace extends PagedView } } - if (drawable instanceof AppWidgetHostViewDrawable) { - mDragController.addDragListener(new AppWidgetHostViewDragListener(mLauncher)); + final DragView dv; + if (contentView instanceof View) { + if (contentView instanceof LauncherAppWidgetHostView) { + mDragController.addDragListener(new AppWidgetHostViewDragListener(mLauncher)); + } + dv = mDragController.startDrag( + contentView, + draggableView, + dragLayerX, + dragLayerY, + source, + dragObject, + dragVisualizeOffset, + dragRect, + scale * iconScale, + scale, + dragOptions); + } else { + dv = mDragController.startDrag( + drawable, + draggableView, + dragLayerX, + dragLayerY, + source, + dragObject, + dragVisualizeOffset, + dragRect, + scale * iconScale, + scale, + dragOptions); } - DragView dv = mDragController.startDrag( - drawable, - draggableView, - dragLayerX, - dragLayerY, - source, - dragObject, - dragVisualizeOffset, - dragRect, - scale * iconScale, - scale, - dragOptions); - dv.setIntrinsicIconScaleFactor(dragOptions.intrinsicIconScaleFactor); return dv; } @@ -1901,6 +1926,8 @@ public class Workspace extends PagedView CellLayout parentCell = getParentCellLayoutForView(cell); if (parentCell != null) { parentCell.removeView(cell); + } else if (mDragInfo.cell instanceof LauncherAppWidgetHostView) { + d.dragView.detachContentView(/* reattachToPreviousParent= */ false); } else if (FeatureFlags.IS_STUDIO_BUILD) { throw new NullPointerException("mDragInfo.cell has null parent"); } @@ -1939,6 +1966,9 @@ public class Workspace extends PagedView if (!returnToOriginalCellToPreventShuffling) { onNoCellFound(dropTargetLayout); } + if (mDragInfo.cell instanceof LauncherAppWidgetHostView) { + d.dragView.detachContentView(/* reattachToPreviousParent= */ true); + } // If we can't find a drop location, we return the item to its original position CellLayout.LayoutParams lp = (CellLayout.LayoutParams) cell.getLayoutParams(); @@ -2637,10 +2667,6 @@ public class Workspace extends PagedView } private Drawable createWidgetDrawable(ItemInfo widgetInfo, View layout) { - if (layout instanceof LauncherAppWidgetHostView) { - return new AppWidgetHostViewDrawable((LauncherAppWidgetHostView) layout); - } - int[] unScaledSize = estimateItemSize(widgetInfo); int visibility = layout.getVisibility(); layout.setVisibility(VISIBLE); @@ -2721,10 +2747,11 @@ public class Workspace extends PagedView boolean isWidget = info.itemType == LauncherSettings.Favorites.ITEM_TYPE_APPWIDGET || info.itemType == LauncherSettings.Favorites.ITEM_TYPE_CUSTOM_APPWIDGET; - if ((animationType == ANIMATE_INTO_POSITION_AND_RESIZE || external) && finalView != null) { + if ((animationType == ANIMATE_INTO_POSITION_AND_RESIZE || external) + && finalView != null + && dragView.getContentView() != finalView) { Drawable crossFadeDrawable = createWidgetDrawable(info, finalView); - dragView.setCrossFadeDrawable(crossFadeDrawable); - dragView.crossFade((int) (duration * 0.8f)); + dragView.crossFadeContent(crossFadeDrawable, (int) (duration * 0.8f)); } else if (isWidget && external) { scaleXY[0] = scaleXY[1] = Math.min(scaleXY[0], scaleXY[1]); } diff --git a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java index 66575eb289..b1c764c1d1 100644 --- a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java +++ b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java @@ -51,7 +51,7 @@ import java.util.List; */ public class AllAppsRecyclerView extends BaseRecyclerView { private static final String TAG = "AllAppsContainerView"; - private static final boolean DEBUG = true; + private static final boolean DEBUG = false; private AlphabeticalAppsList mApps; private final int mNumAppsPerRow; diff --git a/src/com/android/launcher3/allapps/AllAppsTransitionController.java b/src/com/android/launcher3/allapps/AllAppsTransitionController.java index 0060b83673..c61c0d6d53 100644 --- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java +++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java @@ -197,7 +197,7 @@ public class AllAppsTransitionController /** * Updates the total scroll range but does not update the UI. */ - void setScrollRangeDelta(float delta) { + public void setScrollRangeDelta(float delta) { mScrollRangeDelta = delta; mShiftRange = mLauncher.getDeviceProfile().heightPx - mScrollRangeDelta; } diff --git a/src/com/android/launcher3/dragndrop/AppWidgetHostViewDrawable.java b/src/com/android/launcher3/dragndrop/AppWidgetHostViewDrawable.java deleted file mode 100644 index 2135f5dff9..0000000000 --- a/src/com/android/launcher3/dragndrop/AppWidgetHostViewDrawable.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (C) 2021 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.launcher3.dragndrop; - -import android.graphics.Canvas; -import android.graphics.ColorFilter; -import android.graphics.Paint; -import android.graphics.PixelFormat; -import android.graphics.drawable.Drawable; - -import com.android.launcher3.widget.LauncherAppWidgetHostView; - -/** - * A drawable which renders {@link LauncherAppWidgetHostView} to a canvas. - * - * TODO(b/183609936) Stop using that class and remove it. - */ -public final class AppWidgetHostViewDrawable extends Drawable { - - private final LauncherAppWidgetHostView mAppWidgetHostView; - private Paint mPaint = new Paint(); - - public AppWidgetHostViewDrawable(LauncherAppWidgetHostView appWidgetHostView) { - mAppWidgetHostView = appWidgetHostView; - } - - @Override - public void draw(Canvas canvas) { - int saveCount = canvas.saveLayer(0, 0, getIntrinsicWidth(), getIntrinsicHeight(), mPaint); - mAppWidgetHostView.draw(canvas); - canvas.restoreToCount(saveCount); - } - - @Override - public int getIntrinsicWidth() { - return mAppWidgetHostView.getMeasuredWidth(); - } - - @Override - public int getIntrinsicHeight() { - return mAppWidgetHostView.getMeasuredHeight(); - } - - @Override - public int getOpacity() { - // This is up to app widget provider. We don't know if the host view will cover anything - // behind the drawable. - return PixelFormat.UNKNOWN; - } - - @Override - public void setAlpha(int alpha) { - mPaint.setAlpha(alpha); - } - - @Override - public int getAlpha() { - return mPaint.getAlpha(); - } - - @Override - public void setColorFilter(ColorFilter colorFilter) { - mPaint.setColorFilter(colorFilter); - } - - @Override - public ColorFilter getColorFilter() { - return mPaint.getColorFilter(); - } - - /** Returns the {@link LauncherAppWidgetHostView}. */ - public LauncherAppWidgetHostView getAppWidgetHostView() { - return mAppWidgetHostView; - } -} diff --git a/src/com/android/launcher3/dragndrop/BaseItemDragListener.java b/src/com/android/launcher3/dragndrop/BaseItemDragListener.java index 707fd06519..981e3a65a4 100644 --- a/src/com/android/launcher3/dragndrop/BaseItemDragListener.java +++ b/src/com/android/launcher3/dragndrop/BaseItemDragListener.java @@ -34,7 +34,6 @@ import com.android.launcher3.AbstractFloatingView; import com.android.launcher3.DragSource; import com.android.launcher3.DropTarget.DragObject; import com.android.launcher3.Launcher; -import com.android.launcher3.R; import com.android.launcher3.util.ActivityTracker.SchedulerCallback; import com.android.launcher3.widget.PendingItemDragHelper; @@ -143,15 +142,13 @@ public abstract class BaseItemDragListener implements View.OnDragListener, DragS // the dragLayer alpha to 0 to have a nice fade-in animation. But that will prevent the // dragView from being visible. Instead just skip the fade-in animation here. mLauncher.getDragLayer().setAlpha(1); - - dragObject.dragView.setColor( - mLauncher.getResources().getColor(R.color.delete_target_hover_tint)); + dragObject.dragView.setAlpha(.5f); } @Override public void onPreDragEnd(DragObject dragObject, boolean dragStarted) { if (dragStarted) { - dragObject.dragView.setColor(0); + dragObject.dragView.setAlpha(1f); } } diff --git a/src/com/android/launcher3/dragndrop/DragController.java b/src/com/android/launcher3/dragndrop/DragController.java index b7a70cb654..d7f6cdb8bb 100644 --- a/src/com/android/launcher3/dragndrop/DragController.java +++ b/src/com/android/launcher3/dragndrop/DragController.java @@ -34,6 +34,8 @@ import android.view.KeyEvent; import android.view.MotionEvent; import android.view.View; +import androidx.annotation.Nullable; + import com.android.launcher3.AbstractFloatingView; import com.android.launcher3.DragSource; import com.android.launcher3.DropTarget; @@ -125,20 +127,23 @@ public class DragController implements DragDriver.EventListener, TouchController /** * Starts a drag. - * When the drag is started, the UI automatically goes into spring loaded mode. On a successful - * drop, it is the responsibility of the {@link DropTarget} to exit out of the spring loaded - * mode. If the drop was cancelled for some reason, the UI will automatically exit out of this mode. + * + *

When the drag is started, the UI automatically goes into spring loaded mode. On a + * successful drop, it is the responsibility of the {@link DropTarget} to exit out of the spring + * loaded mode. If the drop was cancelled for some reason, the UI will automatically exit out of + * this mode. * * @param drawable The drawable to be displayed in the drag view. It will be re-scaled to the - * enlarged size. - * @param originalView The source view (ie. icon, widget etc.) that is being dragged - * and which the DragView represents + * enlarged size. + * @param originalView The source view (ie. icon, widget etc.) that is being dragged and which + * the DragView represents * @param dragLayerX The x position in the DragLayer of the left-top of the bitmap. * @param dragLayerY The y position in the DragLayer of the left-top of the bitmap. * @param source An object representing where the drag originated * @param dragInfo The data associated with the object that is being dragged * @param dragRegion Coordinates within the bitmap b for the position of item being dragged. - * Makes dragging feel more precise, e.g. you can clip out a transparent border + * Makes dragging feel more precise, e.g. you can clip out a transparent + * border */ public DragView startDrag( Drawable drawable, @@ -152,6 +157,61 @@ public class DragController implements DragDriver.EventListener, TouchController float initialDragViewScale, float dragViewScaleOnDrop, DragOptions options) { + return startDrag(drawable, /* view= */ null, originalView, dragLayerX, dragLayerY, + source, dragInfo, dragOffset, dragRegion, initialDragViewScale, dragViewScaleOnDrop, + options); + } + + /** + * Starts a drag. + * + *

When the drag is started, the UI automatically goes into spring loaded mode. On a + * successful drop, it is the responsibility of the {@link DropTarget} to exit out of the spring + * loaded mode. If the drop was cancelled for some reason, the UI will automatically exit out of + * this mode. + * + * @param view The view to be displayed in the drag view. It will be re-scaled to the + * enlarged size. + * @param originalView The source view (ie. icon, widget etc.) that is being dragged and which + * the DragView represents + * @param dragLayerX The x position in the DragLayer of the left-top of the bitmap. + * @param dragLayerY The y position in the DragLayer of the left-top of the bitmap. + * @param source An object representing where the drag originated + * @param dragInfo The data associated with the object that is being dragged + * @param dragRegion Coordinates within the bitmap b for the position of item being dragged. + * Makes dragging feel more precise, e.g. you can clip out a transparent + * border + */ + public DragView startDrag( + View view, + DraggableView originalView, + int dragLayerX, + int dragLayerY, + DragSource source, + ItemInfo dragInfo, + Point dragOffset, + Rect dragRegion, + float initialDragViewScale, + float dragViewScaleOnDrop, + DragOptions options) { + return startDrag(/* drawable= */ null, view, originalView, dragLayerX, dragLayerY, + source, dragInfo, dragOffset, dragRegion, initialDragViewScale, dragViewScaleOnDrop, + options); + } + + private DragView startDrag( + @Nullable Drawable drawable, + @Nullable View view, + DraggableView originalView, + int dragLayerX, + int dragLayerY, + DragSource source, + ItemInfo dragInfo, + Point dragOffset, + Rect dragRegion, + float initialDragViewScale, + float dragViewScaleOnDrop, + DragOptions options) { if (PROFILE_DRAWING_DURING_DRAG) { android.os.Debug.startMethodTracing("Launcher"); } @@ -182,14 +242,25 @@ public class DragController implements DragDriver.EventListener, TouchController final Resources res = mLauncher.getResources(); final float scaleDps = mIsInPreDrag ? res.getDimensionPixelSize(R.dimen.pre_drag_view_scale) : 0f; - final DragView dragView = mDragObject.dragView = new DragView( - mLauncher, - drawable, - registrationX, - registrationY, - initialDragViewScale, - dragViewScaleOnDrop, - scaleDps); + final DragView dragView = mDragObject.dragView = drawable != null + ? new DragView( + mLauncher, + drawable, + registrationX, + registrationY, + initialDragViewScale, + dragViewScaleOnDrop, + scaleDps) + : new DragView( + mLauncher, + view, + view.getMeasuredWidth(), + view.getMeasuredHeight(), + registrationX, + registrationY, + initialDragViewScale, + dragViewScaleOnDrop, + scaleDps); dragView.setItemInfo(dragInfo); mDragObject.dragComplete = false; diff --git a/src/com/android/launcher3/dragndrop/DragView.java b/src/com/android/launcher3/dragndrop/DragView.java index 0f26ff4d90..68a8af238e 100644 --- a/src/com/android/launcher3/dragndrop/DragView.java +++ b/src/com/android/launcher3/dragndrop/DragView.java @@ -16,19 +16,22 @@ package com.android.launcher3.dragndrop; +import static android.view.View.MeasureSpec.EXACTLY; +import static android.view.View.MeasureSpec.makeMeasureSpec; + +import static com.android.launcher3.LauncherAnimUtils.VIEW_ALPHA; import static com.android.launcher3.Utilities.getBadge; import static com.android.launcher3.util.Executors.MODEL_EXECUTOR; -import android.animation.FloatArrayEvaluator; +import android.animation.AnimatorSet; +import android.animation.ObjectAnimator; import android.animation.ValueAnimator; import android.animation.ValueAnimator.AnimatorUpdateListener; import android.annotation.TargetApi; +import android.content.Context; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; -import android.graphics.ColorMatrix; -import android.graphics.ColorMatrixColorFilter; -import android.graphics.Paint; import android.graphics.Path; import android.graphics.Point; import android.graphics.Rect; @@ -39,7 +42,11 @@ import android.os.Build; import android.os.Handler; import android.os.Looper; import android.view.View; +import android.view.ViewGroup; +import android.widget.FrameLayout; +import android.widget.ImageView; +import androidx.annotation.Nullable; import androidx.dynamicanimation.animation.FloatPropertyCompat; import androidx.dynamicanimation.animation.SpringAnimation; import androidx.dynamicanimation.animation.SpringForce; @@ -55,22 +62,22 @@ import com.android.launcher3.icons.FastBitmapDrawable; import com.android.launcher3.icons.LauncherIcons; import com.android.launcher3.model.data.ItemInfo; import com.android.launcher3.statemanager.StateManager.StateListener; -import com.android.launcher3.util.Themes; import com.android.launcher3.util.Thunk; +import com.android.launcher3.views.BaseDragLayer; -import java.util.Arrays; +/** A custom view for rendering an icon, folder, shortcut or widget during drag-n-drop. */ +public class DragView extends FrameLayout implements StateListener { -public class DragView extends View implements StateListener { - private static final ColorMatrix sTempMatrix1 = new ColorMatrix(); - private static final ColorMatrix sTempMatrix2 = new ColorMatrix(); - - public static final int COLOR_CHANGE_DURATION = 120; public static final int VIEW_ZOOM_DURATION = 150; - private boolean mShouldDraw = true; - private Drawable mDrawable; - private Drawable mCrossFadeDrawable; - @Thunk Paint mPaint; + private final View mContent; + // The following are only used for rendering mContent directly during drag-n-drop. + @Nullable private ViewGroup.LayoutParams mContentViewLayoutParams; + @Nullable private ViewGroup mContentViewParent; + private int mContentViewInParentViewIndex = -1; + private final int mWidth; + private final int mHeight; + private final int mBlurSizeOutline; private final int mRegistrationX; private final int mRegistrationY; @@ -85,16 +92,8 @@ public class DragView extends View implements StateListener { @Thunk final DragController mDragController; final FirstFrameAnimatorHelper mFirstFrameAnimatorHelper; private boolean mHasDrawn = false; - @Thunk float mCrossFadeProgress = 0f; - private boolean mAnimationCancelled = false; - ValueAnimator mAnim; - // The intrinsic icon scale factor is the scale factor for a drag icon over the workspace - // size. This is ignored for non-icons. - private float mIntrinsicIconScale = 1f; - - @Thunk float[] mCurrentFilter; - private ValueAnimator mFilterAnimator; + final ValueAnimator mAnim; private int mLastTouchX; private int mLastTouchY; @@ -106,7 +105,14 @@ public class DragView extends View implements StateListener { private SpringFloatValue mTranslateX, mTranslateY; private Path mScaledMaskPath; private Drawable mBadge; - private ColorMatrixColorFilter mBaseFilter; + + public DragView(Launcher launcher, Drawable drawable, int registrationX, + int registrationY, final float initialScale, final float scaleOnDrop, + final float finalScaleDps) { + this(launcher, getViewFromDrawable(launcher, drawable), + drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), + registrationX, registrationY, initialScale, scaleOnDrop, finalScaleDps); + } /** * Construct the drag view. @@ -114,11 +120,16 @@ public class DragView extends View implements StateListener { * The registration point is the point inside our view that the touch events should * be centered upon. * @param launcher The Launcher instance - * @param drawable The view that we're dragging around. We scale it up when we draw it. + * @param content the view content that is attached to the drag view. + * @param width the width of the dragView + * @param height the height of the dragView + * @param initialScale The view that we're dragging around. We scale it up when we draw it. * @param registrationX The x coordinate of the registration point. * @param registrationY The y coordinate of the registration point. + * @param scaleOnDrop the scale used in the drop animation. + * @param finalScaleDps the scale used in the zoom out animation when the drag view is shown. */ - public DragView(Launcher launcher, Drawable drawable, int registrationX, + public DragView(Launcher launcher, View content, int width, int height, int registrationX, int registrationY, final float initialScale, final float scaleOnDrop, final float finalScaleDps) { super(launcher); @@ -127,8 +138,19 @@ public class DragView extends View implements StateListener { mDragController = launcher.getDragController(); mFirstFrameAnimatorHelper = new FirstFrameAnimatorHelper(this); - final float scale = (drawable.getIntrinsicWidth() + finalScaleDps) - / drawable.getIntrinsicWidth(); + mContent = content; + mWidth = width; + mHeight = height; + mContentViewLayoutParams = mContent.getLayoutParams(); + if (mContent.getParent() instanceof ViewGroup) { + mContentViewParent = (ViewGroup) mContent.getParent(); + mContentViewInParentViewIndex = mContentViewParent.indexOfChild(mContent); + mContentViewParent.removeView(mContent); + } + + addView(content, new LayoutParams(width, height)); + + final float scale = (width + finalScaleDps) / width; // Set the initial scale to avoid any jumps setScaleX(initialScale); @@ -146,9 +168,7 @@ public class DragView extends View implements StateListener { } }); - mDrawable = drawable; - setDragRegion(new Rect(0, 0, drawable.getIntrinsicWidth(), - drawable.getIntrinsicHeight())); + setDragRegion(new Rect(0, 0, width, height)); // The point in our scaled bitmap that the touch events are located mRegistrationX = registrationX; @@ -158,12 +178,11 @@ public class DragView extends View implements StateListener { mScaleOnDrop = scaleOnDrop; // Force a measure, because Workspace uses getMeasuredHeight() before the layout pass - int ms = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED); - measure(ms, ms); - mPaint = new Paint(Paint.FILTER_BITMAP_FLAG); + measure(makeMeasureSpec(width, EXACTLY), makeMeasureSpec(height, EXACTLY)); mBlurSizeOutline = getResources().getDimensionPixelSize(R.dimen.blur_size_medium_outline); setElevation(getResources().getDimension(R.dimen.drag_elevation)); + setWillNotDraw(false); } @Override @@ -190,145 +209,105 @@ public class DragView extends View implements StateListener { */ @TargetApi(Build.VERSION_CODES.O) public void setItemInfo(final ItemInfo info) { - if (info.itemType != LauncherSettings.Favorites.ITEM_TYPE_APPLICATION && - info.itemType != LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT && - info.itemType != LauncherSettings.Favorites.ITEM_TYPE_FOLDER) { + if (info.itemType != LauncherSettings.Favorites.ITEM_TYPE_APPLICATION + && info.itemType != LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT + && info.itemType != LauncherSettings.Favorites.ITEM_TYPE_FOLDER) { return; } // Load the adaptive icon on a background thread and add the view in ui thread. - MODEL_EXECUTOR.getHandler().postAtFrontOfQueue(new Runnable() { - @Override - public void run() { - Object[] outObj = new Object[1]; - int w = mDrawable.getIntrinsicWidth(); - int h = mDrawable.getIntrinsicHeight(); - Drawable dr = Utilities.getFullDrawable(mLauncher, info, w, h, outObj); + MODEL_EXECUTOR.getHandler().postAtFrontOfQueue(() -> { + Object[] outObj = new Object[1]; + int w = mWidth; + int h = mHeight; + Drawable dr = Utilities.getFullDrawable(mLauncher, info, w, h, outObj); - if (dr instanceof AdaptiveIconDrawable) { - int blurMargin = (int) mLauncher.getResources() - .getDimension(R.dimen.blur_size_medium_outline) / 2; + if (dr instanceof AdaptiveIconDrawable) { + int blurMargin = (int) mLauncher.getResources() + .getDimension(R.dimen.blur_size_medium_outline) / 2; - Rect bounds = new Rect(0, 0, w, h); - bounds.inset(blurMargin, blurMargin); - // Badge is applied after icon normalization so the bounds for badge should not - // be scaled down due to icon normalization. - Rect badgeBounds = new Rect(bounds); - mBadge = getBadge(mLauncher, info, outObj[0]); - mBadge.setBounds(badgeBounds); + Rect bounds = new Rect(0, 0, w, h); + bounds.inset(blurMargin, blurMargin); + // Badge is applied after icon normalization so the bounds for badge should not + // be scaled down due to icon normalization. + Rect badgeBounds = new Rect(bounds); + mBadge = getBadge(mLauncher, info, outObj[0]); + mBadge.setBounds(badgeBounds); - // Do not draw the background in case of folder as its translucent - mShouldDraw = !(dr instanceof FolderAdaptiveIcon); + // Do not draw the background in case of folder as its translucent + final boolean shouldDrawBackground = !(dr instanceof FolderAdaptiveIcon); - try (LauncherIcons li = LauncherIcons.obtain(mLauncher)) { - Drawable nDr; // drawable to be normalized - if (mShouldDraw) { - nDr = dr; - } else { - // Since we just want the scale, avoid heavy drawing operations - nDr = new AdaptiveIconDrawable(new ColorDrawable(Color.BLACK), null); - } - Utilities.scaleRectAboutCenter(bounds, - li.getNormalizer().getScale(nDr, null, null, null)); + try (LauncherIcons li = LauncherIcons.obtain(mLauncher)) { + Drawable nDr; // drawable to be normalized + if (shouldDrawBackground) { + nDr = dr; + } else { + // Since we just want the scale, avoid heavy drawing operations + nDr = new AdaptiveIconDrawable(new ColorDrawable(Color.BLACK), null); } - AdaptiveIconDrawable adaptiveIcon = (AdaptiveIconDrawable) dr; - - // Shrink very tiny bit so that the clip path is smaller than the original bitmap - // that has anti aliased edges and shadows. - Rect shrunkBounds = new Rect(bounds); - Utilities.scaleRectAboutCenter(shrunkBounds, 0.98f); - adaptiveIcon.setBounds(shrunkBounds); - final Path mask = adaptiveIcon.getIconMask(); - - mTranslateX = new SpringFloatValue(DragView.this, - w * AdaptiveIconDrawable.getExtraInsetFraction()); - mTranslateY = new SpringFloatValue(DragView.this, - h * AdaptiveIconDrawable.getExtraInsetFraction()); - - bounds.inset( - (int) (-bounds.width() * AdaptiveIconDrawable.getExtraInsetFraction()), - (int) (-bounds.height() * AdaptiveIconDrawable.getExtraInsetFraction()) - ); - mBgSpringDrawable = adaptiveIcon.getBackground(); - if (mBgSpringDrawable == null) { - mBgSpringDrawable = new ColorDrawable(Color.TRANSPARENT); - } - mBgSpringDrawable.setBounds(bounds); - mFgSpringDrawable = adaptiveIcon.getForeground(); - if (mFgSpringDrawable == null) { - mFgSpringDrawable = new ColorDrawable(Color.TRANSPARENT); - } - mFgSpringDrawable.setBounds(bounds); - - new Handler(Looper.getMainLooper()).post(new Runnable() { - @Override - public void run() { - // Assign the variable on the UI thread to avoid race conditions. - mScaledMaskPath = mask; - - if (info.isDisabled()) { - FastBitmapDrawable d = new FastBitmapDrawable((Bitmap) null); - d.setIsDisabled(true); - mBaseFilter = (ColorMatrixColorFilter) d.getColorFilter(); - } - updateColorFilter(); - } - }); + Utilities.scaleRectAboutCenter(bounds, + li.getNormalizer().getScale(nDr, null, null, null)); } - }}); + AdaptiveIconDrawable adaptiveIcon = (AdaptiveIconDrawable) dr; + + // Shrink very tiny bit so that the clip path is smaller than the original bitmap + // that has anti aliased edges and shadows. + Rect shrunkBounds = new Rect(bounds); + Utilities.scaleRectAboutCenter(shrunkBounds, 0.98f); + adaptiveIcon.setBounds(shrunkBounds); + final Path mask = adaptiveIcon.getIconMask(); + + mTranslateX = new SpringFloatValue(DragView.this, + w * AdaptiveIconDrawable.getExtraInsetFraction()); + mTranslateY = new SpringFloatValue(DragView.this, + h * AdaptiveIconDrawable.getExtraInsetFraction()); + + bounds.inset( + (int) (-bounds.width() * AdaptiveIconDrawable.getExtraInsetFraction()), + (int) (-bounds.height() * AdaptiveIconDrawable.getExtraInsetFraction()) + ); + mBgSpringDrawable = adaptiveIcon.getBackground(); + if (mBgSpringDrawable == null) { + mBgSpringDrawable = new ColorDrawable(Color.TRANSPARENT); + } + mBgSpringDrawable.setBounds(bounds); + mFgSpringDrawable = adaptiveIcon.getForeground(); + if (mFgSpringDrawable == null) { + mFgSpringDrawable = new ColorDrawable(Color.TRANSPARENT); + } + mFgSpringDrawable.setBounds(bounds); + + new Handler(Looper.getMainLooper()).post(() -> { + // Assign the variable on the UI thread to avoid race conditions. + mScaledMaskPath = mask; + // Avoid relayout as we do not care about children affecting layout + removeAllViewsInLayout(); + + if (info.isDisabled()) { + FastBitmapDrawable d = new FastBitmapDrawable((Bitmap) null); + d.setIsDisabled(true); + mBgSpringDrawable.setColorFilter(d.getColorFilter()); + mFgSpringDrawable.setColorFilter(d.getColorFilter()); + mBadge.setColorFilter(d.getColorFilter()); + } + invalidate(); + }); + } + }); } - @TargetApi(Build.VERSION_CODES.O) - private void updateColorFilter() { - if (mCurrentFilter == null) { - mPaint.setColorFilter(null); - - if (mScaledMaskPath != null) { - mBgSpringDrawable.setColorFilter(mBaseFilter); - mFgSpringDrawable.setColorFilter(mBaseFilter); - mBadge.setColorFilter(mBaseFilter); - } - } else { - ColorMatrixColorFilter currentFilter = new ColorMatrixColorFilter(mCurrentFilter); - mPaint.setColorFilter(currentFilter); - - if (mScaledMaskPath != null) { - if (mBaseFilter != null) { - mBaseFilter.getColorMatrix(sTempMatrix1); - sTempMatrix2.set(mCurrentFilter); - sTempMatrix1.postConcat(sTempMatrix2); - - currentFilter = new ColorMatrixColorFilter(sTempMatrix1); - } - - mBgSpringDrawable.setColorFilter(currentFilter); - mFgSpringDrawable.setColorFilter(currentFilter); - mBadge.setColorFilter(currentFilter); - } + // TODO(b/183609936): This is only for LauncherAppWidgetHostView that is rendered in a drawable. + // Once LauncherAppWidgetHostView is directly rendered in this view, removes this method. + @Override + public void invalidate() { + super.invalidate(); + if (mContent instanceof ImageView) { + mContent.invalidate(); } - - invalidate(); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { - setMeasuredDimension(mDrawable.getIntrinsicWidth(), mDrawable.getIntrinsicHeight()); - } - - /** Sets the scale of the view over the normal workspace icon size. */ - public void setIntrinsicIconScaleFactor(float scale) { - mIntrinsicIconScale = scale; - } - - public float getIntrinsicIconScaleFactor() { - return mIntrinsicIconScale; - } - - public int getDragRegionLeft() { - return mDragRegion.left; - } - - public int getDragRegionTop() { - return mDragRegion.top; + super.onMeasure(makeMeasureSpec(mWidth, EXACTLY), makeMeasureSpec(mHeight, EXACTLY)); } public int getDragRegionWidth() { @@ -356,40 +335,11 @@ public class DragView extends View implements StateListener { } @Override - protected void onDraw(Canvas canvas) { + public void draw(Canvas canvas) { + super.draw(canvas); + + // Draw after the content mHasDrawn = true; - - if (mShouldDraw) { - // Always draw the bitmap to mask anti aliasing due to clipPath - boolean crossFade = mCrossFadeProgress > 0 && mCrossFadeDrawable != null; - if (crossFade) { - int alpha = crossFade ? (int) (255 * (1 - mCrossFadeProgress)) : 255; - mPaint.setAlpha(alpha); - } - mDrawable.setColorFilter(mPaint.getColorFilter()); - mDrawable.setAlpha(mPaint.getAlpha()); - mDrawable.setBounds( - new Rect(0, 0, mDrawable.getIntrinsicWidth(), - mDrawable.getIntrinsicHeight())); - mDrawable.draw(canvas); - if (crossFade) { - mPaint.setAlpha((int) (255 * mCrossFadeProgress)); - final int saveCount = canvas.save(); - float sX = ((float) mDrawable.getIntrinsicWidth()) - / mCrossFadeDrawable.getIntrinsicWidth(); - float sY = ((float) mDrawable.getIntrinsicHeight()) - / mCrossFadeDrawable.getIntrinsicHeight(); - canvas.scale(sX, sY); - mCrossFadeDrawable.setColorFilter(mPaint.getColorFilter()); - mCrossFadeDrawable.setAlpha(mPaint.getAlpha()); - mDrawable.setBounds( - new Rect(0, 0, mDrawable.getIntrinsicWidth(), - mDrawable.getIntrinsicHeight())); - mCrossFadeDrawable.draw(canvas); - canvas.restoreToCount(saveCount); - } - } - if (mScaledMaskPath != null) { int cnt = canvas.save(); canvas.clipPath(mScaledMaskPath); @@ -401,74 +351,27 @@ public class DragView extends View implements StateListener { } } - public void setCrossFadeDrawable(Drawable crossFadeDrawable) { - mCrossFadeDrawable = crossFadeDrawable; - } - - public void crossFade(int duration) { - ValueAnimator va = ValueAnimator.ofFloat(0f, 1f); - va.setDuration(duration); - va.setInterpolator(Interpolators.DEACCEL_1_5); - va.addUpdateListener(a -> { - mCrossFadeProgress = a.getAnimatedFraction(); - invalidate(); - }); - va.start(); - } - - public void setColor(int color) { - if (mPaint == null) { - mPaint = new Paint(Paint.FILTER_BITMAP_FLAG); + public void crossFadeContent(Drawable crossFadeDrawable, int duration) { + if (mContent.getParent() == null) { + // If the content is already removed, ignore + return; } - if (color != 0) { - ColorMatrix m1 = new ColorMatrix(); - m1.setSaturation(0); + View newContent = getViewFromDrawable(getContext(), crossFadeDrawable); + newContent.measure(makeMeasureSpec(mWidth, EXACTLY), makeMeasureSpec(mHeight, EXACTLY)); + newContent.layout(0, 0, mWidth, mHeight); + addViewInLayout(newContent, 0, new LayoutParams(mWidth, mHeight)); - ColorMatrix m2 = new ColorMatrix(); - Themes.setColorScaleOnMatrix(color, m2); - m1.postConcat(m2); - - animateFilterTo(m1.getArray()); - } else { - if (mCurrentFilter == null) { - updateColorFilter(); - } else { - animateFilterTo(new ColorMatrix().getArray()); - } - } - } - - private void animateFilterTo(float[] targetFilter) { - float[] oldFilter = mCurrentFilter == null ? new ColorMatrix().getArray() : mCurrentFilter; - mCurrentFilter = Arrays.copyOf(oldFilter, oldFilter.length); - - if (mFilterAnimator != null) { - mFilterAnimator.cancel(); - } - mFilterAnimator = ValueAnimator.ofObject(new FloatArrayEvaluator(mCurrentFilter), - oldFilter, targetFilter); - mFilterAnimator.setDuration(COLOR_CHANGE_DURATION); - mFilterAnimator.addUpdateListener(new AnimatorUpdateListener() { - - @Override - public void onAnimationUpdate(ValueAnimator animation) { - updateColorFilter(); - } - }); - mFilterAnimator.start(); + AnimatorSet anim = new AnimatorSet(); + anim.play(ObjectAnimator.ofFloat(newContent, VIEW_ALPHA, 0, 1)); + anim.play(ObjectAnimator.ofFloat(mContent, VIEW_ALPHA, 0)); + anim.setDuration(duration).setInterpolator(Interpolators.DEACCEL_1_5); + anim.start(); } public boolean hasDrawn() { return mHasDrawn; } - @Override - public void setAlpha(float alpha) { - super.setAlpha(alpha); - mPaint.setAlpha((int) (255 * alpha)); - invalidate(); - } - /** * Create a window containing this view and show it. * @@ -479,22 +382,21 @@ public class DragView extends View implements StateListener { mDragLayer.addView(this); // Start the pick-up animation - DragLayer.LayoutParams lp = new DragLayer.LayoutParams(0, 0); - lp.width = mDrawable.getIntrinsicWidth(); - lp.height = mDrawable.getIntrinsicHeight(); + BaseDragLayer.LayoutParams lp = new BaseDragLayer.LayoutParams(mWidth, mHeight); lp.customPosition = true; setLayoutParams(lp); + + if (mContent != null) { + // At the drag start, the source view visibility is set to invisible. + mContent.setVisibility(VISIBLE); + } + move(touchX, touchY); // Post the animation to skip other expensive work happening on the first frame - post(new Runnable() { - public void run() { - mAnim.start(); - } - }); + post(mAnim::start); } public void cancelAnimation() { - mAnimationCancelled = true; if (mAnim != null && mAnim.isRunning()) { mAnim.cancel(); } @@ -547,6 +449,33 @@ public class DragView extends View implements StateListener { setTranslationY(mLastTouchY - mRegistrationY + mAnimatedShiftY); } + + /** + * Detaches {@link #mContent}, if previously attached, from this view. + * + *

In the case of no change in the drop position, sets {@code reattachToPreviousParent} to + * {@code true} to attach the {@link #mContent} back to its previous parent. + */ + public void detachContentView(boolean reattachToPreviousParent) { + if (mContent != null && mContentViewParent != null && mContentViewInParentViewIndex >= 0) { + removeView(mContent); + mContent.setLayoutParams(mContentViewLayoutParams); + if (reattachToPreviousParent) { + mContentViewParent.addView(mContent, mContentViewInParentViewIndex); + } + mContentViewParent = null; + mContentViewInParentViewIndex = -1; + } + } + + /** + * Removes this view from the {@link DragLayer}. + * + *

If the drag content is a {@link #mContent}, this call doesn't reattach the + * {@link #mContent} back to its previous parent. To reattach to previous parent, the caller + * should call {@link #detachContentView} with {@code reattachToPreviousParent} sets to true + * before this call. + */ public void remove() { if (getParent() != null) { mDragLayer.removeView(DragView.this); @@ -561,9 +490,23 @@ public class DragView extends View implements StateListener { return mInitialScale; } - /** Returns the current {@link Drawable} that is rendered in this view. */ - public Drawable getDrawable() { - return mDrawable; + @Override + public boolean hasOverlappingRendering() { + return false; + } + + /** Returns the current content view that is rendered in the drag view. */ + public View getContentView() { + return mContent; + } + + /** + * Returns the previous {@link ViewGroup} parent of the {@link #mContent} before the drag + * content is attached to this view. + */ + @Nullable + public ViewGroup getContentViewParent() { + return mContentViewParent; } private static class SpringFloatValue { @@ -583,9 +526,9 @@ public class DragView extends View implements StateListener { }; // Following three values are fine tuned with motion ux designer - private final static int STIFFNESS = 4000; - private final static float DAMPENING_RATIO = 1f; - private final static int PARALLAX_MAX_IN_DP = 8; + private static final int STIFFNESS = 4000; + private static final float DAMPENING_RATIO = 1f; + private static final int PARALLAX_MAX_IN_DP = 8; private final View mView; private final SpringAnimation mSpring; @@ -607,4 +550,10 @@ public class DragView extends View implements StateListener { mSpring.animateToFinalPosition(Utilities.boundToRange(value, -mDelta, mDelta)); } } + + private static View getViewFromDrawable(Context context, Drawable drawable) { + ImageView iv = new ImageView(context); + iv.setImageDrawable(drawable); + return iv; + } } diff --git a/src/com/android/launcher3/folder/FolderNameProvider.java b/src/com/android/launcher3/folder/FolderNameProvider.java index d166e27c23..9c1b24d96c 100644 --- a/src/com/android/launcher3/folder/FolderNameProvider.java +++ b/src/com/android/launcher3/folder/FolderNameProvider.java @@ -48,7 +48,7 @@ import java.util.stream.Collectors; public class FolderNameProvider implements ResourceBasedOverride { private static final String TAG = "FolderNameProvider"; - private static final boolean DEBUG = true; + private static final boolean DEBUG = false; /** * IME usually has up to 3 suggest slots. In total, there are 4 suggest slots as the folder diff --git a/src/com/android/launcher3/graphics/DragPreviewProvider.java b/src/com/android/launcher3/graphics/DragPreviewProvider.java index 0e61b98649..a549750dae 100644 --- a/src/com/android/launcher3/graphics/DragPreviewProvider.java +++ b/src/com/android/launcher3/graphics/DragPreviewProvider.java @@ -29,11 +29,12 @@ import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.view.View; +import androidx.annotation.Nullable; + import com.android.launcher3.BubbleTextView; import com.android.launcher3.Launcher; import com.android.launcher3.R; import com.android.launcher3.config.FeatureFlags; -import com.android.launcher3.dragndrop.AppWidgetHostViewDrawable; import com.android.launcher3.dragndrop.DraggableView; import com.android.launcher3.icons.BitmapRenderer; import com.android.launcher3.icons.FastBitmapDrawable; @@ -95,7 +96,7 @@ public class DragPreviewProvider { */ public Drawable createDrawable() { if (mView instanceof LauncherAppWidgetHostView) { - return new AppWidgetHostViewDrawable((LauncherAppWidgetHostView) mView); + return null; } int width = 0; @@ -116,6 +117,18 @@ public class DragPreviewProvider { height + blurSizeOutline, (c) -> drawDragView(c, scale))); } + /** + * Returns the content view if the content should be rendered directly in + * {@link com.android.launcher3.dragndrop.DragView}. Otherwise, returns null. + */ + @Nullable + public View getContentView() { + if (mView instanceof LauncherAppWidgetHostView) { + return mView; + } + return null; + } + public final void generateDragOutline(Bitmap preview) { if (FeatureFlags.IS_STUDIO_BUILD && mOutlineGeneratorCallback != null) { throw new RuntimeException("Drag outline generated twice"); @@ -152,6 +165,22 @@ public class DragPreviewProvider { return scale; } + /** Returns the scale and position of a given view for drag-n-drop. */ + public float getScaleAndPosition(View view, int[] outPos) { + float scale = Launcher.getLauncher(mView.getContext()) + .getDragLayer().getLocationInDragLayer(mView, outPos); + if (mView instanceof LauncherAppWidgetHostView) { + // App widgets are technically scaled, but are drawn at their expected size -- so the + // app widget scale should not affect the scale of the preview. + scale /= ((LauncherAppWidgetHostView) mView).getScaleToFit(); + } + + outPos[0] = Math.round(outPos[0] + - (view.getWidth() - scale * mView.getWidth() * mView.getScaleX()) / 2); + outPos[1] = Math.round(outPos[1] - (1 - scale) * view.getHeight() / 2 - previewPadding / 2); + return scale; + } + protected Bitmap convertPreviewToAlphaBitmap(Bitmap preview) { return preview.copy(Bitmap.Config.ALPHA_8, true); } diff --git a/src/com/android/launcher3/model/GridSizeMigrationTask.java b/src/com/android/launcher3/model/GridSizeMigrationTask.java index 6a75e6254d..7b3e509d52 100644 --- a/src/com/android/launcher3/model/GridSizeMigrationTask.java +++ b/src/com/android/launcher3/model/GridSizeMigrationTask.java @@ -53,7 +53,7 @@ import java.util.HashSet; public class GridSizeMigrationTask { private static final String TAG = "GridSizeMigrationTask"; - private static final boolean DEBUG = true; + private static final boolean DEBUG = false; // These are carefully selected weights for various item types (Math.random?), to allow for // the least absurd migration experience. diff --git a/src/com/android/launcher3/model/GridSizeMigrationTaskV2.java b/src/com/android/launcher3/model/GridSizeMigrationTaskV2.java index cee93041e5..8a1d73ed72 100644 --- a/src/com/android/launcher3/model/GridSizeMigrationTaskV2.java +++ b/src/com/android/launcher3/model/GridSizeMigrationTaskV2.java @@ -67,7 +67,7 @@ import java.util.Set; public class GridSizeMigrationTaskV2 { private static final String TAG = "GridSizeMigrationTaskV2"; - private static final boolean DEBUG = true; + private static final boolean DEBUG = false; private final Context mContext; private final SQLiteDatabase mDb; diff --git a/src/com/android/launcher3/model/LoaderTask.java b/src/com/android/launcher3/model/LoaderTask.java index f6c7c0604a..79396b1fc9 100644 --- a/src/com/android/launcher3/model/LoaderTask.java +++ b/src/com/android/launcher3/model/LoaderTask.java @@ -109,6 +109,8 @@ import java.util.concurrent.CancellationException; public class LoaderTask implements Runnable { private static final String TAG = "LoaderTask"; + private static final boolean DEBUG = true; + protected final LauncherAppState mApp; private final AllAppsList mBgAllAppsList; protected final BgDataModel mBgDataModel; @@ -190,7 +192,7 @@ public class LoaderTask implements Runnable { try (LauncherModel.LoaderTransaction transaction = mApp.getModel().beginLoader(this)) { List allShortcuts = new ArrayList<>(); loadWorkspace(allShortcuts); - logger.addSplit("loadWorkspace"); + logASplit(logger, "loadWorkspace"); // Sanitize data re-syncs widgets/shortcuts based on the workspace loaded from db. // sanitizeData should not be invoked if the workspace is loaded from a db different @@ -199,30 +201,30 @@ public class LoaderTask implements Runnable { if (mApp.getInvariantDeviceProfile().dbFile.equals(mDbName)) { verifyNotStopped(); sanitizeData(); - logger.addSplit("sanitizeData"); + logASplit(logger, "sanitizeData"); } verifyNotStopped(); mResults.bindWorkspace(); - logger.addSplit("bindWorkspace"); + logASplit(logger, "bindWorkspace"); mModelDelegate.workspaceLoadComplete(); // Notify the installer packages of packages with active installs on the first screen. sendFirstScreenActiveInstallsBroadcast(); - logger.addSplit("sendFirstScreenActiveInstallsBroadcast"); + logASplit(logger, "sendFirstScreenActiveInstallsBroadcast"); // Take a break waitForIdle(); - logger.addSplit("step 1 complete"); + logASplit(logger, "step 1 complete"); verifyNotStopped(); // second step List allActivityList = loadAllApps(); - logger.addSplit("loadAllApps"); + logASplit(logger, "loadAllApps"); verifyNotStopped(); mResults.bindAllApps(); - logger.addSplit("bindAllApps"); + logASplit(logger, "bindAllApps"); verifyNotStopped(); IconCacheUpdateHandler updateHandler = mIconCache.getUpdateHandler(); @@ -230,54 +232,54 @@ public class LoaderTask implements Runnable { updateHandler.updateIcons(allActivityList, LauncherActivityCachingLogic.newInstance(mApp.getContext()), mApp.getModel()::onPackageIconsUpdated); - logger.addSplit("update icon cache"); + logASplit(logger, "update icon cache"); if (FeatureFlags.ENABLE_DEEP_SHORTCUT_ICON_CACHE.get()) { verifyNotStopped(); - logger.addSplit("save shortcuts in icon cache"); + logASplit(logger, "save shortcuts in icon cache"); updateHandler.updateIcons(allShortcuts, new ShortcutCachingLogic(), mApp.getModel()::onPackageIconsUpdated); } // Take a break waitForIdle(); - logger.addSplit("step 2 complete"); + logASplit(logger, "step 2 complete"); verifyNotStopped(); // third step List allDeepShortcuts = loadDeepShortcuts(); - logger.addSplit("loadDeepShortcuts"); + logASplit(logger, "loadDeepShortcuts"); verifyNotStopped(); mResults.bindDeepShortcuts(); - logger.addSplit("bindDeepShortcuts"); + logASplit(logger, "bindDeepShortcuts"); if (FeatureFlags.ENABLE_DEEP_SHORTCUT_ICON_CACHE.get()) { verifyNotStopped(); - logger.addSplit("save deep shortcuts in icon cache"); + logASplit(logger, "save deep shortcuts in icon cache"); updateHandler.updateIcons(allDeepShortcuts, new ShortcutCachingLogic(), (pkgs, user) -> { }); } // Take a break waitForIdle(); - logger.addSplit("step 3 complete"); + logASplit(logger, "step 3 complete"); verifyNotStopped(); // fourth step List allWidgetsList = mBgDataModel.widgetsModel.update(mApp, null); - logger.addSplit("load widgets"); + logASplit(logger, "load widgets"); verifyNotStopped(); mResults.bindWidgets(); - logger.addSplit("bindWidgets"); + logASplit(logger, "bindWidgets"); verifyNotStopped(); updateHandler.updateIcons(allWidgetsList, new ComponentWithIconCachingLogic(mApp.getContext(), true), mApp.getModel()::onWidgetLabelsUpdated); - logger.addSplit("save widgets in icon cache"); + logASplit(logger, "save widgets in icon cache"); // fifth step if (FeatureFlags.FOLDER_NAME_SUGGEST.get()) { @@ -286,13 +288,13 @@ public class LoaderTask implements Runnable { verifyNotStopped(); updateHandler.finish(); - logger.addSplit("finish icon update"); + logASplit(logger, "finish icon update"); mModelDelegate.modelLoadComplete(); transaction.commit(); } catch (CancellationException e) { // Loader stopped, ignore - logger.addSplit("Cancelled"); + logASplit(logger, "Cancelled"); } finally { logger.dumpToLog(); } @@ -977,4 +979,11 @@ public class LoaderTask implements Runnable { return (provider != null) && (provider.provider != null) && (provider.provider.getPackageName() != null); } + + private static void logASplit(final TimingLogger logger, final String label) { + logger.addSplit(label); + if (DEBUG) { + Log.d(TAG, label); + } + } } diff --git a/src/com/android/launcher3/model/data/ItemInfo.java b/src/com/android/launcher3/model/data/ItemInfo.java index e54f1e7705..05fd77d720 100644 --- a/src/com/android/launcher3/model/data/ItemInfo.java +++ b/src/com/android/launcher3/model/data/ItemInfo.java @@ -66,7 +66,7 @@ import java.util.Optional; */ public class ItemInfo { - public static final boolean DEBUG = true; + public static final boolean DEBUG = false; public static final int NO_ID = -1; /** diff --git a/src/com/android/launcher3/testing/TestProtocol.java b/src/com/android/launcher3/testing/TestProtocol.java index 60dd0f353d..3296ea51f6 100644 --- a/src/com/android/launcher3/testing/TestProtocol.java +++ b/src/com/android/launcher3/testing/TestProtocol.java @@ -109,10 +109,10 @@ public final class TestProtocol { public static final String REQUEST_MOCK_SENSOR_ROTATION = "mock-sensor-rotation"; public static final String PERMANENT_DIAG_TAG = "TaplTarget"; - public static final String RECEIVER_LEAK = "b/185385047"; + public static final String LAUNCHER_NOT_TRANSPOSED = "b/185820525"; public static final String NO_SWIPE_TO_HOME = "b/158017601"; public static final String WORK_PROFILE_REMOVED = "b/159671700"; public static final String TIS_NO_EVENTS = "b/180915942"; public static final String GET_RECENTS_FAILED = "b/177472267"; - public static final String TWO_BUTTON_NORMAL_NOT_OVERVIEW = "b/13714484"; + public static final String TWO_BUTTON_NORMAL_NOT_OVERVIEW = "b/177316094"; } diff --git a/src/com/android/launcher3/util/FlingAnimation.java b/src/com/android/launcher3/util/FlingAnimation.java index 9d0ad22e9a..c9aa51c0de 100644 --- a/src/com/android/launcher3/util/FlingAnimation.java +++ b/src/com/android/launcher3/util/FlingAnimation.java @@ -70,9 +70,6 @@ public class FlingAnimation implements AnimatorUpdateListener, Runnable { mAnimationTimeFraction = ((float) mDuration) / (mDuration + DRAG_END_DELAY); - // Don't highlight the icon as it's animating - mDragObject.dragView.setColor(0); - final int duration = mDuration + DRAG_END_DELAY; final long startTime = AnimationUtils.currentAnimationTimeMillis(); diff --git a/src/com/android/launcher3/widget/LauncherAppWidgetHostView.java b/src/com/android/launcher3/widget/LauncherAppWidgetHostView.java index 0d53f207f8..f77c740032 100644 --- a/src/com/android/launcher3/widget/LauncherAppWidgetHostView.java +++ b/src/com/android/launcher3/widget/LauncherAppWidgetHostView.java @@ -339,7 +339,7 @@ public class LauncherAppWidgetHostView extends NavigableAppWidgetHostView // The layout depends on the orientation. if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) { int parentViewWidth = parentView == null ? 0 : parentView.getWidth(); - xOffset = screenHeight - mWorkspace.getPaddingRight() - parentViewWidth; + xOffset = screenWidth - mWorkspace.getPaddingRight() - parentViewWidth; } else { int parentViewPaddingLeft = parentView == null ? 0 : parentView.getPaddingLeft(); xOffset = mWorkspace.getPaddingLeft() + parentViewPaddingLeft; diff --git a/src/com/android/launcher3/widget/PendingItemDragHelper.java b/src/com/android/launcher3/widget/PendingItemDragHelper.java index e78d517b09..df368cd3e5 100644 --- a/src/com/android/launcher3/widget/PendingItemDragHelper.java +++ b/src/com/android/launcher3/widget/PendingItemDragHelper.java @@ -33,7 +33,6 @@ import com.android.launcher3.Launcher; import com.android.launcher3.LauncherAppState; import com.android.launcher3.PendingAddItemInfo; import com.android.launcher3.R; -import com.android.launcher3.dragndrop.AppWidgetHostViewDrawable; import com.android.launcher3.dragndrop.DragOptions; import com.android.launcher3.dragndrop.DraggableView; import com.android.launcher3.graphics.DragPreviewProvider; @@ -93,6 +92,8 @@ public class PendingItemDragHelper extends DragPreviewProvider { LauncherAppState app = LauncherAppState.getInstance(launcher); Drawable preview = null; + final int previewWidth; + final int previewHeight; final float scale; final Point dragOffset; final Rect dragRegion; @@ -114,12 +115,11 @@ public class PendingItemDragHelper extends DragPreviewProvider { createWidgetInfo.info, maxWidth, previewSizeBeforeScale)); } if (mAppWidgetHostViewPreview != null) { - preview = new AppWidgetHostViewDrawable(mAppWidgetHostViewPreview); previewSizeBeforeScale[0] = mAppWidgetHostViewPreview.getMeasuredWidth(); launcher.getDragController() .addDragListener(new AppWidgetHostViewDragListener(launcher)); } - if (preview == null) { + if (preview == null && mAppWidgetHostViewPreview == null) { Drawable p = new FastBitmapDrawable( app.getWidgetCache().generateWidgetPreview(launcher, createWidgetInfo.info, maxWidth, null, @@ -140,7 +140,14 @@ public class PendingItemDragHelper extends DragPreviewProvider { previewBounds.left += padding; previewBounds.right -= padding; } - scale = previewBounds.width() / (float) preview.getIntrinsicWidth(); + if (mAppWidgetHostViewPreview != null) { + previewWidth = mAppWidgetHostViewPreview.getMeasuredWidth(); + previewHeight = mAppWidgetHostViewPreview.getMeasuredHeight(); + } else { + previewWidth = preview.getIntrinsicWidth(); + previewHeight = preview.getIntrinsicHeight(); + } + scale = previewBounds.width() / (float) previewWidth; launcher.getDragController().addDragListener(new WidgetHostViewLoader(launcher, mView)); dragOffset = null; @@ -152,8 +159,10 @@ public class PendingItemDragHelper extends DragPreviewProvider { LauncherIcons li = LauncherIcons.obtain(launcher); preview = new FastBitmapDrawable( li.createScaledBitmapWithoutShadow(icon, 0)); + previewWidth = preview.getIntrinsicWidth(); + previewHeight = preview.getIntrinsicHeight(); li.recycle(); - scale = ((float) launcher.getDeviceProfile().iconSizePx) / preview.getIntrinsicWidth(); + scale = ((float) launcher.getDeviceProfile().iconSizePx) / previewWidth; dragOffset = new Point(previewPadding / 2, previewPadding / 2); @@ -181,13 +190,19 @@ public class PendingItemDragHelper extends DragPreviewProvider { launcher.getWorkspace().prepareDragWithProvider(this); int dragLayerX = screenPos.x + previewBounds.left - + (int) ((scale * preview.getIntrinsicWidth() - preview.getIntrinsicWidth()) / 2); + + (int) ((scale * previewWidth - previewWidth) / 2); int dragLayerY = screenPos.y + previewBounds.top - + (int) ((scale * preview.getIntrinsicHeight() - preview.getIntrinsicHeight()) / 2); + + (int) ((scale * previewHeight - previewHeight) / 2); // Start the drag - launcher.getDragController().startDrag(preview, draggableView, dragLayerX, dragLayerY, - source, mAddInfo, dragOffset, dragRegion, scale, scale, options); + if (mAppWidgetHostViewPreview != null) { + launcher.getDragController().startDrag(mAppWidgetHostViewPreview, draggableView, + dragLayerX, dragLayerY, source, mAddInfo, dragOffset, dragRegion, scale, scale, + options); + } else { + launcher.getDragController().startDrag(preview, draggableView, dragLayerX, dragLayerY, + source, mAddInfo, dragOffset, dragRegion, scale, scale, options); + } } @Override diff --git a/src/com/android/launcher3/widget/dragndrop/AppWidgetHostViewDragListener.java b/src/com/android/launcher3/widget/dragndrop/AppWidgetHostViewDragListener.java index 66bb363dde..4a60983624 100644 --- a/src/com/android/launcher3/widget/dragndrop/AppWidgetHostViewDragListener.java +++ b/src/com/android/launcher3/widget/dragndrop/AppWidgetHostViewDragListener.java @@ -17,7 +17,6 @@ package com.android.launcher3.widget.dragndrop; import com.android.launcher3.DropTarget; import com.android.launcher3.Launcher; -import com.android.launcher3.dragndrop.AppWidgetHostViewDrawable; import com.android.launcher3.dragndrop.DragController; import com.android.launcher3.dragndrop.DragOptions; import com.android.launcher3.widget.LauncherAppWidgetHostView; @@ -26,7 +25,6 @@ import com.android.launcher3.widget.LauncherAppWidgetHostView; public final class AppWidgetHostViewDragListener implements DragController.DragListener { private final Launcher mLauncher; private DropTarget.DragObject mDragObject; - private AppWidgetHostViewDrawable mAppWidgetHostViewDrawable; private LauncherAppWidgetHostView mAppWidgetHostView; public AppWidgetHostViewDragListener(Launcher launcher) { @@ -35,11 +33,9 @@ public final class AppWidgetHostViewDragListener implements DragController.DragL @Override public void onDragStart(DropTarget.DragObject dragObject, DragOptions unused) { - if (dragObject.dragView.getDrawable() instanceof AppWidgetHostViewDrawable) { + if (dragObject.dragView.getContentView() instanceof LauncherAppWidgetHostView) { mDragObject = dragObject; - mAppWidgetHostViewDrawable = - (AppWidgetHostViewDrawable) mDragObject.dragView.getDrawable(); - mAppWidgetHostView = mAppWidgetHostViewDrawable.getAppWidgetHostView(); + mAppWidgetHostView = (LauncherAppWidgetHostView) dragObject.dragView.getContentView(); mAppWidgetHostView.startDrag(this); } else { mLauncher.getDragController().removeDragListener(this); diff --git a/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java b/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java index 2bba316e8b..5543256897 100644 --- a/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java +++ b/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java @@ -435,8 +435,11 @@ public class WidgetsFullSheet extends BaseWidgetSheet private void setViewVisibilityBasedOnSearch(boolean isInSearchMode) { mIsInSearchMode = isInSearchMode; - mSearchAndRecommendationViewHolder.mRecommendedWidgetsTable - .setVisibility(isInSearchMode ? GONE : VISIBLE); + if (isInSearchMode) { + mSearchAndRecommendationViewHolder.mRecommendedWidgetsTable.setVisibility(GONE); + } else { + onRecommendedWidgetsBound(); + } if (mHasWorkProfile) { mViewPager.setVisibility(isInSearchMode ? GONE : VISIBLE); mTabsView.setVisibility(isInSearchMode ? GONE : VISIBLE); @@ -466,8 +469,8 @@ public class WidgetsFullSheet extends BaseWidgetSheet Log.d(TAG, "Header view height is 0 when inflating recommended widgets"); } float maxTableHeight = - (mLauncher.getDeviceProfile().heightPx - mTabsHeight - getHeaderViewHeight()) - * RECOMMENDATION_TABLE_HEIGHT_RATIO; + (mLauncher.getDeviceProfile().availableHeightPx - mTabsHeight + - getHeaderViewHeight()) * RECOMMENDATION_TABLE_HEIGHT_RATIO; List> recommendedWidgetsInTable = WidgetsTableUtils.groupWidgetItemsIntoTable(recommendedWidgets, mMaxSpansPerRow); diff --git a/src/com/android/launcher3/widget/picker/WidgetsRecommendationTableLayout.java b/src/com/android/launcher3/widget/picker/WidgetsRecommendationTableLayout.java index 1bfffc29fc..824b5806f4 100644 --- a/src/com/android/launcher3/widget/picker/WidgetsRecommendationTableLayout.java +++ b/src/com/android/launcher3/widget/picker/WidgetsRecommendationTableLayout.java @@ -42,7 +42,6 @@ public final class WidgetsRecommendationTableLayout extends TableLayout { private static final String TAG = "WidgetsRecommendationTableLayout"; private static final float DOWN_SCALE_RATIO = 0.9f; private static final float MAX_DOWN_SCALE_RATIO = 0.5f; - private final DeviceProfile mDeviceProfile; private final float mWidgetCellTextViewsHeight; private float mRecommendationTableMaxHeight = Float.MAX_VALUE; @@ -56,7 +55,6 @@ public final class WidgetsRecommendationTableLayout extends TableLayout { public WidgetsRecommendationTableLayout(Context context, AttributeSet attrs) { super(context, attrs); - mDeviceProfile = Launcher.getLauncher(context).getDeviceProfile(); // There are 1 row for title, 1 row for dimension and 2 rows for description. mWidgetCellTextViewsHeight = 4 * getResources().getDimension(R.dimen.widget_cell_font_size); } @@ -143,11 +141,12 @@ public final class WidgetsRecommendationTableLayout extends TableLayout { } // A naive estimation of the widgets recommendation table height without inflation. float totalHeight = 0; + DeviceProfile deviceProfile = Launcher.getLauncher(getContext()).getDeviceProfile(); for (int i = 0; i < recommendedWidgetsInTable.size(); i++) { List widgetItems = recommendedWidgetsInTable.get(i); float rowHeight = 0; for (int j = 0; j < widgetItems.size(); j++) { - float previewHeight = widgetItems.get(j).spanY * mDeviceProfile.allAppsCellHeightPx + float previewHeight = widgetItems.get(j).spanY * deviceProfile.allAppsCellHeightPx * previewScale; rowHeight = Math.max(rowHeight, previewHeight + mWidgetCellTextViewsHeight); } diff --git a/src/com/android/launcher3/widget/picker/WidgetsRecyclerView.java b/src/com/android/launcher3/widget/picker/WidgetsRecyclerView.java index 69672f233f..eb821d4eab 100644 --- a/src/com/android/launcher3/widget/picker/WidgetsRecyclerView.java +++ b/src/com/android/launcher3/widget/picker/WidgetsRecyclerView.java @@ -116,6 +116,7 @@ public class WidgetsRecyclerView extends BaseRecyclerView implements OnItemTouch public void onUpdateScrollbar(int dy) { // Skip early if widgets are not bound. if (isModelNotReady()) { + mScrollbar.setThumbOffsetY(-1); return; } diff --git a/tests/src/com/android/launcher3/ui/PortraitLandscapeRunner.java b/tests/src/com/android/launcher3/ui/PortraitLandscapeRunner.java index 266f0aeb1d..6c68daa8c1 100644 --- a/tests/src/com/android/launcher3/ui/PortraitLandscapeRunner.java +++ b/tests/src/com/android/launcher3/ui/PortraitLandscapeRunner.java @@ -4,6 +4,7 @@ import android.util.Log; import android.view.Surface; import com.android.launcher3.tapl.TestHelpers; +import com.android.launcher3.testing.TestProtocol; import org.junit.rules.TestRule; import org.junit.runner.Description; @@ -54,19 +55,23 @@ class PortraitLandscapeRunner implements TestRule { } private void evaluateInPortrait() throws Throwable { + Log.d(TestProtocol.LAUNCHER_NOT_TRANSPOSED, "evaluateInPortrait"); mTest.mDevice.setOrientationNatural(); mTest.mLauncher.setExpectedRotation(Surface.ROTATION_0); AbstractLauncherUiTest.checkDetectedLeaks(mTest.mLauncher); base.evaluate(); mTest.getDevice().pressHome(); + Log.d(TestProtocol.LAUNCHER_NOT_TRANSPOSED, "evaluateInPortrait finished"); } private void evaluateInLandscape() throws Throwable { + Log.d(TestProtocol.LAUNCHER_NOT_TRANSPOSED, "evaluateInLandscape"); mTest.mDevice.setOrientationLeft(); mTest.mLauncher.setExpectedRotation(Surface.ROTATION_90); AbstractLauncherUiTest.checkDetectedLeaks(mTest.mLauncher); base.evaluate(); mTest.getDevice().pressHome(); + Log.d(TestProtocol.LAUNCHER_NOT_TRANSPOSED, "evaluateInLandscape finished"); } }; }