Merge "Frameworks: Fix NPE for agent attach" into oc-mr1-dev

This commit is contained in:
TreeHugger Robot
2017-09-15 02:11:12 +00:00
committed by Android (Google) Code Review

View File

@@ -7005,7 +7005,7 @@ public class ActivityManagerService extends IActivityManager.Stub
mProfileProc = app;
profilerInfo = (mProfilerInfo != null && mProfilerInfo.profileFile != null) ?
new ProfilerInfo(mProfilerInfo) : null;
agent = profilerInfo.agent;
agent = mProfilerInfo != null ? mProfilerInfo.agent : null;
} else if (app.instr != null && app.instr.mProfileFile != null) {
profilerInfo = new ProfilerInfo(app.instr.mProfileFile, null, 0, false, false,
null);