Don't use framework permission strings for netd permissions.
These framework permission strings were being used as arbitrary labels that mapped to netd permissions that have completely different meaning. This leads to confusion, so use different strings. This is being cherry picked from lmp-mr1-dev to lmp-dev to fix failures when creating restricted networks due to prior back-porte203d89. Bug: 21900139 Bug: 18194858 Change-Id: Ib3ec377ab26ce904d3d4678f04edec6cb1260517 (cherry picked from commitd9bf64ba1d)
This commit is contained in:
committed by
Paul Jensen
parent
d3e8d7b4ce
commit
5c36486ea0
@@ -191,8 +191,8 @@ public class PermissionMonitor {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if (add) {
|
if (add) {
|
||||||
mNetd.setPermission(CHANGE_NETWORK_STATE, toIntArray(network));
|
mNetd.setPermission("NETWORK", toIntArray(network));
|
||||||
mNetd.setPermission(CONNECTIVITY_INTERNAL, toIntArray(system));
|
mNetd.setPermission("SYSTEM", toIntArray(system));
|
||||||
} else {
|
} else {
|
||||||
mNetd.clearPermission(toIntArray(network));
|
mNetd.clearPermission(toIntArray(network));
|
||||||
mNetd.clearPermission(toIntArray(system));
|
mNetd.clearPermission(toIntArray(system));
|
||||||
|
|||||||
Reference in New Issue
Block a user