Back out d9bdfdfda06e to dd17e0758a00 (bug 913985) due to incorrect author on some of the patches. r=backout

This commit is contained in:
Kartikaya Gupta
2013-09-27 10:25:23 -04:00
parent 00cc4934c8
commit 83239003af
79 changed files with 2073 additions and 4489 deletions

View File

@@ -13,7 +13,6 @@
using namespace mozilla::dom;
using namespace mozilla::hal;
using namespace mozilla::widget::android;
namespace mozilla {
namespace hal_impl {
@@ -54,55 +53,97 @@ CancelVibrate(const WindowIdentifier &)
{
// Ignore WindowIdentifier parameter.
GeckoAppShell::CancelVibrate();
AndroidBridge* b = AndroidBridge::Bridge();
if (b)
b->CancelVibrate();
}
void
EnableBatteryNotifications()
{
GeckoAppShell::EnableBatteryNotifications();
AndroidBridge* bridge = AndroidBridge::Bridge();
if (!bridge) {
return;
}
bridge->EnableBatteryNotifications();
}
void
DisableBatteryNotifications()
{
GeckoAppShell::DisableBatteryNotifications();
AndroidBridge* bridge = AndroidBridge::Bridge();
if (!bridge) {
return;
}
bridge->DisableBatteryNotifications();
}
void
GetCurrentBatteryInformation(hal::BatteryInformation* aBatteryInfo)
{
AndroidBridge::Bridge()->GetCurrentBatteryInformation(aBatteryInfo);
AndroidBridge* bridge = AndroidBridge::Bridge();
if (!bridge) {
return;
}
bridge->GetCurrentBatteryInformation(aBatteryInfo);
}
void
EnableNetworkNotifications()
{
GeckoAppShell::EnableNetworkNotifications();
AndroidBridge* bridge = AndroidBridge::Bridge();
if (!bridge) {
return;
}
bridge->EnableNetworkNotifications();
}
void
DisableNetworkNotifications()
{
GeckoAppShell::DisableNetworkNotifications();
AndroidBridge* bridge = AndroidBridge::Bridge();
if (!bridge) {
return;
}
bridge->DisableNetworkNotifications();
}
void
GetCurrentNetworkInformation(hal::NetworkInformation* aNetworkInfo)
{
AndroidBridge::Bridge()->GetCurrentNetworkInformation(aNetworkInfo);
AndroidBridge* bridge = AndroidBridge::Bridge();
if (!bridge) {
return;
}
bridge->GetCurrentNetworkInformation(aNetworkInfo);
}
void
EnableScreenConfigurationNotifications()
{
GeckoAppShell::EnableScreenOrientationNotifications();
AndroidBridge* bridge = AndroidBridge::Bridge();
if (!bridge) {
return;
}
bridge->EnableScreenOrientationNotifications();
}
void
DisableScreenConfigurationNotifications()
{
GeckoAppShell::DisableScreenOrientationNotifications();
AndroidBridge* bridge = AndroidBridge::Bridge();
if (!bridge) {
return;
}
bridge->DisableScreenOrientationNotifications();
}
void
@@ -139,6 +180,11 @@ GetCurrentScreenConfiguration(ScreenConfiguration* aScreenConfiguration)
bool
LockScreenOrientation(const ScreenOrientation& aOrientation)
{
AndroidBridge* bridge = AndroidBridge::Bridge();
if (!bridge) {
return false;
}
switch (aOrientation) {
// The Android backend only supports these orientations.
case eScreenOrientation_PortraitPrimary:
@@ -147,7 +193,7 @@ LockScreenOrientation(const ScreenOrientation& aOrientation)
case eScreenOrientation_LandscapePrimary:
case eScreenOrientation_LandscapeSecondary:
case eScreenOrientation_LandscapePrimary | eScreenOrientation_LandscapeSecondary:
GeckoAppShell::LockScreenOrientation(aOrientation);
bridge->LockScreenOrientation(aOrientation);
return true;
default:
return false;
@@ -157,7 +203,12 @@ LockScreenOrientation(const ScreenOrientation& aOrientation)
void
UnlockScreenOrientation()
{
GeckoAppShell::UnlockScreenOrientation();
AndroidBridge* bridge = AndroidBridge::Bridge();
if (!bridge) {
return;
}
bridge->UnlockScreenOrientation();
}
} // hal_impl