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

Commit 6a694788 authored by Eun-Jeong Shin's avatar Eun-Jeong Shin
Browse files

Generate per-use prompt only when the process is foreground

This change is to implement dialog when device log access request comes
from foreground.

Bug: 228220847
Test: CtsVerifier
Ignore-AOSP-First: pending fix for logcat privacy issue
Change-Id: I71aa0dbcf97aba1ad65f378d1e68b8c180c32fda
parent 3b952a4a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -208,7 +208,7 @@ public final class LogcatManagerService extends SystemService {
                        .getUidProcessState(mUid);
                // If the process is foreground and we can retrieve the package name, show a dialog
                // for user consent
                if (procState <= ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE) {
                if (procState == ActivityManager.PROCESS_STATE_TOP) {
                    String packageName = getPackageName(mUid, mGid, mPid, mFd);
                    if (packageName != null) {
                        final Intent mIntent = createIntent(packageName, mUid, mGid, mPid, mFd);