summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/LauncherModel.java
Commit message (Collapse)AuthorAgeFilesLines
* Fix launcher crash, bug: 3368489Adam Cohen2011-03-221-7/+5
| | | | Change-Id: I8b693d9ea6b4ef58ee1141e8f61b3fede134606b
* Cleaning up widget resizing codeAdam Cohen2011-03-031-2/+2
| | | | Change-Id: Ib4c0de0080f0b69f873fd88016f23c319a13c6ff
* Implementing resizable widgets in launcherAdam Cohen2011-02-251-0/+27
| | | | Change-Id: I18598493dcf34fc6089fa330a4b66803f658b773
* Make the icon caching for SD cards actually work.Joe Onorato2011-02-101-5/+13
| | | | | | | | | | We need to save the icon *after* we have loaded all the other information about it. Also, add a check that if apps on SD aren't possible, don't even bother saving the icon. This saves ~200 ms on each run of the loader. Bug: 3240615 Change-Id: Idc2329a868ab970b51deec341ffa8a47a344e110
* Changing downloads tab to my apps and making most recent first. (3377455)Winson Chung2011-01-211-0/+8
| | | | Change-Id: I75ae46ad601457ecfc9555aff7f7ff5284440317
* Allow previous view hierarchy to be GC'ed more quickly on rotationPatrick Dubroy2011-01-141-0/+3
| | | Change-Id: I76215a48e76234501b7ce253dedfa449502ab88f
* Initial changes to allow resolution of arbitrary clip data to widgets that ↵Winson Chung2010-11-031-31/+48
| | | | | | support them. Change-Id: Id5dfa8436a5bf6eb7bd300ec603911a9d3698de3
* Using hdpi icons in LauncherMichael Jurka2010-11-011-19/+23
| | | | Known issue: Default activity icon is still showing up as small
* When the locale changes, flush the all apps list.Joe Onorato2010-10-291-14/+31
| | | | | Bug: 3032131 Change-Id: I47659a459044fdace0a3480d216b168c18f2de37
* Adding initial support for dropping widgets with custom configuration data.Winson Chung2010-10-281-12/+28
| | | | Change-Id: I4a7ba51783b27e544e9a21882bc7cd582b3b43e0
* Initial changes to allow dragging external shortcuts to launcher using the ↵Winson Chung2010-10-271-4/+19
| | | | | | same InstallShortcut intent. Change-Id: I21b57115429ed37d604084ae01308d1d3f33ee7e
* When the launcher is paused and we reload stuff in the background, we need ↵Joe Onorato2010-10-271-1/+14
| | | | | | | | | | | | | | to re-re-load it in onResume. Otherwise we can load widgets and other resources from the wrong Configuration. This doesn't completely fix the bug, but it makes it much less likely. We tell the launcher once at the beginning of starting a reload because of SD cards coming back, and once when we bind. cherry pick of I99ee6af38bef91e261832bad4dec978a5d4a8b3d Bug: 3126698 Change-Id: I917bdb3982e3eea4924c6e9a8f3c037fd493f415
* resolved conflicts for merge of 700889f5 to masterBrad Fitzpatrick2010-10-121-18/+28
|\ | | | | | | Change-Id: I85320de6483e6820fe27b4012bfc323ccafa0e04
| * Serialize background async db updatesBrad Fitzpatrick2010-10-111-19/+19
| | | | | | | | | | Bug: 2983765 Change-Id: I1fdd33ea8ee4fbc79a75ce0450f04d8e18915975
* | am 02e53429: Merge "Don\'t block the UI when rearranging icons." into ↵Brad Fitzpatrick2010-10-111-1/+6
|\| | | | | | | | | | | | | | | | | gingerbread Merge commit '02e53429c4ef01bee548e0eaba4aeeee99db35f4' * commit '02e53429c4ef01bee548e0eaba4aeeee99db35f4': Don't block the UI when rearranging icons.
| * Don't block the UI when rearranging icons.Brad Fitzpatrick2010-10-101-1/+6
| | | | | | | | | | | | | | | | | | | | The pause is mostly notable when a sync is happening at the same time. The related function addItemToDatabase() is unchanged by this CL though as it populates item.id and would need more invasive changes elsewhere. Change-Id: I6538445aeb15d9efedf99f262c39f6175f7f1e0e
* | am 673aefe8: Merge "When the SD card comes back, we need to show the apps on ↵Joe Onorato2010-10-101-2/+4
|\| | | | | | | | | | | | | | | | | it." into gingerbread Merge commit '673aefe8b2b27790d704cc15282c8989a132877b' * commit '673aefe8b2b27790d704cc15282c8989a132877b': When the SD card comes back, we need to show the apps on it.
| * When the SD card comes back, we need to show the apps on it.Joe Onorato2010-10-071-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that we were doing startLoader, but once the apps are loaded, all that does is re-bind everything. Before a recent change of mine, we were clearing mWorkspaceLoaded and mAllAppsLoaded. But that's not good either, because it meant that there needed to be a lock that the main thread and the worker thread were both acquiring, which was causing ANRs. Instead, now we schedule two messages - one to add the apps back into the list, and one to update everything to use those new icons. Bug: 3065061 Change-Id: If9d36d4b55a7ba72fcf48a5ed8941bb9466bebe6
* | am d98979b8: Merge "Reload everything when coming back from the SD being ↵Joe Onorato2010-09-301-2/+3
|\| | | | | | | | | | | | | | | | | unmounted." into gingerbread Merge commit 'd98979b8147065878719cd2adb039317ba3abe0a' * commit 'd98979b8147065878719cd2adb039317ba3abe0a': Reload everything when coming back from the SD being unmounted.
| * Reload everything when coming back from the SD being unmounted.Joe Onorato2010-09-301-2/+3
| | | | | | | | | | | | | | | | We could do this more efficiently by only updating the packages that have changed, but that would involve a big rewrite. Bug: 3020854 Change-Id: Ie7e3bee20f45dc5efa93d960902e9dfb79c4a3a5
* | Fix: crash on portrait/landscape switch due to Michael Jurka2010-09-301-2/+4
| | | | | | | | | | | | duplicate View ids Change-Id: I69d09823d4825dadd7f3e119f9248140256f91b3
* | Adding support for drag and drop of folders and shortcuts. Michael Jurka2010-09-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | also: - Long press on empty space on workspace now brings up customization tray - Fixed: while dragging, items appeared to be dropping on folders two cells to the right - Fixed: Disabling drops on folders when the workspace is shrunken - Fixed: account for scaling of dragged items when checking if they overlap with shrunken workspace screens - Making folder icons dimmable to match shortcuts and widgets - When deciding with shrunken workspace screen we're dragging to, we now use the closest screen rather than the one that has been overlapped the most - Refactored drag/add mechanism, removing array of occupied cells from CellInfo - Removed dead code/variables
* | am 73013bf9: Make LauncherModel.deleteItemFromDatabase write to disk async.Brad Fitzpatrick2010-09-151-2/+6
|\| | | | | | | | | | | | | Merge commit '73013bf94f49ffbacba2b8300f6a2dd4eeebbd13' * commit '73013bf94f49ffbacba2b8300f6a2dd4eeebbd13': Make LauncherModel.deleteItemFromDatabase write to disk async.
| * Make LauncherModel.deleteItemFromDatabase write to disk async.Brad Fitzpatrick2010-09-141-2/+6
| | | | | | | | | | | | Fixes a bunch of StrictMode violations and removes TODOs. Change-Id: I886bd071d4a8336c228d29c517a8ffc5223c0623
| * DO NOT MERGE - Fix 2941495: Launcher short-cut icons don't work for apps on ↵Joe Onorato2010-08-311-1/+1
| | | | | | | | | | | | | | SD card after reboot Bug: 2941495 Change-Id: Idf1869d33cd5c01abea5b059ca466529cee0ad93
* | DO NOT MERGE - Fix 2941495: Launcher short-cut icons don't work for apps on ↵Joe Onorato2010-09-011-1/+1
| | | | | | | | | | | | | | SD card after reboot Bug: 2941495 Change-Id: Ie8e0e0c62259f8cf933e53b7aa2dc28a835110ae
* | Adding paging for the widget/shortcut/folder customization area and fixing bugs.Winson Chung2010-08-161-0/+10
| | | | | | | | | | | | | | | | | | Adding pages for customization drawer with initial implementation of proposed flow layout for widgets. Fixes for keeping all apps, and widgets in sync with Launcher Model, optimizations for reloading all apps pages when invalidating. Adding some animations for tab transitions and feedback when long pressing to add certain items. Change-Id: I8d51749f3a91c964bed35681f3a9192200b0d93e
* | Cleaning up grid size specification in LauncherAdam Cohen2010-08-041-86/+30
| | | | | | | | | | | | | | | | | | | | | | | | This commit eliminates the notion of in-place rotations and a bunch of associated complexities (including the notion of canonical coordinates). Further, the number of x and y cells per workspace screen is now being stored in a single location in the XML definition of Workspace. This fixes a couple bugs where incorrect values were being used. Finally, eliminated the notion of "shortAxis" and "longAxis" in terms of padding and cell count. These have been translated to corresponding x and y axis values. Change-Id: I30cfed66f82d739355b3f01730b28b6c0437989c
* | Make tabs in all apps actually filter the list of apps.Patrick Dubroy2010-07-291-1/+1
| |
* | Allow for NxM layout and in-place rotation of items on homescreen.Winson Chung2010-06-301-39/+161
|/ | | | | | Currently, rotation is disabled as designs are still in flux, but the NxM grid is enabled (8x4). Change-Id: I0026f88c674719e3d67de6d6d481d2d4cd606362
* Make the loader thread a Looper and move the package managerJoe Onorato2010-06-181-799/+784
| | | | | | | | | | 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
* This variable can be checked outside the lock because it's onlyJoe Onorato2010-06-111-6/+6
| | | | | | | | | | | | 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
* Fix the folder bug. The change that had previously fixed this got reverted ↵Joe Onorato2010-06-081-0/+4
| | | | | | somehow. Change-Id: I308656a5b1748e8aca254410b049110afaa7affc
* Improve launcher loading performance by only doing re-binds.Joe Onorato2010-06-081-84/+81
| | | | | | | This always reloads the workspace, because I think it's a less risky change and that only adds ~100ms. Change-Id: I215b1f741f022e47ce06e78b9cfdd9967a8f1b9d
* Load All Apps before the workspace if All Apps is showing.Daniel Sandler2010-06-071-53/+92
| | | | | | | | | | | | | | | 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
* Don't perform collision checks for items in folders.Daniel Sandler2010-06-021-0/+4
| | | | | Bug: 2735146 Change-Id: Ie4d03b09cc75bfc176ec91be6f6f4369af5cc2a3
* Defend against overlapping items in the workspace.Daniel Sandler2010-05-261-1/+58
| | | | | | | | | | | | | 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
* Have LauncherModel poke the gc after it's done, to give theJoe Onorato2010-05-181-0/+8
| | | | | | | | | renderscript objects a chance to get deleted, since they aren't in the java heap. Bug 2685490 Change-Id: Ifff97b64585ac0f6faed0feb6362f6137682e32d
* Tweak locking in launcher so mLock isn't held while the slow stuff happens.Joe Onorato2010-05-041-2/+3
| | | | | | Bug 2652948 Change-Id: I9d386395278830ead5deda17b8b09e0dcfeff989
* Avoid ANR in Home by avoiding a sycnhronized call on the UI thread.Romain Guy2010-04-281-1/+1
| | | | | | Bug #2614636 Change-Id: If9ded9a2e231a429e4d0a21626b486f76fd0a3a6
* Fix 2614384 - NPE in LauncherModelJoe Onorato2010-04-211-8/+12
| | | | | | Callbacks can be null. Change-Id: I56462a54673b1804a6235d6d882008b453290542
* Fix race in LauncherModel that causes it to show duplicate icons.Joe Onorato2010-04-211-50/+82
| | | | Change-Id: I78130d6f237f476bc33a4718ca5ef245fe502857
* More Launcher performance improvements.Daniel Sandler2010-04-161-8/+8
| | | | | | | | | | | | | | * 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
* Batch loading of icons for AllApps.Daniel Sandler2010-04-141-36/+69
| | | | | | | | | | | | | | | | | 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
* Fix 2583234 - It's ok for mCallbacks to be null.Joe Onorato2010-04-131-1/+5
| | | | Change-Id: Iec8df7b668a4657677f9c5421d00aa1b7df91015
* Add a log message and some todos.Joe Onorato2010-03-171-0/+7
| | | | Change-Id: I948997d169d1833f2b61c620a02dbccae535e8de
* Bug 2509023 - NPE on upgrade to froyoJoe Onorato2010-03-111-2/+2
| | | | Change-Id: I07cb4f272948062b47da8826ca917fd74ad18404
* Eliminate a race where old Launcher objects will continue to get callbacks ↵Joe Onorato2010-03-111-13/+20
| | | | | | | | for loading if they go away before they're done. Change-Id: Id9f57be482da428750285c86d95114d2652064e6
* Fix 2507267 - stack overflow when adding shortcutJoe Onorato2010-03-111-1/+1
| | | | Change-Id: Ife5bea443debd481854693b3924e72a04fb66f97
* Apps on SD card don't confuse the launcher any more. They show up properly ↵Joe Onorato2010-03-101-158/+199
| | | | | | | | after reboots, mounting and unmounting. Change-Id: Icd861dcd8ac6401c597e2f9c8e2c66dff1cf9c61