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:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user