Merge "Add missing setAccessible to Choreographer's threadInstance" into nyc-dev

This commit is contained in:
Deepanshu Gupta
2016-04-06 19:32:00 +00:00
committed by Android (Google) Code Review

View File

@@ -71,6 +71,7 @@ public class Choreographer_Delegate {
public static void dispose() {
try {
Field threadInstanceField = Choreographer.class.getDeclaredField("sThreadInstance");
threadInstanceField.setAccessible(true);
@SuppressWarnings("unchecked") ThreadLocal<Choreographer> threadInstance =
(ThreadLocal<Choreographer>) threadInstanceField.get(null);
threadInstance.remove();