summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authornewt <newt@chromium.org>2016-01-25 17:30:15 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-26 01:31:20 +0000
commit9e226039ff46dbc40f8529e2b70a577230d4d9dd (patch)
treea863fcc64fa9ce9a4812061b025c4e210c44a648 /build
parentc9395dc7461d2f65131f525b933ec51cb04b09bc (diff)
downloadchromium_src-9e226039ff46dbc40f8529e2b70a577230d4d9dd.zip
chromium_src-9e226039ff46dbc40f8529e2b70a577230d4d9dd.tar.gz
chromium_src-9e226039ff46dbc40f8529e2b70a577230d4d9dd.tar.bz2
Fix date picker performance issues, crash, and incorrect pre-1582 dates.
This cleans up the DateDialogNormalizer, fixing three issues in the process: 1. The date picker is now way faster on L devices. This works around a performance issue with the Android DatePicker in L, where large min/max ranges consume tons of memory and time (many seconds). The workaround is simply to limit the date picker's range to at most 5000 years before and after the initial selected date. In practice, this doesn't affect users since manually scrolling through 5000 years is infeasible. 2. This fixes a crash when the min date is after 2100 on pre-L devices. On KK and earlier, calling DatePicker.setMinDate() with a date that's greater than the current max date (which defaults to 2100) causes a crash. The fix is to set the DatePicker's min and max dates in such an order that the min is always less than the max. 3. This fixes an issue where min/max dates before 1582 were off by 10 days due to incorrect handling of the Gregorian/Julian switch. This also revamps DateDialogNormalizerTest and converts it to a Robolectric test. BUG=441060,580385,580388 Review URL: https://codereview.chromium.org/1622773002 Cr-Commit-Position: refs/heads/master@{#371404}
Diffstat (limited to 'build')
-rw-r--r--build/all.gyp1
-rw-r--r--build/gn_migration.gypi1
2 files changed, 2 insertions, 0 deletions
diff --git a/build/all.gyp b/build/all.gyp
index 5959085..7791013 100644
--- a/build/all.gyp
+++ b/build/all.gyp
@@ -864,6 +864,7 @@
'../sync/sync.gyp:sync_unit_tests_apk',
'../tools/android/heap_profiler/heap_profiler.gyp:heap_profiler_unittests_apk',
'../ui/android/ui_android.gyp:ui_android_unittests_apk',
+ '../ui/android/ui_android.gyp:ui_junit_tests',
'../ui/base/ui_base_tests.gyp:ui_base_unittests_apk',
'../ui/events/events_unittests.gyp:events_unittests_apk',
'../ui/gfx/gfx_tests.gyp:gfx_unittests_apk',
diff --git a/build/gn_migration.gypi b/build/gn_migration.gypi
index f5eeb11..99b543d 100644
--- a/build/gn_migration.gypi
+++ b/build/gn_migration.gypi
@@ -235,6 +235,7 @@
'../tools/imagediff/image_diff.gyp:image_diff#host',
'../tools/telemetry/telemetry.gyp:bitmaptools#host',
'../ui/android/ui_android.gyp:ui_android_unittests_apk',
+ '../ui/android/ui_android.gyp:ui_junit_tests',
'../ui/base/ui_base_tests.gyp:ui_base_unittests_apk',
'../ui/events/events_unittests.gyp:events_unittests_apk',
'../ui/gfx/gfx_tests.gyp:gfx_unittests_apk',