Commit Graph

75 Commits

Author SHA1 Message Date
Arc Wang
12d4b78473 Merge "Extend SearchView width" into tm-qpr-dev am: 049deec9b5 am: 4cfe8b8204
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20337665

Change-Id: I7a3bdcfa520fe402da940e426a89b3ffd2c2b1e5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-02 08:41:11 +00:00
Arc Wang
4cfe8b8204 Merge "Extend SearchView width" into tm-qpr-dev am: 049deec9b5
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20337665

Change-Id: I2f7807561257dc18be802f0acc90cce56ca71b98
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-02 08:07:13 +00:00
Arc Wang
0243771025 Extend SearchView width
To align SearchView x button with right border.

Bug: 254403811
Test: manual,
      Settings > Apps > See all apps > tap the search icon >
      input something and observe.
Change-Id: I5146c9ffb3c5177926e75f673497408092f6c065
2022-11-01 10:26:17 +00:00
Sunny Shao
151a088094 Fix the header can't be scrolling problem in landscape mode
- Settings header is restricted scrolling by this ag/15029686
- To void some pages can't show the contain part while heading unscrolling.
  We allow the header can be scrolling in the landscape mode.

Fixes: 207353353
Test: make RunSettingsRoboTests -j
Change-Id: Ice97c6244716d4768167feb78588807d13b06a94
2022-08-11 15:33:45 +08:00
Neil Fuller
6a44151bc1 Merge "Capitalize TZ display name strings" 2022-05-03 19:22:03 +00:00
Victor Chang
20e9b76818 Titlecasing time zone summary
Additional fix:
1. Fixed the SpannableUtil.getResourcesText to actually
preserve Spannable (TtsSpan in this use case)  during formatting.

Bug: 185453652
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.datetime.timezone
Change-Id: Iae5e1d4261ec0a34222ae1d042c7f3f027f2e512
2022-04-29 17:06:46 +01:00
Neil Fuller
e7fd120d8e Capitalize TZ display name strings
Capitalize Settings UI time zone display name strings for languanges
like Polish for standalone locations like summaries and lists. The
motivating example case is the string for "Coordinated Universal Time"
in Polish, which is not capitalized in CLDR, as they capitalize for the
middle of sentences by default. In English, Coordinated Universal Time
is already capitalized, but the Polish string is not.

With this commit all "display name"-like strings have been capitalized
(region names, exemplar locations, time zone names like
"Coordinated Universal Time" and "British Summer Time") for
completeness. For the Polish case, many are already capitalized, but
capitalizing the first letter is therefore a no-op. The
"GMT+xx:xx"-style strings have not been changed.

Bug: 190109975
Test: Visual inspection in English and Polish of UTC, United States,
Russia in the time zone picker and the date & time screen on mobile

Change-Id: I57d915ac1e30e22cc05e605fcb7d46b102fa8ce1
2022-04-05 15:51:05 +01:00
vichang
e6bf1a83d8 Merge "Replace @CorePlatformApi APIs usages in TimeZoneInfoPreferenceControllerTest" am: 3166166bdd
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1831314

Change-Id: I458bf767bbea8b5921f00afae884d309d270f7b0
2021-09-21 10:52:53 +00:00
vichang
3166166bdd Merge "Replace @CorePlatformApi APIs usages in TimeZoneInfoPreferenceControllerTest" 2021-09-21 10:42:27 +00:00
Victor Chang
fc4589448b Replace @CorePlatformApi APIs usages in TimeZoneInfoPreferenceControllerTest
The time zone transitions can be obtained via the public API
ZoneId.getRules() instead.

Bug: 119751170
Test: atest SettingsRoboTests
     com.android.settings.datetime.timezone.TimeZoneInfoPreferenceControllerTest passes
Change-Id: I2c7864580b2a36b725ee250253e97f6cc86d72a4
2021-09-20 15:57:42 +01:00
Neil Fuller
d2eca211d4 Merge "Swap ownership to mingaleev@" am: f6fe44dc91
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1824113

Change-Id: I9be5d173953df0a90ee1309feceed35f9240c18c
2021-09-13 11:17:50 +00:00
Neil Fuller
b46adff0f4 Swap ownership to mingaleev@
BUG=189810551

Change-Id: I6304545540947d6695117753309c80b27cf2669a
2021-09-10 12:20:39 +00:00
Tsung-Mao Fang
232b3ac12a Disable the scrollable ability on app bar area
As title, we do not allow user can scroll app bar while
the search menu is expanding.
So, we can ignore all drag events on app bar.

