OSDN Git Service

Try to rebind disconnected wallpaper service for 10 seconds.
authorwilsonshih <wilsonshih@google.com>
Wed, 9 Oct 2019 12:50:44 +0000 (20:50 +0800)
committerwilsonshih <wilsonshih@google.com>
Wed, 16 Oct 2019 08:36:33 +0000 (16:36 +0800)
commitb87530296b3b42638138d90effdc8dcb067206f1
tree19c9a44427e4a47f2e5beb2bb4902bf342788e86
parent32be5c8073e2d8995a62a538868c3abc4d7e07b6
Try to rebind disconnected wallpaper service for 10 seconds.

When we received the wallpaper service disconnected, we could not
immediately know the reason for the disconnection, so if the service
was disconnected because the package was updating, and we received
the update broadcast after 1 second, in original design we will only
revert to the built-in wallpaper. However, it will be too late to bind
the original service after we receiving the package update broadcast.

In this CL, if currently wallpaper service is accidentally disconnected,
we will try to re-bind it for 10 seconds.

Fix: 138973259
Test: Manual install wallpaper service and delay the package update
broadcast on purpose, verify the service can be bind back.
Test: atest WallpaperManagerTest

Change-Id: I11891098164372002b36c558f670621d8c852af8
services/core/java/com/android/server/wallpaper/WallpaperManagerService.java