Merge "Do not register callback for < MIN_THRESHOLD_BYTES" into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
76823e1357
@@ -35,6 +35,7 @@ import android.os.Messenger;
|
||||
import android.os.RemoteException;
|
||||
import android.os.ServiceManager;
|
||||
import android.os.ServiceManager.ServiceNotFoundException;
|
||||
import android.util.DataUnit;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
@@ -95,6 +96,15 @@ public class NetworkStatsManager {
|
||||
/** @hide */
|
||||
public static final int CALLBACK_RELEASED = 1;
|
||||
|
||||
/**
|
||||
* Minimum data usage threshold for registering usage callbacks.
|
||||
*
|
||||
* Requests registered with a threshold lower than this will only be triggered once this minimum
|
||||
* is reached.
|
||||
* @hide
|
||||
*/
|
||||
public static final long MIN_THRESHOLD_BYTES = DataUnit.MEBIBYTES.toBytes(2);
|
||||
|
||||
private final Context mContext;
|
||||
private final INetworkStatsService mService;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user