[NetworkScorerAppManager] system_server should not call non forUser Settings.Secure.get* methods
BUG: 166312046 Test: builds Change-Id: Ie5a38665005257684b36ee858fe81ebdb1484ce7
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user