本文整理汇总了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();
}