Don't build librs.*.so in bundled branches since we'll use native RS.

bug 8939828

Change-Id: I3f991ad7b6b1590063a9048326fd95edc483af13
diff --git a/core/java.mk b/core/java.mk
index b73bc93..ebfff18 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -206,6 +206,11 @@
     $(renderscript_intermediate.COMMON)/res/raw/, $(bc_files))
 
 renderscript_intermediate := $(intermediates)/renderscript
+
+# We don't need the .so files in bundled branches
+# Prevent these from showing up on the device
+ifneq (,$(TARGET_BUILD_APPS))
+
 rs_compatibility_jni_libs := $(addprefix \
     $(renderscript_intermediate)/librs., \
     $(patsubst %.bc,%.so, $(bc_files)))
@@ -216,6 +221,8 @@
 rs_jni_lib := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/librsjni.so
 LOCAL_JNI_SHARED_LIBRARIES += libRSSupport librsjni
 
+
+
 $(rs_compatibility_jni_libs): $(RenderScript_file_stamp) $(RS_PREBUILT_CLCORE) \
     $(rs_support_lib) $(rs_jni_lib) $(rs_compiler_rt)
 $(rs_compatibility_jni_libs): $(BCC_COMPAT)
@@ -226,6 +233,8 @@
 
 endif
 
+endif
+
 # include the dependency files (.d) generated by llvm-rs-cc.
 renderscript_generated_dep_files := $(addprefix $(renderscript_intermediate.COMMON)/, \
     $(patsubst %.fs,%.d, $(patsubst %.rs,%.d, $(notdir $(renderscript_sources)))))