[ImsServiceEntitlement] execute handleInitialEntitlementStatus and handleReevaluationEntitlementStatus on the main thread
Error:
RuntimeException Can't create handler inside thread Thread[AsyncTask #1,5,main] that has not called Looper.prepare()
Solution:
1. Execute the callback (handleInitialEntitlementStatus or handleReevaluationEntitlementStatus) in onSuccess() on the main thread, even though onSuccess() runs on the async thread
2. Use a handler to post delayed events instead of using CountDownTimer
bug: 399230129
bug: 398184731
Change-Id: I2aa58c22a6c770a0d96cccb637b2f244c8dd8629
2 files changed