Move UIDS_ALLOWED_ON_RESTRICTED_NETWORKS setting
Now, PermissionMonitor reigster observer to listen the change from all users, but "uids allowed on restricted networks" should affect to all users instead of per each user. Thus, move the setting from Settings.Secure to Settings.Global. Bug: 189705071 Test: atest FrameworksNetTests Merged-In: Ibea354d8dda1f02652a193820f3f9eb573b9a956 Change-Id: Ibea354d8dda1f02652a193820f3f9eb573b9a956
This commit is contained in:
@@ -1070,7 +1070,7 @@ public class ConnectivitySettingsManager {
|
||||
*/
|
||||
@NonNull
|
||||
public static Set<Integer> getUidsAllowedOnRestrictedNetworks(@NonNull Context context) {
|
||||
final String uidList = Settings.Secure.getString(
|
||||
final String uidList = Settings.Global.getString(
|
||||
context.getContentResolver(), UIDS_ALLOWED_ON_RESTRICTED_NETWORKS);
|
||||
return getUidSetFromString(uidList);
|
||||
}
|
||||
@@ -1084,7 +1084,7 @@ public class ConnectivitySettingsManager {
|
||||
public static void setUidsAllowedOnRestrictedNetworks(@NonNull Context context,
|
||||
@NonNull Set<Integer> uidList) {
|
||||
final String uids = getUidStringFromSet(uidList);
|
||||
Settings.Secure.putString(context.getContentResolver(), UIDS_ALLOWED_ON_RESTRICTED_NETWORKS,
|
||||
Settings.Global.putString(context.getContentResolver(), UIDS_ALLOWED_ON_RESTRICTED_NETWORKS,
|
||||
uids);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user