Snap for 10017950 from a68cd72a3c to udc-release
Change-Id: I98a3bdda9ca3de9460f304f475ef5ec4ae63e15a
This commit is contained in:
+17
-10
@@ -71,13 +71,6 @@ public class TaskbarAllAppsSlideInView extends AbstractSlideInView<TaskbarOverla
|
||||
} else {
|
||||
mTranslationShift = TRANSLATION_SHIFT_OPENED;
|
||||
}
|
||||
|
||||
if (FeatureFlags.ENABLE_BACK_SWIPE_LAUNCHER_ANIMATION.get()) {
|
||||
mAppsView.getAppsRecyclerViewContainer().setOutlineProvider(mViewOutlineProvider);
|
||||
mAppsView.getAppsRecyclerViewContainer().setClipToOutline(true);
|
||||
findOnBackInvokedDispatcher().registerOnBackInvokedCallback(
|
||||
OnBackInvokedDispatcher.PRIORITY_DEFAULT, this);
|
||||
}
|
||||
}
|
||||
|
||||
/** The apps container inside this view. */
|
||||
@@ -88,9 +81,6 @@ public class TaskbarAllAppsSlideInView extends AbstractSlideInView<TaskbarOverla
|
||||
@Override
|
||||
protected void handleClose(boolean animate) {
|
||||
handleClose(animate, mAllAppsCallbacks.getCloseDuration());
|
||||
if (FeatureFlags.ENABLE_BACK_SWIPE_LAUNCHER_ANIMATION.get()) {
|
||||
findOnBackInvokedDispatcher().unregisterOnBackInvokedCallback(this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -121,12 +111,29 @@ public class TaskbarAllAppsSlideInView extends AbstractSlideInView<TaskbarOverla
|
||||
protected void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
mActivityContext.addOnDeviceProfileChangeListener(this);
|
||||
if (FeatureFlags.ENABLE_BACK_SWIPE_LAUNCHER_ANIMATION.get()) {
|
||||
mAppsView.getAppsRecyclerViewContainer().setOutlineProvider(mViewOutlineProvider);
|
||||
mAppsView.getAppsRecyclerViewContainer().setClipToOutline(true);
|
||||
OnBackInvokedDispatcher dispatcher = findOnBackInvokedDispatcher();
|
||||
if (dispatcher != null) {
|
||||
dispatcher.registerOnBackInvokedCallback(
|
||||
OnBackInvokedDispatcher.PRIORITY_DEFAULT, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow();
|
||||
mActivityContext.removeOnDeviceProfileChangeListener(this);
|
||||
if (FeatureFlags.ENABLE_BACK_SWIPE_LAUNCHER_ANIMATION.get()) {
|
||||
mAppsView.getAppsRecyclerViewContainer().setOutlineProvider(null);
|
||||
mAppsView.getAppsRecyclerViewContainer().setClipToOutline(false);
|
||||
OnBackInvokedDispatcher dispatcher = findOnBackInvokedDispatcher();
|
||||
if (dispatcher != null) {
|
||||
dispatcher.unregisterOnBackInvokedCallback(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -402,8 +402,9 @@ public class PredictedAppIcon extends DoubleShadowBubbleTextView {
|
||||
PredictedAppIcon icon = (PredictedAppIcon) LayoutInflater.from(parent.getContext())
|
||||
.inflate(R.layout.predicted_app_icon, parent, false);
|
||||
icon.applyFromWorkspaceItem(info);
|
||||
icon.setOnClickListener(ItemClickHandler.INSTANCE);
|
||||
icon.setOnFocusChangeListener(Launcher.getLauncher(parent.getContext()).getFocusHandler());
|
||||
Launcher launcher = Launcher.getLauncher(parent.getContext());
|
||||
icon.setOnClickListener(launcher.getItemOnClickListener());
|
||||
icon.setOnFocusChangeListener(launcher.getFocusHandler());
|
||||
return icon;
|
||||
}
|
||||
|
||||
|
||||
@@ -967,7 +967,7 @@ public class SystemUiProxy implements ISystemUiProxy {
|
||||
IRemoteAnimationRunner runner) {
|
||||
mBackToLauncherCallback = callback;
|
||||
mBackToLauncherRunner = runner;
|
||||
if (mBackAnimation == null) {
|
||||
if (mBackAnimation == null || mBackToLauncherCallback == null) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
|
||||
@@ -33,6 +33,7 @@ public class StatusBarInputConsumer extends DelegateInputConsumer {
|
||||
private final SystemUiProxy mSystemUiProxy;
|
||||
private final float mTouchSlop;
|
||||
private final PointF mDown = new PointF();
|
||||
private boolean mHasPassedTouchSlop;
|
||||
|
||||
public StatusBarInputConsumer(Context context, InputConsumer delegate,
|
||||
InputMonitorCompat inputMonitor) {
|
||||
@@ -53,13 +54,21 @@ public class StatusBarInputConsumer extends DelegateInputConsumer {
|
||||
mDelegate.onMotionEvent(ev);
|
||||
|
||||
switch (ev.getActionMasked()) {
|
||||
case ACTION_DOWN -> mDown.set(ev.getX(), ev.getY());
|
||||
case ACTION_DOWN -> {
|
||||
mDown.set(ev.getX(), ev.getY());
|
||||
mHasPassedTouchSlop = false;
|
||||
}
|
||||
case ACTION_MOVE -> {
|
||||
float displacementY = ev.getY() - mDown.y;
|
||||
if (displacementY > mTouchSlop) {
|
||||
setActive(ev);
|
||||
ev.setAction(ACTION_DOWN);
|
||||
dispatchTouchEvent(ev);
|
||||
if (!mHasPassedTouchSlop) {
|
||||
float displacementY = ev.getY() - mDown.y;
|
||||
if (Math.abs(displacementY) > mTouchSlop) {
|
||||
mHasPassedTouchSlop = true;
|
||||
if (displacementY > 0) {
|
||||
setActive(ev);
|
||||
ev.setAction(ACTION_DOWN);
|
||||
dispatchTouchEvent(ev);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -581,6 +581,7 @@ public class TaskView extends FrameLayout implements Reusable {
|
||||
mIconView, STAGE_POSITION_UNDEFINED);
|
||||
mSnapshotView.bind(task);
|
||||
setOrientationState(orientedState);
|
||||
mDigitalWellBeingToast.initialize(mTask);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -984,10 +985,7 @@ public class TaskView extends FrameLayout implements Reusable {
|
||||
}
|
||||
if (needsUpdate(changes, FLAG_UPDATE_ICON)) {
|
||||
mIconLoadRequest = iconCache.updateIconInBackground(mTask,
|
||||
(task) -> {
|
||||
setIcon(mIconView, task.icon);
|
||||
mDigitalWellBeingToast.initialize(mTask);
|
||||
});
|
||||
(task) -> setIcon(mIconView, task.icon));
|
||||
}
|
||||
} else {
|
||||
if (needsUpdate(changes, FLAG_UPDATE_THUMBNAIL)) {
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2023 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="48dp"
|
||||
android:height="48dp"
|
||||
android:viewportWidth="48"
|
||||
android:viewportHeight="48">
|
||||
|
||||
<path
|
||||
android:fillColor="#F5F5F5"
|
||||
android:pathData="M 0 0 H 48 V 48 H 0 V 0 Z" />
|
||||
<group>
|
||||
<path
|
||||
android:fillColor="#0B57D0"
|
||||
android:pathData="M48 24C48 10.7452 37.2548 0 24 0C10.7452 0 0 10.7452 0 24C0 37.2548 10.7452 48 24 48C37.2548 48 48 37.2548 48 24Z" />
|
||||
<path
|
||||
android:fillColor="#ffffff"
|
||||
android:pathData="M32.892 16.8L31.2 15.108C30.756 14.652 30.144 14.4 29.508 14.4C28.872 14.4 28.26 14.652 27.816 15.108L18.468 24.456L15.708 27.216L14.448 32.28C14.412 32.352 14.4 32.448 14.4 32.532C14.4 33.12 14.88 33.6 15.468 33.6C15.552 33.6 15.648 33.588 15.732 33.564L20.796 32.304L23.556 29.544L32.904 20.196C33.348 19.74 33.6 19.128 33.6 18.492C33.6 17.856 33.348 17.244 32.892 16.8ZM21.852 27.852L20.652 29.052L18.96 27.36L20.16 26.16L29.508 16.8L31.2 18.492L21.852 27.852Z" />
|
||||
</group>
|
||||
</vector>
|
||||
@@ -106,6 +106,9 @@
|
||||
<!-- A widget category label for grouping widgets related to conversations. [CHAR_LIMIT=30] -->
|
||||
<string name="widget_category_conversations">Conversations</string>
|
||||
|
||||
<!-- A widget category label for grouping widgets related to note taking. [CHAR_LIMIT=30] -->
|
||||
<string name="widget_category_note_taking">Note-taking</string>
|
||||
|
||||
<!-- Title of a dialog. This dialog lets a user know how they can use widgets on their phone.
|
||||
[CHAR_LIMIT=NONE] -->
|
||||
<string name="widget_education_header">Useful info at your fingertips</string>
|
||||
|
||||
@@ -22,4 +22,10 @@
|
||||
launcher:sectionTitle="@string/widget_category_conversations">
|
||||
<widget launcher:provider="com.android.systemui/.people.widget.PeopleSpaceWidgetProvider" />
|
||||
</section>
|
||||
<section
|
||||
launcher:category="1"
|
||||
launcher:sectionDrawable="@drawable/ic_note_taking_widget_category"
|
||||
launcher:sectionTitle="@string/widget_category_note_taking">
|
||||
<widget launcher:provider="com.android.settings/com.android.settings.notetask.shortcut.CreateNoteTaskShortcutActivity" />
|
||||
</section>
|
||||
</widget-sections>
|
||||
@@ -35,6 +35,12 @@ import java.util.function.ToIntFunction;
|
||||
/**
|
||||
* Defines a set of flags used to control various launcher behaviors.
|
||||
*
|
||||
* Please only add flags to your assigned block to prevent merge conflicts. If you do not have
|
||||
* a block, please update the current empty block and add a new empty block below to prevent
|
||||
* merge conflicts with the previous block.
|
||||
* List of blocks can be found:
|
||||
* <a href="http://go/gnl-flags-block-directory">here</a>
|
||||
*
|
||||
* <p>All the flags should be defined here with appropriate default values.
|
||||
*/
|
||||
public final class FeatureFlags {
|
||||
@@ -74,9 +80,6 @@ public final class FeatureFlags {
|
||||
* Declare a new ToggleableFlag below. Give it a unique key (e.g. "QSB_ON_FIRST_SCREEN"),
|
||||
* and set a default value for the flag. This will be the default value on Debug builds.
|
||||
* <p>
|
||||
* Please only add flags to your assigned block to prevent merge conflicts. If you do not have
|
||||
* a block, please update the current empty block and add a new empty block below to prevent
|
||||
* merge conflicts with the previous block.
|
||||
*/
|
||||
// TODO(Block 1): Clean up flags
|
||||
public static final BooleanFlag ENABLE_ONE_SEARCH_MOTION = getReleaseFlag(270394223,
|
||||
@@ -179,7 +182,7 @@ public final class FeatureFlags {
|
||||
// TODO(Block 10): Clean up flags
|
||||
public static final BooleanFlag ENABLE_BACK_SWIPE_LAUNCHER_ANIMATION = getDebugFlag(270614790,
|
||||
"ENABLE_BACK_SWIPE_LAUNCHER_ANIMATION", DISABLED,
|
||||
"Enables predictive back aniamtion from all apps and widgets to home");
|
||||
"Enables predictive back animation from all apps and widgets to home");
|
||||
|
||||
// TODO(Block 11): Clean up flags
|
||||
public static final BooleanFlag ENABLE_TWO_PANEL_HOME = getDebugFlag(270392643,
|
||||
@@ -312,6 +315,10 @@ public final class FeatureFlags {
|
||||
"ENABLE_GRID_ONLY_OVERVIEW", DISABLED,
|
||||
"Enable a grid-only overview without a focused task.");
|
||||
|
||||
public static final BooleanFlag ENABLE_CURSOR_HOVER_STATES = getDebugFlag(243191650,
|
||||
"ENABLE_CURSOR_HOVER_STATES", DISABLED,
|
||||
"Enables cursor hover states for certain elements.");
|
||||
|
||||
// TODO(Block 24): Clean up flags
|
||||
public static final BooleanFlag ENABLE_NEW_MIGRATION_LOGIC = getDebugFlag(270393455,
|
||||
"ENABLE_NEW_MIGRATION_LOGIC", ENABLED,
|
||||
@@ -398,10 +405,6 @@ public final class FeatureFlags {
|
||||
|
||||
// TODO(Block 31): Empty block
|
||||
|
||||
public static final BooleanFlag ENABLE_CURSOR_HOVER_STATES = getDebugFlag(243191650,
|
||||
"ENABLE_CURSOR_HOVER_STATES", DISABLED,
|
||||
"Enables cursor hover states for certain elements.");
|
||||
|
||||
public static class BooleanFlag {
|
||||
|
||||
private final boolean mCurrentValue;
|
||||
|
||||
@@ -205,7 +205,7 @@ public class FolderIcon extends FrameLayout implements FolderListener, IconLabel
|
||||
lp.topMargin = grid.iconSizePx + grid.iconDrawablePaddingPx;
|
||||
|
||||
icon.setTag(folderInfo);
|
||||
icon.setOnClickListener(ItemClickHandler.INSTANCE);
|
||||
icon.setOnClickListener(activity.getItemOnClickListener());
|
||||
icon.mInfo = folderInfo;
|
||||
icon.mActivity = activity;
|
||||
icon.mDotRenderer = grid.mDotRendererWorkSpace;
|
||||
|
||||
@@ -216,7 +216,7 @@ public class FolderPagedView extends PagedView<PageIndicatorDots> implements Cli
|
||||
final BubbleTextView textView = mViewCache.getView(
|
||||
R.layout.folder_application, getContext(), null);
|
||||
textView.applyFromWorkspaceItem(item);
|
||||
textView.setOnClickListener(ItemClickHandler.INSTANCE);
|
||||
textView.setOnClickListener(mFolder.mActivityContext.getItemOnClickListener());
|
||||
textView.setOnLongClickListener(mFolder);
|
||||
textView.setOnFocusChangeListener(mFocusIndicatorHelper);
|
||||
CellLayoutLayoutParams lp = (CellLayoutLayoutParams) textView.getLayoutParams();
|
||||
|
||||
@@ -86,7 +86,7 @@ public class PendingAppWidgetHostView extends LauncherAppWidgetHostView
|
||||
setWillNotDraw(false);
|
||||
|
||||
super.updateAppWidget(null);
|
||||
setOnClickListener(ItemClickHandler.INSTANCE);
|
||||
setOnClickListener(mLauncher.getItemOnClickListener());
|
||||
|
||||
if (info.pendingItemInfo == null) {
|
||||
info.pendingItemInfo = new PackageItemInfo(info.providerName.getPackageName(),
|
||||
|
||||
Reference in New Issue
Block a user