summaryrefslogtreecommitdiffstats
path: root/tests/src/com/android
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2017-07-03 13:50:52 -0700
committerSunny Goyal <sunnygoyal@google.com>2017-07-21 14:10:13 -0700
commit64a75aa305bdd1ca8f22d2b48dedc5cada8fabc5 (patch)
treece56a7e74ed2dcbcec78dacbbbc9494b9ef0ca44 /tests/src/com/android
parent70999fef4bc37bcf32556e2de23ec115dbd30cf8 (diff)
downloadandroid_packages_apps_Trebuchet-64a75aa305bdd1ca8f22d2b48dedc5cada8fabc5.tar.gz
android_packages_apps_Trebuchet-64a75aa305bdd1ca8f22d2b48dedc5cada8fabc5.tar.bz2
android_packages_apps_Trebuchet-64a75aa305bdd1ca8f22d2b48dedc5cada8fabc5.zip
Adding A feature flag to disable widgets and a corresponding build
target Launcher3Go without widgets support Bug: 62353159 Change-Id: Ia03d2235a9bcf75f9ef191924f81630e63a2c684
Diffstat (limited to 'tests/src/com/android')
-rw-r--r--tests/src/com/android/launcher3/ui/widget/BindWidgetTest.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/src/com/android/launcher3/ui/widget/BindWidgetTest.java b/tests/src/com/android/launcher3/ui/widget/BindWidgetTest.java
index 97f7b505a..221fed1fc 100644
--- a/tests/src/com/android/launcher3/ui/widget/BindWidgetTest.java
+++ b/tests/src/com/android/launcher3/ui/widget/BindWidgetTest.java
@@ -28,6 +28,7 @@ import android.support.test.uiautomator.UiSelector;
import android.test.suitebuilder.annotation.LargeTest;
import com.android.launcher3.Launcher;
+import com.android.launcher3.LauncherAppWidgetHost;
import com.android.launcher3.LauncherAppWidgetHostView;
import com.android.launcher3.LauncherAppWidgetInfo;
import com.android.launcher3.LauncherAppWidgetProviderInfo;
@@ -285,7 +286,7 @@ public class BindWidgetTest extends LauncherInstrumentationTestCase {
pendingInfo.minSpanY = item.minSpanY;
Bundle options = WidgetHostViewLoader.getDefaultOptionsForWidget(mTargetContext, pendingInfo);
- AppWidgetHost host = new AppWidgetHost(mTargetContext, Launcher.APPWIDGET_HOST_ID);
+ AppWidgetHost host = new LauncherAppWidgetHost(mTargetContext);
int widgetId = host.allocateAppWidgetId();
if (!mWidgetManager.bindAppWidgetIdIfAllowed(widgetId, info, options)) {
host.deleteAppWidgetId(widgetId);