Fix NPE in UiAutomationManager

Fix a race condition that UiAutomationService is
destroyed just before main thread processes the
connection.

Bug: 328277279
Test: UiAutomationManagerTest
Merged-In: I0352ad255930ed58c111d5733e7ca2ae75fdf8fa
Change-Id: I0352ad255930ed58c111d5733e7ca2ae75fdf8fa
1 file changed