History log of /frameworks/base/location/java/android/location/GpsSatellite.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6bde4683ae1f70f7b5e53f853b6a7479bcebd5d5 31-Jan-2015 destradaa <destradaa@google.com> Reduce memory usage of GpsStatus objects.

A simple GpsStatus object uses 9K of space, given that it initializes an array
of 255 GpsSatellite objects.
This change reduces the memory footprint in the average case, and keeps the
semantics of the API and its GpsSatellite sibling objects without any changes.
In a best case scenario it brings the memory usage per object to 1K.
It's likely in most cases that only 20-50 satellites will be in view. So the
usage should not exceeed half of the original memory usage.
It was considered to keep the internal array but a SparseArray provided bigger
memory savings in the test scenario of ~700B.

Change-Id: Ie2d2144d776a74d4904a08c0d6c5aec6d3bba7cc
/frameworks/base/location/java/android/location/GpsSatellite.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/location/java/android/location/GpsSatellite.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/location/java/android/location/GpsSatellite.java
f013e1afd1e68af5e3b868c26a653bbfb39538f8 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/frameworks/base/location/java/android/location/GpsSatellite.java