Commit Graph

40 Commits

Author SHA1 Message Date
Josh Hou
3c38a12347 Aggregation checkbox and locale text
Refer to other settings with the checkbox to read the checkbox and corresponding text together, such as "Erase SIMs" or "Show password" in WiFi settings.

Bug: 288223637
Bug: 317927064
Test: Perform some accessibility test like TalkBack and Select to Speak
Change-Id: I571fe3f2f8d7b6b4f4c7b5804d0217a2a2b97757
2024-03-26 03:19:19 +00:00
Allen Su
d8695cbf9b Remove the xml entry when the system language is removed
Bug: 301395074
Test: atest SettingsRoboTests:com.android.settings.localepicker
Change-Id: Ic771cd5146ab954c3da65748bf87cd14d30770b4
2024-01-03 07:27:52 +00:00
Zoey Chen
a76af961b2 [Regional Preference] Remove string from metrics
Bug: 296544040
Test: atest NumberingSystemItemControllerTest
Change-Id: I1e1dd678011a15bc22b167ddd12651a22f62dea9
2023-11-21 06:19:01 +00:00
Treehugger Robot
34bca0fc59 Merge "[Panlingual] Only set description for STS and TB in remove mode" into main 2023-11-09 05:49:11 +00:00
Zoey Chen
192d379ace [Panlingual] Only set description for STS and TB in remove mode
Bug: 301715723
Test: manual
Change-Id: I09403830cad362b4f839645f645cf620e33047fa
2023-11-09 04:33:31 +00:00
Zoey Chen
026dfe0aa0 Revert "[Regional Preference] Need to remove the metrics by the metrics concil"
This reverts commit ae32c8e8a5.

Reason for revert: <Add metrics>

Change-Id: I85631130b975df18e7f4f6056bae7f13cf56008f
2023-11-01 07:52:57 +00:00
Zoey Chen
ae32c8e8a5 [Regional Preference] Need to remove the metrics by the metrics concil
team's comment.

Bug: 296544040
Test: manual
Change-Id: I8eecba55288bfad6f81b5c8c1a8290afccdd5ef8
2023-08-23 05:40:45 +00:00
Chaohui Wang
8e2ae547d6 Clean up FeatureFactory.getFeature()
Bug: 286764889
Test: m Settings
Change-Id: I7e472e6b0ca6b7a735c1b92742ddf06c545176fc
2023-08-08 08:41:48 +00:00
Zoey Chen
0f70d8d690 [Regional Preference] Add description for checked/not checked
Bug: 288223637
Test: make RunSettingsRoboTests -j128 ROBOTEST_FILTER=LocaleListEditorTest
Change-Id: I0d1a2de93ad2911c555acef2f4e00cd715c62f17
2023-08-03 04:46:41 +00:00
Zoey Chen
4900bcfa5c [Language] Should show confirm dialog when deleting the system language
and making the second language automatically become the system language

Bug: 286508825
Test: make RunSettingsRoboTests -j128 ROBOTEST_FILTER=LocaleListEditorTest
Change-Id: I556eecc9eec1ddcdb8947d5ba69d0db2c016e33c
2023-07-14 16:06:40 +00:00
Zoey Chen
6358f613cf [Panlingual] Change the metric's string in Languages
Bug: 279915462
Test: manual
Change-Id: I8e59f9acb068640da64d2a29cc6074b388994554
2023-06-30 02:59:10 +00:00
Zoey Chen
dab8f53e9b [Panlingual] Add metric in Languages
Bug: 279915462
Test: manual
Change-Id: I12dc7f8a0c594de88790e116c4b4f7ca9dc7253e
2023-06-27 15:40:36 +00:00
Zoey Chen
fb6b6b0bcc [Panlingual] Do not show dialog in recycle. Set LocaleEditor as the
parent fragment and control the dialog.

Keep the dialog and the locale list after rotation

Bug: 279527362
Change-Id: I349fd9d0fea5b43a8bbb2a23fa60fc4c5436c5cf
Test: make RunSettingsRoboTests -j128 ROBOTEST_FILTER=LocaleListEditorTest
Test: atest LocaleDialogFragmentTest
2023-05-12 02:40:13 +00:00
Zoey Chen
cec01e38ef [Regional Preference] Do not get child fragment if the fragment is not
added

Bug: 279376395
Test: local test
Change-Id: I352597dedf2ba7770936d44d09aa111762f94502
2023-04-24 12:38:43 +00:00
tom hsu
7a9202587e Improve dialog and system dialog UI
- Fix wrong subtitle on system language list.
 - Do not dismiss dialog if user touch outside of dialog.

Bug: b/276417170
Test: Manual test.

