Commit Graph

108 Commits

Author SHA1 Message Date
Zoey Chen
cfaa13442c [Settings] UI part: Add metrics for language
Bug: 279915462
Test: atest
Change-Id: Ie13c57b2b398beb48dfe0ac289ec336483575445
2023-04-27 15:55:45 +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
Zoey Chen
5614c1e7dc Merge "[Settings] Remove the large space when searching language" into udc-dev 2023-04-19 05:19:56 +00:00
Zoey Chen
7026760615 [Settings] Remove the large space when searching language
Don't expand the tool bar when users search the language because they will see a large space on the top.

Bug: 254387685
Test: local test
Change-Id: I52fbf4be47885ea6c7d2b6abb75db99c1690edca
2023-04-18 17:20:42 +00:00
Zoey Chen
cd719845d6 Merge "[Settings] Fix the layout index" into udc-dev 2023-04-18 10:02:40 +00:00
Zoey Chen
e9f6efa2b6 [Settings] Fix the layout index
The index of language label's layout is 0 and index of num layout is 1, so the select tp speak will read the language label first.
The root cause of the incorrect index is, the language label's layout starts with the parent layout instead of the num layout in the hierarchy view. Adjust the language label's layout and add these views one by one in the parent view.

Also fix the layout's jumping when user switches the page to "Remove language"

Bug: 277173513
Test: local test
Change-Id: I0d5879a07183713fa50b38f6321a15dd32582518
2023-04-18 08:46:23 +00:00
Zoey Chen
5eecd86982 [Regional Pref] Add footer in Regional preference page
Bug: 277436632
Test: local test
Change-Id: I596f440696830374225d9b56fb8c4f0d5d5d5d61
2023-04-11 09:28:20 +00:00
Zoey Chen
4800801661 [i18n] Use Framelayout instead of Nest scroll
Bug: 274538667
Test: local test
Change-Id: I2a6917a639ac6ba987df425d8974f9d51487a41f
2023-04-07 16:34:47 +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
TreeHugger Robot
e2eb822266 Merge "Imporve UI of system langauge list" into udc-dev 2023-03-24 07:37:05 +00:00
Tom Hsu
db94f350cb Merge "Remove Numbering System preference if no corresponding locale." into udc-dev 2023-03-23 06:41:37 +00:00
tom hsu
881e8ac556 Remove Numbering System preference if no corresponding locale.
- If locale has no multiple numbering systems, it shall not
   show the locale on list.
 - If there is no locale with numberung system, remove the entry of
   numbering system preference on UI.

Bug: b/274053189
Test: atest passed
Test: Manual test passed
Change-Id: If61c7e233630644e2d6245c5efd75d15d52cf94b
2023-03-23 01:44:46 +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
Josh Hou
38df174bba [Panlingual] Can't set per-app languages for apps on work profile page
Use startActivityAsUser instead of startActivity API to start the AppLocalePickerActivity of different users

Bug: 274378136
Test: 1. Perform AppLocalePickerActivityTest robolectric test
      2. Perform the manual test by switching different users
      3. Perform the manual test by switching different profiles
Change-Id: I4405b3b7e832b71b9ef66fa71d9e42ce12da167c
2023-03-21 10:57:42 +00: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
d68e04ff04 [Regional Preference] Append unicode tags to new system language.
-When the user adds a new system language, this new language can not
 have the current unicode tags. Hence, it shall append current unicode tags to the new system language.

Bug: b/268025290
Test: Manual test passed.
Test: make RunSettingsRoboTests ROBOTEST_FILTER=LocaleListEditorTest
Change-Id: I76671908ad01dcb8b04714aa3ca44d3614a0428b
2023-02-14 12:20:57 +00:00
Tom Hsu
d3ff83eb4f Merge "[Regional Preferences] Remove u extension for subtitle of Language" 2023-02-10 03:57:51 +00:00
tom hsu
e2aeded3de [Regional Preferences] Remove u extension for subtitle of Language
- Remove the language tag info of subtitle in  Settings -> System -> Languages
 - Syuc same result to entry of numbering system.

Bug: b/268278327
Bug: b/268276472
Test: atest passed
Test: Manual test passed
Change-Id: I46dd0899059e9209b99f5ef3b7b84eb083d4e140
2023-02-09 18:05:01 +08:00
Mill Chen
e09177c081 Remove empty space when searching language list
Collasping the tool bar when search menu item is invoked.

Bug: 266383101
Test: visual test, open the page and the large empty space will be
collapsed when searching language list.

