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

Commit 1c60953f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix TextClassifier logging." into pi-dev

parents 9d976db8 dfd3c653
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -86,8 +86,10 @@ public final class SelectionSessionLogger {
                .addTaggedData(SMART_START, event.getSmartStart())
                .addTaggedData(SMART_END, event.getSmartEnd())
                .addTaggedData(EVENT_START, event.getStart())
                .addTaggedData(EVENT_END, event.getEnd())
                .addTaggedData(SESSION_ID, event.getSessionId().flattenToString());
                .addTaggedData(EVENT_END, event.getEnd());
        if (event.getSessionId() != null) {
            log.addTaggedData(SESSION_ID, event.getSessionId().flattenToString());
        }
        mMetricsLogger.write(log);
        debugLog(log);
    }
+12 −0
Original line number Diff line number Diff line
@@ -129,6 +129,18 @@ public final class SystemTextClassifier implements TextClassifier {
        return mFallback.generateLinks(request);
    }

    @Override
    public void onSelectionEvent(SelectionEvent event) {
        Preconditions.checkNotNull(event);
        Utils.checkMainThread();

        try {
            mManagerService.onSelectionEvent(mSessionId, event);
        } catch (RemoteException e) {
            Log.e(LOG_TAG, "Error reporting selection event.", e);
        }
    }

    /**
     * @inheritDoc
     */