upgrade Dropbox SDK to 7.0.0. This is required before 01/2026 as described in https://dropbox.tech/developers/api-server-certificate-changes.
This commit is contained in:
48
src/DropboxBinding/Additions/AboutAdditions.txt
Normal file
48
src/DropboxBinding/Additions/AboutAdditions.txt
Normal file
@@ -0,0 +1,48 @@
|
||||
Additions allow you to add arbitrary C# to the generated classes
|
||||
before they are compiled. This can be helpful for providing convenience
|
||||
methods or adding pure C# classes.
|
||||
|
||||
== Adding Methods to Generated Classes ==
|
||||
|
||||
Let's say the library being bound has a Rectangle class with a constructor
|
||||
that takes an x and y position, and a width and length size. It will look like
|
||||
this:
|
||||
|
||||
public partial class Rectangle
|
||||
{
|
||||
public Rectangle (int x, int y, int width, int height)
|
||||
{
|
||||
// JNI bindings
|
||||
}
|
||||
}
|
||||
|
||||
Imagine we want to add a constructor to this class that takes a Point and
|
||||
Size structure instead of 4 ints. We can add a new file called Rectangle.cs
|
||||
with a partial class containing our new method:
|
||||
|
||||
public partial class Rectangle
|
||||
{
|
||||
public Rectangle (Point location, Size size) :
|
||||
this (location.X, location.Y, size.Width, size.Height)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
At compile time, the additions class will be added to the generated class
|
||||
and the final assembly will a Rectangle class with both constructors.
|
||||
|
||||
|
||||
== Adding C# Classes ==
|
||||
|
||||
Another thing that can be done is adding fully C# managed classes to the
|
||||
generated library. In the above example, let's assume that there isn't a
|
||||
Point class available in Java or our library. The one we create doesn't need
|
||||
to interact with Java, so we'll create it like a normal class in C#.
|
||||
|
||||
By adding a Point.cs file with this class, it will end up in the binding library:
|
||||
|
||||
public class Point
|
||||
{
|
||||
public int X { get; set; }
|
||||
public int Y { get; set; }
|
||||
}
|
8
src/DropboxBinding/DropboxBinding.csproj
Normal file
8
src/DropboxBinding/DropboxBinding.csproj
Normal file
@@ -0,0 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-android</TargetFramework>
|
||||
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
</Project>
|
14
src/DropboxBinding/Transforms/EnumFields.xml
Normal file
14
src/DropboxBinding/Transforms/EnumFields.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<enum-field-mappings>
|
||||
<!--
|
||||
This example converts the constants Fragment_id, Fragment_name,
|
||||
and Fragment_tag from android.support.v4.app.FragmentActivity.FragmentTag
|
||||
to an enum called Android.Support.V4.App.FragmentTagType with values
|
||||
Id, Name, and Tag.
|
||||
|
||||
<mapping jni-class="android/support/v4/app/FragmentActivity$FragmentTag" clr-enum-type="Android.Support.V4.App.FragmentTagType">
|
||||
<field jni-name="Fragment_name" clr-name="Name" value="0" />
|
||||
<field jni-name="Fragment_id" clr-name="Id" value="1" />
|
||||
<field jni-name="Fragment_tag" clr-name="Tag" value="2" />
|
||||
</mapping>
|
||||
-->
|
||||
</enum-field-mappings>
|
13
src/DropboxBinding/Transforms/EnumMethods.xml
Normal file
13
src/DropboxBinding/Transforms/EnumMethods.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<enum-method-mappings>
|
||||
<!--
|
||||
This example changes the Java method:
|
||||
android.support.v4.app.Fragment.SavedState.writeToParcel (int flags)
|
||||
to be:
|
||||
android.support.v4.app.Fragment.SavedState.writeToParcel (Android.OS.ParcelableWriteFlags flags)
|
||||
when bound in C#.
|
||||
|
||||
<mapping jni-class="android/support/v4/app/Fragment.SavedState">
|
||||
<method jni-name="writeToParcel" parameter="flags" clr-enum-type="Android.OS.ParcelableWriteFlags" />
|
||||
</mapping>
|
||||
-->
|
||||
</enum-method-mappings>
|
35
src/DropboxBinding/Transforms/Metadata.xml
Normal file
35
src/DropboxBinding/Transforms/Metadata.xml
Normal file
@@ -0,0 +1,35 @@
|
||||
<metadata>
|
||||
|
||||
<remove-node path="/api/package[@name='com.dropbox.core']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.http']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.json']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.oauth']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.sdk.android']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.stone']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.util']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v1']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.account']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.callbacks']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.check']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.seenstate']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.teamcommon']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.secondaryemails']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.async']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.auth']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.common']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.contacts']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.fileproperties']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.filerequests']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.files']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.paper']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.openid']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.sharing']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.team']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.teamlog']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.teampolicies']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.users']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.v2.userscommon']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.android']" />
|
||||
<remove-node path="/api/package[@name='com.dropbox.core.android']" />
|
||||
</metadata>
|
BIN
src/DropboxBinding/dropbox-android-sdk-7.0.0.aar
Normal file
BIN
src/DropboxBinding/dropbox-android-sdk-7.0.0.aar
Normal file
Binary file not shown.
Binary file not shown.
@@ -29,6 +29,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PCloudBindings", "PCloudBin
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Kp2aAutofillParser.Tests", "Kp2aAutofillParser.Tests\Kp2aAutofillParser.Tests.csproj", "{F5A2A8F9-C084-498F-9603-9D927BA5C626}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DropboxBinding", "DropboxBinding\DropboxBinding.csproj", "{2FE6E335-E834-4F86-AB83-2C5D225DA929}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -369,6 +371,30 @@ Global
|
||||
{F5A2A8F9-C084-498F-9603-9D927BA5C626}.ReleaseNoNet|Win32.Build.0 = Release|Any CPU
|
||||
{F5A2A8F9-C084-498F-9603-9D927BA5C626}.ReleaseNoNet|x64.ActiveCfg = Release|Any CPU
|
||||
{F5A2A8F9-C084-498F-9603-9D927BA5C626}.ReleaseNoNet|x64.Build.0 = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Debug|Win32.ActiveCfg = Debug|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Debug|Win32.Build.0 = Debug|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Release|Win32.ActiveCfg = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Release|Win32.Build.0 = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.Release|x64.Build.0 = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.ReleaseNoNet|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.ReleaseNoNet|Any CPU.Build.0 = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.ReleaseNoNet|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.ReleaseNoNet|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.ReleaseNoNet|Win32.ActiveCfg = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.ReleaseNoNet|Win32.Build.0 = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.ReleaseNoNet|x64.ActiveCfg = Release|Any CPU
|
||||
{2FE6E335-E834-4F86-AB83-2C5D225DA929}.ReleaseNoNet|x64.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@@ -41,7 +41,8 @@ dependencies {
|
||||
exclude group: 'com.google.android.google-play-services'
|
||||
}
|
||||
implementation 'com.google.apis:google-api-services-drive:v2-rev102-1.16.0-rc'
|
||||
implementation 'com.dropbox.core:dropbox-core-sdk:5.4.6'
|
||||
implementation 'com.dropbox.core:dropbox-core-sdk:7.0.0'
|
||||
implementation 'com.dropbox.core:dropbox-android-sdk:7.0.0'
|
||||
implementation 'com.google.api-client:google-api-client:1.30.5'
|
||||
implementation 'com.google.api-client:google-api-client-android:1.30.5'
|
||||
|
||||
|
@@ -7,6 +7,7 @@ import com.dropbox.core.DbxOAuth1Upgrader;
|
||||
import com.dropbox.core.DbxRequestConfig;
|
||||
import com.dropbox.core.InvalidAccessTokenException;
|
||||
import com.dropbox.core.android.Auth;
|
||||
|
||||
import com.dropbox.core.json.JsonReadException;
|
||||
import com.dropbox.core.oauth.DbxCredential;
|
||||
import com.dropbox.core.v2.DbxClientV2;
|
||||
@@ -154,7 +155,7 @@ public class DropboxV2Storage extends JavaFileStorageBase
|
||||
{
|
||||
if ((previousFileVersion == null) || (previousFileVersion.equals("")))
|
||||
return false;
|
||||
path = removeProtocol(path);
|
||||
path = removeProtocol(path);
|
||||
try {
|
||||
Metadata entry = dbxClient.files().getMetadata(path);
|
||||
return !String.valueOf(entry.hashCode()) .equals(previousFileVersion);
|
||||
|
@@ -748,6 +748,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AndroidFileChooserBinding\AndroidFileChooserBinding.csproj" />
|
||||
<ProjectReference Include="..\DropboxBinding\DropboxBinding.csproj" />
|
||||
<ProjectReference Include="..\JavaFileStorageBindings\JavaFileStorageBindings.csproj" />
|
||||
<ProjectReference Include="..\Kp2aAutofillParser\Kp2aAutofillParser.csproj" />
|
||||
<ProjectReference Include="..\KP2AKdbLibraryBinding\KP2AKdbLibraryBinding.csproj" />
|
||||
|
Reference in New Issue
Block a user