Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6140481 authored by Sihua Ma's avatar Sihua Ma
Browse files

Deprecate notifyAppWidgetViewDataChanged

This is called whenever we want to refresh the entries in
RemoteViewsAdapter which is also being deprecated

Test: N/A
Bug: 245950570
Change-Id: I28d15c9ab59141f30ac7185d20ecd12b380bed04
parent 954393db
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -9410,8 +9410,8 @@ package android.appwidget {
    method @NonNull public java.util.List<android.appwidget.AppWidgetProviderInfo> getInstalledProvidersForProfile(@Nullable android.os.UserHandle);
    method public static android.appwidget.AppWidgetManager getInstance(android.content.Context);
    method public boolean isRequestPinAppWidgetSupported();
    method public void notifyAppWidgetViewDataChanged(int[], int);
    method public void notifyAppWidgetViewDataChanged(int, int);
    method @Deprecated public void notifyAppWidgetViewDataChanged(int[], int);
    method @Deprecated public void notifyAppWidgetViewDataChanged(int, int);
    method public void partiallyUpdateAppWidget(int[], android.widget.RemoteViews);
    method public void partiallyUpdateAppWidget(int, android.widget.RemoteViews);
    method public boolean requestPinAppWidget(@NonNull android.content.ComponentName, @Nullable android.os.Bundle, @Nullable android.app.PendingIntent);
+24 −2
Original line number Diff line number Diff line
@@ -781,7 +781,18 @@ public class AppWidgetManager {
     *
     * @param appWidgetIds  The AppWidget instances to notify of view data changes.
     * @param viewId        The collection view id.
     */
     * @deprecated The corresponding API
     * {@link RemoteViews#setRemoteAdapter(int, Intent)} associated with this method has been
     * deprecated. Moving forward please use
     * {@link RemoteViews#setRemoteAdapter(int, android.widget.RemoteViews.RemoteCollectionItems)}
     * instead to set {@link android.widget.RemoteViews.RemoteCollectionItems} for the remote
     * adapter and update the widget views by calling {@link #updateAppWidget(int[], RemoteViews)},
     * {@link #updateAppWidget(int, RemoteViews)},
     * {@link #updateAppWidget(ComponentName, RemoteViews)},
     * {@link #partiallyUpdateAppWidget(int[], RemoteViews)},
     * or {@link #partiallyUpdateAppWidget(int, RemoteViews)}, whichever applicable.
     */
    @Deprecated
    public void notifyAppWidgetViewDataChanged(int[] appWidgetIds, int viewId) {
        if (mService == null) {
            return;
@@ -817,7 +828,18 @@ public class AppWidgetManager {
     *
     * @param appWidgetId  The AppWidget instance to notify of view data changes.
     * @param viewId       The collection view id.
     */
     * @deprecated The corresponding API
     * {@link RemoteViews#setRemoteAdapter(int, Intent)} associated with this method has been
     * deprecated. Moving forward please use
     * {@link RemoteViews#setRemoteAdapter(int, android.widget.RemoteViews.RemoteCollectionItems)}
     * instead to set {@link android.widget.RemoteViews.RemoteCollectionItems} for the remote
     * adapter and update the widget views by calling {@link #updateAppWidget(int[], RemoteViews)},
     * {@link #updateAppWidget(int, RemoteViews)},
     * {@link #updateAppWidget(ComponentName, RemoteViews)},
     * {@link #partiallyUpdateAppWidget(int[], RemoteViews)},
     * or {@link #partiallyUpdateAppWidget(int, RemoteViews)}, whichever applicable.
     */
    @Deprecated
    public void notifyAppWidgetViewDataChanged(int appWidgetId, int viewId) {
        if (mService == null) {
            return;