Skip to content
Commit 98cf0334 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Print correct timeout messages in JobServiceContext

This is a follow up CL to a previous CL [1] that added some useful
debug messages to diagnose issues like Bug 62390590 and another
follow up CL [2] that aimed to address Bug 62787070.

What went wrong is that

  "x" + y != null ? y.toShortString() : "<null>" + "z"

is interpretted as

  ("x" + y) != null ? y.toShortString() : ("<null>" + "z")

while what we wanted to see was

  "x" + (y != null ? y.toShortString() : "<null>") + "z"

This CL addresses the above unexpected string concatenation by
explicitly having a private utility method
JobServiceContext#getRunningJobNameLocked().

 [1]: Ia7155248b4b4f032cbf8e8754c5437f658ed192c
      729a328a
 [2]: I7bc55f55da645a9e116d3f0ee02f2ee115383ea9
      62292daa

Bug: 62787070
Bug: 64569041
Bug: 65188019
Test: Manually verified by explicitly causing timeout.
Change-Id: I3e51f40d3fcf0e2ddd200da2812aba109d89794e
parent 01b6ff01
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment