Merge "Fix TextClassifier logging." into pi-dev

am: 1c60953f9d

Change-Id: I51ade4a3ac7a75bef258faf487a279310fe1e2fb
This commit is contained in:
Abodunrinwa Toki
2018-05-11 11:54:47 -07:00
committed by android-build-merger
2 changed files with 16 additions and 2 deletions

View File

@@ -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);
}

View File

@@ -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
*/