Set a summary holder for initial preference at the biginning.
If there is no any permission granted, then set a string for it.
Test: Rebuild, visual
Fixes: 140783222
Change-Id: Ic5f2730123110bad5fbc08fcd22b1df564b8637d
To avoid a long permission summary, let's limit the number to three.
Fixes: 117978938
Test: robotests
Change-Id: Id83fac7ad91140b22757d3e6e8eb72d86ad6ad42
The mapping of permissions and permission groups may be changed upon
mainline module update, so we cannot reliably read from the platform.
PermissionControllerManager is created for this purpose, so we use it
to prevent from the outdated mapping instead of mapping them manually.
Bug: 117978938
Test: robotests
Change-Id: If8682796b8a30dee3b73572e977fade48d07eb2b
Since AppPermissionsPreferenceController assigns
a fixed preference key in constructor, so it can't
be used by same controller in Privacy page.
So, we change contructor directly, let controller
read preference key from xml file.
- Also remove unused imports.
Test: visual
Bug: 116628158
Change-Id: I42d6e978e91f0a2fe796d290cb9f34db596aa1f4
Currently in Settings we are using R.string.join_many_items_first, R.string.join_many_items_middle and R.string.join_many_items_last to manually join strings. The join code is messy and the joined string is incorrect in some languages, so we migrate all string join to just use ListFormatter.getInstance().format().
Bug: b/78248791
Test: robotests
Change-Id: I898339978e6e2027587e28994b0280fa46821fd6
Return CharSequence instead of String.
All user visible string should be modeled as CharSequence.
Bug: 73950519
Test: robotest
Change-Id: I30befef0c33f94351d4a2774e283bd1ed804aa8b
Adds dynamic summary getter in relevant BasePreferenceControllers.
Preferece controllers that don't have dynamic summaries or which
are not yet BasePreferenceControllers are not changed right now.
Change-Id: I435ccab7758d90515583fd8ca10a9b1ef0c858b9
Fixes: 71514936
Test: robotests
In the summary for Apps permissions, change the list of permissions
lable to lowercase instead.
Change-Id: I5b3133c33de7110dbec6ab179c6f1308c4ed481e
Fixes: 65049565
Test: make RunSettingsRoboTests
Check the granted permissions for the installed app and compose the
summary text to use the first 3 permissions granted from the list:
Location, Microphone, Camera, Sms, Contacts, and Phone.
Change-Id: I61d21f279af2fe86132de22b94e1a49da0225fcd
Fix: 36376411
Test: make RunSettingsRoboTests