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

Commit 38d81940 authored by Songchun Fan's avatar Songchun Fan
Browse files

[search] system_server should not call non forUser Settings.Secure.get* methods

BUG: 166312046
Test: builds
Change-Id: I287fc166a35b5876a86fb4caaaee91d77f2c3d2e
parent 4743509c
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.app.AppGlobals;
import android.app.SearchManager;
import android.app.SearchableInfo;
import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo;
@@ -397,8 +398,9 @@ public class Searchables {
    }

    private String getGlobalSearchProviderSetting() {
        return Settings.Secure.getString(mContext.getContentResolver(),
                Settings.Secure.SEARCH_GLOBAL_SEARCH_ACTIVITY);
        final ContentResolver cr = mContext.getContentResolver();
        return Settings.Secure.getStringForUser(cr,
                Settings.Secure.SEARCH_GLOBAL_SEARCH_ACTIVITY, cr.getUserId());
    }

    /**