add mogoaction api
This commit is contained in:
@@ -504,11 +504,11 @@ public class AMapNaviViewWrapper implements IMogoMapView,
|
||||
*/
|
||||
private void mockTouchEvent() {
|
||||
long downTime = SystemClock.uptimeMillis();
|
||||
long eventTime = SystemClock.uptimeMillis() + 100;
|
||||
long eventTime = downTime + 1;
|
||||
int metaState = 0;
|
||||
MotionEvent motionEvent = MotionEvent.obtain( downTime, eventTime, MotionEvent.ACTION_DOWN, 0, 0, metaState );
|
||||
mMapView.dispatchTouchEvent( motionEvent );
|
||||
MotionEvent upEvent = MotionEvent.obtain( downTime + 100, eventTime + 100, MotionEvent.ACTION_UP, 0, 0, metaState );
|
||||
MotionEvent upEvent = MotionEvent.obtain( downTime + 1, eventTime + 2, MotionEvent.ACTION_UP, 0, 0, metaState );
|
||||
mMapView.dispatchTouchEvent( upEvent );
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,8 @@ public class BnHooker implements InvocationHandler {
|
||||
Field field = AMap.class.getDeclaredField( "a" );
|
||||
field.setAccessible( true );
|
||||
host = field.get( map );
|
||||
Object object = Proxy.newProxyInstance( BnHooker.class.getClassLoader(),
|
||||
Object object = Proxy.newProxyInstance(
|
||||
BnHooker.class.getClassLoader(),
|
||||
new Class[]{com.amap.api.col.n3.ft.a.class, IAMapDelegate.class, IAMapListener.class},
|
||||
this
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user