Merge "Launch recents from main thread" into qt-r1-dev am: 671ff72e46

am: e2e5f119fb

Change-Id: I76bc96dbbdc14c1bf5f6ecd9e94759876fdf053f
This commit is contained in:
Jorim Jaggi
2019-07-09 06:24:17 -07:00
committed by android-build-merger

View File

@@ -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
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);
}
final boolean finalResult = result;
if (resultCallback != null) {
resultCallbackHandler.post(new Runnable() {
@Override
public void run() {
resultCallback.accept(finalResult);
}
});
}
}
});
});
}
}
/**