MockPackageManager.GetPackageGids Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| GetPackageGids(String) |
Return an array of all of the secondary group-ids that have been assigned to a package. |
| GetPackageGids(String, PackageInfoFlags) |
Throws UnsupportedOperationException. Override this method to get a package's group IDs in a test. |
GetPackageGids(String)
Return an array of all of the secondary group-ids that have been assigned to a package.
[Android.Runtime.Register("getPackageGids", "(Ljava/lang/String;)[I", "GetGetPackageGids_Ljava_lang_String_Handler")]
public override int[]? GetPackageGids(string? packageName);
[<Android.Runtime.Register("getPackageGids", "(Ljava/lang/String;)[I", "GetGetPackageGids_Ljava_lang_String_Handler")>]
override this.GetPackageGids : string -> int[]
Parameters
- packageName
- String
The full name (i.e. com.google.apps.contacts) of the desired package.
Returns
No value is returned. The default mock implementation throws UnsupportedOperationException; override this method to supply a test result.
- Attributes
Exceptions
Not thrown by the default mock implementation, which throws UnsupportedOperationException instead. A test override can supply its own behavior.
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
GetPackageGids(String, PackageInfoFlags)
Throws UnsupportedOperationException. Override this method to get a package's group IDs in a test.
[Android.Runtime.Register("getPackageGids", "(Ljava/lang/String;I)[I", "GetGetPackageGids_Ljava_lang_String_IHandler", ApiSince=24)]
public override int[]? GetPackageGids(string? packageName, Android.Content.PM.PackageInfoFlags flags);
[<Android.Runtime.Register("getPackageGids", "(Ljava/lang/String;I)[I", "GetGetPackageGids_Ljava_lang_String_IHandler", ApiSince=24)>]
override this.GetPackageGids : string * Android.Content.PM.PackageInfoFlags -> int[]
Parameters
- packageName
- String
The package name. Available to a test override; the default mock implementation does not use this argument.
- flags
- PackageInfoFlags
The flags for the requested operation. 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.