Merge "Fix NetworkScoreService#getActiveScorer." into rvc-dev

This commit is contained in:
Varun Anand
2020-03-19 21:21:20 +00:00
committed by Android (Google) Code Review

View File

@@ -760,12 +760,11 @@ public class NetworkScoreService extends INetworkScoreService.Stub {
@Override
public String getActiveScorerPackage() {
enforceSystemOrHasScoreNetworks();
synchronized (mServiceConnectionLock) {
if (mServiceConnection != null) {
return mServiceConnection.getPackageName();
}
NetworkScorerAppData appData = mNetworkScorerAppManager.getActiveScorer();
if (appData == null) {
return null;
}
return null;
return appData.getRecommendationServicePackageName();
}
/**
@@ -775,13 +774,7 @@ public class NetworkScoreService extends INetworkScoreService.Stub {
public NetworkScorerAppData getActiveScorer() {
// Only the system can access this data.
enforceSystemOnly();
synchronized (mServiceConnectionLock) {
if (mServiceConnection != null) {
return mServiceConnection.getAppData();
}
}
return null;
return mNetworkScorerAppManager.getActiveScorer();
}
/**