Refactored INetworkPolicyListener callbacks.
Methods onRestrictBackgroundWhitelistChanged() and
onRestrictBackgroundBlacklistChanged() were replaced by a more generic
onUidPoliciesChanged().
Test: m javac-check RUN_ERROR_PRONE=true
Test: m -j32 FrameworksServicesTests && adb install -r -g ${ANDROID_PRODUCT_OUT}/data/app/FrameworksServicesTests/FrameworksServicesTests.apk && adb shell am instrument -e class "com.android.server.NetworkPolicyManagerServiceTest" -w "com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner"
BUG: 28791717
Change-Id: I18b2ee4af06802e0d23822b153d1be9b429d5811
This commit is contained in:
@@ -1538,19 +1538,10 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRestrictBackgroundWhitelistChanged(int uid, boolean whitelisted) {
|
||||
public void onUidPoliciesChanged(int uid, int uidPolicies) {
|
||||
// caller is NPMS, since we only register with them
|
||||
if (LOGD_RULES) {
|
||||
// caller is NPMS, since we only register with them
|
||||
log("onRestrictBackgroundWhitelistChanged(uid=" + uid + ", whitelisted="
|
||||
+ whitelisted + ")");
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onRestrictBackgroundBlacklistChanged(int uid, boolean blacklisted) {
|
||||
if (LOGD_RULES) {
|
||||
// caller is NPMS, since we only register with them
|
||||
log("onRestrictBackgroundBlacklistChanged(uid=" + uid + ", blacklisted="
|
||||
+ blacklisted + ")");
|
||||
log("onUidRulesChanged(uid=" + uid + ", uidPolicies=" + uidPolicies + ")");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user