Snap for 9153524 from 09e4c86b4c to udc-release
Change-Id: I2522bfc7fc353303862f513cdc8247ecedf40d58
This commit is contained in:
commit
2f453c73c4
15 files changed
+128
-107
No files matched your search
@@ -552,15 +552,43 @@ public class SystemUiProxy implements ISystemUiProxy {
|
||||
}
|
||||
|
||||
/** Start multiple tasks in split-screen simultaneously. */
|
||||
public void startTasks(int mainTaskId, Bundle mainOptions, int sideTaskId, Bundle sideOptions,
|
||||
@SplitConfigurationOptions.StagePosition int sidePosition, float splitRatio,
|
||||
public void startTasks(int taskId1, Bundle options1, int taskId2, Bundle options2,
|
||||
@SplitConfigurationOptions.StagePosition int splitPosition, float splitRatio,
|
||||
RemoteTransitionCompat remoteTransition, InstanceId instanceId) {
|
||||
if (mSystemUiProxy != null) {
|
||||
try {
|
||||
mSplitScreen.startTasks(mainTaskId, mainOptions, sideTaskId, sideOptions,
|
||||
sidePosition, splitRatio, remoteTransition.getTransition(), instanceId);
|
||||
mSplitScreen.startTasks(taskId1, options1, taskId2, options2, splitPosition,
|
||||
splitRatio, remoteTransition.getTransition(), instanceId);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(TAG, "Failed call startTask");
|
||||
Log.w(TAG, "Failed call startTasks");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void startIntentAndTask(PendingIntent pendingIntent, Intent fillInIntent,
|
||||
Bundle options1, int taskId, Bundle options2,
|
||||
@SplitConfigurationOptions.StagePosition int splitPosition, float splitRatio,
|
||||
RemoteTransitionCompat remoteTransition, InstanceId instanceId) {
|
||||
if (mSystemUiProxy != null) {
|
||||
try {
|
||||
mSplitScreen.startIntentAndTask(pendingIntent, fillInIntent, options1,
|
||||
taskId, options2, splitPosition, splitRatio,
|
||||
remoteTransition.getTransition(), instanceId);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(TAG, "Failed call startIntentAndTask");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void startShortcutAndTask(ShortcutInfo shortcutInfo, Bundle options1, int taskId,
|
||||
Bundle options2, @SplitConfigurationOptions.StagePosition int splitPosition,
|
||||
float splitRatio, RemoteTransitionCompat remoteTransition, InstanceId instanceId) {
|
||||
if (mSystemUiProxy != null) {
|
||||
try {
|
||||
mSplitScreen.startShortcutAndTask(shortcutInfo, options1, taskId, options2,
|
||||
splitPosition, splitRatio, remoteTransition.getTransition(), instanceId);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(TAG, "Failed call startShortcutAndTask");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -568,13 +596,13 @@ public class SystemUiProxy implements ISystemUiProxy {
|
||||
/**
|
||||
* Start multiple tasks in split-screen simultaneously.
|
||||
*/
|
||||
public void startTasksWithLegacyTransition(int mainTaskId, Bundle mainOptions, int sideTaskId,
|
||||
Bundle sideOptions, @SplitConfigurationOptions.StagePosition int sidePosition,
|
||||
public void startTasksWithLegacyTransition(int taskId1, Bundle options1, int taskId2,
|
||||
Bundle options2, @SplitConfigurationOptions.StagePosition int splitPosition,
|
||||
float splitRatio, RemoteAnimationAdapter adapter, InstanceId instanceId) {
|
||||
if (mSystemUiProxy != null) {
|
||||
try {
|
||||
mSplitScreen.startTasksWithLegacyTransition(mainTaskId, mainOptions, sideTaskId,
|
||||
sideOptions, sidePosition, splitRatio, adapter, instanceId);
|
||||
mSplitScreen.startTasksWithLegacyTransition(taskId1, options1, taskId2, options2,
|
||||
splitPosition, splitRatio, adapter, instanceId);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(TAG, "Failed call startTasksWithLegacyTransition");
|
||||
}
|
||||
@@ -582,28 +610,26 @@ public class SystemUiProxy implements ISystemUiProxy {
|
||||
}
|
||||
|
||||
public void startIntentAndTaskWithLegacyTransition(PendingIntent pendingIntent,
|
||||
Intent fillInIntent, int taskId, Bundle mainOptions, Bundle sideOptions,
|
||||
@SplitConfigurationOptions.StagePosition int sidePosition, float splitRatio,
|
||||
Intent fillInIntent, Bundle options1, int taskId, Bundle options2,
|
||||
@SplitConfigurationOptions.StagePosition int splitPosition, float splitRatio,
|
||||
RemoteAnimationAdapter adapter, InstanceId instanceId) {
|
||||
if (mSystemUiProxy != null) {
|
||||
try {
|
||||
mSplitScreen.startIntentAndTaskWithLegacyTransition(pendingIntent, fillInIntent,
|
||||
taskId, mainOptions, sideOptions, sidePosition, splitRatio, adapter,
|
||||
instanceId);
|
||||
options1, taskId, options2, splitPosition, splitRatio, adapter, instanceId);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(TAG, "Failed call startIntentAndTaskWithLegacyTransition");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void startShortcutAndTaskWithLegacyTransition(ShortcutInfo shortcutInfo, int taskId,
|
||||
Bundle mainOptions, Bundle sideOptions,
|
||||
@SplitConfigurationOptions.StagePosition int sidePosition, float splitRatio,
|
||||
RemoteAnimationAdapter adapter, InstanceId instanceId) {
|
||||
public void startShortcutAndTaskWithLegacyTransition(ShortcutInfo shortcutInfo, Bundle options1,
|
||||
int taskId, Bundle options2, @SplitConfigurationOptions.StagePosition int splitPosition,
|
||||
float splitRatio, RemoteAnimationAdapter adapter, InstanceId instanceId) {
|
||||
if (mSystemUiProxy != null) {
|
||||
try {
|
||||
mSplitScreen.startShortcutAndTaskWithLegacyTransition(shortcutInfo, taskId,
|
||||
mainOptions, sideOptions, sidePosition, splitRatio, adapter, instanceId);
|
||||
mSplitScreen.startShortcutAndTaskWithLegacyTransition(shortcutInfo, options1,
|
||||
taskId, options2, splitPosition, splitRatio, adapter, instanceId);
|
||||
} catch (RemoteException e) {
|
||||
Log.w(TAG, "Failed call startShortcutAndTaskWithLegacyTransition");
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package com.android.quickstep;
|
||||
|
||||
import static android.app.ActivityTaskManager.INVALID_TASK_ID;
|
||||
import static android.view.WindowManager.LayoutParams.TYPE_DOCK_DIVIDER;
|
||||
import static android.view.WindowManager.TRANSIT_OPEN;
|
||||
import static android.view.WindowManager.TRANSIT_TO_FRONT;
|
||||
@@ -425,8 +424,10 @@ public final class TaskViewUtils {
|
||||
TransitionInfo.Change splitRoot2 = null;
|
||||
for (int i = 0; i < transitionInfo.getChanges().size(); ++i) {
|
||||
final TransitionInfo.Change change = transitionInfo.getChanges().get(i);
|
||||
final int taskId = change.getTaskInfo() != null ? change.getTaskInfo().taskId : -1;
|
||||
if (change.getTaskInfo() == null) continue;
|
||||
final int taskId = change.getTaskInfo().taskId;
|
||||
final int mode = change.getMode();
|
||||
|
||||
// Find the target tasks' root tasks since those are the split stages that need to
|
||||
// be animated (the tasks themselves are children and thus inherit animation).
|
||||
if (taskId == initialTaskId || taskId == secondTaskId) {
|
||||
@@ -439,7 +440,7 @@ public final class TaskViewUtils {
|
||||
+ "root of " + taskId + " is already visible or has broken hierarchy.");
|
||||
}
|
||||
}
|
||||
if (taskId == initialTaskId && initialTaskId != INVALID_TASK_ID) {
|
||||
if (taskId == initialTaskId) {
|
||||
splitRoot1 = transitionInfo.getChange(change.getParent());
|
||||
}
|
||||
if (taskId == secondTaskId) {
|
||||
|
||||
@@ -16,10 +16,6 @@
|
||||
|
||||
package com.android.quickstep.util;
|
||||
|
||||
import static com.android.launcher3.anim.Interpolators.EMPHASIZED;
|
||||
|
||||
import android.view.animation.Interpolator;
|
||||
|
||||
/**
|
||||
* Timings for the OverviewSplitSelect > confirmed animation on phones.
|
||||
*/
|
||||
@@ -33,8 +29,4 @@ public class PhoneSplitToConfirmTimings
|
||||
public int getStagedRectSlideEnd() { return 333; }
|
||||
|
||||
public int getDuration() { return PHONE_CONFIRM_DURATION; }
|
||||
public Interpolator getStagedRectXInterpolator() { return EMPHASIZED; }
|
||||
public Interpolator getStagedRectYInterpolator() { return EMPHASIZED; }
|
||||
public Interpolator getStagedRectScaleXInterpolator() { return EMPHASIZED; }
|
||||
public Interpolator getStagedRectScaleYInterpolator() { return EMPHASIZED; }
|
||||
}
|
||||
@@ -22,8 +22,6 @@ import static android.app.PendingIntent.FLAG_MUTABLE;
|
||||
import static com.android.launcher3.Utilities.postAsyncCallback;
|
||||
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
|
||||
import static com.android.launcher3.util.SplitConfigurationOptions.DEFAULT_SPLIT_RATIO;
|
||||
import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_BOTTOM_OR_RIGHT;
|
||||
import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_TOP_OR_LEFT;
|
||||
|
||||
import android.annotation.NonNull;
|
||||
import android.app.ActivityOptions;
|
||||
@@ -216,22 +214,36 @@ public class SplitSelectStateController {
|
||||
@Nullable InstanceId shellInstanceId) {
|
||||
TestLogging.recordEvent(
|
||||
TestProtocol.SEQUENCE_MAIN, "launchSplitTasks");
|
||||
// Assume initial task is for top/left part of screen
|
||||
final int[] taskIds = stagePosition == STAGE_POSITION_TOP_OR_LEFT
|
||||
? new int[]{taskId1, taskId2}
|
||||
: new int[]{taskId2, taskId1};
|
||||
final ActivityOptions options1 = ActivityOptions.makeBasic();
|
||||
if (freezeTaskList) {
|
||||
options1.setFreezeRecentTasksReordering();
|
||||
}
|
||||
if (TaskAnimationManager.ENABLE_SHELL_TRANSITIONS) {
|
||||
RemoteSplitLaunchTransitionRunner animationRunner =
|
||||
final RemoteSplitLaunchTransitionRunner animationRunner =
|
||||
new RemoteSplitLaunchTransitionRunner(taskId1, taskPendingIntent, taskId2,
|
||||
callback);
|
||||
mSystemUiProxy.startTasks(taskIds[0], null /* mainOptions */, taskIds[1],
|
||||
null /* sideOptions */, STAGE_POSITION_BOTTOM_OR_RIGHT, splitRatio,
|
||||
new RemoteTransitionCompat(animationRunner, MAIN_EXECUTOR,
|
||||
ActivityThread.currentActivityThread().getApplicationThread()),
|
||||
shellInstanceId);
|
||||
// TODO(b/237635859): handle intent/shortcut + task with shell transition
|
||||
final RemoteTransitionCompat remoteTransition = new RemoteTransitionCompat(
|
||||
animationRunner, MAIN_EXECUTOR,
|
||||
ActivityThread.currentActivityThread().getApplicationThread());
|
||||
if (taskPendingIntent == null) {
|
||||
mSystemUiProxy.startTasks(taskId1, options1.toBundle(), taskId2,
|
||||
null /* options2 */, stagePosition, splitRatio, remoteTransition,
|
||||
shellInstanceId);
|
||||
} else {
|
||||
final ShortcutInfo shortcutInfo = getShortcutInfo(mInitialTaskIntent,
|
||||
taskPendingIntent.getCreatorUserHandle());
|
||||
if (shortcutInfo != null) {
|
||||
mSystemUiProxy.startShortcutAndTask(shortcutInfo,
|
||||
options1.toBundle(), taskId2, null /* options2 */, stagePosition,
|
||||
splitRatio, remoteTransition, shellInstanceId);
|
||||
} else {
|
||||
mSystemUiProxy.startIntentAndTask(taskPendingIntent,
|
||||
fillInIntent, options1.toBundle(), taskId2, null /* options2 */,
|
||||
stagePosition, splitRatio, remoteTransition, shellInstanceId);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
RemoteSplitLaunchAnimationRunner animationRunner =
|
||||
final RemoteSplitLaunchAnimationRunner animationRunner =
|
||||
new RemoteSplitLaunchAnimationRunner(taskId1, taskPendingIntent, taskId2,
|
||||
callback);
|
||||
final RemoteAnimationAdapter adapter = new RemoteAnimationAdapter(
|
||||
@@ -239,24 +251,20 @@ public class SplitSelectStateController {
|
||||
300, 150,
|
||||
ActivityThread.currentActivityThread().getApplicationThread());
|
||||
|
||||
ActivityOptions mainOpts = ActivityOptions.makeBasic();
|
||||
if (freezeTaskList) {
|
||||
mainOpts.setFreezeRecentTasksReordering();
|
||||
}
|
||||
if (taskPendingIntent == null) {
|
||||
mSystemUiProxy.startTasksWithLegacyTransition(taskIds[0], mainOpts.toBundle(),
|
||||
taskIds[1], null /* sideOptions */, STAGE_POSITION_BOTTOM_OR_RIGHT,
|
||||
splitRatio, adapter, shellInstanceId);
|
||||
mSystemUiProxy.startTasksWithLegacyTransition(taskId1, options1.toBundle(),
|
||||
taskId2, null /* options2 */, stagePosition, splitRatio, adapter,
|
||||
shellInstanceId);
|
||||
} else {
|
||||
final ShortcutInfo shortcutInfo = getShortcutInfo(mInitialTaskIntent,
|
||||
taskPendingIntent.getCreatorUserHandle());
|
||||
if (shortcutInfo != null) {
|
||||
mSystemUiProxy.startShortcutAndTaskWithLegacyTransition(shortcutInfo, taskId2,
|
||||
mainOpts.toBundle(), null /* sideOptions */, stagePosition, splitRatio,
|
||||
adapter, shellInstanceId);
|
||||
mSystemUiProxy.startShortcutAndTaskWithLegacyTransition(shortcutInfo,
|
||||
options1.toBundle(), taskId2, null /* options2 */, stagePosition,
|
||||
splitRatio, adapter, shellInstanceId);
|
||||
} else {
|
||||
mSystemUiProxy.startIntentAndTaskWithLegacyTransition(taskPendingIntent,
|
||||
fillInIntent, taskId2, mainOpts.toBundle(), null /* sideOptions */,
|
||||
fillInIntent, options1.toBundle(), taskId2, null /* options2 */,
|
||||
stagePosition, splitRatio, adapter, shellInstanceId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
package com.android.quickstep.util;
|
||||
|
||||
import static com.android.launcher3.anim.Interpolators.EMPHASIZED;
|
||||
|
||||
import android.view.animation.Interpolator;
|
||||
|
||||
/**
|
||||
@@ -33,12 +35,12 @@ abstract class SplitToConfirmTimings implements SplitAnimationTimings {
|
||||
// Common timings
|
||||
public int getInstructionsFadeStart() { return 0; }
|
||||
public int getInstructionsFadeEnd() { return 67; }
|
||||
public Interpolator getStagedRectXInterpolator() { return EMPHASIZED; }
|
||||
public Interpolator getStagedRectYInterpolator() { return EMPHASIZED; }
|
||||
public Interpolator getStagedRectScaleXInterpolator() { return EMPHASIZED; }
|
||||
public Interpolator getStagedRectScaleYInterpolator() { return EMPHASIZED; }
|
||||
|
||||
abstract public int getDuration();
|
||||
abstract public Interpolator getStagedRectXInterpolator();
|
||||
abstract public Interpolator getStagedRectYInterpolator();
|
||||
abstract public Interpolator getStagedRectScaleXInterpolator();
|
||||
abstract public Interpolator getStagedRectScaleYInterpolator();
|
||||
|
||||
public float getInstructionsFadeStartOffset() {
|
||||
return (float) getInstructionsFadeStart() / getDuration();
|
||||
|
||||
@@ -16,10 +16,6 @@
|
||||
|
||||
package com.android.quickstep.util;
|
||||
|
||||
import static com.android.launcher3.anim.Interpolators.LINEAR;
|
||||
|
||||
import android.view.animation.Interpolator;
|
||||
|
||||
/**
|
||||
* Timings for the OverviewSplitSelect > confirmed animation on tablets.
|
||||
*/
|
||||
@@ -33,8 +29,4 @@ public class TabletSplitToConfirmTimings
|
||||
public int getStagedRectSlideEnd() { return 383; }
|
||||
|
||||
public int getDuration() { return TABLET_CONFIRM_DURATION; }
|
||||
public Interpolator getStagedRectXInterpolator() { return LINEAR; }
|
||||
public Interpolator getStagedRectYInterpolator() { return LINEAR; }
|
||||
public Interpolator getStagedRectScaleXInterpolator() { return LINEAR; }
|
||||
public Interpolator getStagedRectScaleYInterpolator() { return LINEAR; }
|
||||
}
|
||||
@@ -1885,6 +1885,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
|
||||
mActionsView.getVisibilityAlpha(), MultiValueAlpha.VALUE, alphaValue);
|
||||
mActionsViewAlphaAnimatorFinalValue = alphaValue;
|
||||
mActionsViewAlphaAnimator.setDuration(duration);
|
||||
// Set autocancel to prevent race-conditiony setting of alpha from other animations
|
||||
mActionsViewAlphaAnimator.setAutoCancel(true);
|
||||
mActionsViewAlphaAnimator.start();
|
||||
}
|
||||
|
||||
|
||||
@@ -85,6 +85,7 @@ import java.util.Arrays;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class LauncherProvider extends ContentProvider {
|
||||
private static final String TAG = "LauncherProvider";
|
||||
@@ -944,16 +945,28 @@ public class LauncherProvider extends ContentProvider {
|
||||
final IntSet validWidgets = IntSet.wrap(LauncherDbUtils.queryIntArray(false, db,
|
||||
Favorites.TABLE_NAME, Favorites.APPWIDGET_ID,
|
||||
"itemType=" + Favorites.ITEM_TYPE_APPWIDGET, null, null));
|
||||
boolean isAnyWidgetRemoved = false;
|
||||
for (int widgetId : allWidgets) {
|
||||
if (!validWidgets.contains(widgetId)) {
|
||||
try {
|
||||
FileLog.d(TAG, "Deleting invalid widget " + widgetId);
|
||||
host.deleteAppWidgetId(widgetId);
|
||||
isAnyWidgetRemoved = true;
|
||||
} catch (RuntimeException e) {
|
||||
// Ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isAnyWidgetRemoved) {
|
||||
final String allWidgetsIds = Arrays.stream(allWidgets).mapToObj(String::valueOf)
|
||||
.collect(Collectors.joining(",", "[", "]"));
|
||||
final String validWidgetsIds = Arrays.stream(
|
||||
validWidgets.getArray().toArray()).mapToObj(String::valueOf)
|
||||
.collect(Collectors.joining(",", "[", "]"));
|
||||
FileLog.d(TAG, "One or more widgets was removed. db_path=" + db.getPath()
|
||||
+ " allWidgetsIds=" + allWidgetsIds
|
||||
+ ", validWidgetsIds=" + validWidgetsIds);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -532,9 +532,11 @@ public abstract class BaseAllAppsContainerView<T extends Context & ActivityConte
|
||||
if (isSearching()) {
|
||||
getSearchRecyclerView().setVisibility(VISIBLE);
|
||||
getAppsRecyclerViewContainer().setVisibility(GONE);
|
||||
mHeader.setVisibility(GONE);
|
||||
} else {
|
||||
getSearchRecyclerView().setVisibility(GONE);
|
||||
getAppsRecyclerViewContainer().setVisibility(VISIBLE);
|
||||
mHeader.setVisibility(VISIBLE);
|
||||
}
|
||||
if (mHeader.isSetUp()) {
|
||||
mHeader.setActiveRV(getCurrentPage());
|
||||
|
||||
@@ -20,6 +20,7 @@ import static android.view.View.VISIBLE;
|
||||
|
||||
import static androidx.recyclerview.widget.RecyclerView.NO_POSITION;
|
||||
|
||||
import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_APPLICATION;
|
||||
import static com.android.launcher3.anim.AnimatorListeners.forEndCallback;
|
||||
import static com.android.launcher3.anim.AnimatorListeners.forSuccessCallback;
|
||||
import static com.android.launcher3.anim.Interpolators.DEACCEL_1_7;
|
||||
@@ -38,6 +39,7 @@ import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.LauncherState;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.model.data.ItemInfo;
|
||||
|
||||
/** Coordinates the transition between Search and A-Z in All Apps. */
|
||||
public class SearchTransitionController {
|
||||
@@ -124,6 +126,7 @@ public class SearchTransitionController {
|
||||
mSearchToAzAnimator.addListener(forSuccessCallback(onEndRunnable));
|
||||
|
||||
mAllAppsContainerView.getFloatingHeaderView().setFloatingRowsCollapsed(true);
|
||||
mAllAppsContainerView.getFloatingHeaderView().setVisibility(VISIBLE);
|
||||
mAllAppsContainerView.getAppsRecyclerViewContainer().setVisibility(VISIBLE);
|
||||
getSearchRecyclerView().setVisibility(VISIBLE);
|
||||
getSearchRecyclerView().setChildAttachedConsumer(this::onSearchChildAttached);
|
||||
@@ -186,7 +189,9 @@ public class SearchTransitionController {
|
||||
top = searchResultView.getTop();
|
||||
}
|
||||
|
||||
if (searchResultView instanceof BubbleTextView) {
|
||||
if (searchResultView instanceof BubbleTextView
|
||||
&& searchResultView.getTag() instanceof ItemInfo
|
||||
&& ((ItemInfo) searchResultView.getTag()).itemType == ITEM_TYPE_APPLICATION) {
|
||||
// The first app icon will set appRowHeight, which will also contribute to
|
||||
// totalHeight. Additional app icons should remove the appRowHeight to remain in
|
||||
// the same row as the first app.
|
||||
@@ -196,6 +201,8 @@ public class SearchTransitionController {
|
||||
totalHeight += appRowHeight;
|
||||
}
|
||||
// Don't scale/fade app row.
|
||||
searchResultView.setScaleY(1);
|
||||
searchResultView.setAlpha(1);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,10 @@ public class AllAppsSearchBarController
|
||||
mTextConversions = extractTextConversions(s);
|
||||
}
|
||||
|
||||
private static String[] extractTextConversions(CharSequence text) {
|
||||
/**
|
||||
* Extract text conversions from composing text and send them for search.
|
||||
*/
|
||||
public static String[] extractTextConversions(CharSequence text) {
|
||||
if (text instanceof SpannableStringBuilder) {
|
||||
SpannableStringBuilder spanned = (SpannableStringBuilder) text;
|
||||
SuggestionSpan[] suggestionSpans =
|
||||
|
||||
@@ -91,6 +91,10 @@ public final class FeatureFlags {
|
||||
getDebugFlag("ENABLE_FLOATING_SEARCH_BAR", false,
|
||||
"Keep All Apps search bar at the bottom (but above keyboard if open)");
|
||||
|
||||
public static final BooleanFlag ENABLE_QUICK_LAUNCH_V2 = new DeviceFlag(
|
||||
"ENABLE_QUICK_LAUNCH_V2", false, "Use quick launch v2 "
|
||||
+ "behavior. Quick search and quick launch v1 would be unavailable if this is enabled");
|
||||
|
||||
public static final BooleanFlag ENABLE_HIDE_HEADER = new DeviceFlag("ENABLE_HIDE_HEADER",
|
||||
true, "Hide header on keyboard before typing in all apps");
|
||||
|
||||
|
||||
@@ -50,4 +50,9 @@ public class LogConfig {
|
||||
* When turned on, we enable web suggest appSearch related logging.
|
||||
*/
|
||||
public static final String WEB_APP_SEARCH_LOGGING = "WebAppSearchLogging";
|
||||
|
||||
/**
|
||||
* When turned on, we enable quick launch v2 related logging.
|
||||
*/
|
||||
public static final String QUICK_LAUNCH_V2 = "QuickLaunchV2";
|
||||
}
|
||||
@@ -63,25 +63,7 @@ public class MoveOutReorderCase {
|
||||
MOVE_TO_6x5,
|
||||
END_BOARD_STR_6x5);
|
||||
|
||||
/** 4x4 Test
|
||||
**/
|
||||
private static final String START_BOARD_STR_4x4 = ""
|
||||
+ "xxxx\n"
|
||||
+ "34-m\n"
|
||||
+ "3511\n"
|
||||
+ "3211";
|
||||
private static final Point MOVE_TO_4x4 = new Point(1, 2);
|
||||
private static final String END_BOARD_STR_4x4 = ""
|
||||
+ "xxxx\n"
|
||||
+ "345-\n"
|
||||
+ "3m11\n"
|
||||
+ "3211";
|
||||
private static final ReorderTestCase TEST_CASE_4x4 = new ReorderTestCase(START_BOARD_STR_4x4,
|
||||
MOVE_TO_4x4,
|
||||
END_BOARD_STR_4x4);
|
||||
|
||||
public static final Map<Point, ReorderTestCase> TEST_BY_GRID_SIZE =
|
||||
Map.of(new Point(5, 5), TEST_CASE_5x5,
|
||||
new Point(6, 5), TEST_CASE_6x5,
|
||||
new Point(4, 4), TEST_CASE_4x4);
|
||||
new Point(6, 5), TEST_CASE_6x5);
|
||||
}
|
||||
@@ -64,25 +64,7 @@ public class PushReorderCase {
|
||||
MOVE_TO_6x5,
|
||||
END_BOARD_STR_6x5);
|
||||
|
||||
/** 4x4 Test
|
||||
**/
|
||||
private static final String START_BOARD_STR_4x4 = ""
|
||||
+ "xxxx\n"
|
||||
+ "222m\n"
|
||||
+ "-111\n"
|
||||
+ "----";
|
||||
private static final Point MOVE_TO_4x4 = new Point(2, 1);
|
||||
private static final String END_BOARD_STR_4x4 = ""
|
||||
+ "xxxx\n"
|
||||
+ "--m-\n"
|
||||
+ "222-\n"
|
||||
+ "-111";
|
||||
private static final ReorderTestCase TEST_CASE_4x4 = new ReorderTestCase(START_BOARD_STR_4x4,
|
||||
MOVE_TO_4x4,
|
||||
END_BOARD_STR_4x4);
|
||||
|
||||
public static final Map<Point, ReorderTestCase> TEST_BY_GRID_SIZE =
|
||||
Map.of(new Point(5, 5), TEST_CASE_5x5,
|
||||
new Point(6, 5), TEST_CASE_6x5,
|
||||
new Point(4, 4), TEST_CASE_4x4);
|
||||
new Point(6, 5), TEST_CASE_6x5);
|
||||
}
|
||||
Reference in new issue
Block a user