Merge "Do not schedule relaunch for local activities"

This commit is contained in:
TreeHugger Robot
2020-07-10 05:16:01 +00:00
committed by Android (Google) Code Review
2 changed files with 3 additions and 3 deletions

View File

@@ -4970,7 +4970,8 @@ public final class ActivityThread extends ClientTransactionHandler {
private void relaunchAllActivities(boolean preserveWindows) {
for (Map.Entry<IBinder, ActivityClientRecord> entry : mActivities.entrySet()) {
final ActivityClientRecord r = entry.getValue();
if (!r.activity.mFinished) {
// Schedule relaunch the activity if it is not a local object or finishing.
if (!r.activity.mFinished && !(r.token instanceof Binder)) {
if (preserveWindows && r.window != null) {
r.mPreserveWindow = true;
}

View File

@@ -4006,8 +4006,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
synchronized (mGlobalLock) {
ActivityRecord record = ActivityRecord.isInStackLocked(token);
if (record == null) {
throw new IllegalArgumentException("reportSizeConfigurations: ActivityRecord not "
+ "found for: " + token);
return;
}
record.setSizeConfigurations(horizontalSizeConfiguration,
verticalSizeConfigurations, smallestSizeConfigurations);