Add NetworkScoreManager.disableScoring().
Allows the active scorer app to disable itself.
Change-Id: I7bcdc3aafb95af4ea0b110b01b08ab4daf7a137f
diff --git a/core/java/android/net/NetworkScoreManager.java b/core/java/android/net/NetworkScoreManager.java
index b497c6e..2fc3892 100644
--- a/core/java/android/net/NetworkScoreManager.java
+++ b/core/java/android/net/NetworkScoreManager.java
@@ -205,6 +205,20 @@
}
/**
+ * Turn off network scoring.
+ *
+ * <p>May only be called by the current scorer app, or the system.
+ *
+ * @throws SecurityException if the caller is neither the active scorer nor the system.
+ */
+ public void disableScoring() throws SecurityException {
+ try {
+ mService.disableScoring();
+ } catch (RemoteException e) {
+ }
+ }
+
+ /**
* Request scoring for networks.
*
* <p>Note that this is just a helper method to assemble the broadcast, and will run in the