summaryrefslogtreecommitdiffstats
path: root/go
Commit message (Collapse)AuthorAgeFilesLines
...
| * Check orientation changes on task item attachingKevin2019-05-021-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | onConfigurationChanged is only passed down to views that are currently attached. Naturally, a recycler view has some views in its pool that are not attached and thus do not get the call when the orientation changes. When this happens and the view is then attached later, it can be in an incorrect orientation. To fix this, we save the current orientation the task item is using and check on attaching if it's still the same as the orientation the device is in. If it isn't we then run the orientation change logic. Bug: 131848689 Fix: 131848689 Test: Change orientation with some views not attached, see that they are correct orientation when attached Change-Id: I3dec501c332338444e321b4a50876c7840a5bc6e
* | Merge "Fix bug where we left recents right after entering" into ↵TreeHugger Robot2019-05-022-6/+12
|\ \ | | | | | | | | | ub-launcher3-qt-dev
| * | Fix bug where we left recents right after enteringKevin2019-05-022-6/+12
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was an issue where tapping recents while there were no tasks and we first launched would not actually go to recents. This was because we had the leave recents call tightly coupled with showing the empty view. When the user first goes to recents and no task is available, we animate to the empty view. However, this also causes us to leave the view even though nothing happened and it results in the user leaving right after enterring. Instead, we should couple the leaving logic with the actual action, removing the task. Bug: 131708240 Fix: 131708240 Test: Go to recents while empty, goes on first tap now Test: Ensured swipe to remove => leave recents logic still works Change-Id: Ifff6d051d957838c3cfae200a2a8ebb316b22965
* | Merge "Add scrim under status bar and above thumbnails." into ↵TreeHugger Robot2019-05-023-1/+30
|\ \ | | | | | | | | | ub-launcher3-qt-dev
| * | Add scrim under status bar and above thumbnails.Kevin2019-05-023-1/+30
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For Recents Go, the thumbnails actually go directly under the status bar text, so we should ensure that there is some scrim to ensure it's always readable. We do this by adding a foreground drawable scrim to the activity's root view. Since this root view is used in other Launcher states, Launcher has to toggle this on and off when going/leaving recents. When this view is just being used for recents as a stand-alone, however, (i.e. when the user has a different default launcher), it's fine to set this once at the beginning since nothing else uses the root view. Bug: 131834685 Fix: 131834685 Test: When quickstep is the default, go to recents and back. Status bar is readable. Scrim does not animate when going to and from recents. Test: When quickstep is not the default, scrim shows up fine Change-Id: I5d88a1fd873860887b3141e1ec0ee999f59ccfad
* / Anti-alias thumbnail corners to look smootherKevin2019-05-021-0/+1
|/ | | | | | | | | Thumbnail corners should be anti-aliased so that they look smoother and less rough. Bug: 131779031 Test: Manual, go to recents and see corners Change-Id: I49a299671ec37f56b6eebe2dd2eb71790e8cb2b4
* Merge "Fade task items when swiping out" into ub-launcher3-qt-devTreeHugger Robot2019-04-302-2/+18
|\
| * Fade task items when swiping outKevin2019-04-302-2/+18
| | | | | | | | | | | | | | | | | | | | | | As we have a fixed width for the task list now, we have to ensure that we do not clip the task items when we swipe them out. In addition, we should fade them out by the end of the swipe as the swipe end location may still be on a visible part of the screen. Bug: 131686863 Test: Go to landscape mode, swipe out tasks Change-Id: If86136a9f9d47098a6dd5d355d3a99d540165c77
* | Fix recents order being reversed sometimesKevin2019-04-301-1/+2
| | | | | | | | | | | | | | | | | | | | Occasionally, the recents list items were reversed. This is because RecentsTaskList#getTasks returns the actual backing list which we were reversing, so we solve this by making a new array list. Bug: 131367388 Test: Do repro in bug, no longer gives reversed order Change-Id: I825d284e4768c2b53fedf07480e99d195acfa6d6
* | Overlap insets with item marginsKevin2019-04-303-13/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The system insets already create visual space for us, so there is no need to add additional margin if we already have the insets acting as a buffer. So we can just overlap them, preventing scenarios where we have too much scrollable white space. As a bonus, we get a more robust way of determining the clear all button's bottom margins as we now base it directly off whether the insets cover the space as opposed to using the orientation (which is an indirect way of knowing the insets). Bug: 131636735 Test: Test on 320x569 mdpi. Matches UX spec. Change-Id: I6a3a3a5475ed303ed21bca3ed3cc363276c6e745
* | Merge "Fix thumbnail views not rotating w/ orientation" into ub-launcher3-qt-devTreeHugger Robot2019-04-302-1/+3
|\ \
| * | Fix thumbnail views not rotating w/ orientationKevin2019-04-292-1/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | View has an optimization where it will not measure again if it is exact and the measurement has not changed. This means that when an onMeasure pass starts off for each task view on orientation change, it does not get passed down to the view holding the thumbnail and icon as its measure specs have not changed. This causes an issue as we use this measure call to react to orientation changes and re-measure the thumbnail view to match the orientation of the device. To fix this, we call forceLayout on the child explicitly on orientation change to ensure that we get the measure call. This sets the flag to force a re-measure in the next layout. Bug: 131427332 Test: Do repro in bug, view rotates correctly Change-Id: I0ef84dfcd0b3883582c8903d99d5e8a757ae8e74
* | Merge "Add 1.5x dimens for screens that are large enough" into ↵TreeHugger Robot2019-04-291-0/+30
|\ \ | |/ |/| | | ub-launcher3-qt-dev
| * Add 1.5x dimens for screens that are large enoughKevin2019-04-291-0/+30
| | | | | | | | | | | | | | | | | | | | | | For phones with smallest width at least 480 dp, we can scale everything by 1.5x to fill in the space better. For phones with less width than this, we maintain the current 320 dp specification. Bug: 131610834 Test: Emulate on 240x320 ldpi, 480x800 hdpi, 480x800 mdpi, 800x1280 mdpi on both portrait and landscape and layouts work as intended Change-Id: I3f7d28dc22aa3a2de96b3de51b1aa5b5c2cb19fc
* | Don't clip recents items with system barsKevin2019-04-292-2/+9
|/ | | | | | | | | | | In order for items to go under the system bars, we have the recents view consume the insets by setting padding to the recyclerview instead of setting the margins with it. Then, we ensure the recycler view does not clip to padding so that items are still visible even when scrolled past. Bug: 131626311 Test: Manual test; items go under system bars Change-Id: Iecbab537b8f9e2993ad5f74f87ba2e0c56fb0f63
* Align layout to dp grid for landscapeKevin2019-04-293-6/+20
| | | | | | | | | | Set a fixed width for the recyclerview and center it for landscape mode. In addition, put a margin below the clear all button as we no longer have the nav bar padding the area below. Bug: 131610834 Test: Manual; See recents UI in landscape mode Change-Id: I8c74d2d7cc363a76c4c978befdc975693d700f86
* Layout aligned to dp grid for portrait (3/3)Kevin2019-04-295-112/+2
| | | | | | | | | Remove old custom view functionality to size based off device height since we now specify dimensions exactly. Bug: 131610834 Test: Builds, layout meets spec in portrait mode Change-Id: Id401f27360f6bb2450d3ffb77888a1f709dc62f8
* Layout aligned to dp grid for portrait (2/3)Kevin2019-04-292-1/+29
| | | | | | | | | Add vertical margins to all recycler items. In the future, we will change these dynamically to ensure a task item is semi-visible on screen Bug: 131610834 Test: Builds Change-Id: I0b21c8ea7249e7fac640705e8128e309b954815b
* Layout aligned to dp grid for portrait (1/3)Kevin2019-04-294-9/+12
| | | | | | | | | | This CL sets fixed dp values for the recents item views based off the UX spec. Vertical margins will be handled by an item decorator in the next CL to handle special cases. Bug: 131610834 Test: Builds Change-Id: Ieb7936bd24933552844a6bd1bdb9e3101b8cdca4
* Merge "Rotate thumbnail view based off device orientation" into ↵TreeHugger Robot2019-04-261-4/+12
|\ | | | | | | ub-launcher3-qt-dev
| * Rotate thumbnail view based off device orientationKevin2019-04-251-4/+12
| | | | | | | | | | | | | | | | | | | | | | In landscape mode, recents thumbnails should be shown horizontally, so this CL modifies the custom view so that it resizes to display a horizontal snapshot. Bug: 114136250 Bug: 131095241 Test: Rotate recents, see view width change appropriately Change-Id: Ic3d8d039535c673567d19c372da211d177691a81
* | Round thumbnail cornersKevin2019-04-254-4/+39
|/ | | | | | | | | Round the task thumbnail corners as per the mocks by setting the bitmap as a shader. Bug: 114136250 Test: See rounded thumbnails on recents Go Change-Id: I2bf8ebce34deb0d1cb6199cf8f6d5fa6ac746bb8
* Don't layout empty tasks in layout anim if we have the actual content.Kevin2019-04-251-0/+7
| | | | | | | | | | | | | | | | | | | | When we load the task content (icons, snapshots, etc), oftentimes, we are still in the middle of the layout animation where items are fading in from bottom to top. At this point, we start a second content-fill animation from bottom to top that fades from empty => filled after the first animation. However, we can improve this so that empty views aren't shown for a split second for some of the later laid out views. If the first animation has not finished and we would animate a content change from empty => filled but the view is currently still not visible, we should just complete the content transition on the spot so that the layout animation lays out the filled version instead. Bug: 131339235 Test: Go to recents, observe lay out animation does not continue to lay out the empty view first Change-Id: I936a81e6cf8b3552cdee90c183fc841f50ec9ea8
* Merge "Fix overview cmd launching wrong task in landscape" into ↵TreeHugger Robot2019-04-253-13/+39
|\ | | | | | | ub-launcher3-qt-dev
| * Fix overview cmd launching wrong task in landscapeKevin2019-04-243-13/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we used the bottom most view in recents list to launch the recent task when the user pressed the overview button. However, if the user is in landscape and scrolls up so the bottom view is not attached, pressing overview command will launch whatever the bottom task is visually which is incorrect. Instead, we get the actual task from the model to launch and only use the "view => app" animation if the view for that task is attached. If it isn't, we use the basic animation. Bug: 130735711 Test: Go to landscape, scroll up, hit command, launches correct task Change-Id: Idff88054443259e917bbec1b47d78efbb1544283
* | Rename launcher:iconSize attribute to prevent overriding materialRyan Mitchell2019-04-241-1/+1
|/ | | | | | | | | | | | | | | | | | | A previous change [1] introduced the material library as a static library for the SecondaryDisplayLauncher. The material library defines a resource "attr/iconSize" with format="dimension" while Launcher3 defines a resource of the same name with format="float". The material resource is being overriden by the Launcher3 resource and is preventing aapt2 from disallowing multiple definitions of the same attribute with different formats. This change renames the Launcher3 iconSize so it will not collide with the material resource. [1] If183dd35a1d197c4a9a8225a021e36c4f1662587 Bug: 129146717 Test: build success and inspection of generated apk Change-Id: I5eb54ea606ddcfb47d5150b44906a8707203e905
* Merge "Use custom drawable for Recents Go thumbnails (2/2)" into ↵TreeHugger Robot2019-04-244-17/+30
|\ | | | | | | ub-launcher3-qt-dev
| * Use custom drawable for Recents Go thumbnails (2/2)Kevin2019-04-234-17/+30
| | | | | | | | | | | | | | | | | | | | | | Hook up the thumbnail drawable created in the first CL to the task thumbnail so that the drawable automatically rotates and resizes based off the device orientation. Bug: 114136250 Bug: 131095241 Test: Go to app in landscape, go to recents, rotate => thumbnail rotates Change-Id: Ib58e45ab3e94aeb080e47b1d5b38c221acce5ef3
* | Tweak clear all button layout UIKevin2019-04-231-0/+2
|/ | | | | | | | Add vertical margins to clear all button and add horizontal padding. Bug: 114136250 Test: Manual test on marlin_svelte and emulated tablet (1280 x 800) Change-Id: Iae8d6609ca1031947e8e8d90f526d9cbda070ee5
* Clear all button should not be swipableKevin2019-04-232-2/+16
| | | | | | | | | | Unlike other task items in the recycler view, the clear all button should not be swipable as you obviously can't remove the button. Bug: 114136250 Test: Go to recents, attempt to swipe clear all, does not work Change-Id: I0ab00c03b697f2174431b69bbf758c3ff104db97 (cherry picked from commit cd88cf8d1c37c65e55f98e7003151663ceeebf0a)
* Use custom drawable for Recents Go thumbnails (1/2)Kevin2019-04-231-0/+129
| | | | | | | | | | | | | | | | In order to support rotated thumbnails based off the device orientation, we should create a custom drawable that supports drawing a rotated bitmap based off some requested orientation. This CL adds this class, and we'll use it in a later CL. By baking this directly into the drawable, we prevent unnecessary allocations of rotated bitmaps. Bug: 114136250 Bug: 131095241 Test: Builds Change-Id: Ib4e83e3619028c583e10f1b8d743a365ec310346 (cherry picked from commit 518ff10856a60c9fe7a6ccdbd7e6c6a88cba3c6e)
* Add clear all view that scales off device heightKevin2019-04-234-19/+76
| | | | | | | | | | | Add a custom clear all view that scales its height based off the height of the device in portrait. This view holds and lays out the actual button. Bug: 114136250 Test: Task items + clear all scale to fit flush with screen size Change-Id: I72b175681c104588970d57cde34cebc0f06b55a0 (cherry picked from commit a2b8ca883040a33a60968c83d6ef9c48468ffe32)
* Ensure recents scrolled to first task in landscapeKevin2019-04-231-2/+11
| | | | | | | | | | | | | The app should animate to the bottom view which means we should ensure the bottom view is scrolled to be visible at the bottom when we animate in. Note that this is only a consideration in landscape since in portrait, all tasks are always visible and the recyclver view is not scrollable. Bug: 114136250 Test: Go to recents Go from app in landscape mode Change-Id: If4ea35759cc881f2c32565368d031620b62a45dd (cherry picked from commit 64bb5bbb786f1d7020984c1b1bfbb93099f12ba7)
* Enable landscape mode for Recents Go.Kevin2019-04-231-0/+4
| | | | | | | | | | Set rotate state to request rotate on the overview state being enabled Bug: 114136250 Test: Go to recents go, rotate screen Test: Go to recents from app Change-Id: If63bf25f61b873f67986e463a980e6d67a9b5ae4 (cherry picked from 20e1f17340c14ff35549e9490da6f75bfe906d44)
* Remove old recyclerview layout logicKevin2019-04-232-32/+3
| | | | | | | | | | | Remove old layout logic for recycler view as there is no need for the recycler view height to change based off device profile. Instead the task items themselves will change. Bug: 114136250 Test: Builds Change-Id: Ia6dae22e3e73fafe46d4adf834bf7d24af36a607 (cherry picked from commit cacf7df2d4dcd35b166a42a512bcacd74bae471d)
* Calculate task height directly off portrait heightKevin2019-04-234-45/+32
| | | | | | | | | | | | Change task height calculation implementation to be directly based off device height in portrait mode. This allows the recycler view layout manager's job to be simpler while still ensuring that task height changes dynamically based off device configuration changes. Bug: 114136250 Test: Go to recents Go, task height is based off portrait mode height Change-Id: I9c7cada3b89d2b2cea5ece8c357a40ce5974a2e6 (cherry picked from commit 3172c6811ba4b59763c3fb196b3b26b8411e8210)
* Fix task adapter notify merge conflictKevin2019-04-231-7/+4
| | | | | | | | | Resolved merge conflict of ag/7093095 incorrectly and accidentally kept both HEAD and CL changes. Resolved in this CL. Test: Manual test Change-Id: Iad42ab12b486201f496c83f99c8c6094273543f3 (cherry picked from 420115e7f1ccb881502ce126d74583eba8b2bb8d)
* Move clear all to recycler view (2/2)Kevin2019-04-233-31/+48
| | | | | | | | | | | This finishes moving the clear all button to the recycler view. Primarily, this CL deals with changes to calls that depended on recycler children being task item views and starting at the 0th index. Bug: 114136250 Test: Build, manual test Change-Id: Icecf257409207de351345997205def11e1048ab0 (cherry picked from 8659925532070807d881be62e457caa4a8dadcfd)
* Move clear all to recycler view (1/2)Kevin2019-04-235-71/+140
| | | | | | | | | | | | | | First part of moving clear all button to recycler view. This CL adds support in the recycler view adapter for a clear all holder type and hooks it up to the previous clear all animation. Adding this breaks several assumptions made externally on the type of the item and index which will be addressed in the second part. Bug: 114136250 Test: Builds, testing pending 2nd part Change-Id: Ib16790028d4e9f520945a987b3dace40d19f2468 (cherry pick from 8573ff04b4148c47222abd1a89d99eda734290c3)
* Only switch item animator on content fill if neededKevin2019-04-231-3/+7
| | | | | | | | | | | | | | | | We currently switch to a different recycler view item animator for a special content fill animation when we have loading item UI up and want to animate to the actual content. However, it's possible if the task content loading is fast enough, we may return before the adapter changes have actually propogated to the recycler view layout. In this case there is no loading UI to fill and we should not switch item animators. Bug: 130820737 Test: Go from app => overview, try to remove, remove animation occurs properly Change-Id: Ic95854d04df98023f444daf967c58bdd8177722a (cherry picked from commit 035f0d2157b6dcc303138374f032a9016a4bc4f3)
* Fix NPE and make getTask return OptionalKevin2019-04-234-12/+18
| | | | | | | | | | | | | | | | | Fix an NPE when attempting to update the thumbnail in IconRecentsView. If the task item is binding the loading UI, it has no task so the app will crash, so we just need to ensure the task is actually present first. While we're here, also change the API to return an Optional<Task> and make a tighter contract, making it harder to make this mistake in the future. Bug: 130746661 Fix: 130746661 Test: Go from app => overview on recents Go Change-Id: I1402fcd2e58bdeb703c7dcc1b9dcf0d258808b3d (cherry picked from commit 77f01524bd6a031a8fdb8089fa96aeda12f14c8d)
* Fix ViewTreeObserver crash on Recents GoKevin2019-04-231-3/+2
| | | | | | | | | | | | | | The view tree we originally attach the onGlobalLayout listener to may no longer be alive when we get the callback as the view tree observer merges when the view attaches to a view hierarchy, giving us an exception. Instead, we should request the view tree observer again and remove it from there. Bug: 130740246 Fix: 130740246 Test: Manual test, no longer crashes Change-Id: Idb982022e72db75b8e20fd5bea00655212dc0258 (cherry picked from commit 60f21a8d3ab501eb5a4b29ff3d7eb94e86f8f0d8)
* Fix snapshots not updating on app => overview.Kevin2019-04-232-15/+17
| | | | | | | | | | | | Previously we were only updating the model on snapshot update and not the view itself, so the view would have an outdated snapshot if it loaded everything before the data updated itself. Bug: 114136250 Fixes: 130635650 Test: Go from app to overview, transitions properly with new snapshot Change-Id: Ife9cae7a700a855788b5d25b05d78e562e1b27f0 (cherry picked from commit 025799ba9c3b38b9c5dd613d81bf0cff062dfa86)
* Fix views not being visible on Recents Go.Kevin2019-04-231-2/+7
| | | | | | | | | | | | | | | | If we bind the loading task views but then on the tasks being loaded realize there are no items, it's possible to animate from the empty content view to the regular content view and then back. Currently, this leads to updateContentView not being called properly the second time since both views are still visible during the animation, so this CL fixes that and cancels any on-going crossfade animations. Bug: 114136250 Fixes: 130580680 Test: Remove last item from recents, go to recents again, empty view shown Change-Id: If1a4caab15f9b6d7ccd3abbc06f5866e06650db8 (cherry picked from commit cce954f334c31847cb49a8aaaa9731dcf88a9229)
* Smarter task laying out based off onMeasureKevin2019-04-238-74/+157
| | | | | | | | | | | | | | Previously laid out via calls to layoutParams. This isn't as optimized as being baked into the measure + layout system and has the issue of being less flexible. For example, if the device profile changes (e.g. orientation change), we'd have to apply new layout params for all the views. With this CL, we would only need to do this for top-level views and the children will resolve themselves. Bug: 114136250 Test: Check layout on marlin + walleye Change-Id: Iddd503a8844bdde7724d3f804660da61719d5c90 (cherry picked from commit c98f116b7757e48d09f29325e0c32d20fedc18d6)
* Change layout size to be dependent on device sizeKevin2019-04-237-40/+141
| | | | | | | | | | | This CL changes the layout sizes to be dependent on device height as opposed to static values so that it works on different decides out of the box. Bug: 114136250 Test: Tested how layout looks on marlin_svelte and walleye Change-Id: Ie000bc797d7dd2e38cd705d54f3e09c79e1a2176 (cherry picked from c06522c82661501cd09c305f51f0e2b07e904563)
* Update Go recents visibility based off adapterKevin2019-04-231-1/+1
| | | | | | | | | | View visibility should be based off adapter since that's what the layout items are based off of. Bug: 130440957 Test: Loading UI is shown when going to recents Go Change-Id: I1f167553b6fdce757865c739b9793b63a20e7f57 (cherry picked from commit f1a47a0fe6e3b6f2071f8a30ac24d7522040d76c)
* Animate content fill animation to Recents GoKevin2019-04-233-10/+323
| | | | | | | | | | | | | This CL adds the animation that occurs when transitioning from a set of empty views to the actual task list after it is loaded. This is done by setting a one-shot item animator that animates changes, for item views that fade from empty to filled, and removes, for when we have too many empty views. Bug: 114136250 Test: Artificially increase task list load time and see animation fill Change-Id: Ibbc09db702e591063ceea61df2359f18a3fcf8f9 (cherry picked from commit 987799dfa15ebfd55c93e4c509cc200792b95fab)
* Animate to bottom view in app => overviewKevin2019-04-233-38/+9
| | | | | | | | | | | | We always want to animate to the bottom so we should just do that if we have the view laid out even if at the time the app task doesn't actually match the view. Bug: 114136250 Test: Go to recents, press overview twice quickly, see it animate correctly Change-Id: I0516ef127ff6ef0f865c85314c9ffe4a7c6ef9e3 (cherry picked from commit 86957f28fff4c3b68f4ea81d48a29b42c53e8176)
* Differentiate empty UI from default in recents GoKevin2019-04-232-10/+8
| | | | | | | | | | Use the "empty" drawable as the initial UI until the recents task list and order is loaded, then switch to default/filled UI. Bug: 114136250 Test: Manual test; see empty UI when loading takes time Change-Id: I85b72e6d40d7224b28217cbf4e05515ec1e9451b (cherry picked from commit a2c4200cde475cd5ab9de35945e2e8458589c39c)