)]}'
{
  "commit": "b5a17e8e5c8187b428946ca5dfe007c854c4cbbb",
  "tree": "4745c9c99b400f0a3f632707e3de2f46c19d76ea",
  "parents": [
    "716cce695e7e6b91cfd16d7b7a49ff8a32813822"
  ],
  "author": {
    "name": "Ahaan Ugale",
    "email": "augale@google.com",
    "time": "Tue Jun 28 19:24:19 2022 +0000"
  },
  "committer": {
    "name": "Ahaan Ugale",
    "email": "augale@google.com",
    "time": "Sat Jul 02 04:25:11 2022 +0000"
  },
  "message": "Fix leak of RemoteAccessibilityController through SurfacePackage.\n\nWhen a child SurfacePackage is set on a SurfaceView, the view\u0027s\nRemoteAccessibilityController calls linkToDeath on the SurfacePackage\u0027s\nIAccessibilityEmbeddedConnection. The death recipient -- the controller\nitself -- is unlinked when the Surface is destroyed -- being notified\nthrough a SurfaceChangedCallback registered on the ViewRootImpl.\n\nThere are 2 issues there:\n* When the SurfaceView is detached, the SurfaceChangedCallback is\n  unregistered, so the unlinkToDeath never happens.\n* The Surface holding the SurfaceView may never be destroyed, for\n  example in the case of the IME.\n\nSurfacePackages sent over ipc seem to be used in only 2 places\ncurrently:\n* For inlined autofill suggestions in the input method. This bug causes\n  a serious leak here, since the memory is held in 2 persistent\n  processes -- autofill Session data in the system server (referenced\n  from the SurfaceViews), and SurfaceViews in the IME.\n* The Wallpaper app.\n\nFor now, this is fixed by using a WeakRef for the\nRemoteAccessibilityController. The root cause will be fixed in a\nfollowup change in a later release.\n\nFix: 183402294\nTest: manual:\n * atest CtsAutoFillServiceTestCases:InlineLoginActivityTest\\\n   --iterations 5\n * Force gc: adb shell kill -10 $(adb shell pgrep ext.services mockime\\\n   system_server -d \u0027\\ \u0027)\n * Rerun that a couple of times so the binder objects get cleared.\n * Check for leaks of autofill.Session in system_server and\n   SurfaceViews or RemoteAccessibilityEmbeddedConnection in\n   com.android.cts.mockime.\nChange-Id: I5447b173313919507969872bdeb7ff3038152c23\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "28b567d94e6ecaf72db2ed52f8ff0353039be680",
      "old_mode": 33188,
      "old_path": "core/java/android/view/RemoteAccessibilityController.java",
      "new_id": "b0911d789fe14201c30367cf59801bab09c3a535",
      "new_mode": 33188,
      "new_path": "core/java/android/view/RemoteAccessibilityController.java"
    }
  ]
}
