diff options
| author | 2019-07-09 12:50:57 +0000 | |
|---|---|---|
| committer | 2019-07-09 12:50:57 +0000 | |
| commit | 671ff72e463c9575c1338c5ea20eaea67b7f3187 (patch) | |
| tree | 29e945775e10a4a650b9af5114e97c63db31edee | |
| parent | 947aeb09d97cf081621621e472977c87a84a35f5 (diff) | |
| parent | d6f0a5c2430803d6b8642b1395a4c837867411ba (diff) | |
Merge "Launch recents from main thread" into qt-r1-dev
| -rw-r--r-- | packages/SystemUI/shared/src/com/android/systemui/shared/system/ActivityManagerWrapper.java | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/ActivityManagerWrapper.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/ActivityManagerWrapper.java index a2abb4b1695c..506813beadf6 100644 --- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/ActivityManagerWrapper.java +++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/ActivityManagerWrapper.java @@ -307,28 +307,22 @@ public class ActivityManagerWrapper { } final ActivityOptions finalOptions = options; - // Execute this from another thread such that we can do other things (like caching the - // bitmap for the thumbnail) while AM is busy starting our activity. - mBackgroundExecutor.submit(new Runnable() { - @Override - public void run() { - boolean result = false; - try { - result = startActivityFromRecents(taskKey.id, finalOptions); - } catch (Exception e) { - // Fall through - } - final boolean finalResult = result; - if (resultCallback != null) { - resultCallbackHandler.post(new Runnable() { - @Override - public void run() { - resultCallback.accept(finalResult); - } - }); + + boolean result = false; + try { + result = startActivityFromRecents(taskKey.id, finalOptions); + } catch (Exception e) { + // Fall through + } + final boolean finalResult = result; + if (resultCallback != null) { + resultCallbackHandler.post(new Runnable() { + @Override + public void run() { + resultCallback.accept(finalResult); } - } - }); + }); + } } /** |