MediaDrm: add ERROR_PROVISIONING_REQUEST_REJECTED

Native equivalents:
+-------------+-----------------------------------------------+
| component   | error code                                    |
+-------------+-----------------------------------------------+
| jni         | JERROR_DRM_PROVISIONING_REQUEST_REJECTED      |
| libmediadrm | ERROR_DRM_PROVISIONING_REQUEST_REJECTED       |
| drm hal     | ::V1_4::Status::PROVISIONING_REQUEST_REJECTED |
+-------------+-----------------------------------------------+

Bug: 180579631
Test: MediaDrmTest#testBadProvisioningRequest
Change-Id: I93da60177333dcedfb4c0a317d92fe002b7f14db
diff --git a/media/java/android/media/MediaDrm.java b/media/java/android/media/MediaDrm.java
index f7467a6..548b415 100644
--- a/media/java/android/media/MediaDrm.java
+++ b/media/java/android/media/MediaDrm.java
@@ -558,12 +558,20 @@
         public static final int ERROR_PROVISIONING_PARSE = 26;
 
         /**
+         * The provisioning server detected an error in the provisioning
+         * request.
+         * <p>
+         * Check for errors on the provisioning server.
+         */
+        public static final int ERROR_PROVISIONING_REQUEST_REJECTED = 27;
+
+        /**
          * Provisioning failed in a way that is likely to succeed on a
          * subsequent attempt.
          * <p>
          * The app should retry the operation.
          */
-        public static final int ERROR_PROVISIONING_RETRY = 27;
+        public static final int ERROR_PROVISIONING_RETRY = 28;
 
         /**
          * This indicates that apps using MediaDrm sessions are
@@ -572,7 +580,7 @@
          * <p>
          * The app should retry the operation later.
          */
-        public static final int ERROR_RESOURCE_CONTENTION = 28;
+        public static final int ERROR_RESOURCE_CONTENTION = 29;
 
         /**
          * Failed to generate a secure stop request because a field in the
@@ -581,7 +589,7 @@
          * The secure stop can't be released on the server, but the app may
          * remove it explicitly using {@link MediaDrm#removeSecureStop}.
          */
-        public static final int ERROR_SECURE_STOP_RELEASE = 29;
+        public static final int ERROR_SECURE_STOP_RELEASE = 30;
 
         /**
          * The plugin was unable to read data from the filesystem.
@@ -589,7 +597,7 @@
          * Please see the general error handling strategy for unexpected errors
          * described in {@link ErrorCodes}.
          */
-        public static final int ERROR_STORAGE_READ = 30;
+        public static final int ERROR_STORAGE_READ = 31;
 
         /**
          * The plugin was unable to write data to the filesystem.
@@ -597,7 +605,7 @@
          * Please see the general error handling strategy for unexpected errors
          * described in {@link ErrorCodes}.
          */
-        public static final int ERROR_STORAGE_WRITE = 31;
+        public static final int ERROR_STORAGE_WRITE = 32;
 
         /**
          * {@link MediaCodec#queueSecureInputBuffer} called with 0 subsamples.
@@ -605,7 +613,7 @@
          * Check the {@link MediaCodec.CryptoInfo} object passed to {@link
          * MediaCodec#queueSecureInputBuffer}.
          */
-        public static final int ERROR_ZERO_SUBSAMPLES = 32;
+        public static final int ERROR_ZERO_SUBSAMPLES = 33;
 
     }
 
@@ -637,6 +645,7 @@
         ErrorCodes.ERROR_PROVISIONING_CERTIFICATE,
         ErrorCodes.ERROR_PROVISIONING_CONFIG,
         ErrorCodes.ERROR_PROVISIONING_PARSE,
+        ErrorCodes.ERROR_PROVISIONING_REQUEST_REJECTED,
         ErrorCodes.ERROR_PROVISIONING_RETRY,
         ErrorCodes.ERROR_SECURE_STOP_RELEASE,
         ErrorCodes.ERROR_STORAGE_READ,
diff --git a/media/jni/android_media_MediaDrm.cpp b/media/jni/android_media_MediaDrm.cpp
index 56f6c45..4eada35 100644
--- a/media/jni/android_media_MediaDrm.cpp
+++ b/media/jni/android_media_MediaDrm.cpp
@@ -376,6 +376,7 @@
         STATUS_CASE(ERROR_DRM_PROVISIONING_CERTIFICATE);
         STATUS_CASE(ERROR_DRM_PROVISIONING_CONFIG);
         STATUS_CASE(ERROR_DRM_PROVISIONING_PARSE);
+        STATUS_CASE(ERROR_DRM_PROVISIONING_REQUEST_REJECTED);
         STATUS_CASE(ERROR_DRM_PROVISIONING_RETRY);
         STATUS_CASE(ERROR_DRM_RESOURCE_CONTENTION);
         STATUS_CASE(ERROR_DRM_SECURE_STOP_RELEASE);
diff --git a/media/jni/android_media_MediaDrm.h b/media/jni/android_media_MediaDrm.h
index dc0793a..a64e3f2 100644
--- a/media/jni/android_media_MediaDrm.h
+++ b/media/jni/android_media_MediaDrm.h
@@ -58,12 +58,13 @@
     JERROR_DRM_PROVISIONING_CERTIFICATE = 24,
     JERROR_DRM_PROVISIONING_CONFIG = 25,
     JERROR_DRM_PROVISIONING_PARSE = 26,
-    JERROR_DRM_PROVISIONING_RETRY = 27,
-    JERROR_DRM_RESOURCE_CONTENTION = 28,
-    JERROR_DRM_SECURE_STOP_RELEASE = 29,
-    JERROR_DRM_STORAGE_READ = 30,
-    JERROR_DRM_STORAGE_WRITE = 31,
-    JERROR_DRM_ZERO_SUBSAMPLES = 32,
+    JERROR_DRM_PROVISIONING_REQUEST_REJECTED = 27,
+    JERROR_DRM_PROVISIONING_RETRY = 28,
+    JERROR_DRM_RESOURCE_CONTENTION = 29,
+    JERROR_DRM_SECURE_STOP_RELEASE = 30,
+    JERROR_DRM_STORAGE_READ = 31,
+    JERROR_DRM_STORAGE_WRITE = 32,
+    JERROR_DRM_ZERO_SUBSAMPLES = 33,
 };
 
 struct ListenerArgs {