Test: Can not scroll on the app bar area
Fix: 181741353
Change-Id: I20c0b69059cdc4d13a15abd810a725d4591f6396
2021-06-17 19:29:25 +08:00
Tsung-Mao Fang
11c4b2c51e Remove the large space when searching region list
Collapse the tool bar when we're doing search for
a better user experience.
And we don't allow user can expand the tool bar at this moment
since it will see a large space at this moment.

Fix: 181741353
Test: Open the page and don't see a huge space now.
Change-Id: Iec5ebe9b22a2aad15dc8cf90113a64c358ee447e
2021-06-08 11:44:38 +00:00
Almaz Mingaleev
3be24f4ab2 Move MIN_USE_DATE_OF_TIMEZONE to TimeUtils.
That timestamp is used in two places for the same purpose.

Bug: 155738410
Test: presubmit
Change-Id: Ia6836fd34c63aef6e335ef97922d34a60dbf3703
2021-04-06 14:10:05 +01:00
Almaz Mingaleev
dd2a685756 Allow alternative time zone ID to be set device's zone.
If America/Godthab is set as device time zone, display it as if
America/Nuuk is chosen.
If time zone is known, but is not an alternative and not shown
in time zone picker, region will de derived from user's locale.

Bug: 155738410
Test: atest com.android.settings.datetime.timezone.model
Test: set persist.sys.timezone via adb and checked
Date & Time screen

Change-Id: I168fb4319e144dbe9e2496d06a681d4c09b411c0
2021-03-29 11:18:57 +01:00
vichang
bc7f639e15 Merge "Move libcore.timezone to the i18n module - Final part" am: 268371c44e am: 7485036f53
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1348663

Change-Id: I8e81b3d707bce016006bf0af1f75785ecd15648e
2020-07-02 10:50:06 +00:00
Victor Chang
b07e53c1c8 Move libcore.timezone to the i18n module - Final part
Bug: 141747409
Test: atest CtsLibcoreTestCases  CtsLibcoreTestCases
Change-Id: I48a1f383403a553639f525ef92996292fab84c5e
2020-06-30 14:35:09 +01:00
Neil Fuller
6bcbd8ed89 Merge "Fix missing zone strings in some cases" am: 738df11447 am: 6a19fdf877
Change-Id: Id54f91141814eb0f1adda28f9ec72b48f434c997
2020-04-29 12:45:01 +00:00
Neil Fuller
eafec7a244 Fix missing zone strings in some cases
ICU's TimeZoneNames requires a "canonical" zone ID, otherwise it will
return no data. Usually the ID being used is the same as the canonical
ID so there's no problem. TZDB version 2020a switched the ID of one of
Greenland's zones from America/Godthab to America/Nuuk, and ICU/CLDR
hold their translation data against America/Godthab in the current
version of ICU on Android.

Bug: 155167041
Test: Manual - viewed settings on a device with the tzdb 2020a update
Change-Id: Ia89c777a832f8b41c8d56d3327a9b7370ba44b52
2020-04-29 10:16:19 +01:00
Tobias Thierer
f5b13fe3b1 Merge "OWNERS: Remove tobiast." am: dffcd7a949 am: 21b01bc4f2
Change-Id: Ie2a65cdd33e7922685153fcb1eb17791fcf562a6
2020-03-27 11:51:34 +00:00
Tobias Thierer
a854ddae3d OWNERS: Remove tobiast.
Test: Manual CL review only.
Bug: 152399425
Change-Id: Ifca2d6e8ecd59a924c6e5d8ca60749be5d5c8728
2020-03-26 12:17:00 +00:00
Automerger Merge Worker
de86f9c950 Merge "Tidy up libcore.timezone APIs" am: 45834d96a8 am: 35ffa52384 am: 798407a441
Change-Id: I486df8f44bcd67baf933853145f7617cf6b0e891
2020-01-31 16:32:04 +00:00
Neil Fuller
7b54a31132 Tidy up libcore.timezone APIs
Tidy up the libcore.timezone APIs to make them as close as possible to
android.timezone. In future, these classes should be repackages to be
the actual android.timezone classes, so the APIs need to be in sync.

Bug: 148086409
Test: treehugger
Change-Id: I8d0521467bb3c3c8741ce98f50cde0ee8c1bec1a
2020-01-28 15:08:31 +00:00
Stanley Wang
f0cd9742b5 The dynamic index implementation for time zone preferences.
Disable the region settings page if auto time zone is enabled.

Fixes: 146849126
Test: manual
Change-Id: Icce1e5aca14539d6c9149e05a3321429bd337f17
2019-12-30 12:46:32 +08:00
Edgar Wang
08f2a58459 Settings search - Navigate user to exact page
- remove duplicate index preference
- default set searchable = false when the preference has fragment
- make some fragments indexable

