summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/util
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Fixing issue where overview->normal workspace mode cannot be done by ↵Hyunyoung Song2016-09-161-0/+3
|\ | | | | | | tapping b/31458165" into ub-launcher3-calgary-polish
| * Fixing issue where overview->normal workspace mode cannot be done by tappingHyunyoung Song2016-09-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | b/31458165 Because workspaceInModalState makes the VerticalFlingDetector to consume the touch input, click is not detected in Overview mode. Placed pulldown to search behind a feature flag. Change-Id: I31ab69f57944a18e6b264c4f2ed2d0c1175cd940
* | Adding support for extending the touch target in the touchDelegateSunny Goyal2016-09-151-3/+26
|\ \ | |/ |/| | | | | | | am: 1cc48e1d0c Change-Id: I29ce4b52a2b687f73b2db4ddb633210e905aad69
| * Adding support for extending the touch target in the touchDelegateSunny Goyal2016-09-151-3/+26
| | | | | | | | | | Bug: 31458312 Change-Id: Ic819bdede2776ff63ec17053cc1326415edc1ca0
| * Blocking alpha animation if the initial and final state for the animationSunny Goyal2016-09-021-3/+46
| | | | | | | | | | | | | | | | are both 0 Bug: 30739854 Change-Id: I4f7c579dc3f64a4fed60d7b2f8ecd5f359e165ec (cherry picked from commit bf206123a8cfad9f1341b60ff9a138e64b30b6e3)
| * Use promisedIntent instead of intent when deep shortcuts are restored.Tony Wickham2016-08-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | 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)
* | Pull down should start search.Hyunyoung Song2016-09-151-0/+85
| | | | | | | | | | | | b/31458165 Change-Id: If4821e3d89a05a00551af6a5209ebc1693a1389b
* | Preventing a shortcut which requires permissions from being added toSunny Goyal2016-09-081-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Launcher restore state fixes:Sunny Goyal2016-09-062-0/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > 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
* | Use promisedIntent instead of intent when deep shortcuts are restored.Tony Wickham2016-08-291-1/+2
| | | | | | | | | | | | | | | | | | | | 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
* | Prevent against NPE inside ComponentKeyHyunyoung Song2016-08-242-2/+10
| | | | | | | | | | | | b/31063280 Change-Id: I71254fc1a3244fd6834ebf65923d194f17afc1ba
* | Blocking alpha animation if the initial and final state for the animationSunny Goyal2016-08-151-3/+46
|/ | | | | | | are both 0 Bug: 30739854 Change-Id: I4f7c579dc3f64a4fed60d7b2f8ecd5f359e165ec
* Fixing potential ConcurrentModificationExceptionSunny Goyal2016-08-081-0/+32
| | | | | | | | mBgDeepShortcutMap is only accessed on the background thread. But the same instance of list of values was getting passed to the UI thread, instead of being cloned. Change-Id: Ie7d0442d895304489ce9323ea872b9091d668ae5
* Merge "Start shortcuts close animation where open left off." into ↵Tony Wickham2016-08-031-4/+13
|\ | | | | | | ub-launcher3-calgary
| * Start shortcuts close animation where open left off.Tony Wickham2016-08-021-4/+13
| | | | | | | | | | | | | | | | | | | | | | - Before we always started the close animation at 0 instead of the previous open progress, which looked janky. - Shortened the animations' durations and start delays to account for the fact that the open animation was only partially finished when the close animation started. Bug: 30465231 Change-Id: I958ee5f4543dbf1185f3d0229c55fc1b51929655
* | Merge "Adding workaround to jump in wallpaper offsets." into ↵Winson Chung2016-08-021-2/+3
|\ \ | | | | | | | | | ub-launcher3-calgary
| * | Adding workaround to jump in wallpaper offsets.Winson2016-08-021-2/+3
| |/ | | | | | | | | | | | | | | - Just skip the animation if we are animating to the same wallpaper offset (which is the case when we are adding from all apps) Bug: 28587903 Change-Id: Ib7b1828c1b099a665d68c22cb33ee62693f33f35
* / Adding quiet mode support for shortcutsSunny Goyal2016-07-292-4/+94
|/ | | | | | | | | | | > 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 changes I33da0d7f,I36c31609 into ub-launcher3-calgaryWinson Chung2016-07-291-43/+58
|\ | | | | | | | | | | * 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-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
| * Fixing RTL wallpaper scrolling.Winson2016-07-281-42/+45
| | | | | | | | | | | | | | | | | | | | - Ensure that we map the scroll offsets to the full wallpaper offset range - Default to either edge of the wallpaper (depending on RTL) to match the default system wallpaper behavior (ag/1265418) Bug: 28795125 Bug: 29398681 Change-Id: I36c316095057912d2dda0beb43bd1e6aaeac3fdc
* | Fading in the first screen, when launcher loads for the first timeSunny Goyal2016-07-281-3/+19
| | | | | | | | | | | | Bug: 29007436 Bug: 27705838 Change-Id: I95891d0bad19a67985b689bb96d6068dcd85004a
* | Launcher shortcuts animations update.Sunny Goyal2016-07-273-6/+52
|/ | | | | | | | | | | > 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 "Removing shadow and badging from the icon which is shown in the menu ↵Sunny Goyal2016-07-261-1/+1
|\ | | | | | | These are added as soon as the icon is added to the workspace" into ub-launcher3-calgary
| * Removing shadow and badging from the icon which is shown in the menuSunny Goyal2016-07-261-1/+1
| | | | | | | | | | | | | | These are added as soon as the icon is added to the workspace Bug: 28980830 Change-Id: I725d2ee8994324f09d9ecf7bbbb0090a7ceb5769
* | Merge "Adding TransformingTouchDelegate to allow transforming touch events ↵Sunny Goyal2016-07-261-0/+87
|\ \ | |/ |/| | | before sending to the delegate." into ub-launcher3-calgary
| * Adding TransformingTouchDelegate to allow transforming touch events beforeSunny Goyal2016-07-171-0/+87
| | | | | | | | | | | | sending to the delegate. Change-Id: I1dfb727fe433bed05dd5ac3d0f779ede4ec1d292
* | Fixing missing user check when updating shortcuts for an appSunny Goyal2016-07-201-11/+9
| | | | | | | | Change-Id: I889c555d3402fd71098af29b78eb6d959a071080
* | Merge "Adding support for dynamically adding shadows to the icon" into ↵Sunny Goyal2016-07-201-1/+12
|\ \ | | | | | | | | | ub-launcher3-calgary
| * | Adding support for dynamically adding shadows to the iconSunny Goyal2016-07-201-1/+12
| |/ | | | | | | Change-Id: I94d98750aea1faef8879e25990aa5c41a4894708
* / Update shortcut animations.Tony Wickham2016-07-195-106/+195
|/ | | | | | | | | | | - Open animation: shortcuts reveal using modified circular reveal (so that it reveals in the pill shape instead of a circle); slight translation away from the original icon; scale icon and text. - Hover animation: scale the shortcut pill and translate others away. Bug: 28980830 Bug: 30127368 Change-Id: I8ed05c7a082f2c2a3f6c663da7259f6cd33e394f
* Fixing some commentsSunny Goyal2016-07-141-1/+5
| | | | Change-Id: I9e6eaaf9ee145e2f37dfb97a3259509a72cd73af
* Moving the QSB out of the cell layout to the Drag layerSunny Goyal2016-07-131-0/+72
| | | | | | | | This allows better edge matching for the QSB. The QSB position is kept synchronized with the page scroll and all-apps transition. But its not visible in spring loaded and overview mode Change-Id: I4e6723607ea966ee672273a9ca67c792fd6b5661
* Merge "Add support for launcher shortcuts." into ub-launcher3-calgaryTony Wickham2016-06-222-0/+27
|\
| * Add support for launcher shortcuts.Tony Wickham2016-06-212-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - This CL has no UI but provides the necessary backing for one. - Adds new item type: ITEM_TYPE_DEEP_SHORTCUT, to distinguish from ITEM_TYPE_SHORTCUT. We can reconsider these names. - Adds ShortcutCache, using LruCache for up to 30 dynamic shortcuts (pinned shortcuts are always cached in a HashMap). - DeepShortcutManager queries for shortcuts and other things like pin them. In a future CL it will use the cache, but for now it simply makes an RPC for all queries. - LauncherModel maintains counts for pinned shortcuts, pinning and unpinning when counts reach 1 or 0, respectively. - LauncherModel maintains a map of components to lists of shortcut ids, which Launcher gets a copy of after it is changed in the background. This will allow us to know how many shortcuts an app has immediately, and query for details as the UI is animating. Change-Id: Ic526f374dd10d72a261bae67f07f098fca8d8bca
* | Making LauncherActivityInstallInfo public to prevent access modificationSunny Goyal2016-06-211-1/+1
|/ | | | | | | by proguard Bug: 29539169 Change-Id: I2fbe7672b6456dd60393093bf4a73e7336dbaca6
* Adding a flag (enabled by default) to remove the all-apps button.Sunny Goyal2016-06-171-5/+12
| | | | | | | All apps can still be opened by clicking the caret. Bug: 29398447 Change-Id: I61f1b05cea83a0a49d7cc16c518c5419618ba779
* Pull up all apps interactionHyunyoung Song2016-06-061-0/+8
| | | | | | | | | | | | First phase implementation: dragging and animation interaction is implemented namely in two classes. ScrollGestureDetector and AllAppsTransitionController. FeatureFlag.LAUNCHER#_ALL_APPS_PULL_UP will be true for only AOSP and not in the extending builds. This way, we can safely iterate without turning it on the shipped ready version. b/28917826 Change-Id: I0501309c0121880ffe0555f82d6ac5a145581bb1
* Moving the QSB to the workspace grid.Sunny Goyal2016-05-271-1/+1
| | | | | | | | | | | | The QSB will only be resent on the first screen of the workspace covering the full width of the first row. If will not be movable. The first screen of the workspace will not be movable. The searchDropTargetBar no longer contains the QSB (it can be renamed in aseparate cl). Refactoring all QSB related logic by moving it to a custom view inflated only using xml. Change-Id: Icb4fd6eb855df1af15f685961c38351bf4fd4f4a
* Refactoring out grid occupancy management in a separate classSunny Goyal2016-05-272-0/+149
| | | | Change-Id: I37a830c0f2eb0a0dd4f5fc78fa29127cb18cb3c2
* Opening the system default wallpaper picker on clicking the wallpaper tileSunny Goyal2016-05-171-0/+28
| | | | | Bug: 28790378 Change-Id: If283b60a0b9563ab8e80d49b0ffa195fc3ffda8a
* Removing icon_type columnSunny Goyal2016-05-111-21/+10
| | | | | | | | | Icon type is not used consistently. It is used initially during the loader. Afterwards, we save both the icon and resource to the db. Instead of changing the logic to always read the shortcut-resource first, and fallback to the bitmap if the resource is not available, always write the bitmap to DB whenever the shortcut is edited. Change-Id: I0ea5e88f8904bd3250ca669220b3e5d6aeef1bfd
* Fix incorrect icon greying on pre-N systemRubin Xu2016-04-281-1/+10
| | | | | | | | | The flag we check for package suspension is reused by a hidden constant prior to N, so the flag should only be checked on N or later system. Bug: 28390176 Change-Id: Ia28f62991cc2cd1b5d2cc27a5f11f7edca0ba02b (cherry picked from commit 3ee9080fb47ecb3ecb003519faf24394b8c4761e)
* Refactoring package tracking in managed profile heuristic into aSunny Goyal2016-04-222-195/+278
| | | | | | separate class Change-Id: I4f346422e5c7f94f8559942e21aa01b5c96cd8be
* Adding some utility methods for thread verificationSunny Goyal2016-04-151-0/+50
| | | | Change-Id: I3fb6a1b860bba8a6efe413dd2698f972dc3e2506
* Merge "Removing dependency on getApplicationInfo method added in N" into ↵Sunny Goyal2016-04-081-0/+62
|\ | | | | | | ub-launcher3-calgary
| * Removing dependency on getApplicationInfo method added in NSunny Goyal2016-04-071-0/+62
| | | | | | | | | | | | | | This method is goiing away. We don't need this method anyway since LauncherActivityInfo already has the information Change-Id: Ic6afa1df14958b894925d730e01a2e2d2a6fb98c
* | Changing the scale factor for square iconsSunny Goyal2016-04-071-1/+1
|/ | | | | Bug: 18245189 Change-Id: Iab0074c76083480a2a7316f5563fc48154de6355
* Fixing folder icon not getting redrawn when the contents changeSunny Goyal2016-04-061-2/+2
| | | | | | | | | | | | > Removing parent from ItemOperator as inconsistant values were being passed in workspace and folderPagedView > Fixing itemChanged causing multiple redraws, by passing a 'animate' parameter to explicitely request animation Bug:27740161 Bug:28015426 Change-Id: Ide7b266bde9aad5f450a3f808a59182fe01a5110
* Instead of reloading the launcher, updating items dynamically whenSunny Goyal2016-03-241-0/+31
| | | | | | | Quiet mode changes Bug: 27632028,27763316 Change-Id: I55f018e855448df0abcbf4fd0fcb39344594980c