fix: Ignore generatedPreviews flags on Vanilla Ice Cream and above

This is always enabled on correct AOSP implementations, crashes should be handled by OEM
This commit is contained in:
Pun Butrach committed 2025-12-05 22:51:06 +07:00
1 parent e58cf687a2
commit f831a3bf4e
3 files changed
+5 -4

No files matched your search

@@ -33,6 +33,7 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import com.android.launcher3.Utilities;
import com.android.launcher3.logging.FileLog;
import com.android.launcher3.model.data.LauncherAppWidgetInfo;
import com.android.launcher3.pm.UserCache;
@@ -162,7 +163,6 @@ public class WidgetManagerHelper {
@RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
public RemoteViews loadGeneratedPreview(@NonNull AppWidgetProviderInfo info,
int widgetCategory) {
if (!Flags.generatedPreviews()) return null;
return mAppWidgetManager.getWidgetPreview(info.provider, info.getProfile(), widgetCategory);
}