From 8bf8ba735a91efb92e3dfb676305a4773098ccc3 Mon Sep 17 00:00:00 2001 From: Jon Spivack Date: Fri, 9 Jul 2021 15:06:12 -0700 Subject: [PATCH] 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 --- ...tion_dialog.xml => niu_actions_dialog.xml} | 35 +++-- go/quickstep/res/values-land/dimens.xml | 2 +- go/quickstep/res/values/dimens.xml | 2 +- .../quickstep/TaskOverlayFactoryGo.java | 145 ++++++++++++++---- 4 files changed, 143 insertions(+), 41 deletions(-) rename go/quickstep/res/layout/{niu_actions_confirmation_dialog.xml => niu_actions_dialog.xml} (72%) diff --git a/go/quickstep/res/layout/niu_actions_confirmation_dialog.xml b/go/quickstep/res/layout/niu_actions_dialog.xml similarity index 72% rename from go/quickstep/res/layout/niu_actions_confirmation_dialog.xml rename to go/quickstep/res/layout/niu_actions_dialog.xml index 5dbcca5a45..6e944f8812 100644 --- a/go/quickstep/res/layout/niu_actions_confirmation_dialog.xml +++ b/go/quickstep/res/layout/niu_actions_dialog.xml @@ -16,7 +16,8 @@ + android:id="@+id/niu_actions_dialog_header"/> - + android:layout_height="wrap_content"> + + + + + + + - - @@ -75,12 +84,12 @@