Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Fix build error due to preprocessor directive #417

Merged
merged 1 commit into from
Jul 26, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Xamarin.Essentials/Vibration/Vibration.android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ static void PlatformVibrate(TimeSpan duration)
if (Platform.HasApiLevel(BuildVersionCodes.O))
{
Platform.Vibrator.Vibrate(VibrationEffect.CreateOneShot(time, VibrationEffect.DefaultAmplitude));
return;
}
#endif
else
{

#pragma warning disable CS0618 // Type or member is obsolete
Platform.Vibrator.Vibrate(time);
Platform.Vibrator.Vibrate(time);
#pragma warning restore CS0618 // Type or member is obsolete
}
}

static void PlatformCancel()
Expand Down