OSDN Git Service

Handle onBindingDied in notification manager
authorRyan Lothian <rjlothian@google.com>
Mon, 4 Dec 2017 16:56:58 +0000 (11:56 -0500)
committerRyan Lothian <rjlothian@google.com>
Tue, 16 Jan 2018 23:31:03 +0000 (23:31 +0000)
commit4b766b38f06935fdfb5c69bc9fd9b3befef0aefd
treedf8eb327e13b9f401bba853f78e2f3683361ad8b
parent05284b6c6a1f19ff98991f77689e3feefc888a6a
Handle onBindingDied in notification manager

On Android, if the process containing the service being bound to
crashes before the bind succeeds, the app doing the binding won't
get a success or failure callback.

When that happens in this code, this leaves notif. manager thinking
that a binding is in progress, so it never attempts to rebind until
the device is rebooted.

Bug: 69064494
Test: original CL was manually tested --
      crashed listener on proc start, verified not unbound forever
Change-Id: Id2082744208e21a709d9453365f282449a2e9407
(cherry picked from commit 4a86a51b672617b02994fc812e4f96342daf424e)
services/core/java/com/android/server/notification/ManagedServices.java