diff options
author | Jeff Davidson <jpd@google.com> | 2014-11-06 01:25:03 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-11-06 01:25:04 +0000 |
commit | 24f535b87341b8729d6d4235acc51f0e87916d3a (patch) | |
tree | 79c6005649be83d8ebfce66d9dac6b7838297cbd /core/java/android/net | |
parent | 7efdb83ceeea3dc916f8a05f59f7b35cb8d13597 (diff) | |
parent | e56f2bb5ecae624e1b6573515f855a26f756aed5 (diff) | |
download | frameworks_base-24f535b87341b8729d6d4235acc51f0e87916d3a.zip frameworks_base-24f535b87341b8729d6d4235acc51f0e87916d3a.tar.gz frameworks_base-24f535b87341b8729d6d4235acc51f0e87916d3a.tar.bz2 |
Merge "Allow apps with SCORE_NETWORKS to set the active scorer." into lmp-mr1-dev
Diffstat (limited to 'core/java/android/net')
-rw-r--r-- | core/java/android/net/NetworkScoreManager.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/java/android/net/NetworkScoreManager.java b/core/java/android/net/NetworkScoreManager.java index 03a2085..a939cce 100644 --- a/core/java/android/net/NetworkScoreManager.java +++ b/core/java/android/net/NetworkScoreManager.java @@ -192,12 +192,15 @@ public class NetworkScoreManager { /** * Set the active scorer to a new package and clear existing scores. * + * <p>Should never be called directly without obtaining user consent. This can be done by using + * the {@link #ACTION_CHANGE_ACTIVE} broadcast, or using a custom configuration activity. + * * @return true if the operation succeeded, or false if the new package is not a valid scorer. * @throws SecurityException if the caller does not hold the - * {@link android.Manifest.permission#BROADCAST_NETWORK_PRIVILEGED} permission - * indicating that it can manage scorer applications. + * {@link android.Manifest.permission#SCORE_NETWORKS} permission. * @hide */ + @SystemApi public boolean setActiveScorer(String packageName) throws SecurityException { try { return mService.setActiveScorer(packageName); |