replace NO_PERMISSIONS with PERMISSION_NONE
As part of the effort to simplify the design of permission control
between system server and netd, remove the NO_PERMISSIONS constant used
by trafficController and share the constant PERMISSION_NONE with
networkController instead.
Bug: 128944261
Test: netd_integration_test netd_unit_test
Change-Id: If3eb19adc15b6c23c95fc4b9bc699fd1a515e0ac
diff --git a/tests/binder_test.cpp b/tests/binder_test.cpp
index 1f6e5f7..de3cd1e 100644
--- a/tests/binder_test.cpp
+++ b/tests/binder_test.cpp
@@ -2876,7 +2876,7 @@
android::netdutils::StatusOr<uint8_t> permission = uidPermissionMap.readValue(uid);
if (exist) {
EXPECT_TRUE(isOk(permission));
- EXPECT_EQ(INetd::NO_PERMISSIONS, permission.value());
+ EXPECT_EQ(INetd::PERMISSION_NONE, permission.value());
} else {
EXPECT_FALSE(isOk(permission));
EXPECT_EQ(ENOENT, permission.status().code());
@@ -2893,7 +2893,7 @@
mNetd->trafficSetNetPermForUids(INetd::PERMISSION_INTERNET, appUids);
checkUidsInPermissionMap(appUids, false);
- mNetd->trafficSetNetPermForUids(INetd::NO_PERMISSIONS, appUids);
+ mNetd->trafficSetNetPermForUids(INetd::PERMISSION_NONE, appUids);
checkUidsInPermissionMap(appUids, true);
mNetd->trafficSetNetPermForUids(INetd::PERMISSION_UNINSTALLED, appUids);
checkUidsInPermissionMap(appUids, false);