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

Commit ab80d007 authored by Jim Miller's avatar Jim Miller Committed by Android Git Automerger
Browse files

am 33c05985: am e70748e7: Merge "Remove unnecessary userid check" into jb-mr2-dev

* commit '33c05985':
  Remove unnecessary userid check
parents bb709246 33c05985
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -404,12 +404,10 @@ public class AppWidgetHost {
     * @hide
     */
    protected void onProvidersChanged(int userId) {
        checkUserMatch(userId);
        // Does nothing
    }

    void updateAppWidgetView(int appWidgetId, RemoteViews views, int userId) {
        checkUserMatch(userId);
        AppWidgetHostView v;
        synchronized (mViews) {
            v = mViews.get(appWidgetId);
@@ -420,7 +418,6 @@ public class AppWidgetHost {
    }

    void viewDataChanged(int appWidgetId, int viewId, int userId) {
        checkUserMatch(userId);
        AppWidgetHostView v;
        synchronized (mViews) {
            v = mViews.get(appWidgetId);
@@ -430,16 +427,6 @@ public class AppWidgetHost {
        }
    }

    // Ensure that the userId passed to us agrees with the one associated with this instance
    // of AppWidgetHost.
    // TODO: This should be removed in production code.
    private void checkUserMatch(int userId) {
        if (userId != mContext.getUserId()) {
            throw new IllegalStateException(
                "User ids don't match, userId=" + userId + ", mUserId=" + mContext.getUserId());
        }
    }

    /**
     * Clear the list of Views that have been created by this AppWidgetHost.
     */