[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:
@@ -55,8 +55,7 @@ public class AppStateLocaleBridge extends AppStateBaseBridge {
|
||||
AppInfoByProfiles appInfoByProfiles = getAppInfo(UserHandle.getUserId(uid));
|
||||
|
||||
app.extraInfo = AppLocaleUtil.canDisplayLocaleUi(appInfoByProfiles.mContextAsUser,
|
||||
app.info.packageName,
|
||||
appInfoByProfiles.mListInfos) ? Boolean.TRUE : Boolean.FALSE;
|
||||
app.info, appInfoByProfiles.mListInfos) ? Boolean.TRUE : Boolean.FALSE;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -67,8 +66,7 @@ public class AppStateLocaleBridge extends AppStateBaseBridge {
|
||||
AppInfoByProfiles appInfoByProfiles = getAppInfo(UserHandle.getUserId(app.info.uid));
|
||||
|
||||
app.extraInfo = AppLocaleUtil.canDisplayLocaleUi(appInfoByProfiles.mContextAsUser,
|
||||
app.info.packageName,
|
||||
appInfoByProfiles.mListInfos) ? Boolean.TRUE : Boolean.FALSE;
|
||||
app.info, appInfoByProfiles.mListInfos) ? Boolean.TRUE : Boolean.FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user