Added knowledge of namespacing into generation.

This is the first step in making code aware of namespacing. Currently,
the solution to generate symbols which are properly namespaced is to
post-process text after it is being outputed by a Formatter. Ideally
objects will know what namespace they are in and be able to print
themselves out accordingly. This change specifically will allow
generated code to remove namespaces from symbols that don't need
to be qualified entirely without relying on post-processing to remove
the namespace.

Change-Id: Ie535d05a64eb3d6c7d3b5451abdaa289c574170f
diff --git a/Interface.cpp b/Interface.cpp
index 52d960e..7bc32a8 100644
--- a/Interface.cpp
+++ b/Interface.cpp
@@ -61,9 +61,15 @@
     return localName().substr(1);
 }
 
-std::string Interface::getCppType(StorageMode mode, std::string *extra) const {
+std::string Interface::getCppType(StorageMode mode,
+                                  std::string *extra,
+                                  bool specifyNamespaces) const {
     extra->clear();
-    const std::string base = "::android::sp<" + fullName() + ">";
+    const std::string base =
+          std::string(specifyNamespaces ? "::android::" : "")
+        + "sp<"
+        + (specifyNamespaces ? fullName() : partialCppName())
+        + ">";
 
     switch (mode) {
         case StorageMode_Stack: