Merge "Port wi-fi stress test into GB DO NOT MERGE" into gingerbread
diff --git a/services/java/com/android/server/location/GpsLocationProvider.java b/services/java/com/android/server/location/GpsLocationProvider.java
index 3561862..63ce0bd 100755
--- a/services/java/com/android/server/location/GpsLocationProvider.java
+++ b/services/java/com/android/server/location/GpsLocationProvider.java
@@ -203,7 +203,7 @@
// flags to trigger NTP or XTRA data download when network becomes available
// initialized to true so we do NTP and XTRA when the network comes up after booting
private boolean mInjectNtpTimePending = true;
- private boolean mDownloadXtraDataPending = false;
+ private boolean mDownloadXtraDataPending = true;
// true if GPS is navigating
private boolean mNavigating;
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeTypedArray.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeTypedArray.java
index 138a455..b9f769f 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeTypedArray.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeTypedArray.java
@@ -491,18 +491,11 @@
if (ResourceHelper.stringToFloat(s, mValue)) {
float f = mValue.getDimension(mBridgeResources.mMetrics);
- if (f < 0) {
- // negative values are not allowed in pixel dimensions
- Bridge.getLog().error(LayoutLog.TAG_BROKEN,
- "Negative pixel dimension: " + s,
- null, null /*data*/);
- return defValue;
- }
-
+ final int res = (int)(f+0.5f);
+ if (res != 0) return res;
if (f == 0) return 0;
- if (f < 1) return 1;
-
- return (int)(f+0.5f);
+ if (f > 0) return 1;
+ return defValue; // this is basically unreachable.
}
// looks like we were unable to resolve the dimension value