Merge "Waiting for Fallback Overview to stop after pressing Home" into main
diff --git a/OWNERS b/OWNERS
index 38963d0..b8aae78 100644
--- a/OWNERS
+++ b/OWNERS
@@ -12,7 +12,6 @@
jonmiranda@google.com
alexchau@google.com
patmanning@google.com
-tsuharesu@google.com
awickham@google.com
# Launcher workspace eng team
diff --git a/quickstep/src/com/android/launcher3/WidgetPickerActivity.java b/quickstep/src/com/android/launcher3/WidgetPickerActivity.java
index 43716ab..477cd84 100644
--- a/quickstep/src/com/android/launcher3/WidgetPickerActivity.java
+++ b/quickstep/src/com/android/launcher3/WidgetPickerActivity.java
@@ -22,7 +22,10 @@
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
import static com.android.launcher3.util.Executors.MODEL_EXECUTOR;
+import android.appwidget.AppWidgetProviderInfo;
+import android.content.Intent;
import android.os.Bundle;
+import android.view.View;
import android.view.WindowInsetsController;
import android.view.WindowManager;
@@ -32,6 +35,7 @@
import com.android.launcher3.model.WidgetsModel;
import com.android.launcher3.popup.PopupDataProvider;
import com.android.launcher3.widget.BaseWidgetSheet;
+import com.android.launcher3.widget.WidgetCell;
import com.android.launcher3.widget.model.WidgetsListBaseEntry;
import com.android.launcher3.widget.picker.WidgetsFullSheet;
@@ -81,6 +85,23 @@
return mDragLayer;
}
+ @Override
+ public View.OnClickListener getItemOnClickListener() {
+ return v -> {
+ final AppWidgetProviderInfo info =
+ (v instanceof WidgetCell) ? ((WidgetCell) v).getWidgetItem().widgetInfo : null;
+ if (info == null || info.provider == null) {
+ return;
+ }
+
+ setResult(RESULT_OK, new Intent()
+ .putExtra(Intent.EXTRA_COMPONENT_NAME, info.provider)
+ .putExtra(Intent.EXTRA_USER, info.getProfile()));
+
+ finish();
+ };
+ }
+
private void refreshAndBindWidgets() {
MODEL_EXECUTOR.execute(() -> {
LauncherAppState app = LauncherAppState.getInstance(this);
diff --git a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java
index c482911..ec9f4e5 100644
--- a/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java
+++ b/quickstep/src/com/android/launcher3/taskbar/bubbles/BubbleBarView.java
@@ -130,6 +130,8 @@
super(context, attrs, defStyleAttr, defStyleRes);
TaskbarActivityContext activityContext = ActivityContext.lookupContext(context);
+ setAlpha(0);
+ setVisibility(INVISIBLE);
mIconOverlapAmount = getResources().getDimensionPixelSize(R.dimen.bubblebar_icon_overlap);
mIconSpacing = getResources().getDimensionPixelSize(R.dimen.bubblebar_icon_spacing);
mIconSize = getResources().getDimensionPixelSize(R.dimen.bubblebar_icon_size);
diff --git a/src/com/android/launcher3/config/FeatureFlags.java b/src/com/android/launcher3/config/FeatureFlags.java
index 7dfce56..f9d282c 100644
--- a/src/com/android/launcher3/config/FeatureFlags.java
+++ b/src/com/android/launcher3/config/FeatureFlags.java
@@ -169,10 +169,6 @@
// TODO(Block 8): Clean up flags
// TODO(Block 9): Clean up flags
- public static final BooleanFlag UNFOLDED_WIDGET_PICKER = getDebugFlag(301918659,
- "UNFOLDED_WIDGET_PICKER", DISABLED, "Enable new widget picker that takes "
- + "advantage of the unfolded foldable format");
-
public static final BooleanFlag MULTI_SELECT_EDIT_MODE = getDebugFlag(270709220,
"MULTI_SELECT_EDIT_MODE", DISABLED, "Enable new multi-select edit mode "
+ "for home screen");
diff --git a/src/com/android/launcher3/widget/WidgetCell.java b/src/com/android/launcher3/widget/WidgetCell.java
index c30342a..8f5e2b6 100644
--- a/src/com/android/launcher3/widget/WidgetCell.java
+++ b/src/com/android/launcher3/widget/WidgetCell.java
@@ -147,6 +147,11 @@
return mAppWidgetHostViewScale;
}
+ /** Returns the {@link WidgetItem} for this {@link WidgetCell}. */
+ public WidgetItem getWidgetItem() {
+ return mItem;
+ }
+
/**
* Called to clear the view and free attached resources. (e.g., {@link Bitmap}
*/
diff --git a/tests/src/com/android/launcher3/util/ExecutorRunnableTest.kt b/tests/src/com/android/launcher3/util/ExecutorRunnableTest.kt
index 4760cd8..b8d74aa 100644
--- a/tests/src/com/android/launcher3/util/ExecutorRunnableTest.kt
+++ b/tests/src/com/android/launcher3/util/ExecutorRunnableTest.kt
@@ -18,6 +18,7 @@
import android.testing.AndroidTestingRunner
import androidx.test.filters.SmallTest
+import com.android.launcher3.util.rule.TestStabilityRule
import java.util.concurrent.ExecutorService
import junit.framework.Assert.assertEquals
import junit.framework.Assert.assertFalse
@@ -65,6 +66,9 @@
}
@Test
+ @TestStabilityRule.Stability(
+ flavors = TestStabilityRule.LOCAL or TestStabilityRule.PLATFORM_POSTSUBMIT
+ ) // b/316588649
fun run_and_cancel_cancelCallback() {
underTest.cancel(false)
awaitAllExecutorCompleted()