Merge "Add missing setAccessible to Choreographer's threadInstance" into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
5b758bf272
@@ -71,6 +71,7 @@ public class Choreographer_Delegate {
|
|||||||
public static void dispose() {
|
public static void dispose() {
|
||||||
try {
|
try {
|
||||||
Field threadInstanceField = Choreographer.class.getDeclaredField("sThreadInstance");
|
Field threadInstanceField = Choreographer.class.getDeclaredField("sThreadInstance");
|
||||||
|
threadInstanceField.setAccessible(true);
|
||||||
@SuppressWarnings("unchecked") ThreadLocal<Choreographer> threadInstance =
|
@SuppressWarnings("unchecked") ThreadLocal<Choreographer> threadInstance =
|
||||||
(ThreadLocal<Choreographer>) threadInstanceField.get(null);
|
(ThreadLocal<Choreographer>) threadInstanceField.get(null);
|
||||||
threadInstance.remove();
|
threadInstance.remove();
|
||||||
|
|||||||
Reference in New Issue
Block a user