mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 15:56:49 +00:00
Adding support for hiding widgets from the widget tray and reconfiguring widgets
> Removing AppInfo target > Switching between uninstall and setup based on the drag view Bug: 63931362 Change-Id: Iccd6f965fa3d61992244a365efc242122292c0ca
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
|
||||
package com.android.launcher3.model;
|
||||
|
||||
import static android.appwidget.AppWidgetProviderInfo.WIDGET_FEATURE_HIDE_FROM_PICKER;
|
||||
|
||||
import android.appwidget.AppWidgetProviderInfo;
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
@@ -153,6 +155,11 @@ public class WidgetsModel {
|
||||
// add and update.
|
||||
for (WidgetItem item : rawWidgetsShortcuts) {
|
||||
if (item.widgetInfo != null) {
|
||||
if ((item.widgetInfo.getWidgetFeatures() & WIDGET_FEATURE_HIDE_FROM_PICKER) != 0) {
|
||||
// Widget is hidden from picker
|
||||
continue;
|
||||
}
|
||||
|
||||
// Ensure that all widgets we show can be added on a workspace of this size
|
||||
int minSpanX = Math.min(item.widgetInfo.spanX, item.widgetInfo.minSpanX);
|
||||
int minSpanY = Math.min(item.widgetInfo.spanY, item.widgetInfo.minSpanY);
|
||||
|
||||
Reference in New Issue
Block a user