Change-Id: I6548d3d572082a66778cb27d9333dff760619dab
2023-02-03 16:30:44 +08:00
Josh Hou
060ade395a Merge "Fix the security vulnerability issue in AppLocalePickerActivity" 2023-01-31 05:31:39 +00:00
Tom Hsu
9b927d6e47 Merge "Pass viewable locales to LocalePickerWithRegion" 2023-01-19 03:40:46 +00: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
5342479f89 Pass viewable locales to LocalePickerWithRegion
Bug: b/249219775
Test: Manual test
Change-Id: I48f2f02a365d3597023e021a7819d31709e6d5d8
2023-01-18 12:52:41 +08:00
Josh Hou
ed9cbdea18 Fix the security vulnerability issue in AppLocalePickerActivity
Examine whether the packages is allowed to display app locales list when creating the AppLocalePickerActivity, and examine whether the target user is the same as the calling user.

Bug: 257954050
Test: Follows the test step listed in b/257954050#comment14
Change-Id: I2e25a308bcba6ea0edee89c7a78465f766bdbeac
2023-01-16 19:06:04 +08:00
xinghailu
897fd74731 Cleanup some plurals in Settings
Change <one> to <1> in string res file, and update related java files.
Test: Update, existing test still pass.
bug: 199230342

Change-Id: Idd0ba3c6adc060da21574d98f8ed765fae00cef8
2022-12-22 16:05:13 +08:00
Treehugger Robot
9040efdccc Merge "Fix errorprone warnings that should be errors" am: 5744d7c560 am: 7094507528 am: 778ef161bb
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2255054

Change-Id: I1f3cbce7d5de6e63477bc2da2ad115ec53b06472
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-01 00:02:10 +00:00
Cole Faust
43ff89802c Fix errorprone warnings that should be errors
This commit is part of a large scale change to fix errorprone
errors that have been downgraded to warnings in the android
source tree, so that they can be promoted to errors again.
The full list of changes include the following, but not all
will be present in any one individual commit:

BadAnnotationImplementation
BadShiftAmount
BanJNDI
BoxedPrimitiveEquality
ComparableType
ComplexBooleanConstant
CollectionToArraySafeParameter
ConditionalExpressionNumericPromotion
DangerousLiteralNull
DoubleBraceInitialization
DurationFrom
DurationTemporalUnit
EmptyTopLevelDeclaration
EqualsNull
EqualsReference
FormatString
FromTemporalAccessor
GetClassOnAnnotation
GetClassOnClass
HashtableContains
IdentityBinaryExpression
IdentityHashMapBoxing
InstantTemporalUnit
InvalidTimeZoneID
InvalidZoneId
IsInstanceIncompatibleType
JUnitParameterMethodNotFound
LockOnBoxedPrimitive
MathRoundIntLong
MislabeledAndroidString
MisusedDayOfYear
MissingSuperCall
MisusedWeekYear
ModifyingCollectionWithItself
NoCanIgnoreReturnValueOnClasses
NonRuntimeAnnotation
NullableOnContainingClass
NullTernary
OverridesJavaxInjectableMethod
ParcelableCreator
PeriodFrom
PreconditionsInvalidPlaceholder
ProtoBuilderReturnValueIgnored
ProtoFieldNullComparison
RandomModInteger
RectIntersectReturnValueIgnored
ReturnValueIgnored
SelfAssignment
SelfComparison
SelfEquals
SizeGreaterThanOrEqualsZero
StringBuilderInitWithChar
TreeToString
TryFailThrowable
UnnecessaryCheckNotNull
UnusedCollectionModifiedInPlace
XorPower

See https://errorprone.info/bugpatterns for more
information on the checks.

Bug: 253827323
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I29f691a22617b1fc834680ff1cf4ab4244203f06
2022-10-23 12:41:39 -07: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
039563f77d Merge "[Languages] Add new information to system language page." into tm-qpr-dev am: bd3c0da9e3 am: 7dfd2ade2f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19594790

Change-Id: Ia139b19e541ebc66ea0228417a4cefa06a4ce93d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-25 07:44:56 +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
Tom Hsu
ba372ce8b6 Merge "[Panlingual] Fix icon shall have work badage in work profile." into tm-dev am: 883f5e2572 am: 7a69cee691 am: ab7057cb7f am: e2506fcdfe
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18491260

Change-Id: Id8951b14544371e4883c7bc51aef7bc177f356bb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 18:08:15 +00:00
tom hsu
7e27ecb91e [Panlingual] Fix icon shall have work badage in work profile.
Bug: 233064114
Test: local
Change-Id: I8aa24373f0381b172c30d16aedb2f9ba97238234
2022-05-23 19:34:51 +08:00
Calvin Pan
54ceef1157 Merge "Add log for user language selection" into tm-dev am: a264bc2092 am: 3fa5781abf
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18350149

Change-Id: Iecbc20adb2ac4fb1b9d67509e5429e07fd1b3b89
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-13 10:27:04 +00:00
Calvin Pan
4d7776de7b Add log for user language selection
Bug: N/A
Change-Id: I74ff19816705ca5a822e84bda0917d0eced25b7b
2022-05-13 02:29:50 +00:00
Tom Hsu
7efb8f486b Merge "[Panlingual][Settings] Fix when tap search bar, will leave a big blank." into tm-dev am: d375456251 am: 9c9e5efeb0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18234987

