Java源码示例:com.taobao.weex.adapter.IWXUserTrackAdapter
示例1
public void commitJSBridgeAlarmMonitor(String instanceId, WXErrorCode errCode, String errMsg) {
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
if (instance == null || errCode == null) {
return;
}
// TODO: We should move WXPerformance and IWXUserTrackAdapter
// into a adapter level.
// comment out the line below to prevent commiting twice.
//instance.commitUTStab(WXConst.JS_BRIDGE, errCode, errMsg);
IWXUserTrackAdapter adapter = WXSDKManager.getInstance().getIWXUserTrackAdapter();
if (adapter == null) {
return;
}
WXPerformance performance = new WXPerformance();
performance.args=instance.getBundleUrl();
performance.errCode=errCode.getErrorCode();
if (errCode != WXErrorCode.WX_SUCCESS) {
performance.appendErrMsg(TextUtils.isEmpty(errMsg)?errCode.getErrorMsg():errMsg);
WXLogUtils.e("wx_monitor",performance.toString());
}
adapter.commit(WXEnvironment.getApplication(), null, IWXUserTrackAdapter.JS_BRIDGE, performance, instance.getUserTrackParams());
}
示例2
public void commitJSFrameworkAlarmMonitor(final String type, final WXErrorCode errorCode, String errMsg) {
if (TextUtils.isEmpty(type) || errorCode == null) {
return;
}
if (WXSDKManager.getInstance().getWXStatisticsListener() != null) {
WXSDKManager.getInstance().getWXStatisticsListener().onException("0",
errorCode.getErrorCode(),
TextUtils.isEmpty(errMsg) ? errorCode.getErrorMsg() : errMsg);
}
final IWXUserTrackAdapter userTrackAdapter = WXSDKManager.getInstance().getIWXUserTrackAdapter();
if (userTrackAdapter == null) {
return;
}
WXPerformance performance = new WXPerformance();
performance.errCode = errorCode.getErrorCode();
if (errorCode != WXErrorCode.WX_SUCCESS) {
performance.appendErrMsg(TextUtils.isEmpty(errMsg)?errorCode.getErrorMsg():errMsg);
WXLogUtils.e("wx_monitor",performance.toString());
}
userTrackAdapter.commit(WXEnvironment.getApplication(), null, type, performance, null);
}
示例3
/**
* Load .so library
*/
static boolean _loadUnzipSo(String libName,
int version,
IWXUserTrackAdapter utAdapter) {
boolean initSuc = false;
try {
if (isExist(libName, version)) {
// If a library loader adapter exists, use this adapter to load library
// instead of System.load.
if (mSoLoader != null) {
mSoLoader.doLoad(_targetSoFile(libName, version));
} else {
System.load(_targetSoFile(libName, version));
}
commit(utAdapter, "2000", "Load file extract from apk successfully.");
}
initSuc = true;
} catch (Throwable e) {
commit(utAdapter,
WXErrorCode.WX_ERR_COPY_FROM_APK.getErrorCode(),
WXErrorCode.WX_ERR_COPY_FROM_APK.getErrorMsg() + ":" + e.getMessage());
initSuc = false;
WXLogUtils.e("", e);
}
return initSuc;
}
示例4
static void commit(IWXUserTrackAdapter utAdapter, String errCode, String errMsg) {
if (mStatisticsListener != null) {
mStatisticsListener.onException("0", errCode, errMsg);
}
if (utAdapter == null) {
return;
}
if (errCode != null && errMsg != null) {
WXPerformance p = new WXPerformance();
p.errCode = errCode;
p.errMsg = errMsg;
utAdapter.commit(null, null, WXEnvironment.ENVIRONMENT, p, null);
} else {
utAdapter.commit(null, null, WXEnvironment.ENVIRONMENT, null, null);
}
}
示例5
@Override
public void executeDom(DOMActionContext context) {
if (context.isDestory()) {
return;
}
WXSDKInstance instance = context.getInstance();
WXDomObject domObject = context.getDomByRef(mRef);
if (domObject == null) {
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_ERR_DOM_ADDEVENT);
}
return;
}
domObject.addEvent(mEvent);
mUpdatedDom = domObject;
context.postRenderTask(this);
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}
示例6
@Override
public void executeDom(DOMActionContext context) {
if (context.isDestory()) {
return;
}
WXSDKInstance instance = context.getInstance();
final WXDomObject domObject = context.getDomByRef(mRef);
if (domObject == null) {
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_ERR_DOM_UPDATEATTRS);
}
return;
}
domObject.updateAttr(mData);
context.postRenderTask(this);
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}
示例7
@Override
public void executeDom(DOMActionContext context) {
if (context.isDestory()) {
return;
}
WXSDKInstance instance = context.getInstance();
WXDomObject domObject = context.getDomByRef(mRef);
if (domObject == null) {
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_ERR_DOM_REMOVEEVENT);
}
return;
}
domObject.removeEvent(mEvent);
mUpdatedDomObject = domObject;
context.postRenderTask(this);
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}
示例8
/**
* Load .so library
*/
static boolean _loadUnzipSo(String libName, int version, IWXUserTrackAdapter utAdapter) {
boolean initSuc = false;
try {
if (isExist(libName, version)) {
System.load(_targetSoFile(libName, version));
commit(utAdapter, "2000", "Load file extract from apk successfully.");
}
initSuc = true;
} catch (Throwable e) {
commit(utAdapter, WXErrorCode.WX_ERR_COPY_FROM_APK.getErrorCode(), WXErrorCode.WX_ERR_COPY_FROM_APK.getErrorMsg() + ":" + e.getMessage());
initSuc = false;
WXLogUtils.e("", e);
}
return initSuc;
}
示例9
/**
* Create a command object for scroll the given view to the specified position.
* @param ref Reference of the dom.
* @param options the specified position
*/
void scrollToDom(final String ref, final JSONObject options) {
if (mDestroy) {
return;
}
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(mInstanceId);
mNormalTasks.add(new IWXRenderTask() {
@Override
public void execute() {
mWXRenderManager.scrollToComponent(mInstanceId, ref, options);
}
@Override
public String toString() {
return "scrollToPosition";
}
});
mDirty = true;
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}
示例10
/**
* Create a command object for notifying {@link WXRenderManager} that the process of update
* given view is finished, and put the command object in the queue.
*/
void updateFinish() {
if (mDestroy) {
return;
}
mNormalTasks.add(new IWXRenderTask() {
@Override
public void execute() {
mWXRenderManager.updateFinish(mInstanceId);
}
@Override
public String toString() {
return "updateFinish";
}
});
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(mInstanceId);
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}
示例11
/**
* Load .so library
*/
static boolean _loadUnzipSo(String libName, int version, IWXUserTrackAdapter utAdapter) {
boolean initSuc = false;
try {
if (isExist(libName, version)) {
System.load(_targetSoFile(libName, version));
commit(utAdapter, "2000", "Load file extract from apk successfully.");
}
initSuc = true;
} catch (Exception e) {
commit(utAdapter, WXErrorCode.WX_ERR_COPY_FROM_APK.getErrorCode(), WXErrorCode.WX_ERR_COPY_FROM_APK.getErrorMsg() + ":" + e.getMessage());
initSuc = false;
e.printStackTrace();
} catch (java.lang.UnsatisfiedLinkError e2) {
commit(utAdapter, WXErrorCode.WX_ERR_COPY_FROM_APK.getErrorCode(), WXErrorCode.WX_ERR_COPY_FROM_APK.getErrorMsg() + ":" + e2.getMessage());
initSuc = false;
e2.printStackTrace();
} catch (java.lang.Error e3) {
commit(utAdapter, WXErrorCode.WX_ERR_COPY_FROM_APK.getErrorCode(), WXErrorCode.WX_ERR_COPY_FROM_APK.getErrorMsg() + ":" + e3.getMessage());
initSuc = false;
e3.printStackTrace();
}
return initSuc;
}
示例12
@Override
public void executeDom(DOMActionContext context) {
if (context.isDestory()) {
return;
}
WXSDKInstance instance = context.getInstance();
context.postRenderTask(this);
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}
示例13
@Override
public void executeDom(DOMActionContext context) {
if (context.isDestory()) {
return;
}
WXDomObject root = context.getDomByRef(WXDomObject.ROOT);
mLayoutHeight = (int)root.getLayoutHeight();
mLayoutWidth = (int)root.getLayoutWidth();
context.postRenderTask(this);
WXSDKInstance instance = context.getInstance();
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}
示例14
@Override
public void executeDom(DOMActionContext context) {
if (context.isDestory()) {
return;
}
context.postRenderTask(this);
WXSDKInstance instance = context.getInstance();
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}
示例15
@Override
public void executeDom(DOMActionContext context) {
if (context.isDestory()) {
return;
}
WXSDKInstance instance = context.getInstance();
WXDomObject domObject = context.getDomByRef(mRef);
WXDomObject parentObject = context.getDomByRef(mParentRef);
if (domObject == null || domObject.parent == null
|| parentObject == null || parentObject.hasNewLayout()) {
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_ERR_DOM_MOVEELEMENT);
}
return;
}
int index = mIndex;
if (domObject.parent.equals(parentObject)) {
if(parentObject.index(domObject) == index) {
return;
} else if(domObject.parent.index(domObject)< index){
index = index -1;
}
}
mNewIndex = index;
domObject.parent.remove(domObject);
parentObject.add(domObject, mNewIndex);
context.postRenderTask(this);
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}
示例16
@Override
protected void appendDomToTree(DOMActionContext context, WXDomObject domObject) {
WXDomObject parent;
mRef = domObject.getRef();
if ((parent = context.getDomByRef(mParentRef)) == null) {
context.getInstance().commitUTStab(IWXUserTrackAdapter.DOM_MODULE, getErrorCode());
return;
} else {
//non-root and parent exist
parent.add(domObject, mAddIndex);
}
}
示例17
@Override
public void executeDom(DOMActionContext context) {
if (context.isDestory() || mData == null) {
return;
}
WXSDKInstance instance = context.getInstance();
WXDomObject domObject = context.getDomByRef(mRef);
if (domObject == null) {
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_ERR_DOM_UPDATESTYLE);
}
return;
}
mPadding = domObject.getPadding();
mBorder = domObject.getBorder();
Map<String, Object> animationMap = new ArrayMap<>(2);
animationMap.put(WXDomObject.TRANSFORM, mData.get(WXDomObject.TRANSFORM));
animationMap.put(WXDomObject.TRANSFORM_ORIGIN, mData.get(WXDomObject.TRANSFORM_ORIGIN));
context.addAnimationForElement(mRef, animationMap);
if (!mData.isEmpty()) {
domObject.updateStyle(mData, mIsCausedByPesudo);
domObject.traverseTree(context.getApplyStyleConsumer());
context.postRenderTask(this);
}
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}
示例18
@Override
public void executeDom(DOMActionContext context) {
if (context.isDestory()) {
return;
}
WXSDKInstance instance = context.getInstance();
WXDomObject domObject = context.getDomByRef(mRef);
if (domObject == null) {
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_ERR_DOM_REMOVEELEMENT);
}
return;
}
WXDomObject parent = domObject.parent;
if (parent == null) {
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_ERR_DOM_REMOVEELEMENT);
}
return;
}
domObject.traverseTree(context.getRemoveElementConsumer());
parent.remove(domObject);
context.unregisterDOMObject(mRef);
context.postRenderTask(this);
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}
示例19
@Override
public void onActivityPause() {
onViewDisappear();
if(!isCommit){
Set<String> componentTypes= WXComponentFactory.getComponentTypesByInstanceId(getInstanceId());
if(componentTypes!=null && componentTypes.contains(WXBasicComponentType.SCROLLER)){
mWXPerformance.useScroller=1;
}
mWXPerformance.maxDeepViewLayer=getMaxDeepLayer();
if (mUserTrackAdapter != null) {
mUserTrackAdapter.commit(mContext, null, IWXUserTrackAdapter.LOAD, mWXPerformance, getUserTrackParams());
}
isCommit=true;
}
// module listen Activity onActivityPause
WXModuleManager.onActivityPause(getInstanceId());
if(mRootComp != null) {
mRootComp.onActivityPause();
}else{
WXLogUtils.w("Warning :Component tree has not build completely,onActivityPause can not be call!");
}
WXLogUtils.i("Application onActivityPause()");
if (!mCurrentGround) {
WXLogUtils.i("Application to be in the backround");
Intent intent = new Intent(WXGlobalEventReceiver.EVENT_ACTION);
intent.putExtra(WXGlobalEventReceiver.EVENT_NAME, Constants.Event.PAUSE_EVENT);
intent.putExtra(WXGlobalEventReceiver.EVENT_WX_INSTANCEID, getInstanceId());
mContext.sendBroadcast(intent);
this.mCurrentGround = true;
}
}
示例20
/**
* Deprecated. Use {@link #initialize(Application, InitConfig)} instead.
*/
@Deprecated
public static void init(Application application, IWXUserTrackAdapter utAdapter, String framework) {
initialize(application,
new InitConfig.Builder()
.setUtAdapter(utAdapter)
.build()
);
}
示例21
@Deprecated
public static void init(Application application, String framework, IWXUserTrackAdapter utAdapter, IWXImgLoaderAdapter imgLoaderAdapter, IWXHttpAdapter httpAdapter) {
initialize(application,
new InitConfig.Builder()
.setUtAdapter(utAdapter)
.setHttpAdapter(httpAdapter)
.setImgAdapter(imgLoaderAdapter)
.build()
);
}
示例22
public void commitJSBridgeAlarmMonitor(String instanceId, WXErrorCode errCode, String errMsg) {
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(instanceId);
IWXUserTrackAdapter adapter = WXSDKManager.getInstance().getIWXUserTrackAdapter();
if (instance == null || adapter == null || errCode == null) {
return;
}
WXPerformance performance = new WXPerformance();
performance.args=instance.getBundleUrl();
performance.errCode=errCode.getErrorCode();
if (errCode != WXErrorCode.WX_SUCCESS) {
performance.appendErrMsg(TextUtils.isEmpty(errMsg)?errCode.getErrorMsg():errMsg);
WXLogUtils.e("wx_monitor",performance.toString());
}
adapter.commit(WXEnvironment.getApplication(), null, IWXUserTrackAdapter.JS_BRIDGE, performance, instance.getUserTrackParams());
}
示例23
public void commitJSFrameworkAlarmMonitor(final String type, final WXErrorCode errorCode, String errMsg) {
final IWXUserTrackAdapter userTrackAdapter = WXSDKManager.getInstance().getIWXUserTrackAdapter();
if (userTrackAdapter == null || TextUtils.isEmpty(type) || errorCode == null) {
return;
}
WXPerformance performance = new WXPerformance();
performance.errCode = errorCode.getErrorCode();
if (errorCode != WXErrorCode.WX_SUCCESS) {
performance.appendErrMsg(TextUtils.isEmpty(errMsg)?errorCode.getErrorMsg():errMsg);
WXLogUtils.e("wx_monitor",performance.toString());
}
userTrackAdapter.commit(WXEnvironment.getApplication(), null, type, performance, null);
}
示例24
static void commit(IWXUserTrackAdapter utAdapter, String errCode, String errMsg) {
if (utAdapter == null) {
return;
}
if (errCode != null && errMsg != null) {
WXPerformance p = new WXPerformance();
p.errCode = errCode;
p.errMsg = errMsg;
utAdapter.commit(null, null, WXEnvironment.ENVIRONMENT, p, null);
} else {
utAdapter.commit(null, null, WXEnvironment.ENVIRONMENT, null, null);
}
}
示例25
/**
* Update the attributes according to the given attribute. Then creating a
* command object for updating corresponding view and put the command object in the queue.
* @param ref Reference of the dom.
* @param attrs the new style. This style is only a part of the full attribute set, and will be
* merged into attributes
* @see #updateStyle(String, JSONObject)
*/
void updateAttrs(String ref, final JSONObject attrs) {
if (mDestroy) {
return;
}
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(mInstanceId);
final WXDomObject domObject = mRegistry.get(ref);
if (domObject == null) {
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_ERR_DOM_UPDATEATTRS);
}
return;
}
domObject.updateAttr(attrs);
mNormalTasks.add(new IWXRenderTask() {
@Override
public void execute() {
mWXRenderManager.updateAttrs(mInstanceId, domObject.getRef(), attrs);
}
@Override
public String toString() {
return "updateAttr";
}
});
mDirty = true;
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}
示例26
/**
* Update styles according to the given style. Then creating a
* command object for updating corresponding view and put the command object in the queue.
* @param ref Reference of the dom.
* @param style the new style. This style is only a part of the full style, and will be merged
* into styles
* @param byPesudo updateStyle by pesduo class
* @see #updateAttrs(String, JSONObject)
*/
void updateStyle(String ref, JSONObject style, boolean byPesudo) {
if (mDestroy || style == null) {
return;
}
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(mInstanceId);
WXDomObject domObject = mRegistry.get(ref);
if (domObject == null) {
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_ERR_DOM_UPDATESTYLE);
}
return;
}
Map<String, Object> animationMap= new ArrayMap<>(2);
animationMap.put(WXDomObject.TRANSFORM, style.remove(WXDomObject.TRANSFORM));
animationMap.put(WXDomObject.TRANSFORM_ORIGIN, style.remove(WXDomObject.TRANSFORM_ORIGIN));
animations.add(new Pair<>(ref, animationMap));
if(!style.isEmpty()){
domObject.updateStyle(style, byPesudo);
domObject.traverseTree(ApplyStyleConsumer.getInstance());
updateStyle(domObject, style);
}
mDirty = true;
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}
示例27
/**
* Create a command object for adding a default event listener to the corresponding {@link
* WXDomObject} and put the command object in the queue.
* When the event is triggered, the eventListener will call {@link WXSDKManager#fireEvent(String, String, String)}
* , and the JS will handle all the operations from there.
*
* @param ref Reference of the dom.
* @param type the type of the event, this may be a plain event defined in
* {@link com.taobao.weex.common.Constants.Event} or a gesture defined in {@link com.taobao
* .weex.ui.view.gesture.WXGestureType}
*/
void addEvent(final String ref, final String type) {
if (mDestroy) {
return;
}
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(mInstanceId);
final WXDomObject domObject = mRegistry.get(ref);
if (domObject == null) {
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_ERR_DOM_ADDEVENT);
}
return;
}
domObject.addEvent(type);
mNormalTasks.add(new IWXRenderTask() {
@Override
public void execute() {
WXComponent comp = mWXRenderManager.getWXComponent(mInstanceId,ref);
if(comp != null){
//sync dom change to component
comp.updateDom(domObject);
mWXRenderManager.addEvent(mInstanceId, ref, type);
}
}
@Override
public String toString() {
return "Add event";
}
});
mDirty = true;
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}
示例28
/**
* Create a command object for removing the event listener of the corresponding {@link
* WXDomObject} and put the command event in the queue.
* @param ref Reference of the dom.
* @param type the type of the event, this may be a plain event defined in
* {@link com.taobao.weex.common.Constants.Event} or a gesture defined in {@link com.taobao
* .weex.ui.view.gesture.WXGestureType}
*/
void removeEvent(final String ref, final String type) {
if (mDestroy) {
return;
}
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(mInstanceId);
final WXDomObject domObject = mRegistry.get(ref);
if (domObject == null) {
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_ERR_DOM_REMOVEEVENT);
}
return;
}
domObject.removeEvent(type);
mNormalTasks.add(new IWXRenderTask() {
@Override
public void execute() {
WXComponent comp = mWXRenderManager.getWXComponent(mInstanceId,ref);
if(comp != null){
//sync dom change to component
comp.updateDom(domObject);
mWXRenderManager.removeEvent(mInstanceId, ref, type);
}
}
@Override
public String toString() {
return "removeEvent";
}
});
mDirty = true;
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}
示例29
/**
* Create a command object for notifying {@link WXRenderManager} that the process of creating
* given view is finished, and put the command object in the queue.
*/
void createFinish() {
if (mDestroy) {
return;
}
final WXDomObject root = mRegistry.get(WXDomObject.ROOT);
mNormalTasks.add(new IWXRenderTask() {
@Override
public void execute() {
mWXRenderManager.createFinish(mInstanceId,
(int) root.getLayoutWidth(),
(int) root.getLayoutHeight());
}
@Override
public String toString() {
return "createFinish";
}
});
mDirty = true;
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(mInstanceId);
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}
示例30
/**
* Create a command object for notifying {@link WXRenderManager} that the process of refreshing
* given view is finished, and put the command object in the queue.
*/
void refreshFinish() {
if (mDestroy) {
return;
}
final WXDomObject root = mRegistry.get(WXDomObject.ROOT);
mNormalTasks.add(new IWXRenderTask() {
@Override
public void execute() {
int realWidth = (int) root.getLayoutWidth();
int realHeight = (int) root.getLayoutHeight();
mWXRenderManager.refreshFinish(mInstanceId, realWidth, realHeight);
}
@Override
public String toString() {
return "refreshFinish";
}
});
mDirty = true;
WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(mInstanceId);
if (instance != null) {
instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS);
}
}