Merge "Fix TextClassifier logging." into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
1c60953f9d
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user