Adding A feature flag to disable widgets and a corresponding build
target Launcher3Go without widgets support Bug: 62353159 Change-Id: Ia03d2235a9bcf75f9ef191924f81630e63a2c684
This commit is contained in:
1 parent
70999fef4b
commit
64a75aa305
22 files changed
+473
-97
No files matched your search
@@ -20,8 +20,10 @@ import android.appwidget.AppWidgetProviderInfo;
|
||||
import android.content.Context;
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.util.PackageUserKey;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
class AppWidgetManagerCompatVO extends AppWidgetManagerCompatVL {
|
||||
@@ -32,6 +34,9 @@ class AppWidgetManagerCompatVO extends AppWidgetManagerCompatVL {
|
||||
|
||||
@Override
|
||||
public List<AppWidgetProviderInfo> getAllProviders(@Nullable PackageUserKey packageUser) {
|
||||
if (FeatureFlags.GO_DISABLE_WIDGETS) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
if (packageUser == null) {
|
||||
return super.getAllProviders(null);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user