diff options
author | Andy Huang <ath@google.com> | 2013-04-01 16:32:18 -0700 |
---|---|---|
committer | Andy Huang <ath@google.com> | 2013-04-01 18:14:31 -0700 |
commit | e6459424b3e46d768865c908af1caa932f783095 (patch) | |
tree | 667e6f76e592756068f050a6deb4ca5dac0346fe /src/com/android/mail/ui/TwoPaneLayout.java | |
parent | 9deb0cfb54d7ec77f5f1fc86cc6479dbca4d7aaf (diff) | |
download | android_packages_apps_UnifiedEmail-e6459424b3e46d768865c908af1caa932f783095.tar.gz android_packages_apps_UnifiedEmail-e6459424b3e46d768865c908af1caa932f783095.tar.bz2 android_packages_apps_UnifiedEmail-e6459424b3e46d768865c908af1caa932f783095.zip |
fix blank conversation view on tablet when launching from intent
If a 2-pane layout pass finished before the FIRST_FOLDER loader returned
results, the layout pass triggered an early showConversation() operation
before mConversationToShow is set by the FIRST_FOLDER loader.
The later showConversation() in the FIRST_FOLDER onLoadFinished did not
re-run the operation, because it assumed a transition would run that
showConversation had to wait for. The transition does not actually run
because TwoPaneLayout debounces consecutive requests to change the view
mode.
So...
* don't switch modes on FIRST_FOLDER load unnecessarily
* FIRST_FOLDER load was triggering a mode change to LIST, so move that
into loadAccountInbox
* don't have 2-pane ask ViewMode to see if the mode changed, have it
ask TPL instead
Add some helpful optional logging, and a facility to ObjectCursorLoader
to slow down race conditions for debugging purposes.
Bug: 8408885
Change-Id: If4672c0f6c4426f810de33f65694119d678bacfb
Diffstat (limited to 'src/com/android/mail/ui/TwoPaneLayout.java')
-rw-r--r-- | src/com/android/mail/ui/TwoPaneLayout.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/mail/ui/TwoPaneLayout.java b/src/com/android/mail/ui/TwoPaneLayout.java index 79192d704..d6c4d151f 100644 --- a/src/com/android/mail/ui/TwoPaneLayout.java +++ b/src/com/android/mail/ui/TwoPaneLayout.java @@ -485,6 +485,10 @@ final class TwoPaneLayout extends FrameLayout implements ModeChangeListener { requestLayout(); } + public boolean isModeChangePending() { + return mPositionedMode != mCurrentMode; + } + private void setPaneWidth(View pane, int w) { final ViewGroup.LayoutParams lp = pane.getLayoutParams(); if (lp.width == w) { |