• AppWidgetHost.java#allocateAppWidgetId 110 //Get a appWidgetId for a host in the calling process. //@return a appWidgetId public int allocateAppWidgetId() {…}
final SparseIntArray mNextAppWidgetIds = new SparseIntArray(); final int appWidgetId = peekNextAppWidgetIdLocked(userId) + 1; return mNextAppWidgetIds.get(userId);
the default launcher supports • updateAppWidget • {@code TRUE} if the launcher supports this feature. Note the API will return without waiting for the user to respond, so getting {@code TRUE} from this API does not mean the shortcut is pinned. {@code FALSE} if the launcher doesn't support this feature. • ͜ΕʹͲΜͳҧ͍͕͋Δͷ͔ 114