[Panlingual] Improve performance of displaying app list in Settings.
- Use existed ApplicationInfo to get needed info. - Add unittest to AppLocaleUtil.java Bug: b/238054165 Bug: b/231904717 Test: Maunal test passed Test: atest passed Change-Id: I23f354c366b45d4b684184b3366aeab913bcd3c8
This commit is contained in:
@@ -69,7 +69,7 @@ private class AppLocalePresenter(
|
||||
ResolveInfoFlags.of(PackageManager.GET_META_DATA.toLong()),
|
||||
app.userId,
|
||||
)
|
||||
AppLocaleUtil.canDisplayLocaleUi(context, app.packageName, resolveInfos)
|
||||
AppLocaleUtil.canDisplayLocaleUi(context, app, resolveInfos)
|
||||
}
|
||||
|
||||
val summaryFlow = flow { emit(getSummary()) }
|
||||
|
@@ -58,7 +58,7 @@ class AppLanguagesListModel(private val context: Context) : AppListModel<AppLang
|
||||
appList.map { app ->
|
||||
AppLanguagesRecord(app,
|
||||
AppLocaleUtil.canDisplayLocaleUi(context,
|
||||
app.packageName, resolveInfos))
|
||||
app, resolveInfos))
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user