Change-Id: Ib049dc3d89e6afc7d39171ac686616cc64dae3ba
2023-03-31 18:18:16 +08:00
tom hsu
99037a8bf8 Imporve UI of system langauge list
Bug: b/274721595
Test: Manual test
Change-Id: I951de80de4ac40df48829d3f23c0f1c8d98e0137
2023-03-23 00:34:49 +08:00
tom hsu
04eae5cc60 Add confirmation dialog for system locale change.
Bug: b/243511340
Test: atest passed.
Change-Id: I7ef4ed4557a1064d078e49a372f11a573b81058a
2023-03-06 16:01:27 +08:00
tom hsu
f33ac498c2 [Languages] Add new information to system language page.
- Add top Intro preference
 - Add footer preference
 - Add sub string to language picker
 - Modify title of app locale pages

Bug: 242182598 Add information to system language page.
Bug: 241600418 [Panlingual] Change strings on App languages
Test: Maunal test
Change-Id: I9bca8911e8e70c97c273294b3c9d1d73d4ea0cb2
2023-01-18 15:22:27 +08:00
Tom Hsu
2f753c7ba7 Revert "[Languages] Add new information to system language page."
This reverts commit 3cbb6f8680.

Reason for revert: b/248456615

Bug: b/248456615
Test: Manual test pass

Change-Id: I3bc5088784ed97f69ffadb0ea69078bfcf7dc39d
2022-09-29 04:01:03 +00:00
tom hsu
3cbb6f8680 [Languages] Add new information to system language page.
- Add top Intro preference
 - Add footer preference
 - Add sub string to language picker
 - Modify title of app locale pages

Bug: 242182598 Add information to system language page.
Bug: 241600418 [Panlingual] Change strings on App languages
Test: Maunal test
Change-Id: I9bca8911e8e70c97c273294b3c9d1d73d4ea0cb2
2022-08-24 11:04:24 +08:00
Edgar Wang
3b47408016 Refine remove locale warning dialog string
- If the first language is not selected, just remove the body copy
  else warning user the locale will change to another language.

Fixes: 140723349
Test: manual & robotest
Change-Id: I9fec17ae85889f2864c3f3cae744f7181e6f9b2c
2020-03-13 12:49:21 +08:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
Fan Zhang
2f4355aa66 Misc cleanup on AndroidManifest.xml
- Add a few activities to widget list. These are more commonly
  used settings, so adding them to widget list for easier access.
  - Storage
  - System
  - About phone

- Remove useless intent-filters from AndroidManifest.
  - If the intent-filter is just action MAIN and category DEFAULT, it
   doesn't do anything.

Bug: 74806595
Test: visual
Change-Id: I5d80bc6c88f7bf60adabac872e92b72b341b97e6
2018-06-21 16:57:41 -07:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Jacky Wang
e462c0ab72 Not all selected languages are deleted in language preferences
Bug: 67883179
Change-Id: I650084cc3fceb82c874e8e8e36bf5182da183f2b
Fixes: 67883179
Test: manual test by following the reproduce steps
Test: verify the issue is fixed
2018-03-12 05:25:46 +00:00
Fan Zhang
409eab14de Fix shortcut icon in launcher
When building icon for shortcut, check if the icon is LayerDrawable.
- If yes, only take the second layer (foreground).

Also move the class to shortcut package

Change-Id: I3513dbeb6509f11aa70ab3230d441e268ca9356d
Fixes: 72553870
Test: atest
2018-01-29 11:39:48 -08:00
Christine Franks
91dad044cb Support DISALLOW_CONFIG_LOCALE user restriction
Bug: 67586452
Test: make ROBOTEST_FILTER="(LocaleListEditorTest)" RunSettingsRoboTests\
&& make cts && cts-tradefed run cts-dev -m DevicePolicyManager \
-t com.android.cts.devicepolicy.UserRestrictionsTest

Change-Id: I2260b106a111078a62ae7628d6f60e976b70069c
2017-11-09 23:57:03 +00:00
Sunny Goyal
9a6b675096 Updating CreateShortcut activity to use the new ShortcutManager APIs
for creating shortcuts

Test:  adb shell am instrument -e class com.android.settings.CreateShortcutTest \
 -w com.android.settings.tests/android.support.test.runner.AndroidJUnitRunner

Change-Id: I09fb73ae2a0687a3269f3714bdb2c5d92c99ea87
2017-01-19 13:39:13 -08:00
Yohei Yukawa
1ef9c4afd5 Follow class package change: LocaleList
In order to avoid layering violation, LocaleList needs to be moved from
android.util package to android.os package [1].  This CL follows up that
package change.

No behavior change is intended.

 [1]: Ia8de2ee9df3dd0a42b1fe84574439519b680fe18

Bug: 28819696
Change-Id: Ibd7934b30062046830d63f33d1c6febef32da976
2016-05-17 16:25:39 -07:00
Mihai Nita
2c2e435ff2 Fix: accessibility actions move languages but don't update
Also added a comment in onItemMove explaining why that method
does not call doTheUpdate().

