void internalNotifyRegistrant(Object obj, Throwable throwable) { Handler handler = getHandler(); if (handler == null) { clear(); } else { Message message = Message.obtain(); message.what = what; message.obj = new AsyncResult(userObj, obj, throwable); handler.sendMessage(message); } }
public Message messageForRegistrant() { Handler handler = getHandler(); Message message; if (handler == null) { clear(); message = null; } else { message = handler.obtainMessage(); message.what = what; message.obj = userObj; } return message; }