Родитель
82136cab28
Коммит
5b4cf5474d
|
@ -95,12 +95,14 @@ namespace Xamarin.Essentials
|
||||||
|
|
||||||
void LocationAuthCallback(object sender, CLAuthorizationChangedEventArgs e)
|
void LocationAuthCallback(object sender, CLAuthorizationChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.Status == CLAuthorizationStatus.NotDetermined)
|
if (e?.Status == null || e.Status == CLAuthorizationStatus.NotDetermined)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (locationManager != null)
|
||||||
locationManager.AuthorizationChanged -= LocationAuthCallback;
|
locationManager.AuthorizationChanged -= LocationAuthCallback;
|
||||||
tcs.TrySetResult(GetLocationStatus());
|
|
||||||
locationManager.Dispose();
|
tcs?.TrySetResult(GetLocationStatus());
|
||||||
|
locationManager?.Dispose();
|
||||||
locationManager = null;
|
locationManager = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче