summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/AllocationAdapter.java
diff options
context:
space:
mode:
authorDaniel 2 Olofsson <daniel2.olofsson@sonymobile.com>2014-02-04 14:28:49 +0100
committerTakeshi Aimi <takeshi.aimi@sonymobile.com>2014-12-08 19:19:31 +0000
commit6689c901cb70da01beded7c108dadfcaca34caf4 (patch)
treeb9e5a42e6f5ce1637e52ffdee5791880a7d4222e /rs/java/android/renderscript/AllocationAdapter.java
parent9d6fa062a55c17b7fa08707b1006e7295bf9bc0c (diff)
IndexOutOfBoundsException on addPreference in PreferenceGroup
IndexOutOfBoundsException thrown when attempting to add preference to PreferenceGroup and at same time removing all preferences in list. Issue is caused by a race condition in addPreference that retrieves index of where to add Preference from binary search of mPreferenceList outside of synchronized lock. If list is cleared after this point but prior to adding preference on index returned from binarySearch exception is thrown. Solved by moving binarySearch to inside synchronized block. This will allow thread safety while not impacting behavior as result from search is only ever used from within synchronized block. Change-Id: Ic1e7954cf977b1ddd6ddba98d4cf771f21fb4d57
Diffstat (limited to 'rs/java/android/renderscript/AllocationAdapter.java')
0 files changed, 0 insertions, 0 deletions