Use RemoteCallbackList to implement TSMS#mListeners
Previously, TSMS extends IBinder.DeathRecipient to implement its own death recipient class to keep track of disconnected service listeners. Using RemoteCallbackList simplifies the implementation. Fixes: 35102403 Test: Manually tested as follows. 1. Build and flash an OS image. 2. Complete the setup wizard (if any). 3. Make sure AOSP Keyboard (com.android.inputmethod.latin) is installed. 4. adb shell settings put secure selected_spell_checker com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService 5. Observe that there are no bindings to spell checker service (SCS) by running adb shell dumpsys textservices 6. Observe that there is no connection to SCS by running adb shell dumpsys activity services com.android.inputmethod.latin There should be no ConnectionRecord for AndroidSpellCheckerService 7. Run a test program that has TextView and tap on one of the TextViews and type some text. 8. Repeat steps 5 and 6 to observe there are now bindings and connection to SCS. 9. Kill the app manually. Repeat steps 5 and 6 to see bindings and connections are removed again. 10. Repeat 7 and 8. 11. Kill SCS adb shell ps -A | grep com.android.inputmethod.latin | awk '{print $2}' | xargs adb shell kill -KILL 12. Repeat steps 5 and 6 to observe that the bindings and the connection to SCS are preserved. Change-Id: I38942765ed6bec6713757b1d5f325e7a633c2ba7
Loading
Please register or sign in to comment