語言

TelephonyManager.CellInfoCallback.OnError 方法

定義

錯誤回應。TelephonyManager#requestCellInfoUpdate requestCellInfoUpdate()

[Android.Runtime.Register("onError", "(ILjava/lang/Throwable;)V", "GetOnError_ILjava_lang_Throwable_Handler", ApiSince=29)]
public virtual void OnError(Android.Telephony.TelephonyManagerErrorCode errorCode, Java.Lang.Throwable? detail);
[<Android.Runtime.Register("onError", "(ILjava/lang/Throwable;)V", "GetOnError_ILjava_lang_Throwable_Handler", ApiSince=29)>]
abstract member OnError : Android.Telephony.TelephonyManagerErrorCode * Java.Lang.Throwable -> unit
override this.OnError : Android.Telephony.TelephonyManagerErrorCode * Java.Lang.Throwable -> unit

參數

errorCode
TelephonyManagerErrorCode

錯誤代碼顯示故障類型。

detail
Throwable

一個可拋棄物件,若有更多故障細節(如有),否則為 null。

屬性

備註

錯誤回應。TelephonyManager#requestCellInfoUpdate requestCellInfoUpdate()

當錯誤條件導致無法從數據機擷取並回傳更新 CellInfo 時,會被呼叫。 requestCellInfoUpdate() 的呼叫者應覆寫此函式,以便在錯誤時接收詳細狀態資訊。 預設情況下,此函式會呼叫 onCellInfo() 並帶有 null。

Java 文件 android.telephony.TelephonyManager.CellInfoCallback.onError(int, java.lang.Throwable)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於