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

Commit 5d60e0a5 authored by Songchun Fan's avatar Songchun Fan
Browse files

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

BUG: 166312046
Test: builds
Change-Id: Ie5a38665005257684b36ee858fe81ebdb1484ce7
parent 4743509c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.server;
import android.Manifest.permission;
import android.annotation.Nullable;
import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.PermissionChecker;
@@ -404,7 +405,8 @@ public class NetworkScorerAppManager {
        }

        public int getSecureInt(Context context, String name, int defaultValue) {
            return Settings.Secure.getInt(context.getContentResolver(), name, defaultValue);
            final ContentResolver cr = context.getContentResolver();
            return Settings.Secure.getIntForUser(cr, name, defaultValue, cr.getUserId());
        }
    }
}