)]}'
{
  "commit": "7b67caaf60b5183b6ee7bb155f990c6feef6c62e",
  "tree": "ee6a57f5ccc30d113588f6cc5bffff94932bffb5",
  "parents": [
    "164568877b928ac0533f9d4510e6c9e655ae1a50"
  ],
  "author": {
    "name": "Preston Cody",
    "email": "codeman@google.com",
    "time": "Sun Jun 14 05:53:41 2026 +0000"
  },
  "committer": {
    "name": "Android Build Coastguard Worker",
    "email": "android-build-coastguard-worker@google.com",
    "time": "Thu Sep 03 00:32:15 2026 -0700"
  },
  "message": "Fix AID routing precedence to prioritize default wallet services\n\nA logic flaw in NFC\u0027RegisteredAidCache conflict resolution allows a sideloaded application to squat on a shared role priority package name. This grants the attacker\u0027s app wallet-tier precedence, enabling it to intercept payment APDUs intended for the legitimate wallet application.\n\nThis commit resolves the issue in `RegisteredAidCache` by fixing two areas where AID routing precedence was incorrectly resolved:\n1. When sorting multiple wallet services with the same AID type, the sort logic is updated to first prioritize the default wallet holder\u0027s own services over associated services, before falling back to alphabetical sorting by component name. This prevents an associated service from gaining priority merely by having an alphabetically earlier name.\n2. When resolving prefix conflicts against exact-match child AIDs, the logic now explicitly checks if any of the conflicting services are owned by the default wallet holder itself (`conflictingHasWallet`). If so, it returns an empty resolve info to correctly allow the exact child AID rule to govern, rather than ignoring it in favor of the prefix.\n\nBug: 522373825\nTest: atest NfcNciUnitTests:RegisteredAidCacheTest\nFlag: EXEMPT BUGFIX\n\n(cherry picked from commit a810afd69488a55248e17e1ef94c9dc9d9c11608)\nCherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:5727f605d44162b09f0e2fe92e273818637146cc\nMerged-In: I6d0580c1df7514c878fe398f6a9fd0549756b3b9\nChange-Id: I6d0580c1df7514c878fe398f6a9fd0549756b3b9\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8eb6d644f090af62c20c89e1051b60a2b2672a41",
      "old_mode": 33188,
      "old_path": "NfcNci/src/com/android/nfc/cardemulation/RegisteredAidCache.java",
      "new_id": "ce9f600e24f759e80c0c1ee8c679649aa9619592",
      "new_mode": 33188,
      "new_path": "NfcNci/src/com/android/nfc/cardemulation/RegisteredAidCache.java"
    },
    {
      "type": "modify",
      "old_id": "de9652285dcd65f98d7207ae83b5990a2e85800b",
      "old_mode": 33188,
      "old_path": "NfcNci/tests/unit/src/com/android/nfc/cardemulation/RegisteredAidCacheTest.java",
      "new_id": "2604af1adee6e7f95a5085cbac5cb118049056f0",
      "new_mode": 33188,
      "new_path": "NfcNci/tests/unit/src/com/android/nfc/cardemulation/RegisteredAidCacheTest.java"
    }
  ]
}
