Fix google-build-using-namespace warnings in driver.
* Replace "using namespace ..." statements with
using declarations of the required names.
* Put extern "C" functions inside a namespace to save
a lot of using declarations. Their linkage names are not
changed but can access names in the namespace easily.
Bug: 32670901
Test: build with WITH_TIDY=1
Change-Id: I7a2d45ecab47bc9064701fd288fe31f47b28fcc9
diff --git a/driver/rsdRuntimeStubs.cpp b/driver/rsdRuntimeStubs.cpp
index b7bb1aa..0c7ad96 100644
--- a/driver/rsdRuntimeStubs.cpp
+++ b/driver/rsdRuntimeStubs.cpp
@@ -32,8 +32,25 @@
#include <time.h>
-using namespace android;
-using namespace android::renderscript;
+#ifndef RS_COMPATIBILITY_LIB
+using android::renderscript::Font;
+#endif
+
+using android::renderscript::Allocation;
+using android::renderscript::Context;
+using android::renderscript::Element;
+using android::renderscript::RsdCpuReference;
+using android::renderscript::Mesh;
+using android::renderscript::ObjectBase;
+using android::renderscript::ObjectBaseRef;
+using android::renderscript::ProgramFragment;
+using android::renderscript::ProgramRaster;
+using android::renderscript::ProgramStore;
+using android::renderscript::ProgramVertex;
+using android::renderscript::Sampler;
+using android::renderscript::Script;
+using android::renderscript::Type;
+using android::renderscript::rs_object_base;
typedef __fp16 half;
typedef half half2 __attribute__((ext_vector_type(2)));