Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-dev
diff --git a/quickstep/src/com/android/quickstep/views/AllAppsEduView.java b/quickstep/src/com/android/quickstep/views/AllAppsEduView.java
index 04a7baa..e9d7c3c 100644
--- a/quickstep/src/com/android/quickstep/views/AllAppsEduView.java
+++ b/quickstep/src/com/android/quickstep/views/AllAppsEduView.java
@@ -17,6 +17,7 @@
 
 import static com.android.launcher3.LauncherState.ALL_APPS;
 import static com.android.launcher3.LauncherState.NORMAL;
+import static com.android.launcher3.Utilities.EDGE_NAV_BAR;
 import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN;
 import static com.android.launcher3.anim.Interpolators.LINEAR;
 import static com.android.launcher3.anim.Interpolators.OVERSHOOT_1_7;
@@ -67,6 +68,8 @@
     private int mWidthPx;
     private int mMaxHeightPx;
 
+    private boolean mCanInterceptTouch;
+
     public AllAppsEduView(Context context, AttributeSet attrs) {
         super(context, attrs);
         mCircle = (GradientDrawable) context.getDrawable(R.drawable.all_apps_edu_circle);
@@ -116,16 +119,27 @@
         return true;
     }
 
+
+    private boolean shouldInterceptTouch(MotionEvent ev) {
+        if (ev.getAction() == MotionEvent.ACTION_DOWN) {
+            mCanInterceptTouch = (ev.getEdgeFlags() & EDGE_NAV_BAR) == 0;
+        }
+        return mCanInterceptTouch;
+    }
+
     @Override
     public boolean onControllerTouchEvent(MotionEvent ev) {
-        mTouchController.onControllerTouchEvent(ev);
-        if (mAnimation != null) {
+        if (shouldInterceptTouch(ev)) {
+            mTouchController.onControllerTouchEvent(ev);
             updateAnimationOnTouchEvent(ev);
         }
-        return super.onControllerTouchEvent(ev);
+        return true;
     }
 
     private void updateAnimationOnTouchEvent(MotionEvent ev) {
+        if (mAnimation == null) {
+            return;
+        }
         switch (ev.getActionMasked()) {
             case MotionEvent.ACTION_DOWN:
                 mAnimation.pause();
@@ -144,7 +158,10 @@
 
     @Override
     public boolean onControllerInterceptTouchEvent(MotionEvent ev) {
-        mTouchController.onControllerInterceptTouchEvent(ev);
+        if (shouldInterceptTouch(ev)) {
+            mTouchController.onControllerInterceptTouchEvent(ev);
+            updateAnimationOnTouchEvent(ev);
+        }
         return true;
     }
 
diff --git a/res/layout/user_folder_icon_normalized.xml b/res/layout/user_folder_icon_normalized.xml
index 15131f1..11eea60 100644
--- a/res/layout/user_folder_icon_normalized.xml
+++ b/res/layout/user_folder_icon_normalized.xml
@@ -44,7 +44,6 @@
             style="@style/TextHeadline"
             android:layout_weight="1"
             android:background="@android:color/transparent"
-            android:textStyle="bold"
             android:gravity="center_horizontal"
             android:hint="@string/folder_hint_text"
             android:imeOptions="flagNoExtractUi"
diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml
index b828e1d..b5b8b62 100644
--- a/res/values-ar/strings.xml
+++ b/res/values-ar/strings.xml
@@ -28,7 +28,7 @@
     <string name="shortcut_not_available" msgid="2536503539825726397">"الاختصار غير متاح"</string>
     <string name="home_screen" msgid="5629429142036709174">"الشاشة الرئيسية"</string>
     <string name="recent_task_option_split_screen" msgid="6690461455618725183">"تقسيم الشاشة"</string>
-    <string name="long_press_widget_to_add" msgid="3587712543577675817">"انقر مرتين مع تثبيت إصبعك لنقل أداة."</string>
+    <string name="long_press_widget_to_add" msgid="3587712543577675817">"انقر مع الاستمرار لنقل أداة"</string>
     <string name="long_accessible_way_to_add" msgid="2733588281439571974">"انقر مرتين مع تثبيت إصبعك لنقل أداة أو استخدام الإجراءات المخصّصة."</string>
     <string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
     <string name="widget_accessible_dims_format" msgid="3640149169885301790">"‏العرض %1$d الطول %2$d"</string>
@@ -72,7 +72,7 @@
     <string name="all_apps_search_market_message" msgid="1366263386197059176">"البحث عن مزيد من التطبيقات"</string>
     <string name="label_application" msgid="8531721983832654978">"تطبيق"</string>
     <string name="notifications_header" msgid="1404149926117359025">"الإشعارات"</string>
-    <string name="long_press_shortcut_to_add" msgid="5405328730817637737">"انقر مرتين مع تثبيت إصبعك لنقل اختصار."</string>
+    <string name="long_press_shortcut_to_add" msgid="5405328730817637737">"انقر مع الاستمرار لنقل اختصار"</string>
     <string name="long_accessible_way_to_add_shortcut" msgid="2199537273817090740">"انقر مرتين مع تثبيت إصبعك لنقل اختصار أو استخدام الإجراءات المخصّصة."</string>
     <string name="out_of_space" msgid="6692471482459245734">"ما مِن مساحة على هذه الشاشة الرئيسية."</string>
     <string name="hotseat_out_of_space" msgid="7448809638125333693">"لا يوجد المزيد من الحقول في علبة المفضلة"</string>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 521ade4..d83776c 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -48,7 +48,7 @@
     <string name="widget_button_text" msgid="2880537293434387943">"Widgets"</string>
     <string name="widgets_full_sheet_search_bar_hint" msgid="8484659090860596457">"Suche"</string>
     <string name="widgets_full_sheet_cancel_button_description" msgid="5766167035728653605">"Text aus dem Suchfeld löschen"</string>
-    <string name="no_widgets_available" msgid="4337693382501046170">"Widgets und Shortcuts nicht verfügbar"</string>
+    <string name="no_widgets_available" msgid="4337693382501046170">"Widgets und Verknüpfungen nicht verfügbar"</string>
     <string name="no_search_results" msgid="3787956167293097509">"Keine Widgets oder Verknüpfungen gefunden"</string>
     <string name="widgets_full_sheet_personal_tab" msgid="2743540105607120182">"Privat"</string>
     <string name="widgets_full_sheet_work_tab" msgid="3767150027110633765">"Geschäftlich"</string>
@@ -64,7 +64,7 @@
     <string name="all_apps_search_market_message" msgid="1366263386197059176">"Weitere Apps suchen"</string>
     <string name="label_application" msgid="8531721983832654978">"App"</string>
     <string name="notifications_header" msgid="1404149926117359025">"Benachrichtigungen"</string>
-    <string name="long_press_shortcut_to_add" msgid="5405328730817637737">"Tippen und halten, um eine Verknüpfung zu bewegen."</string>
+    <string name="long_press_shortcut_to_add" msgid="5405328730817637737">"Zum Verschieben einer Verknüpfung berühren und halten"</string>
     <string name="long_accessible_way_to_add_shortcut" msgid="2199537273817090740">"Doppeltippen und halten, um eine Verknüpfung zu bewegen oder benutzerdefinierte Aktionen zu nutzen."</string>
     <string name="out_of_space" msgid="6692471482459245734">"Auf diesem Startbildschirm ist kein Platz mehr vorhanden"</string>
     <string name="hotseat_out_of_space" msgid="7448809638125333693">"Ablage \"Favoriten\" ist voll."</string>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index 36387ac..eca881f1f 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -158,12 +158,12 @@
     <string name="all_apps_personal_tab" msgid="4190252696685155002">"Personales"</string>
     <string name="all_apps_work_tab" msgid="4884822796154055118">"De trabajo"</string>
     <string name="work_profile_toggle_label" msgid="3081029915775481146">"Perfil de trabajo"</string>
-    <string name="work_profile_edu_work_apps" msgid="7895468576497746520">"Las apps de trabajo tienen una insignia y el administrador de IT las puede ver"</string>
+    <string name="work_profile_edu_work_apps" msgid="7895468576497746520">"Las apps de trabajo tienen una insignia y el administrador de TI las puede ver"</string>
     <string name="work_profile_edu_accept" msgid="6069788082535149071">"Entendido"</string>
     <string name="work_apps_paused_title" msgid="3040901117349444598">"Las apps de trabajo están detenidas"</string>
     <string name="work_apps_paused_body" msgid="261634750995824906">"Las apps de trabajo no pueden enviarte notificaciones, usar la batería ni acceder a tu ubicación"</string>
     <string name="work_apps_paused_content_description" msgid="5149623040804051095">"Las apps de trabajo están desactivadas y, por ende, no pueden enviarte notificaciones, usar la batería ni acceder a tu ubicación"</string>
-    <string name="work_apps_paused_edu_banner" msgid="8872412121608402058">"Las apps de trabajo tienen una insignia y el administrador de IT las puede ver"</string>
+    <string name="work_apps_paused_edu_banner" msgid="8872412121608402058">"Las apps de trabajo tienen una insignia y el administrador de TI las puede ver"</string>
     <string name="work_apps_paused_edu_accept" msgid="6377476824357318532">"Entendido"</string>
     <string name="work_apps_pause_btn_text" msgid="1921059713673767460">"Desactivar las apps de trabajo"</string>
     <string name="work_apps_enable_btn_text" msgid="1156432622148413741">"Activar las apps de trabajo"</string>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index c061796..633ca2d 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -64,7 +64,7 @@
     <string name="all_apps_search_market_message" msgid="1366263386197059176">"Rechercher plus d\'applications"</string>
     <string name="label_application" msgid="8531721983832654978">"Application"</string>
     <string name="notifications_header" msgid="1404149926117359025">"Notifications"</string>
-    <string name="long_press_shortcut_to_add" msgid="5405328730817637737">"Appuyez de manière prolongée pour déplacer raccourci."</string>
+    <string name="long_press_shortcut_to_add" msgid="5405328730817637737">"Appuyez de manière prolongée pour déplacer un raccourci."</string>
     <string name="long_accessible_way_to_add_shortcut" msgid="2199537273817090740">"Appuyez deux fois et maintenez la pression pour déplacer un raccourci ou utiliser les actions personnalisées."</string>
     <string name="out_of_space" msgid="6692471482459245734">"Espace insuffisant sur cet écran d\'accueil"</string>
     <string name="hotseat_out_of_space" msgid="7448809638125333693">"Plus d\'espace disponible dans la zone de favoris."</string>
diff --git a/res/values-gu/strings.xml b/res/values-gu/strings.xml
index 695b128..2a154bf 100644
--- a/res/values-gu/strings.xml
+++ b/res/values-gu/strings.xml
@@ -79,10 +79,10 @@
     <string name="pin_prediction" msgid="4196423321649756498">"પૂર્વાનુમાનને પિન કરો"</string>
     <string name="permlab_install_shortcut" msgid="5632423390354674437">"શૉર્ટકટ ઇન્સ્ટૉલ કરો"</string>
     <string name="permdesc_install_shortcut" msgid="923466509822011139">"એપ્લિકેશનને વપરાશકર્તા હસ્તક્ષેપ વગર શોર્ટકટ્સ ઉમેરવાની મંજૂરી આપે છે."</string>
-    <string name="permlab_read_settings" msgid="1941457408239617576">"હોમ સેટિંગ્સ અને શોર્ટકટ્સ વાંચો"</string>
-    <string name="permdesc_read_settings" msgid="5833423719057558387">"એપ્લિકેશનને હોમમાં સેટિંગ્સ અને શોર્ટકટ્સ વાંચવાની મંજૂરી આપે છે."</string>
-    <string name="permlab_write_settings" msgid="3574213698004620587">"હોમ સેટિંગ્સ અને શોર્ટકટ્સ લખો"</string>
-    <string name="permdesc_write_settings" msgid="5440712911516509985">"એપ્લિકેશનને હોમમાં સેટિંગ્સ અને શોર્ટકટ્સ બદલવાની મંજૂરી આપે છે."</string>
+    <string name="permlab_read_settings" msgid="1941457408239617576">"હોમ સેટિંગ અને શૉર્ટકટ વાંચો"</string>
+    <string name="permdesc_read_settings" msgid="5833423719057558387">"ઍપને હોમમાં સેટિંગ અને શૉર્ટકટ વાંચવાની મંજૂરી આપે છે."</string>
+    <string name="permlab_write_settings" msgid="3574213698004620587">"હોમ સેટિંગ અને શૉર્ટકટ લખો"</string>
+    <string name="permdesc_write_settings" msgid="5440712911516509985">"ઍપને હોમમાં સેટિંગ અને શૉર્ટકટ બદલવાની મંજૂરી આપે છે."</string>
     <string name="msg_no_phone_permission" msgid="9208659281529857371">"<xliff:g id="APP_NAME">%1$s</xliff:g> ને ફોન કૉલ્સ કરવાની મંજૂરી નથી"</string>
     <string name="gadget_error_text" msgid="740356548025791839">"વિજેટ લોડ કરી શકાતું નથી"</string>
     <string name="gadget_setup_text" msgid="1745356155479272374">"સેટઅપ પૂર્ણ કરવા માટે ટૅપ કરો"</string>
@@ -114,7 +114,7 @@
     <string name="notification_dots_desc_off" msgid="1760796511504341095">"બંધ છે"</string>
     <string name="title_missing_notification_access" msgid="7503287056163941064">"નોટિફિકેશનનો ઍક્સેસની જરૂરી છે"</string>
     <string name="msg_missing_notification_access" msgid="281113995110910548">"નોટિફિકેશન માટેનું ચિહ્ન બતાવવા હેતુ, <xliff:g id="NAME">%1$s</xliff:g> માટેની ઍપ્લિકેશન નોટિફિકેશન ચાલુ કરો"</string>
-    <string name="title_change_settings" msgid="1376365968844349552">"સેટિંગ્સ બદલો"</string>
+    <string name="title_change_settings" msgid="1376365968844349552">"સેટિંગ બદલો"</string>
     <string name="notification_dots_service_title" msgid="4284221181793592871">"નોટિફિકેશન માટેના ચિહ્ન બતાવો"</string>
     <string name="auto_add_shortcuts_label" msgid="3698776050751790653">"ઍપના આઇકન હોમ સ્ક્રીન પર ઉમેરો"</string>
     <string name="auto_add_shortcuts_description" msgid="7117251166066978730">"નવી ઍપ માટે"</string>
diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml
index a7f67bc..d3558ec 100644
--- a/res/values-in/strings.xml
+++ b/res/values-in/strings.xml
@@ -20,7 +20,7 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_name" msgid="649227358658669779">"Launcher3"</string>
-    <string name="work_folder_name" msgid="3753320833950115786">"Kantor"</string>
+    <string name="work_folder_name" msgid="3753320833950115786">"Kerja"</string>
     <string name="activity_not_found" msgid="8071924732094499514">"Aplikasi tidak dipasang."</string>
     <string name="activity_not_available" msgid="7456344436509528827">"Aplikasi tidak tersedia"</string>
     <string name="safemode_shortcut_error" msgid="9160126848219158407">"Aplikasi yang didownload dinonaktifkan dalam mode Aman"</string>
@@ -51,7 +51,7 @@
     <string name="no_widgets_available" msgid="4337693382501046170">"Widget dan pintasan tidak tersedia"</string>
     <string name="no_search_results" msgid="3787956167293097509">"Tidak ada widget atau pintasan yang ditemukan"</string>
     <string name="widgets_full_sheet_personal_tab" msgid="2743540105607120182">"Pribadi"</string>
-    <string name="widgets_full_sheet_work_tab" msgid="3767150027110633765">"Kantor"</string>
+    <string name="widgets_full_sheet_work_tab" msgid="3767150027110633765">"Kerja"</string>
     <string name="widget_category_conversations" msgid="8894438636213590446">"Percakapan"</string>
     <string name="widget_education_header" msgid="4874760613775913787">"Info bermanfaat mudah dilihat"</string>
     <string name="widget_education_content" msgid="745542879510751525">"Untuk mendapatkan info tanpa membuka aplikasi, Anda dapat menambahkan widget ke Layar utama"</string>
diff --git a/res/values-ky/strings.xml b/res/values-ky/strings.xml
index ae0416d..c21a941 100644
--- a/res/values-ky/strings.xml
+++ b/res/values-ky/strings.xml
@@ -154,7 +154,7 @@
     <string name="shortcuts_menu_with_notifications_description" msgid="2676582286544232849">"Кыска жолдор жана билдирмелер"</string>
     <string name="action_dismiss_notification" msgid="5909461085055959187">"Этибарга албоо"</string>
     <string name="accessibility_close" msgid="2277148124685870734">"Жабуу"</string>
-    <string name="notification_dismissed" msgid="6002233469409822874">"Эскертме көз жаздымда калтырылды"</string>
+    <string name="notification_dismissed" msgid="6002233469409822874">"Билдирме жабылды"</string>
     <string name="all_apps_personal_tab" msgid="4190252696685155002">"Жеке колдонмолор"</string>
     <string name="all_apps_work_tab" msgid="4884822796154055118">"Жумуш колдонмолору"</string>
     <string name="work_profile_toggle_label" msgid="3081029915775481146">"Жумуш профили"</string>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index 1df4726..1d5321b 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -68,7 +68,7 @@
     <string name="all_apps_search_market_message" msgid="1366263386197059176">"Wyszukaj więcej aplikacji"</string>
     <string name="label_application" msgid="8531721983832654978">"Aplikacja"</string>
     <string name="notifications_header" msgid="1404149926117359025">"Powiadomienia"</string>
-    <string name="long_press_shortcut_to_add" msgid="5405328730817637737">"Naciśnij i przytrzymaj, aby wybrać skrót."</string>
+    <string name="long_press_shortcut_to_add" msgid="5405328730817637737">"Naciśnij i przytrzymaj, aby przenieść skrót."</string>
     <string name="long_accessible_way_to_add_shortcut" msgid="2199537273817090740">"Naciśnij dwukrotnie i przytrzymaj, aby przenieść skrót lub użyć działań niestandardowych."</string>
     <string name="out_of_space" msgid="6692471482459245734">"Brak miejsca na tym ekranie głównym"</string>
     <string name="hotseat_out_of_space" msgid="7448809638125333693">"Brak miejsca w Ulubionych"</string>
diff --git a/res/xml/size_limits_80x104.xml b/res/xml/size_limits_80x104.xml
index f5ca757..4178664 100644
--- a/res/xml/size_limits_80x104.xml
+++ b/res/xml/size_limits_80x104.xml
@@ -31,32 +31,72 @@
     </device-padding>
 
     <device-padding
-        launcher:maxEmptySpace="97dp">
+        launcher:maxEmptySpace="100dp">
         <workspaceTopPadding
             launcher:a="0"
-            launcher:b="16dp"/>
+            launcher:b="9dp"/>
         <workspaceBottomPadding
-            launcher:a="0.56"
+            launcher:a="0.40"
             launcher:b="0"
-            launcher:c="16dp"/>
+            launcher:c="9dp"/>
         <hotseatBottomPadding
-            launcher:a="0.44"
+            launcher:a="0.60"
             launcher:b="0"
-            launcher:c="16dp"/>
+            launcher:c="9dp"/>
+    </device-padding>
+
+    <device-padding
+        launcher:maxEmptySpace="103dp">
+        <workspaceTopPadding
+            launcher:a="0"
+            launcher:b="26dp"/>
+        <workspaceBottomPadding
+            launcher:a="0"
+            launcher:b="20dp"/>
+        <hotseatBottomPadding
+            launcher:a="1"
+            launcher:b="0"
+            launcher:c="46dp"/>
     </device-padding>
 
     <device-padding
         launcher:maxEmptySpace="107dp">
         <workspaceTopPadding
             launcher:a="0"
-            launcher:b="16dp"/>
+            launcher:b="9dp"/>
         <workspaceBottomPadding
             launcher:a="0"
-            launcher:b="36dp"/>
+            launcher:b="34dp"/>
         <hotseatBottomPadding
             launcher:a="1"
             launcher:b="0"
-            launcher:c="52dp"/>
+            launcher:c="43dp"/>
+    </device-padding>
+
+    <device-padding
+        launcher:maxEmptySpace="120dp">
+        <workspaceTopPadding
+            launcher:a="0"
+            launcher:b="16dp"/>
+        <workspaceBottomPadding
+            launcher:a="1"
+            launcher:c="72dp"/>
+        <hotseatBottomPadding
+            launcher:a="0"
+            launcher:b="56dp"/>
+    </device-padding>
+
+    <device-padding
+        launcher:maxEmptySpace="135dp">
+        <workspaceTopPadding
+            launcher:a="0"
+            launcher:b="39dp"/>
+        <workspaceBottomPadding
+            launcher:a="1"
+            launcher:c="95dp"/>
+        <hotseatBottomPadding
+            launcher:a="0"
+            launcher:b="56dp"/>
     </device-padding>
 
     <device-padding
@@ -71,5 +111,4 @@
             launcher:a="0"
             launcher:b="36dp"/>
     </device-padding>
-
 </device-paddings>
\ No newline at end of file
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index 5a3e7dd..9ca753d 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -90,6 +90,7 @@
     private static final float MAX_HORIZONTAL_PADDING_PERCENT = 0.14f;
 
     private static final float TALL_DEVICE_ASPECT_RATIO_THRESHOLD = 2.0f;
+    private static final float TALLER_DEVICE_ASPECT_RATIO_THRESHOLD = 2.15f;
 
     // To evenly space the icons, increase the left/right margins for tablets in portrait mode.
     private static final int PORTRAIT_TABLET_LEFT_RIGHT_PADDING_MULTIPLIER = 4;
@@ -149,12 +150,13 @@
     public int folderChildDrawablePaddingPx;
 
     // Hotseat
+    public int hotseatBarSizeExtraSpacePx;
     public final int numShownHotseatIcons;
     public int hotseatCellHeightPx;
     private final int hotseatExtraVerticalSize;
     // In portrait: size = height, in landscape: size = width
     public int hotseatBarSizePx;
-    public final int hotseatBarTopPaddingPx;
+    public int hotseatBarTopPaddingPx;
     public final int hotseatBarBottomPaddingPx;
     // Start is the side next to the nav bar, end is the side next to the workspace
     public final int hotseatBarSidePaddingStartPx;
@@ -323,6 +325,7 @@
                 isTwoPanels ? inv.numDatabaseHotseatIcons : inv.numShownHotseatIcons;
         numShownAllAppsColumns =
                 isTwoPanels ? inv.numDatabaseAllAppsColumns : inv.numAllAppsColumns;
+        hotseatBarSizeExtraSpacePx = 0;
         hotseatBarTopPaddingPx =
                 res.getDimensionPixelSize(R.dimen.dynamic_grid_hotseat_top_padding);
         hotseatBarBottomPaddingPx = (isTallDevice ? 0
@@ -353,6 +356,7 @@
 
         // Calculate all of the remaining variables.
         extraSpace = updateAvailableDimensions(res);
+
         // Now that we have all of the variables calculated, we can tune certain sizes.
         if (isScalableGrid && inv.devicePaddings != null) {
             // Paddings were created assuming no scaling, so we first unscale the extra space.
@@ -372,12 +376,25 @@
             qsbBottomMarginPx = Math.round(qsbBottomMarginOriginalPx * cellScaleToFit);
         } else if (!isVerticalBarLayout() && isPhone && isTallDevice) {
             // We increase the hotseat size when there is extra space.
-            // ie. For a display with a large aspect ratio, we can keep the icons on the workspace
-            // in portrait mode closer together by adding more height to the hotseat.
-            // Note: This calculation was created after noticing a pattern in the design spec.
-            int extraSpace = getCellSize().y - iconSizePx - iconDrawablePaddingPx * 2
-                    - workspacePageIndicatorHeight;
-            hotseatBarSizePx += extraSpace;
+
+            if (Float.compare(aspectRatio, TALLER_DEVICE_ASPECT_RATIO_THRESHOLD) >= 0) {
+                // For taller devices, we will take a third of the extra space from each row,
+                // and add it to the space above and below the hotseat.
+                int extraSpace = ((getCellSize().y - iconSizePx - iconDrawablePaddingPx * 2)
+                        * inv.numRows) / 3;
+
+                int halfExtraSpace = extraSpace / 2;
+                hotseatBarTopPaddingPx += halfExtraSpace;
+                hotseatBarSizeExtraSpacePx = halfExtraSpace;
+            } else {
+                // ie. For a display with a large aspect ratio, we can keep the icons on the
+                // workspace in portrait mode closer together by adding more height to the hotseat.
+                // Note: This calculation was created after noticing a pattern in the design spec.
+                hotseatBarSizeExtraSpacePx = getCellSize().y - iconSizePx
+                        - iconDrawablePaddingPx * 2 - workspacePageIndicatorHeight;
+            }
+
+            updateHotseatIconSize(iconSizePx);
 
             // Recalculate the available dimensions using the new hotseat size.
             updateAvailableDimensions(res);
@@ -402,7 +419,8 @@
                     + hotseatBarSidePaddingEndPx;
         } else {
             hotseatBarSizePx = hotseatIconSizePx + hotseatBarTopPaddingPx
-                    + hotseatBarBottomPaddingPx + (isScalableGrid ? 0 : hotseatExtraVerticalSize);
+                    + hotseatBarBottomPaddingPx + (isScalableGrid ? 0 : hotseatExtraVerticalSize)
+                    + hotseatBarSizeExtraSpacePx;
         }
     }
 
@@ -652,8 +670,11 @@
         int textHeight = Utilities.calculateTextHeight(folderChildTextSizePx);
 
         if (isScalableGrid) {
-            folderCellWidthPx = (int) (cellWidthPx * scale);
-            folderCellHeightPx = (int) (cellHeightPx * scale);
+            int minWidth = folderChildIconSizePx + iconDrawablePaddingPx * 2;
+            int minHeight = folderChildIconSizePx + iconDrawablePaddingPx * 2 + textHeight;
+
+            folderCellWidthPx = (int) Math.max(minWidth, cellWidthPx * scale);
+            folderCellHeightPx = (int) Math.max(minHeight, cellHeightPx * scale);
 
             int borderSpacing = (int) (cellLayoutBorderSpacingOriginalPx * scale);
             folderCellLayoutBorderSpacingPx = borderSpacing;
diff --git a/src/com/android/launcher3/Hotseat.java b/src/com/android/launcher3/Hotseat.java
index 0a6f06c..eaca162 100644
--- a/src/com/android/launcher3/Hotseat.java
+++ b/src/com/android/launcher3/Hotseat.java
@@ -207,7 +207,7 @@
                 ? dp.workspacePadding.bottom
                 : dp.hotseatBarSizePx - dp.hotseatCellHeightPx - mQsbHeight;
 
-        if (dp.isScalableGrid) {
+        if (dp.isScalableGrid && dp.qsbBottomMarginPx > dp.getInsets().bottom) {
             return Math.min(dp.qsbBottomMarginPx, freeSpace);
         } else {
             return (int) (freeSpace * QSB_CENTER_FACTOR) + (dp.isTaskbarPresent