Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 56b770c3 authored by Xiao Ma's avatar Xiao Ma Committed by android-build-merger
Browse files

Merge "adopt non-blocking method to obtain the IpMemoryStore service." am: b340a6988b

am: c657a844ea

Change-Id: If0d43f21710ca31149610d3e6a5f0d7e4acc11a2
parents bdd9d5ff af476253
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -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);
    }
}