Merge changes from topic 'am-9a69b851-360f-46eb-9a97-9f3b6fb5a05d' into ub-launcher3-master
* changes:
[automerger] Defer some work until after workspace fade-in am: 2917a8bf2b
Defer some work until after workspace fade-in
diff --git a/go/res/values-pa/strings.xml b/go/res/values-pa/strings.xml
index fdb3c74..f3982ab 100644
--- a/go/res/values-pa/strings.xml
+++ b/go/res/values-pa/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="long_press_widget_to_add" msgid="4001616142797446267">"ਕੋਈ ਸ਼ਾਰਟਕੱਟ ਚੁਣਨ ਲਈ ਸਪੱਰਸ਼ ਕਰੋ ਅਤੇ ਦਬਾ ਕੇ ਰੱਖੋ।"</string>
- <string name="long_accessible_way_to_add" msgid="2725225828389948328">"ਕੋਈ ਸ਼ਾਰਟਕੱਟ ਚੁਣਨ ਜਾਂ ਵਿਸ਼ੇਸ਼-ਵਿਉਂਤਬੱਧ ਕਾਰਵਾਈਆਂ ਵਰਤਣ ਲਈ ਡਬਲ-ਟੈਪ ਕਰੋ ਅਤੇ ਦਬਾ ਕੇ ਰੱਖੋ।"</string>
+ <string name="long_accessible_way_to_add" msgid="2725225828389948328">"ਕੋਈ ਸ਼ਾਰਟਕੱਟ ਚੁਣਨ ਲਈ ਡਬਲ-ਟੈਪ ਕਰੋ ਅਤੇ ਦਬਾ ਕੇ ਰੱਖੋ ਜਾਂ ਵਿਸ਼ੇਸ਼-ਵਿਉਂਤਬੱਧ ਕਾਰਵਾਈਆਂ ਵਰਤੋ।"</string>
<string name="widget_button_text" msgid="4221900832360456858">"ਸ਼ਾਰਟਕੱਟ"</string>
<string name="widgets_bottom_sheet_title" msgid="3949835990909395998">"<xliff:g id="NAME">%1$s</xliff:g> ਸ਼ਾਰਟਕੱਟ"</string>
</resources>
diff --git a/go/res/values-vi/strings.xml b/go/res/values-vi/strings.xml
index 84ed627..1197619 100644
--- a/go/res/values-vi/strings.xml
+++ b/go/res/values-vi/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="long_press_widget_to_add" msgid="4001616142797446267">"Chạm và giữ để chọn lối tắt."</string>
- <string name="long_accessible_way_to_add" msgid="2725225828389948328">"Nhấn đúp và giữ để chọn lối tắt hoặc sử dụng tác vụ tùy chỉnh."</string>
+ <string name="long_accessible_way_to_add" msgid="2725225828389948328">"Nhấn đúp và giữ để chọn lối tắt hoặc sử dụng hành động tùy chỉnh."</string>
<string name="widget_button_text" msgid="4221900832360456858">"Lối tắt"</string>
<string name="widgets_bottom_sheet_title" msgid="3949835990909395998">"Lối tắt <xliff:g id="NAME">%1$s</xliff:g>"</string>
</resources>
diff --git a/go/src_flags/com/android/launcher3/config/FeatureFlags.java b/go/src_flags/com/android/launcher3/config/FeatureFlags.java
index 5bb2ac9..b11bb7c 100644
--- a/go/src_flags/com/android/launcher3/config/FeatureFlags.java
+++ b/go/src_flags/com/android/launcher3/config/FeatureFlags.java
@@ -25,4 +25,5 @@
// Features to control Launcher3Go behavior
public static final boolean GO_DISABLE_WIDGETS = true;
+ public static final boolean LAUNCHER3_SPRING_ICONS = false;
}
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java
index aac8005..3ebccda 100644
--- a/src/com/android/launcher3/CellLayout.java
+++ b/src/com/android/launcher3/CellLayout.java
@@ -780,7 +780,7 @@
return mCellWidth;
}
- int getCellHeight() {
+ public int getCellHeight() {
return mCellHeight;
}
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index 60c19bc..150bc53 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -365,7 +365,7 @@
if (isVerticalBarLayout()) {
hotseatBarSizePx = iconSizePx;
}
- hotseatCellHeightPx = iconSizePx + iconDrawablePaddingPx;
+ hotseatCellHeightPx = iconSizePx;
if (!isVerticalBarLayout()) {
int expectedWorkspaceHeight = availableHeightPx - hotseatBarSizePx
diff --git a/src/com/android/launcher3/ShortcutAndWidgetContainer.java b/src/com/android/launcher3/ShortcutAndWidgetContainer.java
index fd708c0..a7e68ff 100644
--- a/src/com/android/launcher3/ShortcutAndWidgetContainer.java
+++ b/src/com/android/launcher3/ShortcutAndWidgetContainer.java
@@ -101,7 +101,7 @@
mInvertIfRtl = invert;
}
- int getCellContentHeight() {
+ public int getCellContentHeight() {
return Math.min(getMeasuredHeight(),
mLauncher.getDeviceProfile().getCellHeight(mContainerType));
}
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 1f79154..bdeed4c 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -643,7 +643,8 @@
newScreen.setSoundEffectsEnabled(false);
int paddingLeftRight = mLauncher.getDeviceProfile().cellLayoutPaddingLeftRightPx;
- newScreen.setPadding(paddingLeftRight, 0, paddingLeftRight, 0);
+ int paddingBottom = mLauncher.getDeviceProfile().cellLayoutBottomPaddingPx;
+ newScreen.setPadding(paddingLeftRight, 0, paddingLeftRight, paddingBottom);
mWorkspaceScreens.put(screenId, newScreen);
mScreenOrder.add(insertIndex, screenId);
diff --git a/src/com/android/launcher3/dragndrop/DragView.java b/src/com/android/launcher3/dragndrop/DragView.java
index b6e38bb..e81e2a3 100644
--- a/src/com/android/launcher3/dragndrop/DragView.java
+++ b/src/com/android/launcher3/dragndrop/DragView.java
@@ -218,6 +218,12 @@
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(info, appState, outObj[0]);
+ mBadge.setBounds(badgeBounds);
+
Utilities.scaleRectAboutCenter(bounds,
IconNormalizer.getInstance(mLauncher).getScale(dr, null, null, null));
AdaptiveIconDrawable adaptiveIcon = (AdaptiveIconDrawable) dr;
@@ -234,9 +240,6 @@
mTranslateY = new SpringFloatValue(DragView.this,
h * AdaptiveIconDrawable.getExtraInsetFraction());
- mBadge = getBadge(info, appState, outObj[0]);
- mBadge.setBounds(bounds);
-
bounds.inset(
(int) (-bounds.width() * AdaptiveIconDrawable.getExtraInsetFraction()),
(int) (-bounds.height() * AdaptiveIconDrawable.getExtraInsetFraction())