Add location sharing toggle user restriction.
And add support for respecting it.
Change-Id: Ia5cf9134c5f5741c3f55afadbe54f862da7bfe5b
diff --git a/services/java/com/android/server/pm/UserManagerService.java b/services/java/com/android/server/pm/UserManagerService.java
index 18ccf75..c3f4256 100644
--- a/services/java/com/android/server/pm/UserManagerService.java
+++ b/services/java/com/android/server/pm/UserManagerService.java
@@ -603,6 +603,7 @@
writeBoolean(serializer, restrictions, UserManager.ALLOW_MODIFY_ACCOUNTS);
writeBoolean(serializer, restrictions, UserManager.ALLOW_INSTALL_APPS);
writeBoolean(serializer, restrictions, UserManager.ALLOW_UNINSTALL_APPS);
+ writeBoolean(serializer, restrictions, UserManager.ALLOW_CONFIG_LOCATION_ACCESS);
serializer.endTag(null, TAG_RESTRICTIONS);
}
serializer.endTag(null, TAG_USER);
@@ -719,6 +720,7 @@
readBoolean(parser, restrictions, UserManager.ALLOW_MODIFY_ACCOUNTS);
readBoolean(parser, restrictions, UserManager.ALLOW_INSTALL_APPS);
readBoolean(parser, restrictions, UserManager.ALLOW_UNINSTALL_APPS);
+ readBoolean(parser, restrictions, UserManager.ALLOW_CONFIG_LOCATION_ACCESS);
}
}
}
@@ -763,6 +765,7 @@
restrictions.putBoolean(UserManager.ALLOW_MODIFY_ACCOUNTS, true);
restrictions.putBoolean(UserManager.ALLOW_INSTALL_APPS, true);
restrictions.putBoolean(UserManager.ALLOW_UNINSTALL_APPS, true);
+ restrictions.putBoolean(UserManager.ALLOW_CONFIG_LOCATION_ACCESS, true);
}
private int readIntAttribute(XmlPullParser parser, String attr, int defaultValue) {