summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Launcher.java
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Some minor fixes for extracted status bar." into ↵Tony Wickham2016-09-291-19/+19
|\ | | | | | | ub-launcher3-calgary-polish
| * 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
* | Merge "Fixing the newIntent logic to check the state before it has been ↵Sunny Goyal2016-09-281-5/+8
|\ \ | |/ |/| | | reset." into ub-launcher3-calgary-polish
| * 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
* | 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
* 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
* 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
| | | | | | | | 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
| * | 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 "Show IME when search query != null after rotation" into ↵Hyunyoung Song2016-09-091-1/+1
|\ \ \ | |/ / |/| | | | | ub-launcher3-calgary-polish
| * | Show IME when search query != null after rotationHyunyoung Song2016-09-091-1/+1
| | | | | | | | | | | | Change-Id: Ia35fba140a5addc21bf347cd63b72dc4e357421e
* | | Merge "Launcher restore state fixes:" into ub-launcher3-calgary-polishSunny Goyal2016-09-081-282/+165
|\ \ \
| * | | 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
|\
| * Adding quiet mode support for shortcutsSunny Goyal2016-07-291-15/+41
| | | | | | | | | | | | | | | | | | | | | | > LauncherApps returns empty list when the user is locked. Not relying on LauncherApps in this case > When the user is locked, removing all dynamic shortcuts > Loading shortcuts from DB when the user is locked > Verifying the shortcuts again when the user is available Bug: 30411561 Change-Id: Ib6eb372c5b009cadb86a8f6e781f3f3cbf787ceb
* | Merge "Cancel exit spring loaded runnable when launcher state is set to APPS ↵Hyunyoung Song2016-07-291-2/+18
|\ \ | |/ |/| | | or WIDGETS b/29645452" into ub-launcher3-calgary
| * Cancel exit spring loaded runnable when launcher state is set to APPS or WIDGETSHyunyoung Song2016-07-291-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b/29645452 By cancelling the runnable, we are enabling transition: state1 -> state3 instead of state1-> state2-> state3. Transition state1->state3 is a viable transition that is supported by our model. Launcher Workspace -------------------------------------------- state1 APPS_SPRING_LOADED SPRING_LOADED state2 WORKSPACE NORMAL state3 APPS NORMAL_HIDDEN Change-Id: If27905567efe439324494e0091a4b42fcbf01448
* | Merge changes I33da0d7f,I36c31609 into ub-launcher3-calgaryWinson Chung2016-07-291-0/+8
|\ \ | |/ |/| | | | | | | * changes: Working around incorrect wallpaper offsets being calculated in RTL. Fixing RTL wallpaper scrolling.
| * Working around incorrect wallpaper offsets being calculated in RTL.Winson2016-07-281-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - When launcher starts up, onCreate() triggers the launcher model loader to start, which calls bindScreens() to add the workspace pages. However, layout does not happen until the device is unlocked, which means that even though the default screen index and children are there the page scrolls are calculated incorrectly, and even in RTL, the page scroll for the 0th screen is zero (it should be at the right most edge of the workspace). This CL works around this by deferring until the first layout after bindScreens() to unlock the wallpaper offset from its default bounds. The workaround is only applied when the launcher activity is first created. Bug: 28795125 Change-Id: I33da0d7f934f5337d26e69f068f579a32897a837
* | Merge "Showing the shortcuts in the disabled state and removing ti from the ↵Sunny Goyal2016-07-281-0/+2
|\ \ | | | | | | | | | menu when its disabled" into ub-launcher3-calgary
| * | Showing the shortcuts in the disabled state and removing ti from the menuSunny Goyal2016-07-281-0/+2
| | | | | | | | | | | | | | | | | | | | | when its disabled Bug: 30315906 Change-Id: Ice747e7be955d8bb2dd65191f7613e2afd4abc1c
* | | Fading in the first screen, when launcher loads for the first timeSunny Goyal2016-07-281-1/+31
|/ / | | | | | | | | | | Bug: 29007436 Bug: 27705838 Change-Id: I95891d0bad19a67985b689bb96d6068dcd85004a
* / Launcher shortcuts animations update.Sunny Goyal2016-07-271-7/+13
|/ | | | | | | | | | | > The shortcut container closes with an animation > When opening/closing the animation only the icon scales and not the title and drag handle > When dragging the icon, it starts from the original icon position and moves under the user finger. The container grows to follow the drag view. Bug: 28980830 Change-Id: Ic0353c30b682d1f018cbf4d62e8a6e8e7d7d4664
* Merge "Cleanup deferred drag when closing deep shortcuts container." into ↵Tony Wickham2016-07-281-0/+1
|\ | | | | | | ub-launcher3-calgary
| * Cleanup deferred drag when closing deep shortcuts container.Tony Wickham2016-07-271-0/+1
| | | | | | | | | | | | | | | | | | | | This fixes those states where a drag view dangles on the screen forever until launcher restarts. For instance, long press Settings and press home before letting go. Bug: 30291280 Change-Id: Ib8c403a02a17f35ba170c21f78f41bdc3b48d096
* | Remove two redundant layout pass in AllAppsTransitionController.Hyunyoung Song2016-07-271-10/+7
|/ | | | Change-Id: I48d043820db962c58e97a09d7888303c1d5bf4ad
* AllAppsTransitionController always use LauncherStateTransitionAnimationHyunyoung Song2016-07-271-3/+5
| | | | | | b/30375760 Change-Id: Iee2f8060e4d272d276ddd5d40b4bc6053e8c7778
* Long press on the caret should start search on all apps containerHyunyoung Song2016-07-221-2/+4
| | | | Change-Id: I87e6b8a9b43bf8a84bcf4d39302bc5c6f6a5f3fd
* Merge "Increasing the size of the drag icon when a shortcut is dragged" into ↵Sunny Goyal2016-07-221-7/+0
|\ | | | | | | ub-launcher3-calgary
| * Increasing the size of the drag icon when a shortcut is draggedSunny Goyal2016-07-211-7/+0
| | | | | | | | Change-Id: I7d768657300d3229e05d1eb18aec3720a9098ffc
* | Animate discovery bounce for all apps pull up interactionHyunyoung Song2016-07-211-4/+31
| | | | | | | | | | | | | | | | | | | | | | b/30221381 > Will not support landscape case. If the user knows how to enable rotation, it's very unlikely they don't know how to bring up apps drawer > If unlocked using finger unlock immediately after screen is turned off, bounce is not shown due to delay in ACTION_SCREEN_OFF broadcast Change-Id: Ia8b7e572eaa4aeab8b1add1e5660fee3a63ba21c
* | Fix NPE on clicking the all apps caret.Hyunyoung Song2016-07-211-2/+2
|/ | | | Change-Id: I2623e7470ffe711bce375699b9579803ded6c02f
* Merge "Optimizing open shortcuts container lookep" into ub-launcher3-calgarySunny Goyal2016-07-211-1/+9
|\