summaryrefslogtreecommitdiff
path: root/Source/Android/jni/AndroidCommon/AndroidCommon.cpp
AgeCommit message (Collapse)Author
2024-10-17Simplify `std::remove` with `std::erase`mitaclaw
`std::erase` is a replacement for the remove-erase idiom. Changes to `OpenModeToAndroid` inadvertently revealed that the prior implementation had UB (potentially deleting the end iterator). This is now fixed.
2023-03-18Android: Translate C++ "w" to ParcelFileDescriptor "wt"JosJuice
Previously we were translating "w" to "w", which unlike in C++ doesn't truncate. See https://issuetracker.google.com/issues/180526528, and for reference, https://en.cppreference.com/w/cpp/io/c/fopen and https://en.cppreference.com/w/cpp/io/basic_filebuf/open. This issue was brought to my attention by the recently published issue CVE-2023-21036 in the screenshot editing tool on Pixel phones. I'm not aware of any code in Dolphin that actually uses "w" with an existing file on Android (when we ask the user for a location to save to using SAF, a new file is always created), but still, best to fix this.
2023-01-30AndroidCommon: Make use of std::string_view where applicableLioncash
Several of these can take a string_view rather than needing to specifically use std::string.
2023-01-24Common: Replace StringBeginsWith/StringEndsWith with std equivalentsLioncash
Obsoletes these functions in favor of the standard member functions added in C++20.
2022-12-27Android: Add VectorToJObjectArray utility functionJosJuice
2022-12-27Android: Make more meticulous use of DeleteLocalRefJosJuice
If we're in a function that isn't just going to immediately return to Java, leaking local references can lead to problems eventually.
2021-10-13Android: Improve OpenModeToAndroid's handling of 'b'JosJuice
Now it also works when b isn't at the very end. (+ goes after b.)
2021-07-05treewide: convert GPLv2+ license info to SPDX tagsPierre Bourdon
SPDX standardizes how source code conveys its copyright and licensing information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX tags are adopted in many large projects, including things like the Linux kernel.
2021-05-24Android: Use DeleteLocalRef more in AndroidCommonJosJuice
Any local references get cleaned up when returning to the JVM, but some of the functions in AndroidCommon return to C++ rather than the JVM, and functions with loops risk running into the limit of how many simultaneous local references are allowed.
2021-05-20Android: Use JNI for getting post-processsing shadersJosJuice
The Java implementation of getting the list of post-processing shaders only looked in the Sys folder and not the User folder. This could be fixed in the Java implementation, but it's simpler to just call the C++ implementation instead.
2020-12-28Android: Add specialized content provider implementation of DoFileSearchJosJuice
2020-12-28Android: Show a message when adding a folder with no gamesJosJuice
To catch people who try to use unsupported formats.
2020-12-20Android: Add content provider support to File::ScanDirectoryTreeJosJuice
2020-12-20Android: Fix opening games with extensionless URIJosJuice
2020-12-20Android: Add content provider support to File::FileInfoJosJuice
2020-12-20Android: Add content provider support to File::OpenFStreamJosJuice
2020-12-10Merge pull request #9221 from JosJuice/android-saf-sd-cardJMC47
Android: Use storage access framework for custom SD card paths
2020-11-27IP/Top: Add Android network interfaceSepalani
2020-11-06Android: Make the handling of SAF open modes more robustJosJuice
2020-09-16Android: Add content provider support to File::DeleteJosJuice
2020-09-16Android: Add content provider support to File::IOFileJosJuice
Taking the hit now to prepare us for when Google Play will force us to use scoped storage...
2020-07-08Android: Use correct encoding when converting stringsJosJuice
The functions with "UTF" in the name use "modified UTF-8" rather than the standard UTF-8 which Dolphin uses, at least according to Oracle's documentation, so it is incorrect for us to use them. This change fixes the problem by converting between UTF-8 and UTF-16 manually instead of letting JNI do it for us.
2020-07-06Android: Convert some files to LFJosJuice
I wonder why lint didn't catch this...
2019-01-04Add Android support for automatic disc changingJosJuice
2018-06-06Use UICommon's game list code on AndroidJosJuice
Deduplicates code, and gets rid of some problems the old code had (such as: bad performance when calling native functions, only one disc showing up for multi-disc games, Wii banners being low-res, unnecessarily much effort being needed for adding more metadata).