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:
Remi NGUYEN VAN
2022-02-28 07:05:02 +00:00
committed by Automerger Merge Worker

View File

@@ -27,7 +27,6 @@ import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.annotation.TestApi;
import android.annotation.WorkerThread;
import android.app.usage.NetworkStats.Bucket;
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)
@TestApi
@SystemApi(client = MODULE_LIBRARIES)
public void setPollForce(boolean pollForce) {
if (pollForce) {
mFlags |= FLAG_POLL_FORCE;