@Override protected void finalize() throws Throwable { super.finalize(); if (proxySupport != null) { proxySupport.release(); } }
/** * This is used to notify Java side when JS fires an event. Right now only webView uses this. * * @param event the event fired. * @param data the event data. */ public void onEventFired(String event, Object data) { if (proxySupport != null) { proxySupport.onEventFired(event, data); } }
/** * Sets whether the passed in event has a corresponding eventListener associated with it on JS * side. * * @param event the event to be set. * @param hasListeners If this is true, then the passed in event has a javascript event listener, * false otherwise. */ public void setHasListenersForEventType(String event, boolean hasListeners) { hasListenersForEventType.put(event, hasListeners); if (proxySupport != null) { proxySupport.onHasListenersChanged(event, hasListeners); } }