RemoteView流程

link.

1、MediaAppWidgetProvider.java +90 ----- onReceive()
super.onReceive(context, intent);

2、AppWidgetProvider.java +66 ----- onReceive()
this.onUpdate(context, AppWidgetManager.getInstance(context), appWidgetIds);

3、MediaAppWidgetProvider.java +97 ----- onUpdate()
defaultAppWidget(context, appWidgetIds);

4、MediaAppWidgetProvider.java +121 ----- defaultAppWidget()
pushUpdate(context, appWidgetIds, views);

5、MediaAppWidgetProvider.java +127 ----- updateAppWidget()
gm.updateAppWidget(appWidgetIds, views);

6、AppWidgetManager.java +516 ----- updateAppWidget()
mService.updateAppWidgetIds(mPackageName, appWidgetIds, views);

7、AppWidgetServiceImpl.java +1516 ----- updateAppWidgetIds()
updateAppWidgetIds(callingPackage, appWidgetIds, views, false);

8、AppWidgetServiceImpl.java +1765 ----- updateAppWidgetIds()
updateAppWidgetInstanceLocked(widget, views, partially);

9、AppWidgetServiceImpl.java +1952 ----- updateAppWidgetInstanceLocked()
scheduleNotifyUpdateAppWidgetLocked(widget, widget.getEffectiveViewsLocked());

10、AppWidgetServiceImpl.java +2052 ----- scheduleNotifyUpdateAppWidgetLocked()
mCallbackHandler.obtainMessage(
CallbackHandler.MSG_NOTIFY_UPDATE_APP_WIDGET,
args).sendToTarget();

11、AppWidgetServiceImpl.java +3607 ---- handleMessage()
handleNotifyUpdateAppWidget(host, callbacks, appWidgetId, views, requestId);

12、AppWidgetServiceImpl.java +2060 ---- handleNotifyUpdateAppWidget()
callbacks.updateAppWidget(appWidgetId, views);

13、AppWidgetHost.java +85 ---- updateAppWidget()
Message msg = handler.obtainMessage(HANDLE_UPDATE, appWidgetId, 0, views);
msg.sendToTarget();

14、AppWidgetHost.java +133 ---- handleMessage()
updateAppWidgetView(msg.arg1, (RemoteViews)msg.obj);

15、AppWidgetHost.java +438 ---- updateAppWidgetView()
v.updateAppWidget(views);

16、AppWidgetHostView.java +377 ---- updateAppWidgetView()
applyRemoteViews(remoteViews, true);

17、AppWidgetHostView.java +415 ---- applyRemoteViews()
remoteViews.reapply(mContext, mView, mOnClickHandler);

18、RemoteViews.java +3522 ---- reapply()
rvToApply.performApply(v, (ViewGroup) v.getParent(), handler);

19、RemoteViews.java +3568 ---- performApply()
a.apply(v, parent, handler);

20、RemoteViews.java +958 ----- apply()
target.setOnClickListener(listener);

你可能感兴趣的:(Android,android)