OSDN Git Service

Adds Assistant invocation type to home long press.
authorGovinda Wasserman <gwasserman@google.com>
Fri, 19 Apr 2019 13:42:53 +0000 (09:42 -0400)
committerGovinda Wasserman <gwasserman@google.com>
Fri, 19 Apr 2019 13:52:52 +0000 (09:52 -0400)
This allows both the logging of the Assistant invocation type and for
the Assistant to change its behavior based on the invocation type.

Test: Checked value is added to bundle
BUG:128982146
Change-Id: I1376f4b20fdb82e73d80a396f1e148c1a5fba01e

packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java

index 4d2b56c..95d51da 100644 (file)
@@ -715,7 +715,10 @@ public class NavigationBarFragment extends LifecycleFragment implements Callback
         }
         mNavigationBarView.onNavigationButtonLongPress(v);
         mMetricsLogger.action(MetricsEvent.ACTION_ASSIST_LONG_PRESS);
-        mAssistManager.startAssist(new Bundle() /* args */);
+        Bundle args  = new Bundle();
+        args.putInt(
+                AssistManager.INVOCATION_TYPE_KEY, AssistManager.INVOCATION_HOME_BUTTON_LONG_PRESS);
+        mAssistManager.startAssist(args);
         mStatusBar.awakenDreams();
 
         if (mNavigationBarView != null) {