Add cts shim apex with prebuilts am: 330e0c85c5 am: 761f86e962

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/apex/+/11929818

Change-Id: Ib0ec8d88a6e0cff90be5f0e5dcf36fd90a6b006f
diff --git a/shim/build/Android.bp b/shim/build/Android.bp
index b8deb8f..2667984 100644
--- a/shim/build/Android.bp
+++ b/shim/build/Android.bp
@@ -238,6 +238,20 @@
   allowed_files: "default_shim_allowed_list.txt",
 }
 
+// This is to install the flattened version of com.android.apex.cts.shim.
+// Because com.android.apex.cts.shim is provided as prebuilt and the build system
+// doesn't support install "flattened" version from "prebult" yet, GSI, which should
+// have both "flatttened" and "unflattened" APEXes, is missing the flattened version
+// of com.android.apex.cts.shim.
+// TODO(b/159426728):  When the build system can install "flattened" from "prebuilts",
+// this can be removed.
+override_apex {
+  name: "com.android.apex.cts.shim.v1_with_prebuilts",
+  base: "com.android.apex.cts.shim.v1",
+  apps: ["CtsShimPrebuilt", "CtsShimPrivPrebuilt"],
+  allowed_files: "prebuilts_shim_allowed_list.txt",
+}
+
 genrule {
   name: "com.android.apex.cts.shim_not_pre_installed.pem",
   out: ["com.android.apex.cts.shim_not_pre_installed.pem"],
diff --git a/shim/build/prebuilts_shim_allowed_list.txt b/shim/build/prebuilts_shim_allowed_list.txt
new file mode 100644
index 0000000..7da513f
--- /dev/null
+++ b/shim/build/prebuilts_shim_allowed_list.txt
@@ -0,0 +1,4 @@
+./apex_manifest.pb
+./app/CtsShimPrebuilt/CtsShimPrebuilt.apk
+./etc/hash.txt
+./priv-app/CtsShimPrivPrebuilt/CtsShimPrivPrebuilt.apk