Skip to content

Commit

Permalink
Bug 1469309 - Remove an unused sensor type; r=agaynor
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielesvelto committed Jun 19, 2018
1 parent 9df77bb commit e53afee
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions hal/Hal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ UnregisterSensorObserver(SensorType aSensor, ISensorObserver *aObserver) {
AssertMainThread();

if (!gSensorObservers) {
HAL_ERR("Un-registering a sensor when none have been registered");
return;
}

Expand Down
3 changes: 1 addition & 2 deletions hal/HalSensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ namespace hal {
* If you add or change any here, do the same in GeckoHalDefines.java.
*/
enum SensorType {
SENSOR_UNKNOWN = -1,
SENSOR_ORIENTATION = 0,
SENSOR_ACCELERATION = 1,
SENSOR_PROXIMITY = 2,
Expand Down Expand Up @@ -51,7 +50,7 @@ namespace IPC {
struct ParamTraits<mozilla::hal::SensorType>:
public ContiguousEnumSerializer<
mozilla::hal::SensorType,
mozilla::hal::SENSOR_UNKNOWN,
mozilla::hal::SENSOR_ORIENTATION,
mozilla::hal::NUM_SENSOR_TYPE> {
};
} // namespace IPC
Expand Down
6 changes: 3 additions & 3 deletions hal/sandbox/SandboxHal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "mozilla/dom/network/Types.h"
#include "mozilla/dom/ScreenOrientation.h"
#include "mozilla/fallback/FallbackScreenConfiguration.h"
#include "mozilla/EnumeratedRange.h"
#include "mozilla/Observer.h"
#include "mozilla/Unused.h"
#include "nsAutoPtr.h"
Expand Down Expand Up @@ -232,9 +233,8 @@ class HalParent : public PHalParent
hal::UnregisterBatteryObserver(this);
hal::UnregisterNetworkObserver(this);
hal::UnregisterScreenConfigurationObserver(this);
for (int32_t sensor = SENSOR_UNKNOWN + 1;
sensor < NUM_SENSOR_TYPE; ++sensor) {
hal::UnregisterSensorObserver(SensorType(sensor), this);
for (auto sensor : MakeEnumeratedRange(NUM_SENSOR_TYPE)) {
hal::UnregisterSensorObserver(sensor, this);
}
hal::UnregisterWakeLockObserver(this);
}
Expand Down

0 comments on commit e53afee

Please sign in to comment.