summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Launcher.java
Commit message (Collapse)AuthorAgeFilesLines
* Fix a crash when moving from overlay to non-overlay installation.staging/remote-folderArtem Shvadskiy2016-01-131-3/+5
| | | | Change-Id: Ia41f230078333e1ac67c360a6a4030550380e522
* Implement placeholder icons for remote folder.Artem Shvadskiy2016-01-131-0/+1
| | | | | | | | | | | | | | | | | | Patch 1: Unfinished temporary commit before rebase. Patch 2: Rebase. Patch 3: 1. Add additional RemoteFolderManager hook for drawer adapter setApps(). 2. Replace method arguments in drawer adapter from ArrayList to List, which allows us to use Collections.singletonList(), which is more memory efficient. 3. Allow folders to batch remove a subset of their entries. 4. Remove unused remote flag in ShortcutInfo. Patch 4: Fix placeholder animation for folder and folder icon. Patch 5: Remove unused import. Patch 6: Move app drawer bg color to overlay. Change-Id: I5ae3b976e2d04dcfbe5ea2e563ef94dcae48b7d4 issue-id: CYNGNOS-1329
* Implement RemoteFolder metrics.Artem Shvadskiy2016-01-041-16/+1
| | | | | | | | | | | | | | | | | | | | | | Additional changes: 1. Refactor drawer code to move xml and implementation out of trebuchet. 2. Move RemoteFolderUpdater to overlay, no stub class needed. 3. Pull TrackingEvent.Category out into EventCategory, and create overlay. 4. Remove old sync code from Folder. 5. Prevent RemoteFolder from inserting shortcuts into the database. All remote items will exist in memory only. 6. Move RemoteFolder into overlay, and have manager create an instance for FolderIcon. 7. Move folder sync out of LauncherModel. Patch 2: Re-add shortcut click handling in Folder and move EventCategory back into TrackingEvent.Category. Patch 3: Remove whitespace/javadoc/import changes. Change-Id: Ifc648f231bf6f6f35d8be45f8885f741b7539487 issue-id: CYNGNOS-1330
* Add remote apps to application drawer.Artem Shvadskiy2015-12-211-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch 2: 1. Use isRemote() method instead of checking flag manually. 2. Launch remote app directly through intent, bypassing regular app logic. 3. Pull syncing code out of LauncherModel and into RemoteFolderManager. 4. Check setting before loading apps. 5. Delete old apps before loading new ones. 6. Add/remove directly from AppDrawerListAdapter, since we are not sure if we want remote apps to show up in Google-style paged drawer. 7. Get number of columns for drawer, so we always load just enough to fill one row. Patch 3: Remove old ArrayList from LauncherModel. Patch 4: 1. Update redlines. 2. Clean up layout/dimens. 3. Add custom scrubber icon for remote apps. 4. Apply custom styles to remote header. TODO: Implement info icon click event, and replace remote apps based on updater cache status. Patch 5: Clean up app_drawer_item.xml Patch 6: Rebase. Patch 7: 1. Add forgotten rebase method to RemoteFolderManager stub. 2. Apply default styles to app_drawer_item and don't bother checking to apply styles unless remote folder is enabled. 3. Minor redline fix. Patch 8: Add larger bottom margin to remote header. Patch 9: 1. Create new view type for custom header to avoid on click bug. 2. Refactor custom style to apply on view holder creation, instead of on bind. 3. Add click event for custom header icon. Change-Id: If123d7ac82a0af0fa171fa3408b6c2f1f8a48b7b issue-id: CYNGNOS-1380
* Add remote folder if it is not already present after OOBE, and enable toggleArtem Shvadskiy2015-12-091-21/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in settings to hide remote folder if unwanted. Refactor RemoteFolderUpdater to hold static instance of itself. Refactor FolderInfo to use method for determining remote folder status, instead of manually comparing subType flag. Switch back from temp-coordinates after workspace drag/drop is completed. Remove disable button from remote folder UI. Patch 2: Pull remote folder code out of Launcher and into RemoteFolderManager. Patch 3: Remote @author from RemoteFolderManager Patch 4: 1. Remove delete button from folder. 2. Fix NPE when screens are full. Create a new screen and ad at (0,0). 3. Set default preference to false. 4. Clean up leftover imports and unnecessary conditionals. 5. Refactor Launcher.addFolder() method signature. Patch 5: Add missing parenthesis. Change-Id: I36b7a53175a568c5ebdc908d0256d9128e1bee65 issue-id: CYNGNOS-1378 issue-id: CYNGNOS-1331
* Trebuchet: dynamic folder type addedTyson Miller2015-12-011-2/+17
| | | | | | Issue-Id: CYNGNOS-1328 Change-Id: I09bf7bec119307f54836fedee8a1532627035d9a
* trebuchet: ensure not overlaping shorcuts and drop items when searchbar is ↵Jorge Ruesga2015-10-241-0/+6
| | | | | | | | | | | | | | | | invisible If searchbar is hidden (via settings) in portrait mode in no tablets devices, the first row of shortcuts overlaps the drop target view, which made impossible to positioning the drag shorcut in the same cell because is ocuppied by the remove drop target. This change, in the conditions described previously, animates the workspace to ensure the drop search bar has enough space without overlapping the workspace layout. Also give an extra padding (edgeMarginPx) to the workspace when searchbar is present. Actually, the search bar and the first row of shortcut icons are too much closed. Change-Id: I9bc5e42852b83a5445beb01bd3bdece9f82074b5 Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
* Trebuchet : Ensure search bar doesn't show in hiddenDanesh M2015-09-301-4/+1
| | | | | | | | If the user is in the app drawer, or settings panel mode, a broadcast could cause a new search target bar to be added which would reset visibility. Ensure visibility is restored. Change-Id: I9eba1eb6ac36bc9873deab1b81e1bb00ee8d4999
* Trebuchet : Update grid + cancel drag on searchablesChangedDanesh M2015-09-291-1/+4
| | | | Change-Id: Iaceebeebc03ab6e0dbd0fcac3a7e5e2265319c0c
* Trebuchet : Fix drawer inset & search visibilityDanesh M2015-09-291-0/+1
| | | | | | | | | | - If we receive INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED/INTENT_ACTION_SEARCHABLES_CHANGED we call bindSearchablesChanged which re-adds a search bar and doesn't restore visibility. This patch ensures we don't show the search bar when its not suppose to. - Don't increment margins, since there is no guarantee that the method is only invoked once. Change-Id: I4054a2aaba50a3692c6059afe8efe9796fcd68f4
* Fix a couple regressions from resetting AppsCustomizeTabHostAdam Cohen2015-09-271-3/+2
| | | | | | | Bug 18409435 Bug 18358080 Change-Id: I07a071342b5c5e062ab2bb562b672d93ba0d5c2e
* Add callback which got missed in refactorAdam Cohen2015-09-271-2/+11
| | | | | | Bug 18418855 Change-Id: Ia3a1cec76721bbbc118dd7389b5e960802a64b88
* Adding a few null checks.Sunny Goyal2015-09-271-3/+3
| | | | | | | | | | 1) During migration, if launcher2 has deleted user data, migration oes not happen 2) If Launcher3 does not has bind widget permission, QSB would be null. Bug: 18388507 Change-Id: Ief81f6f77ce154e7b3ecd4b77caf24239401e738
* Removing some duplicate methodsSunny Goyal2015-09-271-15/+3
| | | | Change-Id: I8a1295ab74890984e8d8508aaa18fd79ac2a032d
* Using the default search widget in Launcher3Sunny Goyal2015-09-271-430/+48
| | | | | | | | | | > Removing all logic related to search and voice overlays from Launcher3 > Using the widget provided by global search provider on the homescreen > Removing VoiceButtonProxy, as it is not being used anymore Change-Id: Ie8b09b44f7213c8fa11bce685914442e4884295d
* Overlay shouldn't show up above Intro screenAdam Cohen2015-09-271-6/+17
| | | | | bug: 18173340 Change-Id: Icf738a55398023ab6bad5cced05b25e053dec0a2
* Adding a couple memory optimizations to LauncherAdam Cohen2015-09-271-2/+17
| | | | | | | | | -> Always dispose of widget page views when leaving the activity. These pages hold onto many bitmaps. -> Clear database cache when leaving the activity. Bug: 17967108 Change-Id: I10ebaaed14e7cd86f09a9afcabd73043705f21b8
* Updating backup restore logicSunny Goyal2015-09-271-16/+1
| | | | | | | | | | | | | | | > Adding DeviceProfile information in the backup > Removing SharedPreference backup > Adding helper methods to abort backup in the middle > Comparing keys against the backup journal during restore to avoid restoring corrupt/lost entries > Old backups are still compatible, but lost keys verification will be ignored in that case. Bug: 17937935 Bug: 17951775 Bug: 17260941 Change-Id: Iad48646cfdd69abaff5c163b2055f3b8a9b39b19
* Tweaking close AllApps / Widgets on KK and belowAdam Cohen2015-09-271-5/+5
| | | | | | Bug: 17956862 Change-Id: I83b8973b7e98c1c3660221ac65dcb9ca8b4c84fd
* Allow LauncherOverlay to access and manage insetsAdam Cohen2015-09-271-4/+4
| | | | Change-Id: Ib9faf37eb22ad2a0b18c076978ec9f2fd8864c0c
* First pass of the Launcher Overlay interface / implAdam Cohen2015-09-271-5/+92
| | | | | | | -> Added simple reference launcher extension -> Make launcher able to handle a null qsb Change-Id: Ib1575243cac800a335e95bbf00cdc394bb4741c3
* Showing widgets in a disabled state, when running in safe modeSunny Goyal2015-09-271-8/+18
| | | | | | Bug: 15172107 Change-Id: I7209836ca4ffacde7b7b232e230e9b9f1a0e54bb
* Add more Launcher files to delete on Clear Launcher DataHelena Josol2015-09-271-3/+3
| | | | | Bug: 12753154 Change-Id: I00679bdc6eff70a1398122aaa955c08eabd556b1
* Updating ItemInfo objects in the worker threadSunny Goyal2015-09-271-16/+37
| | | | | | | | | | | > Launcher was making non-trivial updates to ItemInfo objects on UI thread. These updates were getting skipped when the Activity gets destroyed (possibly due to onConfigurationChange) > Unregistering SessionCallback on application onTerminate, rather than activity onDestroy Bug: 17941096 Change-Id: Iad4a50871fe09470f26139b44a2e9886833032f1
* Removing some dead codeAdam Cohen2015-09-271-25/+0
| | | | Change-Id: Idbd49302fc7123f72c7dad4c50612aaa662cca0d
* Keeping icons in disabled state when SD-card is unmountedSunny Goyal2015-09-271-7/+23
| | | | | | | | | | > changing shortcutInfo.isDisabled to be a flag based variable > on received OnPackageUnavailable, icons are disabled from desktop instead of being removed. Icons in all apps are removed Bug: 15852084 Bug: 16238283 Change-Id: I126d23c709682a917d4bbb84de71032593dce8f9
* Revert "Show apps as unavailable when on unmounted storage"Danesh M2015-09-271-38/+2
| | | | This reverts commit 53b6e9dd1a97ea59a84e4c8b7172e1773d990ee5.
* Using DeviceDefault theme for Launcher and WallpaperPickerSunny Goyal2015-09-271-4/+1
| | | | Change-Id: I31bfeedd99d50683fba910f233b25bb3f364ce1f
* Updating icons for sortcuts when the target app updates.Sunny Goyal2015-09-271-0/+20
| | | | | Bug: 17398260 Change-Id: I055abb971d1f72245e8616ac2ce07bcdf37cdd52
* Create a central list of files the Launcher writes to the app directoryHelena Josol2015-09-271-4/+4
| | | | | | | Replace hardcoded Launcher filenames with the defined constants. Bug: 12753154 Change-Id: I072f202d9388a703b9e6851bde64ea7fafe4b10a
* Use LauncherCallbacks model instead of method overridesAdam Cohen2015-09-271-65/+207
| | | | | | | | | -> When extending the Launcher Activity, instead of overriding public and protected methods, create a proper interface -> This helps define the interface when extending Launcher more formally and more clearly Change-Id: Ib38e8a376b2242d4078bf6856bb145f5b5f0da80
* Adding NPE check in InstallShortcutReceiverSunny Goyal2015-09-271-1/+1
| | | | | | | > Removing some unused methods Bug: 17971165 Change-Id: I1bc5c764fd65b44c950a58371b60d2b53c221995
* Show apps as unavailable when on unmounted storaged34d2015-07-221-2/+38
| | | | | | | | | This patch allows shortcuts to apps that are currently unavailable due to being on unmounted external storage to remain on the workspace and in folders. The icons will be disabled and grayed out until the external storage is mounted. Change-Id: I971483806b27e3a75ef0d5bb89d8dfb86f97511e
* Trebuchet: fix voice button proxyStephen Bird2015-07-161-1/+6
| | | | Change-Id: I1f7243063fa0596f5f9cb3b40c4cee63545d04e3
* Launcher: Close OverviewMode when transitioning back to Workspace.State.NORMALBrandon McAnsh2015-07-141-0/+5
| | | | | | | * OverviewMode can get in a weird funky state like folders did prior to I6e0b6f4d99bbb Change-Id: I4cd317216db8df7f49acc9d2e4d267f7dc395b8a Signed-off-by: Brandon McAnsh <brandon.mcansh@gmail.com>
* Launcher: Close open folder when transitioning back to Workspace.State.NORMALBrandon McAnsh2015-07-141-0/+3
| | | | | | | | | | * There was a nasty bug that would show an open folder behind the workspace when the screen timed and was quickly resumed, or when the screen was quickly toggled off/on before the activity lifecycle callbacks could react. * Close the open folders during showWorkspace() to prevent this. Change-Id: I6e0b6f4d99bbbabb283903a9ce92da5ae22609ce Signed-off-by: Brandon McAnsh <brandon.mcansh@gmail.com>
* Folder Layout RevisionHayden Schoen2015-07-141-4/+9
| | | | | | Updated the folder layout to reflect design revisions based on community feedback Change-Id: Ica1bb796dfccf779a954cf0903a1ae94a010ea1a
* Fade Adjacent Screens: disable this feature for App Drawer (paged)Raj Yengisetty2015-07-131-13/+8
| | | | | | | | | | | If enabled on App Drawer it causes some jank when opening the App Drawer because of the circular reveal anim (the apps flash visible and then go invisible at the start of the anim). Also if toggled on and then toggled off, some screens in the App Drawer become invisible. Change-Id: Ib7031e9626ce3be56fa0e06ac6394c8e8430ab99
* Trebuchet: display search widget search box if availableRoman Birg2015-07-081-14/+122
| | | | | Change-Id: I3a6d930f25ca4ac1eb8a069c68a2fe9bf2aeb646 Signed-off-by: Roman Birg <roman@cyngn.com>
* Badge: Check count on bindStephen Bird2015-07-061-0/+1
| | | | | | | | | Fixes bug where badges would not show up after changing languages and other similar situations. Also, stop registering so many receivers when one will do. Change-Id: Id85dbadbc0f99c77493b5817097567ceb365912e
* Hide workspace shortcuts during binding when AllApps is shown.Matt Garnes2015-06-291-2/+14
| | | | | | | | | | | Previously, if All Apps was opened before the workspace items were bound, the shortcuts would be come visible behind the app drawer when the loading finished. Set the alpha of the shortcuts to 0f to hide them if isAllAppsVisible() returns true. Change-Id: I399bf27435dfe179f64646456496b31eade864a3
* Fix unintended dynamic grid resize side effects.Matt Garnes2015-06-221-9/+13
| | | | | | | | | | | | | | | | | | | | | | - Do not attempt to resize the grid unless the dynamic grid resize has been explicitly triggered. - Workspace Ids are 1 indexed not 0, so on resize, start at 1. - After resizing the grid, persist the changes to the DB. The initial implementation only did the resize in memory and did not persist this, causing side effects later. Bugs fixed: 1. Resize the dynamic grid from large to small. Add a new icon by installing a new app or adding a shortcut from file manager. The new icon will overlap one on one of the new pages. 2. Resize the grid from large to small in a previous version of trebuchet (before the grid resize feature was added). Icons on the outer edges of the grid will be lost but persist in the DB. Upgrade to a new version of Trebuchet. The icons will return to the workspace. Change-Id: I8b0defafb3299d1f3d534526a75f9253495d739d
* Trebuchet: Fix popupMenu behavior and clean up old code.Raj Yengisetty2015-06-221-47/+17
| | | | | | | | | | | Repro: - Open Overview Menu - Select Scroll Effects - Click on the overflow menu - Press home - Observer popupMenu stays on screen Change-Id: I64e65d66758957552f2d64b0347a2f82d0818757
* Rotation: fix icons disappearingStephen Bird2015-06-111-1/+1
| | | | | | | | | | Only the dynamic grid reload should be stopping the launcher with intent to rebuild the entire workspace. This returns stopLoader to it's functionality pre-dynamic grid resize patch. Change-Id: I55861da83f9b640fd767031e0f2188c5b9b91e66
* Launcher: Check if componentName is null prior to getPackageName()Brandon McAnsh2015-06-051-6/+9
| | | | | | | * If getComponent() of the intent is null, an NPE will be thrown Change-Id: I93e6335d89daa5dc7950ba5ea99a15d4162ce369 Signed-off-by: Brandon McAnsh <brandon.mcansh@gmail.com>
* Move icons to fit within Dynamic grid upon resize.Stephen Bird2015-06-041-4/+9
| | | | | | | | | | | | If the dynamic grid is made smaller, currently icons will simply be hidden from view. Instead, create extra screens and squeeze the icons in so that they will all be visible upon resize. In some cases, icons can end up creating screens when it's not necessary we should revisit this at a later time and look into making these icons show up in a more expected place. Change-Id: I9a46f1ac45c1a04e252ed8943afcfe952df1392d
* Trebuchet Statistics:Martin Brabham2015-05-281-2/+33
| | | | | | | | - Add plumbing for sending events. - Add aggregation service that runs on some interval - Hook send events into respective UX interactions Change-Id: I77ba0ab75daf845621d800e0adf3e658096926af
* Trebuchet: close folder without full animation for overview modeRaj Yengisetty2015-05-141-1/+1
| | | | | | | | | | Repro: - Have HW nav keys enabled - Open a folder - Press the hw menu key - Observe: folder that was previously open cannot be opened Change-Id: Idc9012764975a2ca173c135baa7d7ba46fc2dd9a
* Trebuchet: new folder UI v1Raj Yengisetty2015-05-121-14/+26
| | | | | | | | | This change adds a number of new UI components and animations for folders. Designer: Hayden Schoen Change-Id: I255cd4664432d84aebecf7e16ace5d9948573e27
* Trebuchet: Skip sorting again when sorted by Title when launching app viewLinus Lee2015-04-241-1/+5
| | | | | Change-Id: Ie5b5398d17e6742f28084ce7cd6d31c4ba872b24 (cherry picked from commit b53f60bced4657d35880952732b2bcb811e1b7a6)