Loading quickstep/res/values-nb/strings.xml +1 −1 Original line number Diff line number Diff line Loading @@ -70,7 +70,7 @@ <string name="gesture_tutorial_confirm_title" msgid="6201516182040074092">"Ferdig"</string> <string name="gesture_tutorial_action_button_label" msgid="6249846312991332122">"Ferdig"</string> <string name="gesture_tutorial_action_button_label_settings" msgid="2923621047916486604">"Innstillinger"</string> <string name="gesture_tutorial_try_again" msgid="65962545858556697">"Prøv igjen"</string> <string name="gesture_tutorial_try_again" msgid="65962545858556697">"Prøv på nytt"</string> <string name="gesture_tutorial_nice" msgid="2936275692616928280">"Bra!"</string> <string name="gesture_tutorial_step" msgid="1279786122817620968">"Veiledning <xliff:g id="CURRENT">%1$d</xliff:g>/<xliff:g id="TOTAL">%2$d</xliff:g>"</string> <string name="allset_title" msgid="5021126669778966707">"Alt er klart!"</string> Loading quickstep/src/com/android/launcher3/hybridhotseat/HotseatPredictionController.java +3 −3 Original line number Diff line number Diff line Loading @@ -55,13 +55,13 @@ import com.android.launcher3.popup.SystemShortcut; import com.android.launcher3.touch.ItemLongClickListener; import com.android.launcher3.uioverrides.PredictedAppIcon; import com.android.launcher3.uioverrides.QuickstepLauncher; import com.android.launcher3.util.ItemInfoMatcher; import com.android.launcher3.util.OnboardingPrefs; import com.android.launcher3.views.Snackbar; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.function.Predicate; import java.util.stream.Collectors; /** Loading Loading @@ -480,8 +480,8 @@ public class HotseatPredictionController implements DragController.DragListener, * * @param matcher filter matching items that have been removed */ public void onModelItemsRemoved(ItemInfoMatcher matcher) { if (mPredictedItems.removeIf(matcher::matchesInfo)) { public void onModelItemsRemoved(Predicate<ItemInfo> matcher) { if (mPredictedItems.removeIf(matcher)) { fillGapsWithPrediction(true); } } Loading quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java +3 −2 Original line number Diff line number Diff line Loading @@ -73,6 +73,7 @@ import com.android.systemui.shared.recents.model.Task; import java.io.PrintWriter; import java.util.Arrays; import java.util.Collections; import java.util.function.Predicate; /** * Handles long click on Taskbar items to start a system drag and drop operation. Loading Loading @@ -439,12 +440,12 @@ public class TaskbarDragController extends DragController<BaseTaskbarContext> im target = taskbarViewController.getAllAppsButtonView(); } else if (item.container >= 0) { // Since folders close when the drag starts, target the folder icon instead. ItemInfoMatcher matcher = ItemInfoMatcher.forFolderMatch( Predicate<ItemInfo> matcher = ItemInfoMatcher.forFolderMatch( ItemInfoMatcher.ofItemIds(IntSet.wrap(item.id))); target = taskbarViewController.getFirstIconMatch(matcher); } else if (item.itemType == ITEM_TYPE_DEEP_SHORTCUT) { // Find first icon with same package/user as the deep shortcut. ItemInfoMatcher packageUserMatcher = ItemInfoMatcher.ofPackages( Predicate<ItemInfo> packageUserMatcher = ItemInfoMatcher.ofPackages( Collections.singleton(item.getTargetPackage()), item.user); target = taskbarViewController.getFirstIconMatch(packageUserMatcher); } Loading quickstep/src/com/android/launcher3/taskbar/TaskbarModelCallbacks.java +4 −3 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.function.Predicate; /** * Launcher model Callbacks for rendering taskbar. Loading Loading @@ -126,16 +127,16 @@ public class TaskbarModelCallbacks implements } @Override public void bindWorkspaceComponentsRemoved(ItemInfoMatcher matcher) { public void bindWorkspaceComponentsRemoved(Predicate<ItemInfo> matcher) { if (handleItemsRemoved(matcher)) { commitItemsToUI(); } } private boolean handleItemsRemoved(ItemInfoMatcher matcher) { private boolean handleItemsRemoved(Predicate<ItemInfo> matcher) { boolean modified = false; for (int i = mHotseatItems.size() - 1; i >= 0; i--) { if (matcher.matchesInfo(mHotseatItems.valueAt(i))) { if (matcher.test(mHotseatItems.valueAt(i))) { modified = true; mHotseatItems.removeAt(i); } Loading quickstep/src/com/android/launcher3/taskbar/TaskbarView.java +5 −4 Original line number Diff line number Diff line Loading @@ -41,12 +41,13 @@ import com.android.launcher3.model.data.FolderInfo; import com.android.launcher3.model.data.ItemInfo; import com.android.launcher3.model.data.WorkspaceItemInfo; import com.android.launcher3.uioverrides.ApiWrapper; import com.android.launcher3.util.ItemInfoMatcher; import com.android.launcher3.util.LauncherBindableItemsContainer; import com.android.launcher3.views.ActivityContext; import com.android.launcher3.views.AllAppsButton; import com.android.launcher3.views.DoubleShadowBubbleTextView; import java.util.function.Predicate; /** * Hosts the Taskbar content such as Hotseat and Recent Apps. Drawn on top of other apps. */ Loading Loading @@ -424,8 +425,8 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar * Finds the first icon to match one of the given matchers, from highest to lowest priority. * @return The first match, or All Apps button if no match was found. */ public View getFirstMatch(ItemInfoMatcher... matchers) { for (ItemInfoMatcher matcher : matchers) { public View getFirstMatch(Predicate<ItemInfo>... matchers) { for (Predicate<ItemInfo> matcher : matchers) { for (int i = 0; i < getChildCount(); i++) { View item = getChildAt(i); if (!(item.getTag() instanceof ItemInfo)) { Loading @@ -433,7 +434,7 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar continue; } ItemInfo info = (ItemInfo) item.getTag(); if (matcher.matchesInfo(info)) { if (matcher.test(info)) { return item; } } Loading Loading
quickstep/res/values-nb/strings.xml +1 −1 Original line number Diff line number Diff line Loading @@ -70,7 +70,7 @@ <string name="gesture_tutorial_confirm_title" msgid="6201516182040074092">"Ferdig"</string> <string name="gesture_tutorial_action_button_label" msgid="6249846312991332122">"Ferdig"</string> <string name="gesture_tutorial_action_button_label_settings" msgid="2923621047916486604">"Innstillinger"</string> <string name="gesture_tutorial_try_again" msgid="65962545858556697">"Prøv igjen"</string> <string name="gesture_tutorial_try_again" msgid="65962545858556697">"Prøv på nytt"</string> <string name="gesture_tutorial_nice" msgid="2936275692616928280">"Bra!"</string> <string name="gesture_tutorial_step" msgid="1279786122817620968">"Veiledning <xliff:g id="CURRENT">%1$d</xliff:g>/<xliff:g id="TOTAL">%2$d</xliff:g>"</string> <string name="allset_title" msgid="5021126669778966707">"Alt er klart!"</string> Loading
quickstep/src/com/android/launcher3/hybridhotseat/HotseatPredictionController.java +3 −3 Original line number Diff line number Diff line Loading @@ -55,13 +55,13 @@ import com.android.launcher3.popup.SystemShortcut; import com.android.launcher3.touch.ItemLongClickListener; import com.android.launcher3.uioverrides.PredictedAppIcon; import com.android.launcher3.uioverrides.QuickstepLauncher; import com.android.launcher3.util.ItemInfoMatcher; import com.android.launcher3.util.OnboardingPrefs; import com.android.launcher3.views.Snackbar; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.function.Predicate; import java.util.stream.Collectors; /** Loading Loading @@ -480,8 +480,8 @@ public class HotseatPredictionController implements DragController.DragListener, * * @param matcher filter matching items that have been removed */ public void onModelItemsRemoved(ItemInfoMatcher matcher) { if (mPredictedItems.removeIf(matcher::matchesInfo)) { public void onModelItemsRemoved(Predicate<ItemInfo> matcher) { if (mPredictedItems.removeIf(matcher)) { fillGapsWithPrediction(true); } } Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarDragController.java +3 −2 Original line number Diff line number Diff line Loading @@ -73,6 +73,7 @@ import com.android.systemui.shared.recents.model.Task; import java.io.PrintWriter; import java.util.Arrays; import java.util.Collections; import java.util.function.Predicate; /** * Handles long click on Taskbar items to start a system drag and drop operation. Loading Loading @@ -439,12 +440,12 @@ public class TaskbarDragController extends DragController<BaseTaskbarContext> im target = taskbarViewController.getAllAppsButtonView(); } else if (item.container >= 0) { // Since folders close when the drag starts, target the folder icon instead. ItemInfoMatcher matcher = ItemInfoMatcher.forFolderMatch( Predicate<ItemInfo> matcher = ItemInfoMatcher.forFolderMatch( ItemInfoMatcher.ofItemIds(IntSet.wrap(item.id))); target = taskbarViewController.getFirstIconMatch(matcher); } else if (item.itemType == ITEM_TYPE_DEEP_SHORTCUT) { // Find first icon with same package/user as the deep shortcut. ItemInfoMatcher packageUserMatcher = ItemInfoMatcher.ofPackages( Predicate<ItemInfo> packageUserMatcher = ItemInfoMatcher.ofPackages( Collections.singleton(item.getTargetPackage()), item.user); target = taskbarViewController.getFirstIconMatch(packageUserMatcher); } Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarModelCallbacks.java +4 −3 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.function.Predicate; /** * Launcher model Callbacks for rendering taskbar. Loading Loading @@ -126,16 +127,16 @@ public class TaskbarModelCallbacks implements } @Override public void bindWorkspaceComponentsRemoved(ItemInfoMatcher matcher) { public void bindWorkspaceComponentsRemoved(Predicate<ItemInfo> matcher) { if (handleItemsRemoved(matcher)) { commitItemsToUI(); } } private boolean handleItemsRemoved(ItemInfoMatcher matcher) { private boolean handleItemsRemoved(Predicate<ItemInfo> matcher) { boolean modified = false; for (int i = mHotseatItems.size() - 1; i >= 0; i--) { if (matcher.matchesInfo(mHotseatItems.valueAt(i))) { if (matcher.test(mHotseatItems.valueAt(i))) { modified = true; mHotseatItems.removeAt(i); } Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarView.java +5 −4 Original line number Diff line number Diff line Loading @@ -41,12 +41,13 @@ import com.android.launcher3.model.data.FolderInfo; import com.android.launcher3.model.data.ItemInfo; import com.android.launcher3.model.data.WorkspaceItemInfo; import com.android.launcher3.uioverrides.ApiWrapper; import com.android.launcher3.util.ItemInfoMatcher; import com.android.launcher3.util.LauncherBindableItemsContainer; import com.android.launcher3.views.ActivityContext; import com.android.launcher3.views.AllAppsButton; import com.android.launcher3.views.DoubleShadowBubbleTextView; import java.util.function.Predicate; /** * Hosts the Taskbar content such as Hotseat and Recent Apps. Drawn on top of other apps. */ Loading Loading @@ -424,8 +425,8 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar * Finds the first icon to match one of the given matchers, from highest to lowest priority. * @return The first match, or All Apps button if no match was found. */ public View getFirstMatch(ItemInfoMatcher... matchers) { for (ItemInfoMatcher matcher : matchers) { public View getFirstMatch(Predicate<ItemInfo>... matchers) { for (Predicate<ItemInfo> matcher : matchers) { for (int i = 0; i < getChildCount(); i++) { View item = getChildAt(i); if (!(item.getTag() instanceof ItemInfo)) { Loading @@ -433,7 +434,7 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar continue; } ItemInfo info = (ItemInfo) item.getTag(); if (matcher.matchesInfo(info)) { if (matcher.test(info)) { return item; } } Loading