restore NoNet build, including removal of MLKit for that Flavor as it adds internet permission
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<DefineConstants Condition="'$(Flavor)'=='NoNet'">NO_QR_SCANNER;EXCLUDE_JAVAFILESTORAGE;NoNet</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Resources\" />
|
||||
@@ -19,7 +20,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AndroidFileChooserBinding\AndroidFileChooserBinding.csproj" />
|
||||
<ProjectReference Include="..\JavaFileStorageBindings\JavaFileStorageBindings.csproj" />
|
||||
<ProjectReference Include="..\JavaFileStorageBindings\JavaFileStorageBindings.csproj" Condition="'$(Flavor)'!='NoNet'" />
|
||||
<ProjectReference Include="..\KeePassLib2Android\KeePassLib2Android.csproj" />
|
||||
<ProjectReference Include="..\KP2AKdbLibraryBinding\KP2AKdbLibraryBinding.csproj" />
|
||||
<ProjectReference Include="..\TwofishCipher\TwofishCipher.csproj" />
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
android:supportsRtl="true">
|
||||
<activity android:name="com.crocoapps.javafilestoragetest2.MainActivity"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
|
||||
@@ -55,8 +55,10 @@ using Object = Java.Lang.Object;
|
||||
using Uri = Android.Net.Uri;
|
||||
using Resource = keepass2android.Resource;
|
||||
using Google.Android.Material.TextField;
|
||||
#if !NO_QR_SCANNER
|
||||
using Xamarin.Google.MLKit.Vision.Barcode.Common;
|
||||
using Xamarin.Google.MLKit.Vision.CodeScanner;
|
||||
#endif
|
||||
using Console = System.Console;
|
||||
using Task = Android.Gms.Tasks.Task;
|
||||
|
||||
@@ -1158,8 +1160,10 @@ namespace keepass2android
|
||||
{
|
||||
dlgView.FindViewById(Resource.Id.totp_custom_settings_group).Visibility = args.IsChecked ? ViewStates.Visible : ViewStates.Gone;
|
||||
};
|
||||
|
||||
dlgView.FindViewById<Button>(Resource.Id.totp_scan).Click += async (object o, EventArgs args) =>
|
||||
#if NO_QR_SCANNER
|
||||
dlgView.FindViewById<Button>(Resource.Id.totp_scan).Visibility = ViewStates.Gone;
|
||||
#else
|
||||
dlgView.FindViewById<Button>(Resource.Id.totp_scan).Click += async (object o, EventArgs args) =>
|
||||
{
|
||||
if (GoogleApiAvailability.Instance.IsGooglePlayServicesAvailable(this) != ConnectionResult.Success)
|
||||
{
|
||||
@@ -1194,6 +1198,7 @@ namespace keepass2android
|
||||
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
//copy values from entry into dialog
|
||||
View ees = (View)sender.Parent;
|
||||
@@ -1572,6 +1577,7 @@ namespace keepass2android
|
||||
|
||||
}
|
||||
}
|
||||
#if !NO_QR_SCANNER
|
||||
public class SuccessListener : Object, IOnSuccessListener
|
||||
{
|
||||
private readonly Action<Barcode> _onSuccess;
|
||||
@@ -1601,8 +1607,9 @@ namespace keepass2android
|
||||
_onFailure?.Invoke(e);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
public class DefaultEdit : EditModeBase
|
||||
public class DefaultEdit : EditModeBase
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<ApplicationVersion>1</ApplicationVersion>
|
||||
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DefineConstants Condition="'$(Flavor)'=='NoNet'">NO_QR_SCANNER;EXCLUDE_JAVAFILESTORAGE;NoNet</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Remove="Assets\fontawesome-webfont.ttf" />
|
||||
@@ -752,16 +753,16 @@
|
||||
<PackageReference Include="Xamarin.Google.Guava" Version="33.4.0.1" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Auth" Version="121.3.0.1" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Base" Version="118.5.0.4" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Code.Scanner" Version="116.1.0.10" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Code.Scanner" Version="116.1.0.10" Condition="'$(Flavor)'!='NoNet'" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AndroidFileChooserBinding\AndroidFileChooserBinding.csproj" />
|
||||
<ProjectReference Include="..\DropboxBinding\DropboxBinding.csproj" />
|
||||
<ProjectReference Include="..\JavaFileStorageBindings\JavaFileStorageBindings.csproj" />
|
||||
<ProjectReference Include="..\DropboxBinding\DropboxBinding.csproj" Condition="'$(Flavor)'!='NoNet'" />
|
||||
<ProjectReference Include="..\JavaFileStorageBindings\JavaFileStorageBindings.csproj" Condition="'$(Flavor)'!='NoNet'" />
|
||||
<ProjectReference Include="..\Kp2aAutofillParser\Kp2aAutofillParser.csproj" />
|
||||
<ProjectReference Include="..\KP2AKdbLibraryBinding\KP2AKdbLibraryBinding.csproj" />
|
||||
<ProjectReference Include="..\Kp2aKeyboardBinding\Kp2aKeyboardBinding.csproj" />
|
||||
<ProjectReference Include="..\PCloudBindings\PCloudBindings.csproj" />
|
||||
<ProjectReference Include="..\PCloudBindings\PCloudBindings.csproj" Condition="'$(Flavor)'!='NoNet'" />
|
||||
<ProjectReference Include="..\PluginSdkBinding\PluginSdkBinding.csproj" />
|
||||
<ProjectReference Include="..\ZlibAndroid\ZlibAndroid.csproj" />
|
||||
<ProjectReference Include="..\TwofishCipher\TwofishCipher.csproj" />
|
||||
|
||||
Reference in New Issue
Block a user