Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ea920f59 authored by Varun Anand's avatar Varun Anand Committed by Android (Google) Code Review
Browse files

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

parents 591bb7b1 e3d4cf02
Loading
Loading
Loading
Loading
+5 −12
Original line number Diff line number Diff line
@@ -760,13 +760,12 @@ 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 appData.getRecommendationServicePackageName();
    }

    /**
     * Returns metadata about the active scorer or <code>null</code> if there is no active scorer.
@@ -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();
    }

    /**