auto import from //depot/cupcake/@136594

This commit is contained in:
The Android Open Source Project
2009-03-05 14:34:35 -08:00
parent c474dec3ff
commit 4df2423a94
103 changed files with 7177 additions and 4088 deletions

View File

@@ -45,7 +45,7 @@ class SensorService extends ISensorService.Stub {
private static final int SENSOR_DISABLE = -1;
/**
* Battery statistics to be updated when sensors are enabled and diabled.
* Battery statistics to be updated when sensors are enabled and disabled.
*/
final IBatteryStats mBatteryStats = BatteryStatsService.getService();
@@ -119,7 +119,10 @@ class SensorService extends ISensorService.Stub {
}
Binder.restoreCallingIdentity(identity);
if (binder == null) throw new NullPointerException("listener is null in enableSensor");
if (binder == null) {
Log.w(TAG, "listener is null (sensor=" + name + ", id=" + sensor + ")");
return false;
}
synchronized(mListeners) {
if (enable!=SENSOR_DISABLE && !_sensors_control_activate(sensor, true)) {
@@ -145,7 +148,11 @@ class SensorService extends ISensorService.Stub {
}
if (l == null) {
throw new NullPointerException("no Listener object in enableSensor");
// by construction, this means we're disabling a listener we
// don't know about...
Log.w(TAG, "listener with binder " + binder +
", doesn't exist (sensor=" + name + ", id=" + sensor + ")");
return false;
}
if (minDelay >= 0) {