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

am: 5b758bf

* commit '5b758bf272e3e24c8822523c2a3c3f38ba6f8025':
  Add missing setAccessible to Choreographer's threadInstance

Change-Id: I276f1450023cb31b2c6cfd2e0033c4fd1db5a6fc
This commit is contained in:
Deepanshu Gupta
2016-04-06 19:36:02 +00:00
committed by android-build-merger

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();