Commit Graph

50 Commits

Author SHA1 Message Date
Brad Fitzpatrick
73013bf94f Make LauncherModel.deleteItemFromDatabase write to disk async.
Fixes a bunch of StrictMode violations and removes TODOs.

Change-Id: I886bd071d4a8336c228d29c517a8ffc5223c0623
2010-09-14 12:33:35 -07:00
Joe Onorato
f5ed4f1141 DO NOT MERGE - Fix 2941495: Launcher short-cut icons don't work for apps on SD card after reboot
Bug: 2941495
Change-Id: Idf1869d33cd5c01abea5b059ca466529cee0ad93
2010-08-31 12:02:24 -07:00
Joe Onorato
3611578579 Make the loader thread a Looper and move the package manager
updates into that thread as well.

This gets rid of the ANRs that happened because both threads were
holding mAllAppsListLock.  Now mAllAppsList should only be touched
from within the worker thread.

Change-Id: Ifc4ac27e0c0a927ac66c456d097fd3d4ef6c5e1e
2010-06-18 14:40:26 -04:00
Joe Onorato
790c2d9fc5 This variable can be checked outside the lock because it's only
set from the ui thread.

This will help the ANR in LauncherModel.onReceive because if
we're under contention, there's a good chance that we haven't loaded
yet.  It won't completely fix it, but that will take a large refactoring.

Bug 2672967

Change-Id: I2c97a416767b4bb6aac0252f02e2aa2055ae8a4e
2010-06-11 00:14:11 -07:00
Joe Onorato
774b327991 Fix the folder bug. The change that had previously fixed this got reverted somehow.
Change-Id: I308656a5b1748e8aca254410b049110afaa7affc
2010-06-08 17:39:37 -07:00
Joe Onorato
cc67f476c0 Improve launcher loading performance by only doing re-binds.
This always reloads the workspace, because I think it's a less risky change and that only adds
~100ms.

Change-Id: I215b1f741f022e47ce06e78b9cfdd9967a8f1b9d
2010-06-08 11:32:28 -07:00
Daniel Sandler
843e860e8e Load All Apps before the workspace if All Apps is showing.
This change reorganizes the increasingly Byzantine loader
thread so that the order of (workspace, allapps) can be
reversed if the user is currently looking at the all apps
view. The perceptual improvement in performance is huge if
you change the Launcher's orientation while All Apps is
visible (which forces a reload/bind of everything); now that
AA doesn't have to wait behind the workspace it
(specifically, its first batch of icons) appears much, much
faster.

Bug: 2722977
Change-Id: I07a9afd5f1cff4019f2640b082872176ba0a887e
2010-06-07 16:45:16 -04:00
Daniel Sandler
596c0e6dbb Don't perform collision checks for items in folders.
Bug: 2735146
Change-Id: Ie4d03b09cc75bfc176ec91be6f6f4369af5cc2a3
2010-06-02 13:34:01 -07:00
Daniel Sandler
8802e96049 Defend against overlapping items in the workspace.
Should the Launcher's database become corrupted by
mysterious forces (e.g.: third-party launchers; botched
upgrades; smoke monsters) in such a way as to cause two
items to share the same cell, we now ignore loading the
latter.

