Limit the number of times app_profiler.py tries to kill an app process.

Certain apps are unable to be killed long-term because they provide a service which Android binds to. The service gets automatically restarted by Android if the process dies. This change prevents app_profiler.py from getting stuck in an infinite loop in above scenario.

Bug: 198371533
Change-Id: I21415f3d29085fa2ab3c14caead0835b0c74edb2
1 file changed