Bug: 143057584
Test: robotest & manual

Change-Id: I4d64f6106d2f92f0a45e8c7e26388677f593f412
2019-12-24 21:04:11 +08:00
Neil Fuller
dc2058e931 Merge "Switch settings to use TimeDetector" am: 5da6521458 am: 72ed7e8f64
am: 5f1c405f30

Change-Id: Iaf7c3fb33f57ada39a8baef016fbc838f633be14
2019-12-05 09:17:42 -08:00
Neil Fuller
df086ecb4f Switch settings to use TimeDetector
Switch settings to use TimeZoneDetector when setting the system time
zone rather than using AlarmManager directly.

Bug: 140712361
Test: treehugger
Test: manual
Test: make -j30 RunSettingsRoboTests
Change-Id: I6042093294ba9690d4355bfe1c47d9f88a2b7ac6
2019-12-04 13:43:58 +00:00
Raff Tsai
29c15273b5 Fix Weird floating "add language" item
- Base theme has android:clipToPadding=false attribute. It let user
UI draw under navigation bar but also cause this problem. Add
android:clipToPadding=true in layout to fix the problem.

Fixes: 142108980
Test: manual
Change-Id: Ibe60b348a3c7c01d9786612ceac23a47a78a208a
2019-11-04 17:34:02 +08:00
Neil Fuller
78a7facc02 Merge "Add tobiast@ to the OWNERS file" am: a931693721 am: 46e53e770c am: bf673318f1
am: e13cd91161

Change-Id: I3cc978431a8fe0e01522e12842c44b0d99b135a8
2019-07-02 17:36:47 -07:00
Neil Fuller
46e53e770c Merge "Add tobiast@ to the OWNERS file"
am: a931693721

Change-Id: Id52f2dcd3755f4fbbd6f6918e993063aebc582ac
2019-07-02 10:13:36 -07:00
Neil Fuller
ca6542843c Add tobiast@ to the OWNERS file
Add tobiast@ to the OWNERS file as libcore TL.
Remove pszczepaniak@ as he hasn't been on libcore
for a while.

Test: None
Change-Id: I714d3448ed60006cb58a0f49e95b7b834a6aac36
2019-07-02 10:55:50 +01:00
tmfang
24c3324268 Use FooterPreference in xml explicitly
We don't rely on FooterPreferenceMixinCompat
to create footer preference in dashboard fragment.

Instead, declare a FooterPreference explicitly in
xml of screen.

It makes more sense for our referenceController design.

Test: visual, robotest
Bug: 124129485
Change-Id: I0b0c0f9e38d85aa89b815ce2b84ddff30a1d206b
2019-06-13 18:29:37 +08:00
Fan Zhang
5d2e0fc10f Stop using framework internal layout for timezone header.
The framework version header has deviated from supportlib version long
ago, and we shouldn't hack our theme to make this layout work. Instead
we now have a custom layout compatible to settings theme.

Fixes: 128833223
Test: visual
Change-Id: I83087352240de183b0639daf844bd7f90e02056a
2019-03-19 10:17:46 -07:00
Neil Fuller
9b6fa3a4e1 Merge "Update the timestamp used for time zone filtering" am: 51376aefc1 am: d2b3df945c
am: 641ea6e4fa

Change-Id: I665c8d444e1eb58664e2884d371e21aae625f6fe
2019-02-27 11:20:47 -08:00
Neil Fuller
d0e076192e Update the timestamp used for time zone filtering
Update the timestamp used for time zone filtering and improve the
comment explaining what it is for.

Bug: 124756276
Test: build only
Change-Id: I2e53b1f3bd36602f8d08967e1335066d93ae05ea
2019-02-27 15:02:03 +00:00
Nikita Iashchenko
8db2d30fab Fix crash if timezone is changed and "Don't keep activities" mode is on
The issues is that TimeZoneData is being loaded with LoaderManager on
every fragment's onCreate(). At the same time this fragment has
onActivityResult() handler that accesses TimeZoneData and relies on the
fact that it has been already initialized prior this call. So when you
enable "Don't keep activities" mode, the TimeZoneSettings fragment [1]
that holds TimeZoneData is immediately destroyed after launching time zone
picker fragment [2] (which result [1] waits for), and when android calls
onActivityResult() for [1] (after time zone has been picked in [2]),
Android has to recreate [1] from scratch. So you get onCreate() called and
immidiately after that onActivityResult() called, and at this point we get
the crash, because the loader hasn't finished yet and onActivityResult()
tries to access uninitialized mTimeZoneData.

