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

Commit af476253 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

Change-Id: Idd6110141795f86dcf28eafab87683eda4c70b93
parents 6dd28f86 5562cf3d
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -19,6 +19,9 @@ package android.net;
import android.annotation.NonNull;
import android.annotation.NonNull;
import android.content.Context;
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,
 * service used to communicate with the ip memory store service in network stack,
 * which is running in the same module.
 * which is running in the same module.
@@ -35,8 +38,7 @@ public class NetworkStackIpMemoryStore extends IpMemoryStoreClient {
    }
    }


    @Override
    @Override
    @NonNull
    protected void runWhenServiceReady(Consumer<IIpMemoryStore> cb) throws ExecutionException {
    protected IIpMemoryStore getService() {
        cb.accept(mService);
        return mService;
    }
    }
}
}