commit | 749242a21a2d026d61dfd3883fb6e34b56785661 | [log] [tgz] |
---|---|---|
author | JW Wang <wangchun@google.com> | Thu Jul 09 09:49:35 2020 +0800 |
committer | JW Wang <wangchun@google.com> | Thu Jul 09 10:10:39 2020 +0800 |
tree | 86aaba39b264f095774bf7ce70d3090602bf1d6a | |
parent | 3ac333f2d20e240093235d957ba67ce174fe2db8 [diff] |
Rewrite #restartSystemServer ProcessInfo#getStartTime is not reliable. My local test shows it is incremented by one after polling a few times even if we don't restart system server at all. Let's use pid to detect whether system server is restarted or not. Now #restartSystemServer fails correctly when `am restart` is not called at all or is called without root privilege. Bug: 160754072 Test: StagedInstallInternalTest Change-Id: Iebcf1583f38c17fbc8f2af42bdc61ae000b39354