Loading core/java/android/app/ActivityThread.java +2 −0 Original line number Diff line number Diff line Loading @@ -4287,6 +4287,8 @@ public final class ActivityThread { AsyncTask.setDefaultExecutor(AsyncTask.THREAD_POOL_EXECUTOR); } Message.updateCheckRecycle(data.appInfo.targetSdkVersion); /* * Before spawning a new process, reset the time zone to be the system time zone. * This needs to be done because the system time zone could have changed after the Loading core/java/android/os/Message.java +14 −2 Original line number Diff line number Diff line Loading @@ -113,6 +113,8 @@ public final class Message implements Parcelable { private static final int MAX_POOL_SIZE = 50; private static boolean gCheckRecycle = true; /** * Return a new Message instance from the global pool. Allows us to * avoid allocating new objects in many cases. Loading Loading @@ -256,6 +258,13 @@ public final class Message implements Parcelable { return m; } /** @hide */ public static void updateCheckRecycle(int targetSdkVersion) { if (targetSdkVersion < Build.VERSION_CODES.L) { gCheckRecycle = false; } } /** * Return a Message instance to the global pool. * <p> Loading @@ -266,9 +275,12 @@ public final class Message implements Parcelable { */ public void recycle() { if (isInUse()) { if (gCheckRecycle) { throw new IllegalStateException("This message cannot be recycled because it " + "is still in use."); } return; } recycleUnchecked(); } Loading Loading
core/java/android/app/ActivityThread.java +2 −0 Original line number Diff line number Diff line Loading @@ -4287,6 +4287,8 @@ public final class ActivityThread { AsyncTask.setDefaultExecutor(AsyncTask.THREAD_POOL_EXECUTOR); } Message.updateCheckRecycle(data.appInfo.targetSdkVersion); /* * Before spawning a new process, reset the time zone to be the system time zone. * This needs to be done because the system time zone could have changed after the Loading
core/java/android/os/Message.java +14 −2 Original line number Diff line number Diff line Loading @@ -113,6 +113,8 @@ public final class Message implements Parcelable { private static final int MAX_POOL_SIZE = 50; private static boolean gCheckRecycle = true; /** * Return a new Message instance from the global pool. Allows us to * avoid allocating new objects in many cases. Loading Loading @@ -256,6 +258,13 @@ public final class Message implements Parcelable { return m; } /** @hide */ public static void updateCheckRecycle(int targetSdkVersion) { if (targetSdkVersion < Build.VERSION_CODES.L) { gCheckRecycle = false; } } /** * Return a Message instance to the global pool. * <p> Loading @@ -266,9 +275,12 @@ public final class Message implements Parcelable { */ public void recycle() { if (isInUse()) { if (gCheckRecycle) { throw new IllegalStateException("This message cannot be recycled because it " + "is still in use."); } return; } recycleUnchecked(); } Loading