Loading services/core/java/com/android/server/NetworkScoreService.java +5 −12 Original line number Original line Diff line number Diff line Loading @@ -760,13 +760,12 @@ public class NetworkScoreService extends INetworkScoreService.Stub { @Override @Override public String getActiveScorerPackage() { public String getActiveScorerPackage() { enforceSystemOrHasScoreNetworks(); enforceSystemOrHasScoreNetworks(); synchronized (mServiceConnectionLock) { NetworkScorerAppData appData = mNetworkScorerAppManager.getActiveScorer(); if (mServiceConnection != null) { if (appData == null) { return mServiceConnection.getPackageName(); } } return null; return null; } } return appData.getRecommendationServicePackageName(); } /** /** * Returns metadata about the active scorer or <code>null</code> if there is no active scorer. * Returns metadata about the active scorer or <code>null</code> if there is no active scorer. Loading @@ -775,13 +774,7 @@ public class NetworkScoreService extends INetworkScoreService.Stub { public NetworkScorerAppData getActiveScorer() { public NetworkScorerAppData getActiveScorer() { // Only the system can access this data. // Only the system can access this data. enforceSystemOnly(); enforceSystemOnly(); synchronized (mServiceConnectionLock) { return mNetworkScorerAppManager.getActiveScorer(); if (mServiceConnection != null) { return mServiceConnection.getAppData(); } } return null; } } /** /** Loading Loading
services/core/java/com/android/server/NetworkScoreService.java +5 −12 Original line number Original line Diff line number Diff line Loading @@ -760,13 +760,12 @@ public class NetworkScoreService extends INetworkScoreService.Stub { @Override @Override public String getActiveScorerPackage() { public String getActiveScorerPackage() { enforceSystemOrHasScoreNetworks(); enforceSystemOrHasScoreNetworks(); synchronized (mServiceConnectionLock) { NetworkScorerAppData appData = mNetworkScorerAppManager.getActiveScorer(); if (mServiceConnection != null) { if (appData == null) { return mServiceConnection.getPackageName(); } } return null; return null; } } return appData.getRecommendationServicePackageName(); } /** /** * Returns metadata about the active scorer or <code>null</code> if there is no active scorer. * Returns metadata about the active scorer or <code>null</code> if there is no active scorer. Loading @@ -775,13 +774,7 @@ public class NetworkScoreService extends INetworkScoreService.Stub { public NetworkScorerAppData getActiveScorer() { public NetworkScorerAppData getActiveScorer() { // Only the system can access this data. // Only the system can access this data. enforceSystemOnly(); enforceSystemOnly(); synchronized (mServiceConnectionLock) { return mNetworkScorerAppManager.getActiveScorer(); if (mServiceConnection != null) { return mServiceConnection.getAppData(); } } return null; } } /** /** Loading