diff --git a/build/HarfBuzzSharp.props b/build/HarfBuzzSharp.props
index 85e7a1f34d..620ec58ff3 100644
--- a/build/HarfBuzzSharp.props
+++ b/build/HarfBuzzSharp.props
@@ -1,7 +1,7 @@
-
-
-
+
+
+
diff --git a/build/SkiaSharp.props b/build/SkiaSharp.props
index d54cffba08..cc573825cd 100644
--- a/build/SkiaSharp.props
+++ b/build/SkiaSharp.props
@@ -1,7 +1,7 @@
-
-
-
+
+
+
diff --git a/src/Android/Avalonia.Android/AndroidThreadingInterface.cs b/src/Android/Avalonia.Android/AndroidThreadingInterface.cs
index 42f75a27e1..de9149e9a1 100644
--- a/src/Android/Avalonia.Android/AndroidThreadingInterface.cs
+++ b/src/Android/Avalonia.Android/AndroidThreadingInterface.cs
@@ -27,46 +27,33 @@ namespace Avalonia.Android
{
if (interval.TotalMilliseconds < 10)
interval = TimeSpan.FromMilliseconds(10);
- object l = new object();
+
var stopped = false;
Timer timer = null;
- var scheduled = false;
timer = new Timer(_ =>
{
- lock (l)
+ if (stopped)
+ return;
+
+ EnsureInvokeOnMainThread(() =>
{
- if (stopped)
+ try
{
- timer.Dispose();
- return;
+ tick();
}
- if (scheduled)
- return;
- scheduled = true;
- EnsureInvokeOnMainThread(() =>
+ finally
{
- try
- {
- tick();
- }
- finally
- {
- lock (l)
- {
- scheduled = false;
- }
- }
- });
- }
- }, null, TimeSpan.Zero, interval);
+ if (!stopped)
+ timer.Change(interval, Timeout.InfiniteTimeSpan);
+ }
+ });
+ },
+ null, interval, Timeout.InfiniteTimeSpan);
return Disposable.Create(() =>
{
- lock (l)
- {
- stopped = true;
- timer.Dispose();
- }
+ stopped = true;
+ timer.Dispose();
});
}
diff --git a/src/Avalonia.Base/Animation/Animation.cs b/src/Avalonia.Base/Animation/Animation.cs
index 03b2d17e44..6bb06367de 100644
--- a/src/Avalonia.Base/Animation/Animation.cs
+++ b/src/Avalonia.Base/Animation/Animation.cs
@@ -172,23 +172,6 @@ namespace Avalonia.Animation
set { SetAndRaise(SpeedRatioProperty, ref _speedRatio, value); }
}
- ///
- /// Obsolete: Do not use this property, use instead.
- ///
- ///
- [Obsolete("This property has been superceded by IterationCount.")]
- public string RepeatCount
- {
- get { return IterationCount.ToString(); }
- set
- {
- var val = value.ToUpper();
- val = val.Replace("LOOP", "INFINITE");
- val = val.Replace("NONE", "1");
- IterationCount = IterationCount.Parse(val);
- }
- }
-
///
/// Gets the children of the .
///
diff --git a/src/Avalonia.Base/Animation/Animators/SolidColorBrushAnimator.cs b/src/Avalonia.Base/Animation/Animators/SolidColorBrushAnimator.cs
index b87b2681d6..9256c7be5e 100644
--- a/src/Avalonia.Base/Animation/Animators/SolidColorBrushAnimator.cs
+++ b/src/Avalonia.Base/Animation/Animators/SolidColorBrushAnimator.cs
@@ -37,17 +37,4 @@ namespace Avalonia.Animation.Animators
}
}
- [Obsolete("Use ISolidColorBrushAnimator instead")]
- public class SolidColorBrushAnimator : Animator
- {
- public override SolidColorBrush? Interpolate(double progress, SolidColorBrush? oldValue, SolidColorBrush? newValue)
- {
- if (oldValue is null || newValue is null)
- {
- return progress >= 0.5 ? newValue : oldValue;
- }
-
- return new SolidColorBrush(ColorAnimator.InterpolateCore(progress, oldValue.Color, newValue.Color));
- }
- }
}
diff --git a/src/Avalonia.Base/AvaloniaObjectExtensions.cs b/src/Avalonia.Base/AvaloniaObjectExtensions.cs
index 134e3b2ac7..2d7bab6cd6 100644
--- a/src/Avalonia.Base/AvaloniaObjectExtensions.cs
+++ b/src/Avalonia.Base/AvaloniaObjectExtensions.cs
@@ -468,41 +468,6 @@ namespace Avalonia
});
}
- ///
- /// Subscribes to a property changed notifications for changes that originate from a
- /// .
- ///
- /// The type of the property change sender.
- /// The property changed observable.
- /// Given a TTarget, returns the handler.
- /// A disposable that can be used to terminate the subscription.
- [Obsolete("Use overload taking Action.")]
- public static IDisposable AddClassHandler(
- this IObservable observable,
- Func> handler)
- where TTarget : class
- {
- return observable.Subscribe(e => SubscribeAdapter(e, handler));
- }
-
- ///
- /// Observer method for .
- ///
- /// The sender type to accept.
- /// The event args.
- /// Given a TTarget, returns the handler.
- private static void SubscribeAdapter(
- AvaloniaPropertyChangedEventArgs e,
- Func> handler)
- where TTarget : class
- {
- if (e.Sender is TTarget target)
- {
- handler(target)(e);
- }
- }
-
private class BindingAdaptor : IBinding
{
private IObservable