Commit 77baa8b7 authored by Ryan Pavlik's avatar Ryan Pavlik
Browse files

aux/android: Move code into official namespaces

parent 265c49d3
......@@ -24,6 +24,8 @@
using wrap::android::app::Activity;
using wrap::android::view::SurfaceHolder;
using wrap::org::freedesktop::monado::auxiliary::MonadoView;
using xrt::auxiliary::android::getAppInfo;
using xrt::auxiliary::android::loadClassFromPackage;
struct android_custom_surface
......
......@@ -19,6 +19,8 @@ using wrap::android::content::Context;
using wrap::android::content::pm::ApplicationInfo;
using wrap::android::content::pm::PackageManager;
namespace xrt::auxiliary::android {
ApplicationInfo
getAppInfo(std::string const &packageName, jobject application_context)
{
......@@ -78,6 +80,8 @@ loadClassFromPackage(ApplicationInfo applicationInfo, jobject application_contex
return wrap::java::lang::Class();
}
}
} // namespace xrt::auxiliary::android
void *
android_load_class_from_package(struct _JavaVM *vm,
......@@ -85,6 +89,7 @@ android_load_class_from_package(struct _JavaVM *vm,
void *application_context,
const char *classname)
{
using namespace xrt::auxiliary::android;
jni::init(vm);
Context context((jobject)application_context);
auto info = getAppInfo(pkgname, (jobject)application_context);
......
......@@ -15,6 +15,9 @@
#ifdef XRT_OS_ANDROID
//! C++-only functionality in the Android auxiliary library
namespace xrt::auxiliary::android {
using wrap::android::content::pm::ApplicationInfo;
ApplicationInfo
......@@ -23,4 +26,6 @@ getAppInfo(std::string const &packageName, jobject application_context);
wrap::java::lang::Class
loadClassFromPackage(ApplicationInfo applicationInfo, jobject application_context, const char *clazz_name);
} // namespace xrt::auxiliary::android
#endif // XRT_OS_ANDROID
......@@ -19,6 +19,8 @@
using wrap::android::app::Activity;
using wrap::org::freedesktop::monado::ipc::Client;
using xrt::auxiliary::android::getAppInfo;
using xrt::auxiliary::android::loadClassFromPackage;
struct ipc_client_android
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment