Home
last modified time | relevance | path

Searched refs:nextLong (Results 1 – 25 of 57) sorted by relevance

123

/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/
DMockRandom.java66 return (int) (nextLong() & ((1L << bits) - 1)); in next()
71 return nextLong() % 2 == 1; in nextBoolean()
77 bytes[i] = (byte) nextLong(); in nextBytes()
103 return (int) nextLong(); in nextInt()
113 public synchronized long nextLong() { in nextLong() method in MockRandom
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/noising/
DImpressionNoiseUtilTest.java113 ExtendedMockito.doReturn(0L).when(() -> ImpressionNoiseUtil.nextLong(any(), anyLong())); in selectRandomStateAndGenerateReportConfigs_event()
121 ExtendedMockito.doReturn(2L).when(() -> ImpressionNoiseUtil.nextLong(any(), anyLong())); in selectRandomStateAndGenerateReportConfigs_event()
139 ExtendedMockito.doReturn(6L).when(() -> ImpressionNoiseUtil.nextLong(any(), anyLong())); in selectRandomStateAndGenerateReportConfigs_eventWithInstallAttribution()
146 ExtendedMockito.doReturn(2L).when(() -> ImpressionNoiseUtil.nextLong(any(), anyLong())); in selectRandomStateAndGenerateReportConfigs_eventWithInstallAttribution()
164 ExtendedMockito.doReturn(1416L).when(() -> ImpressionNoiseUtil.nextLong(any(), anyLong())); in selectRandomStateAndGenerateReportConfigs_navigation()
172 ExtendedMockito.doReturn(1112L).when(() -> ImpressionNoiseUtil.nextLong(any(), anyLong())); in selectRandomStateAndGenerateReportConfigs_navigation()
341 ExtendedMockito.doReturn(3L).when(() -> ImpressionNoiseUtil.nextLong(any(), anyLong())); in selectFlexEventReportRandomStateAndGenerateReportConfigs_singleDestinationType_equal()
349 ExtendedMockito.doReturn(5L).when(() -> ImpressionNoiseUtil.nextLong(any(), anyLong())); in selectFlexEventReportRandomStateAndGenerateReportConfigs_singleDestinationType_equal()
362 ExtendedMockito.doReturn(16L).when(() -> ImpressionNoiseUtil.nextLong(any(), anyLong())); in selectFlexEventReportRandomStateAndGenerateReportConfigs_doubleDestinationType_equal()
370 ExtendedMockito.doReturn(12L).when(() -> ImpressionNoiseUtil.nextLong(any(), anyLong())); in selectFlexEventReportRandomStateAndGenerateReportConfigs_doubleDestinationType_equal()
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/testmode/
DDeterministicSecureRandomTest.java47 assertNotEquals(secureRandom.nextLong(), secureRandom.nextLong()); in testDeterministicSecureRandomNonRepeating()
62 assertEquals(srOne.nextLong(), srTwo.nextLong()); in testTwoDeterministicSecureRandomsAreDeterministic()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/measurement/noising/
DImpressionNoiseUtil.java50 long sequenceIndex = nextLong(rand, numCombinations); in selectRandomStateAndGenerateReportConfigs()
116 long sequenceIndex = nextLong(rand, numStates); in selectFlexEventReportRandomStateAndGenerateReportConfigs()
136 public static long nextLong(ThreadLocalRandom rand, long bound) { in nextLong() method in ImpressionNoiseUtil
137 return rand.nextLong(bound); in nextLong()
/packages/modules/Connectivity/tests/unit/java/com/android/server/net/
DNetworkStatsFactoryTest.java541 entry.rxBytes = reader.nextLong(); in parseNetworkStatsFromGoldenSample()
542 entry.rxPackets = reader.nextLong(); in parseNetworkStatsFromGoldenSample()
543 entry.txBytes = reader.nextLong(); in parseNetworkStatsFromGoldenSample()
544 entry.txPackets = reader.nextLong(); in parseNetworkStatsFromGoldenSample()
548 entry.rxBytes += reader.nextLong(); in parseNetworkStatsFromGoldenSample()
549 entry.rxPackets += reader.nextLong(); in parseNetworkStatsFromGoldenSample()
550 entry.txBytes += reader.nextLong(); in parseNetworkStatsFromGoldenSample()
551 entry.txPackets += reader.nextLong(); in parseNetworkStatsFromGoldenSample()
/packages/modules/Connectivity/staticlibs/framework/com/android/net/module/util/
DMacAddressUtils.java83 addr = r.nextLong() & VALID_LONG_MASK; in createRandomUnicastAddress()
86 | (NIC_MASK & r.nextLong()); in createRandomUnicastAddress()
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/hal/
DWifiStaIfaceAidlImplTest.java119 stats.timeStampInMs = r.nextLong() & 0xFFFFFFFFFFL; in testLinkLayerStatsAssignment()
188 fateReport.frameInfo.driverTimestampUsec = new Random().nextLong(); in testGetTxPktFates()
216 fateReport.frameInfo.driverTimestampUsec = new Random().nextLong(); in testGetTxPktFatesExceedsInputArrayLength()
249 fateReport.frameInfo.driverTimestampUsec = new Random().nextLong(); in testGetRxPktFates()
277 fateReport.frameInfo.driverTimestampUsec = new Random().nextLong(); in testGetRxPktFatesExceedsInputArrayLength()
392 pstats.rxMpdu = r.nextLong() & 0xFFFFFFFFFFL; // more than 32 bits in randomizePacketStats()
393 pstats.txMpdu = r.nextLong() & 0xFFFFFFFFFFL; in randomizePacketStats()
394 pstats.lostMpdu = r.nextLong() & 0xFFFFFFFFFFL; in randomizePacketStats()
395 pstats.retries = r.nextLong() & 0xFFFFFFFFFFL; in randomizePacketStats()
DWifiStaIfaceHidlImplTest.java193 pstats.rxMpdu = r.nextLong() & 0xFFFFFFFFFFL; // more than 32 bits in randomizePacketStats()
194 pstats.txMpdu = r.nextLong() & 0xFFFFFFFFFFL; in randomizePacketStats()
195 pstats.lostMpdu = r.nextLong() & 0xFFFFFFFFFFL; in randomizePacketStats()
196 pstats.retries = r.nextLong() & 0xFFFFFFFFFFL; in randomizePacketStats()
540 stats.timeStampInMs = r.nextLong() & 0xFFFFFFFFFFL; in testLinkLayerStatsAssignment()
566 stats.timeStampInMs = r.nextLong() & 0xFFFFFFFFFFL; in testLinkLayerStatsAssignment_1_3()
593 stats.timeStampInMs = r.nextLong() & 0xFFFFFFFFFFL; in testLinkLayerStatsAssignment_1_5()
714 fateReport.frameInfo.driverTimestampUsec = new Random().nextLong(); in testGetTxPktFates()
747 fateReport.frameInfo.driverTimestampUsec = new Random().nextLong(); in testGetTxPktFatesExceedsInputArrayLength()
782 fateReport.frameInfo.driverTimestampUsec = new Random().nextLong(); in testGetRxPktFates()
[all …]
/packages/apps/TV/src/com/android/tv/data/
DWatchedHistoryManager.java290 long channelId = scanner.nextLong(); in decode()
291 long watchedStartTime = scanner.nextLong(); in decode()
292 long duration = scanner.nextLong(); in decode()
/packages/modules/Wifi/service/java/com/android/server/wifi/aware/
DPairingConfigManager.java80 first = mRandom.nextLong(); in createRandomNik()
81 second = mRandom.nextLong(); in createRandomNik()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/privacysources/
DAutoRevokePrivacySource.kt44 sessionId = Random().nextLong() in rescanAndPushSafetyCenterData()
/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/utils/
DIkeSpiGenerator.java50 spi = mRandom.nextLong(); in allocateSpi()
/packages/modules/Connectivity/tests/unit/java/android/net/
DNetworkStatsHistoryTest.java355 stats = new NetworkStatsHistory(r.nextLong()); in testFuzzing()
359 final long start = r.nextLong(); in testFuzzing()
369 stats.removeBucketsStartingBefore(r.nextLong()); in testFuzzing()
381 final long value = r.nextLong(); in nextPositiveLong()
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/utils/
DTimeExtensions.kt96 val randomSecondOffset = Random.nextLong(secondsInDay) in LocalDate()
/packages/apps/Messaging/src/com/android/messaging/datamodel/
DFileProvider.java83 final long fileId = Math.abs(RANDOM_ID.nextLong()); in buildFileUri()
/packages/services/Car/tests/DiagnosticTools/src/com/google/android/car/diagnostictools/
DDTC.java144 long timestamp = sRandomGen.nextLong(); in createSampleDTC()
/packages/services/Car/service/src/com/android/car/
DUptimeTracker.java156 mHistoricalUptime = Optional.of(reader.nextLong()); in getHistoricalUptimeLocked()
/packages/services/Car/libs/vehicle-hal-support-lib/src/com/android/car/hal/test/
DDiagnosticJson.java137 mTimestamp.write(jsonReader.nextLong()); in Builder()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/signals/
DSignalsProviderImplTest.java132 .setId(rand.nextLong()) in generateDBProtectedSignal()
/packages/apps/Launcher3/tests/src/com/android/launcher3/celllayout/testgenerator/
DValidGridMigrationTestCaseGenerator.kt141 val seed = generator.nextLong() in generateTestCase()
/packages/apps/Settings/src/com/android/settings/applications/appinfo/
DAppPermissionPreferenceController.java148 sessionId = new Random().nextLong(); in startManagePermissionsActivity()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/legacy/
DAppPermissionActivity.java155 sessionId = new Random().nextLong(); in onCreate()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/
DSourceTest.java1562 .setEventTime(new Random().nextLong()) in validateAndSetNumReportStates_fullFlexValid_returnsTrue()
1607 .setEventTime(new Random().nextLong()) in validateAndSetNumReportStates_fullFlexArithmeticInvalid_returnsFalse()
1664 .setEventTime(new Random().nextLong()) in validateAndSetNumReportStates_fullFlexIterativeInvalid_returnsFalse()
1705 .setEventTime(new Random().nextLong()) in validateAndSetMaxEventStates_fullFlexAttributionScopeMaxEventStatesNull_returnsFalse()
1812 .setEventTime(new Random().nextLong()) in isFlexEventApiValueValid_eventSource_true()
1863 .setEventTime(new Random().nextLong()) in isFlexEventApiValueValid_eventSource_false()
1907 .setEventTime(new Random().nextLong()) in isFlexEventApiValueValid_navigationSource_true()
/packages/apps/Dialer/java/com/android/dialer/util/
DDialerUtils.java212 long fileId = Math.abs(RANDOM.nextLong()); in createShareableFile()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/topics/classifier/
DCommonClassifierHelper.java261 return reader.nextLong(); in getBundledModelBuildId()

123