From 457a1c973d68e705f9cf72ac72b19fc26cdb2917 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Tue, 11 Jun 2024 16:50:40 +0200 Subject: JNI: pre-declare JNI classes for standard Java types This avoids that we or users have to declare e.g. String or Uri in several places in Qt. This also prevents problems where multiple declarations (possibly from different headers) cause build errors. As a drive-by, remove some unnecessary type declarations (e.g. UriType, which had the same class string as Uri). To ease the submodule update process, define a preprocessor symbol that submodules can use to conditionally declare the type locally. Once the dependency update is through, the symbol can be removed and submodules can use the declaration from qjnitypes.h. Pick-to: 6.8 Change-Id: I7d96edf644a54246302b5c5cb478e66fa615e73e Reviewed-by: Assam Boudjelthia --- src/plugins/platforms/android/qandroidplatformiconengine.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/plugins/platforms/android/qandroidplatformiconengine.cpp') diff --git a/src/plugins/platforms/android/qandroidplatformiconengine.cpp b/src/plugins/platforms/android/qandroidplatformiconengine.cpp index faa63dcca13..a88696886dd 100644 --- a/src/plugins/platforms/android/qandroidplatformiconengine.cpp +++ b/src/plugins/platforms/android/qandroidplatformiconengine.cpp @@ -28,12 +28,9 @@ Q_DECLARE_JNI_CLASS(FontInfo, "androidx/core/provider/FontsContractCompat$FontIn // various utility types Q_DECLARE_JNI_CLASS(List, "java/util/List"); // List is just an Interface -Q_DECLARE_JNI_CLASS(ArrayList, "java/util/ArrayList"); Q_DECLARE_JNI_CLASS(HashSet, "java/util/HashSet"); -Q_DECLARE_JNI_CLASS(Uri, "android/net/Uri") Q_DECLARE_JNI_CLASS(CancellationSignal, "android/os/CancellationSignal") Q_DECLARE_JNI_CLASS(ParcelFileDescriptor, "android/os/ParcelFileDescriptor") -Q_DECLARE_JNI_CLASS(ContentResolver, "android/content/ContentResolver") Q_DECLARE_JNI_CLASS(PackageManager, "android/content/pm/PackageManager") Q_DECLARE_JNI_CLASS(ProviderInfo, "android/content/pm/ProviderInfo") Q_DECLARE_JNI_CLASS(PackageInfo, "android/content/pm/PackageInfo") -- cgit v1.2.3