Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3d02e47 authored by Tony Wickham's avatar Tony Wickham Committed by Android (Google) Code Review
Browse files

Merge "Refactor DeepShortcutsContainer to PopupContainerWithArrow" into ub-launcher3-master

parents 38d480a3 540913ea
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@
        android:background="@drawable/bg_pill_focused" />

    <View
        android:id="@+id/deep_shortcut_icon"
        android:id="@+id/popup_item_icon"
        android:layout_width="@dimen/deep_shortcut_icon_size"
        android:layout_height="@dimen/deep_shortcut_icon_size"
        android:layout_margin="@dimen/deep_shortcut_padding_start"
+2 −2
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
     limitations under the License.
-->

<com.android.launcher3.shortcuts.DeepShortcutsContainer
<com.android.launcher3.popup.PopupContainerWithArrow
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/deep_shortcuts_container"
    android:layout_width="wrap_content"
@@ -26,4 +26,4 @@
    android:elevation="@dimen/deep_shortcuts_elevation"
    android:orientation="vertical">

</com.android.launcher3.shortcuts.DeepShortcutsContainer>
 No newline at end of file
</com.android.launcher3.popup.PopupContainerWithArrow>
 No newline at end of file
+3 −3
Original line number Diff line number Diff line
@@ -32,11 +32,11 @@ import java.lang.annotation.RetentionPolicy;
 */
public abstract class AbstractFloatingView extends LinearLayout {

    @IntDef(flag = true, value = {TYPE_FOLDER, TYPE_DEEPSHORTCUT_CONTAINER})
    @IntDef(flag = true, value = {TYPE_FOLDER, TYPE_POPUP_CONTAINER_WITH_ARROW})
    @Retention(RetentionPolicy.SOURCE)
    public @interface FloatingViewType {}
    public static final int TYPE_FOLDER = 1 << 0;
    public static final int TYPE_DEEPSHORTCUT_CONTAINER = 1 << 1;
    public static final int TYPE_POPUP_CONTAINER_WITH_ARROW = 1 << 1;

    protected boolean mIsOpen;

@@ -119,6 +119,6 @@ public abstract class AbstractFloatingView extends LinearLayout {
    }

    public static AbstractFloatingView getTopOpenView(Launcher launcher) {
        return getOpenView(launcher, TYPE_FOLDER | TYPE_DEEPSHORTCUT_CONTAINER);
        return getOpenView(launcher, TYPE_FOLDER | TYPE_POPUP_CONTAINER_WITH_ARROW);
    }
}
+0 −2
Original line number Diff line number Diff line
@@ -41,14 +41,12 @@ import com.android.launcher3.IconCache.IconLoadRequest;
import com.android.launcher3.IconCache.ItemInfoUpdateReceiver;
import com.android.launcher3.badge.BadgeInfo;
import com.android.launcher3.badge.BadgeRenderer;
import com.android.launcher3.badging.NotificationInfo;
import com.android.launcher3.folder.FolderIcon;
import com.android.launcher3.graphics.DrawableFactory;
import com.android.launcher3.graphics.HolographicOutlineHelper;
import com.android.launcher3.model.PackageItemInfo;

import java.text.NumberFormat;
import java.util.List;

/**
 * TextView that draws a bubble behind the text. We cannot use a LineBackgroundSpan
+5 −5
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@ import com.android.launcher3.allapps.AllAppsContainerView;
import com.android.launcher3.allapps.AllAppsTransitionController;
import com.android.launcher3.allapps.DefaultAppSearchController;
import com.android.launcher3.anim.AnimationLayerSet;
import com.android.launcher3.badging.NotificationListener;
import com.android.launcher3.badge.NotificationListener;
import com.android.launcher3.popup.PopupDataProvider;
import com.android.launcher3.compat.AppWidgetManagerCompat;
import com.android.launcher3.compat.LauncherAppsCompat;
@@ -109,8 +109,8 @@ import com.android.launcher3.logging.UserEventDispatcher;
import com.android.launcher3.model.PackageItemInfo;
import com.android.launcher3.model.WidgetItem;
import com.android.launcher3.pageindicators.PageIndicator;
import com.android.launcher3.popup.PopupContainerWithArrow;
import com.android.launcher3.shortcuts.DeepShortcutManager;
import com.android.launcher3.shortcuts.DeepShortcutsContainer;
import com.android.launcher3.shortcuts.ShortcutInfoCompat;
import com.android.launcher3.shortcuts.ShortcutKey;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action;
@@ -1738,7 +1738,7 @@ public class Launcher extends BaseActivity
            mWorkspace.exitWidgetResizeMode();

            AbstractFloatingView topOpenView = AbstractFloatingView.getTopOpenView(this);
            if (topOpenView instanceof DeepShortcutsContainer) {
            if (topOpenView instanceof PopupContainerWithArrow) {
                ued.logActionCommand(Action.Command.HOME_INTENT,
                        topOpenView.getExtendedTouchView(), ContainerType.DEEPSHORTCUTS);
            } else if (topOpenView instanceof Folder) {
@@ -2256,7 +2256,7 @@ public class Launcher extends BaseActivity
            if (topView.getActiveTextView() != null) {
                topView.getActiveTextView().dispatchBackKey();
            } else {
                if (topView instanceof DeepShortcutsContainer) {
                if (topView instanceof PopupContainerWithArrow) {
                    ued.logActionCommand(Action.Command.BACK,
                            topView.getExtendedTouchView(), ContainerType.DEEPSHORTCUTS);
                } else if (topView instanceof Folder) {
@@ -4077,7 +4077,7 @@ public class Launcher extends BaseActivity
                            && mAccessibilityDelegate.performAction(focusedView,
                                    (ItemInfo) focusedView.getTag(),
                                    LauncherAccessibilityDelegate.DEEP_SHORTCUTS)) {
                        DeepShortcutsContainer.getOpen(this).requestFocus();
                        PopupContainerWithArrow.getOpen(this).requestFocus();
                        return true;
                    }
                    break;
Loading