Merge change I5ad37324 into eclair
* changes:
Fix issue #2262563: 40 ANR reports from com.android.settings in dogfooding sholes running ERD43
diff --git a/core/java/com/android/internal/os/BatteryStatsImpl.java b/core/java/com/android/internal/os/BatteryStatsImpl.java
index 8698cb7..5199ada 100644
--- a/core/java/com/android/internal/os/BatteryStatsImpl.java
+++ b/core/java/com/android/internal/os/BatteryStatsImpl.java
@@ -57,7 +57,7 @@
private static final int MAGIC = 0xBA757475; // 'BATSTATS'
// Current on-disk Parcel version
- private static final int VERSION = 41;
+ private static final int VERSION = 42;
private static int sNumSpeedSteps;
diff --git a/core/java/com/android/internal/widget/SlidingTab.java b/core/java/com/android/internal/widget/SlidingTab.java
index b7dd27d..cb67bfc 100644
--- a/core/java/com/android/internal/widget/SlidingTab.java
+++ b/core/java/com/android/internal/widget/SlidingTab.java
@@ -17,6 +17,7 @@
package com.android.internal.widget;
import android.content.Context;
+import android.content.res.Configuration;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Canvas;
@@ -150,6 +151,14 @@
// 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);
}