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

Commit 933decaa authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Verify AppWidget ownership during update.

Bug: 5563081
Change-Id: I528ec944d404989bb21b32ef01feb3d35e23d3ad
parent 163e6443
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -751,13 +751,16 @@ class AppWidgetService extends IAppWidgetService.Stub
                return;
            }
            ArrayList<AppWidgetId> instances = p.instances;
            final int callingUid = getCallingUid();
            final int N = instances.size();
            for (int i=0; i<N; i++) {
                AppWidgetId id = instances.get(i);
                if (canAccessAppWidgetId(id, callingUid)) {
                    updateAppWidgetInstanceLocked(id, views);
                }
            }
        }
    }

    void updateAppWidgetInstanceLocked(AppWidgetId id, RemoteViews views) {
        updateAppWidgetInstanceLocked(id, views, false);