Move PlubinLib to prebuilts/frameworks_intermediates

Bug: 129423457
Change-Id: I7ed06609efa33ae98ffcd6f937a76a6b772c3fc1
diff --git a/Android.mk b/Android.mk
index 06ee66f..a817415 100644
--- a/Android.mk
+++ b/Android.mk
@@ -16,15 +16,6 @@
 
 LOCAL_PATH := $(call my-dir)
 
-include $(CLEAR_VARS)
-LOCAL_MODULE := libPluginCore
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-LOCAL_SRC_FILES := libs/plugin_core.jar
-LOCAL_UNINSTALLABLE_MODULE := true
-LOCAL_SDK_VERSION := current
-include $(BUILD_PREBUILT)
-
 #
 # Build rule for plugin lib (needed to write a plugin).
 #
@@ -33,7 +24,11 @@
 LOCAL_AAPT2_ONLY := true
 LOCAL_MODULE_TAGS := optional
 
-LOCAL_STATIC_JAVA_LIBRARIES:= libPluginCore
+ifneq (,$(wildcard frameworks/base))
+    LOCAL_STATIC_JAVA_LIBRARIES:= PluginCoreLib
+else
+    LOCAL_STATIC_JAVA_LIBRARIES:= libPluginCore
+endif
 
 LOCAL_SRC_FILES := \
     $(call all-java-files-under, src_plugins)