本文整理匯總了Java中android.os.AsyncResult類的典型用法代碼示例。如果您正苦於以下問題:Java AsyncResult類的具體用法?Java AsyncResult怎麽用?Java AsyncResult使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
AsyncResult類屬於android.os包,在下文中一共展示了AsyncResult類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setUiccSubscription
import android.os.AsyncResult; //導入依賴的package包/類
@Override
public void setUiccSubscription(int slotId, int appIndex, int subId,
int subStatus, Message result) {
if (RILJ_LOGD) riljLog("setUiccSubscription" + slotId + " " + appIndex + " " + subId + " " + subStatus);
AsyncResult.forMessage(result, 0, null);
result.sendToTarget();
if (subStatus == 1) {
// Subscription changed: enabled
if (mSubscriptionStatusRegistrants != null) {
mSubscriptionStatusRegistrants.notifyRegistrants(
new AsyncResult (null, new int[] {1}, null));
}
} else if (subStatus == 0) {
// Subscription changed: disabled
if (mSubscriptionStatusRegistrants != null) {
mSubscriptionStatusRegistrants.notifyRegistrants(
new AsyncResult (null, new int[] {0}, null));
}
}
}
示例2: setDefaultVoiceSub
import android.os.AsyncResult; //導入依賴的package包/類
public void setDefaultVoiceSub(int subIndex, Message response) {
// Fake the message
AsyncResult.forMessage(response, 0, null);
response.sendToTarget();
}