Revert submission 1194828-revert-1191937-art_apex_available-DWXQGTKMAR

Reason for revert: relanding with fix
Reverted Changes:
Ic4119368c:Revert submission 1191937-art_apex_available
Ia084976bb:Revert submission 1191937-art_apex_available
Iada86226d:Revert submission 1191937-art_apex_available
Ic76735eac:Revert submission 1191937-art_apex_available
I1eb30e355:Revert submission 1191937-art_apex_available
Icaf95d260:Revert submission 1191937-art_apex_available
Ie8bace4be:Revert submission 1191937-art_apex_available
I8961702cf:Revert submission 1191937-art_apex_available
I39316f9ef:Revert submission 1191937-art_apex_available
I522a7e83b:Revert submission 1191937-art_apex_available
I8b9424976:Revert submission 1191937-art_apex_available
I48b998629:Revert submission 1191937-art_apex_available

Change-Id: Id409b14e0fcb26fe943ad057a0e8d5d127e5cde9
diff --git a/JavaLibrary.bp b/JavaLibrary.bp
index 1ee62f8..3b9edcd 100644
--- a/JavaLibrary.bp
+++ b/JavaLibrary.bp
@@ -261,6 +261,10 @@
         "//external/wycheproof",
         "//libcore/benchmarks",
     ],
+    apex_available: [
+        "com.android.art.release",
+        "com.android.art.debug",
+    ],
     defaults: ["libcore_java_defaults"],
     installable: true,
     hostdex: true,
@@ -305,6 +309,10 @@
         "//libcore/benchmarks",
         "//frameworks/layoutlib",
     ],
+    apex_available: [
+        "com.android.art.release",
+        "com.android.art.debug",
+    ],
     defaults: ["libcore_java_defaults"],
     installable: true,
     hostdex: true,