Backed out changeset 07c91b928cd7 (bug 932698) for causing bug 1047618. a=me

This commit is contained in:
Ryan VanderMeulen 2014-08-01 16:46:21 -04:00
parent cde39a4083
commit 9e1968d46e
5 changed files with 0 additions and 63 deletions

View File

@ -68,7 +68,6 @@
#include "UeventPoller.h"
#include "nsIWritablePropertyBag2.h"
#include <algorithm>
#include "PowerWakeLock.h"
#define NsecPerMsec 1000000LL
#define NsecPerSec 1000000000
@ -667,7 +666,6 @@ void
SetScreenEnabled(bool aEnabled)
{
GetGonkDisplay()->SetEnabled(aEnabled);
gPowerWakelock = nullptr;
sScreenEnabled = aEnabled;
}

View File

@ -1,24 +0,0 @@
/* -*- Mode: C++; tab-width: 40; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "PowerWakeLock.h"
#include <hardware_legacy/power.h>
const char* kPower_WAKE_LOCK_ID = "PowerKeyEvent";
namespace mozilla {
namespace hal_impl {
StaticRefPtr <PowerWakelock> gPowerWakelock;
PowerWakelock::PowerWakelock()
{
acquire_wake_lock(PARTIAL_WAKE_LOCK, kPower_WAKE_LOCK_ID);
}
PowerWakelock::~PowerWakelock()
{
release_wake_lock(kPower_WAKE_LOCK_ID);
}
} // hal_impl
} // mozilla

View File

@ -1,25 +0,0 @@
/* -*- Mode: C++; tab-width: 40; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef __POWERWAKELOCK_H_
#define __POWERWAKELOCK_H_
#include "mozilla/StaticPtr.h"
#include "nsISupportsImpl.h"
namespace mozilla {
namespace hal_impl {
class PowerWakelock
{
public:
NS_INLINE_DECL_REFCOUNTING(PowerWakelock);
PowerWakelock();
private:
~PowerWakelock();
};
extern StaticRefPtr <PowerWakelock> gPowerWakelock;
} // hal_impl
} // mozilla
#endif /* __POWERWAKELOCK_H_ */

View File

@ -51,12 +51,6 @@
#include <sys/limits.h>
#include <sha1.h>
#include "PowerWakeLock.h"
#include "mozilla/Hal.h"
using namespace mozilla;
using namespace mozilla::hal;
using namespace mozilla::hal_impl;
/* this macro is used to tell if "bit" is set in "array"
* it selects a byte from the array, and does a boolean AND
* operation with a byte that only has the relevant bit set.
@ -861,10 +855,6 @@ size_t EventHub::getEvents(int timeoutMillis, RawEvent* buffer, size_t bufferSiz
event->type = iev.type;
event->code = iev.code;
event->value = iev.value;
if (event->code == KEY_POWER && event->value
&& !hal::GetScreenEnabled()) {
gPowerWakelock = new PowerWakelock();
}
event += 1;
capacity -= 1;
}

View File

@ -17,7 +17,6 @@
EXPORTS += [
'GonkPermission.h',
'OrientationObserver.h',
'PowerWakeLock.h',
]
DIRS += ['libdisplay', 'nativewindow']
@ -58,7 +57,6 @@ SOURCES += [
'nsWindow.cpp',
'OrientationObserver.cpp',
'ParentProcessController.cpp',
'PowerWakeLock.cpp',
'ProcessOrientation.cpp',
'WidgetTraceEvent.cpp'
]