From 0cc4a8ce7809b37d3580fa696074ab11639251f4 Mon Sep 17 00:00:00 2001 From: Tobias Reski Date: Mon, 15 Nov 2021 11:15:43 +0100 Subject: [PATCH] Removed Plugin.Permissions references --- LastenradBayern/TINK.Android/MainActivity.cs | 9 +--- LastenradBayern/TINK/App.xaml.cs | 1 - .../TINK/HtmlResouces/V02/InfoLicenses.html | 1 - Meinkonrad/TINK.Android/MainActivity.cs | 7 ---- .../TINK/HtmlResouces/V02/InfoLicenses.html | 1 - TINK/TINK.Android/MainActivity.cs | 7 ---- TINK/TINK/HtmlResouces/V02/InfoLicenses.html | 1 - TINKLib/ViewModel/Map/MapPageViewModel.cs | 2 +- .../Services/Permissions/PermissionsMock.cs | 41 ------------------- TestFramework/TestFramework.csproj | 1 - TestShareeLib/Model/TestTinkApp.cs | 4 +- .../Account/TestAccountPageViewModel.cs | 1 - .../ViewModel/Map/TestMapPageViewModel.cs | 1 - .../TestBikesAtStationPageViewModel.cs | 1 - .../ViewModel/TestMyBikesPageViewModel.cs | 1 - .../UseCases/ConnectedOffline/TestTinkApp.cs | 1 - .../UseCases/SelectStation/TestTinkApp.cs | 1 - 17 files changed, 4 insertions(+), 77 deletions(-) delete mode 100644 TestFramework/Services/Permissions/PermissionsMock.cs diff --git a/LastenradBayern/TINK.Android/MainActivity.cs b/LastenradBayern/TINK.Android/MainActivity.cs index d53dddf..1b7d31f 100644 --- a/LastenradBayern/TINK.Android/MainActivity.cs +++ b/LastenradBayern/TINK.Android/MainActivity.cs @@ -4,7 +4,6 @@ using Android.Content.PM; using Android.OS; using Android.Content; using Java.Interop; -using Plugin.Permissions; namespace TINK.Droid { @@ -52,13 +51,7 @@ namespace TINK.Droid { Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults); } - else if (App.PermissionsService.GetType() == typeof(TINK.Services.Permissions.Plugin.Permissions)) - { - // Bug in 3.0.244 and earlier versions of sharee.bike app: Call of PermissionsImplementation.Current.OnRequestedPermission result was missing. - // see https://dev.azure.com/TeilRad/sharee.bike%20Buchungsplattform/_workitems/edit/136 for further details. - PermissionsImplementation.Current.OnRequestPermissionsResult(requestCode, permissions, grantResults); - } - + base.OnRequestPermissionsResult(requestCode, permissions, grantResults); } diff --git a/LastenradBayern/TINK/App.xaml.cs b/LastenradBayern/TINK/App.xaml.cs index 3619893..2e42308 100644 --- a/LastenradBayern/TINK/App.xaml.cs +++ b/LastenradBayern/TINK/App.xaml.cs @@ -15,7 +15,6 @@ using MonkeyCache.FileStore; using Plugin.Connectivity; using System.Threading; using TINK.Model.Settings; -using Plugin.Permissions; using TINK.Services.BluetoothLock.Crypto; using TINK.Model.Services.Geolocation; using TINK.Services; diff --git a/LastenradBayern/TINK/HtmlResouces/V02/InfoLicenses.html b/LastenradBayern/TINK/HtmlResouces/V02/InfoLicenses.html index 6c5e7aa..ed4f74c 100644 --- a/LastenradBayern/TINK/HtmlResouces/V02/InfoLicenses.html +++ b/LastenradBayern/TINK/HtmlResouces/V02/InfoLicenses.html @@ -33,7 +33,6 @@ PCLStorage von Daniel Plaisted Microsoft Public License (Ms-PL) Pinvoke von AArnott MIT- Lizenz für Pinvoke Plugin.BLE Adrian Seceleanu, Sven-Michael Stübe Apache License 2.0 - Plugin.Permissions von James Montemagno MIT Lizenz 2016 Polly von Michael Wolfenden, App vNext New BSD License Serilog von Serilog Contributors Apache License 2.0 Serilog.Sinks.Debug von Serilog Contributors Apache License 2.0 diff --git a/Meinkonrad/TINK.Android/MainActivity.cs b/Meinkonrad/TINK.Android/MainActivity.cs index 9c9af7f..6d41ea5 100644 --- a/Meinkonrad/TINK.Android/MainActivity.cs +++ b/Meinkonrad/TINK.Android/MainActivity.cs @@ -4,7 +4,6 @@ using Android.Content.PM; using Android.OS; using Android.Content; using Java.Interop; -using Plugin.Permissions; namespace TINK.Droid { @@ -52,12 +51,6 @@ namespace TINK.Droid { Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults); } - else if (App.PermissionsService.GetType() == typeof(TINK.Services.Permissions.Plugin.Permissions)) - { - // Bug in 3.0.244 and earlier versions of sharee.bike app: Call of PermissionsImplementation.Current.OnRequestedPermission result was missing. - // see https://dev.azure.com/TeilRad/sharee.bike%20Buchungsplattform/_workitems/edit/136 for further details. - PermissionsImplementation.Current.OnRequestPermissionsResult(requestCode, permissions, grantResults); - } base.OnRequestPermissionsResult(requestCode, permissions, grantResults); } diff --git a/Meinkonrad/TINK/HtmlResouces/V02/InfoLicenses.html b/Meinkonrad/TINK/HtmlResouces/V02/InfoLicenses.html index 6c5e7aa..ed4f74c 100644 --- a/Meinkonrad/TINK/HtmlResouces/V02/InfoLicenses.html +++ b/Meinkonrad/TINK/HtmlResouces/V02/InfoLicenses.html @@ -33,7 +33,6 @@ PCLStorage von Daniel Plaisted Microsoft Public License (Ms-PL) Pinvoke von AArnott MIT- Lizenz für Pinvoke Plugin.BLE Adrian Seceleanu, Sven-Michael Stübe Apache License 2.0 - Plugin.Permissions von James Montemagno MIT Lizenz 2016 Polly von Michael Wolfenden, App vNext New BSD License Serilog von Serilog Contributors Apache License 2.0 Serilog.Sinks.Debug von Serilog Contributors Apache License 2.0 diff --git a/TINK/TINK.Android/MainActivity.cs b/TINK/TINK.Android/MainActivity.cs index 323d188..633720c 100644 --- a/TINK/TINK.Android/MainActivity.cs +++ b/TINK/TINK.Android/MainActivity.cs @@ -4,7 +4,6 @@ using Android.Content.PM; using Android.OS; using Android.Content; using Java.Interop; -using Plugin.Permissions; namespace TINK.Droid { @@ -52,12 +51,6 @@ namespace TINK.Droid { Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults); } - else if (App.PermissionsService.GetType() == typeof(TINK.Services.Permissions.Plugin.Permissions)) - { - // Bug in 3.0.244 and earlier versions of sharee.bike app: Call of PermissionsImplementation.Current.OnRequestedPermission result was missing. - // see https://dev.azure.com/TeilRad/sharee.bike%20Buchungsplattform/_workitems/edit/136 for further details. - PermissionsImplementation.Current.OnRequestPermissionsResult(requestCode, permissions, grantResults); - } base.OnRequestPermissionsResult(requestCode, permissions, grantResults); } diff --git a/TINK/TINK/HtmlResouces/V02/InfoLicenses.html b/TINK/TINK/HtmlResouces/V02/InfoLicenses.html index 6c5e7aa..ed4f74c 100644 --- a/TINK/TINK/HtmlResouces/V02/InfoLicenses.html +++ b/TINK/TINK/HtmlResouces/V02/InfoLicenses.html @@ -33,7 +33,6 @@ PCLStorage von Daniel Plaisted Microsoft Public License (Ms-PL) Pinvoke von AArnott MIT- Lizenz für Pinvoke Plugin.BLE Adrian Seceleanu, Sven-Michael Stübe Apache License 2.0 - Plugin.Permissions von James Montemagno MIT Lizenz 2016 Polly von Michael Wolfenden, App vNext New BSD License Serilog von Serilog Contributors Apache License 2.0 Serilog.Sinks.Debug von Serilog Contributors Apache License 2.0 diff --git a/TINKLib/ViewModel/Map/MapPageViewModel.cs b/TINKLib/ViewModel/Map/MapPageViewModel.cs index c94c9b2..d96e2fe 100644 --- a/TINKLib/ViewModel/Map/MapPageViewModel.cs +++ b/TINKLib/ViewModel/Map/MapPageViewModel.cs @@ -439,7 +439,7 @@ namespace TINK.ViewModel.Map } // Set pins to their positions on map. - InitializePins(resultStationsAndBikes.Response.StationsAll); + InitializePins(stations); Log.ForContext().Verbose("Update of pins done."); } diff --git a/TestFramework/Services/Permissions/PermissionsMock.cs b/TestFramework/Services/Permissions/PermissionsMock.cs deleted file mode 100644 index 66744a8..0000000 --- a/TestFramework/Services/Permissions/PermissionsMock.cs +++ /dev/null @@ -1,41 +0,0 @@ -using Plugin.Permissions; -using Plugin.Permissions.Abstractions; -using System; -using System.Collections.Generic; -using System.Threading.Tasks; - -namespace TestFramework.Services.Permissions -{ - public class PermissionsMock : IPermissions - { - public async Task CheckPermissionStatusAsync() where T : BasePermission, new() - { - return await Task.FromResult(Plugin.Permissions.Abstractions.PermissionStatus.Granted); - } - - public Task CheckPermissionStatusAsync(Permission permission) - { - throw new NotImplementedException(); - } - - public bool OpenAppSettings() - { - throw new NotImplementedException(); - } - - public Task RequestPermissionAsync() where T : BasePermission, new() - { - throw new NotImplementedException(); - } - - public Task> RequestPermissionsAsync(params Permission[] permissions) - { - throw new NotImplementedException(); - } - - public Task ShouldShowRequestPermissionRationaleAsync(Permission permission) - { - throw new NotImplementedException(); - } - } -} diff --git a/TestFramework/TestFramework.csproj b/TestFramework/TestFramework.csproj index be7ff01..42651f6 100644 --- a/TestFramework/TestFramework.csproj +++ b/TestFramework/TestFramework.csproj @@ -25,7 +25,6 @@ - diff --git a/TestShareeLib/Model/TestTinkApp.cs b/TestShareeLib/Model/TestTinkApp.cs index 1e7612b..1391221 100644 --- a/TestShareeLib/Model/TestTinkApp.cs +++ b/TestShareeLib/Model/TestTinkApp.cs @@ -39,8 +39,8 @@ namespace TestTINKLib.Fixtures.UseCases.Logout activeUri: new Uri(CopriServerUriList.TINK_DEVEL)), accountStore, (isConnected, uri, sessionCookie, mail, expiresAfter) => string.IsNullOrEmpty(sessionCookie) - ? new ConnectorCache(sessionCookie, mail, new CopriCallsMemory001()) - : new ConnectorCache(sessionCookie, mail, new CopriCallsMemory001(sessionCookie)), + ? new ConnectorCache(sessionCookie, mail, new TestShareeLib.Repository.CopriCallsMemory001()) + : new ConnectorCache(sessionCookie, mail, new TestShareeLib.Repository.CopriCallsMemory001(sessionCookie)), Substitute.For>(), locksService, device, diff --git a/TestTINKLib/Fixtures/ObjectTests/ViewModel/Account/TestAccountPageViewModel.cs b/TestTINKLib/Fixtures/ObjectTests/ViewModel/Account/TestAccountPageViewModel.cs index cd33203..a24e7c7 100644 --- a/TestTINKLib/Fixtures/ObjectTests/ViewModel/Account/TestAccountPageViewModel.cs +++ b/TestTINKLib/Fixtures/ObjectTests/ViewModel/Account/TestAccountPageViewModel.cs @@ -23,7 +23,6 @@ using TestFramework.Repository; using TestFramework.Model.User.Account; using TestFramework.Model.Services.Geolocation; using TestFramework.Services.BluetoothLock; -using TestFramework.Services.Permissions; using TestFramework.Services.CopriApi.Connector; namespace TestTINKLib.Fixtures.ObjectTests.Account diff --git a/TestTINKLib/Fixtures/ObjectTests/ViewModel/Map/TestMapPageViewModel.cs b/TestTINKLib/Fixtures/ObjectTests/ViewModel/Map/TestMapPageViewModel.cs index 748e56c..2c0559a 100644 --- a/TestTINKLib/Fixtures/ObjectTests/ViewModel/Map/TestMapPageViewModel.cs +++ b/TestTINKLib/Fixtures/ObjectTests/ViewModel/Map/TestMapPageViewModel.cs @@ -19,7 +19,6 @@ using TestFramework.Services.BluetoothLock; using TestFramework.Model.Services.Geolocation; using TestFramework.Model.User.Account; using TestFramework.Model.Device; -using TestFramework.Services.Permissions; using TestFramework.Repository; using TestFramework.Services.CopriApi.Connector; diff --git a/TestTINKLib/Fixtures/ObjectTests/ViewModel/TestBikesAtStationPageViewModel.cs b/TestTINKLib/Fixtures/ObjectTests/ViewModel/TestBikesAtStationPageViewModel.cs index 4d314a1..51e358a 100644 --- a/TestTINKLib/Fixtures/ObjectTests/ViewModel/TestBikesAtStationPageViewModel.cs +++ b/TestTINKLib/Fixtures/ObjectTests/ViewModel/TestBikesAtStationPageViewModel.cs @@ -28,7 +28,6 @@ using TestFramework.Model.Device; using TestFramework.Repository; using TestFramework.Model.User.Account; using TestFramework.Model.Services.Geolocation; -using TestFramework.Services.Permissions; using TestFramework.Services.CopriApi.Connector; namespace TestTINKLib.Fixtures.ObjectTests.ViewModel diff --git a/TestTINKLib/Fixtures/ObjectTests/ViewModel/TestMyBikesPageViewModel.cs b/TestTINKLib/Fixtures/ObjectTests/ViewModel/TestMyBikesPageViewModel.cs index daa0f05..56d29e0 100644 --- a/TestTINKLib/Fixtures/ObjectTests/ViewModel/TestMyBikesPageViewModel.cs +++ b/TestTINKLib/Fixtures/ObjectTests/ViewModel/TestMyBikesPageViewModel.cs @@ -28,7 +28,6 @@ using TestFramework.Model.Device; using TestFramework.Repository; using TestFramework.Model.User.Account; using TestFramework.Model.Services.Geolocation; -using TestFramework.Services.Permissions; namespace TestTINKLib.Fixtures.ObjectTests.ViewModel { diff --git a/TestTINKLib/Fixtures/UseCases/ConnectedOffline/TestTinkApp.cs b/TestTINKLib/Fixtures/UseCases/ConnectedOffline/TestTinkApp.cs index 7892a2a..0d43458 100644 --- a/TestTINKLib/Fixtures/UseCases/ConnectedOffline/TestTinkApp.cs +++ b/TestTINKLib/Fixtures/UseCases/ConnectedOffline/TestTinkApp.cs @@ -10,7 +10,6 @@ namespace TestTINKLib.Fixtures.UseCases.ConnectedOffline using TestFramework.Model.Services.Geolocation; using TestFramework.Model.User.Account; using TestFramework.Services.BluetoothLock; - using TestFramework.Services.Permissions; using TINK.Model.Connector; using TINK.Model.Services.Geolocation; using TINK.Services; diff --git a/TestTINKLib/Fixtures/UseCases/SelectStation/TestTinkApp.cs b/TestTINKLib/Fixtures/UseCases/SelectStation/TestTinkApp.cs index 3f7aad2..39ad7e3 100644 --- a/TestTINKLib/Fixtures/UseCases/SelectStation/TestTinkApp.cs +++ b/TestTINKLib/Fixtures/UseCases/SelectStation/TestTinkApp.cs @@ -13,7 +13,6 @@ using TestFramework.Model.Device; using TestFramework.Model.User.Account; using TestFramework.Model.Services.Geolocation; using TestFramework.Services.BluetoothLock; -using TestFramework.Services.Permissions; namespace TestTINKLib.Fixtures.UseCases.SelectStation {