Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Clancey committed Jun 24, 2021
1 parent 98b16a8 commit 608a1e2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
1 change: 0 additions & 1 deletion src/Controls/tests/Core.UnitTests/MotionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public void SetEnabled(bool enabled)

_enabled = enabled;

//OnSystemEnabledChanged();
}
public override async void Start()
{
Expand Down
1 change: 1 addition & 0 deletions src/Core/src/HotReload/HotReloadHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Reflection;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Maui.Hosting;
using Microsoft.Maui.Internal;

namespace Microsoft.Maui.HotReload
{
Expand Down
2 changes: 1 addition & 1 deletion src/Core/src/HotReload/WeakList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace Microsoft.Maui.HotReload
namespace Microsoft.Maui.Internal
{
internal class WeakList<T> : IList<T?>
{
Expand Down
13 changes: 4 additions & 9 deletions src/Core/src/Platform/Android/NativeTicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@
using Android.Content;
using Android.OS;
using Microsoft.Maui;
using Microsoft.Maui.Internal;

namespace Microsoft.Maui.Animations
{
public class NativeTicker : Ticker
{
static List<NativeTicker> tickers = new List<NativeTicker>();
static WeakList<NativeTicker> tickers = new WeakList<NativeTicker>();
public static void CheckPowerSaveModeStatus()
{
foreach (var t in tickers)
t.checkPowerSaveModeStatus();
tickers.ForEach((t) => t.checkPowerSaveModeStatus());
}
readonly IMauiContext MauiContext;
ValueAnimator _val;
Expand All @@ -38,12 +39,6 @@ internal void checkPowerSaveModeStatus()
// So we need to keep track of whether we're in that mode and handle animations accordingly
// We can't just check ValueAnimator.AreAnimationsEnabled() because there's no event for that, and it's
// only supported on API >= 26

//if (!Forms.IsLollipopOrNewer)
//{
// _systemEnabled = true;
// return;
//}
var context = MauiContext.Context!;
var powerManager = (PowerManager)context.GetSystemService(Context.PowerService)!;

Expand Down

0 comments on commit 608a1e2

Please sign in to comment.