From c8869836696e76470a0272adca5ea15be1c750fb Mon Sep 17 00:00:00 2001 From: Patrick Rohr Date: Mon, 18 Jul 2022 09:08:34 -0700 Subject: [PATCH] NetworkProvider: improve documentation of unregisterNetworkOffer Add a warning to unregisterNetworkOffer to inform users that this method executes asynchronously. Test: documentation only change Change-Id: Ic4742bf570ebcd4d00b0b259c35fd46688494517 --- framework/src/android/net/NetworkProvider.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/framework/src/android/net/NetworkProvider.java b/framework/src/android/net/NetworkProvider.java index 4dd642e11c..7edcbae635 100644 --- a/framework/src/android/net/NetworkProvider.java +++ b/framework/src/android/net/NetworkProvider.java @@ -319,6 +319,11 @@ public class NetworkProvider { * if it could beat any of them, and may be advantageous to the provider's implementation that * can rely on no longer receiving callbacks for a network that they can't bring up anyways. * + * Warning: This method executes asynchronously. The NetworkOfferCallback object can continue + * receiving onNetworkNeeded and onNetworkUnneeded callbacks even after this method has + * returned. In this case, it is on the caller to take appropriate steps in order to prevent + * bringing up a network. + * * @hide */ @SystemApi