@Test(expected = NullPointerException.class) public void getLastLocationNullCallback() { engine.getLastLocation(null); }
@Override public void getLastLocation(@NonNull LocationEngineCallback<LocationEngineResult> callback) throws SecurityException { Location bestLastLocation = getBestLastLocation(); if (bestLastLocation != null) { callback.onSuccess(LocationEngineResult.create(bestLastLocation)); } else { callback.onFailure(new Exception("Last location unavailable")); } }
MapboxFusedLocationEngineImpl extends AndroidLocationEngineImpl { @Override public void getLastLocation(@NonNull LocationEngineCallback<LocationEngineResult> callback) throws SecurityException { Location bestLastLocation = getBestLastLocation(); if (bestLastLocation != null) { callback.onSuccess(LocationEngineResult.create(bestLastLocation)); } else { callback.onFailure(new Exception("Last location unavailable")); } } }
MapboxFusedLocationEngineImpl extends AndroidLocationEngineImpl { @Override public void getLastLocation(@NonNull LocationEngineCallback<LocationEngineResult> callback) throws SecurityException { Location bestLastLocation = getBestLastLocation(); if (bestLastLocation != null) { callback.onSuccess(LocationEngineResult.create(bestLastLocation)); } else { callback.onFailure(new Exception("Last location unavailable")); } } MapboxFusedLocationEngineImpl(@NonNull Context context); }
MapboxFusedLocationEngineImpl extends AndroidLocationEngineImpl { @Override public void getLastLocation(@NonNull LocationEngineCallback<LocationEngineResult> callback) throws SecurityException { Location bestLastLocation = getBestLastLocation(); if (bestLastLocation != null) { callback.onSuccess(LocationEngineResult.create(bestLastLocation)); } else { callback.onFailure(new Exception("Last location unavailable")); } } MapboxFusedLocationEngineImpl(@NonNull Context context); @NonNull @Override LocationListener createListener(LocationEngineCallback<LocationEngineResult> callback); @Override void getLastLocation(@NonNull LocationEngineCallback<LocationEngineResult> callback); @SuppressLint("MissingPermission") @Override void requestLocationUpdates(@NonNull LocationEngineRequest request,
                                     @NonNull LocationListener listener,
                                     @Nullable Looper looper); @SuppressLint("MissingPermission") @Override void requestLocationUpdates(@NonNull LocationEngineRequest request,
                                     @NonNull PendingIntent pendingIntent); }
MapboxFusedLocationEngineImpl extends AndroidLocationEngineImpl { @Override public void getLastLocation(@NonNull LocationEngineCallback<LocationEngineResult> callback) throws SecurityException { Location bestLastLocation = getBestLastLocation(); if (bestLastLocation != null) { callback.onSuccess(LocationEngineResult.create(bestLastLocation)); } else { callback.onFailure(new Exception("Last location unavailable")); } } MapboxFusedLocationEngineImpl(@NonNull Context context); @NonNull @Override LocationListener createListener(LocationEngineCallback<LocationEngineResult> callback); @Override void getLastLocation(@NonNull LocationEngineCallback<LocationEngineResult> callback); @SuppressLint("MissingPermission") @Override void requestLocationUpdates(@NonNull LocationEngineRequest request,
                                     @NonNull LocationListener listener,
                                     @Nullable Looper looper); @SuppressLint("MissingPermission") @Override void requestLocationUpdates(@NonNull LocationEngineRequest request,
                                     @NonNull PendingIntent pendingIntent);  }