Clean up embedded bitcode path for Java.

Change-Id: I79cc65778173c7eeab028dedfc4adcb59bef44c2
diff --git a/slang_rs_reflection.cpp b/slang_rs_reflection.cpp
index b95cfd9..5e97dcb 100644
--- a/slang_rs_reflection.cpp
+++ b/slang_rs_reflection.cpp
@@ -331,6 +331,10 @@
                   C.getClassName(),
                   1,
                   "RenderScript", "rs");
+
+  if (C.getEmbedBitcodeInJava()) {
+    // Call new constructor
+  }
   // Call alternate constructor with required parameters.
   // Look up the proper raw bitcode resource id via the context.
   C.indent() << "this(rs," << std::endl;
@@ -2035,7 +2039,8 @@
                            const std::string &OutputPackageName,
                            const std::string &RSPackageName,
                            const std::string &InputFileName,
-                           const std::string &OutputBCFileName) {
+                           const std::string &OutputBCFileName,
+                           bool EmbedBitcodeInJava) {
   Context *C = NULL;
   std::string ResourceId = "";
   std::string PaddingPrefix = "";
@@ -2054,10 +2059,10 @@
 
   if (OutputPackageName.empty() || OutputPackageName == "-")
     C = new Context(OutputPathBase, InputFileName, "<Package Name>",
-                    RSPackageName, ResourceId, PaddingPrefix, true);
+                    RSPackageName, ResourceId, PaddingPrefix, true, EmbedBitcodeInJava);
   else
     C = new Context(OutputPathBase, InputFileName, OutputPackageName,
-                    RSPackageName, ResourceId, PaddingPrefix, false);
+                    RSPackageName, ResourceId, PaddingPrefix, false, EmbedBitcodeInJava);
 
   if (C != NULL) {
     std::string ErrorMsg, ScriptClassName;
@@ -2187,7 +2192,13 @@
 
   // Imports
   out() << "import " << mRSPackageName << ".*;" << std::endl;
-  out() << "import android.content.res.Resources;" << std::endl;
+  if (getEmbedBitcodeInJava()) {
+    out() << "import " << mPackageName << "."
+          << RSSlangReflectUtils::JavaBitcodeClassNameFromRSFileName(
+              mInputRSFile.c_str()) << ";" << std::endl;
+  } else {
+    out() << "import android.content.res.Resources;" << std::endl;
+  }
   out() << std::endl;
 
   // All reflected classes should be annotated as hidden, so that they won't