- Open the demo app
- Turn on and turn off auto brightness mode by the notification bar shortcut
- Check the log output, and make sure the onChange method is called.
- Add a break point in the ContentObserver#Transport#onChange as following.
- Attatch the debuger to the process: org.peace.allinone
- Change the brightness mode once, so the process break in the break point as following.
- At this point, the binder thread hangs there, but the main thread is fine.
- Click the "Unregister Content Observer" button in the demo.
- Check the log output, and see the log "unregister finished" shows.
- Resume the program hanged by debugger, and check the log, the onChange is called still.