diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/android/net/NetworkStackIpMemoryStore.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/android/net/NetworkStackIpMemoryStore.java b/src/android/net/NetworkStackIpMemoryStore.java index 475f826..41715b2 100644 --- a/src/android/net/NetworkStackIpMemoryStore.java +++ b/src/android/net/NetworkStackIpMemoryStore.java @@ -19,6 +19,9 @@ package android.net; import android.annotation.NonNull; import android.content.Context; +import java.util.concurrent.ExecutionException; +import java.util.function.Consumer; + /** * service used to communicate with the ip memory store service in network stack, * which is running in the same module. @@ -35,8 +38,7 @@ public class NetworkStackIpMemoryStore extends IpMemoryStoreClient { } @Override - @NonNull - protected IIpMemoryStore getService() { - return mService; + protected void runWhenServiceReady(Consumer<IIpMemoryStore> cb) throws ExecutionException { + cb.accept(mService); } } |