diff options
author | wangqi <wangqi@google.com> | 2018-04-04 12:03:00 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-04-04 16:28:24 -0700 |
commit | ed677ef166d416743169a268664b072ace1fa93b (patch) | |
tree | 488fb7de9dbfa0ade9bf6827703570cd953bafb1 /java/com/android/dialer/rtt | |
parent | 15514ef56ad1fa949dedab13bd1db0ade4b6fba9 (diff) |
Migrate RTT chat history to use proto buffer.
This change also moved chat history to be saved in DialerCall, thus it will be persist when switching calls.
Bug: 67596257
Test: RttChatMessageTest
PiperOrigin-RevId: 191626079
Change-Id: I65e9c6ac7aa41beb45dfe561b0a48506ea938e6f
Diffstat (limited to 'java/com/android/dialer/rtt')
-rw-r--r-- | java/com/android/dialer/rtt/rtt_transcript.proto | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/java/com/android/dialer/rtt/rtt_transcript.proto b/java/com/android/dialer/rtt/rtt_transcript.proto new file mode 100644 index 000000000..a580b0d2f --- /dev/null +++ b/java/com/android/dialer/rtt/rtt_transcript.proto @@ -0,0 +1,30 @@ +syntax = "proto2"; + +option java_package = "com.android.dialer.rtt"; +option java_multiple_files = true; +option optimize_for = LITE_RUNTIME; + + +package com.android.dialer.rtt; + +// RTT transcript which contains chat history of a RTT call. +message RttTranscript { + // Unique ID used for database. + optional string id = 1; + // Phone number of RTT call. + optional string number = 2; + // Timestamp when the RTT call is created. + optional int64 timestamp = 3; + // Chat messages. + repeated RttTranscriptMessage messages = 4; +} + +// Single chat message inside a RTT call. +message RttTranscriptMessage { + optional string content = 1; + optional int64 timestamp = 2; + // Whether this message is sent from local device or received from remote + // party. + optional bool is_remote = 3; + optional bool is_finished = 4; +}
\ No newline at end of file |