diff options
| -rw-r--r-- | services/core/java/com/android/server/wm/ActivityStarter.java | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/services/core/java/com/android/server/wm/ActivityStarter.java b/services/core/java/com/android/server/wm/ActivityStarter.java index 27315bb23ae5..7cccf6b578ff 100644 --- a/services/core/java/com/android/server/wm/ActivityStarter.java +++ b/services/core/java/com/android/server/wm/ActivityStarter.java @@ -707,7 +707,7 @@ class ActivityStarter { } } - int res; + int res = START_CANCELED; synchronized (mService.mGlobalLock) { final boolean globalConfigWillChange = mRequest.globalConfig != null && mService.getGlobalConfiguration().diff(mRequest.globalConfig) != 0; @@ -719,22 +719,20 @@ class ActivityStarter { + "will change = %b", globalConfigWillChange); final long origId = Binder.clearCallingIdentity(); - - res = resolveToHeavyWeightSwitcherIfNeeded(); - if (res != START_SUCCESS) { - return res; - } - try { + res = resolveToHeavyWeightSwitcherIfNeeded(); + if (res != START_SUCCESS) { + return res; + } + res = executeRequest(mRequest); } finally { + Binder.restoreCallingIdentity(origId); mRequest.logMessage.append(" result code=").append(res); Slog.i(TAG, mRequest.logMessage.toString()); mRequest.logMessage.setLength(0); } - Binder.restoreCallingIdentity(origId); - if (globalConfigWillChange) { // If the caller also wants to switch to a new configuration, do so now. // This allows a clean switch, as we are waiting for the current activity |