Make DelegateManager thread safe
We have been seeing crashes on the Theme editor related to an assertion
on getDelegate when the object does not exist
(http://b.android.com/181951).
When debugging, the crash was happening without seeing a previous call
to removeJavaReference. This seems to completely remove that crash.
Since the DelegateManager can be called at least from two threads
(main thread and the finalizer), it should be thread safe.
Bug: http://b.android.com/181951
Change-Id: I1b28f863ff198f8592f170a98f9de391b2ac3ea2
1 file changed