Add @Nullable annotations for the fields that are expected
to be null at arbitrary lifecycle time and are their usage
is protected by null checks.
Bug: 205828770
Test: m LauncherGoResLib
Change-Id: I9c31e1dc0d01cdd68dfff0a005ba1f40c257f8ea
(cherry picked from commit 920dc2f28f81ce2aec07477dfb6f4efd8f91e4ad)
- Launcher used to restart when density changes before http://ag/14234761, which added smallestScreenSize and density in configChange
- http://ag/14234761 aims to avoid restart when switching display in split dispalys, for which only size changes, therefore density is unnecessary in configChange
- Keeping density in configChange make Launcher acitvity to stay after changing display size, making all buttons stays in old size in previous denstiy, which is a bug
Bug: 204157738
Test: manual
Change-Id: Ib85326078c67c35d90dc5e9ae5c20eeb5286a610
Test: manual (see video in bug) and added PackageUserKeyTest
Also tested pending conversation widget to ensure the right icon
is shown.
Fix: 201062480
Change-Id: If23c28bd93c54fb1747648309ab3c238a1810902
It has never been enabled, and is not plan of record.
Bug: 201446691
Test: local and updated unit tests
Change-Id: I5ac6d40ba1dbcf28de4355cc51fff74cfb37ebc6
to be allowed.
This check existed before the user was able to rotate via the rotation
button while autorotate setting is off.
Test: manual
Fix: 201511975
Change-Id: I920886cb42ec5b8f4d3eb0bdd80b216cd7c3c849
Some theme attributes used for the NIU Actions Overview were originally defined in a theme that inherited from LauncherTheme. However, 3rd-party Launchers that also used themes derived from LauncherTheme were unable to access these attributes, leading to crashes when they tried to open the Recents screen on Go devices. Just adding the attributes to LauncherTheme solves this issue.
Bug: 194810415
Test: Manual (tried a couple 3rd-party launchers on Wembley)
Test: m -j RunLauncherGoGoogleRoboTests
Change-Id: I7a2541f2a2ab3b39e0c6cf2fe40a4b096047df70
- Removed modalTransformY as overview actions no longer need to move in modal view
- Moved row spacing and page spacing to DeviceProfile
- Added several tablet / orientation specific DeviceProfile params
Bug: 194194694
Test: Manual
Change-Id: Id5435e7f6fc1b6fb7c0e55e55fa240cf84c4d6da
Previously, only the buttons themselves were hidden when the feature was flagged off at build time. This adds the rest of the relevant layout UI (captions, spaces) to that logic.
Bug: 192692326
Test: Manual (Pixel 3A, enable_niu_actions on and off)
Change-Id: Ic58d9891887e3e0eb10d38af80b73f04cf66ea79
The NIU Actions buttons send intents to the user's default assistant. If the user clicks one of the buttons without an appropriate default assistant set, a dialog will appear to explain the situation and redirect the user to Settings.
The existing privacy confirmation dialog code has been refactored into a reusable dialog, which is used here.
Bug: 192505939
Test: Manual on local Pixel 3A (unit tests to be added in b/192406446)
Test: m -j RunLauncherGoGoogleRoboTests
Change-Id: I7b43e008aa74805b166c09936fa938a5834c8460
These tooltips are added to educate the user about NIU buttons actions. We have added tooltips for Translate and Listen NIU actions buttons.
Bug: 186006700
Test: Manual
Change-Id: Ib076c2a44055b62f2daf06bddf45aca220a28756
The assistant error strings will be used in dialogs that appear when the user clicks the NIU Actions buttons without an appropriate default assistant set on the device. The tooltips will appear to highlight and explain the feature for first-time users. Adding the strings before the dialogs themselves in order to unblock translation efforts.
Bug: 192505939
Bug: 186006700
Test: Manual (code builds, existing strings unchanged on device)
Change-Id: I2c37b5871545e99a6bba8d060c927cbd29ef5081
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