Merge "Don't crash if client token is null."

This commit is contained in:
TreeHugger Robot
2017-02-28 22:06:15 +00:00
committed by Android (Google) Code Review

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);
}