summaryrefslogtreecommitdiffstats
path: root/src/com/android/calendar/Utils.java
Commit message (Collapse)AuthorAgeFilesLines
* b/2988876 Stop crash on orientation changeErik2010-09-241-58/+65
| | | | | | | | | | | EditEventFragment was triggering a fragment swap in onPause, which isn't supported. This fixes the behavior of Edit to handle moving the fragment around correctly. This change makes the behavior save the event when back is pressed and restore the event if the user goes home and returns. On orientation change changes get lost, however. Another change will be made to fix this. Change-Id: Iaef5eac6668a8e0ee4859f69e5a77ecb9a7a15a3
* Manual merge of tz settings changes.Erik2010-09-221-74/+15
| | | | | | | | Merges changes I4ad92a73 and Ia7260f4d. This moves Calendar to using the hidden TimeZoneUtils API and properly displaying and updating the home time zone in settings. Change-Id: I51a80da0963ba5924a09e920f158cdc1c158fb2c
* Make settings screen support two pane mode.Daisuke Miyakawa2010-09-161-22/+22
| | | | | | | | | | | | | | | | | | | 1) Rename CalendarPreferenceActivity to GeneralPreferences, and add CalendarSettingsActivity for top-level Activity. We should retain previous logs for CalendarPreferenceActivity, and we shouldn't call it "Activity" any more, as it is Fragment. I'm not sure whether the new "CalendarSettingsActivity" should be named so, or renaming it to "CalendarPreferenceActivity" to keep consistency around naming. 2) Add necessary xmls. Some of them are derived from Settings app, which already has new two pane structure, so refering its logic seems enough for now. Change-Id: I6a0b04bb824d06c2842cbd8127e2860c45350987
* resolved conflicts for merge of 864d1139 to masterErik2010-09-081-0/+27
|\ | | | | | | Change-Id: Id6c7daeccf202c6d0c73c8a536e09d39173288d4
| * Adds a convenience function for formatting dates in a tzErik2010-09-071-0/+26
| | | | | | | | | | | | | | | | This adds a convenience function for Calendar that formats a time range in Calendar's current tz. This change is dependent on I16b3e939. DO NOT SUBMIT before I16b3e939. Change-Id: I58cf40f637a6c184ffe501002c4f17eb300f5dbb
* | Fix some bugs from gb merges for tzErik2010-09-071-6/+8
| | | | | | | | | | | | | | | | Not everything needed was merged through. This fixes the bugs caused by that. After this change a non-functional option to set a home time zone will be in master. Change-Id: Ie180d93cb77e576840a6349aa1d8908ddaf12fa9
* | resolved conflicts for merge of 9ccb1dd0 to masterErik2010-09-071-2/+48
|\| | | | | | | Change-Id: Ifcc5c862dca3f296c87aa63dfa5bd6c54026d79a
| * Adds a method for setting a new home tzErik2010-09-071-1/+47
| | | | | | | | | | | | | | | | | | This allows us to write a new home tz to preferences and the local cache (and eventually the db) in a single call. Also updates preferences activity to use this method when the user changes the settings. Change-Id: I25a04a3d630388a1ea8c0db64c55eb5500a7b8a4
* | resolved conflicts for merge of 38ace6e5 to masterErik2010-09-021-0/+49
|\| | | | | | | Change-Id: Ie436a86f1dd20fc7af56e0e39349e9d6fabfb2c6
| * Adds a getTimeZone helper function to utilsErik2010-09-021-0/+48
| | | | | | | | | | | | | | | | getTimeZone allows Calendar to get the correct timezone to display in. An asynchronous query still needs to be added once the provider supports the new tz feature. Change-Id: I3fcb67067d9f8bace8420574fd57cab7bd3bf154
| * Added support for specifying a timezone for an individual event (DO NOT MERGE)Mason Tang2010-08-031-0/+22
| | | | | | | | | | | | | | - Changed the EditEvent view to support configuring a timezone - Added a custom TimezoneAdapter Change-Id: I03b34cf0d5c137e3429ac14b75e88f2b5fcc0a37
* | Move EditEventFragment into AllInOneActivityErik2010-09-011-3/+5
| | | | | | | | | | | | | | | | | | | | | | This change makes AllInOneActivity be the launch point for edit event and causes it to take over as a full screen view. This way we can handle message passing between edit event and the rest of calendar as well as maintain the actionbar items. Also fixes b/2954347 Change-Id: Ib28e5382abbfe4f72a183c0945f27e61b7fd176e
* | Rename SharedPreferences$Editor.startCommit() to apply()Brad Fitzpatrick2010-08-301-2/+2
| | | | | | | | Change-Id: I59102c9340ad337485ca227242688ca85d377000
* | Changed to use SharedPreferences#startCommit() for asynchronous commitMason Tang2010-08-251-24/+2
| | | | | | | | Change-Id: I1a0a772b394c3cb7ea8906c580a1e13bad9d2fde
* | Added day separators in the widgetMason Tang2010-08-251-0/+17
| | | | | | | | | | | | | | | | | | | | | | - Also substantially refactored the widget service - Moved much of the string logic into CalendarAppWidgetModel - Changed the behavior so we do everything in one pass over the cursor and an additional de-bucketing pass after - Added a hard limit to the query for maximum events to return - TODO write unit tests for new behavior Change-Id: I2ddc2951f9b626e093f02dd365a70f56681eb931
* | Moved all edits to shared preferences to an asynchronous serviceMason Tang2010-08-231-4/+34
| | | | | | | | | | | | | | - This addresses b/2942834 - Should improve responsiveness a bit Change-Id: Ief02c66ac4c1a132f1dc23853015b5b286807ce7
* | Moved EditEvent into a sub package.Erik2010-08-161-2/+2
| | | | | | | | Change-Id: I4bba4ec6651ec90f8d0a7c83c76340ed080178f0
* | Merged event timezone support from GingerbreadMason Tang2010-08-101-0/+22
| | | | | | | | | | | | - Manually merged the change since edit event has changed significantly from GB Change-Id: I12ff70401d2e24b73df1c09092de89e6cbe00e5e
* | Cleanup of Utils, removed unused functionsMason Tang2010-08-041-43/+0
| | | | | | | | Change-Id: If990de6545ca495721b5197881f81d96013d0d9c
* | - Save/Restore viewType across rotation and quittingMichael Chan2010-07-221-8/+43
| | | | | | | | | | | | | | | | | | | | | | | | - Read desired viewType from intent (from Widget for example) - Added a new viewType DETAIL for detail viewing which is the last of Agenda or Day. This is typically triggered from widget and tapping on a day in month view) - Added SelectedTime (not in use right now) - Removed Calendar AllInOne Icon in launcher. Back to just one Calendar. - Fix the problem the time not displaying properly after rotation - Cleaned up the old detailview stuff, yuck. - Removed unused code from CalendarApplication and CalendarData. Change-Id: I78a2172da282fedfc2559cde529a4f034430912b
* | Added basic support for searching eventsMason Tang2010-07-211-0/+10
| | | | | | | | | | | | | | - Reusing agenda view for displaying search results - Currently not fragment-ized Change-Id: I687b61ca86f92a54c1e402b881edd83111806161
* | Added support for app-configurable week start dayMason Tang2010-07-161-2/+13
| | | | | | | | | | | | - Users can now optionally override the system locale specified week start day Change-Id: I44b37743abb719c80b0d79b47d8a308edc9732c9
* | Moves EditEvent into a fragmentErik2010-06-301-0/+11
| | | | | | | | Change-Id: Ifcf4683ff8122102d4b8917aacb7a7d5df5751ae
* | Clean up UtilsErik2010-06-281-12/+0
| | | | | | | | | | | | Removed an unused method from Utils. Change-Id: I0aafe006e4f874bb0f10909592d83260574f463f
* | AsyncQueryServiceMichael Chan2010-06-211-0/+3
|/ | | | | | | | | | | | | | | Helper class that performs ContentProvider operations in a Service Features: - Executes the operation in a background Sservice which minimizes the chance of the operation getting lost because the caller (Activity) is killed. - Designed for easy migration from AsyncQueryHandler. - In additional to query/insert/update/delete, it also supports batch mode i.e. ContentProviderOperation - Undo support in the form for delayed operation with cancel Todo: - Add wake lock Change-Id: Id3b24a34e5af11da448bace585911bcd7d4553c5
* Change to TextUtils.equals instead of .equalsErik2010-04-091-1/+2
| | | | | | Could crash on a NPE for an empty string without this. Change-Id: I1f88889580cfd30f82e867f403e9466a1d7d7819
* b/2555049 Will only query accounts once when entering Calendars screenErik2010-03-311-0/+48
| | | | | | | | | | There was noticeable jitter on entering the Calendars screen including misregistering taps due to the cursor requerying repeatedly during a sync. This change makes it so we only query on accounts once and then will requery every five seconds for about a minute. The view will only be updated if a change has occurred. Change-Id: I53610836e78d970d452d4c9724a2d3525cd85482
* b/2494603 Improve UI to disambiguate calendars with the same nameMichael Chan2010-03-161-0/+59
| | | | | | | | | Added checks for calendars with duplicated names and if found will now include the owner e-mail with the display name. Also did some minor layout changes for German ( b/2516982 ). And started a tests class for Utils. Change-Id: I567c6552a8c17b2c7e73d23312ac60f5dc85a1ec
* b/2496655 Changed launcher to use a default detailed view.Erik2010-03-081-2/+1
| | | | | | | | | prefs for Calendar seems to have lost a detailed view setting. Changed launcher to use a default one if it isn't found. Also, a bug fix in getPathSegments() cause an off by one error for one of our checks which caused us to always go to the current time. Updated timeFromintentInMillis to fix this. Change-Id: I78bc380590b8bfae6c475f5e302a4e6a5d082258
* Quick fix to add safer time checking for time from intents.Erik2010-02-261-1/+1
|
* b/2412594 Added an implicit intent filter to the Calendar Launcher.Erik2010-02-261-0/+15
| | | | | | | Added an implicent intent filter to the Calendar launcher so it will no longer be tied to the package name. And added functionality to allow a data uri to be passed giving a time to start the calendar at as well as allowing "VIEW" as an extra with "DAY" to go to the day view directly.
* Always use a consistent name for SharedPreferences.Jeff Hamilton2010-02-161-3/+3
| | | | | | | | | | The code was relying on the package name for SharedPreferences, which is problematic if running under a new package name. Also, remove the use of the shared user ID. Change-Id: I9d2c8c78588d7b9868318153d0788addb84f11a6
* Save the last calendar used for event creation as the default for creating ↵Michael Chan2010-02-031-1/+12
| | | | | | | | the next event. This was done to remove the google dependency. Change-Id: I14051f1098d3e78ffa76ef2890b9595809c5d186
* First step in unbundling CalendarMichael Chan2010-02-031-3/+2
| | | | Change-Id: I12cf0e4141c069514dec78344592532848983abc
* Add color setting for Saturday and Sunday in month viewTakaoka G. Tadashi2010-01-221-0/+41
| | | | | | This also get the colors (in ja_JP locale) slightly lighter than before. Bug: 1614177
* b/2106929 Resume to previous calendar view.Michael Chan2009-09-171-0/+19
|
* Fixed a bunch of problems when moving among agenda/day/week/month views.Michael Chan2009-09-041-3/+1
| | | | | | | | b/1438315 Fixed problems introduced in the new back behavior. b/2077287 Fixed the problem where you sometimes end up in 1969 when switch among the agenda/day/week/month views. b/2076791 The selected date is preserved when switch to various views. Removed scroll bar in agenda view as the header was not a static list of events anymore Cleaned up some TODOs.
* Revert the new back behavior change. It was causing views to not go to the ↵Michael Chan2009-08-281-1/+3
| | | | | | right time. b/2077287 b/2076791
* b/1438315 Fixed back behavior for Calendar.Michael Chan2009-08-141-0/+1
| | | | | | | When traversing among the Agenda, Day, Week, and Month views, only one instance of each view will be saved in the activity stack. For example, if one were to go to Agenda, Day, Week, Day, then Agenda, pressing the back multiple times from Agenda view will yield the following: Day, Week, then Home.
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+104
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-104/+0
|
* auto import from //branches/cupcake/...@130745The Android Open Source Project2009-02-101-29/+11
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-171-1/+1
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+122