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

Commit 5a9668a5 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Properly update remote service when ContentSuggestionsPerUserService is updated."

parents bb833bd8 8b876691
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -80,12 +80,7 @@ public final class ContentSuggestionsPerUserService extends
    @Override // from PerUserSystemService
    protected boolean updateLocked(boolean disabled) {
        final boolean enabledChanged = super.updateLocked(disabled);
        if (enabledChanged) {
            if (!isEnabledLocked()) {
                // Clear the remote service for the next call
                mRemoteService = null;
            }
        }
        updateRemoteServiceLocked();
        return enabledChanged;
    }

@@ -132,6 +127,15 @@ public final class ContentSuggestionsPerUserService extends
        }
    }

    @GuardedBy("mLock")
    private void updateRemoteServiceLocked() {
        if (mRemoteService != null) {
            mRemoteService.destroy();
            mRemoteService = null;
        }
    }


    @GuardedBy("mLock")
    @Nullable
    private RemoteContentSuggestionsService getRemoteServiceLocked() {