Commit Graph

44 Commits

Author SHA1 Message Date
Allen Su
8e7c93ec57 Rollback language source metrics
Punt to next release since AndroidMetricsCouncil has concern.

Bug: 284094665
Test: atest AppLocalePickerActivityTest
Change-Id: I9b1239a6e98f074456def43cdbb7deb0bcc1cc3c
2023-08-23 15:55:46 +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
Allen Su
e93f6cd9e6 [Panlingual]Log metrics for App's locale from the suggested
Bug: 258128535
Test: atest AppLocalePickerActivityTest
Change-Id: I007c0e76d8b88f08518ba2696d42bd1db194f5b7
2023-06-28 08:24:10 +00:00
Zoey Chen
e2a9ee2f35 [Panlingual] 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: 284480214
Test: local test
Change-Id: Ie8653536117a999bd420ccfce961b17fe9349d35
2023-05-30 05:42:42 +00:00
Allen Su
b77c13948d Implement LocaleNotification in Settings
Bug: 248514263
Test: atest LocaleListEditorTest
Change-Id: I8c5764997d1622f0885d5d32124a49759e585e42
2023-05-14 19:55:37 +00: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
Josh Hou
060ade395a Merge "Fix the security vulnerability issue in AppLocalePickerActivity" 2023-01-31 05:31:39 +00: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
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
tom hsu
6436a5aa6f [Pnalingual] Resolve code conflict.
Bug: 228292561
Test: local
Change-Id: Idc79694fdecf3ad64e93e2f353837fd7bbdde1ed
(cherry picked from commit aac21a59aa)
2022-04-06 11:07:22 +00:00
tom hsu
aac21a59aa [Pnalingual] Resolve code conflict.
Bug: 228292561
Test: local
Change-Id: Idc79694fdecf3ad64e93e2f353837fd7bbdde1ed
2022-04-06 10:31:34 +00:00
Tom Hsu
84f78bc493 Merge "Fix System language option missing and locale region missing issue" into tm-dev 2022-04-01 07:52:52 +00:00
Josh Hou
e32d422d3d [Panlingual] Fix the app language is shown incorrectly in the work profile
The root cause is that the context corresponding to the specified
profile Id is not correctly used when using LocaleManager to query the
app language.

Bug: 222769707
Test: Verify the issue by using the steps provided in the bug
Change-Id: Ic1f9e4cc9e90f5aecfa5e1094184aa63f3d94ffb
2022-04-01 13:00:47 +08:00
Calvin Pan
cfb04f4c35 Fix System language option missing and locale region missing issue
- Taking app package name into LocalePickerWithRegion
- Using toLanguageTag() instead of getLanguage() to prevent locale
 region missing

Bug: 226278910
Bug: 226280740
Change-Id: Ieac42616192065abc0cf82db023e4e50f1ca562d
Test: To be verified
(cherry picked from commit c117a89a53)
2022-04-01 04:31:44 +00:00
tom hsu
213b3ce4af [Panlingual] Improve and refactor revamped UI
- Remove useless file
 - Make Icon be able to scroll up and down

Bug: 226350483
Test: local test
Change-Id: I4564f432143e7e31ba5beff1dd32d7bc7764f9bf
(cherry picked from commit ded10f8e24)
Merged-In: I4564f432143e7e31ba5beff1dd32d7bc7764f9bf
2022-04-01 10:33:22 +08:00
danielwbhuang
963abde2dc [Panlingual] Handle onLocaleSelected.
1. When a new locale is selected, onLocaleSelected(...) will get the LocaleInfo.
2. Set LocaleList to LocaleManager for apps.
3. Check isSystemLocale().

Bug: 223090738
Test: local test pass
Change-Id: I20bc2e2349d0bad123661e0964a4e271dd319147
Merged-In: I20bc2e2349d0bad123661e0964a4e271dd319147
2022-03-31 18:05:04 +08:00
tom hsu
9be043e750 [Panlingual] Revamp the panlingual UI in Settings.
- Create a Activity to contain AppLocaleDetail and
    LocalePickerWithRegion
  - Update the Entry from apps language page

Bug: 223089715
Test: local test pass
Change-Id: Id01e93f3df32412c7323ca577a149009eb1862ad
Merged-In: Id01e93f3df32412c7323ca577a149009eb1862ad
2022-03-31 03:35:21 +00:00
Josh Hou
3550064e2e [Panlingual] Fix the app language is shown incorrectly in the work profile
The root cause is that the context corresponding to the specified
profile Id is not correctly used when using LocaleManager to query the
app language.

Bug: 222769707
Test: Verify the issue by using the steps provided in the bug
Change-Id: Ic1f9e4cc9e90f5aecfa5e1094184aa63f3d94ffb
2022-03-29 12:00:13 +08:00
tom hsu
ded10f8e24 [Panlingual] Improve and refactor revamped UI
- Remove useless file
 - Make Icon be able to scroll up and down

Bug: 226350483
Test: local test
Change-Id: I4564f432143e7e31ba5beff1dd32d7bc7764f9bf
2022-03-28 17:13:04 +08:00
TreeHugger Robot
b81c42d043 Merge "Fix System language option missing and locale region missing issue" 2022-03-23 18:16:07 +00:00
Calvin Pan
c117a89a53 Fix System language option missing and locale region missing issue
- Taking app package name into LocalePickerWithRegion
- Using toLanguageTag() instead of getLanguage() to prevent locale
 region missing

Bug: 226278910
Bug: 226280740
Change-Id: Ieac42616192065abc0cf82db023e4e50f1ca562d
Test: To be verified
2022-03-23 07:48:10 +00:00
danielwbhuang
817e168e37 [Panlingual][patch] Handle onLocaleSelected.
1. reference: https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/17157185/13/core/java/com/android/internal/app/LocaleStore.java#204
2. check isSystemLocale()

Bug: 223090738
Test: local test pass
Change-Id: I42fbd06495880698201831d947d28515fb674a5a
2022-03-22 18:42:13 +08:00
danielwbhuang
19859b63c9 [Panlingual] Handle onLocaleSelected.
1. When a new locale is selected, onLocaleSelected(...) will get the LocaleInfo.
2. Set LocaleList to LocaleManager for apps.

Bug: 223090738
Test: local test pass
Change-Id: I20bc2e2349d0bad123661e0964a4e271dd319147
2022-03-16 14:03:55 +08:00
tom hsu
6fc5bb64dc [Panlingual] Revamp the panlingual UI in Settings.
- Create a Activity to contain AppLocaleDetail and
    LocalePickerWithRegion
  - Update the Entry from apps language page

Bug: 223089715
Test: local test pass
Change-Id: Id01e93f3df32412c7323ca577a149009eb1862ad
2022-03-09 17:06:33 +08:00