Loading src/com/android/permissioncontroller/permission/data/SmartAsyncMediatorLiveData.kt +3 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.permissioncontroller.permission.data import android.os.Binder import com.android.permissioncontroller.permission.utils.IPC import kotlinx.coroutines.Dispatchers.Main import kotlinx.coroutines.GlobalScope Loading Loading @@ -55,6 +56,8 @@ abstract class SmartAsyncMediatorLiveData<T> : SmartUpdateMediatorLiveData<T>() GlobalScope.launch(IPC) { currentJob = coroutineContext[Job] loadDataAndPostValue(currentJob!!) // TODO ntmyren: generalize this command to the IPC dispatcher Binder.flushPendingCommands() jobRunning = false if (jobQueued) { jobQueued = false Loading src/com/android/permissioncontroller/permission/utils/AndroidUtils.kt +1 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ val Context.application: Application get() = when (this) { * The number of threads in the IPC thread pool. Set to the maximum number of binder threads allowed * to an app by the Android System. */ const val IPC_THREAD_POOL_COUNT = 16 const val IPC_THREAD_POOL_COUNT = 8 /** * A coroutine dispatcher with a fixed thread pool size, to be used for background tasks Loading Loading
src/com/android/permissioncontroller/permission/data/SmartAsyncMediatorLiveData.kt +3 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.permissioncontroller.permission.data import android.os.Binder import com.android.permissioncontroller.permission.utils.IPC import kotlinx.coroutines.Dispatchers.Main import kotlinx.coroutines.GlobalScope Loading Loading @@ -55,6 +56,8 @@ abstract class SmartAsyncMediatorLiveData<T> : SmartUpdateMediatorLiveData<T>() GlobalScope.launch(IPC) { currentJob = coroutineContext[Job] loadDataAndPostValue(currentJob!!) // TODO ntmyren: generalize this command to the IPC dispatcher Binder.flushPendingCommands() jobRunning = false if (jobQueued) { jobQueued = false Loading
src/com/android/permissioncontroller/permission/utils/AndroidUtils.kt +1 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ val Context.application: Application get() = when (this) { * The number of threads in the IPC thread pool. Set to the maximum number of binder threads allowed * to an app by the Android System. */ const val IPC_THREAD_POOL_COUNT = 16 const val IPC_THREAD_POOL_COUNT = 8 /** * A coroutine dispatcher with a fixed thread pool size, to be used for background tasks Loading