summaryrefslogtreecommitdiff
path: root/core/java/android/widget/TimePicker.java
Commit message (Collapse)AuthorAgeFilesLines
* Use DateFormatSymbols directly instead of using LocaleDataVictor Chang2020-07-201-5/+7
| | | | | | Bug: 160606356 Test: atest FrameworksCoreTests:android.text.format Change-Id: Id5d70328ab146d439ed45135e0fa9d1b9cc95257
* Use new UnsupportedAppUsage annotation.Artur Satayev2020-01-091-1/+1
| | | | | | | | | Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library. Bug: 145132366 Test: m && diff unsupportedappusage_index.csv Change-Id: I41e12e425284e74561c6b61663241df364ae54a1 Merged-In: I41e12e425284e74561c6b61663241df364ae54a1
* Rename @EnumEntry and @FlagEntryAshley Rose2019-03-181-2/+2
| | | | | | | Test: atest CtsViewInspectorAnnotationProcessorTestCases Bug: 127531820 Exempt-From-Owner-Approval: Annotation-only change Change-Id: Id293e2b2ac9cf7bf2aaeb28645471ea227bb587b
* All Parcelable CREATOR fields are @NonNull.Jeff Sharkey2019-02-281-1/+1
| | | | | | | | | If they were null, then the Parcelable would fail to work. Bug: 126726802 Test: manual Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014 Exempt-From-Owner-Approval: Trivial API annotations
* Update core widgets to save attribute source info.Aurimas Liutikas2019-02-071-0/+2
| | | | | | Bug: 111439551 Test: make -j Change-Id: I72997a87122f38b32e38e42a690385acc7d0e521
* @InspectableProperty coverage for android.widgetAshley Rose2019-02-041-0/+8
| | | | | | | | | A few getters for view properties have been added where they were missing. CTS tests for the new APIs are pending in b/123894719. Test: m framework Bug: 120492712 Change-Id: I743ce693d384eaf749ced3db7f81bda7d19ed275
* Add @UnsupportedAppUsage annotationsMathew Inwood2018-08-211-0/+2
| | | | | | | | | | | | | | | | For packages: android.widget This is an automatically generated CL. See go/UnsupportedAppUsage for more details. Exempted-From-Owner-Approval: Mechanical changes to the codebase which have been approved by Android API council and announced on android-eng@ Bug: 110868826 Test: m Change-Id: Ic61019b1df85448a158fc2ba55c326353222c6b9
* Add more IntDef prefixes for auto-documenting.Jeff Sharkey2017-12-131-1/+4
| | | | | | | Test: builds, boots Bug: 70177949 Exempt-From-Owner-Approval: annotation-only changes Change-Id: I76dde6054e06f52240bd4b1a0f196dcb74623608
* Improved autofill support on DatePicker and TimePicker:Felipe Leme2017-08-151-17/+42
| | | | | | | | | | | | | - Save autofilled value so UI is properly highlighted. - Notify TimePicker listener just once. Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases Test: cts-tradefed run commandAndExit cts-dev -m CtsWidgetTestCases -t android.widget.cts.DatePickerTest Test: cts-tradefed run commandAndExit cts-dev -m CtsWidgetTestCases -t android.widget.cts.TimePickerTest Fixes: 37098837 Change-Id: I38d64c107f6059b94c92676ea37681006474f519
* Provide a way to set AutofillId on ViewStructure.Felipe Leme2017-04-251-0/+1
| | | | | | | | | | | So far that was done indirectly by public methods that could be overridden in away that does not set the proper id in the structure, which would crash apps. Bug: 36171235 Test: modified VirtualContainerActivityTest#testAutofillOverrideDispatchprovideAutofillStructure Change-Id: I3f1c64020125cbb8349971a0bc52ccd1e0c81e62
* Minor fixes on Autofill Framework:Felipe Leme2017-04-241-2/+0
| | | | | | | | | | | | | | | | | | - Removed default implementation of onProvideAutofillVirtualStructure() that was using accessibility API (it's useless because without the View calling AutofillManager.notifyViewEntered(), it would never be triggered). - Fixed obsolete TODOs. - Removed obsolete service class name constant. - Removed unused debug constant. Fixes: 37078783 Fixes: 33197203 Bug: 33802548 Bug: 35956626 Test: CtsAutoFillServiceTestCases pass Merged-In: I834d34b8af8bf0d781dc7e0ffcd6e600bfa2d183 Change-Id: I834d34b8af8bf0d781dc7e0ffcd6e600bfa2d183
* Moar pre-partitioning refactoring.Felipe Leme2017-03-311-0/+1
| | | | | | | | | | | | | | On ViewState: split value into mCurrentValue and mAutofilledValue. On Session: replacing mAutofilledDataset by mDatasetWaitingAuth and ViewState.getAutofilledValue() (mAutofilledDataset is still needed, but will be removed in the first partitioning CL). Also fixed a missed 'return' on TimePicker.autofill() Bug: 35707731 Test: CtsAutoFillServiceTestCases pass Change-Id: Icc32701ae3e499a77d99e6ae1daa7d070a3df631
* Simplified autofill() methods by returning void instead of boolean.Felipe Leme2017-03-291-6/+4
| | | | | | Test: CtsAutoFillServiceTestCases pass Change-Id: Ic94e6686e291fed60ef6715bd160f9b568bf0ea6
* TRON log important auto-fill eventsPhilip P. Moltmann2017-03-161-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example log from android.autofillservice.cts.LoginActivityTest#testAutoFill#testAutoFillOneDatasetAndSave (translated from numbers of human readable string): AUTOFILL_SESSION_STARTED package=android.autofillservice.cts AUTOFILL_REQUEST type=TYPE_SUCCESS package=android.autofillservice.cts FIELD_AUTOFILL_SERVICE=android.autofillservice.cts FIELD_AUTOFILL_NUM_DATASETS=1 AUTOFILL_FILL_UI type=TYPE_ACTION package=android.autofillservice.cts FIELD_AUTOFILL_NUM_DATASETS=1 FIELD_AUTOFILL_FILTERTEXT_LEN=0 AUTOFILL_DATASET_APPLIED package=android.autofillservice.cts FIELD_AUTOFILL_NUM_VALUES=2 FIELD_AUTOFILL_NUM_VIEWS_FILLED=2 AUTOFILL_SAVE_UI package=android.autofillservice.cts FIELD_AUTOFILL_NUM_IDS=2 AUTOFILL_DATA_SAVE_REQUEST type=TYPE_SUCCESS package=android.autofillservice.cts FIELD_AUTOFILL_SERVICE=android.autofillservice.cts AUTOFILL_SESSION_FINISHED package=android.autofillservice.cts Test: Ran auto-fill tests and looked at event log. Change-Id: I58aaa58e4435e7d04c8cd91878411943d3eb13de
* Make it clear which type of AutoFillValue is setPhilip P. Moltmann2017-03-141-1/+8
| | | | | | | throw and handle errors if the wrong value is set for a view Test: android.autofillservice.cts.AutofillValueTest Change-Id: Ida80da7913a210bede6c47d6b7a6f215a012a84c
* Fix a few auto fill ussuesSvet Ganov2017-03-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Ensure clicking on a focused view brings up autofill if needed 2. Notify the autofill manager in a couple of cases we missed 3. Renamed the AutofillManager app facing APIs to better reflect what they do and added a API for the app to cancel the autofill interaction 4. Fix view structure dispatch where the ordering of children for autofill was mixed with ordering of direct view children - the autofill children may be indirect as views can be marked not important for autofill 5. Show scrollbars only if there are more fill options than want is shown 6. Show only three fill options and the rest can be accessed with a scroll 7. Remove the list divider to allow fill items to control all fill window content 8. Renamed the autofill manager internal service classes to xxAutofillxx 9. Fixed a comment that was not addressed in a previous CL 10. Showing max three fill options - rest needs a scroll 11. Make sure fill UI shown when filter with no matches is changed to filter with some matches 12. Make sure the fill window has a shadow Test: Autofill CTS tests pass and manual bug:36038929 bug:36040101 bug:36149166 bug:36034681 bug:36126001 bug:36035654 Change-Id: Ic8726146fc3c0a19d3e536becdd63fb65622136e
* Replaced auto-fill by autofill to keep it consistent with API style.Felipe Leme2017-03-091-10/+10
| | | | | | | | | | | | | | This change will affects 2 types of apps: autofill service implementations and apps that use autofill APIs. Since just the former is known to be used at the moment, we're not trying to keep backward compatibility with the latter. Bug: 35956626 Test: CtsAutoFillServiceTestCases pass Test: android.provider.SettingsBackupTest pass Change-Id: Ia720083508716deae9e887f9faa7ae7c5a82f471
* Optimize ViewStructure for autofill by removing irrelevant nodes.Felipe Leme2017-03-081-0/+5
| | | | | | | Test: CtsAutoFillServiceTestCases (with new tests) pass Fixes: 35840787 Change-Id: Iaa2c1907c8383b4a820fd7204e67fa2d276ad2b8
* Replace AutoFillType by view constants.Felipe Leme2017-03-071-3/+2
| | | | | | | | | | | | | | | Now that AutoFillType does have any logic (since the "subType" logic was moved to AutoFillHint), it makes more sense to get rid of the type and use constants directly. This change creates the contants and "pseudo-deprecate" the old stuff: it's still available because some clients are using it, but it will be removed once they migrate. Bug: 35956626 Test: CtsAutoFillServiceTestCases pass Change-Id: I0efe7f0cc101c86164a18c85903bb871e1f13ba2
* Added auto-fill support for DatePicker and TimePicker.Felipe Leme2017-03-011-0/+64
| | | | | | | | | | | | Also fixed some getAutoFillType() implementations to return null when the view is disabled. Bug: 33550221 Bug: 35840787 Test: CtsAutoFillServiceTestCases (with new tests) pass Test: m update-api Change-Id: I46acc1fb106cf2153515cc1c9567b34cfabd1c62
* Adding text input mode to TimePicker.Aurimas Liutikas2017-02-061-0/+12
| | | | | | | Test: Tests will have a follow up CL. Bug:30044800 Change-Id: I71a0fba97026da76251768016edf1b159617abb9
* Fix import statements in android.widget package.Aurimas Liutikas2016-10-111-4/+4
| | | | | | | Additionally this CL removes spaces at the end of the line. Test: code still compiles. Change-Id: I1ce98b4e70aa3ae614f87966c3bc6181fa4389a4
* resolve merge conflicts of 6e37f8a to masterAndreas Gampe2016-09-251-4/+53
|\ | | | | | | Change-Id: I4fdcce7554977a56fd0f7e4ad4804929112d5599
| * Allow developer to override Material-style modes in picker dialogsAlan Viverette2016-09-221-4/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | A recent fix prevented developers from specifying Holo-style mode when displaying a date or time picker dialog. This CL also cleans up unused code in TimePickerDialog and documents how themeResId will be used. Adds hidden @TestApi methods for use in CTS tests. These may be made public later, but it's too late in MR1 for API changes. Bug: 31586821 Test: Ice2e203983769f1ea1cfa93105eb97b6fa5176b9 Change-Id: I1b7512b7647ddd7ab987beac2c0aef4fe7cc16bc
* | resolve merge conflicts of 1095b21 to masterColin Cross2016-08-251-18/+20
|\| | | | | | | Change-Id: I611579044234435a07cad2f64930b731e53aec77
| * Constrain input hour and minute to valid rangeAlan Viverette2016-08-041-18/+20
| | | | | | | | | | | | | | This is consistent with the legacy spinner implementation. Bug: 30570390 Change-Id: I14fb1363b410b2f56ead01e0b632efb8f7508268
* | TimePicker - introduce hidden methods for CTS testingAndrei Stingaceanu2016-07-071-0/+37
| | | | | | | | | | | | | | | | For assisting the TimePickerTest keyboard traversal and keyboard entries CTS tests. Bug: 26187903 Change-Id: Ie30a006d07b7e5f75b11645e84c5df8b470cb52b
* | Add setOnDateChangedListener to DatePickerClara Bayarri2016-06-031-0/+5
|/ | | | | | | | | Also refactor slightly the hierarchy in TimePicker to use the common parent AbstractTimePickerDelegate in the same way as DatePicker. Bug: 28310875 Change-Id: Iecaf206ba1691e26d4496014dc1d13f070c4722a
* Use Holo date/time picker layouts on very small screensAlan Viverette2016-03-011-0/+67
| | | | | | | | | | If the screen is smaller than "small" then use the Holo picker layouts. Unifies the SavedState between delegates so that we can seamlessly transition between them during configuration changes. Pushes the DatePickerSpinnerDelegate up to the same level as the calendar delegate. Bug: 27239893 Change-Id: Ida4dc2748d38bd766ae93d12aef15e963921939c
* Clean up TimePickerAlan Viverette2015-11-161-76/+20
| | | | | | | | | No functional changes, only refactoring: - shorten method and variable names - remove unused validation callback - avoid using return in setters Change-Id: Ie7c19cfe3c5cb515695f943c534899d37ad032bb
* Implement new keyboard interaction model in TimePickerAlan Viverette2015-10-221-0/+12
| | | | | | | | Also enlarges the touch targets for the AM/PM buttons by redirecting unhandled touches within the containing view group. Bug: 20257430 Change-Id: I28e8d8894a4702116bb68cc6a6d4115e5aa87a69
* Deprecate AnalogClock widget, Integer methods on TimePickerViewAlan Viverette2015-03-181-26/+83
| | | | | Bug: 19754178 Change-Id: Ic51c40995ce841040d745070243e483d4d97ce5c
* Remove unused imports in frameworks/base.John Spurlock2015-02-281-2/+0
| | | | Change-Id: I031443de83f93eb57a98863001826671b18f3b17
* First quick implementation of auto assist data.Dianne Hackborn2015-02-061-22/+4
| | | | | | | | | | | | | | Introduce new AssistData class that contains all data the framework automatically generates for assist. Currently populated with a very simple tree structure representing the app's view hierarchy. Reworked how we populate the class name for accessibility info, so this is provided through a new method call on View that subclasses can override. This method is also used to populate the class name in AssistData. Change-Id: Ibd0acdc8354727d4291473283b5e4b70894905dc
* Fix accessibility delegationAlan Viverette2015-01-071-7/+11
| | | | | | | | | | | | | | | Ensures that delegate code is run last. Previously, calling the super method from an accessibility delegate set on a widget would only run code in the widget's parent. Next, the delegate code would run. Finally, the widget's code would run. As a result, the widget code would override any data supplied by the delegate. By moving all overridden code to internal methods, we ensure that the call chain for super includes the widget's parent code followed by the widget's code. The delegate code will always run last. BUG: 17641433 Change-Id: Ib9d403156c1fc4fb04f65f3c126d1277a44b3740
* Swap names for clock delegates so they are correctAlan Viverette2014-10-231-2/+2
| | | | Change-Id: Ic11affae802f0afe4746f65f0b96979a7c5a9c0a
* Fix date and time picker stylingAlan Viverette2014-08-151-30/+30
| | | | | | | | | | | | | | Removes done buttons from widgets, fixes date picker day selection, fixes dialog layouts in landscape, updates colors. Adds API on AlertDialog for setting the view by resource ID, which is necessary to correctly inflate the view against the dialog's parent view. BUG: 16941550 BUG: 16852521 BUG: 16878697 BUG: 16838659 BUG: 17047435 Change-Id: I138858ce06cd4abf68a2c3361ec170370236b33b
* Allow TimePicker/DatePicker to use legacy layout styleChet Haase2014-08-071-7/+14
| | | | | | | | | | | | | In L, the TimePicker was rewritten to use a clock face and the DatePicker was rewritten to use a calendar. This change allows developers to opt into the old style instead (android:timePickerMode="spinner|clock" and android:datePickerMode="spinner|calendar").) Issue #16717952 Pre-L style android.widget.TimePicker on L Issue #16846963 Allow developer to use legacy DatePicker appearance Change-Id: I4ee071fcbc5bf25eab83d6a5cb6ff352a603f90a
* Fix timepicker double done buttons.Craig Stout2014-07-171-0/+8
| | | | | | | Leanback theme uses a legacy layout with a done button, but apps won't necessarily have target apilevel L. Change-Id: Ib38b08df1fe07bd8fb4e64e93633ce0b7eb12567
* Add public attributes for TimePicker stylingAlan Viverette2014-07-171-55/+11
| | | | | BUG: 11218747 Change-Id: Ifdf981280ebe20a9066f219c9a4505d0d7486b2e
* Fix TimePicker behaviorFabrice Di Meglio2014-07-111-10/+17
| | | | | | | | - use Alert Theme and make the TimePickerDialog show its done button in the legacy mode - if targetSdkVersion < L or if TV UI show the legacy TimePicker Change-Id: I19ca6dbbcb50599c7e230262a23956c185f53a5c
* Remove unused imports from frameworks/base.John Spurlock2013-11-201-2/+0
| | | | Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
* Update TimePicker widget and its related dialogFabrice Di Meglio2013-09-271-597/+88
| | | | | | | | | | | | | | | | | | | - the old TimePicker widget is still there for obvious layout compatibility reasons - add a new delegate implementation for having a new UI based on a radial picker - use the new delegate only for the TimePickerDialog (which does not need to be the same) - added support for Theming and light/dark Themes - added support for I18N (hour formatting and time separator and also position of AM/PM indicator coming from Unicode CLDR) - added support for RTL - verified support for Keyboard - verified that CTS tests for TimePicker are passing (for both the legacy and the new widgets) Also added a new HapticFeedbackConstants.CLOCK_TICK and its related code for enabling ticks vibration. Change-Id: Ib9b53a152bd9e97383dc391ef8c26da91217298f
* Add View constructor that supplies a default style resourceAlan Viverette2013-09-091-6/+10
| | | | | | | Also updates the constructor of every class that extends View. BUG: 10676369 Change-Id: Ifaf27bf82028d180afa4931c0e906df88d858ac3
* resolved conflicts for merge of 71de1312 to masterFabrice Di Meglio2013-08-271-4/+12
|\ | | | | | | Change-Id: Ib2065147a3160b5176fd44a4d14bec06c7c973e1
| * Fix bug #10462461 CTS TimePickerTest are broken for ↵Fabrice Di Meglio2013-08-231-3/+11
| | | | | | | | | | | | | | | | | | | | testSetOnTimeChangedListener() - be aware that getCurrentHour() value can vary with "mIs24HourView" - so force no notification of onTimeChanged() for setCurrentHour() when we are just changing 12h/24h view Change-Id: I358eda29cf0c66a811cde494136d7cfc27fca39f
* | Decouple TimePicker codeFabrice Di Meglio2013-08-211-511/+648
|/ | | | | | | | - introduce a TimePickerDelegate interface to be able to have several TimePicker implementations - code refactoring Change-Id: I0d8bdfdb4c2723a51311c01fbd485e34983bb423
* Fix old remaining i18n bugs on TimePicker:Fabrice Di Meglio2013-08-161-9/+106
| | | | | | | | | | | | - put am/pm on the left side of hours for hu, zh, ja and ko Locales - use the hours/minutes separator from the Locale (fi, sr, ...) - updated layouts (better for Arabic, Farsi and Hebrew) - support double digits format for 12h and single digit format for 24h (it, ja, vi, ...) - fix setIs24HourView(boolean) behavior: do not lose the current hour value when switching from 12h to 24h Change-Id: If66cb6f802d894f0a2357b43eede6854791f3b67
* change "next" to "done" in minute IME option under 24-hour formatHyejin Kim2013-03-211-0/+10
| | | | | | | | We don't need "next" button under 24-hour format any more. So, we changed from "next" button to "done" in IME option when setting minute under 24-hour format Change-Id: Ic9b1673248183060ba7279b63648a85dc39ca3b9
* Fix bug #7206086 NumberPicker widget should use locale digitsFabrice Di Meglio2012-09-211-2/+2
| | | | | | | - fix for having the TwoDigitFormatter being able to be recreated if the locale is changed - accept now also the Arabic and Persian digits Change-Id: Ifbf7e274d971008f4a5782402d4b76d9472b68fc