Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 93f3fc87 authored by Chris Wren's avatar Chris Wren Committed by Android (Google) Code Review
Browse files

Merge "add metrics to assistant" into mnc-dev

parents 339a9bbf a35c96eb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import android.view.View;
public class MetricsLogger implements MetricsConstants {
    // Temporary constants go here, to await migration to MetricsConstants.
    // next value is 239;
    public static final int ACTION_ASSIST_LONG_PRESS = 239;

    public static void visible(Context context, int category) throws IllegalArgumentException {
        if (Build.IS_DEBUGGABLE && category == VIEW_UNKNOWN) {
+1 −0
Original line number Diff line number Diff line
@@ -1056,6 +1056,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
            if (shouldDisableNavbarGestures()) {
                return false;
            }
            MetricsLogger.action(mContext, MetricsLogger.ACTION_ASSIST_LONG_PRESS);
            mAssistManager.startAssist(new Bundle() /* args */);
            awakenDreams();
            if (mNavigationBarView != null) {
+3 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ import android.view.WindowManager;
import com.android.internal.app.IAssistScreenshotReceiver;
import com.android.internal.app.IVoiceInteractionSessionShowCallback;
import com.android.internal.app.IVoiceInteractor;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.os.IResultReceiver;
import com.android.server.LocalServices;
import com.android.server.statusbar.StatusBarManagerInternal;
@@ -225,6 +226,7 @@ final class VoiceInteractionSessionConnection implements ServiceConnection {
                        mSessionComponentName.getPackageName()) == AppOpsManager.MODE_ALLOWED
                        && structureEnabled) {
                    try {
                        MetricsLogger.count(mContext, "assist_with_context", 1);
                        if (mAm.requestAssistContextExtras(ActivityManager.ASSIST_CONTEXT_FULL,
                                mAssistReceiver, activityToken)) {
                            needDisclosure = true;
@@ -249,6 +251,7 @@ final class VoiceInteractionSessionConnection implements ServiceConnection {
                        mSessionComponentName.getPackageName()) == AppOpsManager.MODE_ALLOWED
                        && screenshotEnabled) {
                    try {
                        MetricsLogger.count(mContext, "assist_with_screen", 1);
                        needDisclosure = true;
                        mIWindowManager.requestAssistScreenshot(mScreenshotReceiver);
                    } catch (RemoteException e) {