summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Launcher.java
Commit message (Collapse)AuthorAgeFilesLines
* Code sanitizationHyunyoung Song2016-10-061-3/+3
| | | | | | - Removed bad method/class name typos Change-Id: Ie6900e9e3d9ce9b550d2a2442a5dac3f7050a573
* Add logging for long presses. Reset elapsed timer when changing containers.Jon Miranda2016-10-051-29/+24
| | | | | | | | This is the first CL in a series of logging-related CLs. Upcoming CLs will include using Commands (HOME_INTENT, BACK) and "tapping outside" of a container logic. Change-Id: I62f0a08c7a9d9fce0baa5c12c67e21f63ab16a7c
* Update pre-drag lifecycle for apps with shortcuts.Tony Wickham2016-10-041-11/+1
| | | | | | | | | | | | | | | | - First of all, deferred drag has been renamed to pre-drag to avoid confusion with the existing deferred end drag. - For normal drags, the cycle is still startDrag --> onDragStart --> onDrop --> onDropComplete --> onDragEnd. - Pre-drags have two additional callbacks: onPreDragStart and onPreDragEnd. onPreDragStart is called between startDrag and onDragStart, and onPreDragEnd is called at the same time as onDragStart or onDragEnd. - If the pre-drag has not transitioned to a full drag before onDragEnd, onDragStart and onDropComplete are skipped (onDrop is still called to allow the DragView to animate). Change-Id: Icd7a8f75d5fcc159f9a52758c22ab6eae3edb9e2
* Merge "Moving the widget auto-advance logic to AppWidgetHostView instead of ↵Sunny Goyal2016-10-031-114/+4
|\ | | | | | | handling it in launcher" into ub-launcher3-master
| * Moving the widget auto-advance logic to AppWidgetHostView instead ofSunny Goyal2016-09-301-114/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | handling it in launcher This fixes the bug where launcher ignores auto-advance property changes during app update or widget remote views update as well as simplifies widget management On potential downside of this refactoring is that the auto advance will keep running even when all-apps or widgets tray is open. We could eventually use onVisibilityAggregated to handle visibility changes, but currenly the workspace visibility is not being updated properly in these cases Change-Id: Ie7331fec1877f43ad23e634d37571d8f3ef51e59
* | Merge "Exposing custom actions using keyboard shortcut" into ub-launcher3-masterSunny Goyal2016-10-031-0/+63
|\ \ | |/ |/|
| * Exposing custom actions using keyboard shortcutSunny Goyal2016-09-231-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | Keyboard shortcuts: ctrl+A => Open all apps ctrl+S => shows deep shortcuts ctrl+O => shows custom actions popup This also removes the direct delete/uninstall key shortcuts, making actidental icon removal less likely Bug: 24065447 Change-Id: Iae63370c0f33620628567cffd4df024064d4d02e
* | Some minor fixes for extracted status bar.Tony Wickham2016-09-291-19/+19
|\ \ | | | | | | | | | | | | | | | am: 345bff3ce6 Change-Id: I3a9e57fb93124b1d462b0fb8173419b887e85a84
| * | Some minor fixes for extracted status bar.Tony Wickham2016-09-281-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - setLightStatusBar() is now updateStatusBar(), with a forceLight parameter. We set the status bar to be light if forceLight or shouldBeLightStatusBar() (based on wallpaper). - Force status bar to be light if all apps is open. - Default to dark status bar, not light (light == dark icons) Bug: 29452834 Change-Id: I7b102ceff2f1ef2ab8defd4a46c698df4feaf2a5
* | | Fixing the newIntent logic to check the state before it has been reset.Sunny Goyal2016-09-281-5/+8
|\ \ \ | | | | | | | | | | | | | | | | | | | | am: 85313735fa Change-Id: I3a43a49c467a750adb031df4c3b880d453116739
| * | | Fixing the newIntent logic to check the state before it has been reset.Sunny Goyal2016-09-281-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When home button is pressed, we reset all active state (close all-apps, folder, shortcuts menu). But we do not go to the default screen if the active state was non-zero (any of the containers were open). Change-Id: Ia9a06729d65767124471c5b793323a55d822210a
* | | | resolve merge conflicts of 9311387 to ub-launcher3-masterTony Wickham2016-09-281-3/+26
|\ \ \ \ | | |/ / | |/| | | | | | Change-Id: I449cd2c91c2906f04ebf844eab2d02befaeb2f4d
| * | | Enable light status bar when top of wallpaper is light.Tony Wickham2016-09-281-3/+26
| |/ / | | | | | | | | | | | | | | | | | | (Light status bar = dark icons) Bug: 29452834 Change-Id: I9f61a05d80158827761c8b62ab40fc50971e27a6
* | | Cleaning up restore instance state logicSunny Goyal2016-09-281-37/+15
| | | | | | | | | | | | | | | | | | | | | | | | Restore instance state is only used for first binding. But in case of restore, the binding happens synchronously, so there is not need to store the bundle in a global variable Change-Id: Ibc496bcd7c0d171056b8afc69f2c4d9a1270d40c
* | | Ignore long clicks triggered from the edge of screen.Jon Miranda2016-09-261-3/+21
| | | | | | | | | | | | | | | Bug: 31572404 Change-Id: Ie531941669549ce84b92302b95be94555ee0bb73
* | | resolve merge conflicts of 6e74e89 to ub-launcher3-masterTony2016-09-231-1/+11
|\| | | | | | | | | | | Change-Id: I34e449ca3a91ee06e1983ac3a83cb7ca53567a91
| * | Refactor shortcuts drag and drop.Tony Wickham2016-09-231-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Instead of creating our own drag view within the container, and handling logic to determine when to start a real drag, we start the drag immediately and just defer onDragStart(). - To determine when the deferred drag should start, we add a DeferDragCondition to DragOptions. The default DeferDragCondition never defers a drag, but is overridden for apps with shortcuts to defer until the icon is dragged a given distance. - Because the drag is handled in DragController, including checking when to start the deferred drag, DeepShortcutsContainer no longer needs to handle touch events and ShortcutsContainerListener has been removed. This change has several immediate benefits: - The code is much cleaner, because it allows touch handling to be done by the DragController through the normal drag flow, without recreating logic in ShortcutsContainerListener/DeepShortcutContainer. - The janky second haptic feedback has been removed (now it vibrates when you long press, like everywhere else, but not again when the shortcuts close after dragging a distance). - Drops are animated, instead of just popping the icon back into place. Bug: 30769920 Bug: 30465972 Bug: 31533078 Change-Id: I679b412b72fbf6c3895d76963311eb5010c8e8db
* | | Merge "Resize only one widget at a time" into ub-launcher3-masterSunny Goyal2016-09-231-1/+1
|\ \ \
| * | | Resize only one widget at a timeSunny Goyal2016-09-231-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | > Removing logic to have multiple widgets in resize mode > Making ResizeFrame a touch controller, so that it fits well with other touch interaction in drag layer > Chaning the method names in touch controller, so that it do not overlaps with the default View methods Change-Id: I85d4dbdfc82d078781adbce137dfaaea59c9c83d
* | | Fixing two critical bugs in all apps transition controller am: 0a9c092c89Hyunyoung Song2016-09-221-1/+3
|\ \ \ | |/ / |/| / | |/ | | | | am: ea045e7532 Change-Id: I64a1d4620427d4c7d9dcb67a27dc07fb1f5aa03b
| * Fixing two critical bugs in all apps transition controllerHyunyoung Song2016-09-221-1/+3
| |\ | | | | | | | | | | | | | | | am: 0a9c092c89 Change-Id: I115b7bc6d165dc9d5e73e1878b96d194bfc62da7
| | * Fixing two critical bugs in all apps transition controllerHyunyoung Song2016-09-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bug#1: if long press from page indicator region, you can pull up all apps even though the workspace is in overview state. bug#2: all apps should not intercept touch not only in overview mode but also in any modal state. Change-Id: I91c0a181f037f6c2465a983825da3a2da7e2920f
| | * Use promisedIntent instead of intent when deep shortcuts are restored.Tony Wickham2016-08-301-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures that the intent has the package corresponding to the shortcut publisher, rather than a market intent. It also ensures that the intent has the EXTRA_SHORTCUT_ID attached. Bug: 31123204 Change-Id: I05d56396b629880322e915f52bfc0605b921b0b1 (cherry picked from commit fc02c1b446ee54561ac7351fb6ff0f8294785f0e)
* | | Simplifying the startSearch call in launcher callbacksSunny Goyal2016-09-131-32/+7
|\| | | | | | | | | | | | | | | | | am: 6f28e71e94 Change-Id: I1f450940d01acc479b8363b3bd10eb7fe70ae249
| * | Simplifying the startSearch call in launcher callbacksSunny Goyal2016-09-131-32/+7
| | | | | | | | | | | | Change-Id: I722e110903cced237f05667c4d711468d7cd3daa
| * | Merge "Preventing a shortcut which requires permissions from being added to ↵Sunny Goyal2016-09-101-7/+13
| |\ \ | | | | | | | | | | | | homescreen" into ub-launcher3-calgary-polish
| * \ \ Merge "Show IME when search query != null after rotation" into ↵Hyunyoung Song2016-09-091-1/+1
| |\ \ \ | | | | | | | | | | | | | | | ub-launcher3-calgary-polish
* | \ \ \ Preventing a shortcut which requires permissions from being added to homescreenSunny Goyal2016-09-101-7/+13
|\ \ \ \ \ | | |_|/ / | |/| | | | | | | | | | | | | | | | | | am: fb5096d07b Change-Id: Iac143134ac7679200fb1290072ec620d2a9bc131
| * | | | Preventing a shortcut which requires permissions from being added toSunny Goyal2016-09-081-7/+13
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | homescreen A shortcut can be added by any app as INSTALL_SHORTCUT is a normal level permission. But the intent is actually launched by the launcher app which can have other permission as well. > When adding a shortcut from the broadcast, verify that the intent does not require any permission > When adding a shortcut using the two-step drop process, verify that the source app also has the permission to create such a shortcut Bug: 30778130 Change-Id: I710a490d69019dc25709db5a97020c20d9325007
| * | | Merge "Launcher restore state fixes:" into ub-launcher3-calgary-polishSunny Goyal2016-09-081-282/+165
| |\ \ \
* | \ \ \ Show IME when search query != null after rotationHyunyoung Song2016-09-091-1/+1
|\ \ \ \ \ | | |_|/ / | |/| | | | | | | | | | | | | | | | | | am: c2fe1147f9 Change-Id: I9b7b139f5675edec9aff4968cef7780b48ff2165
| * | | | Show IME when search query != null after rotationHyunyoung Song2016-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: Ia35fba140a5addc21bf347cd63b72dc4e357421e
* | | | | Using ItemInfoMatcher in place of similar interfaces and utility methodsSunny Goyal2016-09-081-8/+0
| | | | | | | | | | | | | | | | | | | | Change-Id: I7337b819fe8f42f7a5a1481b5ed5d99a8cf583c4
* | | | | Launcher restore state fixes:Sunny Goyal2016-09-081-282/+165
|\ \ \ \ \ | |_|/ / / |/| | / / | | |/ / | |/| | | | | | am: 2100c78bd9 Change-Id: I8de4f0c98cff8764a764c06efeade9d6a26319dd
| * | | Launcher restore state fixes:Sunny Goyal2016-09-061-282/+165
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > Creating PendingRequestArgs to store generic request info across activity instances > Storing the CALL_PHONE request in PendingRequestArgs > Handling onActivityResult only after the workspace has loaded. onActivityResult sometimes modifies launcher db when removing empty screens, and any add action is also deferred until bindComplete. This simplifies this logic. > Always binding the restored page irrespective of pending result. Before starting a request activity (bind widget permission, or widget config activity or shortcut picker), workspace commits the pending screen id to the DB. Hence the restore page is valid when restore is called (onResume loads with currentPage instead of restored page) Bug: 28573143 Change-Id: I34be603cbeb2145f5caf0d18e016f50029e07df8
* | | Fixing topView not being considered in all places when calculating accessibleSunny Goyal2016-09-021-0/+8
| | | | | | | | | | | | | | | | | | | | | and focusable views Bug: 30563273 Change-Id: I6253ce33ee5c328efdde2ea733029975b31e5eb8
* | | Some drag and drop code refactor:Sunny Goyal2016-09-011-1/+2
|/ / | | | | | | | | | | | | | | | | 1) Adding DragOptions to easily extend drap functionality 2) Changing onDragStarted signature to send more information 3) Updating states for dropTargetButton based on drag event directly 4) Removing folder item based on onDragStarted and not startDrag Change-Id: I65b684e092ddc081d086bfe2c8c1973ed170eaeb
* | Merge "ComponentName null check MUST proceed before creating ComponentKey." ↵Hyunyoung Song2016-08-311-0/+4
|\ \ | | | | | | | | | into ub-launcher3-calgary-polish
| * | ComponentName null check MUST proceed before creating ComponentKey.Hyunyoung Song2016-08-291-0/+4
| | | | | | | | | | | | Change-Id: I2460561b62d77d3f2f17dc2a7db765785b46a8c6
* | | Use promisedIntent instead of intent when deep shortcuts are restored.Tony Wickham2016-08-291-2/+3
|/ / | | | | | | | | | | | | | | | | | | This ensures that the intent has the package corresponding to the shortcut publisher, rather than a market intent. It also ensures that the intent has the EXTRA_SHORTCUT_ID attached. Bug: 31123204 Change-Id: I05d56396b629880322e915f52bfc0605b921b0b1
* | Merge "Moving the scrim to draglayer" into ub-launcher3-calgary-polishSunny Goyal2016-08-251-130/+0
|\ \
| * | Moving the scrim to draglayerSunny Goyal2016-08-231-130/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > This causes the scrim to animate with the content on first launch > Also removing the logic to disable scrim based on state. That logic was only executing onResume which could lead to an invalid state Bug: 30972956 Bug: 30576826 Change-Id: Ia8386b303ce260f69e3b3b93041226f409301a01
* | | Starting the settings activity with same animation as wallpaper (and widgets ↵Sunny Goyal2016-08-251-2/+4
| | | | | | | | | | | | | | | | | | tray) Change-Id: I7744d50c9762200eb2ffea37d8435c9bc221c526
* | | Adding a resource pointer to the app name so that derived projects canSunny Goyal2016-08-221-1/+1
|/ / | | | | | | | | | | easily modify app name Change-Id: I3f301e1b2ba38d0a45d220bb628dcfdf3906246c
* | Merge "Adding support for pending widgets in AutoInstall layout" into ↵Sunny Goyal2016-08-171-1/+17
|\ \ | | | | | | | | | ub-launcher3-calgary-polish
| * | Adding support for pending widgets in AutoInstall layoutSunny Goyal2016-08-161-1/+17
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | > Pending widgets whill show a loading progress while the app is being installed. > Extra bind options can be defined using the tub tags <extra key="key-name" value="key-value" /> These are sent as widget options when the widget is bound. > If the widget has any config activity, it is not shown > Required attributes: className, packageName, x, y, spanY, spanY & screen Bug: 30279609 Change-Id: I1338618bfa5d86967339dffb68c12b1add6eb5d7
* / Moving the state changes during drag-n-drop from startDrag to onDragStartSunny Goyal2016-08-151-1/+1
|/ | | | | | | This will allow drag controller to optinally defer drag, based on some threshold, by simply deferring the callback onDragStart Change-Id: I17c06a15e2092b9797c7e57529b12a53d2acae6e
* Reloading workspace when the shortcuts permission changesSunny Goyal2016-08-101-0/+3
| | | | | | | | | > Check for permission on every onResume > If the permission is different than last known permission, reload and rebind workspace. Bug: 30789422 Change-Id: Idfa445815e29e2336505779545507d106b33a253
* Use shortcut disabled message if available.Tony Wickham2016-08-051-0/+6
| | | | | Bug: 30681210 Change-Id: Ibb5fd58e5fc9557b63730bc1e3c3977133769466
* Merge "Adding quiet mode support for shortcuts" into ub-launcher3-calgarySunny Goyal2016-08-011-15/+41
|\