Merge "Updating java doc for requestPinAppWidget" into pi-dev

This commit is contained in:
Sunny Goyal
2018-03-20 02:07:48 +00:00
committed by Android (Google) Code Review
2 changed files with 9 additions and 1 deletions

View File

@@ -35,7 +35,6 @@ import android.content.pm.ParceledListSlice;
import android.content.pm.ShortcutInfo;
import android.os.Bundle;
import android.os.Handler;
import android.os.Process;
import android.os.RemoteException;
import android.os.UserHandle;
import android.util.DisplayMetrics;
@@ -1186,6 +1185,11 @@ public class AppWidgetManager {
* calls this API multiple times in a row. It may ignore the previous requests,
* for example.
*
* <p>Launcher will not show the configuration activity associated with the provider in this
* case. The app could either show the configuration activity as a response to the callback,
* or show if before calling the API (various configurations can be encapsulated in
* {@code successCallback} to avoid persisting them before the widgetId is known).
*
* @param provider The {@link ComponentName} for the {@link
* android.content.BroadcastReceiver BroadcastReceiver} provider for your AppWidget.
* @param extras In not null, this is passed to the launcher app. For eg {@link

View File

@@ -1429,6 +1429,10 @@ public class LauncherApps {
* Always non-null for a {@link #REQUEST_TYPE_APPWIDGET} request, and always null for a
* different request type.
*
* <p>Launcher should not show any configuration activity associated with the provider, and
* assume that the widget is already fully configured. Upon accepting the widget, it should
* pass the widgetId in {@link #accept(Bundle)}.
*
* @return requested {@link AppWidgetProviderInfo} when a request is of the
* {@link #REQUEST_TYPE_APPWIDGET} type. Null otherwise.
*/