From 5a360b78700bf9749b5e2926c37d1a02176c59ed Mon Sep 17 00:00:00 2001 From: Dave Hylands Date: Thu, 24 May 2012 21:04:32 -0700 Subject: [PATCH] Bug 737153 - Enable mounting storage through USB from a host machine - Hook up VolumeManager and AutoMounter, sr=cjones r=qDot --- configure.in | 2 +- dom/system/gonk/Makefile.in | 5 +++++ dom/system/gonk/SystemWorkerManager.cpp | 14 ++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 32cb2347f39f..e8bb1fef7f0e 100644 --- a/configure.in +++ b/configure.in @@ -239,7 +239,7 @@ if test -n "$gonkdir" ; then ;; esac - CPPFLAGS="-DANDROID -isystem $gonkdir/bionic/libc/$ARCH_DIR/include -isystem $gonkdir/bionic/libc/include/ -isystem $gonkdir/bionic/libc/kernel/common -isystem $gonkdir/bionic/libc/kernel/$ARCH_DIR -isystem $gonkdir/bionic/libm/include -I$gonkdir/frameworks/base/opengl/include -I$gonkdir/frameworks/base/native/include -I$gonkdir/hardware/libhardware/include -I$gonkdir/hardware/libhardware_legacy/include -I$gonkdir/system/core/include -isystem $gonkdir/bionic -I$gonkdir/frameworks/base/include -I$gonkdir/external/dbus $CPPFLAGS -I$gonkdir/frameworks/base/services/sensorservice" + CPPFLAGS="-DANDROID -isystem $gonkdir/bionic/libc/$ARCH_DIR/include -isystem $gonkdir/bionic/libc/include/ -isystem $gonkdir/bionic/libc/kernel/common -isystem $gonkdir/bionic/libc/kernel/$ARCH_DIR -isystem $gonkdir/bionic/libm/include -I$gonkdir/frameworks/base/opengl/include -I$gonkdir/frameworks/base/native/include -I$gonkdir/hardware/libhardware/include -I$gonkdir/hardware/libhardware_legacy/include -I$gonkdir/system -I$gonkdir/system/core/include -isystem $gonkdir/bionic -I$gonkdir/frameworks/base/include -I$gonkdir/external/dbus $CPPFLAGS -I$gonkdir/frameworks/base/services/sensorservice" CFLAGS="-mandroid -fno-short-enums -fno-exceptions $CFLAGS" CXXFLAGS="-mandroid -fno-short-enums -fno-exceptions $CXXFLAGS $STLPORT_CPPFLAGS" LIBS="$LIBS $STLPORT_LIBS" diff --git a/dom/system/gonk/Makefile.in b/dom/system/gonk/Makefile.in index 725a104a960c..b843afeef3fe 100644 --- a/dom/system/gonk/Makefile.in +++ b/dom/system/gonk/Makefile.in @@ -42,7 +42,12 @@ LOCAL_INCLUDES = \ ifeq (gonk,$(MOZ_WIDGET_TOOLKIT)) CPPSRCS += \ AudioManager.cpp \ + AutoMounter.cpp \ + AutoMounterSetting.cpp \ GonkGPSGeolocationProvider.cpp \ + Volume.cpp \ + VolumeCommand.cpp \ + VolumeManager.cpp \ $(NULL) # for our local copy of AudioSystem.h LOCAL_INCLUDES += -I$(topsrcdir)/media/libsydneyaudio/src diff --git a/dom/system/gonk/SystemWorkerManager.cpp b/dom/system/gonk/SystemWorkerManager.cpp index dbfb7521de08..901670f4be2c 100644 --- a/dom/system/gonk/SystemWorkerManager.cpp +++ b/dom/system/gonk/SystemWorkerManager.cpp @@ -15,6 +15,9 @@ #include "jsfriendapi.h" #include "mozilla/dom/workers/Workers.h" +#ifdef MOZ_WIDGET_GONK +#include "AutoMounter.h" +#endif #include "mozilla/ipc/Ril.h" #ifdef MOZ_B2G_BT #include "mozilla/ipc/DBusThread.h" @@ -39,6 +42,9 @@ USING_WORKERS_NAMESPACE using namespace mozilla::dom::gonk; using namespace mozilla::ipc; +#ifdef MOZ_WIDGET_GONK +using namespace mozilla::system; +#endif #ifdef MOZ_B2G_BT using namespace mozilla::dom::bluetooth; #endif @@ -230,6 +236,10 @@ SystemWorkerManager::Init() } #endif +#ifdef MOZ_WIDGET_GONK + InitAutoMounter(); +#endif + nsCOMPtr obs = do_GetService(NS_OBSERVERSERVICE_CONTRACTID); if (!obs) { @@ -253,6 +263,10 @@ SystemWorkerManager::Shutdown() mShutdown = true; +#ifdef MOZ_WIDGET_GONK + ShutdownAutoMounter(); +#endif + StopRil(); #ifdef MOZ_B2G_BT StopDBus();