Commit Graph

385 Commits

Author SHA1 Message Date
Jon Spivack
c531784780 NIU Actions: Change AppTheme to LauncherTheme am: d317f17273
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15413718

Change-Id: I64df60ac572d5bb61468ea032e0be7ddc014a87d
2021-07-29 19:48:46 +00:00
Jon Spivack
d317f17273 NIU Actions: Change AppTheme to LauncherTheme
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
2021-07-28 19:14:03 -07:00
Bill Yi
f2b0e01dd8 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I1cb8955229751514f4577ba5d37f8ad1d0ab56c5
2021-07-14 21:40:52 +00:00
TreeHugger Robot
dbfbe2c64b Merge "NIU Actions: Hide button captions when feature is disabled" into sc-dev am: 2d12f20516
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15276138

Change-Id: Ib7f64c660a5bf281c228b4bf4d5ed74f694545a7
2021-07-14 04:22:58 +00:00
TreeHugger Robot
2d12f20516 Merge "NIU Actions: Hide button captions when feature is disabled" into sc-dev 2021-07-14 04:10:46 +00:00
Jon Spivack
de28038e64 NIU Actions: Hide button captions when feature is disabled
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
2021-07-13 18:56:45 -07:00
Bill Yi
2ad8a31402 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I4b7ebce75701bfc23b7c65ed6d03eed16c94f26d
2021-07-13 07:23:22 +00:00
TreeHugger Robot
81b20765b7 Merge "NIU Actions: Add assistant error dialogs" into sc-dev am: ccd3026485
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15246681

Change-Id: I579b9de68a1e7c94f91df6a8d9627809a8b12a67
2021-07-13 01:20:16 +00:00
TreeHugger Robot
ccd3026485 Merge "NIU Actions: Add assistant error dialogs" into sc-dev 2021-07-13 01:05:03 +00:00
Jon Spivack
8bf8ba735a NIU Actions: Add assistant error dialogs
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
2021-07-12 16:23:46 -07:00
Bill Yi
47288bfe0d Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Iffe4974f900e1fe5c7062f5ecb0ad3e322286cfa
2021-07-11 20:40:07 +00:00
Bill Yi
8766f649c7 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ic76c41ac95bc3b018c732775aad6355466292f6e
2021-07-10 23:40:55 +00:00
Tracy Zhou
cbe71f0eff End live tile for overview actions in Android Go am: e23157bbb0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15249978

Change-Id: I710a00ff8bda43467c0310f42978e4635eff6434
2021-07-10 16:24:08 +00:00
Tracy Zhou
e23157bbb0 End live tile for overview actions in Android Go
Fixes: 193275019
Test: N/A
Change-Id: I0c22e557face73f656273da4fec4521a9c86d606
2021-07-10 07:13:58 +00:00
Bill Yi
25acfb5667 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I94fb2323a7f88c1416ee2243ca6ea8b5ce521c86
2021-07-10 00:38:41 +00:00
Bill Yi
bd372ae84b Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I9905f7a629d628d392a1a59d74cbf65baf401b58
2021-07-09 06:01:24 +00:00
Bill Yi
3b8d6cfda2 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I549f22555e9238bd4b47112e6076a1cba6e67a9a
2021-07-08 15:14:54 +00:00
Ashish Gupta
d5892fe778 Merge "NIU Actions: Add NIU Actions tooltip" into sc-dev am: 4e74ccb082
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15126744

Change-Id: I877d9fe09a2a2d658ea38ef2191e7bb2c8b47393
2021-07-08 07:41:22 +00:00
Jon Spivack
c5aac8ffd8 Merge "NIU Actions: Add strings for assistant error dialogs and feature tooltip" into sc-dev am: b598e968e2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15191924

Change-Id: I3e7ae1788bea94edbca08a259825f96b874e47b7
2021-07-08 00:49:47 +00:00
kumarashishg
88be649d21 NIU Actions: Add NIU Actions tooltip
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
2021-07-08 00:48:22 +00:00
Jon Spivack
b598e968e2 Merge "NIU Actions: Add strings for assistant error dialogs and feature tooltip" into sc-dev 2021-07-08 00:39:08 +00:00
Jon Spivack
9be8d842bd NIU Actions: Add strings for assistant error dialogs and feature tooltip
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
2021-07-07 22:48:22 +00:00
Bill Yi
7f8a8f6ecd Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I9769b39a02aa7e2c5546b2dbf4cf6e35c13f8fb4
2021-07-07 16:30:28 +00:00
Bill Yi
abfad49508 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ie0220ac1df352c3ae125d061ec8049e12478f091
2021-07-04 19:07:06 +00:00
Bill Yi
c99f040c03 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I6adbd14a157d4bdd47aaf8fe8ca998da365802ad
2021-07-03 03:14:42 +00:00
Jon Spivack
7b1ea2a163 Merge "NIU Actions: Add privacy confirmation dialog" into sc-dev am: 4e0bc773c8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15098029

