Merge "[CDM] Checks NLS component name instead of package name" into main

This commit is contained in:
Guojing Yuan
2025-01-30 09:05:26 -08:00
committed by Android (Google) Code Review

View File

@@ -123,7 +123,7 @@ public class NotificationAccessConfirmationActivity extends Activity
NLSIntent, /* flags */ 0, mUserId);
boolean hasNLSIntentFilter = false;
for (ResolveInfo service : matchedServiceList) {
if (service.serviceInfo.packageName.equals(mComponentName.getPackageName())) {
if (service.serviceInfo.getComponentName().equals(mComponentName)) {
if (!requiredPermission.equals(service.serviceInfo.permission)) {
Slog.e(LOG_TAG, "Service " + mComponentName + " lacks permission "
+ requiredPermission);
@@ -157,7 +157,7 @@ public class NotificationAccessConfirmationActivity extends Activity
.installContent(p);
// Consistent with the permission dialog
// Used instead of p.mCancelable as that is only honored for AlertDialog
getWindow().setCloseOnTouchOutside(false);
getWindow().setCloseOnTouchOutside(false);
}
private void onAllow() {