Bug 1339559 - Identify script that resulted in non-structured-clonable data r=kmag
[gecko.git] / hal / android / AndroidAlarm.cpp
blob3b2613be8413d14481dcfb6e2f109057ae1d3b3f
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "Hal.h"
8 #include "GeneratedJNINatives.h"
9 #include "GeneratedJNIWrappers.h"
11 using namespace mozilla::hal;
13 namespace mozilla {
15 class AlarmReceiver : public java::AlarmReceiver::Natives<AlarmReceiver>
17 private:
18 AlarmReceiver();
20 public:
21 static void NotifyAlarmFired() {
22 hal::NotifyAlarmFired();
26 namespace hal_impl {
28 bool
29 EnableAlarm()
31 AlarmReceiver::Init();
32 return true;
35 void
36 DisableAlarm()
38 java::GeckoAppShell::DisableAlarm();
41 bool
42 SetAlarm(int32_t aSeconds, int32_t aNanoseconds)
44 return java::GeckoAppShell::SetAlarm(aSeconds, aNanoseconds);
47 } // hal_impl
48 } // mozilla