diff options
author | Gabriele Svelto <gsvelto@mozilla.com> | 2018-06-11 00:22:56 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-06-29 08:23:41 +0200 |
commit | 63522e8e280a1b76a96be6095e8f9d92882a45e7 (patch) | |
tree | 89a64bca6417641f5a56c16e83b9d5eb2f77eb6f /hal/sandbox | |
parent | 9836c7e10440364f3516c9a29e351cba92237b61 (diff) | |
download | UXP-63522e8e280a1b76a96be6095e8f9d92882a45e7.tar UXP-63522e8e280a1b76a96be6095e8f9d92882a45e7.tar.gz UXP-63522e8e280a1b76a96be6095e8f9d92882a45e7.tar.lz UXP-63522e8e280a1b76a96be6095e8f9d92882a45e7.tar.xz UXP-63522e8e280a1b76a96be6095e8f9d92882a45e7.zip |
Remove unused code for managing physical audio devices.
This was only used in B2G/Gonk and can go.
Diffstat (limited to 'hal/sandbox')
-rw-r--r-- | hal/sandbox/PHal.ipdl | 13 | ||||
-rw-r--r-- | hal/sandbox/SandboxHal.cpp | 67 |
2 files changed, 0 insertions, 80 deletions
diff --git a/hal/sandbox/PHal.ipdl b/hal/sandbox/PHal.ipdl index 37b69f93f..1af550aff 100644 --- a/hal/sandbox/PHal.ipdl +++ b/hal/sandbox/PHal.ipdl @@ -13,8 +13,6 @@ using mozilla::dom::ScreenOrientationInternal from "mozilla/dom/ScreenOrientatio using mozilla::hal::SensorType from "mozilla/HalSensor.h"; using mozilla::hal::SensorAccuracyType from "mozilla/HalSensor.h"; using mozilla::hal::WakeLockControl from "mozilla/HalTypes.h"; -using mozilla::hal::SwitchState from "mozilla/HalTypes.h"; -using mozilla::hal::SwitchDevice from "mozilla/HalTypes.h"; using mozilla::hal::ProcessPriority from "mozilla/HalTypes.h"; using nsIntRect from "nsRect.h"; using PRTime from "prtime.h"; @@ -41,11 +39,6 @@ struct NetworkInformation { uint32_t dhcpGateway; }; -struct SwitchEvent { - SwitchDevice device; - SwitchState status; -}; - struct WakeLockInformation { nsString topic; uint32_t numLocks; @@ -80,7 +73,6 @@ child: async NotifyNetworkChange(NetworkInformation aNetworkInfo); async NotifyWakeLockChange(WakeLockInformation aWakeLockInfo); async NotifyScreenConfigurationChange(ScreenConfiguration aScreenOrientation); - async NotifySwitchChange(SwitchEvent aEvent); async NotifySystemClockChange(int64_t aClockDeltaMS); async NotifySystemTimezoneChange(SystemTimezoneChangeInformation aSystemTimezoneChangeInfo); @@ -138,11 +130,6 @@ parent: returns (bool allowed); async UnlockScreenOrientation(); - async EnableSwitchNotifications(SwitchDevice aDevice); - async DisableSwitchNotifications(SwitchDevice aDevice); - sync GetCurrentSwitchState(SwitchDevice aDevice) - returns (SwitchState aState); - async FactoryReset(nsString aReason); child: diff --git a/hal/sandbox/SandboxHal.cpp b/hal/sandbox/SandboxHal.cpp index d33a53a2f..9771b3ef6 100644 --- a/hal/sandbox/SandboxHal.cpp +++ b/hal/sandbox/SandboxHal.cpp @@ -300,34 +300,6 @@ GetWakeLockInfo(const nsAString &aTopic, WakeLockInformation *aWakeLockInfo) Hal()->SendGetWakeLockInfo(nsString(aTopic), aWakeLockInfo); } -void -EnableSwitchNotifications(SwitchDevice aDevice) -{ - Hal()->SendEnableSwitchNotifications(aDevice); -} - -void -DisableSwitchNotifications(SwitchDevice aDevice) -{ - Hal()->SendDisableSwitchNotifications(aDevice); -} - -SwitchState -GetCurrentSwitchState(SwitchDevice aDevice) -{ - SwitchState state; - Hal()->SendGetCurrentSwitchState(aDevice, &state); - return state; -} - -void -NotifySwitchStateFromInputDevice(SwitchDevice aDevice, SwitchState aState) -{ - Unused << aDevice; - Unused << aState; - NS_RUNTIMEABORT("Only the main process may notify switch state change."); -} - bool EnableAlarm() { @@ -420,7 +392,6 @@ class HalParent : public PHalParent , public ISensorObserver , public WakeLockObserver , public ScreenConfigurationObserver - , public SwitchObserver , public SystemClockChangeObserver , public SystemTimezoneChangeObserver { @@ -440,10 +411,6 @@ public: hal::UnregisterWakeLockObserver(this); hal::UnregisterSystemClockChangeObserver(this); hal::UnregisterSystemTimezoneChangeObserver(this); - for (int32_t switchDevice = SWITCH_DEVICE_UNKNOWN + 1; - switchDevice < NUM_SWITCH_DEVICE; ++switchDevice) { - hal::UnregisterSwitchObserver(SwitchDevice(switchDevice), this); - } } virtual bool @@ -771,34 +738,6 @@ public: Unused << SendNotifyWakeLockChange(aWakeLockInfo); } - virtual bool - RecvEnableSwitchNotifications(const SwitchDevice& aDevice) override - { - // Content has no reason to listen to switch events currently. - hal::RegisterSwitchObserver(aDevice, this); - return true; - } - - virtual bool - RecvDisableSwitchNotifications(const SwitchDevice& aDevice) override - { - hal::UnregisterSwitchObserver(aDevice, this); - return true; - } - - void Notify(const SwitchEvent& aSwitchEvent) override - { - Unused << SendNotifySwitchChange(aSwitchEvent); - } - - virtual bool - RecvGetCurrentSwitchState(const SwitchDevice& aDevice, hal::SwitchState *aState) override - { - // Content has no reason to listen to switch events currently. - *aState = hal::GetCurrentSwitchState(aDevice); - return true; - } - void Notify(const int64_t& aClockDeltaMS) override { Unused << SendNotifySystemClockChange(aClockDeltaMS); @@ -869,12 +808,6 @@ public: } virtual bool - RecvNotifySwitchChange(const mozilla::hal::SwitchEvent& aEvent) override { - hal::NotifySwitchChange(aEvent); - return true; - } - - virtual bool RecvNotifySystemClockChange(const int64_t& aClockDeltaMS) override { hal::NotifySystemClockChange(aClockDeltaMS); return true; |