diff options
| author | 2024-03-08 22:41:42 +0000 | |
|---|---|---|
| committer | 2024-03-08 22:41:42 +0000 | |
| commit | 4122026fcd4931c9eec30375bcb02a31f71c4544 (patch) | |
| tree | a30248d08e134367d8fb4b7311e82e7d129d4de5 /location/java | |
| parent | 617373ce435717cf6fa7a63c2f6908a8ac88a16a (diff) | |
| parent | 7200cd5ab4dd657a9396ffca88627a5d5ee4c700 (diff) | |
Merge "Allow Throwable to represent errors" into main
Diffstat (limited to 'location/java')
| -rw-r--r-- | location/java/android/location/provider/GeocodeProviderBase.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/location/java/android/location/provider/GeocodeProviderBase.java b/location/java/android/location/provider/GeocodeProviderBase.java index e2c48b9c3515..71644d07be57 100644 --- a/location/java/android/location/provider/GeocodeProviderBase.java +++ b/location/java/android/location/provider/GeocodeProviderBase.java @@ -104,14 +104,14 @@ public abstract class GeocodeProviderBase { */ public abstract void onForwardGeocode( @NonNull ForwardGeocodeRequest request, - @NonNull OutcomeReceiver<List<Address>, Exception> callback); + @NonNull OutcomeReceiver<List<Address>, Throwable> callback); /** * Requests reverse geocoding of the given arguments. The given callback must be invoked once. */ public abstract void onReverseGeocode( @NonNull ReverseGeocodeRequest request, - @NonNull OutcomeReceiver<List<Address>, Exception> callback); + @NonNull OutcomeReceiver<List<Address>, Throwable> callback); private class Service extends IGeocodeProvider.Stub { @Override @@ -145,7 +145,7 @@ public abstract class GeocodeProviderBase { } } - private static class SingleUseCallback implements OutcomeReceiver<List<Address>, Exception> { + private static class SingleUseCallback implements OutcomeReceiver<List<Address>, Throwable> { private final AtomicReference<IGeocodeCallback> mCallback; @@ -154,7 +154,7 @@ public abstract class GeocodeProviderBase { } @Override - public void onError(Exception e) { + public void onError(Throwable e) { try { Objects.requireNonNull(mCallback.getAndSet(null)).onError(e.toString()); } catch (RemoteException r) { |