Change-Id: I2f195373474d0ef50b2f9a3dc772bb40b6f01d5e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-11 20:36:45 +00:00
tom hsu
420404f9e3 [Panlingual][Settings] Fix when tap search bar, will leave a big blank.
- Close blank layout after title disappear when search bar is expanded.

Bug: b/227287277
Test: local, see b/227287277#6
Change-Id: I1a61bab9a046aa52e22c4ef2292c7ae703deab1e
2022-05-10 08:30:18 +00:00
Calvin Pan
b7f5d4063f Merge "Add unit test for AppLocalePickerActivity" into tm-dev am: 8ad2642b5f am: 215b87861a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17903006

Change-Id: I6066777568412a7a9746efcf4ea53020eca92497
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 21:19:25 +00:00
Calvin Pan
049aa73cb1 Add unit test for AppLocalePickerActivity
Bug: 223503670
Test: atest
Change-Id: I0e92be43d661dd3bff19c3274d1572ef1f4e9c46
2022-04-28 08:15:34 +00:00
Presubmit Automerger Backend
f2bdc7519e [automerge] [Panlingual] Fix settings's crash. 2p: 25dc3817a9 2p: d12e3daef6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17730681

Bug: 229044820
Change-Id: Ia572e4ee0a5e2cf1ab10082a969a76986343b53d
2022-04-13 06:57:36 +00:00
tom hsu
25dc3817a9 [Panlingual] Fix settings's crash.
- fix crash due to no listview.

Bug: 229044820
Test: local
Change-Id: Ic3a15f9cfd89ff24ce1d764417de4686e10d3008
2022-04-13 14:56:23 +08:00
tom hsu
3558492c55 [automerge] [Panlingual] Fix settings crash due to no content view. 2p: db1b6accac 2p: a7377878be
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17684392

Bug: 228563549
Change-Id: I0da02d0abc2eb416c05194748366b8b2e25fc607
2022-04-11 11:11:06 +00:00
tom hsu
db1b6accac [Panlingual] Fix settings crash due to no content view.
- Sometimes, listview may not created instantly, so move the action of
   addHeaderView after fragment finished the onResume;

Bug: 228563549
Test: local
Change-Id: Ie5d53c962bed35783decd374c743a168a98cbf6a
2022-04-11 19:10:18 +08:00
Josh Hou
ffa73fceeb Merge changes from topic "screen_title" into tm-mainline-prod am: 2808fd6a7e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17631064

Change-Id: Ia79431bb96fa13709352d6a0e13386a9ccf76d9f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-08 12:22:43 +00:00
Josh Hou
98490cc740 [Panlingual] Screen title is displayed incorrectly
Fix the issue that the screen title name of the app language page is displayed incorrectly

Bug: 227285277
Test: Verify the issue by testing between the system language and app
language page

Change-Id: I5dbb10763bd5cc346bff9c270b14b945eb499273
2022-04-07 14:02:22 +08:00
Tom Hsu
27b82ddc9b Merge changes from topic "presubmit-am-f6b1787fd0f3424db0a7a4bb5c8bd472" into tm-mainline-prod am: 94b0789323
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17615237

Change-Id: I94465169345e13cc62c5eeb2109a9bf989c18cb1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-07 03:04:03 +00:00
Tom Hsu
a9d7aae694 Merge "[Panlingual] Fix the back button press" into tm-dev 2022-04-07 02:52:23 +00:00
tom hsu
0ce8355c63 [automerge] [Panlingual] Fix the back button press 2p: c0214ff9f3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17615237

Bug: 226894999
Change-Id: I81b99b74f45acdd9f7073aea1d4f5bebd1cd13b1
2022-04-06 15:37:24 +00:00
tom hsu
c0214ff9f3 [Panlingual] Fix the back button press
Bug: 226894999
Test: local
Change-Id: I81e6408ebf2587bd023a13dbbdfa97e38efd8c31
2022-04-06 23:28:17 +08:00
tom hsu
072510b144 [automerge] [Panlingual] Fix settings crash from rotation. 2p: 19bd21d96c 2p: d36ff21fb1
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17615231

Bug: 228126890
Change-Id: I98aa625c53af24db93a5388e77714e01deeb56bd
2022-04-06 11:34:07 +00:00
tom hsu
19bd21d96c [Panlingual] Fix settings crash from rotation.
- View may not create in time when add view of fragment.

Bug: 228126890
Test: local test.
Change-Id: Idce63dc9d39de09ff1ee684881ea6cb90637ee22
2022-04-06 19:32:36 +08:00