From 8b60e4514702edd1eb4b6f2bfc027e04a94369c0 Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Thu, 18 Apr 2013 15:17:48 -0700 Subject: Fix change of behavior in Looper.quit(). It seems some applications rely on Looper.quit() terminating the loop immediately without processing all messages. Rather than risk breaking them, make the safer behavior optional. Also take care to properly drain the message queue before quitting so that all of the Message instances are recycled. This may help release storage sooner in case the Looper doesn't get GC'd promptly and its remaining queue of undelivered messages sticks around. Improve docs on runWithScissors. Bug: 8596303 Change-Id: I8cbeb6f7a5f6b8e618b5109f87a03defc1486b9f --- api/current.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'api/current.txt') diff --git a/api/current.txt b/api/current.txt index 803bb02..abf767a 100644 --- a/api/current.txt +++ b/api/current.txt @@ -17116,6 +17116,7 @@ package android.os { method public int getThreadId(); method protected void onLooperPrepared(); method public boolean quit(); + method public boolean quitSafely(); } public abstract interface IBinder { @@ -17156,6 +17157,7 @@ package android.os { method public static void prepare(); method public static void prepareMainLooper(); method public void quit(); + method public void quitSafely(); method public void setMessageLogging(android.util.Printer); } -- cgit v1.1