Snap for 5811135 from 5e4abaf8f30eb1cef495656786efccdbc7acb17e to qt-qpr1-release

Change-Id: I1c83702a096c8276cc2199a084d60827f501cb82
diff --git a/29/public/api/incompatibilities.txt b/29/public/api/incompatibilities.txt
new file mode 100644
index 0000000..bc1a3ab
--- /dev/null
+++ b/29/public/api/incompatibilities.txt
@@ -0,0 +1,91 @@
+// Baseline format: 1.0
+ChangedThrows: android.app.admin.DevicePolicyManager#setAlwaysOnVpnPackage(android.content.ComponentName, String, boolean):
+    Method android.app.admin.DevicePolicyManager.setAlwaysOnVpnPackage no longer throws exception java.lang.UnsupportedOperationException
+ChangedThrows: java.util.Optional#orElseThrow(java.util.function.Supplier<? extends X>):
+    Method java.util.Optional.orElseThrow added thrown exception X
+ChangedThrows: java.util.OptionalDouble#orElseThrow(java.util.function.Supplier<X>):
+    Method java.util.OptionalDouble.orElseThrow added thrown exception X
+ChangedThrows: java.util.OptionalInt#orElseThrow(java.util.function.Supplier<X>):
+    Method java.util.OptionalInt.orElseThrow added thrown exception X
+ChangedThrows: java.util.OptionalLong#orElseThrow(java.util.function.Supplier<X>):
+    Method java.util.OptionalLong.orElseThrow added thrown exception X
+ChangedThrows: java.util.regex.Matcher#start(int):
+    Method java.util.regex.Matcher.start no longer throws exception java.lang.IllegalStateException
+ChangedThrows: java.util.regex.Pattern#compile(String, int):
+    Method java.util.regex.Pattern.compile no longer throws exception java.util.regex.PatternSyntaxException
+
+
+ChangedType: android.os.Parcel#readSparseArray(ClassLoader):
+    Method android.os.Parcel.readSparseArray has changed return type from android.util.SparseArray to android.util.SparseArray<T>
+
+
+InvalidNullConversion: android.os.DropBoxManager#getNextEntry(String, long) parameter #0:
+    Attempted to remove @NonNull annotation from parameter tag in android.os.DropBoxManager.getNextEntry(String tag, long msec)
+InvalidNullConversion: java.io.PrintWriter#format(String, java.lang.Object...) parameter #1:
+    Attempted to change parameter from @Nullable to @NonNull: incompatible change for parameter args in java.io.PrintWriter.format(String format, java.lang.Object... args)
+InvalidNullConversion: java.io.PrintWriter#format(java.util.Locale, String, java.lang.Object...) parameter #2:
+    Attempted to change parameter from @Nullable to @NonNull: incompatible change for parameter args in java.io.PrintWriter.format(java.util.Locale l, String format, java.lang.Object... args)
+InvalidNullConversion: java.io.PrintWriter#printf(String, java.lang.Object...) parameter #1:
+    Attempted to change parameter from @Nullable to @NonNull: incompatible change for parameter args in java.io.PrintWriter.printf(String format, java.lang.Object... args)
+InvalidNullConversion: java.io.PrintWriter#printf(java.util.Locale, String, java.lang.Object...) parameter #2:
+    Attempted to change parameter from @Nullable to @NonNull: incompatible change for parameter args in java.io.PrintWriter.printf(java.util.Locale l, String format, java.lang.Object... args)
+InvalidNullConversion: java.lang.Character#toChars(int):
+    Attempted to remove @NonNull annotation from method java.lang.Character.toChars(int)
+InvalidNullConversion: java.lang.Class#getEnumConstants():
+    Attempted to change method return from @NonNull to @Nullable: incompatible change for method java.lang.Class.getEnumConstants()
+InvalidNullConversion: java.lang.Class#getSigners():
+    Attempted to change method return from @NonNull to @Nullable: incompatible change for method java.lang.Class.getSigners()
+InvalidNullConversion: java.lang.String#format(String, java.lang.Object...) parameter #1:
+    Attempted to change parameter from @Nullable to @NonNull: incompatible change for parameter args in java.lang.String.format(String format, java.lang.Object... args)
+InvalidNullConversion: java.lang.String#format(java.util.Locale, String, java.lang.Object...) parameter #2:
+    Attempted to change parameter from @Nullable to @NonNull: incompatible change for parameter args in java.lang.String.format(java.util.Locale l, String format, java.lang.Object... args)
+InvalidNullConversion: java.util.Map#put(K, V) parameter #0:
+    Attempted to remove @NonNull annotation from parameter key in java.util.Map.put(K key, V value)
+InvalidNullConversion: java.util.Map#put(K, V) parameter #1:
+    Attempted to remove @NonNull annotation from parameter value in java.util.Map.put(K key, V value)
+InvalidNullConversion: java.util.Map#putIfAbsent(K, V) parameter #0:
+    Attempted to remove @NonNull annotation from parameter key in java.util.Map.putIfAbsent(K key, V value)
+InvalidNullConversion: java.util.Map#putIfAbsent(K, V) parameter #1:
+    Attempted to remove @NonNull annotation from parameter value in java.util.Map.putIfAbsent(K key, V value)
+InvalidNullConversion: java.util.Map#replace(K, V) parameter #0:
+    Attempted to remove @NonNull annotation from parameter key in java.util.Map.replace(K key, V value)
+InvalidNullConversion: java.util.Map#replace(K, V) parameter #1:
+    Attempted to remove @NonNull annotation from parameter value in java.util.Map.replace(K key, V value)
+
+
+RemovedDeprecatedMethod: android.graphics.Picture#createFromStream(java.io.InputStream):
+    Removed deprecated method android.graphics.Picture.createFromStream(java.io.InputStream)
+RemovedDeprecatedMethod: android.graphics.Picture#writeToStream(java.io.OutputStream):
+    Removed deprecated method android.graphics.Picture.writeToStream(java.io.OutputStream)
+RemovedDeprecatedMethod: android.icu.text.CollationElementIterator#hashCode():
+    Removed deprecated method android.icu.text.CollationElementIterator.hashCode()
+RemovedDeprecatedMethod: android.icu.text.CurrencyPluralInfo#hashCode():
+    Removed deprecated method android.icu.text.CurrencyPluralInfo.hashCode()
+RemovedDeprecatedMethod: android.icu.text.PluralRules#hashCode():
+    Removed deprecated method android.icu.text.PluralRules.hashCode()
+RemovedDeprecatedMethod: android.icu.text.StringPrepParseException#hashCode():
+    Removed deprecated method android.icu.text.StringPrepParseException.hashCode()
+RemovedDeprecatedMethod: android.location.LocationManager#addNmeaListener(android.location.GpsStatus.NmeaListener):
+    Removed deprecated method android.location.LocationManager.addNmeaListener(android.location.GpsStatus.NmeaListener)
+RemovedDeprecatedMethod: android.location.LocationManager#removeNmeaListener(android.location.GpsStatus.NmeaListener):
+    Removed deprecated method android.location.LocationManager.removeNmeaListener(android.location.GpsStatus.NmeaListener)
+RemovedDeprecatedMethod: android.telephony.TelephonyManager#getNeighboringCellInfo():
+    Removed deprecated method android.telephony.TelephonyManager.getNeighboringCellInfo()
+
+
+RemovedMethod: android.companion.AssociationRequest.Builder#checkNotUsed():
+    Removed method android.companion.AssociationRequest.Builder.checkNotUsed()
+RemovedMethod: android.companion.AssociationRequest.Builder#markUsed():
+    Removed method android.companion.AssociationRequest.Builder.markUsed()
+RemovedMethod: android.companion.BluetoothDeviceFilter.Builder#checkNotUsed():
+    Removed method android.companion.BluetoothDeviceFilter.Builder.checkNotUsed()
+RemovedMethod: android.companion.BluetoothDeviceFilter.Builder#markUsed():
+    Removed method android.companion.BluetoothDeviceFilter.Builder.markUsed()
+RemovedMethod: android.companion.BluetoothLeDeviceFilter.Builder#checkNotUsed():
+    Removed method android.companion.BluetoothLeDeviceFilter.Builder.checkNotUsed()
+RemovedMethod: android.companion.BluetoothLeDeviceFilter.Builder#markUsed():
+    Removed method android.companion.BluetoothLeDeviceFilter.Builder.markUsed()
+RemovedMethod: android.companion.WifiDeviceFilter.Builder#checkNotUsed():
+    Removed method android.companion.WifiDeviceFilter.Builder.checkNotUsed()
+RemovedMethod: android.companion.WifiDeviceFilter.Builder#markUsed():
+    Removed method android.companion.WifiDeviceFilter.Builder.markUsed()
diff --git a/29/system/api/incompatibilities.txt b/29/system/api/incompatibilities.txt
new file mode 100644
index 0000000..00d47aa
--- /dev/null
+++ b/29/system/api/incompatibilities.txt
@@ -0,0 +1,35 @@
+// Baseline format: 1.0
+AddedAbstractMethod: android.content.pm.PackageManager#arePermissionsIndividuallyControlled():
+    Added method android.content.pm.PackageManager.arePermissionsIndividuallyControlled() to the system API
+AddedAbstractMethod: android.webkit.WebViewProvider#getWebViewRenderProcess():
+    Added method android.webkit.WebViewProvider.getWebViewRenderProcess() to the system API
+AddedAbstractMethod: android.webkit.WebViewProvider#getWebViewRenderProcessClient():
+    Added method android.webkit.WebViewProvider.getWebViewRenderProcessClient() to the system API
+AddedAbstractMethod: android.webkit.WebViewProvider#setWebViewRenderProcessClient(java.util.concurrent.Executor, android.webkit.WebViewRenderProcessClient):
+    Added method android.webkit.WebViewProvider.setWebViewRenderProcessClient(java.util.concurrent.Executor,android.webkit.WebViewRenderProcessClient) to the system API
+
+
+RemovedDeprecatedMethod: android.location.LocationManager#addGpsMeasurementListener(android.location.GpsMeasurementsEvent.Listener):
+    Removed deprecated method android.location.LocationManager.addGpsMeasurementListener(android.location.GpsMeasurementsEvent.Listener)
+RemovedDeprecatedMethod: android.location.LocationManager#addGpsNavigationMessageListener(android.location.GpsNavigationMessageEvent.Listener):
+    Removed deprecated method android.location.LocationManager.addGpsNavigationMessageListener(android.location.GpsNavigationMessageEvent.Listener)
+RemovedDeprecatedMethod: android.location.LocationManager#removeGpsMeasurementListener(android.location.GpsMeasurementsEvent.Listener):
+    Removed deprecated method android.location.LocationManager.removeGpsMeasurementListener(android.location.GpsMeasurementsEvent.Listener)
+RemovedDeprecatedMethod: android.location.LocationManager#removeGpsNavigationMessageListener(android.location.GpsNavigationMessageEvent.Listener):
+    Removed deprecated method android.location.LocationManager.removeGpsNavigationMessageListener(android.location.GpsNavigationMessageEvent.Listener)
+RemovedDeprecatedMethod: android.telephony.TelephonyManager#answerRingingCall():
+    Removed deprecated method android.telephony.TelephonyManager.answerRingingCall()
+RemovedDeprecatedMethod: android.telephony.TelephonyManager#endCall():
+    Removed deprecated method android.telephony.TelephonyManager.endCall()
+RemovedDeprecatedMethod: android.telephony.TelephonyManager#silenceRinger():
+    Removed deprecated method android.telephony.TelephonyManager.silenceRinger()
+
+
+RemovedField: android.Manifest.permission#CAPTURE_SECURE_VIDEO_OUTPUT:
+    Removed field android.Manifest.permission.CAPTURE_SECURE_VIDEO_OUTPUT
+RemovedField: android.Manifest.permission#CAPTURE_VIDEO_OUTPUT:
+    Removed field android.Manifest.permission.CAPTURE_VIDEO_OUTPUT
+RemovedField: android.Manifest.permission#MANAGE_DEVICE_ADMINS:
+    Removed field android.Manifest.permission.MANAGE_DEVICE_ADMINS
+RemovedField: android.Manifest.permission#READ_FRAME_BUFFER:
+    Removed field android.Manifest.permission.READ_FRAME_BUFFER
diff --git a/Android.bp b/Android.bp
index ec72c4d..e56cc15 100644
--- a/Android.bp
+++ b/Android.bp
@@ -30,7 +30,7 @@
 genrule {
     name: "last-released-public-api",
     srcs: [
-        "*/public/api/android.txt",
+        "28/public/api/android.txt",
     ],
     cmd: "cp -f $$(echo $(in) | tr \" \" \"\\n\" | sort -t/ -k3 -n | tail -1) $(genDir)/last-released-api.txt",
     out: [
@@ -41,7 +41,7 @@
 genrule {
     name: "last-released-system-api",
     srcs: [
-        "*/system/api/android.txt",
+        "28/system/api/android.txt",
     ],
     cmd: "cp -f $$(echo $(in) | tr \" \" \"\\n\" | sort -t/ -k3 -n | tail -1) $(genDir)/last-released-api.txt",
     out: [
@@ -50,13 +50,24 @@
 }
 
 genrule {
-    name: "public-api-for-metalava-annotations",
+    name: "public-api-incompatibilities-with-last-released",
     srcs: [
-        "*/public/api/android.txt",
+        "*/public/api/incompatibilities.txt",
     ],
-    cmd: "cp -f $$(echo $(in) | tr \" \" \"\\n\" | sort -t/ -k3 -n | tail -2 | head -1) $(genDir)/last-released-api.txt",
+    cmd: "cp -f $$(echo $(in) | tr \" \" \"\\n\" | sort -t/ -k3 -n | tail -1) $(genDir)/incompatibilities.txt",
     out: [
-        "last-released-api.txt",
+        "incompatibilities.txt",
+    ],
+}
+
+genrule {
+    name: "system-api-incompatibilities-with-last-released",
+    srcs: [
+        "*/system/api/incompatibilities.txt",
+    ],
+    cmd: "cp -f $$(echo $(in) | tr \" \" \"\\n\" | sort -t/ -k3 -n | tail -1) $(genDir)/incompatibilities.txt",
+    out: [
+        "incompatibilities.txt",
     ],
 }