Added onRestrictBackgroundWhitelistChanged callback.
When users add or remove an app to the Data Saver Mode whitelist, the app is notified through a ConnectivityManager.ACTION_RESTRICT_BACKGROUND_CHANGED. But besides this broadcast, it's also necessary to notify internal apps such Settings, hence a new method is being added to INetworkPolicyListener. BUG: 27481520 Change-Id: I1537a77becf6b7da1535ed5faabdc894fd9f7084
This commit is contained in:
@@ -1419,6 +1419,15 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
|||||||
log("onRestrictBackgroundChanged(restrictBackground=" + restrictBackground + ")");
|
log("onRestrictBackgroundChanged(restrictBackground=" + restrictBackground + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRestrictBackgroundWhitelistChanged(int uid, boolean whitelisted) {
|
||||||
|
if (LOGD_RULES) {
|
||||||
|
// caller is NPMS, since we only register with them
|
||||||
|
log("onRestrictBackgroundWhitelistChanged(uid=" + uid + ", whitelisted="
|
||||||
|
+ whitelisted + ")");
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user