From 0bc33273dd9b73d0dfe06bcb604bf94aa675c41d Mon Sep 17 00:00:00 2001 From: Suphon Thanakornpakapong Date: Thu, 21 Oct 2021 14:21:13 +0700 Subject: [PATCH] Fix widget add flow below P --- src/com/android/launcher3/widget/WidgetAddFlowHandler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/widget/WidgetAddFlowHandler.java b/src/com/android/launcher3/widget/WidgetAddFlowHandler.java index 93132664ef..cd2da3e015 100644 --- a/src/com/android/launcher3/widget/WidgetAddFlowHandler.java +++ b/src/com/android/launcher3/widget/WidgetAddFlowHandler.java @@ -24,6 +24,7 @@ import android.os.Parcel; import android.os.Parcelable; import com.android.launcher3.Launcher; +import com.android.launcher3.Utilities; import com.android.launcher3.model.data.ItemInfo; import com.android.launcher3.model.data.LauncherAppWidgetInfo; import com.android.launcher3.util.PendingRequestArgs; @@ -90,7 +91,7 @@ public class WidgetAddFlowHandler implements Parcelable { * @return true if the widget needs configuration, false otherwise. */ public boolean needsConfigure() { - int featureFlags = mProviderInfo.widgetFeatures; + int featureFlags = Utilities.ATLEAST_P ? mProviderInfo.widgetFeatures : 0; // A widget's configuration is optional only if it's configuration is marked as optional AND // it can be reconfigured later. boolean configurationOptional = (featureFlags & WIDGET_FEATURE_CONFIGURATION_OPTIONAL) != 0