diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-07-31 03:08:29 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-07-31 03:08:29 +0000 |
commit | 12ae3c17b7a817c94e6c13b814a4dfa12dd6c9e1 (patch) | |
tree | 072bc6ce1064a4d495274308389ddc4dd891fcf3 | |
parent | 1cf23d416a65a0c5f4779254ef7f05af72a6ffb4 (diff) | |
parent | 4a17e661661fb8af74126288e3de0449586ea8b3 (diff) | |
download | Launcher3-12ae3c17b7a817c94e6c13b814a4dfa12dd6c9e1.tar.gz |
Snap for 7599941 from 4a17e661661fb8af74126288e3de0449586ea8b3 to sc-release
Change-Id: Ied8d17346b095b07719bbdb41aeb5429a7a18096
-rw-r--r-- | quickstep/src/com/android/quickstep/FallbackActivityInterface.java | 7 | ||||
-rw-r--r-- | res/values-ar/strings.xml | 2 | ||||
-rw-r--r-- | res/values-in/strings.xml | 2 | ||||
-rw-r--r-- | res/values-ru/strings.xml | 2 | ||||
-rw-r--r-- | src/com/android/launcher3/DeviceProfile.java | 14 |
5 files changed, 17 insertions, 10 deletions
diff --git a/quickstep/src/com/android/quickstep/FallbackActivityInterface.java b/quickstep/src/com/android/quickstep/FallbackActivityInterface.java index f29d68a72a..7fb8e16063 100644 --- a/quickstep/src/com/android/quickstep/FallbackActivityInterface.java +++ b/quickstep/src/com/android/quickstep/FallbackActivityInterface.java @@ -107,10 +107,9 @@ public final class FallbackActivityInterface extends public RecentsView getVisibleRecentsView() { RecentsActivity activity = getCreatedActivity(); if (activity != null) { - RecentsView recentsView = activity.getOverviewPanel(); - if (activity.hasBeenResumed() || (ENABLE_QUICKSTEP_LIVE_TILE.get() && isInLiveTileMode() - && recentsView.getRunningTaskId() == -1)) { - return recentsView; + if (activity.hasBeenResumed() + || (ENABLE_QUICKSTEP_LIVE_TILE.get() && isInLiveTileMode())) { + return activity.getOverviewPanel(); } } return null; diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml index b5b8b62450..2b8b9fa454 100644 --- a/res/values-ar/strings.xml +++ b/res/values-ar/strings.xml @@ -122,7 +122,7 @@ <string name="allow_rotation_title" msgid="7728578836261442095">"السماح بتدوير الشاشة الرئيسية"</string> <string name="allow_rotation_desc" msgid="8662546029078692509">"عند تدوير الهاتف"</string> <string name="notification_dots_title" msgid="9062440428204120317">"نقاط الإشعارات"</string> - <string name="notification_dots_desc_on" msgid="1679848116452218908">"مفعّل"</string> + <string name="notification_dots_desc_on" msgid="1679848116452218908">"مفعّلة"</string> <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> diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml index d3558ec2a0..673a4460bf 100644 --- a/res/values-in/strings.xml +++ b/res/values-in/strings.xml @@ -105,7 +105,7 @@ <string name="folder_name_format_overflow" msgid="4270108890534995199">"Folder: <xliff:g id="NAME">%1$s</xliff:g>, <xliff:g id="SIZE">%2$d</xliff:g> item atau lebih"</string> <string name="wallpaper_button_text" msgid="8404103075899945851">"Wallpaper"</string> <string name="styles_wallpaper_button_text" msgid="8216961355289236794">"Wallpaper & gaya"</string> - <string name="settings_button_text" msgid="8873672322605444408">"Setelan layar utama"</string> + <string name="settings_button_text" msgid="8873672322605444408">"Setelan Layar utama"</string> <string name="msg_disabled_by_admin" msgid="6898038085516271325">"Dinonaktifkan oleh admin"</string> <string name="allow_rotation_title" msgid="7728578836261442095">"Izinkan Layar utama diputar"</string> <string name="allow_rotation_desc" msgid="8662546029078692509">"Saat ponsel diputar"</string> diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml index 85d7db62d4..241554261d 100644 --- a/res/values-ru/strings.xml +++ b/res/values-ru/strings.xml @@ -75,7 +75,7 @@ <string name="all_apps_button_label" msgid="8130441508702294465">"Список приложений"</string> <string name="all_apps_button_personal_label" msgid="1315764287305224468">"Открыть список личных приложений"</string> <string name="all_apps_button_work_label" msgid="7270707118948892488">"Открыть список приложений для работы"</string> - <string name="remove_drop_target_label" msgid="7812859488053230776">"Убрать"</string> + <string name="remove_drop_target_label" msgid="7812859488053230776">"Удалить"</string> <string name="uninstall_drop_target_label" msgid="4722034217958379417">"Удалить"</string> <string name="app_info_drop_target_label" msgid="692894985365717661">"О приложении"</string> <string name="install_drop_target_label" msgid="2539096853673231757">"Установить"</string> diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index 9ca753dd92..59962dd795 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -91,6 +91,8 @@ public class DeviceProfile { private static final float TALL_DEVICE_ASPECT_RATIO_THRESHOLD = 2.0f; private static final float TALLER_DEVICE_ASPECT_RATIO_THRESHOLD = 2.15f; + private static final float TALL_DEVICE_EXTRA_SPACE_THRESHOLD_DP = 252; + private static final float TALL_DEVICE_MORE_EXTRA_SPACE_THRESHOLD_DP = 268; // 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; @@ -377,11 +379,17 @@ public class DeviceProfile { } else if (!isVerticalBarLayout() && isPhone && isTallDevice) { // We increase the hotseat size when there is extra space. - 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, + if (Float.compare(aspectRatio, TALLER_DEVICE_ASPECT_RATIO_THRESHOLD) >= 0 + && extraSpace >= Utilities.dpToPx(TALL_DEVICE_EXTRA_SPACE_THRESHOLD_DP)) { + // For taller devices, we will take a piece of the extra space from each row, // and add it to the space above and below the hotseat. + + // For devices with more extra space, we take a larger piece from each cell. + int piece = extraSpace < Utilities.dpToPx(TALL_DEVICE_MORE_EXTRA_SPACE_THRESHOLD_DP) + ? 5 : 3; + int extraSpace = ((getCellSize().y - iconSizePx - iconDrawablePaddingPx * 2) - * inv.numRows) / 3; + * inv.numRows) / piece; int halfExtraSpace = extraSpace / 2; hotseatBarTopPaddingPx += halfExtraSpace; |