• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/core


Commit MetaInfo

修订版f6a78079a81a177a3edebc9980829cbf39bf6655 (tree)
时间2017-06-28 07:39:52
作者android-build-team Robot <android-build-team-robot@goog...>
Commiterandroid-build-team Robot

Log Message

Merge cherrypicks of [2467803, 2467786, 2467717, 2467598, 2467823, 2467734, 2467671, 2467718, 2467599, 2467753, 2467672, 2467600, 2467735, 2467841, 2467638, 2467824, 2467736, 2467754, 2467737, 2467674] into oc-release

Change-Id: Iaeea349ef72436af0b5da51537514d4fc64cbce0

更改概述

差异

--- a/healthd/BatteryPropertiesRegistrar.cpp
+++ b/healthd/BatteryPropertiesRegistrar.cpp
@@ -36,9 +36,19 @@ void BatteryPropertiesRegistrar::publish(
3636 }
3737
3838 void BatteryPropertiesRegistrar::notifyListeners(const struct BatteryProperties& props) {
39- Mutex::Autolock _l(mRegistrationLock);
40- for (size_t i = 0; i < mListeners.size(); i++) {
41- mListeners[i]->batteryPropertiesChanged(props);
39+ Vector<sp<IBatteryPropertiesListener> > listenersCopy;
40+
41+ // Binder currently may service an incoming oneway transaction whenever an
42+ // outbound oneway call is made (if there is already a pending incoming
43+ // oneway call waiting). This is considered a bug and may change in the
44+ // future. For now, avoid recursive mutex lock while making outbound
45+ // calls by making a local copy of the current list of listeners.
46+ {
47+ Mutex::Autolock _l(mRegistrationLock);
48+ listenersCopy = mListeners;
49+ }
50+ for (size_t i = 0; i < listenersCopy.size(); i++) {
51+ listenersCopy[i]->batteryPropertiesChanged(props);
4252 }
4353 }
4454