Write start FINISHED_TRANSITIONS token when dumping aborted transition
Otherwise we fail to write the transitions trace because we have a mismatch of opening and closing tags. Bug: 270949117 Test: atest FlickerTests Change-Id: Iacd5acf6171d536d51ac468acfbb4da980f47b8f
This commit is contained in:
@@ -91,6 +91,13 @@ public class TransitionTracer {
|
||||
* @param transition The transition that has finished.
|
||||
*/
|
||||
public void logFinishedTransition(Transition transition) {
|
||||
if (transition.mLogger.mProtoToken == 0) {
|
||||
// Transition finished but never sent, so open token never added
|
||||
final ProtoOutputStream outputStream = transition.mLogger.mProtoOutputStream;
|
||||
transition.mLogger.mProtoToken = outputStream
|
||||
.start(com.android.server.wm.shell.TransitionTraceProto.FINISHED_TRANSITIONS);
|
||||
}
|
||||
|
||||
// Dump the rest of the transition's info that wasn't dumped during logSentTransition
|
||||
dumpFinishedTransitionToProto(transition.mLogger.mProtoOutputStream, transition);
|
||||
transition.mLogger.mProtoOutputStream.end(transition.mLogger.mProtoToken);
|
||||
|
||||
Reference in New Issue
Block a user