Merge branch 'heads/android-14.0.0_r18' into 14-dev
This commit is contained in:
1 parent
32700b0100
commit
cc8f9828ab
756 files changed
+23785
-12235
No files matched your search
@@ -18,6 +18,7 @@
|
||||
|
||||
package com.android.launcher3.folder;
|
||||
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_CURSOR_HOVER_STATES;
|
||||
import static com.android.launcher3.folder.ClippedFolderIconLayoutRule.ICON_OVERLAP_FACTOR;
|
||||
import static com.android.launcher3.folder.ClippedFolderIconLayoutRule.MAX_NUM_ITEMS_IN_PREVIEW;
|
||||
import static com.android.launcher3.folder.PreviewItemManager.INITIAL_ITEM_ANIMATION_DURATION;
|
||||
@@ -44,6 +45,7 @@ import android.widget.FrameLayout;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.app.animation.Interpolators;
|
||||
import com.android.launcher3.Alarm;
|
||||
import com.android.launcher3.BubbleTextView;
|
||||
import com.android.launcher3.CellLayout;
|
||||
@@ -58,7 +60,6 @@ import com.android.launcher3.Reorderable;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.Workspace;
|
||||
import com.android.launcher3.allapps.ActivityAllAppsContainerView;
|
||||
import com.android.launcher3.anim.Interpolators;
|
||||
import com.android.launcher3.celllayout.CellLayoutLayoutParams;
|
||||
import com.android.launcher3.dot.FolderDotInfo;
|
||||
import com.android.launcher3.dragndrop.BaseItemDragListener;
|
||||
@@ -265,7 +266,6 @@ public class FolderIcon extends FrameLayout implements FolderListener, IconLabel
|
||||
private boolean willAcceptItem(ItemInfo item) {
|
||||
final int itemType = item.itemType;
|
||||
return ((itemType == LauncherSettings.Favorites.ITEM_TYPE_APPLICATION ||
|
||||
itemType == LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT ||
|
||||
itemType == LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT) &&
|
||||
item != mInfo && !mFolder.isOpen());
|
||||
}
|
||||
@@ -416,7 +416,7 @@ public class FolderIcon extends FrameLayout implements FolderListener, IconLabel
|
||||
final int finalIndex = index;
|
||||
dragLayer.animateView(animateView, to, finalAlpha,
|
||||
finalScale, finalScale, DROP_IN_ANIMATION_DURATION,
|
||||
Interpolators.DEACCEL_2,
|
||||
Interpolators.DECELERATE_2,
|
||||
() -> {
|
||||
mPreviewItemManager.hidePreviewItem(finalIndex, false);
|
||||
mFolder.showItem(item);
|
||||
@@ -639,7 +639,7 @@ public class FolderIcon extends FrameLayout implements FolderListener, IconLabel
|
||||
Utilities.scaleRectAboutCenter(iconBounds, iconScale);
|
||||
|
||||
// If we are animating to the accepting state, animate the dot out.
|
||||
mDotParams.scale = Math.max(0, mDotScale - mBackground.getScaleProgress());
|
||||
mDotParams.scale = Math.max(0, mDotScale - mBackground.getAcceptScaleProgress());
|
||||
mDotParams.color = mBackground.getDotColor();
|
||||
mDotRenderer.draw(canvas, mDotParams, mDotInfo == null ? -1 : mDotInfo.getNotificationCount());
|
||||
}
|
||||
@@ -814,6 +814,14 @@ public class FolderIcon extends FrameLayout implements FolderListener, IconLabel
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHoverChanged(boolean hovered) {
|
||||
super.onHoverChanged(hovered);
|
||||
if (ENABLE_CURSOR_HOVER_STATES.get()) {
|
||||
mBackground.setHovered(hovered);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Interface that provides callbacks to a parent ViewGroup that hosts this
|
||||
* FolderIcon.
|
||||
|
||||
Reference in new issue
Block a user