Query search against application package name in addition to label.#958
Query search against application package name in addition to label.#958CepGamer wants to merge 1 commit intoMM2-0:mainfrom
Conversation
…ell as label to help with i18n.
| } else { | ||
| appResults.addAll(apps.filter { | ||
| matches(it.label, query) | ||
| matches(it.label, query) || matches(it.componentName.packageName.split('.').last(), query) |
There was a problem hiding this comment.
Because of all the com prefixes and company names, e.g. thus any com search queries will break.
I'm thinking about using English (or default) label instead by loading context, what do you think? Although non-English apps may not be indexed, however in that situation it may not be a problem
There was a problem hiding this comment.
Package names in general are pretty inconsistent (this is the reason I don't use them already). Loading the English label is certainly the better approach, as long as you cache the English label (just add an internal field to LauncherApp and store it alongside the app)
There was a problem hiding this comment.
Sorry for late response, but tinkering around with it it looks like loading Context with different locale config doesn't actually load different labels for apps, since it's being handled by PackageManager.getText which, as I understand, is manufacturer dependent. I'll see if I can retrieve it from adb/manifest somehow, but it looks like package name is the way to go
| Is it possible to make the shortcuts on original desktop searchable and selectable? |
AFAIK the new shortcuts should represent 1 to 1 mapping in Kvaesitso launcher. Can you please elaborate and/or provide example? |
When searching apps, compare query against the original app name as well as label to help with i18n. For example, Google suite apps, such as Google Maps, have localised labels in different languages. Google Maps name in Russian is
Карты, which cause it to not be shown when querying formap. Current behaviour:Expected behaviour (after this pull request):
