public boolean onTransact(int paramInt1, Parcel paramParcel1, Parcel paramParcel2, int paramInt2) { switch (paramInt1) { default: return super.onTransact(paramInt1, paramParcel1, paramParcel2, paramInt2); case 1598968902: paramParcel2.writeString("com.google.android.gms.maps.internal.IOnPoiClickListener"); return true; } paramParcel1.enforceInterface("com.google.android.gms.maps.internal.IOnPoiClickListener"); if (paramParcel1.readInt() != 0) {} for (PointOfInterest localPointOfInterest = fki.a(paramParcel1);; localPointOfInterest = null) { a(localPointOfInterest); paramParcel2.writeNoException(); return true; } }
@Override public void onPoiClick(PointOfInterest poi) { if (mTempMarker != null) { mTempMarker.remove(); mTempMarker = null; } addTempMarker(poi.name, poi.latLng); }
@Override public Observable<PointOfInterest> call(final GoogleMap googleMap) { return Observable.create(new Observable.OnSubscribe<PointOfInterest>() { @Override public void call(final Subscriber<? super PointOfInterest> subscriber) { googleMap.setOnPoiClickListener(new GoogleMap.OnPoiClickListener() { @Override public void onPoiClick(PointOfInterest pointOfInterest) { subscriber.onNext(pointOfInterest); } }); } }); }
@Test public void shouldEmmitPolygon() throws Exception { TestSubscriber<PointOfInterest> testSubscriber = new TestSubscriber<>(); new POIClickFunc().call(googleMap) .subscribe(testSubscriber); verify(googleMap).setOnPoiClickListener(argumentCaptor.capture()); argumentCaptor.getValue().onPoiClick(null); testSubscriber.assertNoErrors(); testSubscriber.assertValueCount(1); argumentCaptor.getValue().onPoiClick(null); testSubscriber.assertValueCount(2); }
public static PointOfInterest a(Parcel paramParcel) { int i = efj.a(paramParcel); String str1 = null; LatLng localLatLng = null; int j = 0; String str2 = null; while (paramParcel.dataPosition() < i) { int k = paramParcel.readInt(); switch (0xFFFF & k) { default: efj.b(paramParcel, k); break; case 1: efj.a(paramParcel, k, 4); j = paramParcel.readInt(); break; case 2: localLatLng = (LatLng)efj.a(paramParcel, k, LatLng.CREATOR); break; case 3: str1 = efj.e(paramParcel, k); break; case 4: str2 = efj.e(paramParcel, k); } } if (paramParcel.dataPosition() != i) { throw new bm("Overread allowed size end=" + i, paramParcel); } return new PointOfInterest(j, localLatLng, str1, str2); }
@Override void onPoiClick(PointOfInterest pointOfInterest);
public abstract void a(PointOfInterest paramPointOfInterest);