Home
last modified time | relevance | path

Searched refs:thresholdInBytes (Results 1 – 4 of 4) sorted by relevance

/frameworks/base/core/java/android/net/
DDataUsageRequest.java52 public final long thresholdInBytes; field in DataUsageRequest
54 public DataUsageRequest(int requestId, NetworkTemplate template, long thresholdInBytes) { in DataUsageRequest() argument
57 this.thresholdInBytes = thresholdInBytes; in DataUsageRequest()
69 dest.writeLong(thresholdInBytes); in writeToParcel()
78 long thresholdInBytes = in.readLong();
80 thresholdInBytes);
94 + ", thresholdInBytes=" + thresholdInBytes + " ]"; in toString()
103 && that.thresholdInBytes == this.thresholdInBytes; in equals()
108 return Objects.hash(requestId, template, thresholdInBytes); in hashCode()
/frameworks/base/tests/net/java/com/android/server/net/
DNetworkStatsObserversTest.java149 assertEquals(THRESHOLD_BYTES, request.thresholdInBytes); in testRegister_thresholdTooLow_setsDefaultThreshold()
162 assertEquals(highThresholdBytes, request.thresholdInBytes); in testRegister_highThreshold_accepted()
174 assertEquals(THRESHOLD_BYTES, request1.thresholdInBytes); in testRegister_twoRequests_twoIds()
180 assertEquals(THRESHOLD_BYTES, request2.thresholdInBytes); in testRegister_twoRequests_twoIds()
200 assertEquals(THRESHOLD_BYTES, request.thresholdInBytes); in testUnregister_knownRequest_releasesCaller()
218 assertEquals(THRESHOLD_BYTES, request.thresholdInBytes); in testUnregister_knownRequest_invalidUid_doesNotUnregister()
236 assertEquals(THRESHOLD_BYTES, request.thresholdInBytes); in testUpdateStats_initialSample_doesNotNotify()
264 assertEquals(THRESHOLD_BYTES, request.thresholdInBytes); in testUpdateStats_belowThreshold_doesNotNotify()
299 assertEquals(THRESHOLD_BYTES, request.thresholdInBytes); in testUpdateStats_deviceAccess_notifies()
335 assertEquals(THRESHOLD_BYTES, request.thresholdInBytes); in testUpdateStats_defaultAccess_notifiesSameUid()
[all …]
DNetworkStatsServiceTest.java864 long thresholdInBytes = 1L; // very small; should be overriden by framework in testRegisterUsageCallback() local
866 DataUsageRequest.REQUEST_ID_UNSET, sTemplateWifi, thresholdInBytes); in testRegisterUsageCallback()
888 assertEquals(minThresholdInBytes, request.thresholdInBytes); in testRegisterUsageCallback()
952 long thresholdInBytes = 10 * 1024 * 1024; // 10 MB in testUnregisterUsageCallback_unknown_noop() local
954 2 /* requestId */, sTemplateImsi1, thresholdInBytes); in testUnregisterUsageCallback_unknown_noop()
/frameworks/base/services/core/java/com/android/server/net/
DNetworkStatsObservers.java202 long thresholdInBytes = Math.max(MIN_THRESHOLD_BYTES, request.thresholdInBytes); in buildRequest() local
203 if (thresholdInBytes < request.thresholdInBytes) { in buildRequest()
205 + ". Overriding to a safer default of " + thresholdInBytes + " bytes"); in buildRequest()
208 request.template, thresholdInBytes); in buildRequest()
347 if (bytesSoFar > mRequest.thresholdInBytes) { in checkStats()
388 if (bytesSoFar > mRequest.thresholdInBytes) { in checkStats()