Bug: 28173358
Change-Id: Ifdc00e70346149aeb09bd95ec21c7df2ccbaa996
2016-04-26 09:02:11 -07:00
Mihai Nita
8e7c75986e Add accessibility actions to the drag-and-drop locale list
Dragging is not supported neither by TalkBack or the accessibility
framework at the moment. So we need custom actions to be able
to change the order of the locales.

Also, the remove functionality is difficult to discover and use
with TalkBack only, so we are also adding a "remove" action.

It only removes one locale at the time, but most users don't
really add many locales "by mistake", so there is no real need
to delete a lot of locales at once.

Bug: 28173358
Change-Id: I3566304e3d2de87cf9243d7e87631b12d72fc929
2016-04-21 17:09:51 -07:00
Mihai Nita
d86cba770d Settings: change the TTS text to use the current locale
Google TTS currently does not support language auto-switching.
Also, not all languages are available in TTS at all times.
This means that TTS cannot properly handle text in other languages / scripts
than the current language.
Languages with different scripts would not be read at all, and the others
would be read with "bad pronunciation", to the point of being unrecognizable.

This change is not a full fix, but makes things slightly better by using
the default locale for the contentDescription in the language / region lists.

This might be a bit unsettling, as the label will not match the sound.
The label will show "Deutsch" or "Русский" and text-to-speech will say "German"
or "Russian" (for English UI), or "Allemand" or "Russe" (if the UI is French).
Might also say nothing, if the current UI language has no text-to-speech engine.

But this is the best we can do, and better that what we get if we do nothing.

Bug: 28087937
Change-Id: I54d49ec96a10bab3e31198e162230fb277426e66
2016-04-19 09:25:58 -07:00
Mihai Nita
930176b131 Fix checkboxes and warning dialog lost when device rotates
The frame is destroyed then the device rotates, so we need
to save and restore the complete status (remove mode or not,
list of checked locales, if the warning dialog it showing).

Bug: 26720315
Bug: 26758726
Change-Id: Ie1340d3242cb61dc736a0b456224b8570826e937
2016-04-14 20:33:56 -07:00
Mihai Nita
5a7ce50e19 Fix locale reorder jank
Using RecyclerView.ItemAnimator.ItemAnimatorFinishedListener
to only update the locales when all the animations finished.
This also reduces the number of repeated updates if the
locale list did not actually changed.

This was tested by setting the duration of animations to 3 seconds,
which made it possible to "shuffle" the list a lot and see several
items slowly moving around in the same time.

Bug: 26710681
Change-Id: I7d025e60cc252f4b90006b7b18c86d93ab94826f
2016-03-23 12:21:31 -07:00
Mihai Nita
7751358ab6 Hide "Remove" menu & the drag handle when there's just one locale
When there's just one locale, showing the "Remove" menu and the
drag handle is confusing to the user since nothing can happen if
they try to use them: the drag simply won't happen, and if they
go through the delete process, we give them an error.

Bug: 26730336
Change-Id: Ie219dd9b3d653272b325d7af01aba205a58cd472
2016-03-08 14:47:46 -08:00
Mihai Nita
a475fb1e06 Fix various UX bugs.
* In the drag & drop list align numbers with the + in
  the "+ Add a language" button
* Keep the "+ Add a language" button under the list
* Shadow cell while drag & drop
* Updated various strings for dialog titles and messages

Bug: 26557242
Bug: 26710677
Bug: 26712004
Bug: 27070104
Change-Id: I10d26eac9581c955328e667d7309b5f0ac649110
2016-02-23 13:21:21 -08:00
Mihai Nita
7f78a4b723 UX fixes for the language draggable cell
This should bring things closer to the recommended UX guidelines.

It changes the way the checkbox / label play together,
and changes the "localization missing" warning icon to a string.
Also some cleanup of hard-coded styles and sizes.

Bug: 26758865
Bug: 26707846
Change-Id: I07a78a1e4a41122b91e895e363a217d3e9cacd40
2016-02-10 21:46:13 +00:00
Mihai Nita
e7f40be0ef Locale list: format the numbers using the UI locale
The digits used for numbering the drag-and-drop locale list should
use a locale-aware formatter.
We will not see decimal or thousand separators, but the visible
difference is in the use of native digits. Example: Arabic.

Change-Id: I3f8cd5a3adea1cb88ae63f09711c728f4588020c
2016-02-04 13:16:05 -08:00
Mihai Nita
d7d48fda53 Implement multiple locales and sublocales in Settings
Does drag-and-drop reordering, supports adding / removing locales,
suggestions, search, removes locales already selected in the
user preferences.

Bug: 25800339
Change-Id: Iffe7b9810c77ec93a84d848ab20b2ba405249676
2016-01-20 12:31:11 -08:00