commit | 6057ad6b0a5e877c8d1f56dc0d9628c43d06f0ce | [log] [tgz] |
---|---|---|
author | Greg Kaiser <gkaiser@google.com> | Wed May 15 17:32:35 2019 -0700 |
committer | Greg Kaiser <gkaiser@google.com> | Wed May 15 17:32:35 2019 -0700 |
tree | caf20e92da4d677e82e726606ef661fb3fa2277d | |
parent | 95a9e425b4ee3647fae3c4ebad114a5cca8303b1 [diff] |
dumpstate: Properly handle unfound pid The function GetPidByName() returns -1 if we can't find the pid. But since we had 'pid' as unsigned, this became a huge positive number for us, and we didn't fail the "pid > 0" check as expected. We switch 'pid' to a signed int, so now this logic flows as expected. Test: Grab a bugreport on a device without /system/bin/anrd and confirm we no longer get the "Failed to find" error in logcat. Change-Id: I83bcbbe3f189a705fd0ad83ae600c45196048a3f