From 3379c51569368d4e56123e5f9be97df7eb5b8e29 Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Wed, 2 Dec 2009 15:01:06 -0800 Subject: [PATCH] Ensure that service calls run outside the UI thread (#2235734) Change-Id: Icba566884f3b994c8a4ccc4b8658c40b133a3509 --- src/com/android/email/service/EmailServiceProxy.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/com/android/email/service/EmailServiceProxy.java b/src/com/android/email/service/EmailServiceProxy.java index 2f0bb5636..cae49bbc3 100644 --- a/src/com/android/email/service/EmailServiceProxy.java +++ b/src/com/android/email/service/EmailServiceProxy.java @@ -85,7 +85,11 @@ public class EmailServiceProxy implements IEmailService { if (DEBUG_PROXY) { Log.v(TAG, "Service " + mClass.getSimpleName() + " connected"); } - runTask(); + // Run our task on a new thread + new Thread(new Runnable() { + public void run() { + runTask(); + }}).start(); } public void onServiceDisconnected(ComponentName name) {