Add a minimum size for the event pools.

Add a minimum size for the event pools for devices which don't have sensors.
Otherwise the system server crash loops on boot.

Change-Id: Ic51c6fc26c8779d9f435f358d4274148a2ddbfb3
This commit is contained in:
Justin Koh
2013-03-12 18:03:53 -07:00
parent 6e544fd4ca
commit c0ce7eeb48

View File

@@ -82,9 +82,9 @@ public class SystemSensorManager extends SensorManager {
} while (i>0);
sSensorEventPool = new Pools.SynchronizedPool<SensorEvent>(
sFullSensorsList.size()*2);
Math.max(sFullSensorsList.size()*2, 1));
sTriggerEventPool = new Pools.SynchronizedPool<TriggerEvent>(
sFullSensorsList.size()*2);
Math.max(sFullSensorsList.size()*2, 1));
}
}
}