Change-Id: I0d70c01f6bbb1da53f12eeb8e5636739b185dd06
2021-07-01 07:24:28 +00:00
Jon Spivack
4e0bc773c8 Merge "NIU Actions: Add privacy confirmation dialog" into sc-dev 2021-06-30 18:59:50 +00:00
Jon Spivack
58905b4f0a NIU Actions: Add privacy confirmation dialog
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
2021-06-29 18:29:22 -07:00
Steven Ng
96702f890b Merge "Use category icon for pending conversation widgets" into sc-dev am: d35dcdec05
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15142493

Change-Id: I9add1a6bef277a7be2f04406946ff8dd19fcb64e
2021-06-29 23:16:01 +00:00
Steven Ng
12f7a59e5c Use category icon for pending conversation widgets
Fix: 192333050
Test: Manual
Change-Id: Ie3895cd4747f1bec1c8ca9af82347bb0eafa7415
2021-06-29 18:04:09 +01:00
Bill Yi
ce114e05f3 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ib7e8679556fb83c611f7fccbf7bf2d7664cd9621
2021-06-24 19:50:04 +00:00
Rajeev Kumar
171c1a3404 Merge "NIU Actions: More specific permissions error codes" into sc-dev am: deeab12791
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15055618

Change-Id: I3c728a5591c4a1e617585752dd7e7a1493995e1d
2021-06-22 04:09:15 +00:00
Rajeev Kumar
deeab12791 Merge "NIU Actions: More specific permissions error codes" into sc-dev 2021-06-22 03:50:26 +00:00
TreeHugger Robot
6ee3ed063f Merge "NIU Actions: Update background and dark mode colors" into sc-dev am: 3f45639b12
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15055430

Change-Id: Ie2543915b3b7227626ba016a48118e3f19aa5634
2021-06-22 00:37:35 +00:00
Jon Spivack
02bbd80ee9 NIU Actions: More specific permissions error codes
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
2021-06-21 16:49:40 -07:00
Jon Spivack
2a2eee1949 NIU Actions: Update background and dark mode colors
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
2021-06-21 15:54:05 -07:00
Jon Spivack
adb1e11d74 Merge "Send NIU Actions Intents to default Assistant" into sc-dev am: 3e48c63180
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14940621

Change-Id: Iebc9fa87b39f213453503305fdc075a6c093db6b
2021-06-14 18:22:54 +00:00
Jon Spivack
77edb686d7 Send NIU Actions Intents to default Assistant
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
2021-06-11 13:58:57 -07:00
Jon Spivack
ea61dfb098 Merge "TaskOverlayFactoryGo: Keep persistent instance of AssistContentRequester" into sc-dev am: b7cecf8a90
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14803962

Change-Id: Idf82c8d5d5d7ffb646fbaeb0403bf9ac42c7b1ce
2021-06-03 02:33:16 +00:00
Jon Spivack
1bd7ccd90b TaskOverlayFactoryGo: Keep persistent instance of AssistContentRequester
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
2021-06-02 16:40:09 -07:00
Rajeev Kumar
6a4f517315 Merge "NIU Actions: Support Dark Mode and Landscape" into sc-dev am: f6e138cf21
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14753495

Change-Id: Ib73d27c843577c4744f8693319f6fa938a02ada6
2021-06-01 19:48:16 +00:00
Rajeev Kumar
f6e138cf21 Merge "NIU Actions: Support Dark Mode and Landscape" into sc-dev 2021-06-01 17:43:43 +00:00
Jon Spivack
3c15800e1d Merge "NIU Actions: Do not send image URI when sending error code" into sc-dev am: 55cca920e0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14752490

Change-Id: Ibee8a9dc6413b76c84a1acd0128201ef4d531c7a
2021-05-28 16:32:20 +00:00
Jon Spivack
55cca920e0 Merge "NIU Actions: Do not send image URI when sending error code" into sc-dev 2021-05-28 01:14:21 +00:00
Jon Spivack
1e1f85beff NIU Actions: Support Dark Mode and Landscape
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
2021-05-27 16:23:51 -07:00
Jon Spivack
6eb0186616 NIU Actions: Do not send image URI when sending error code
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
2021-05-27 14:39:16 -07:00
Bill Yi
1276d7b8d7 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I49ec409fe6df98ada02d378db1f652f5a7e0b278
2021-05-25 22:37:31 +00:00
Jon Spivack
1dc5c439f1 Merge "Disable NIU Actions on Work Profile apps" into sc-dev am: fea72152fd
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14610102

Change-Id: Ibaf041bad8c6ef553d0f3aca9436137d3a232a8a
2021-05-20 21:38:19 +00:00
Jon Spivack
fea72152fd Merge "Disable NIU Actions on Work Profile apps" into sc-dev 2021-05-20 21:16:22 +00:00
Jon Spivack
cdbaea4486 Disable NIU Actions on Work Profile apps
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
2021-05-19 14:58:27 -07:00