Don't crash if client token is null.

Test: verify that fingerprint clients still work and that
null client no longer crashes systemui.

Fixes bug 35806157

Change-Id: Icda7fb538caf50ba44297fe8e47c35aed1275280
This commit is contained in:
Jim Miller
2017-02-27 17:37:32 -08:00
parent d7f52c1b76
commit 7e1cb55230

View File

@@ -68,7 +68,9 @@ public abstract class ClientMonitor implements IBinder.DeathRecipient {
mIsRestricted = restricted;
mOwner = owner;
try {
token.linkToDeath(this, 0);
if (token != null) {
token.linkToDeath(this, 0);
}
} catch (RemoteException e) {
Slog.w(TAG, "caught remote exception in linkToDeath: ", e);
}