Eagerly load PackageInfo to avoid flaky

Bug: 314562958
Test: manual - All apps > app detail
Change-Id: Ic225818299f5b38e2a94020a04fccc4005f95158
This commit is contained in:
Chaohui Wang
2023-12-04 20:11:30 +08:00
parent 77c2a331fb
commit 5e85aa3b07

View File

@@ -77,7 +77,7 @@ class PackageInfoPresenter(
userHandle = userHandle,
),
).map { getPackageInfo() }
.stateIn(coroutineScope + Dispatchers.Default, SharingStarted.WhileSubscribed(), null)
.stateIn(coroutineScope + Dispatchers.Default, SharingStarted.Eagerly, null)
/**
* Detects the package fully removed event, and close the current page.