Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 55351365 authored by Andreas Gampe's avatar Andreas Gampe
Browse files

Frameworks: Fix NPE for agent attach

Fix missing null check.

Bug: 62445317
Test: m
Test: adb shell am start --attach-agent dummy.so
Test: m cts && cts-tradefed run commandAndExit cts-dev --module CtsJvmtiAttachingHostTestCases
Change-Id: Ia16c2973b24f81839d20502339978e75a23a93bc
parent e72e8b15
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);