fix: Conflict incoming changes from 15-dev

This commit is contained in:
Pun Butrach committed 2026-01-10 20:49:12 +07:00
1 parent 14e352c827
commit 2e76c99dad
1726 files changed
+146970 -95027

No files matched your search

@@ -43,6 +43,7 @@ import com.android.launcher3.keyboard.ViewGroupFocusHelper;
import com.android.launcher3.logging.InstanceId;
import com.android.launcher3.logging.InstanceIdSequence;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.model.data.LauncherAppWidgetInfo;
import com.android.launcher3.util.PendingRequestArgs;
import com.android.launcher3.views.ArrowTipView;
import com.android.launcher3.widget.LauncherAppWidgetHostView;
@@ -299,17 +300,27 @@ public class AppWidgetResizeFrame extends AbstractFloatingView implements View.O
mMaxVSpan = info.maxSpanY;
}
LauncherAppWidgetInfo widgetInfoOnView = (LauncherAppWidgetInfo) mWidgetView.getTag();
// Only show resize handles for the directions in which resizing is possible.
mVerticalResizeActive = (resizeMode & AppWidgetProviderInfo.RESIZE_VERTICAL) != 0
&& mMinVSpan < idp.numRows && mMaxVSpan > 1
&& mMinVSpan < mMaxVSpan;
// on font / display change, the dp/px size of a cell changes, which means, existing spans
// may be invalid. User should be able to resize to the correct widget size.
boolean isWidgetVSpanInvalid = widgetInfoOnView.spanY < mMinVSpan;
mVerticalResizeActive = (info.resizeMode & AppWidgetProviderInfo.RESIZE_VERTICAL) != 0 && (
(mMinVSpan < idp.numRows && mMaxVSpan > 1 && mMinVSpan < mMaxVSpan)
|| isWidgetVSpanInvalid);
if (!mVerticalResizeActive) {
mDragHandles[INDEX_TOP].setVisibility(GONE);
mDragHandles[INDEX_BOTTOM].setVisibility(GONE);
}
mHorizontalResizeActive = (resizeMode & AppWidgetProviderInfo.RESIZE_HORIZONTAL) != 0
&& mMinHSpan < idp.numColumns && mMaxHSpan > 1
&& mMinHSpan < mMaxHSpan;
// on font / display change, the dp/px size of a cell changes, which means, existing spans
// may be invalid. User should be able to resize to the correct widget size.
boolean isWidgetHSpanInvalid = widgetInfoOnView.spanX < mMinHSpan;
mHorizontalResizeActive =
(info.resizeMode & AppWidgetProviderInfo.RESIZE_HORIZONTAL) != 0 && (
(mMinHSpan < idp.numColumns && mMaxHSpan > 1 && mMinHSpan < mMaxHSpan)
|| isWidgetHSpanInvalid);
if (!mHorizontalResizeActive) {
mDragHandles[INDEX_LEFT].setVisibility(GONE);
mDragHandles[INDEX_RIGHT].setVisibility(GONE);