diff options
| author | 2022-04-14 21:43:51 +0000 | |
|---|---|---|
| committer | 2022-04-14 22:01:09 +0000 | |
| commit | 6a694788d31f96dcadc78b73404acb8502a2814e (patch) | |
| tree | e078249538e9bccad7a58876e1a12d6620fb8623 | |
| parent | 3b952a4a1cf5dfe1b57e3cda3f99d9301d309692 (diff) | |
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
| -rw-r--r-- | services/core/java/com/android/server/logcat/LogcatManagerService.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/logcat/LogcatManagerService.java b/services/core/java/com/android/server/logcat/LogcatManagerService.java index f856193bca9f..5dccd071e250 100644 --- a/services/core/java/com/android/server/logcat/LogcatManagerService.java +++ b/services/core/java/com/android/server/logcat/LogcatManagerService.java @@ -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); |