This adds a dialog to inform the user that the NIU Actions buttons need to send data to Google in order to function. The user can accept or reject this. The dialog will block use of the feature until the user accepts.
Bug: 191818216
Test: Manual (Pixel 3A with multiple user profiles)
Test: m -j RunLauncherGoGoogleRoboTests
Change-Id: Iedd056ce239de5269d02a31d28a9778efae34ede
The user must enable two different Assistant permissions for the NIU Actions feature to function. Previously, a single error code was sent if either permission was missing. Now a different code is sent depending on which permission is missing, allowing Google Go to better direct the user to the proper setting.
Bug: 191109150
Test: Manual (Pixel 3A)
Test: m -j RunLauncherGoGoogleRoboTests
Change-Id: Id301ffddf36b992b5722c52ccc6e597e003942dd
This updates the Recents screen to use the default background colors and updates the NIU Actions buttons to better contrast with the background in dark mode.
Bug: 191049004
Test: Manual (Pixel 3A)
Change-Id: I8aef9968623be373fb71a729a0b99a7b9899cff1
This changes the recipient for NIU Actions from a package hard-coded in a config file to the currently selected default Assistant. The user can change this under Settings -> Default apps.
ImageActionUtils has also been updated to handle the case where its
Intents cannot be resolved, preventing a crash if the user sets the
default Assistant to something that cannot receive NIU Actions.
Bug: 186655099
Test: Manual (Pixel 3A, set default Assistant to Google Go and None)
Test: m -j RunLauncherGoGoogleRoboTests
Change-Id: I03b93597092575902d507615f32b63f4050c4c69
Holding a reference to AssistContentRequester prevents it from being deleted by the garbage collector while it is still in use.
Bug: 189985872
Test: Manual (Pixel 3A)
Test: m -j RunLauncherGoGoogleRoboTests
Change-Id: I204aab907175a171c496c3bd146a8b23d2bbcf16
This adds light and dark color variants for the UI elements on the Go Recents screen. Toggling Dark Mode will switch between the themes. Additionally, the button spacing definitions have been updated to better support Landscape orientation.
Bug: 187866121
Bug: 183714277
Test: Manual (Pixel 3A)
Change-Id: Ia2c0cbf372882aad87e4018d10d8f85bd92842e0
In the case of a permissions denial, we do not send a screenshot in the NIU Actions Intent. Previously, we sent a fake URI to fit with existing recipient Intent filters, but the recipients have been updated to no longer require this.
Bug: 186780965
Test: m -j RunLauncherGoGoogleRoboTests
Change-Id: I7cf92a03946e1663150f963fcea7f6b92833da68
If the currently selected Recent app belongs to a Work Profile, do not allow the user to invoke any of the overview actions. Instead, show the standard blocked by policy message (R.string.blocked_by_policy).
Bug: 187491010
Test: Manual (Pixel 3A)
Test: m -j RunLauncherGoGoogleRoboTests
Change-Id: I552da9512ab19993eb4bb65fe9269d2aee9f0c4e
This tweaks the layout and fonts in the Go Overview. It also adds rounded corners to the task snapshots in the Recents view on Go by adding an overrideable value to the base Quickstep Launcher.
Bug: 186004471
Test: Manual (Pixel 3A)
Change-Id: I220836a95a6416b85bdb71d88822d25d939cf205
This updates the checks for ASSIST_STRUCTURE_ENABLED and ASSIST_SCREENSHOT_ENABLED to return 1 if the settings do not exist. This matches the logic in the Settings app iself, which has the toggle boxes on by default but does not actually initialize those values until they are toggled for the first time.
Bug: 187868947
Test: Manual (tested on Pixel 3A)
Change-Id: I4ef067dcf21b40eea71199e057d7a00d1d8fb2b3
The shapes, colors, icons, and layout of the NIU Actions buttons have been updated to match the latest UI specs. The icons also no longer overlap with the layout above them, which solves a picking issue.
Bug: 186004471
Bug: 187460625
Test: Manual (tried on Wembley and Pixel 3A)
Change-Id: Ie7a0ca0c21805fc0f126053ec791fd2460710d33
- This is practically a revert to http://ag/c/13687966/5 and refactored to use DisplayController.DisplayInfoChangeListener
- Make Launcher handle size and density change so transition is less janky when screen size changes
- Added fix in RecentsView to update state and TaskView when display profile changes
- Removed 720dp specific resoureces
- Removed unused widget_section_indent
- Removed unnecessary all_apps_background_canvas 600dp override that is not needed in AllApps+
- Moved remaining dp specific into DeviceProfile
- Simplified allowRotation logic to use single variable in DeviceProfile to determine if allow rotation is enabled by default
Fixes: 180803696
Test: manual
Change-Id: Iea0a7d1a0e14dc3613152dd3b3887450a2e1fc2f
This adds the package name of the currently suspended app to the NIU Actions Intents, for logging purposes.
Bug: 186388671
Test: Manual (printed out the Intent extras while trying various apps)
Test: m -j RunLauncherGoGoogleRoboTests
Change-Id: I8180347675c8940c960e4aa4c47dec508207c780
This checks for the ASSIST_STRUCTURE_ENABLED and ASSIST_SCREENSHOT_ENABLED permissions before sending NIU Actions Intents. If either permission is absent, the screenshot is not sent, and an error code is added to the Intent.
Bug: 182010359
Test: Manual (toggled permissions and clicked NIU Actions buttons on Wembley device)
Test: m -j RunLauncherGoGoogleRoboTests
Change-Id: Icf0db739f5010862cc2bac496f5410665625f3be
This updates the layout of the overview buttons to better match more recent UX mocks. It also restores the buttons' captions, which had gone missing.
Bug: 183448909
Test: Manual (verified on Wembley and Sargo)
Change-Id: I931df92cd0d255289168694d4a950649eec7da75
- calculateTaskSize now returns the Rect for focused task
- Introduced calculateGridTaskSize for non-focused task, and translate non-focused tasks to fit the grid
- As Task Rect is now vertically centered, removed ClearAllButton's grid vertical translation
- When ClearAllButton is not shown (e.g. quickswitch), make sure ClearAllButton's scroll won't be used when page snapping. This happens when page scrolls are translated so they're negative.
- Added back ActionsView when task is focused below the TaskView, which become invisible as you scroll
- In Modal state, move the ActionsView down so it won't cover the TaskView
Bug: 175939487
Test: manual
Change-Id: Idfa94a51f856418adc0503cf04211dcb4b1814fe
Extract the logic for fetching AssistContent into a common reusable place.
Bug: 179705864
Test: Local build of main launcher
Change-Id: Ife37a393d93f899fa1ae460bdcf0cadff6468b04
The code in this directory only impacts the Go Launcher variants, so it would make sense for the owners to be from the Go team.
Bug: 183627385
Test: N/A
Change-Id: Iab09be2d590d25bce6de07048befa2e832a54623
The visual search button on the Recents screen (on Go devices) will be renamed to Lens.
Bug: 183618164
Test: Manual
Change-Id: I86371e604bd0204510737e5088c95404129818bb
Made a few things public and marked them as @VisibleForTesting.
Bug: 179738220
Test: atest -v LauncherGoGoogleRoboTests
Change-Id: I231316ecf9282ad4d54038e218f44f062b3fa413
Stop data exposure of work profile by blocking
content capture of recents apps when the work
profile is locked.
Manual testing steps
* Set up work profile
* Set personal and work pattern
* Open work app, enter work pattern and
verify content capture is possible
* Lock device
* Go to Recents and select already opened
work app. Verify content capture is not
possible until work pattern is entered.
Bug: 168802517
Test: manual testing
Change-Id: I3e6ba1d8645335785e8e26cdc895ea9c0017a0fd
This flips the feature flag to enable the NIU Actions buttons in the Go Launcher Recents page.
Bug: 158157668
Test: Manual (on local wembley device)
Change-Id: Ifa49cbb8840556ce53a09f00e36b0f6a12eb8d60
By fixing the action buttons container height and allowing wrap content on overviewActionsView all views have enough room to be displayed and actions button container height can be calculated.
Bug: 182854439
Test: Manual
Change-Id: I34516ba42430d8fe6774e10215dd8ac1127920c8