Limit data usage request per uid
Currently, there is no limtation for an app to request data usage callback, which is dangerous if the app fire hundreds of thousands requests and potientially this might cause OOM if the apps don't free them. Test: atest NetworkStatsObserversTest#testRegister_limit Bug: 229103088 Change-Id: I8299f46fd47a82ec9b25ba2e0d3c95db5512c331
This commit is contained in:
@@ -1187,6 +1187,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
|
||||
/**
|
||||
* Keeps track of the number of requests made under different uids.
|
||||
*/
|
||||
// TODO: Remove the hack and use com.android.net.module.util.PerUidCounter instead.
|
||||
public static class PerUidCounter {
|
||||
private final int mMaxCountPerUid;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user