Родитель
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;
|
||||||
|
|
||||||
locationManager.AuthorizationChanged -= LocationAuthCallback;
|
if (locationManager != null)
|
||||||
tcs.TrySetResult(GetLocationStatus());
|
locationManager.AuthorizationChanged -= LocationAuthCallback;
|
||||||
locationManager.Dispose();
|
|
||||||
|
tcs?.TrySetResult(GetLocationStatus());
|
||||||
|
locationManager?.Dispose();
|
||||||
locationManager = null;
|
locationManager = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче