aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-06-18 23:07:03 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-06-18 23:07:03 +0000
commit1541dbabf8a0607b4d93f22b11061b6b415c2846 (patch)
tree65f93830bb2a0addbb7046b6ae4cd97b45bfc88c
parentd14bb79c0e7cb612aeec24e179382242c228abd8 (diff)
parent327761a598ac9b6da20451f15d7ad6723ae1139a (diff)
downloadpdfium-sdk-release.tar.gz
Snap for 11987826 from 327761a598ac9b6da20451f15d7ad6723ae1139a to sdk-releasesdk-release
Change-Id: I69fa08fc0d41293224d512fd042a542e31177f4f
-rw-r--r--Android.bp20
-rw-r--r--core/fxcrt/fx_extension.h21
-rw-r--r--public/cpp/fpdf_deleters.h18
-rw-r--r--public/cpp/fpdf_scopers.h2
-rw-r--r--public/fpdfview.h2
-rw-r--r--third_party/Android.bp7
6 files changed, 52 insertions, 18 deletions
diff --git a/Android.bp b/Android.bp
index 85f449bf8..e79803be2 100644
--- a/Android.bp
+++ b/Android.bp
@@ -92,17 +92,36 @@ cc_defaults {
"**/*_unittest.cpp",
"**/*_embeddertest.cpp",
],
+ sdk_version: "current",
+ min_sdk_version: "apex_inherit",
+ apex_available: [
+ "com.android.mediaprovider",
+ "//apex_available:platform"
+ ],
+ stl: "c++_static",
}
cc_library_headers {
name: "pdfium-headers",
export_include_dirs: ["."],
+ sdk_version: "current",
+ min_sdk_version: "apex_inherit",
+ apex_available: [
+ "com.android.mediaprovider",
+ "//apex_available:platform"
+ ],
}
cc_library_headers {
name: "pdfium-third-party-headers",
export_include_dirs: ["third_party"],
+ sdk_version: "current",
+ min_sdk_version: "apex_inherit",
+ apex_available: [
+ "com.android.mediaprovider",
+ "//apex_available:platform"
+ ],
}
cc_library_shared {
@@ -153,7 +172,6 @@ cc_library_shared {
],
export_include_dirs: ["public"],
-
}
subdirs = ["third_party"]
diff --git a/core/fxcrt/fx_extension.h b/core/fxcrt/fx_extension.h
index ae9447983..dde65a615 100644
--- a/core/fxcrt/fx_extension.h
+++ b/core/fxcrt/fx_extension.h
@@ -29,19 +29,23 @@ wchar_t* FXSYS_wcsncpy(wchar_t* dstStr, const wchar_t* srcStr, size_t count);
int32_t FXSYS_wcsnicmp(const wchar_t* s1, const wchar_t* s2, size_t count);
inline bool FXSYS_iswlower(int32_t c) {
- return u_islower(c);
+ if (__builtin_available(android 31, *)) return u_islower(c);
+ else return iswlower(c);
}
inline bool FXSYS_iswupper(int32_t c) {
- return u_isupper(c);
+ if (__builtin_available(android 31, *)) return u_isupper(c);
+ else return iswupper(c);
}
inline int32_t FXSYS_towlower(wchar_t c) {
- return u_tolower(c);
+ if (__builtin_available(android 31, *)) return u_tolower(c);
+ else return towlower(c);
}
inline int32_t FXSYS_towupper(wchar_t c) {
- return u_toupper(c);
+ if (__builtin_available(android 31, *)) return u_toupper(c);
+ else return towupper(c);
}
inline bool FXSYS_IsLowerASCII(int32_t c) {
@@ -57,15 +61,18 @@ inline char FXSYS_ToUpperASCII(char c) {
}
inline bool FXSYS_iswalpha(wchar_t c) {
- return u_isalpha(c);
+ if (__builtin_available(android 31, *)) return u_isalpha(c);
+ else return iswalpha(c);
}
inline bool FXSYS_iswalnum(wchar_t c) {
- return u_isalnum(c);
+ if (__builtin_available(android 31, *)) return u_isalnum(c);
+ else return iswalnum(c);
}
inline bool FXSYS_iswspace(wchar_t c) {
- return u_isspace(c);
+ if (__builtin_available(android 31, *)) return u_isspace(c);
+ else return iswspace(c);
}
inline bool FXSYS_IsOctalDigit(char c) {
diff --git a/public/cpp/fpdf_deleters.h b/public/cpp/fpdf_deleters.h
index d58f8d593..55b85d9ed 100644
--- a/public/cpp/fpdf_deleters.h
+++ b/public/cpp/fpdf_deleters.h
@@ -5,15 +5,15 @@
#ifndef PUBLIC_CPP_FPDF_DELETERS_H_
#define PUBLIC_CPP_FPDF_DELETERS_H_
-#include "public/fpdf_annot.h"
-#include "public/fpdf_dataavail.h"
-#include "public/fpdf_edit.h"
-#include "public/fpdf_formfill.h"
-#include "public/fpdf_javascript.h"
-#include "public/fpdf_structtree.h"
-#include "public/fpdf_text.h"
-#include "public/fpdf_transformpage.h"
-#include "public/fpdfview.h"
+#include "../fpdf_annot.h"
+#include "../fpdf_dataavail.h"
+#include "../fpdf_edit.h"
+#include "../fpdf_formfill.h"
+#include "../fpdf_javascript.h"
+#include "../fpdf_structtree.h"
+#include "../fpdf_text.h"
+#include "../fpdf_transformpage.h"
+#include "../fpdfview.h"
// Custom deleters for using FPDF_* types with std::unique_ptr<>.
diff --git a/public/cpp/fpdf_scopers.h b/public/cpp/fpdf_scopers.h
index fd9ce6997..34cf9c46a 100644
--- a/public/cpp/fpdf_scopers.h
+++ b/public/cpp/fpdf_scopers.h
@@ -8,7 +8,7 @@
#include <memory>
#include <type_traits>
-#include "public/cpp/fpdf_deleters.h"
+#include "fpdf_deleters.h"
// Versions of FPDF types that clean up the object at scope exit.
diff --git a/public/fpdfview.h b/public/fpdfview.h
index 0c901a753..3cf65d5e0 100644
--- a/public/fpdfview.h
+++ b/public/fpdfview.h
@@ -22,6 +22,8 @@
#include <stddef.h>
+typedef __SIZE_TYPE__ size_t;
+
#if defined(_WIN32) && !defined(__WINDOWS__)
#include <windows.h>
#endif
diff --git a/third_party/Android.bp b/third_party/Android.bp
index 083ed4ef6..98e176943 100644
--- a/third_party/Android.bp
+++ b/third_party/Android.bp
@@ -19,6 +19,13 @@ cc_defaults {
"pdfium-common"
],
visibility: ["//external/pdfium:__subpackages__"],
+ sdk_version: "current",
+ min_sdk_version: "apex_inherit",
+ apex_available: [
+ "com.android.mediaprovider",
+ "//apex_available:platform"
+ ],
+ stl: "c++_static",
}
cc_library_static {