Share via


TelephonyManager.GetCarrierRestrictionStatus(IExecutor, IConsumer) メソッド

定義

デバイスの通信事業者の制限状態を取得します。

[Android.Runtime.Register("getCarrierRestrictionStatus", "(Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "GetGetCarrierRestrictionStatus_Ljava_util_concurrent_Executor_Ljava_util_function_Consumer_Handler", ApiSince=34)]
[Android.Runtime.RequiresPermission("android.permission.READ_PHONE_STATE")]
public virtual void GetCarrierRestrictionStatus (Java.Util.Concurrent.IExecutor executor, Java.Util.Functions.IConsumer resultListener);
[<Android.Runtime.Register("getCarrierRestrictionStatus", "(Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "GetGetCarrierRestrictionStatus_Ljava_util_concurrent_Executor_Ljava_util_function_Consumer_Handler", ApiSince=34)>]
[<Android.Runtime.RequiresPermission("android.permission.READ_PHONE_STATE")>]
abstract member GetCarrierRestrictionStatus : Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit
override this.GetCarrierRestrictionStatus : Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit

パラメーター

executor
IExecutor

結果リスナーが呼び出される Executor。

resultListener
IConsumer

Consumer 型の無線からフェッチされた結果で呼び出される CarrierRestrictionStatus

属性

注釈

デバイスの通信事業者の制限状態を取得します。

デバイスの通信事業者の制限状態をフェッチするには、呼び出し元のアプリケーションを ここで Android に許可リストに登録する必要があります。 呼び出し元のアプリケーションには、READ_PHONE_STATEアクセス許可も必要です。 API の戻り値は次のとおりです。 <ul li>return #CARRIER_RESTRICTION_STATUS_RESTRICTED_TO_CALLER if the caller and the device locked by the network are same</li li>><return #CARRIER_RESTRICTION_STATUS_RESTRICTED if the caller and the device locked by the network are different</li li><>return #CARRIER_RESTRICTION_STATUS_NOT_RESTRICTED if the device is not locked/li li><>return #CARRIER_RESTRICTION_STATUS_UNKNOWN if the device locking< state is unavailable or radio does not supports the feature</li></ul><>

android.telephony.TelephonyManager.getCarrierRestrictionStatus(java.util.concurrent.Executor, java.util.function.Consumer<java.lang.Integer>)Java ドキュメント。

このページの一部は、によって作成および共有された作業に基づく変更であり、に記載されている条件に従って使用されます。

適用対象