Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a5b0269d authored by Yifan Hong's avatar Yifan Hong
Browse files

servicedispatcher: exit when adb debugging is turned off.

Test: manual by doing the following:

1. cd /data/local/tmp
   nohup servicedispatcher &
   bg
   # Now disconnects cable and reconnect, confirm that servicedispatcher
   #  still exists
   # Turn USB debugging off, confirm that servicedispatcher does not
   # exist. Though, servicedispatcher does not leave any logs, indicating
   # that it may be killed by other processes, e.g. adbd, because it is
   # spawned from shell.

2. Add an rc file that starts servicedispatcher on property trigger.
After setting the property, confirm that it is started.
Now disconnects cable and reconnect, confirm that servicedispatcher
still exists.
Turn USB debugging off, confirm that servicedispatcher does not
exist. Logcat suggests that servicedispatcher receives callback from
AdbService and exit()s.

Note: this change does NOT prevent servicedispatcher from starting up
when USB debugging is already turned off. This is because AdbService
cannot provide the state about USB debugging.

Fixes: 190867939
Change-Id: I887e51f814a24d05f26cc8d756f30e150c43b423
parent 506048be
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment