diff options
author | 2025-02-04 13:44:12 -0800 | |
---|---|---|
committer | 2025-02-04 14:04:53 -0800 | |
commit | 9210032d820b13e21ea9b660093a3ddf7fdfd66c (patch) | |
tree | fb0a7c1342e9f158bb24cb65b75ee308f6d74ac3 /PermissionController/src | |
parent | a27cd59458a214a864cbd501131198daa6a04f18 (diff) |
Don't use main thread for getHistoricalOps IPC calls
viewModelScope by default use main thread dispatcher, switching
the dispatcher for ipc calls.
Bug: 394380603
Test: atest PermissionUsageDetailsViewModelTest
Test: atest PermissionHistoryTest
Test: manual
FLAG: EXEMPT bug fix
Relnote: bug fix
Change-Id: I7ff978a4b77bee95f42db85d711bf61684a90549
Diffstat (limited to 'PermissionController/src')
-rw-r--r-- | PermissionController/src/com/android/permissioncontroller/appops/data/repository/v31/AppOpRepository.kt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/PermissionController/src/com/android/permissioncontroller/appops/data/repository/v31/AppOpRepository.kt b/PermissionController/src/com/android/permissioncontroller/appops/data/repository/v31/AppOpRepository.kt index 3057f05e9..21ced3b28 100644 --- a/PermissionController/src/com/android/permissioncontroller/appops/data/repository/v31/AppOpRepository.kt +++ b/PermissionController/src/com/android/permissioncontroller/appops/data/repository/v31/AppOpRepository.kt @@ -112,7 +112,9 @@ class AppOpRepositoryImpl( fun sendUpdate() { if (job == null || job?.isActive == false) { - job = coroutineScope.launch { trySend(getDiscreteOps(opNames)) } + job = coroutineScope.launch(dispatcher) { + trySend(getDiscreteOps(opNames)) + } } } |