Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 134b86e9 authored by Remi NGUYEN VAN's avatar Remi NGUYEN VAN Committed by Automerger Merge Worker
Browse files

Add setPollForce to module API am: 08f1c71a

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1987469

Change-Id: Icc0825a99853b565c31f9718d6bd4850408b067d
parents f15c18ec 08f1c71a
Loading
Loading
Loading
Loading
+6 −3
Original line number Original line Diff line number Diff line
@@ -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;