From ed677ef166d416743169a268664b072ace1fa93b Mon Sep 17 00:00:00 2001 From: wangqi Date: Wed, 4 Apr 2018 12:03:00 -0700 Subject: 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 --- java/com/android/dialer/rtt/rtt_transcript.proto | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 java/com/android/dialer/rtt/rtt_transcript.proto (limited to 'java/com/android/dialer/rtt/rtt_transcript.proto') 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 -- cgit v1.2.3