OSDN Git Service

Remove AutofillManagerClient after AutofillManager is finalized
authorKoji Fukui <koji.fukui@sony.com>
Wed, 18 Oct 2017 08:48:40 +0000 (17:48 +0900)
committerFelipe Leme <felipeal@google.com>
Thu, 9 Nov 2017 23:44:12 +0000 (15:44 -0800)
commitccec6a6ae8b9f9785934e7d97849cbafcfcf3dcb
treefc40dc73e51b9bae3b7bb4d94c06cf315f19c435
parentbbaa19cad3227eb0262beb5555db54902ef17821
Remove AutofillManagerClient after AutofillManager is finalized

Symptom:
Global reference table overflow happens on system_server.

Root cause:
If a process repeatedly create a context and get AutofillManager
from the context, each BinderProxy of AutofillManagerClient are
registered to AutofillManagerServiceImpl. They aren't removed until
the process is died. BinderProxy consumes global reference and finally
causes crash on system_server.

Solution:
Remove AutofillManagerClient from AutofillManagerServiceImpl after
AutofillManager is finalized.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Bug: 68747744
Change-Id: I8b76c5368b54317b8696cac470cc390b36e910e7
core/java/android/os/RemoteCallbackList.java
core/java/android/view/autofill/AutofillManager.java
core/java/android/view/autofill/IAutoFillManager.aidl
services/autofill/java/com/android/server/autofill/AutofillManagerService.java
services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java