diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-05-12 16:19:33 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-05-12 16:19:58 +0200 |
commit | 6571d2ceb42930dab01677ef0e95e732d5076fb8 (patch) | |
tree | 8c593b8e09f2cfb457df72d40dc719bb0e0df066 /hal | |
parent | 2f359ed80ccb2cab440c0cda886404ed42ad9fdf (diff) | |
download | uxp-6571d2ceb42930dab01677ef0e95e732d5076fb8.tar.gz |
Remove MOZ_WIDGET_GONK [1/2]
Tag #288
Diffstat (limited to 'hal')
-rw-r--r-- | hal/Hal.cpp | 6 | ||||
-rw-r--r-- | hal/linux/LinuxPower.cpp | 31 |
2 files changed, 0 insertions, 37 deletions
diff --git a/hal/Hal.cpp b/hal/Hal.cpp index 44be2f510d..8ac9e68470 100644 --- a/hal/Hal.cpp +++ b/hal/Hal.cpp @@ -89,8 +89,6 @@ AssertMainProcess() MOZ_ASSERT(GeckoProcessType_Default == XRE_GetProcessType()); } -#if !defined(MOZ_WIDGET_GONK) - bool WindowIsActive(nsPIDOMWindowInner* aWindow) { @@ -100,8 +98,6 @@ WindowIsActive(nsPIDOMWindowInner* aWindow) return !document->Hidden(); } -#endif // !defined(MOZ_WIDGET_GONK) - StaticAutoPtr<WindowIdentifier::IDArrayType> gLastIDToVibrate; void InitLastIDToVibrate() @@ -123,7 +119,6 @@ Vibrate(const nsTArray<uint32_t>& pattern, const WindowIdentifier &id) { AssertMainThread(); -#if !defined(MOZ_WIDGET_GONK) // Only active windows may start vibrations. If |id| hasn't gone // through the IPC layer -- that is, if our caller is the outside // world, not hal_proxy -- check whether the window is active. If @@ -134,7 +129,6 @@ Vibrate(const nsTArray<uint32_t>& pattern, const WindowIdentifier &id) HAL_LOG("Vibrate: Window is inactive, dropping vibrate."); return; } -#endif // !defined(MOZ_WIDGET_GONK) if (!InSandbox()) { if (!gLastIDToVibrate) { diff --git a/hal/linux/LinuxPower.cpp b/hal/linux/LinuxPower.cpp index 70ab4a3f6e..626d1ac0ca 100644 --- a/hal/linux/LinuxPower.cpp +++ b/hal/linux/LinuxPower.cpp @@ -12,28 +12,9 @@ #include "mozilla/Services.h" #include "MainThreadUtils.h" -#if defined(MOZ_WIDGET_GONK) -#include "cutils/android_reboot.h" -#include "cutils/properties.h" -#endif - namespace mozilla { namespace hal_impl { -#if (defined(MOZ_WIDGET_GONK) && ANDROID_VERSION >= 19) -static void -PowerCtl(const char* aValue, int aCmd) -{ - // this invokes init's powerctl builtin via /init.rc - property_set("sys.powerctl", aValue); - // device should reboot in few moments, but if it doesn't - call - // android_reboot() to make sure that init isn't stuck somewhere - sleep(10); - HAL_LOG("Powerctl call takes too long, forcing %s.", aValue); - android_reboot(aCmd, 0, nullptr); -} -#endif - void Reboot() { @@ -44,14 +25,8 @@ Reboot() } } -#if !defined(MOZ_WIDGET_GONK) sync(); reboot(RB_AUTOBOOT); -#elif (ANDROID_VERSION < 19) - android_reboot(ANDROID_RB_RESTART, 0, nullptr); -#else - PowerCtl("reboot", ANDROID_RB_RESTART); -#endif } void @@ -64,14 +39,8 @@ PowerOff() } } -#if !defined(MOZ_WIDGET_GONK) sync(); reboot(RB_POWER_OFF); -#elif (ANDROID_VERSION < 19) - android_reboot(ANDROID_RB_POWEROFF, 0, nullptr); -#else - PowerCtl("shutdown", ANDROID_RB_POWEROFF); -#endif } // Structure to specify how watchdog pthread is going to work. |