Skip to content

Commit 181153a

Browse files
Merge branch 'Add-Benchmarks-to-GitHub-Actions' of https://github.com/CommunityToolkit/Maui into Add-Benchmarks-to-GitHub-Actions
2 parents d7a6308 + 395ca0d commit 181153a

File tree

12 files changed

+36
-81
lines changed

12 files changed

+36
-81
lines changed

src/CommunityToolkit.Maui.Core/Platform/StatusBar/StatusBar.ios.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public static void SetBarSize(bool isUsingSafeArea)
4141
static void PlatformSetColor(Color color)
4242
{
4343
var uiColor = color.ToPlatform();
44-
44+
4545
var statusBarTag = new IntPtr(38482);
4646
foreach (var window in UIApplication.SharedApplication.Windows)
4747
{
@@ -51,7 +51,7 @@ static void PlatformSetColor(Color color)
5151
{
5252
continue;
5353
}
54-
54+
5555
statusBar ??= new UIView(statusBarFrame.Value);
5656
statusBar.Tag = statusBarTag;
5757
statusBar.BackgroundColor = uiColor;
@@ -72,7 +72,7 @@ static void PlatformSetColor(Color color)
7272
static CGRect GetStatusBarFrame(in UIWindow window, in bool isUsingSafeArea)
7373
{
7474
var statusBarFrame = UIApplication.SharedApplication.StatusBarFrame;
75-
75+
7676
return isUsingSafeArea
7777
? new CGRect(statusBarFrame.X, statusBarFrame.Y, statusBarFrame.Width, window.SafeAreaInsets.Top)
7878
: statusBarFrame;

src/CommunityToolkit.Maui.MediaElement/Handlers/MediaElementHandler.android.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public static void ShouldLoopPlayback(MediaElementHandler handler, MediaElement
1717
handler.mediaManager?.UpdateShouldLoopPlayback();
1818
}
1919

20-
[Obsolete]
20+
2121
protected override MauiMediaElement CreatePlatformView()
2222
{
2323
mediaManager ??= new(MauiContext ?? throw new InvalidOperationException($"{nameof(MauiContext)} cannot be null"),

src/CommunityToolkit.Maui.MediaElement/Handlers/MediaElementHandler.shared.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public partial class MediaElementHandler
1313
/// <summary>
1414
/// The <see cref="MediaManager"/> that is managing the <see cref="IMediaElement"/> instance.
1515
/// </summary>
16-
[Obsolete]
16+
1717
protected MediaManager? mediaManager;
1818
#endif
1919

src/CommunityToolkit.Maui.MediaElement/Services/MediaControlsService.android.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public void UpdateNotifications(in MediaSession session, in PlatformMediaElement
9393
}
9494

9595
[MemberNotNull(nameof(playerNotificationManager))]
96-
[Obsolete]
96+
9797
public void SetLegacyNotifications(in MediaSession session, in PlatformMediaElement mediaElement)
9898
{
9999
ArgumentNullException.ThrowIfNull(session);

src/CommunityToolkit.Maui.MediaElement/Views/MauiMediaElement.android.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ protected override void OnVisibilityChanged(Android.Views.View changedView, [Gen
8181
/// Releases the unmanaged resources used by the <see cref="MediaElement"/> and optionally releases the managed resources.
8282
/// </summary>
8383
/// <param name="disposing"><see langword="true"/> to release both managed and unmanaged resources; <see langword="false"/> to release only unmanaged resources.</param>
84-
[Obsolete]
8584
protected override void Dispose(bool disposing)
8685
{
8786
if (disposing)

src/CommunityToolkit.Maui.MediaElement/Views/MediaManager.macios.cs

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ public partial class MediaManager : IDisposable
9090
/// Creates the corresponding platform view of <see cref="MediaElement"/> on iOS and macOS.
9191
/// </summary>
9292
/// <returns>The platform native counterpart of <see cref="MediaElement"/>.</returns>
93-
[Obsolete]
9493
public (PlatformMediaElement Player, AVPlayerViewController PlayerViewController) CreatePlatformView()
9594
{
9695
Player = new();
@@ -132,8 +131,7 @@ public void Dispose()
132131
Dispose(true);
133132
GC.SuppressFinalize(this);
134133
}
135-
136-
[Obsolete]
134+
137135
protected virtual partial void PlatformPlay()
138136
{
139137
if (Player?.CurrentTime == PlayerItem?.Duration)
@@ -144,13 +142,11 @@ protected virtual partial void PlatformPlay()
144142
Player?.Play();
145143
}
146144

147-
[Obsolete]
148145
protected virtual partial void PlatformPause()
149146
{
150147
Player?.Pause();
151148
}
152-
153-
[Obsolete]
149+
154150
protected virtual async partial Task PlatformSeek(TimeSpan position, CancellationToken token)
155151
{
156152
token.ThrowIfCancellationRequested();
@@ -191,7 +187,6 @@ protected virtual async partial Task PlatformSeek(TimeSpan position, Cancellatio
191187
MediaElement.SeekCompleted();
192188
}
193189

194-
[Obsolete]
195190
protected virtual partial void PlatformStop()
196191
{
197192
// There's no Stop method so pause the video and reset its position
@@ -384,8 +379,7 @@ protected virtual partial void PlatformUpdateShouldShowPlaybackControls()
384379
PlayerViewController.ShowsPlaybackControls =
385380
MediaElement.ShouldShowPlaybackControls;
386381
}
387-
388-
[Obsolete]
382+
389383
protected virtual partial void PlatformUpdatePosition()
390384
{
391385
if (Player is null)
@@ -417,8 +411,7 @@ protected virtual partial void PlatformUpdatePosition()
417411
MediaElement.Duration = MediaElement.Position = TimeSpan.Zero;
418412
}
419413
}
420-
421-
[Obsolete]
414+
422415
protected virtual partial void PlatformUpdateVolume()
423416
{
424417
if (Player is null)
@@ -433,7 +426,7 @@ protected virtual partial void PlatformUpdateVolume()
433426
}
434427
}
435428

436-
[Obsolete]
429+
437430
protected virtual partial void PlatformUpdateShouldKeepScreenOn()
438431
{
439432
if (Player is null)
@@ -443,7 +436,7 @@ protected virtual partial void PlatformUpdateShouldKeepScreenOn()
443436
UIApplication.SharedApplication.IdleTimerDisabled = MediaElement.ShouldKeepScreenOn;
444437
}
445438

446-
[Obsolete]
439+
447440
protected virtual partial void PlatformUpdateShouldMute()
448441
{
449442
if (Player is null)
@@ -463,7 +456,7 @@ protected virtual partial void PlatformUpdateShouldLoopPlayback()
463456
/// Releases the unmanaged resources used by the <see cref="MediaManager"/> and optionally releases the managed resources.
464457
/// </summary>
465458
/// <param name="disposing"><see langword="true"/> to release both managed and unmanaged resources; <see langword="false"/> to release only unmanaged resources.</param>
466-
[Obsolete]
459+
467460
protected virtual void Dispose(bool disposing)
468461
{
469462
if (disposing)
@@ -548,7 +541,7 @@ protected virtual void Dispose(bool disposing)
548541
}
549542
}
550543

551-
[Obsolete]
544+
552545
void AddStatusObservers()
553546
{
554547
if (Player is null)
@@ -563,7 +556,7 @@ void AddStatusObservers()
563556
RateObserver = AVPlayer.Notifications.ObserveRateDidChange(RateChanged);
564557
}
565558

566-
[Obsolete]
559+
567560
void VolumeChanged(NSObservedChange e)
568561
{
569562
if (Player is null)
@@ -578,7 +571,7 @@ void VolumeChanged(NSObservedChange e)
578571
}
579572
}
580573

581-
[Obsolete]
574+
582575
void MutedChanged(NSObservedChange e)
583576
{
584577
if (Player is null)
@@ -617,7 +610,7 @@ void DestroyPlayedToEndObserver()
617610
PlayedToEndObserver?.Dispose();
618611
}
619612

620-
[Obsolete]
613+
621614
void StatusChanged(NSObservedChange obj)
622615
{
623616
if (Player is null)
@@ -636,7 +629,7 @@ void StatusChanged(NSObservedChange obj)
636629
MediaElement.CurrentStateChanged(newState);
637630
}
638631

639-
[Obsolete]
632+
640633
void TimeControlStatusChanged(NSObservedChange obj)
641634
{
642635
if (Player is null || Player.Status is AVPlayerStatus.Unknown
@@ -658,7 +651,7 @@ void TimeControlStatusChanged(NSObservedChange obj)
658651
MediaElement.CurrentStateChanged(newState);
659652
}
660653

661-
[Obsolete]
654+
662655
void ErrorOccurred(object? sender, NSNotificationEventArgs args)
663656
{
664657
string message;
@@ -681,7 +674,7 @@ void ErrorOccurred(object? sender, NSNotificationEventArgs args)
681674
}
682675
}
683676

684-
[Obsolete]
677+
685678
void PlayedToEnd(object? sender, NSNotificationEventArgs args)
686679
{
687680
if (args.Notification.Object != PlayerViewController?.Player?.CurrentItem || Player is null)
@@ -707,7 +700,7 @@ void PlayedToEnd(object? sender, NSNotificationEventArgs args)
707700
}
708701
}
709702

710-
[Obsolete]
703+
711704
void RateChanged(object? sender, NSNotificationEventArgs args)
712705
{
713706
if (Player is null)

src/CommunityToolkit.Maui.UnitTests/Behaviors/MaskedBehaviorTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ public void ValidMaskWithUniqueUnmaskedCharacterTests(string? mask, char unmaske
5858
}
5959

6060
[Fact]
61-
[Obsolete]
6261
public void AttachedToInvalidElementTest()
6362
{
6463
IReadOnlyList<VisualElement> invalidVisualElements =

src/CommunityToolkit.Maui.UnitTests/Behaviors/MaxLengthReachedBehaviorTests.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ namespace CommunityToolkit.Maui.UnitTests.Behaviors;
77
public class MaxLengthReachedBehaviorTests() : BaseBehaviorTest<MaxLengthReachedBehavior, InputView>(new MaxLengthReachedBehavior(), new Entry())
88
{
99
[Fact]
10-
[Obsolete]
1110
public void ShouldExecuteCommandWhenMaxLengthHasBeenReached()
1211
{
1312
// arrange
@@ -23,7 +22,6 @@ public void ShouldExecuteCommandWhenMaxLengthHasBeenReached()
2322
}
2423

2524
[Fact]
26-
[Obsolete]
2725
public void ShouldInvokeEventHandlerWhenMaxLengthHasBeenReached()
2826
{
2927
// arrange
@@ -39,7 +37,6 @@ public void ShouldInvokeEventHandlerWhenMaxLengthHasBeenReached()
3937
}
4038

4139
[Fact]
42-
[Obsolete]
4340
public void ShouldExecuteCommandWithTextValueNoLargerThenMaxLength()
4441
{
4542
// arrange
@@ -56,7 +53,6 @@ public void ShouldExecuteCommandWithTextValueNoLargerThenMaxLength()
5653
}
5754

5855
[Fact]
59-
[Obsolete]
6056
public void ShouldInvokeEventHandlerWithTextValueNoLargerThenMaxLength()
6157
{
6258
// arrange
@@ -73,7 +69,6 @@ public void ShouldInvokeEventHandlerWithTextValueNoLargerThenMaxLength()
7369
}
7470

7571
[Fact]
76-
[Obsolete]
7772
public void ShouldNotExecuteCommandBeforeMaxLengthHasBeenReached()
7873
{
7974
// arrange
@@ -88,7 +83,6 @@ public void ShouldNotExecuteCommandBeforeMaxLengthHasBeenReached()
8883
}
8984

9085
[Fact]
91-
[Obsolete]
9286
public void ShouldNotInvokeEventHandlerBeforeMaxLengthHasBeenReached()
9387
{
9488
// arrange
@@ -103,7 +97,6 @@ public void ShouldNotInvokeEventHandlerBeforeMaxLengthHasBeenReached()
10397
}
10498

10599
[Fact]
106-
[Obsolete]
107100
public void ShouldDismissKeyboardWhenMaxLengthHasBeenReached()
108101
{
109102
// arrange
@@ -119,7 +112,6 @@ public void ShouldDismissKeyboardWhenMaxLengthHasBeenReached()
119112
}
120113

121114
[Fact]
122-
[Obsolete]
123115
public void ShouldNotDismissKeyboardBeforeMaxLengthHasBeenReached()
124116
{
125117
// arrange
@@ -134,7 +126,6 @@ public void ShouldNotDismissKeyboardBeforeMaxLengthHasBeenReached()
134126
}
135127

136128
[Fact]
137-
[Obsolete]
138129
public void ShouldNotDismissKeyboardWhenOptionSetToFalse()
139130
{
140131
// arrange
@@ -148,8 +139,7 @@ public void ShouldNotDismissKeyboardWhenOptionSetToFalse()
148139
// assert
149140
Assert.True(entry.IsFocused);
150141
}
151-
152-
[Obsolete]
142+
153143
static Entry CreateEntry(int? maxLength = 2,
154144
bool shouldDismissKeyboardAutomatically = false,
155145
ICommand? command = null,

src/CommunityToolkit.Maui.UnitTests/Behaviors/SetFocusOnEntryCompletedTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ namespace CommunityToolkit.Maui.UnitTests.Behaviors;
66
public class SetFocusOnEntryCompletedTests() : BaseBehaviorTest<SetFocusOnEntryCompletedBehavior, VisualElement>(new SetFocusOnEntryCompletedBehavior(), new View())
77
{
88
[Fact]
9-
[Obsolete]
109
public void DoesNotSetFocusBeforeCompletion()
1110
{
1211
// arrange
@@ -22,7 +21,6 @@ public void DoesNotSetFocusBeforeCompletion()
2221
}
2322

2423
[Fact]
25-
[Obsolete]
2624
public void SetsFocusWhenCompleted()
2725
{
2826
// arrange
@@ -36,8 +34,7 @@ public void SetsFocusWhenCompleted()
3634
// assert
3735
Assert.True(entry2.IsFocused);
3836
}
39-
40-
[Obsolete]
37+
4138
static Entry CreateEntry(VisualElement? nextElement = null)
4239
{
4340
var entry = new Entry();

0 commit comments

Comments
 (0)