Home
last modified time | relevance | path

Searched refs:firstGrantTime (Results 1 – 6 of 6) sorted by relevance

/packages/modules/HealthFitness/framework/java/android/health/connect/migration/
DPermissionMigrationPayload.java59 @NonNull Instant firstGrantTime, in PermissionMigrationPayload() argument
62 mFirstGrantTime = firstGrantTime; in PermissionMigrationPayload()
114 public Builder(@NonNull String holdingPackageName, @NonNull Instant firstGrantTime) { in Builder() argument
116 requireNonNull(firstGrantTime); in Builder()
119 mFirstGrantTime = firstGrantTime; in Builder()
132 public Builder setFirstGrantTime(@NonNull Instant firstGrantTime) { in setFirstGrantTime() argument
133 requireNonNull(firstGrantTime); in setFirstGrantTime()
134 mFirstGrantTime = firstGrantTime; in setFirstGrantTime()
/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/permission/
DGrantTimeXmlHelper.java188 Instant firstGrantTime = in parseFirstGrantTimes() local
192 packagePermissions.put(packageName, firstGrantTime); in parseFirstGrantTimes()
199 Instant firstGrantTime = in parseFirstGrantTimes() local
203 sharedUserPermissions.put(sharedUserName, firstGrantTime); in parseFirstGrantTimes()
DFirstGrantTimeManager.java113 Optional<Instant> firstGrantTime = getGrantTimeReadLocked(uid); in getFirstGrantTime() local
114 if (firstGrantTime.isPresent()) { in getFirstGrantTime()
115 return firstGrantTime; in getFirstGrantTime()
365 Optional<Instant> firstGrantTime = mUidToGrantTimeCache.get(uid); in tryUpdateGrantTimeFromStagedDataLocked() local
366 if (firstGrantTime.isPresent() && firstGrantTime.get().isBefore(stagedTime)) { in tryUpdateGrantTimeFromStagedDataLocked()
/packages/modules/HealthFitness/tests/integrationtests/src/android/healthconnect/tests/permissions/
DGrantTimeIntegrationTest.java179 void assertStartAccessDateIsAdequate(Instant firstGrantTime) { in assertStartAccessDateIsAdequate() argument
180 assertThat(firstGrantTime).isNotNull(); in assertStartAccessDateIsAdequate()
184 assertThat(currentTime.minus(lowerBound).isAfter(firstGrantTime)).isTrue(); in assertStartAccessDateIsAdequate()
185 assertThat(currentTime.minus(upperBound).isBefore(firstGrantTime)).isTrue(); in assertStartAccessDateIsAdequate()
/packages/modules/HealthFitness/tests/integrationtests/src/android/healthconnect/tests/migration/
DHealthConnectPermissionsMigrationTest.java87 Instant firstGrantTime = Instant.now(); in testMigratePermissions_permissionFirstGrantTimeMigrated() local
92 new PermissionMigrationPayload.Builder(DEFAULT_APP_PACKAGE, firstGrantTime) in testMigratePermissions_permissionFirstGrantTimeMigrated()
99 assertThat(firstGrantTime.minus(GRANT_TIME_TO_START_ACCESS_DATE_PERIOD).toEpochMilli()) in testMigratePermissions_permissionFirstGrantTimeMigrated()
/packages/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/permission/
DFirstGrantTimeUnitTest.java251 Optional<Instant> firstGrantTime = in testCurrentPackage_intentSupported_grantTimeIsNotNull() local
253 assertThat(firstGrantTime).isPresent(); in testCurrentPackage_intentSupported_grantTimeIsNotNull()
255 assertThat(firstGrantTime.get()).isGreaterThan(Instant.now().minusSeconds((long) 1e3)); in testCurrentPackage_intentSupported_grantTimeIsNotNull()
256 assertThat(firstGrantTime.get()).isLessThan(Instant.now().plusSeconds((long) 1e3)); in testCurrentPackage_intentSupported_grantTimeIsNotNull()
257 firstGrantTime.ifPresent( in testCurrentPackage_intentSupported_grantTimeIsNotNull()