Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AVFoundation] Re-enable AVAudioSessionInterruptionEventArgs.WasSuspended. Fixes bug 52730. #1937

Merged
merged 1 commit into from Mar 30, 2017

Conversation

dalexsoto
Copy link
Member

https://bugzilla.xamarin.com/show_bug.cgi?id=52730

There is no need for bindas support here, by just using bool and
[NullAllowed] the generator does the right thing

[CompilerGenerated]
public System.Boolean? WasSuspended {
	get {
		IntPtr value;
		if (k2 == IntPtr.Zero)
			k2 = ObjCRuntime.Dlfcn.GetIntPtr (Libraries.AVFoundation.Handle, "AVAudioSessionInterruptionWasSuspendedKey");
		if (Notification.UserInfo == null)
			return null;
		value = Notification.UserInfo.LowlevelObjectForKey (k2);

		if (value == IntPtr.Zero)
			return null;
		using (var nsn = Runtime.GetNSObject<NSNumber> (value))
			return nsn.BoolValue;
	}
}

…rgs.WasSuspended

https://bugzilla.xamarin.com/show_bug.cgi?id=52730

There is no need for bindas support here, by just using bool and
[NullAllowed] the generator does the right thing

```csharp
[CompilerGenerated]
public System.Boolean? WasSuspended {
	get {
		IntPtr value;
		if (k2 == IntPtr.Zero)
			k2 = ObjCRuntime.Dlfcn.GetIntPtr (Libraries.AVFoundation.Handle, "AVAudioSessionInterruptionWasSuspendedKey");
		if (Notification.UserInfo == null)
			return null;
		value = Notification.UserInfo.LowlevelObjectForKey (k2);

		if (value == IntPtr.Zero)
			return null;
		using (var nsn = Runtime.GetNSObject<NSNumber> (value))
			return nsn.BoolValue;
	}
}
```
@monojenkins
Copy link
Collaborator

Build success

@dalexsoto dalexsoto changed the title [AVFoundation] Bug 52730 - Re-enable AVAudioSessionInterruptionEventArgs.WasSuspended. Fixes bug 52730. [AVFoundation] Re-enable AVAudioSessionInterruptionEventArgs.WasSuspended. Fixes bug 52730. Mar 30, 2017
Copy link
Contributor

@spouliot spouliot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad, seems I forgot that this conversion existed in *Args

@spouliot spouliot merged commit 3ba72b2 into xamarin:master Mar 30, 2017
@dalexsoto dalexsoto deleted the bugb52730 branch March 30, 2017 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants