summaryrefslogtreecommitdiff
path: root/src/com/android/mail/utils/Utils.java
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup of drawer dragJin Cao2014-10-151-1/+2
| | | | | | | | | - Don't do anything in enableHardwareLayer if it's already enabled - Add onDrawerDragEnded in TPC for consistency so it has access to all 3 drawer events. - Change ObjectAnimator back into ViewPropertyAnimator Change-Id: If78b833d35f0c37f6b9e4d8c644c8a6714bfc7b7
* Merge "Peek mode for 2-pane landscape" into ub-gmail-ur14-devAndy Huang2014-10-161-7/+0
|\
| * Peek mode for 2-pane landscapeAndy Huang2014-10-151-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Peek mode allows CV fragments to be visible but not marked viewed and read. TPC keeps a global flag for whether the current conversation should be peeked vs marked read. I have tried to manually reset the flag in the 6 cases that cause the current conversation to change: 1. tap another conversation (don't peek) 2. swipe to another conversation (don't peek) 3. keyboard-advance to another conversation (peek) 4. auto-advance=newer|older (don't peek) 5. auto-advance=list (go older & peek) 6. empty CV and a list cursor has loaded (peek at i=0) Swipe, in particular, required a new onConversationViewSwitched() call in CPA because onPageSelected() is triggered both when swiping around in the view pager AND when simply setting the initial page as part of constructing a view pager. Thankfully, there is only ever one copy of this peek flag in the app, in TPC, since AAC/TPC is where all the work is done both to mark conversations seen and to switch to new conversations. Rotation to portrait on tablets now requires tearing down a ViewPager; this code and thought process is documented here: http://go/xqaxk TODO: selected indicator for transition from peek->read state in-place TODO: touches in CVF should mark it read Bug: 17291366 Change-Id: I24f71a2b7985773814d8caad9f3ab3fe5c3609c8
* | Enable third-party cookies. b/16014255Andrew Sapperstein2014-10-151-3/+1
|/ | | | Change-Id: I7ed53f0d684c2b67e3489829a62b07457e26e401
* Expose constant mailto field as public.Greg Bullock2014-10-061-1/+1
| | | | Change-Id: I54552707a9643b983f6d93c61c81ac1c7fea02f2
* Disable unused menu itemsJin Cao2014-09-291-4/+13
| | | | | | | | | | Since we now have keyboard shortcuts, it's no longer enough to simply set menu items invisible. For menu items that are no longer valid, use both setVisible and setEnabled. b/17692730 Change-Id: Iad9fb9b6638a68a4650cba699ea430c5c6e6e0fe
* Fix IndexArrayOutOfBounds in Utils.insertStringWithStyleRégis Décamps2014-09-261-5/+7
| | | | | | | | Fix `IndexOutOfBoundsException: setSpan (-1 ... N) starts before 0` when Utils.insertStringWithStyle() is called with a substring not present in entireString. Change-Id: I42ff06aab20c2a9800abe7daed8cf408eb3c2038
* New keyboard shortcutsJin Cao2014-09-251-0/+1
| | | | | | | | | Does not include ctrl+ENTER for SEND & we need a new key for REPLY since we are not supporting shift. b/17070243 Change-Id: Ia5f179336dfc2b6631e1a5f26ee888f82f4873c0
* Merge "Avoid potential NPE in CVF" into ub-gmail-ur14-devTony Mantler2014-09-111-1/+2
|\
| * Avoid potential NPE in CVFTony Mantler2014-09-111-1/+2
| | | | | | | | | | | | b/17471688 Change-Id: Iea162b21995a93927c6a1e3238c1e9bb4a922131
* | Fix keyboard RTL navigationJin Cao2014-09-101-5/+0
|/ | | | | | | | | | | | | | Main issue is that we no longer need the focus changes in onViewModeChanged because we handle left/right navigation individually. Furthermore, changed isRtl check to using the ViewCompat version instead of the locale version so it's easier to test (locale version doesn't work for force rtl in dev options). b/17234283 Change-Id: I3f87e67ed1c7457370f8cdb63cc3abaa57211db9
* Don't cache resources across configuration changesTony Mantler2014-09-051-128/+87
| | | | | | | | Also clean up unused routines and resources b/16547234 Change-Id: Idfe8210d8f6f38363daa534d68dfd21440bc352d
* Support keyboard navigation for RTLJin Cao2014-09-021-1/+7
| | | | | | | In two-pane landscape mode support our custom navigation for RTL mode (left/right reversed). Change-Id: I8d3afe1362fc935f8b6140ce37bcfd6a9ba88bb2
* [Quantum TL] nested foldersJin Cao2014-08-201-12/+0
| | | | | | | | | | Update the nested folders UI to reflect the newest redlines. Also removed all signs of list_edge_tablet since it's no longer relevant. b/16017301 Change-Id: I24fcb43984b595a4fed84622e79ce76deaa92d2b
* mini-drawer. new tablet UI.Andy Huang2014-08-011-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | New MiniDrawerView class for a minimized drawer UI with shortcuts to the main drawer logic to switch accounts and folders. The "drawer" is now always visible except in portrait conversation view. Can't easily use an actual DrawerLayout because: -drawers usually occlude other views, they don't push -we have that omnipresent 'mini' version -we want custom control over dragging to trigger a fancy animation (not just edge swipe!) (I'll revisit this later.) Even ActionBarDrawerToggle alone can't be used w/o DrawerLayout, so for now, all of this drawer logic (dragging not yet implemented) is from scratch. TwoPaneLayout no longer "shifts" its panes to transition from TL->CV in landscape; the panes are now fixed in position. Not yet implemented is a 'conversation-visible-but-not-marked-read' state necessary to avoid the initial gray expanse there right now. Bug: 16147175 Change-Id: I021aaff15afebb76db6722265e2a592213674405
* stable action itemsAndrew Sapperstein2014-07-231-38/+0
| | | | | | b/16167419 Change-Id: I72c7c44f5728563da1fcbd39daa31ccd41845d8a
* Action bar update - asset swapping. b/16167419Andrew Sapperstein2014-07-211-8/+0
| | | | | | | | Not all assets are ready, but those that are have been swapped in this CL for TL and CV. This CL does none of the changes for action item placement. Change-Id: I7ce383806a9c9e6591b77f646bb5ba569be74810
* Delete dead code.Andrew Sapperstein2014-07-181-21/+0
| | | | Change-Id: I030ef1ceccb8ad24baba5cc4cae87fd41715c0ed
* Add support for folders showing only unseen message countTony Mantler2014-07-171-1/+3
| | | | | | | | Also remove some unused folder capabilities b/15966080 Change-Id: Id444beb9a46e41f59d719088b329477fb19f0475
* Add isConnected(Context) utility method.Régis Décamps2014-07-161-0/+13
| | | | Change-Id: I761d9c6408546fa47248d1c5e5b756ce91ff2465
* Format unseen count as "x new"Tony Mantler2014-07-141-2/+30
| | | | | | b/15966080 Change-Id: I0e8f9a325c61e156dd16a8c4cf22bb5d37939808
* On L devices hide app iconPaul Westbrook2014-06-281-0/+6
| | | | Change-Id: Ibe16fd44a1d5aeefec7c8b9a2c91f4a3f8d6fe9b
* Adding util functions to shared location.Milos Stankovic2014-06-261-12/+33
| | | | | | | | | | Adding 2 functions to util for: -getting and caching version code -setting custom user agent so we don't get interstitials b/15705426 Change-Id: Iafa588ff8f6fff62500e516756cf507b6feb059c
* am 39667579: Consider null Uri to be "empty" as wellJin Cao2014-06-031-1/+1
|\ | | | | | | | | * commit '39667579c1fd3d0275b404ae9a94b28f0c775657': Consider null Uri to be "empty" as well
| * Consider null Uri to be "empty" as wellJin Cao2014-06-031-1/+1
| | | | | | | | | | | | | | | | | | Some uris are not instantiated as Uri.Empty. For those uris, being null has the same meaning as being empty, so let's add the check. b/15388298 Change-Id: I2d32371c4889eb517461db9aa55e6b19e361e708
* | am 9695e004: Properly check for empty UriJin Cao2014-05-291-1/+1
|\| | | | | | | | | * commit '9695e0046f79bd2d7166a411d6feff4cf0fb2539': Properly check for empty Uri
| * Properly check for empty UriJin Cao2014-05-291-1/+1
| | | | | | | | | | | | | | | | | | | | Uri == Uri.empty doesn't work. Changed all uses of Uri == Uri.empty to Uri.empty.equals(Uri). Refactored the function into a helper function inside Folder to check if a given folder is top level. b/14987117 Change-Id: I22b7a0bf7fbfcbd14936e5ff9b428fd3f4c15e60
* | Disambiguate settings intentsTony Mantler2014-05-221-0/+10
|/ | | | | | b/13325901 Change-Id: Id85ba4594c89e541367aa035d4a31f5ab67d6545
* Fix testsTony Mantler2014-04-291-1/+2
| | | | | | Under test, the ActivityManager may be null Change-Id: I56848c572a18c9f16e235cefd662e5042863c525
* Allowing overriding conversation list load limit.Andrew Sapperstein2014-04-011-1/+2
| | | | | | | | | | | | b/7280077 One issue we saw was that if the conversation was not in the initial 50 conversations, we would get punted out of the conversation list. Now we have an additional extra in ACTION_VIEW intents that allow ignoring the limit for the first load of the ConversationCursor. Change-Id: I737c45e122df4dda7c63794ddc7036be61d5ebd4
* add handy util to bucketize latencies for analyticsAndy Huang2014-03-261-0/+20
| | | | Change-Id: I229b767c7a929e46cb5bf27ccf2553ce55b9af59
* View entire message UI.Andrew Sapperstein2014-03-141-0/+3
| | | | | | | | | | | | | We need the per-message plid server support, but we are forwarding the clipped bit to the UI and showing a button based on that bit. Clicking that bit will open the plid viewer for gmail. Email should be unaffected as it does not ever return clipped as true. b/2887917. Change-Id: Iddb54e37cf650ca16a75fcbe69f1861becdd81b9
* Move Help & feedback to Nav drawer of Email.James Lemieux2014-03-131-68/+43
| | | | | | | | | | | | | | | | | | | b/11061485 Gmail remains unchanged due to this checkin. HELP and SEND FEEDBACK are now the two bottom-most drawer items in the Navigation drawer of the Email application when it is present or in the overflow menu when it is not present. SEND FEEDBACK still behaves as always. HELP has been redesigned so that it displays the help content in a local webview rather than using an external browser in the Email application. Change-Id: If1bdba26ac2caca79c81205a409c67659cd49653
* RTL the conversation list and two pane layout.Andrew Sapperstein2014-01-151-16/+9
| | | | | | | | Fixes: b/12451886 b/12452546 Change-Id: If2bd3d63c07eda3190d16fd95746c0105b251406
* Deduplicate Address classTony Mantler2014-01-081-22/+1
| | | | Change-Id: I4f6df51f5641475ffaf96b0189ccc00748880cc0
* Properly getLayoutDirection in RTL.Andrew Sapperstein2014-01-031-1/+3
| | | | | | | | Fixes b/11973362. Apparently View.getLayoutDirection is not valid until measure has been called at least once. Thus calling it in onFinishInflate wasn't working reliably. Change-Id: I1651d21438e8fe03a0b063b65833708bbc1139f6
* am 0a2a346c: fix internal fancy mailtosAndy Huang2013-12-201-1/+1
|\ | | | | | | | | * commit '0a2a346c8f40ad256eef840338a75a3bdfbe8251': fix internal fancy mailtos
| * fix internal fancy mailtosAndy Huang2013-12-201-1/+1
| | | | | | | | | | | | | | | | | | | | Mailto: links that included anything other than a "to" address weren't handled correctly when a user clicked on one from within a message body. Pass the entire 'mailto' URL to ComposeActivity to ensure our normal mailto parsing code kicks in. Bug: 12137171 Change-Id: I0352ecc80b7c9cfadeb605f8e0b2a694387c9b03
* | Remove unused code.Tony Mantler2013-12-051-326/+0
|/ | | | Change-Id: I1d0d976bd44d089cb1f0d6f852ddc497ab0cee29
* tweak 'show images' teaser textAndy Huang2013-11-011-3/+1
| | | | | Bug: 11044804 Change-Id: I5c1c7c256ab813e394eeaf67d27f08567768a1af
* New message bar fixes and better undo background.Andrew Sapperstein2013-10-281-1/+8
| | | | | | | | | | Fixes b/10705091 by changing strings. Also provides K backgrounds. Finally, fixes undo background on K, making the highlight be the entire area to the right of the divider. b/11292303. Change-Id: Ice98f3569274a953c1ef5b859d7ff182466cb9dc
* am c19bbbca: Merge "Divert mailto Uris directly to compose activity" into ↵Tony Mantler2013-10-251-4/+14
|\ | | | | | | | | | | | | jb-ub-mail-ur10 * commit 'c19bbbcaa6f19fc69af3791f628a8b729b34758e': Divert mailto Uris directly to compose activity
| * Merge "Divert mailto Uris directly to compose activity" into jb-ub-mail-ur10Tony Mantler2013-10-251-4/+14
| |\
| | * Divert mailto Uris directly to compose activityTony Mantler2013-10-241-4/+14
| | | | | | | | | | | | | | | | | | b/11329313 Change-Id: I9c255b2018b25669557b208e749e56e7fe1597b4
* | | resolved conflicts for merge of 08ac01fc to jb-ub-mail-ur11Tony Mantler2013-10-251-1/+29
|\| | | | | | | | | | | Change-Id: I5766599c2ee08de615f3047b57f1c72d63908b36
| * | Normalize the whole email address when comparing.Tony Mantler2013-10-241-0/+28
| |/ | | | | | | | | | | b/11336576 Change-Id: I5e79c0d37337f848b385697799d45bf922f86ff1
* | Merge "Vacation responder. b/11238929." into jb-ub-mail-ur11Andrew Sapperstein2013-10-251-1/+1
|\ \
| * | Vacation responder. b/11238929.Andrew Sapperstein2013-10-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The actual Java classes are all in UnifiedGmail for now due to time constraints. This is mostly all of the resources so that it doesn't all have to be copied over once Email wants to enable it. Change-Id: Ia42392e3d1c258fdbf39496ee9e4fb8226796358
* | | Always show images teaserAlice Yang2013-10-231-0/+20
|/ / | | | | | | | | | | Bug 11158252 Change-Id: Ied621399e5365e5db5b7d75318df53560de9f2ce
* | Update to use SDK_INT for isKitkatOrGreater.Andrew Sapperstein2013-10-081-3/+2
| | | | | | | | | | | | Fixes b/10714037. Change-Id: Ie9f925953d03e263d668b97f5cc5fdf59ffb9665