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

Commit 341fc913 authored by Varun Anand's avatar Varun Anand Committed by Automerger Merge Worker
Browse files

Merge "Fix NetworkScoreService#getActiveScorer." into rvc-dev am: ea920f59 am: 833823dc

Change-Id: I539689b4a0033bf75f4d74be7b39455d01ba2ccb
parents 7951aba0 833823dc
Loading
Loading
Loading
Loading
+5 −12
Original line number Original line Diff line number Diff line
@@ -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.
@@ -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;
    }
    }


    /**
    /**