Adding @hide to UpdateEngineStable

Adding hide annotation to ue stable APIs and updating interface version.
Freezing interface with version 2.

Test: m libupdate_engine_stable-V2-java
Bug: 317914533

Change-Id: Ice7d095b9a6903754ab76e1e097d941773119508
diff --git a/stable/Android.bp b/stable/Android.bp
index 54ae35d..aed493a 100644
--- a/stable/Android.bp
+++ b/stable/Android.bp
@@ -49,7 +49,18 @@
             ],
         },
     },
-    versions: ["1"],
+    versions_with_info: [
+        {
+            version: "1",
+            imports: [],
+        },
+        {
+            version: "2",
+            imports: [],
+        },
+    ],
+    frozen: true,
+
 }
 
 // update_engine_stable_client (type: executable)
diff --git a/stable/aidl_api/libupdate_engine_stable/2/.hash b/stable/aidl_api/libupdate_engine_stable/2/.hash
new file mode 100644
index 0000000..6661ad2
--- /dev/null
+++ b/stable/aidl_api/libupdate_engine_stable/2/.hash
@@ -0,0 +1 @@
+ee2e6f0bd51391955f79f4d5eeeafc37c668cd40
diff --git a/stable/aidl_api/libupdate_engine_stable/2/android/os/IUpdateEngineStable.aidl b/stable/aidl_api/libupdate_engine_stable/2/android/os/IUpdateEngineStable.aidl
new file mode 100644
index 0000000..43e8dd0
--- /dev/null
+++ b/stable/aidl_api/libupdate_engine_stable/2/android/os/IUpdateEngineStable.aidl
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.os;
+/* @hide */
+interface IUpdateEngineStable {
+  /* @hide */
+  void applyPayloadFd(in ParcelFileDescriptor pfd, in long payload_offset, in long payload_size, in String[] headerKeyValuePairs);
+  /* @hide */
+  boolean bind(android.os.IUpdateEngineStableCallback callback);
+  /* @hide */
+  boolean unbind(android.os.IUpdateEngineStableCallback callback);
+}
diff --git a/stable/aidl_api/libupdate_engine_stable/2/android/os/IUpdateEngineStableCallback.aidl b/stable/aidl_api/libupdate_engine_stable/2/android/os/IUpdateEngineStableCallback.aidl
new file mode 100644
index 0000000..c09fa43
--- /dev/null
+++ b/stable/aidl_api/libupdate_engine_stable/2/android/os/IUpdateEngineStableCallback.aidl
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.os;
+/* @hide */
+interface IUpdateEngineStableCallback {
+  /* @hide */
+  oneway void onStatusUpdate(int status_code, float percentage);
+  /* @hide */
+  oneway void onPayloadApplicationComplete(int error_code);
+}
diff --git a/stable/aidl_api/libupdate_engine_stable/current/android/os/IUpdateEngineStable.aidl b/stable/aidl_api/libupdate_engine_stable/current/android/os/IUpdateEngineStable.aidl
index 82c3ca5..43e8dd0 100644
--- a/stable/aidl_api/libupdate_engine_stable/current/android/os/IUpdateEngineStable.aidl
+++ b/stable/aidl_api/libupdate_engine_stable/current/android/os/IUpdateEngineStable.aidl
@@ -1,14 +1,30 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 ///////////////////////////////////////////////////////////////////////////////
 // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
 ///////////////////////////////////////////////////////////////////////////////
 
-// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
-// edit this file. It looks like you are doing that because you have modified
-// an AIDL interface in a backward-incompatible way, e.g., deleting a function
-// from an interface or a field from a parcelable and it broke the build. That
-// breakage is intended.
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
 //
-// You must not make a backward incompatible changes to the AIDL files built
+// You must not make a backward incompatible change to any AIDL file built
 // with the aidl_interface module type with versions property set. The module
 // type is used to build AIDL files in a way that they can be used across
 // independently updatable components of the system. If a device is shipped
@@ -16,8 +32,12 @@
 // later when a module using the interface is updated, e.g., Mainline modules.
 
 package android.os;
+/* @hide */
 interface IUpdateEngineStable {
+  /* @hide */
   void applyPayloadFd(in ParcelFileDescriptor pfd, in long payload_offset, in long payload_size, in String[] headerKeyValuePairs);
+  /* @hide */
   boolean bind(android.os.IUpdateEngineStableCallback callback);
+  /* @hide */
   boolean unbind(android.os.IUpdateEngineStableCallback callback);
 }
