Merge "Fix false-positive matching of notification to FGS" into sc-dev am: ff3d2907e8

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

Change-Id: Ic95a76549e84320ca7c571cb7d71cf27ddfb64be
This commit is contained in:
Chris Tate
2021-06-03 21:58:59 +00:00
committed by Automerger Merge Worker

View File

@@ -2005,7 +2005,9 @@ public final class ActiveServices {
for (int i = 0; i < smap.mServicesByInstanceName.size(); i++) {
final ServiceRecord sr = smap.mServicesByInstanceName.valueAt(i);
if (id != sr.foregroundId || !pkg.equals(sr.appInfo.packageName)) {
if (!sr.isForeground
|| id != sr.foregroundId
|| !pkg.equals(sr.appInfo.packageName)) {
// Not this one; keep looking
continue;
}