Language

MockPackageManager.HasSystemFeature Method

Definition

Overloads

Name Description
HasSystemFeature(String)

Check whether the given feature name is one of the available features as returned by GetSystemAvailableFeatures().

HasSystemFeature(String, Int32)

Throws UnsupportedOperationException. Override this method to check for a system feature in a test.

HasSystemFeature(String)

Check whether the given feature name is one of the available features as returned by GetSystemAvailableFeatures().

[Android.Runtime.Register("hasSystemFeature", "(Ljava/lang/String;)Z", "GetHasSystemFeature_Ljava_lang_String_Handler")]
public override bool HasSystemFeature(string? name);
[<Android.Runtime.Register("hasSystemFeature", "(Ljava/lang/String;)Z", "GetHasSystemFeature_Ljava_lang_String_Handler")>]
override this.HasSystemFeature : string -> bool

Parameters

name
String

The system feature name. Available to a test override; the default mock implementation does not use this argument.

Returns

No value is returned. The default mock implementation throws UnsupportedOperationException; override this method to supply a test result.

Attributes

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

HasSystemFeature(String, Int32)

Throws UnsupportedOperationException. Override this method to check for a system feature in a test.

[Android.Runtime.Register("hasSystemFeature", "(Ljava/lang/String;I)Z", "GetHasSystemFeature_Ljava_lang_String_IHandler", ApiSince=24)]
public override bool HasSystemFeature(string? name, int version);
[<Android.Runtime.Register("hasSystemFeature", "(Ljava/lang/String;I)Z", "GetHasSystemFeature_Ljava_lang_String_IHandler", ApiSince=24)>]
override this.HasSystemFeature : string * int -> bool

Parameters

name
String

The system feature name. Available to a test override; the default mock implementation does not use this argument.

version
Int32

The minimum required feature version. Available to a test override; the default mock implementation does not use this argument.

Returns

No value is returned. The default mock implementation throws UnsupportedOperationException; override this method to supply a test result.

Attributes

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to