Commit Graph

18 Commits

Author SHA1 Message Date
The Android Open Source Project
e5ce655b5c android-2.1_r1 snapshot 2010-01-12 15:19:17 -08:00
Jean-Baptiste Queru
6310fa9ae4 eclair snapshot 2009-11-12 18:46:12 -08:00
Suchi Amalapurapu
d2136f7e5d Create a shared preference setting and use it before loading/unloading cache
and disable cache if file operations failed in the last launch.
A simple if check when reading buffer size from file
2009-08-18 19:32:06 -07:00
Suchi Amalapurapu
489eaccb98 Fix duplicate entries being added when application is in active use 2009-07-29 11:38:17 -07:00
Suchi Amalapurapu
c093263183 Remove debug statement 2009-07-28 10:28:23 -07:00
Suchi Amalapurapu
b285593caf Reorganize message posting when updating sizes and resources. Rather than posting
a message for each package, post a message for  a set of packages(8) so that we don't
end up posting too many messages and making the UI non-responsive by keeping
the Handler too busy. We just pass the loaded info as a map in the message object.
Changes to back ground threads that compute sizes and load resources.

Add a new AppInfoCache class with some additional methods to load and persist cache.
As of now this just uses a raw file to cache application sizes and labels. We
could have gotten away with a simple map object but for clarity and future enhancements
just reorganized everything into a class. Load the cache in onCreate and persist
in onDestroy rather than start and stop. Using the cache we get < 1sec load times.
Peristing the cache has negligible performance effects. Remove multiple references to
cache and just use one object all over the code.

Rework AppInfo class and remove some confusing initializations. Also move the formatting
sizes part to back ground threads rather than in the constructor of AppInfo projects.
Formatting the sizes takes a lot of time and there is no point in blocking the UI thread
with this operation.

Changes to Adapter to use the newly created cache system. Define new comparator
for comparing application labels when sorting lists rather than using the one defined in
ApplicationInfo class which was loading the labels again in compare method. This was redundant
and since we cache these labels anyway, just use the cached labels instead. Rename and add
new methods for some of the new handler messages that send updates to a list of objects now.
Changes to removeFromList method and just remove entry from lists and cache linearly.

Also fix a bug in the adapter class where we reinit the list everytime the activity gets
restarted. Add a check here to invoke notifyDataSetChanged if underlying data changes.

Add some debug statements to record time.
2009-07-20 11:48:17 -07:00
Suchi Amalapurapu
585ee96b91 Automated import from //branches/donutburger/...@142034,142034 2009-03-24 21:20:18 -07:00
Suchi Amalapurapu
b22cc18118 Automated import from //branches/donutburger/...@140876,140876 2009-03-24 18:47:42 -07:00
The Android Open Source Project
e6dd1fa185 auto import from //branches/cupcake_rel/...@140373 2009-03-18 17:39:48 -07:00
The Android Open Source Project
72ed6feab2 auto import from //branches/cupcake_rel/...@138607 2009-03-13 13:04:25 -07:00
The Android Open Source Project
afc4ab2ffb auto import from //depot/cupcake/@135843 2009-03-03 19:32:34 -08:00
The Android Open Source Project
4e14e5ccbf auto import from //depot/cupcake/@135843 2009-03-03 18:28:52 -08:00
The Android Open Source Project
a578a6c4ad auto import from //depot/cupcake/@132589 2009-03-03 14:04:35 -08:00
The Android Open Source Project
8a156091ef auto import from //depot/cupcake/@137055 2009-03-02 22:54:43 -08:00
The Android Open Source Project
b9f5851434 auto import from //branches/cupcake/...@131421 2009-02-13 12:57:53 -08:00
The Android Open Source Project
1feaa85791 auto import from //branches/cupcake/...@130745 2009-02-10 15:44:05 -08:00
The Android Open Source Project
abc48f80d8 Code drop from //branches/cupcake/...@124589 2008-12-17 18:06:01 -08:00
The Android Open Source Project
de2d9f5f10 Initial Contribution 2008-10-21 07:00:00 -07:00