am e70748e7: Merge "Remove unnecessary userid check" into jb-mr2-dev
* commit 'e70748e78b0819bf485efdeabe7f8447b201b13a': Remove unnecessary userid check
This commit is contained in:
@@ -408,12 +408,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);
|
||||
@@ -424,7 +422,6 @@ public class AppWidgetHost {
|
||||
}
|
||||
|
||||
void viewDataChanged(int appWidgetId, int viewId, int userId) {
|
||||
checkUserMatch(userId);
|
||||
AppWidgetHostView v;
|
||||
synchronized (mViews) {
|
||||
v = mViews.get(appWidgetId);
|
||||
@@ -434,16 +431,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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user