介绍
客户描述不想要Launcher中长按图标时显示微件功能,需要移除。
修改
方式一
将如下变量置为true
路径:packages/apps/Launcher3/src/com/android/launcher3/config/BaseFlags.java
// Features to control Launcher3Go behavior
public static final boolean GO_DISABLE_WIDGETS = true;
方式二
移除构造方法中的 “new SystemShortcut.Widgets()”
路径:packages/apps/Launcher3/src/com/android/launcher3/popup/SystemShortcutFactory.java
public SystemShortcutFactory() {
//*/2023-11-16.soda water. remove Widgets
this(new SystemShortcut.AppInfo(),new SystemShortcut.Install());
/*/
this(new SystemShortcut.AppInfo(),
new SystemShortcut.Widgets(), new SystemShortcut.Install());
//*/
}