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

Commit ce6f43f0 authored by Hyunyoung Song's avatar Hyunyoung Song Committed by Android (Google) Code Review
Browse files

Merge "Merging from ub-launcher3-rvc-dev @ build 6396980" into rvc-dev

parents fd3fc081 19a6022a
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -79,10 +79,14 @@ message Target {
    TO_SUGGESTION2_WITH_EMPTY_PRIMARY = 5;
    TO_SUGGESTION3_WITH_VALID_PRIMARY = 6;
    TO_SUGGESTION3_WITH_EMPTY_PRIMARY = 7;
    TO_EMPTY_WITH_VALID_SUGGESTIONS = 8;
    TO_EMPTY_WITH_VALID_SUGGESTIONS = 8 [deprecated = true];
    TO_EMPTY_WITH_VALID_PRIMARY = 15;
    TO_EMPTY_WITH_VALID_SUGGESTIONS_AND_EMPTY_PRIMARY = 16;
    TO_EMPTY_WITH_EMPTY_SUGGESTIONS = 9;
    TO_EMPTY_WITH_SUGGESTIONS_DISABLED = 10;
    TO_CUSTOM_WITH_VALID_SUGGESTIONS = 11;
    TO_CUSTOM_WITH_VALID_SUGGESTIONS = 11 [deprecated = true];
    TO_CUSTOM_WITH_VALID_PRIMARY = 17;
    TO_CUSTOM_WITH_VALID_SUGGESTIONS_AND_EMPTY_PRIMARY = 18;
    TO_CUSTOM_WITH_EMPTY_SUGGESTIONS = 12;
    TO_CUSTOM_WITH_SUGGESTIONS_DISABLED = 13;
    UNCHANGED = 14;
+4 −6
Original line number Diff line number Diff line
@@ -18,10 +18,9 @@ package com.android.launcher3.appprediction;

import static com.android.quickstep.InstantAppResolverImpl.COMPONENT_CLASS_MARKER;

import com.android.launcher3.AppInfo;
import com.android.launcher3.ItemInfoWithIcon;
import com.android.launcher3.allapps.AllAppsStore;
import com.android.launcher3.shortcuts.ShortcutKey;
import com.android.launcher3.model.data.AppInfo;
import com.android.launcher3.model.data.ItemInfoWithIcon;
import com.android.launcher3.util.ComponentKey;

public class ComponentKeyMapper {
@@ -57,9 +56,8 @@ public class ComponentKeyMapper {
            return item;
        } else if (getComponentClass().equals(COMPONENT_CLASS_MARKER)) {
            return mCache.getInstantApp(componentKey.componentName.getPackageName());
        } else if (componentKey instanceof ShortcutKey) {
            return mCache.getShortcutInfo((ShortcutKey) componentKey);
        } else {
            return mCache.getShortcutInfo(componentKey);
        }
        return null;
    }
}
+5 −4
Original line number Diff line number Diff line
@@ -38,13 +38,14 @@ import androidx.annotation.Nullable;
import androidx.annotation.UiThread;
import androidx.annotation.WorkerThread;

import com.android.launcher3.AppInfo;
import com.android.launcher3.LauncherAppState;
import com.android.launcher3.WorkspaceItemInfo;
import com.android.launcher3.allapps.AllAppsStore;
import com.android.launcher3.icons.IconCache;
import com.android.launcher3.model.data.AppInfo;
import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.launcher3.shortcuts.ShortcutKey;
import com.android.launcher3.shortcuts.ShortcutRequest;
import com.android.launcher3.util.ComponentKey;
import com.android.launcher3.util.InstantAppResolver;

import java.util.ArrayList;
@@ -76,7 +77,7 @@ public class DynamicItemCache {
    private final Runnable mOnUpdateCallback;
    private final IconCache mIconCache;

    private final Map<ShortcutKey, WorkspaceItemInfo> mShortcuts;
    private final Map<ComponentKey, WorkspaceItemInfo> mShortcuts;
    private final Map<String, InstantAppItemInfo> mInstantApps;

    public DynamicItemCache(Context context, Runnable onUpdateCallback) {
@@ -230,7 +231,7 @@ public class DynamicItemCache {
    }

    @MainThread
    public WorkspaceItemInfo getShortcutInfo(ShortcutKey key) {
    public WorkspaceItemInfo getShortcutInfo(ComponentKey key) {
        return mShortcuts.get(key);
    }

+3 −3
Original line number Diff line number Diff line
@@ -21,9 +21,9 @@ import static com.android.quickstep.InstantAppResolverImpl.COMPONENT_CLASS_MARKE
import android.content.ComponentName;
import android.content.Intent;

import com.android.launcher3.AppInfo;
import com.android.launcher3.LauncherSettings;
import com.android.launcher3.WorkspaceItemInfo;
import com.android.launcher3.model.data.AppInfo;
import com.android.launcher3.model.data.WorkspaceItemInfo;

public class InstantAppItemInfo extends AppInfo {

@@ -44,7 +44,7 @@ public class InstantAppItemInfo extends AppInfo {
        workspaceItemInfo.status = WorkspaceItemInfo.FLAG_AUTOINSTALL_ICON
                | WorkspaceItemInfo.FLAG_RESTORE_STARTED
                | WorkspaceItemInfo.FLAG_SUPPORTS_WEB_UI;
        workspaceItemInfo.intent.setPackage(componentName.getPackageName());
        workspaceItemInfo.getIntent().setPackage(componentName.getPackageName());
        return workspaceItemInfo;
    }
}
+4 −4
Original line number Diff line number Diff line
@@ -38,18 +38,14 @@ import android.widget.LinearLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.android.launcher3.AppInfo;
import com.android.launcher3.BubbleTextView;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.DeviceProfile.OnDeviceProfileChangeListener;
import com.android.launcher3.ItemInfo;
import com.android.launcher3.ItemInfoWithIcon;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherAppState;
import com.android.launcher3.LauncherSettings;
import com.android.launcher3.LauncherState;
import com.android.launcher3.R;
import com.android.launcher3.WorkspaceItemInfo;
import com.android.launcher3.allapps.AllAppsStore;
import com.android.launcher3.allapps.FloatingHeaderRow;
import com.android.launcher3.allapps.FloatingHeaderView;
@@ -60,6 +56,10 @@ import com.android.launcher3.keyboard.FocusIndicatorHelper;
import com.android.launcher3.keyboard.FocusIndicatorHelper.SimpleFocusIndicatorHelper;
import com.android.launcher3.logging.StatsLogUtils.LogContainerProvider;
import com.android.launcher3.model.AppLaunchTracker;
import com.android.launcher3.model.data.AppInfo;
import com.android.launcher3.model.data.ItemInfo;
import com.android.launcher3.model.data.ItemInfoWithIcon;
import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.launcher3.touch.ItemClickHandler;
import com.android.launcher3.touch.ItemLongClickListener;
import com.android.launcher3.userevent.nano.LauncherLogProto;
Loading