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

Commit 8b633805 authored by Chris Craik's avatar Chris Craik Committed by android-build-merger
Browse files

Merge "Enable am profiling for apps profileable by shell" into qt-dev am: 99f9d7c4

am: aba3db7d

Change-Id: Ie633d0ac825e399f09511488d61b890539648718
parents 3c798f27 aba3db7d
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -7894,8 +7894,9 @@ public class ActivityManagerService extends IActivityManager.Stub
        synchronized (this) {
            boolean isDebuggable = "1".equals(SystemProperties.get(SYSTEM_DEBUGGABLE, "0"));
            if (!isDebuggable) {
                if ((app.flags & ApplicationInfo.FLAG_DEBUGGABLE) == 0) {
                    throw new SecurityException("Process not debuggable: " + app.packageName);
                if (!app.isProfileableByShell()) {
                    throw new SecurityException("Process not debuggable, "
                            + "and not profileable by shell: " + app.packageName);
                }
            }
            mProfileData.setProfileApp(processName);