Searched refs:UserGrantTimeState (Results 1 – 10 of 10) sorted by relevance
53 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 …]
98 .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 …]
29 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()
237 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 …]
62 @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()
33 public class UserGrantTimeState { class46 UserGrantTimeState(int version) { in UserGrantTimeState() method in UserGrantTimeState51 public UserGrantTimeState( in UserGrantTimeState() method in UserGrantTimeState
50 UserGrantTimeState readForUser(@NonNull UserHandle user, @DataType int dataType); in readForUser()58 @NonNull UserGrantTimeState grantTimesState, in writeForUser()
46 public UserGrantTimeState readForUser(@NonNull UserHandle user, @DataType int dataType) { in readForUser()61 @NonNull UserGrantTimeState grantTimesState, in writeForUser()
86 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()
72 import com.android.server.healthconnect.permission.UserGrantTimeState;967 UserGrantTimeState userGrantTimeState = in mergeGrantTimes()