From ad51e01b3c763ea051e74cc14c27b830d9c7563d Mon Sep 17 00:00:00 2001 From: Cody Kesting Date: Thu, 19 Dec 2019 12:36:18 -0800 Subject: [PATCH] Update javadocs for ConnectivityDiagnosticsManager. ConnectivityDiagnosticsManager comments for registerConnectivityDiagnosticsCallback and unregisterConnectivityDiagnosticsCallback are updated to reflect several changes. For register calls, any app will be able to register callbacks, but only permissioned applications will have their callbacks invoked (and only for networks managed by the application). Additionally, only the registering app (uid) will be able to unregister a callback once registered. Bug: 143187964 Test: docs change only. compiles. Change-Id: Ie7ae86a1afccb22d6c84027dbac49d7b8e431e8c --- core/java/android/net/ConnectivityDiagnosticsManager.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/java/android/net/ConnectivityDiagnosticsManager.java b/core/java/android/net/ConnectivityDiagnosticsManager.java index d018cbd904..140363c482 100644 --- a/core/java/android/net/ConnectivityDiagnosticsManager.java +++ b/core/java/android/net/ConnectivityDiagnosticsManager.java @@ -639,8 +639,9 @@ public class ConnectivityDiagnosticsManager { /** * Registers a ConnectivityDiagnosticsCallback with the System. * - *

Only apps that offer network connectivity to the user are allowed to register callbacks. - * This includes: + *

Only apps that offer network connectivity to the user should be registering callbacks. + * These are the only apps whose callbacks will be invoked by the system. Apps considered to + * meet these conditions include: * *

* - *

Callbacks will be limited to receiving notifications for networks over which apps provide - * connectivity. + *

Callbacks registered by apps not meeting the above criteria will not be invoked. * *

If a registering app loses its relevant permissions, any callbacks it registered will * silently stop receiving callbacks.