From b1bb6937e6c5cde122d37e3e0eb513762fdf1cab Mon Sep 17 00:00:00 2001 From: Morten Daniel Fornes Date: Thu, 21 Nov 2019 17:41:55 +0700 Subject: [PATCH 1/2] Android: rename Java package to com.fuse This renames the com.fusetools package to match better with other Java-code in the repo. The package is an internal Java package that is unlikely to be used directly by external code, and because we are working on 2.0 it is nice to clean-up our public API a little. --- Source/Fuse.Camera/Android/AndroidCamera.uno | 8 ++++---- Source/Fuse.CameraRoll/Android/AndroidCameraRoll.uno | 12 ++++++------ .../Fuse.Controls.CameraView/Android/NativePhoto.uno | 4 ++-- .../Android/FuseWebChromeClient.java | 2 +- .../Android/FuseWebViewClient.java | 2 +- .../Fuse.Controls.WebView/Android/JsInterface.java | 2 +- .../Android/ScrollableWebView.java | 2 +- .../Fuse.Controls.WebView/Android/WebViewForeign.uno | 2 +- .../Fuse.Drawing.Surface/Android/GraphicsSurface.uno | 4 ++-- .../Android/GraphicsSurfaceContext.java | 2 +- .../Android/LinearGradientStore.java | 2 +- .../Fuse.Drawing.Surface/Android/NativeSurface.uno | 4 ++-- Source/Fuse.Drawing.Surface/Android/Surface.uno | 4 ++-- Source/Fuse.ImageTools/Android/AndroidImageUtils.uno | 2 +- Source/Fuse.ImageTools/Android/Image.java | 2 +- .../Fuse.ImageTools/Android/ImageStorageTools.java | 2 +- Source/Fuse.ImageTools/Android/ImageUtils.java | 2 +- Source/Fuse.Maps/Android/ForeignHelpers.uno | 2 +- Source/Fuse.Maps/Android/FuseMap.java | 2 +- 19 files changed, 31 insertions(+), 31 deletions(-) diff --git a/Source/Fuse.Camera/Android/AndroidCamera.uno b/Source/Fuse.Camera/Android/AndroidCamera.uno index 6547fce8d..5dbb13874 100644 --- a/Source/Fuse.Camera/Android/AndroidCamera.uno +++ b/Source/Fuse.Camera/Android/AndroidCamera.uno @@ -35,7 +35,7 @@ namespace Fuse.Camera [ForeignInclude(Language.Java, "android.provider.MediaStore", "com.fuse.Activity", - "com.fusetools.camera.Image", + "com.fuse.camera.Image", "android.os.Build", "androidx.core.content.FileProvider", "java.io.File", @@ -111,7 +111,7 @@ namespace Fuse.Camera @} } - [ForeignInclude(Language.Java, "com.fuse.Activity", "com.fusetools.camera.Image", "android.content.Intent", "com.fusetools.camera.ImageStorageTools")] + [ForeignInclude(Language.Java, "com.fuse.Activity", "com.fuse.camera.Image", "android.content.Intent", "com.fuse.camera.ImageStorageTools")] extern (Android) internal class TakePictureCallback { Promise _p; @@ -154,7 +154,7 @@ namespace Fuse.Camera } } - [ForeignInclude(Language.Java, "android.provider.MediaStore", "com.fuse.Activity", "android.content.Intent", "com.fusetools.camera.Image", "com.fusetools.camera.ImageStorageTools", "androidx.core.content.ContextCompat")] + [ForeignInclude(Language.Java, "android.provider.MediaStore", "com.fuse.Activity", "android.content.Intent", "com.fuse.camera.Image", "com.fuse.camera.ImageStorageTools", "androidx.core.content.ContextCompat")] extern (Android) class CheckPermissionsCommand { public CheckPermissionsCommand(Promise p) @@ -185,7 +185,7 @@ namespace Fuse.Camera @} } - [ForeignInclude(Language.Java, "android.provider.MediaStore", "com.fuse.Activity", "android.content.Intent", "com.fusetools.camera.Image", "com.fusetools.camera.ImageStorageTools")] + [ForeignInclude(Language.Java, "android.provider.MediaStore", "com.fuse.Activity", "android.content.Intent", "com.fuse.camera.Image", "com.fuse.camera.ImageStorageTools")] extern (Android) class requestAndroidPermissions { PromiseCallback _callback; diff --git a/Source/Fuse.CameraRoll/Android/AndroidCameraRoll.uno b/Source/Fuse.CameraRoll/Android/AndroidCameraRoll.uno index a5818429c..ba24354d6 100644 --- a/Source/Fuse.CameraRoll/Android/AndroidCameraRoll.uno +++ b/Source/Fuse.CameraRoll/Android/AndroidCameraRoll.uno @@ -6,7 +6,7 @@ using Fuse.ImageTools; using Uno.Permissions; namespace Fuse.CameraRoll { - [ForeignInclude(Language.Java, "com.fuse.Activity", "com.fusetools.camera.Image", "android.content.Intent", "com.fusetools.camera.ImageStorageTools")] + [ForeignInclude(Language.Java, "com.fuse.Activity", "com.fuse.camera.Image", "android.content.Intent", "com.fuse.camera.ImageStorageTools")] extern (Android) internal class SelectPictureClosure { Promise _p; @@ -59,7 +59,7 @@ namespace Fuse.CameraRoll } } - [ForeignInclude(Language.Java, "android.provider.MediaStore", "com.fuse.Activity", "android.content.Intent", "com.fusetools.camera.Image", "com.fusetools.camera.ImageStorageTools")] + [ForeignInclude(Language.Java, "android.provider.MediaStore", "com.fuse.Activity", "android.content.Intent", "com.fuse.camera.Image", "com.fuse.camera.ImageStorageTools")] extern (Android) class SelectPicturePermissionCheckCommand { SelectPictureClosure _closure; @@ -103,7 +103,7 @@ namespace Fuse.CameraRoll } } - [ForeignInclude(Language.Java, "android.provider.MediaStore", "com.fuse.Activity", "android.content.Intent", "com.fusetools.camera.Image", "com.fusetools.camera.ImageStorageTools")] + [ForeignInclude(Language.Java, "android.provider.MediaStore", "com.fuse.Activity", "android.content.Intent", "com.fuse.camera.Image", "com.fuse.camera.ImageStorageTools")] extern (Android) class AddPicturePermissionCheckCommand { BoolPromiseCallback _callback; @@ -153,7 +153,7 @@ namespace Fuse.CameraRoll } - [ForeignInclude(Language.Java, "android.provider.MediaStore", "com.fuse.Activity", "android.content.Intent", "com.fusetools.camera.Image", "com.fusetools.camera.ImageStorageTools", "androidx.core.content.ContextCompat")] + [ForeignInclude(Language.Java, "android.provider.MediaStore", "com.fuse.Activity", "android.content.Intent", "com.fuse.camera.Image", "com.fuse.camera.ImageStorageTools", "androidx.core.content.ContextCompat")] extern (Android) class CheckPermissionsCommand { public CheckPermissionsCommand(Promise p) @@ -180,7 +180,7 @@ namespace Fuse.CameraRoll @} } - [ForeignInclude(Language.Java, "android.provider.MediaStore", "com.fuse.Activity", "android.content.Intent", "com.fusetools.camera.Image", "com.fusetools.camera.ImageStorageTools")] + [ForeignInclude(Language.Java, "android.provider.MediaStore", "com.fuse.Activity", "android.content.Intent", "com.fuse.camera.Image", "com.fuse.camera.ImageStorageTools")] extern (Android) class requestAndroidPermissions { PromiseCallback _callback; @@ -213,7 +213,7 @@ namespace Fuse.CameraRoll } - [ForeignInclude(Language.Java, "android.provider.MediaStore", "com.fuse.Activity", "android.content.Intent", "com.fusetools.camera.Image", "com.fusetools.camera.ImageStorageTools")] + [ForeignInclude(Language.Java, "android.provider.MediaStore", "com.fuse.Activity", "android.content.Intent", "com.fuse.camera.Image", "com.fuse.camera.ImageStorageTools")] extern (Android) static internal class AndroidCameraRoll { internal static void SelectPicture(Promise p) diff --git a/Source/Fuse.Controls.CameraView/Android/NativePhoto.uno b/Source/Fuse.Controls.CameraView/Android/NativePhoto.uno index d569788d5..f8c6fc21b 100644 --- a/Source/Fuse.Controls.CameraView/Android/NativePhoto.uno +++ b/Source/Fuse.Controls.CameraView/Android/NativePhoto.uno @@ -12,7 +12,7 @@ using Fuse.Resources.Exif; namespace Fuse.Controls.Android { [ForeignInclude(Language.Java, - "com.fusetools.camera.ImageStorageTools", + "com.fuse.camera.ImageStorageTools", "java.io.File", "java.io.FileOutputStream")] extern(ANDROID) class NativePhoto : Photo @@ -267,7 +267,7 @@ namespace Fuse.Controls.Android } [ForeignInclude(Language.Java, - "com.fusetools.camera.ImageStorageTools", + "com.fuse.camera.ImageStorageTools", "java.lang.Thread", "java.lang.Runnable", "android.graphics.Bitmap", diff --git a/Source/Fuse.Controls.WebView/Android/FuseWebChromeClient.java b/Source/Fuse.Controls.WebView/Android/FuseWebChromeClient.java index 0dad16bb5..257424273 100644 --- a/Source/Fuse.Controls.WebView/Android/FuseWebChromeClient.java +++ b/Source/Fuse.Controls.WebView/Android/FuseWebChromeClient.java @@ -1,4 +1,4 @@ -package com.fusetools.webview; +package com.fuse.webview; import android.webkit.WebView; import android.webkit.WebChromeClient; import android.webkit.ValueCallback; diff --git a/Source/Fuse.Controls.WebView/Android/FuseWebViewClient.java b/Source/Fuse.Controls.WebView/Android/FuseWebViewClient.java index 19f277e1e..c0fdba6ab 100644 --- a/Source/Fuse.Controls.WebView/Android/FuseWebViewClient.java +++ b/Source/Fuse.Controls.WebView/Android/FuseWebViewClient.java @@ -1,4 +1,4 @@ -package com.fusetools.webview; +package com.fuse.webview; import android.content.Intent; import android.net.Uri; import android.webkit.WebView; diff --git a/Source/Fuse.Controls.WebView/Android/JsInterface.java b/Source/Fuse.Controls.WebView/Android/JsInterface.java index 8fa6a7259..0bdf54068 100644 --- a/Source/Fuse.Controls.WebView/Android/JsInterface.java +++ b/Source/Fuse.Controls.WebView/Android/JsInterface.java @@ -1,4 +1,4 @@ -package com.fusetools.webview; +package com.fuse.webview; import com.foreign.Uno.Action_String; import android.webkit.JavascriptInterface; diff --git a/Source/Fuse.Controls.WebView/Android/ScrollableWebView.java b/Source/Fuse.Controls.WebView/Android/ScrollableWebView.java index 1125c1c5a..9602f844d 100644 --- a/Source/Fuse.Controls.WebView/Android/ScrollableWebView.java +++ b/Source/Fuse.Controls.WebView/Android/ScrollableWebView.java @@ -1,4 +1,4 @@ -package com.fusetools.webview; +package com.fuse.webview; import android.webkit.WebView; import android.content.Context; diff --git a/Source/Fuse.Controls.WebView/Android/WebViewForeign.uno b/Source/Fuse.Controls.WebView/Android/WebViewForeign.uno index ab4ec9372..8ab46e573 100644 --- a/Source/Fuse.Controls.WebView/Android/WebViewForeign.uno +++ b/Source/Fuse.Controls.WebView/Android/WebViewForeign.uno @@ -8,7 +8,7 @@ using Uno.Compiler.ExportTargetInterop; namespace Fuse.Android.Controls.WebViewUtils { - [ForeignInclude(Language.Java, "com.fusetools.webview.JsInterface", "com.fusetools.webview.FuseWebViewClient", "com.fusetools.webview.FuseWebChromeClient", "android.util.Log", "android.webkit.WebView", "com.fusetools.webview.ScrollableWebView")] + [ForeignInclude(Language.Java, "com.fuse.webview.JsInterface", "com.fuse.webview.FuseWebViewClient", "com.fuse.webview.FuseWebChromeClient", "android.util.Log", "android.webkit.WebView", "com.fuse.webview.ScrollableWebView")] public static class WebViewForeign { [Foreign(Language.Java)] diff --git a/Source/Fuse.Drawing.Surface/Android/GraphicsSurface.uno b/Source/Fuse.Drawing.Surface/Android/GraphicsSurface.uno index a5c65ddce..2ce2fed21 100644 --- a/Source/Fuse.Drawing.Surface/Android/GraphicsSurface.uno +++ b/Source/Fuse.Drawing.Surface/Android/GraphicsSurface.uno @@ -28,8 +28,8 @@ namespace Fuse.Drawing "android.graphics.PorterDuffXfermode", "android.graphics.Matrix", "android.graphics.PorterDuff.Mode", - "com.fusetools.drawing.surface.LinearGradientStore", - "com.fusetools.drawing.surface.GraphicsSurfaceContext" + "com.fuse.drawing.surface.LinearGradientStore", + "com.fuse.drawing.surface.GraphicsSurfaceContext" )] [ForeignInclude(Language.Java, "java.nio.ByteBuffer", diff --git a/Source/Fuse.Drawing.Surface/Android/GraphicsSurfaceContext.java b/Source/Fuse.Drawing.Surface/Android/GraphicsSurfaceContext.java index fa2c8b9bd..2e42a9da0 100644 --- a/Source/Fuse.Drawing.Surface/Android/GraphicsSurfaceContext.java +++ b/Source/Fuse.Drawing.Surface/Android/GraphicsSurfaceContext.java @@ -1,4 +1,4 @@ -package com.fusetools.drawing.surface; +package com.fuse.drawing.surface; import android.graphics.Canvas; import android.graphics.Bitmap; diff --git a/Source/Fuse.Drawing.Surface/Android/LinearGradientStore.java b/Source/Fuse.Drawing.Surface/Android/LinearGradientStore.java index 9d53d7e5b..f66ae512b 100644 --- a/Source/Fuse.Drawing.Surface/Android/LinearGradientStore.java +++ b/Source/Fuse.Drawing.Surface/Android/LinearGradientStore.java @@ -1,4 +1,4 @@ -package com.fusetools.drawing.surface; +package com.fuse.drawing.surface; // since we need to provide the linear gradient with // different stops based on the rotation of the phone diff --git a/Source/Fuse.Drawing.Surface/Android/NativeSurface.uno b/Source/Fuse.Drawing.Surface/Android/NativeSurface.uno index dd15f93ec..2d8f460b4 100644 --- a/Source/Fuse.Drawing.Surface/Android/NativeSurface.uno +++ b/Source/Fuse.Drawing.Surface/Android/NativeSurface.uno @@ -28,8 +28,8 @@ namespace Fuse.Drawing "android.graphics.PorterDuffXfermode", "android.graphics.Matrix", "android.graphics.PorterDuff.Mode", - "com.fusetools.drawing.surface.LinearGradientStore", - "com.fusetools.drawing.surface.GraphicsSurfaceContext", + "com.fuse.drawing.surface.LinearGradientStore", + "com.fuse.drawing.surface.GraphicsSurfaceContext", )] [ForeignInclude(Language.Java, "java.nio.ByteBuffer", diff --git a/Source/Fuse.Drawing.Surface/Android/Surface.uno b/Source/Fuse.Drawing.Surface/Android/Surface.uno index b054a7e43..3ad0fb0c2 100644 --- a/Source/Fuse.Drawing.Surface/Android/Surface.uno +++ b/Source/Fuse.Drawing.Surface/Android/Surface.uno @@ -35,8 +35,8 @@ namespace Fuse.Drawing "android.graphics.PorterDuffXfermode", "android.graphics.Matrix", "android.graphics.PorterDuff.Mode", - "com.fusetools.drawing.surface.LinearGradientStore", - "com.fusetools.drawing.surface.GraphicsSurfaceContext" + "com.fuse.drawing.surface.LinearGradientStore", + "com.fuse.drawing.surface.GraphicsSurfaceContext" )] [ForeignInclude(Language.Java, "java.nio.ByteBuffer", diff --git a/Source/Fuse.ImageTools/Android/AndroidImageUtils.uno b/Source/Fuse.ImageTools/Android/AndroidImageUtils.uno index fee4fcccd..6de16874d 100644 --- a/Source/Fuse.ImageTools/Android/AndroidImageUtils.uno +++ b/Source/Fuse.ImageTools/Android/AndroidImageUtils.uno @@ -4,7 +4,7 @@ using Uno.Compiler.ExportTargetInterop; using Android; namespace Fuse.ImageTools { - [ForeignInclude(Language.Java, "java.lang.Thread", "java.lang.Runnable", "android.util.Log", "android.provider.MediaStore", "com.fuse.Activity", "com.fusetools.camera.Image", "com.fusetools.camera.ImageUtils", "android.content.Intent")] + [ForeignInclude(Language.Java, "java.lang.Thread", "java.lang.Runnable", "android.util.Log", "android.provider.MediaStore", "com.fuse.Activity", "com.fuse.camera.Image", "com.fuse.camera.ImageUtils", "android.content.Intent")] extern (Android) static internal class AndroidImageUtils { diff --git a/Source/Fuse.ImageTools/Android/Image.java b/Source/Fuse.ImageTools/Android/Image.java index 59780e12b..d40574df3 100644 --- a/Source/Fuse.ImageTools/Android/Image.java +++ b/Source/Fuse.ImageTools/Android/Image.java @@ -1,4 +1,4 @@ -package com.fusetools.camera; +package com.fuse.camera; import android.app.Activity; import android.content.Intent; diff --git a/Source/Fuse.ImageTools/Android/ImageStorageTools.java b/Source/Fuse.ImageTools/Android/ImageStorageTools.java index 2780ad920..7427181b9 100644 --- a/Source/Fuse.ImageTools/Android/ImageStorageTools.java +++ b/Source/Fuse.ImageTools/Android/ImageStorageTools.java @@ -1,4 +1,4 @@ -package com.fusetools.camera; +package com.fuse.camera; import android.app.Activity; import android.content.ContentResolver; diff --git a/Source/Fuse.ImageTools/Android/ImageUtils.java b/Source/Fuse.ImageTools/Android/ImageUtils.java index 7e8fd8b0d..e3ddd76bd 100644 --- a/Source/Fuse.ImageTools/Android/ImageUtils.java +++ b/Source/Fuse.ImageTools/Android/ImageUtils.java @@ -1,4 +1,4 @@ -package com.fusetools.camera; +package com.fuse.camera; import android.app.Activity; import android.content.Intent; diff --git a/Source/Fuse.Maps/Android/ForeignHelpers.uno b/Source/Fuse.Maps/Android/ForeignHelpers.uno index 269eb613b..215d01198 100644 --- a/Source/Fuse.Maps/Android/ForeignHelpers.uno +++ b/Source/Fuse.Maps/Android/ForeignHelpers.uno @@ -6,7 +6,7 @@ using Uno.Compiler.ExportTargetInterop; namespace Fuse.Maps.Android { - [ForeignInclude(Language.Java, "com.fusetools.maps.FuseMap", "android.util.Log", "android.graphics.Color")] + [ForeignInclude(Language.Java, "com.fuse.maps.FuseMap", "android.util.Log", "android.graphics.Color")] extern (Android) static class ForeignHelpers { [Foreign(Language.Java)] diff --git a/Source/Fuse.Maps/Android/FuseMap.java b/Source/Fuse.Maps/Android/FuseMap.java index 5dad043a4..68c19d0c8 100644 --- a/Source/Fuse.Maps/Android/FuseMap.java +++ b/Source/Fuse.Maps/Android/FuseMap.java @@ -1,4 +1,4 @@ -package com.fusetools.maps; +package com.fuse.maps; import android.content.Context; import android.os.Bundle; import android.view.MotionEvent; From d7e90cb457a10482f33b7783d3887887df677295 Mon Sep 17 00:00:00 2001 From: Morten Daniel Fornes Date: Thu, 21 Nov 2019 17:44:32 +0700 Subject: [PATCH 2/2] Android: rename Java package to com.fuse.android.graphics This renames the fuse.android.graphics package to match better with other Java-code in the repo. The package is an internal Java package that is unlikely to be used directly by external code, and because we are working on 2.0 it is nice to clean-up our public API a little. --- Source/Fuse.Common/Internal/AndroidSystemFont.uno | 2 +- Source/Fuse.Common/Internal/FontListParser.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Fuse.Common/Internal/AndroidSystemFont.uno b/Source/Fuse.Common/Internal/AndroidSystemFont.uno index 149cdd8e2..7390b0f6d 100644 --- a/Source/Fuse.Common/Internal/AndroidSystemFont.uno +++ b/Source/Fuse.Common/Internal/AndroidSystemFont.uno @@ -7,7 +7,7 @@ using Uno; namespace Fuse.Internal { - [ForeignInclude(Language.Java, "fuse.android.graphics.FontListParser")] + [ForeignInclude(Language.Java, "com.fuse.android.graphics.FontListParser")] extern(Android) static class AndroidSystemFont { struct Family diff --git a/Source/Fuse.Common/Internal/FontListParser.java b/Source/Fuse.Common/Internal/FontListParser.java index e60642795..13303df87 100644 --- a/Source/Fuse.Common/Internal/FontListParser.java +++ b/Source/Fuse.Common/Internal/FontListParser.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package fuse.android.graphics; +package com.fuse.android.graphics; import android.util.Xml;