Loading core/java/android/net/INetworkScoreService.aidl +9 −0 Original line number Original line Diff line number Diff line Loading @@ -132,5 +132,14 @@ interface INetworkScoreService oneway void requestRecommendationAsync(in RecommendationRequest request, oneway void requestRecommendationAsync(in RecommendationRequest request, in RemoteCallback remoteCallback); in RemoteCallback remoteCallback); /** * Returns metadata about the active scorer or <code>null</code> if there is no active scorer. */ NetworkScorerAppManager.NetworkScorerAppData getActiveScorer(); NetworkScorerAppManager.NetworkScorerAppData getActiveScorer(); /** * Returns the list of available scorer apps. The list will be empty if there are * no valid scorers. */ List<NetworkScorerAppManager.NetworkScorerAppData> getAllValidScorers(); } } core/java/android/net/NetworkScoreManager.java +15 −0 Original line number Original line Diff line number Diff line Loading @@ -37,6 +37,7 @@ import com.android.internal.util.Preconditions; import java.lang.annotation.Retention; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy; import java.util.List; import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture; /** /** Loading Loading @@ -199,6 +200,20 @@ public class NetworkScoreManager { } } } } /** * Returns the list of available scorer apps. The list will be empty if there are * no valid scorers. * * @hide */ public List<NetworkScorerAppData> getAllValidScorers() { try { return mService.getAllValidScorers(); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** /** * Update network scores. * Update network scores. * * Loading core/java/android/net/NetworkScorerAppManager.java +8 −0 Original line number Original line Diff line number Diff line Loading @@ -126,6 +126,14 @@ public class NetworkScorerAppManager { } } } } /** * Returns the list of available scorer apps. The list will be empty if there are * no valid scorers. */ public List<NetworkScorerAppData> getAllValidScorers() { return Collections.emptyList(); } /** /** * @return A {@link NetworkScorerAppData} instance containing information about the * @return A {@link NetworkScorerAppData} instance containing information about the * best configured network recommendation provider installed or {@code null} * best configured network recommendation provider installed or {@code null} Loading services/core/java/com/android/server/NetworkScoreService.java +9 −0 Original line number Original line Diff line number Diff line Loading @@ -718,6 +718,15 @@ public class NetworkScoreService extends INetworkScoreService.Stub { return null; return null; } } /** * Returns the list of available scorer apps. The list will be empty if there are * no valid scorers. */ @Override public List<NetworkScorerAppData> getAllValidScorers() { return mNetworkScorerAppManager.getAllValidScorers(); } @Override @Override public void disableScoring() { public void disableScoring() { // Only the active scorer or the system should be allowed to disable scoring. // Only the active scorer or the system should be allowed to disable scoring. Loading Loading
core/java/android/net/INetworkScoreService.aidl +9 −0 Original line number Original line Diff line number Diff line Loading @@ -132,5 +132,14 @@ interface INetworkScoreService oneway void requestRecommendationAsync(in RecommendationRequest request, oneway void requestRecommendationAsync(in RecommendationRequest request, in RemoteCallback remoteCallback); in RemoteCallback remoteCallback); /** * Returns metadata about the active scorer or <code>null</code> if there is no active scorer. */ NetworkScorerAppManager.NetworkScorerAppData getActiveScorer(); NetworkScorerAppManager.NetworkScorerAppData getActiveScorer(); /** * Returns the list of available scorer apps. The list will be empty if there are * no valid scorers. */ List<NetworkScorerAppManager.NetworkScorerAppData> getAllValidScorers(); } }
core/java/android/net/NetworkScoreManager.java +15 −0 Original line number Original line Diff line number Diff line Loading @@ -37,6 +37,7 @@ import com.android.internal.util.Preconditions; import java.lang.annotation.Retention; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy; import java.util.List; import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture; /** /** Loading Loading @@ -199,6 +200,20 @@ public class NetworkScoreManager { } } } } /** * Returns the list of available scorer apps. The list will be empty if there are * no valid scorers. * * @hide */ public List<NetworkScorerAppData> getAllValidScorers() { try { return mService.getAllValidScorers(); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** /** * Update network scores. * Update network scores. * * Loading
core/java/android/net/NetworkScorerAppManager.java +8 −0 Original line number Original line Diff line number Diff line Loading @@ -126,6 +126,14 @@ public class NetworkScorerAppManager { } } } } /** * Returns the list of available scorer apps. The list will be empty if there are * no valid scorers. */ public List<NetworkScorerAppData> getAllValidScorers() { return Collections.emptyList(); } /** /** * @return A {@link NetworkScorerAppData} instance containing information about the * @return A {@link NetworkScorerAppData} instance containing information about the * best configured network recommendation provider installed or {@code null} * best configured network recommendation provider installed or {@code null} Loading
services/core/java/com/android/server/NetworkScoreService.java +9 −0 Original line number Original line Diff line number Diff line Loading @@ -718,6 +718,15 @@ public class NetworkScoreService extends INetworkScoreService.Stub { return null; return null; } } /** * Returns the list of available scorer apps. The list will be empty if there are * no valid scorers. */ @Override public List<NetworkScorerAppData> getAllValidScorers() { return mNetworkScorerAppManager.getAllValidScorers(); } @Override @Override public void disableScoring() { public void disableScoring() { // Only the active scorer or the system should be allowed to disable scoring. // Only the active scorer or the system should be allowed to disable scoring. Loading