Home
last modified time | relevance | path

Searched refs:UserGrantTimeState (Results 1 – 10 of 10) sorted by relevance

/packages/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/permission/
DGrantTimePersistenceUnitTest.java53 private static final UserGrantTimeState DEFAULT_STATE =
54 new UserGrantTimeState(
59 private static final UserGrantTimeState SHARED_USERS_STATE =
60 new UserGrantTimeState(
69 private static final UserGrantTimeState PACKAGES_STATE =
70 new UserGrantTimeState(
79 private static final UserGrantTimeState EMPTY_STATE =
80 new UserGrantTimeState(new ArrayMap<>(), new ArrayMap<>(), 3);
112 UserGrantTimeState restoredState = datastore.readForUser(mUser, DATA_TYPE_CURRENT); in testWriteReadData_packageAndSharedUserState_restoredCorrectly()
120 UserGrantTimeState restoredState = datastore.readForUser(mUser, DATA_TYPE_CURRENT); in testWriteReadData_multipleSharedUserState_restoredCorrectly()
[all …]
DFirstGrantTimeUnitTest.java98 .thenReturn(new UserGrantTimeState(DEFAULT_VERSION)); in setUp()
100 .thenReturn(new UserGrantTimeState(DEFAULT_VERSION)); in setUp()
148 UserGrantTimeState currentGrantTimeState = new UserGrantTimeState(DEFAULT_VERSION); in testSetFirstGrantTimeForAnApp_expectOtherAppsGrantTimesRemained()
156 ArgumentCaptor<UserGrantTimeState> captor = in testSetFirstGrantTimeForAnApp_expectOtherAppsGrantTimesRemained()
157 ArgumentCaptor.forClass(UserGrantTimeState.class); in testSetFirstGrantTimeForAnApp_expectOtherAppsGrantTimesRemained()
167 UserGrantTimeState newUserGrantTimeState = captor.getValue(); in testSetFirstGrantTimeForAnApp_expectOtherAppsGrantTimesRemained()
203 UserGrantTimeState currentGrantTimeState = new UserGrantTimeState(DEFAULT_VERSION); in testOnPermissionsChangedCalledWhileDeviceIsLocked_getGrantTimeNotNullAfterUnlock()
277 UserGrantTimeState stagedState = setupGrantTimeState(null, backupTime); in testCurrentPackage_noGrantTimeBackupBecameAvailable_grantTimeEqualToStaged()
286 UserGrantTimeState stagedState = setupGrantTimeState(stateTime, null); in testCurrentPackage_noBackup_useRecordedTime()
299 UserGrantTimeState stagedState = setupGrantTimeState(stateTime, backupTime); in testCurrentPackage_noBackup_grantTimeEqualToStaged()
[all …]
DUserGrantTimeStateTest.java29 UserGrantTimeState state = new UserGrantTimeState(1); in testVersion_getReturnsInitedVersion()
36 UserGrantTimeState state = new UserGrantTimeState(1); in testSharedUser_setSharedUserTime_containsSharedUser()
46 UserGrantTimeState state = new UserGrantTimeState(1); in testPackage_setPackage_containsSetPackageTime()
/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/permission/
DFirstGrantTimeManager.java237 UserGrantTimeState updatedState = in updateFirstGrantTimesFromPermissionState()
258 public UserGrantTimeState getGrantTimeStateForUser(UserHandle user) { in getGrantTimeStateForUser()
272 public void applyAndStageGrantTimeStateForUser(UserHandle userId, UserGrantTimeState state) { in applyAndStageGrantTimeStateForUser()
307 UserGrantTimeState updatedState = in onPackageRemoved()
349 UserGrantTimeState backupState = mDatastore.readForUser(user, DATA_TYPE_STAGED); in tryUpdateGrantTimeFromStagedDataLocked()
404 UserGrantTimeState restoredState = restoreCurrentUserStateLocked(user); in initAndValidateUserStateIfNeedLocked()
440 private UserGrantTimeState restoreCurrentUserStateLocked(UserHandle userHandle) { in restoreCurrentUserStateLocked()
442 UserGrantTimeState restoredState = in restoreCurrentUserStateLocked()
445 restoredState = new UserGrantTimeState(CURRENT_VERSION); in restoreCurrentUserStateLocked()
450 return new UserGrantTimeState(CURRENT_VERSION); in restoreCurrentUserStateLocked()
[all …]
DGrantTimeXmlHelper.java62 @NonNull File file, @NonNull UserGrantTimeState userGrantTimeState) { in serializeGrantTimes()
90 public static UserGrantTimeState parseGrantTime(File file) { in parseGrantTime()
104 private static UserGrantTimeState parseXml(@NonNull XmlPullParser parser) in parseXml()
128 @NonNull XmlSerializer serializer, @NonNull UserGrantTimeState userGrantTimeState) in writeGrantTimes()
164 private static UserGrantTimeState parseFirstGrantTimes(@NonNull XmlPullParser parser) in parseFirstGrantTimes()
170 : UserGrantTimeState.NO_VERSION; in parseFirstGrantTimes()
214 return new UserGrantTimeState(packagePermissions, sharedUserPermissions, version); in parseFirstGrantTimes()
DUserGrantTimeState.java33 public class UserGrantTimeState { class
46 UserGrantTimeState(int version) { in UserGrantTimeState() method in UserGrantTimeState
51 public UserGrantTimeState( in UserGrantTimeState() method in UserGrantTimeState
DFirstGrantTimeDatastore.java50 UserGrantTimeState readForUser(@NonNull UserHandle user, @DataType int dataType); in readForUser()
58 @NonNull UserGrantTimeState grantTimesState, in writeForUser()
DFirstGrantTimeDatastoreXmlPersistence.java46 public UserGrantTimeState readForUser(@NonNull UserHandle user, @DataType int dataType) { in readForUser()
61 @NonNull UserGrantTimeState grantTimesState, in writeForUser()
/packages/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/backuprestore/
DBackupRestoreTest.java86 import com.android.server.healthconnect.permission.UserGrantTimeState;
199 UserGrantTimeState userGrantTimeState = in testGetAllBackupData_forDeviceToDevice_copiesAllData()
200 new UserGrantTimeState(Map.of("package", Instant.now()), Map.of(), 1); in testGetAllBackupData_forDeviceToDevice_copiesAllData()
/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/backuprestore/
DBackupRestore.java72 import com.android.server.healthconnect.permission.UserGrantTimeState;
967 UserGrantTimeState userGrantTimeState = in mergeGrantTimes()