Snap for 6439596 from 952e3cf27f86ef4e797ba76d0ee108aae3d132fe to qt-aml-tzdata-release

Change-Id: Ic9809e07476ede28905e110dc19059b6583bea43
diff --git a/Android.bp b/Android.bp
index 04d4aa9..409f9e6 100644
--- a/Android.bp
+++ b/Android.bp
@@ -12,25 +12,14 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-filegroup {
-    name: "org.apache.http.legacy.sources",
-    srcs: ["src/**/*.java"],
-    path: "src",
-    visibility: ["//visibility:private"],
-}
-
-filegroup {
-    name: "org.apache.http.legacy.android.sources",
-    srcs: ["android/src/**/*.java"],
-    path: "android/src",
-    visibility: ["//visibility:private"],
-}
-
 java_sdk_library {
     name: "org.apache.http.legacy",
     srcs: [
-        ":org.apache.http.legacy.sources",
-        ":org.apache.http.legacy.android.sources",
+        "src/**/*.java",
+        "android/**/*.java",
+    ],
+    api_srcs: [
+        ":apache-http-stubs-sources",
     ],
     api_packages: [
         "android.net.compatibility",
@@ -90,12 +79,3 @@
         "--subtract-api $(location :frameworks-base-api-current.txt)",
     ],
 }
-
-// Make the current.txt available for use by the cts/tests/signature tests.
-// ========================================================================
-filegroup {
-    name: "apache-http-legacy-current.txt",
-    srcs: [
-        "api/current.txt",
-    ],
-}
diff --git a/OWNERS b/OWNERS
index 87a5dbe..7323d82 100644
--- a/OWNERS
+++ b/OWNERS
@@ -1 +1,5 @@
-include platform/libcore:/OWNERS
+# Default code reviewers picked from top 3 or more developers.
+# Please update this list if you find better candidates.
+nfuller@google.com
+paulduffin@google.com
+narayan@google.com
diff --git a/android/src/android/net/http/LegacyHttpDateTime.java b/android/src/android/net/http/LegacyHttpDateTime.java
index f6b8b2b..f8d0529 100644
--- a/android/src/android/net/http/LegacyHttpDateTime.java
+++ b/android/src/android/net/http/LegacyHttpDateTime.java
@@ -16,9 +16,9 @@
 
 package android.net.http;
 
+import android.text.format.Time;
+
 import java.util.Calendar;
-import java.util.GregorianCalendar;
-import java.util.TimeZone;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -108,16 +108,17 @@
             }
         }
 
-        TimeZone utc = TimeZone.getTimeZone("UTC");
-        GregorianCalendar calendar = new GregorianCalendar(utc);
-        calendar.set(Calendar.YEAR, year);
-        calendar.set(Calendar.MONTH, month);
-        calendar.set(Calendar.DAY_OF_MONTH, date);
-        calendar.set(Calendar.HOUR_OF_DAY, timeOfDay.hour);
-        calendar.set(Calendar.MINUTE, timeOfDay.minute);
-        calendar.set(Calendar.SECOND, timeOfDay.second);
-        calendar.set(Calendar.MILLISECOND, 0);
-        return calendar.getTimeInMillis();
+        // FIXME: Y2038 BUG!
+        if (year >= 2038) {
+            year = 2038;
+            month = Calendar.JANUARY;
+            date = 1;
+        }
+
+        Time time = new Time(Time.TIMEZONE_UTC);
+        time.set(timeOfDay.second, timeOfDay.minute, timeOfDay.hour, date,
+                month, year);
+        return time.toMillis(false /* use isDst */);
     }
 
     private static int getDate(String dateString) {