|
| 1 | +namespace Android.Content.PM; |
| 2 | + |
| 3 | +#if ANDROID_34 |
| 4 | +public abstract partial class PackageManager |
| 5 | +{ |
| 6 | + public sealed partial class PackageInfoFlags |
| 7 | + { |
| 8 | + // Create overloads that accept PackageInfoLongFlags |
| 9 | + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android33.0")] |
| 10 | + public static unsafe Android.Content.PM.PackageManager.PackageInfoFlags Of (PackageInfoLongFlags value) |
| 11 | + => Of ((long) value); |
| 12 | + |
| 13 | + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android33.0")] |
| 14 | + public unsafe PackageInfoLongFlags ValueAsFlags |
| 15 | + => (PackageInfoLongFlags) Value; |
| 16 | + } |
| 17 | +} |
| 18 | + |
| 19 | +// Manually created "long" version of "PackageInfoFlags" enum, created from documentation: |
| 20 | +// https://developer.android.com/reference/android/content/pm/PackageManager.PackageInfoFlags#of(long) |
| 21 | +[System.Flags] |
| 22 | +public enum PackageInfoLongFlags : long |
| 23 | +{ |
| 24 | + None = 0, |
| 25 | + |
| 26 | + GetActivities = 1, |
| 27 | + |
| 28 | + GetReceivers = 2, |
| 29 | + |
| 30 | + GetServices = 4, |
| 31 | + |
| 32 | + GetProviders = 8, |
| 33 | + |
| 34 | + GetInstrumentation = 16, |
| 35 | + |
| 36 | + GetIntentFilters = 32, |
| 37 | + |
| 38 | + GetSignatures = 64, |
| 39 | + |
| 40 | + GetMetaData = 128, |
| 41 | + |
| 42 | + GetGids = 256, |
| 43 | + |
| 44 | + GetDisabledComponents = 512, |
| 45 | + |
| 46 | + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android24.0")] |
| 47 | + MatchDisabledComponents = 512, |
| 48 | + |
| 49 | + GetSharedLibraryFiles = 1024, |
| 50 | + |
| 51 | + GetUriPermissionPatterns = 2048, |
| 52 | + |
| 53 | + GetPermissions = 4096, |
| 54 | + |
| 55 | + GetUninstalledPackages = 8192, |
| 56 | + |
| 57 | + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android24.0")] |
| 58 | + MatchUninstalledPackages = 8192, |
| 59 | + |
| 60 | + GetConfigurations = 16384, |
| 61 | + |
| 62 | + GetDisabledUntilUsedComponents = 32768, |
| 63 | + |
| 64 | + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android24.0")] |
| 65 | + MatchDisabledUntilUsedComponents = 32768, |
| 66 | + |
| 67 | + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android24.0")] |
| 68 | + MatchSystemOnly = 1048576, |
| 69 | + |
| 70 | + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android28.0")] |
| 71 | + GetSigningCertificates = 134217728, |
| 72 | + |
| 73 | + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android29.0")] |
| 74 | + MatchApex = 1073741824, |
| 75 | + |
| 76 | + [global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android34.0")] |
| 77 | + GetAttributionsLong = 2147483648, |
| 78 | +} |
| 79 | +#endif // ANDROID_34 |
0 commit comments