Introducing new variable to enable/disable shortcuts.

Widgets and shortcuts are two different entities but they are controlled
by same variable GO_DISABLE_WIDGETS. In this CL I have introduced a new
variable GO_DISABLE_SHORTCUTS to enable/disable widgets.

Test: Tested manually on device.
Bug: 236268654
Change-Id: Ib373b042fbfd0493e6345ef10e5631dbfd96b8c3
This commit is contained in:
Raj Garg
2022-06-17 10:12:12 +00:00
parent 2d675e8ab0
commit 63ee5d0908
7 changed files with 18 additions and 14 deletions
@@ -16,7 +16,7 @@
package com.android.launcher3.views;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_APP_LAUNCH_TAP;
import static com.android.launcher3.model.WidgetsModel.GO_DISABLE_WIDGETS;
import static com.android.launcher3.model.WidgetsModel.GO_DISABLE_SHORTCUTS;
import android.app.ActivityOptions;
import android.content.ActivityNotFoundException;
@@ -190,7 +190,7 @@ public interface AppLauncher extends ActivityContext {
*/
default void startShortcut(String packageName, String id, Rect sourceBounds,
Bundle startActivityOptions, UserHandle user) {
if (GO_DISABLE_WIDGETS) {
if (GO_DISABLE_SHORTCUTS) {
return;
}
try {