diff options
| author | 2017-12-20 12:09:21 -0800 | |
|---|---|---|
| committer | 2017-12-20 15:00:01 -0800 | |
| commit | 10f8ce4be583b05af9620d177c2293a6c20ee60c (patch) | |
| tree | 12d5fbb381691ade6104e51e96f491cd3daac7ec | |
| parent | 6100aa7e72c0506b612b575fe0cb67479710eaa4 (diff) | |
Renames setCallbackOnComplete method in ContextHubTransaction
setOnCompleteCallback seems easier to understand.
Bug: 67734082
Test: None
Change-Id: Ie1eb63dc5b90a35e847bd5d2a350f97ca277342d
| -rw-r--r-- | core/java/android/hardware/location/ContextHubTransaction.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/java/android/hardware/location/ContextHubTransaction.java b/core/java/android/hardware/location/ContextHubTransaction.java index 93cc56e4dcbb..ec1e68fe680c 100644 --- a/core/java/android/hardware/location/ContextHubTransaction.java +++ b/core/java/android/hardware/location/ContextHubTransaction.java @@ -34,7 +34,7 @@ import java.util.concurrent.TimeoutException; * through the ContextHubManager APIs. The caller can either retrieve the result * synchronously through a blocking call ({@link #waitForResponse(long, TimeUnit)}) or * asynchronously through a user-defined callback - * ({@link #setCallbackOnComplete(ContextHubTransaction.Callback, Handler)}). + * ({@link #setOnCompleteCallback(ContextHubTransaction.Callback, Handler)}). * * @param <T> the type of the contents in the transaction response * @@ -271,7 +271,7 @@ public class ContextHubTransaction<T> { * A transaction can be invalidated if the process owning the transaction is no longer active * and the reference to this object is lost. * - * This method or {@link #setCallbackOnComplete(ContextHubTransaction.Callback)} can only be + * This method or {@link #setOnCompleteCallback(ContextHubTransaction.Callback)} can only be * invoked once, or an IllegalStateException will be thrown. * * @param callback the callback to be invoked upon completion @@ -280,7 +280,7 @@ public class ContextHubTransaction<T> { * @throws IllegalStateException if this method is called multiple times * @throws NullPointerException if the callback or handler is null */ - public void setCallbackOnComplete( + public void setOnCompleteCallback( @NonNull ContextHubTransaction.Callback<T> callback, @NonNull Handler handler) { synchronized (this) { if (callback == null) { @@ -312,10 +312,10 @@ public class ContextHubTransaction<T> { /** * Sets a callback to be invoked when the transaction completes. * - * Equivalent to {@link #setCallbackOnComplete(ContextHubTransaction.Callback, Handler)} + * Equivalent to {@link #setOnCompleteCallback(ContextHubTransaction.Callback, Handler)} * with the handler being that of the main thread's Looper. * - * This method or {@link #setCallbackOnComplete(ContextHubTransaction.Callback, Handler)} + * This method or {@link #setOnCompleteCallback(ContextHubTransaction.Callback, Handler)} * can only be invoked once, or an IllegalStateException will be thrown. * * @param callback the callback to be invoked upon completion @@ -323,8 +323,8 @@ public class ContextHubTransaction<T> { * @throws IllegalStateException if this method is called multiple times * @throws NullPointerException if the callback is null */ - public void setCallbackOnComplete(@NonNull ContextHubTransaction.Callback<T> callback) { - setCallbackOnComplete(callback, new Handler(Looper.getMainLooper())); + public void setOnCompleteCallback(@NonNull ContextHubTransaction.Callback<T> callback) { + setOnCompleteCallback(callback, new Handler(Looper.getMainLooper())); } /** |