Prevents a runtime crash (http://b/2655516).

Bug: 2655516
Change-Id: Ia514746f04f0e51b2cd07e9290589a6eab75bdd2
2010-05-26 16:50:49 -04:00
Joe Onorato
f3d5ea926d Have LauncherModel poke the gc after it's done, to give the
renderscript objects a chance to get deleted, since they aren't
in the java heap.

Bug 2685490

Change-Id: Ifff97b64585ac0f6faed0feb6362f6137682e32d
2010-05-18 18:44:36 -07:00
Joe Onorato
fad1fb5ed4 Tweak locking in launcher so mLock isn't held while the slow stuff happens.
Bug 2652948

Change-Id: I9d386395278830ead5deda17b8b09e0dcfeff989
2010-05-04 14:43:16 -07:00
Romain Guy
0e74d9f057 Avoid ANR in Home by avoiding a sycnhronized call on the UI thread.
Bug #2614636

Change-Id: If9ded9a2e231a429e4d0a21626b486f76fd0a3a6
2010-04-28 13:32:43 -07:00
Joe Onorato
87d2ca8a66 Fix 2614384 - NPE in LauncherModel
Callbacks can be null.

Change-Id: I56462a54673b1804a6235d6d882008b453290542
2010-04-21 17:09:18 -04:00
Joe Onorato
d65d08e709 Fix race in LauncherModel that causes it to show duplicate icons.
Change-Id: I78130d6f237f476bc33a4718ca5ef245fe502857
2010-04-21 11:43:04 -04:00
Daniel Sandler
2ff10b3b01 More Launcher performance improvements.
* Removed another redundant sort
* Correctly set the thread priority to BACKGROUND for the
  all apps loading step.
* Moved batch delay to a resource
* Reduced delay between loading batches of apps to 100ms
  (we really just want to sleep a tiny bit between batches
  to give the UI time to react)

Bug: 2562420
Bug: 2599979 (related)
Change-Id: I1ae72a68c1a47377a9eb62827fe7666bfc50caa5
2010-04-16 15:17:01 -04:00
Daniel Sandler
dca661236c Batch loading of icons for AllApps.
AllAppsList now maintains <data> and <added> in sorted
order, to amortize the cost of sorting the apps list over
multiple batches.

Launcher boosts thread priority on first launch, but we now
reduce thread priority to normal after the main workspace
has been drawn but before all apps are loaded.

Experimental feature: a short delay is introduced between
batches to help free up the CPU (as well as to show that we
are indeed batching apps).

Bug: 2562420
Change-Id: I2035ec3e819b4e7993a80c6d03bfad3914c95a7a
2010-04-14 14:36:10 -04:00
Joe Onorato
ac03330c96 Fix 2583234 - It's ok for mCallbacks to be null.
Change-Id: Iec8df7b668a4657677f9c5421d00aa1b7df91015
2010-04-13 17:19:18 -07:00
Joe Onorato
8ddc4fdba0 Add a log message and some todos.
Change-Id: I948997d169d1833f2b61c620a02dbccae535e8de
2010-03-17 10:24:53 -07:00
Joe Onorato
d8d22da5ca Bug 2509023 - NPE on upgrade to froyo
Change-Id: I07cb4f272948062b47da8826ca917fd74ad18404
2010-03-11 17:59:11 -08:00
Joe Onorato
c131b74922 Eliminate a race where old Launcher objects will continue to get callbacks for loading if they go
away before they're done.

Change-Id: Id9f57be482da428750285c86d95114d2652064e6
2010-03-11 15:45:05 -08:00
Joe Onorato
e74daedc3b Fix 2507267 - stack overflow when adding shortcut
Change-Id: Ife5bea443debd481854693b3924e72a04fb66f97
2010-03-11 12:32:24 -08:00
Joe Onorato
56d8291af6 Apps on SD card don't confuse the launcher any more. They show up properly after reboots,
mounting and unmounting.

Change-Id: Icd861dcd8ac6401c597e2f9c8e2c66dff1cf9c61
2010-03-10 15:11:45 -08:00
Joe Onorato
64e6be78dc Refactor the app updates so that it doesn't rely on the package name.
This will be needed for the upcoming change to update the icons with the
grayed out when the SD card goes away.
2010-03-10 13:42:32 -08:00
Romain Guy
edcce099c9 Fix the build! 2010-03-04 13:03:17 -08:00
Joe Onorato
0589f0f66c Split ApplicationInfo into ApplicationInfo which is used for AllAppsView and ShortcutInfo which is
used for the workspace.

Consolidate the three icon resampling functions into one.

Ensure that the icons stored in LauncherProvider are the right size, so we don't have to resample
them each time we load them.
2010-02-12 12:18:40 -05:00
Romain Guy
629de3ef73 Remove widgets when the corresponding apk is uninstalled.
Bug #2298872
2010-01-13 12:20:59 -08:00
Romain Guy
5c16f3ecd6 Remove LiveFolders when corresponding package is uninstalled.
Bug #2298872
2010-01-12 17:24:58 -08:00
Bjorn Bringert
7984c9496b Get rid of the built-in search widget in Launcher2
Uses the widget from packages/apps/QuickSearchBox instead.

Change-Id: I85d64defe155c0cad97fafef6a3db62c6cab504a
2009-12-09 21:48:38 +00:00
Joe Onorato
b0c27f254a Bug 2290800 - Use a collator to sort the app labels.
SHAME ON ME for using String.compareTo().
2009-12-01 16:20:30 -08:00
Joe Onorato
418928e9d0 Fix bug 2223769 - Uninstalling app causes NPE.
The check for whether there is anything in these lists should be sufficient.  The other
variables don't need to also be checked.
2009-11-19 18:05:36 -08:00
Joe Onorato
0c4513e559 This might fix bug 2262272 - Apps list empty
I'm not sure how .added is empty, but the only way I see for this
to happen is if it is, so use .data instead, which ought to be the
same.
2009-11-19 12:24:48 -08:00
Joe Onorato
be38609f87 Add a lot of logging that can be seen by doing adb shell setprop launcher2.dumpstate 1 and presssing volume down 2009-11-17 18:04:52 -08:00
Joe Onorato
1db7a972bf Fix 2260199 - App icons placed in folder widget are doubled after rebooting phone.
I don't know why I did this piecemeal instead of just fixing it for widgets items and folders all at
once.
2009-11-16 18:32:22 -08:00
Joe Onorato
a30ce8e6b2 Bug 2231692 - Turn off launcher2 logging. 2009-11-11 09:24:37 -08:00
Joe Onorato
028b624e52 Fix 2226221 - home screen app names do not reflect on locale change 2009-11-10 19:56:02 -08:00
Joe Onorato
511ab64d25 Fix 2215274 - Duplicate widgets appearing on top of each other
My fix for duplicate icons didn't account for widgets.
2009-11-08 14:14:07 -05:00
Joe Onorato
ad72e1705c Fix launcher2 crash. We weren't initializing the list of folders. Bug 2210545. 2009-11-06 16:25:43 -05:00
Joe Onorato
0ace11a2b0 Add logging to launcher2 to help diagnose 2239265 since QA keeps reassigning it to me without
providing more detailed steps to reproduce.
2009-11-05 16:03:12 -05:00
Romain Guy
84f296c106 Add android.home.drop even for the live wallpapers.
Change-Id: I44ad9fe573dc3d2e5d091fed01300d44b6be9473
2009-11-04 15:00:44 -08:00
Joe Onorato
080d9b614e Adjust logging of launcher2 launch times, and make all apps loading wait a little longer,
even though usually it happens later anyway.

For bug 2226555.
2009-11-02 12:01:11 -05:00
Joe Onorato
3c2f7e105d fix 2206016 - Passion: Deleted Icons are added again after deleting folder on home screen 2009-10-31 19:17:31 -04:00
Joe Onorato
f99f8c1ad2 Fix 2223769 - Uninstalling a widget (via adb uninstall) crashed launcher2 and com.cooliris.media
If we haven't even initialized yet, don't respond to app list changes.

I think this will fix that bug.  It's possible that there's some other race in there somehow.
2009-10-31 17:27:36 -04:00
Joe Onorato
1d8e7bbe09 Fix the bug where the icons stop showing up.
I think what's happening here is that when there is a configuration
change, we were restarting the launcher process because the driver
would hang.  But now that that's fixed, we need to poke the model
to reload the icons.  We were missing the bind apps call.
2009-10-15 19:49:43 -07:00
Joe Onorato
34b0249943 passion - fix 2176920 - all apps cleared after deleting folder 2009-10-14 11:13:48 -07:00
Marco Nelissen
3c8b90d9eb Fix crash when reinstalling live wallpapers. 2009-09-11 14:49:50 -07:00
Joe Onorato
6665c0f1fe Click on icons. 2009-09-02 15:27:24 -07:00
Joe Onorato
efabe00e4a The icons are 3d 2009-08-28 09:38:18 -07:00
Joe Onorato
9c1289cb3b Redo the launcher loading code and put the real app icons into rollo. 2009-08-24 14:58:44 -04:00
Joe Onorato
a5902524d4 Launcher2 compiles. 2009-07-30 13:37:37 -07:00
Joe Onorato
fca7c88f9d Move com/android/launcher -> com/android/launcher2 2009-07-30 10:15:07 -07:00