diff --git a/stable/aidl_api/libupdate_engine_stable/current/android/os/IUpdateEngineStableCallback.aidl b/stable/aidl_api/libupdate_engine_stable/current/android/os/IUpdateEngineStableCallback.aidl
index 4c72b49..c09fa43 100644
--- a/stable/aidl_api/libupdate_engine_stable/current/android/os/IUpdateEngineStableCallback.aidl
+++ b/stable/aidl_api/libupdate_engine_stable/current/android/os/IUpdateEngineStableCallback.aidl
@@ -1,14 +1,30 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 ///////////////////////////////////////////////////////////////////////////////
 // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
 ///////////////////////////////////////////////////////////////////////////////
 
-// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
-// edit this file. It looks like you are doing that because you have modified
-// an AIDL interface in a backward-incompatible way, e.g., deleting a function
-// from an interface or a field from a parcelable and it broke the build. That
-// breakage is intended.
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
 //
-// You must not make a backward incompatible changes to the AIDL files built
+// You must not make a backward incompatible change to any AIDL file built
 // with the aidl_interface module type with versions property set. The module
 // type is used to build AIDL files in a way that they can be used across
 // independently updatable components of the system. If a device is shipped
@@ -16,7 +32,10 @@
 // later when a module using the interface is updated, e.g., Mainline modules.
 
 package android.os;
+/* @hide */
 interface IUpdateEngineStableCallback {
+  /* @hide */
   oneway void onStatusUpdate(int status_code, float percentage);
+  /* @hide */
   oneway void onPayloadApplicationComplete(int error_code);
 }
diff --git a/stable/android/os/IUpdateEngineStable.aidl b/stable/android/os/IUpdateEngineStable.aidl
index 5aa15ba..a38ba89 100644
--- a/stable/android/os/IUpdateEngineStable.aidl
+++ b/stable/android/os/IUpdateEngineStable.aidl
@@ -25,6 +25,7 @@
  * WARNING: this interface exposes less capabilities than IUpdateEngine,
  * for instance, not having a cancel method. This is relied on for
  * security.
+ * @hide
  */
 interface IUpdateEngineStable {
   /**
@@ -39,6 +40,7 @@
    *   detected.
    * @param headerKeyValuePairs additional header key value pairs, in the format of "key=value".
    * @see android.os.UpdateEngine#applyPayload(android.content.res.AssetFileDescriptor, String[])
+   * @hide
    */
   void applyPayloadFd(in ParcelFileDescriptor pfd,
                       in long payload_offset,
@@ -59,6 +61,7 @@
    * @param callback See {@link IUpdateEngineStableCallback}
    * @return true if binding is successful, false otherwise.
    * @see android.os.UpdateEngine#bind(android.os.UpdateEngineCallback)
+   * @hide
    */
   boolean bind(IUpdateEngineStableCallback callback);
 
@@ -74,6 +77,7 @@
    * @param callback The callback to be unbound. See {@link IUpdateEngineStableCallback}.
    * @return true if unbinding is successful, false otherwise.
    * @see android.os.UpdateEngine#unbind(android.os.UpdateEngineCallback)
+   * @hide
    */
   boolean unbind(IUpdateEngineStableCallback callback);
 }
diff --git a/stable/android/os/IUpdateEngineStableCallback.aidl b/stable/android/os/IUpdateEngineStableCallback.aidl
index d8fc333..4f91c15 100644
--- a/stable/android/os/IUpdateEngineStableCallback.aidl
+++ b/stable/android/os/IUpdateEngineStableCallback.aidl
@@ -18,6 +18,7 @@
 
 /**
  * The stable Callback interface for IUpdateEngineStable.
+ * @hide
  */
 oneway interface IUpdateEngineStableCallback {
   /**
@@ -26,6 +27,7 @@
    * @param status_code see {@link android.os.UpdateEngine.UpdateStatusConstants}.
    * @param percentage percentage of progress of the current stage.
    * @see android.os.UpdateEngineCallback#onStatusUpdate(int, float)
+   * @hide
    */
   void onStatusUpdate(int status_code, float percentage);
 
@@ -34,6 +36,7 @@
    *
    * @param error_code see {@link android.os.UpdateEngine.ErrorCodeConstants}
    * @see android.os.UpdateEngineCallback#onPayloadApplicationComplete(int)
+   * @hide
    */
   void onPayloadApplicationComplete(int error_code);
 }