Loading
Move HDP reg_counter updates to BTIF thread
Use case: register/unregister HDP from third party APK Test Steps: 1.Install Any Test APK which internally registers/unregister the HDP. 2.Run Test APK. 3.Do initialization of Test APK which internally registers the HDP. 4.Force stop the Test APK. 5.And rerun the APK by going back test APK menu. 6.Now it never perform the re-register the HDP as part of initialization. Root Cause: HDP registration related counter write operations are done in JNI main thread, and it's been referenced in BTIF thread.Sometimes, if the context switch to BTIF thread doesn't happen immediately after counter increment/decrement, it may not un-register the app if the counter becomes 0. Fix: Fixed it by making all operations related to counter in BTIF thread, so that de-registration happens for all HDP APPs. Test: code compilation. Change-Id: I71ace68a5f3d39d81b646f5f40c02ce56b9e93f0