Merge "Generate per-use prompt only when the process is foreground" into tm-dev am: e24c01a14c am: 11cda3d1cb

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17765607

Change-Id: Ib10fbdacfd05cc545994f1e1769331997645bb0f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Wenhao Wang
2022-04-18 17:19:19 +00:00
committed by Automerger Merge Worker

View File

@@ -208,7 +208,7 @@ public final class LogcatManagerService extends SystemService {
.getUidProcessState(mUid); .getUidProcessState(mUid);
// If the process is foreground and we can retrieve the package name, show a dialog // If the process is foreground and we can retrieve the package name, show a dialog
// for user consent // for user consent
if (procState <= ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE) { if (procState == ActivityManager.PROCESS_STATE_TOP) {
String packageName = getPackageName(mUid, mGid, mPid, mFd); String packageName = getPackageName(mUid, mGid, mPid, mFd);
if (packageName != null) { if (packageName != null) {
final Intent mIntent = createIntent(packageName, mUid, mGid, mPid, mFd); final Intent mIntent = createIntent(packageName, mUid, mGid, mPid, mFd);