summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/widget/WidgetAddFlowHandler.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/widget/WidgetAddFlowHandler.java')
-rw-r--r--src/com/android/launcher3/widget/WidgetAddFlowHandler.java18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/com/android/launcher3/widget/WidgetAddFlowHandler.java b/src/com/android/launcher3/widget/WidgetAddFlowHandler.java
index 629f30c26..5387be839 100644
--- a/src/com/android/launcher3/widget/WidgetAddFlowHandler.java
+++ b/src/com/android/launcher3/widget/WidgetAddFlowHandler.java
@@ -15,10 +15,8 @@
*/
package com.android.launcher3.widget;
-import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProviderInfo;
import android.content.Context;
-import android.content.Intent;
import android.os.Parcel;
import android.os.Parcelable;
@@ -26,7 +24,6 @@ import com.android.launcher3.ItemInfo;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherAppWidgetInfo;
import com.android.launcher3.LauncherAppWidgetProviderInfo;
-import com.android.launcher3.compat.AppWidgetManagerCompat;
import com.android.launcher3.util.PendingRequestArgs;
/**
@@ -56,15 +53,8 @@ public class WidgetAddFlowHandler implements Parcelable {
public void startBindFlow(Launcher launcher, int appWidgetId, ItemInfo info, int requestCode) {
launcher.setWaitingForResult(PendingRequestArgs.forWidgetInfo(appWidgetId, this, info));
-
- Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_BIND);
- intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
- intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_PROVIDER, mProviderInfo.provider);
- intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_PROVIDER_PROFILE,
- mProviderInfo.getProfile());
- // TODO: we need to make sure that this accounts for the options bundle.
- // intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_OPTIONS, options);
- launcher.startActivityForResult(intent, requestCode);
+ launcher.getAppWidgetHost()
+ .startBindFlow(launcher, appWidgetId, mProviderInfo, requestCode);
}
/**
@@ -85,9 +75,7 @@ public class WidgetAddFlowHandler implements Parcelable {
return false;
}
launcher.setWaitingForResult(PendingRequestArgs.forWidgetInfo(appWidgetId, this, info));
-
- AppWidgetManagerCompat.getInstance(launcher).startConfigActivity(
- mProviderInfo, appWidgetId, launcher, launcher.getAppWidgetHost(), requestCode);
+ launcher.getAppWidgetHost().startConfigActivity(launcher, appWidgetId, requestCode);
return true;
}