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

Commit a9e81064 authored by Jim Miller's avatar Jim Miller Committed by Android (Google) Code Review
Browse files

Merge "Fix widget update issue"

parents a3bb886d 21ace3f3
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -210,20 +210,17 @@ public class AppWidgetHost {
    }

    /**
     * Get a appWidgetId for a host in the calling process.
     * Get a appWidgetId for a host in the given package.
     *
     * @return a appWidgetId
     * @hide
     */
    public static int allocateAppWidgetIdForSystem(int hostId, int userId) {
    public static int allocateAppWidgetIdForPackage(int hostId, int userId, String packageName) {
        checkCallerIsSystem();
        try {
            if (sService == null) {
                bindService();
            }
            Context systemContext =
                    (Context) ActivityThread.currentActivityThread().getSystemContext();
            String packageName = systemContext.getPackageName();
            return sService.allocateAppWidgetId(packageName, hostId, userId);
        } catch (RemoteException e) {
            throw new RuntimeException("system server dead?", e);