Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c0ce7eeb authored by Justin Koh's avatar Justin Koh
Browse files

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
parent 6e544fd4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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));
            }
        }
    }