Merge "Fix a NPE when shutting down instrumentation" into mnc-dev

This commit is contained in:
Svetoslav Ganov
2015-08-31 17:16:23 +00:00
committed by Android (Google) Code Review

View File

@@ -17152,8 +17152,10 @@ public final class ActivityManagerService extends ActivityManagerNative
}
// Can't call out of the system process with a lock held, so post a message.
mHandler.obtainMessage(SHUTDOWN_UI_AUTOMATION_CONNECTION_MSG,
app.instrumentationUiAutomationConnection).sendToTarget();
if (app.instrumentationUiAutomationConnection != null) {
mHandler.obtainMessage(SHUTDOWN_UI_AUTOMATION_CONNECTION_MSG,
app.instrumentationUiAutomationConnection).sendToTarget();
}
app.instrumentationWatcher = null;
app.instrumentationUiAutomationConnection = null;