Add setPollForce to module API am: 08f1c71aa5 am: 134b86e9cf
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1987469 Change-Id: Id0253f76a38d1117fa7761ddf123a182f1e210f6
This commit is contained in:
@@ -27,7 +27,6 @@ import android.annotation.Nullable;
|
|||||||
import android.annotation.RequiresPermission;
|
import android.annotation.RequiresPermission;
|
||||||
import android.annotation.SystemApi;
|
import android.annotation.SystemApi;
|
||||||
import android.annotation.SystemService;
|
import android.annotation.SystemService;
|
||||||
import android.annotation.TestApi;
|
|
||||||
import android.annotation.WorkerThread;
|
import android.annotation.WorkerThread;
|
||||||
import android.app.usage.NetworkStats.Bucket;
|
import android.app.usage.NetworkStats.Bucket;
|
||||||
import android.compat.annotation.UnsupportedAppUsage;
|
import android.compat.annotation.UnsupportedAppUsage;
|
||||||
@@ -192,9 +191,13 @@ public class NetworkStatsManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @hide */
|
/**
|
||||||
|
* Set poll force flag to indicate that calling any subsequent query method will force a stats
|
||||||
|
* poll.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
|
||||||
@TestApi
|
@SystemApi(client = MODULE_LIBRARIES)
|
||||||
public void setPollForce(boolean pollForce) {
|
public void setPollForce(boolean pollForce) {
|
||||||
if (pollForce) {
|
if (pollForce) {
|
||||||
mFlags |= FLAG_POLL_FORCE;
|
mFlags |= FLAG_POLL_FORCE;
|
||||||
|
|||||||
Reference in New Issue
Block a user