Home
last modified time | relevance | path

Searched refs:HealthConnectException (Results 1 – 25 of 103) sorted by relevance

12345

/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/utils/di/
DFakeHealthDataExportManager.kt19 import android.health.connect.HealthConnectException
42 private var getScheduledExportPeriodInDaysException: HealthConnectException? = null
43 private var scheduledExportStatusException: HealthConnectException? = null
44 private var queryDocumentProvidersException: HealthConnectException? = null
45 private var configureScheduledExportException: HealthConnectException? = null
68 outcomeReceiver: OutcomeReceiver<ScheduledExportStatus, HealthConnectException> in getScheduledExportStatus()
76 outcomeReceiver: OutcomeReceiver<List<ExportImportDocumentProvider>, HealthConnectException> in queryDocumentProviders()
86 fun setGetScheduledPeriodInDaysException(exception: HealthConnectException?) { in setGetScheduledPeriodInDaysException()
98 fun setScheduledExportStatusException(exception: HealthConnectException?) { in setScheduledExportStatusException()
102 fun setQueryDocumentProvidersException(exception: HealthConnectException?) { in setQueryDocumentProvidersException()
[all …]
DFakeHealthDataImportManager.kt19 import android.health.connect.HealthConnectException
36 private var getImportStatusException: HealthConnectException? = null
40 outcomeReceiver: OutcomeReceiver<ImportStatus, HealthConnectException> in getImportStatus()
50 fun setGetImportStatusException(exception: HealthConnectException?) { in setGetImportStatusException()
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/nopermission/
DHealthConnectManagerNoPermissionsGrantedTest.java57 import android.health.connect.HealthConnectException;
113 } catch (HealthConnectException healthConnectException) { in testInsert_noPermissions_expectError()
115 .isEqualTo(HealthConnectException.ERROR_SECURITY); in testInsert_noPermissions_expectError()
126 } catch (HealthConnectException healthConnectException) { in testUpdate_noPermissions_expectError()
128 .isEqualTo(HealthConnectException.ERROR_SECURITY); in testUpdate_noPermissions_expectError()
139 } catch (HealthConnectException healthConnectException) { in testDeleteUsingId_noPermissions_expectError()
141 .isEqualTo(HealthConnectException.ERROR_SECURITY); in testDeleteUsingId_noPermissions_expectError()
157 } catch (HealthConnectException healthConnectException) { in testDeleteUsingFilter_noPermissions_expectError()
159 .isEqualTo(HealthConnectException.ERROR_SECURITY); in testDeleteUsingFilter_noPermissions_expectError()
174 } catch (HealthConnectException healthConnectException) { in testChangeLogsToken_noPermissions_expectError()
[all …]
DHealthConnectManagerNotAllPermissionsAreGrantedTest.java41 import android.health.connect.HealthConnectException;
84 } catch (HealthConnectException healthConnectException) { in testInsert_somePermissionsAreNotGranted_expectError()
86 .isEqualTo(HealthConnectException.ERROR_SECURITY); in testInsert_somePermissionsAreNotGranted_expectError()
96 } catch (HealthConnectException healthConnectException) { in testUpdate_somePermissionsAreNotGranted_expectError()
98 .isEqualTo(HealthConnectException.ERROR_SECURITY); in testUpdate_somePermissionsAreNotGranted_expectError()
109 } catch (HealthConnectException healthConnectException) { in testDeleteUsingIds_somePermissionsAreNotGranted_expectError()
111 .isEqualTo(HealthConnectException.ERROR_SECURITY); in testDeleteUsingIds_somePermissionsAreNotGranted_expectError()
127 } catch (HealthConnectException healthConnectException) { in testGetChangeLogToken_somePermissionsAreNotGranted_expectError()
129 .isEqualTo(HealthConnectException.ERROR_SECURITY); in testGetChangeLogToken_somePermissionsAreNotGranted_expectError()
168 } catch (HealthConnectException healthConnectException) { in testGetChangeLogs_somePermissionsAreNotGranted_expectError()
[all …]
/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/
DHealthConnectServiceImpl.java23 import static android.health.connect.HealthConnectException.ERROR_INTERNAL;
24 import static android.health.connect.HealthConnectException.ERROR_SECURITY;
25 import static android.health.connect.HealthConnectException.ERROR_UNSUPPORTED_OPERATION;
51 import android.health.connect.HealthConnectException;
410 logger.setHealthDataServiceApiStatusError(HealthConnectException.ERROR_IO); in insertRecords()
413 callback, sqLiteException, HealthConnectException.ERROR_IO); in insertRecords()
418 } catch (HealthConnectException healthConnectException) { in insertRecords()
538 logger.setHealthDataServiceApiStatusError(HealthConnectException.ERROR_IO); in aggregateRecords()
541 callback, sqLiteException, HealthConnectException.ERROR_IO); in aggregateRecords()
546 } catch (HealthConnectException healthConnectException) { in aggregateRecords()
[all …]
/packages/modules/HealthFitness/tests/cts/route/src/android/healthconnect/cts/route/
DExerciseRouteNoReadWritePermissionTest.java39 import android.health.connect.HealthConnectException;
78 HealthConnectException e = in insertRecords_canNotInsertRoute()
80 HealthConnectException.class, in insertRecords_canNotInsertRoute()
87 assertThat(e.getErrorCode()).isEqualTo(HealthConnectException.ERROR_SECURITY); in insertRecords_canNotInsertRoute()
119 HealthConnectException e = in insertRecords_withSameClientId_updatedRoute_throws_routeDoesNotGetUpdated()
121 HealthConnectException.class, in insertRecords_withSameClientId_updatedRoute_throws_routeDoesNotGetUpdated()
130 assertThat(e.getErrorCode()).isEqualTo(HealthConnectException.ERROR_SECURITY); in insertRecords_withSameClientId_updatedRoute_throws_routeDoesNotGetUpdated()
146 HealthConnectException e = in insertRecords_withSameClientId_addedRoute_throws_routeDoesNotGetAdded()
148 HealthConnectException.class, in insertRecords_withSameClientId_addedRoute_throws_routeDoesNotGetAdded()
155 assertThat(e.getErrorCode()).isEqualTo(HealthConnectException.ERROR_SECURITY); in insertRecords_withSameClientId_addedRoute_throws_routeDoesNotGetAdded()
[all …]
/packages/modules/HealthFitness/framework/java/android/health/connect/
DHealthConnectManager.java549 @NonNull OutcomeReceiver<InsertRecordsResponse, HealthConnectException> callback) { in insertRecords()
609 OutcomeReceiver<AggregateRecordsResponse<T>, HealthConnectException> callback) { in aggregate()
629 new HealthConnectException( in aggregate()
630 HealthConnectException.ERROR_INTERNAL)); in aggregate()
643 new HealthConnectException(HealthConnectException.ERROR_INTERNAL)), in aggregate()
673 HealthConnectException> in aggregateGroupByDuration()
711 new HealthConnectException(HealthConnectException.ERROR_INTERNAL)), in aggregateGroupByDuration()
743 HealthConnectException> in aggregateGroupByPeriod()
782 new HealthConnectException(HealthConnectException.ERROR_INTERNAL)), in aggregateGroupByPeriod()
805 @NonNull OutcomeReceiver<Void, HealthConnectException> callback) { in deleteRecords()
[all …]
DHealthConnectException.java26 public class HealthConnectException extends RuntimeException { class
83 public HealthConnectException(@ErrorCode int errorCode, @Nullable String message) { in HealthConnectException() method in HealthConnectException
96 public HealthConnectException( in HealthConnectException() method in HealthConnectException
108 public HealthConnectException(@ErrorCode int errorCode) { in HealthConnectException() method in HealthConnectException
/packages/modules/HealthFitness/framework/java/android/health/connect/aidl/
DHealthConnectExceptionParcel.java20 import android.health.connect.HealthConnectException;
33 new HealthConnectException(in.readInt(), in.readString()));
42 private final HealthConnectException mHealthConnectException;
44 public HealthConnectExceptionParcel(HealthConnectException healthConnectException) { in HealthConnectExceptionParcel()
48 public HealthConnectException getHealthConnectException() { in getHealthConnectException()
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/exportimport/api/
DUpdateExportSettingsUseCaseTest.kt19 import android.health.connect.HealthConnectException
69 val exception = HealthConnectException(HealthConnectException.ERROR_UNKNOWN) in <lambda>()
79 assertThat((result as ExportImportUseCaseResult.Failed).exception is HealthConnectException) in <lambda>()
81 assertThat((result.exception as HealthConnectException).errorCode) in <lambda>()
82 .isEqualTo(HealthConnectException.ERROR_UNKNOWN) in <lambda>()
DLoadExportSettingsUseCaseTest.kt19 import android.health.connect.HealthConnectException
67 val exception = HealthConnectException(HealthConnectException.ERROR_UNKNOWN) in <lambda>()
73 assertThat((result as ExportImportUseCaseResult.Failed).exception is HealthConnectException) in <lambda>()
75 assertThat((result.exception as HealthConnectException).errorCode) in <lambda>()
76 .isEqualTo(HealthConnectException.ERROR_UNKNOWN) in <lambda>()
DLoadImportStatusUseCaseTest.kt19 import android.health.connect.HealthConnectException
73 val exception = HealthConnectException(HealthConnectException.ERROR_UNKNOWN) in <lambda>()
79 assertThat((result as ExportImportUseCaseResult.Failed).exception is HealthConnectException) in <lambda>()
81 assertThat((result.exception as HealthConnectException).errorCode) in <lambda>()
82 .isEqualTo(HealthConnectException.ERROR_UNKNOWN) in <lambda>()
DLoadScheduledExportStatusUseCaseTest.kt19 import android.health.connect.HealthConnectException
76 val exception = HealthConnectException(HealthConnectException.ERROR_UNKNOWN) in <lambda>()
83 assertThat((result as ExportImportUseCaseResult.Failed).exception is HealthConnectException) in <lambda>()
85 assertThat((result.exception as HealthConnectException).errorCode) in <lambda>()
86 .isEqualTo(HealthConnectException.ERROR_UNKNOWN) in <lambda>()
DQueryDocumentProvidersUseCaseTest.kt19 import android.health.connect.HealthConnectException
168 val exception = HealthConnectException(HealthConnectException.ERROR_UNKNOWN) in <lambda>()
174 assertThat((result as ExportImportUseCaseResult.Failed).exception is HealthConnectException) in <lambda>()
176 assertThat((result.exception as HealthConnectException).errorCode) in <lambda>()
177 .isEqualTo(HealthConnectException.ERROR_UNKNOWN) in <lambda>()
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/autodelete/api/
DLoadAutoDeleteUseCaseTest.kt18 import android.health.connect.HealthConnectException
81 .thenThrow(HealthConnectException(HealthConnectException.ERROR_UNKNOWN)) in <lambda>()
85 assertThat((result as UseCaseResults.Failed).exception is HealthConnectException).isTrue() in <lambda>()
86 assertThat((result.exception as HealthConnectException).errorCode) in <lambda>()
87 .isEqualTo(HealthConnectException.ERROR_UNKNOWN) in <lambda>()
DUpdateAutoDeleteUseCaseTest.kt18 import android.health.connect.HealthConnectException in <lambda>()
109 .thenThrow(HealthConnectException(HealthConnectException.ERROR_UNKNOWN)) in <lambda>()
113 assertThat((result as UseCaseResults.Failed).exception is HealthConnectException).isTrue() in <lambda>()
114 Truth.assertThat((result.exception as HealthConnectException).errorCode) in <lambda>()
115 .isEqualTo(HealthConnectException.ERROR_UNKNOWN) in <lambda>()
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/
DHealthConnectManagerTest.java67 import android.health.connect.HealthConnectException;
241 AtomicReference<HealthConnectException> responseException = new AtomicReference<>(); in testUpdateRecords_validInput_dataBaseUpdatedSuccessfully()
263 new OutcomeReceiver<Void, HealthConnectException>() { in testUpdateRecords_validInput_dataBaseUpdatedSuccessfully()
270 public void onError(HealthConnectException exception) { in testUpdateRecords_validInput_dataBaseUpdatedSuccessfully()
306 AtomicReference<HealthConnectException> responseException = new AtomicReference<>(); in testUpdateRecords_invalidInputRecords_noChangeInDataBase()
333 new OutcomeReceiver<Void, HealthConnectException>() { in testUpdateRecords_invalidInputRecords_noChangeInDataBase()
338 public void onError(HealthConnectException exception) { in testUpdateRecords_invalidInputRecords_noChangeInDataBase()
358 .isEqualTo(HealthConnectException.ERROR_INVALID_ARGUMENT); in testUpdateRecords_invalidInputRecords_noChangeInDataBase()
407 new OutcomeReceiver<Void, HealthConnectException>() { in testUpdateRecords_recordWithInvalidPackageName_noChangeInDataBase()
414 public void onError(HealthConnectException exception) { in testUpdateRecords_recordWithInvalidPackageName_noChangeInDataBase()
[all …]
DHealthPermissionCategoryPriorityTests.java35 import android.health.connect.HealthConnectException;
92 } catch (HealthConnectException healthConnectException) { in testGetPriority_no_perm()
94 .isEqualTo(HealthConnectException.ERROR_SECURITY); in testGetPriority_no_perm()
136 } catch (HealthConnectException healthConnectException) { in testUpdatePriority_no_perm()
138 .isEqualTo(HealthConnectException.ERROR_SECURITY); in testUpdatePriority_no_perm()
DGetApplicationInfoTest.java27 import android.health.connect.HealthConnectException;
84 public void onError(HealthConnectException exception) { in testEmptyApplicationInfo()
104 AtomicReference<HealthConnectException> healthConnectExceptionAtomicReference = in testEmptyApplicationInfo_no_perm()
109 } catch (HealthConnectException healthConnectException) { in testEmptyApplicationInfo_no_perm()
111 .isEqualTo(HealthConnectException.ERROR_SECURITY); in testEmptyApplicationInfo_no_perm()
DSessionDatatypeDisabledFeatureTest.java25 import android.health.connect.HealthConnectException;
77 } catch (HealthConnectException healthConnectException) { in testWriteExerciseSession_insertWithDisableFeature_throwsException()
79 .isEqualTo(HealthConnectException.ERROR_UNSUPPORTED_OPERATION); in testWriteExerciseSession_insertWithDisableFeature_throwsException()
104 } catch (HealthConnectException healthConnectException) { in testWriteSleepSession_insertWithDisableFeature_throwsException()
106 .isEqualTo(HealthConnectException.ERROR_UNSUPPORTED_OPERATION); in testWriteSleepSession_insertWithDisableFeature_throwsException()
/packages/modules/HealthFitness/tests/cts/hostsidetests/healthconnect/device/src/android/healthconnect/cts/device/
DHealthConnectDeviceTest.java68 import android.health.connect.HealthConnectException;
201 HealthConnectException e = in testAnAppCantDeleteAnotherAppEntry()
203 HealthConnectException.class, in testAnAppCantDeleteAnotherAppEntry()
206 assertThat(e.getErrorCode()).isEqualTo(HealthConnectException.ERROR_INVALID_ARGUMENT); in testAnAppCantDeleteAnotherAppEntry()
215 HealthConnectException e = in testAnAppCantUpdateAnotherAppEntry()
217 HealthConnectException.class, in testAnAppCantUpdateAnotherAppEntry()
220 assertThat(e.getErrorCode()).isEqualTo(HealthConnectException.ERROR_INVALID_ARGUMENT); in testAnAppCantUpdateAnotherAppEntry()
271 HealthConnectException e = in testAppWithWritePermsOnly_readDataFromAllApps_throwsError()
273 HealthConnectException.class, in testAppWithWritePermsOnly_readDataFromAllApps_throwsError()
279 assertThat(e.getErrorCode()).isEqualTo(HealthConnectException.ERROR_SECURITY); in testAppWithWritePermsOnly_readDataFromAllApps_throwsError()
[all …]
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/data/entries/api/
DLoadDataEntriesUseCaseTest.kt4 import android.health.connect.HealthConnectException in <lambda>()
126 assertThat((result as UseCaseResults.Failed).exception is HealthConnectException).isTrue() in <lambda>()
127 assertThat((result.exception as HealthConnectException).errorCode) in <lambda>()
128 .isEqualTo(HealthConnectException.ERROR_UNKNOWN) in <lambda>()
143 args.arguments[2] as OutcomeReceiver<List<LocalDate>, HealthConnectException> in <lambda>()
144 receiver.onError(HealthConnectException(HealthConnectException.ERROR_UNKNOWN)) in <lambda>()
/packages/modules/HealthFitness/tests/cts/hostsidetests/healthconnect/HealthConnectTestHelper/src/android/healthconnect/cts/testhelper/
DHealthConnectServiceLogsTests.java38 import android.health.connect.HealthConnectException;
174 public void onError(HealthConnectException exception) { in testHealthConnectReadRecords()
201 public void onError(HealthConnectException exception) { in testHealthConnectReadRecordsError()
230 public void onError(HealthConnectException exception) { in testHealthConnectGetChangeLogTokenError()
266 public void onError(HealthConnectException exception) { in testHealthConnectGetChangeLogs()
289 public void onError(HealthConnectException exception) { in testHealthConnectGetChangeLogsError()
314 public void onError(HealthConnectException exception) { in testHealthConnectAggregatedData()
339 public void onError(HealthConnectException exception) { in testHealthConnectAggregatedDataError()
372 public void onError(HealthConnectException exception) { in getChangeLogToken()
396 public void onError(HealthConnectException exception) { in updateRecords()
/packages/modules/HealthFitness/framework/java/android/health/connect/restore/
DStageRemoteDataException.java21 import android.health.connect.HealthConnectException;
39 private final Map<String, HealthConnectException> mExceptionsByFileNames = new ArrayMap<>();
55 @NonNull Map<String, HealthConnectException> exceptionsByFileNames) { in StageRemoteDataException()
77 public Map<String, HealthConnectException> getExceptionsByFileNames() { in getExceptionsByFileNames()
/packages/modules/HealthFitness/framework/java/android/health/connect/ratelimiter/
DRateLimiterException.java20 import android.health.connect.HealthConnectException;
23 public class RateLimiterException extends HealthConnectException {
37 super(HealthConnectException.ERROR_RATE_LIMIT_EXCEEDED, message); in RateLimiterException()

12345