Merge "Fix NPE in onDestroy." into lmp-dev

This commit is contained in:
Santos Cordon
2014-09-03 14:48:36 +00:00
committed by Android (Google) Code Review

View File

@@ -165,11 +165,13 @@ public abstract class InCallService extends Service {
@Override
public boolean onUnbind(Intent intent) {
Phone oldPhone = mPhone;
mPhone = null;
if (mPhone != null) {
Phone oldPhone = mPhone;
mPhone = null;
oldPhone.destroy();
onPhoneDestroyed(oldPhone);
oldPhone.destroy();
onPhoneDestroyed(oldPhone);
}
return false;
}