From 2cd1e6eda90170114e0795b13f65f964296cf2f2 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Fri, 15 Jan 2010 16:20:36 -0800 Subject: Fix for 2292713: Remove workaround that hides SlidingTab widget while internal state is inconsistent. The previous workaround for this race condition prevented glitches by postponing drawing the SlidingTab until the internal state was consistent. Unfortunately, the InCallScreen seems to trigger this most of the time if the keyboard is open or the last application was in landscape mode. Instead, we'll handle this separately in lockscreen. --- .../com/android/internal/widget/SlidingTab.java | 18 ++--------------- core/res/res/values-land/donottranslate.xml | 23 ++++++++++++++++++++++ core/res/res/values/donottranslate.xml | 2 ++ 3 files changed, 27 insertions(+), 16 deletions(-) create mode 100644 core/res/res/values-land/donottranslate.xml diff --git a/core/java/com/android/internal/widget/SlidingTab.java b/core/java/com/android/internal/widget/SlidingTab.java index f07b2f1092f6..940a2e5014ce 100644 --- a/core/java/com/android/internal/widget/SlidingTab.java +++ b/core/java/com/android/internal/widget/SlidingTab.java @@ -148,20 +148,6 @@ public class SlidingTab extends ViewGroup { void onGrabbedStateChange(View v, int grabbedState); } - // TODO: For debugging; remove after glitches debugged. - @Override - protected void dispatchDraw(Canvas canvas) { - int orientation = getResources().getConfiguration().orientation; - if (mOrientation == HORIZONTAL && orientation != Configuration.ORIENTATION_PORTRAIT - || mOrientation == VERTICAL && orientation != Configuration.ORIENTATION_LANDSCAPE) { - // UBER HACK ALERT. This is a workaround for a configuration race condition between - // orientation changed notification and the resize notification. This just prevents - // us from drawing under this circumstance, though the view will still be wrong. - return; - } - super.dispatchDraw(canvas); - } - /** * Simple container class for all things pertinent to a slider. * A slider consists of 3 Views: @@ -436,7 +422,7 @@ public class SlidingTab extends ViewGroup { /** * Start animating the slider. Note we need two animations since an Animator * keeps internal state of the invalidation region which is just the view being animated. - * + * * @param anim1 * @param anim2 */ @@ -674,7 +660,7 @@ public class SlidingTab extends ViewGroup { resetView(); } anim.setAnimationListener(mAnimationDoneListener); - + /* Animation can be the same for these since the animation just holds */ mLeftSlider.startAnimation(anim, anim); mRightSlider.startAnimation(anim, anim); diff --git a/core/res/res/values-land/donottranslate.xml b/core/res/res/values-land/donottranslate.xml new file mode 100644 index 000000000000..75a7b06fc158 --- /dev/null +++ b/core/res/res/values-land/donottranslate.xml @@ -0,0 +1,23 @@ + + + + + false + diff --git a/core/res/res/values/donottranslate.xml b/core/res/res/values/donottranslate.xml index 6def3bfdd1b0..78d4d36dabc4 100644 --- a/core/res/res/values/donottranslate.xml +++ b/core/res/res/values/donottranslate.xml @@ -20,4 +20,6 @@ Latin-1 + + true -- cgit v1.2.3-59-g8ed1b