This CL fixes this crash issue by postponing
mTimeZoneData.lookupCountryTimeZones call until mTimeZoneData is loaded
by loader. It is done through saving data intent in onActivityResult()
and calling onZonePickerRequestResult() when time zone data is loaded.

Bug: 112351583
Test: m Settings droid successfully builds, manual testing with "Don't
keep activities" mode enabled

Change-Id: Id30d36dc17a0de96ba871f9d0f4a2686479d0eeb
2019-01-29 15:22:56 +00:00
Fan Zhang
31b210017b Migrate all MetricsProto enums to SettingsEnums
Bug: 122855168
Test: rebuild
Change-Id: I962d9a71179f86b7cae9dc5e9a00e0aa1557dc76
2019-01-17 14:55:42 -08:00
Neil Fuller
17f04b66b2 Track move of timezone classes to libcore.timezone
Some time zone related libcore classes are moving from
libcore.util to libcore.timezone.

Bug: 119026403
Test: build only
Merged-In: I920411dfa7e000a0da9678826a035e0461211619
Change-Id: I920411dfa7e000a0da9678826a035e0461211619
(cherry picked from commit 1e1961a5b3)
2018-11-22 10:05:12 +00:00
Neil Fuller
1e1961a5b3 Track move of timezone classes to libcore.timezone
Some time zone related libcore classes are moving from
libcore.util to libcore.timezone.

Bug: 119026403
Test: build only
Change-Id: I920411dfa7e000a0da9678826a035e0461211619
2018-11-20 10:52:52 +00:00
Neil Fuller
5b88d6e6ba Merge "Use ICU APIs not impl types" am: 811d817368 am: 09dcb87982
am: ccef9d9dc2

Change-Id: I302247aa892e018e58b6742f55d30c971a4f77f3
2018-10-02 06:29:44 -07:00
Neil Fuller
09dcb87982 Merge "Use ICU APIs not impl types"
am: 811d817368

Change-Id: I38d6806255619fec3de23945a184455072f34ec0
2018-10-02 06:16:23 -07:00
Neil Fuller
11be3acfe0 Use ICU APIs not impl types
It's possible to use BasicTimeZone in place of OlsonTimeZone.
Although neither are currently public SDK APIs the BasicTimeZone
is preferable.

Bug: 113148576
Test: build
Change-Id: I745b17feee678ecd053fadc6c447107fa80918e8
2018-10-02 10:15:36 +01:00
Fan Zhang
de117046ad DO NOT MERGE Import clean up.
Reordered all imports according to Android codestyle.

Test: rebuild
Change-Id: I750f01f70f2114d51838bf652833aebdc4065c98
2018-09-04 13:54:46 -07:00
Aurimas Liutikas
03fcde338b Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
Merged-In: I941dea40562170649bf056e675cc32e5163c0e39
(cherry picked from commit a290b873d0)
(cherry picked from commit b1af85d155)
2018-08-28 16:35:52 -07: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
Aurimas Liutikas
b1af85d155 Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
Merged-In: I941dea40562170649bf056e675cc32e5163c0e39
(cherry picked from commit a290b873d0)
2018-08-28 11:48:56 -07:00
tmfang
27c84de325 Settings Fragment Migration (Build pass app)
This patch focused on fixing compile errors and some runtime errors.

Test: We can't test it now. But we will have an integration test later.
Bug: 110259478
Change-Id: I16c471ddcd0fa1460c665b7f74d86fcace5ee67b
2018-07-11 18:24:51 -07:00
tmfang
99cc23d0da Settings Fragment Migration (Change imports)
This commit *only* changes imports and optimize imports.
We don't do anything else.

This patch can't compile pass and run test case.
We will update other patches to fix these problem.

Change list.

1. import android.app.Fragment; ->
   import androidx.fragment.app.Fragment;
2. import android.app.DialogFragment; ->
   import androidx.fragment.app.DialogFragment;
3. import android.app.ListFragment; ->
   import androidx.fragment.app.ListFragment;
4. import android.app.LoaderManager; ->
   import androidx.loader.app.LoaderManager;
5. import android.content.AsyncTaskLoader; ->
   import androidx.loader.content.AsyncTaskLoader;
6. import android.content.Loader; ->
   import androidx.loader.content.Loader;
7. import android.app.FragmentTransaction; ->
   import androidx.fragment.app.FragmentTransaction;
8. import android.app.FragmentManager; ->
   import androidx.fragment.app.FragmentManager;
9. import android.app.LoaderManager.LoaderCallbacks; ->
    import androidx.loader.app.LoaderManager.LoaderCallbacks;

Bug: 110259478
Test: Can't test it.
Change-Id: I0a3f98fff34a3494a839c3c42aeabcec3df2c8b3
2018-07-11 18:23:51 -07:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00