Skip to content
  • Nicolas Fella's avatar
    Initial check for invalid JNI method signatures · 579779bd
    Nicolas Fella authored
    Summary:
    When using QAndroidJniObject to call Android API one needs to specify method signatures using strings. This is error-prone and errors are usually only detected at runtime.
    This check searches for a set of known methods that take such signatures and validates them using a regular expression. If a signature is invalid a warning is emitted.
    
    To be able to verify Android-specific code with a desktop clang we need some include path hackery. QAndroidJniObject required jni.h, which is shipped in the Android NDK. We therefore need to amend the include paths. In order to do that we rely on $ANDROID_NDK being set and print an error if not.
    
    Test Plan: Ran tests
    
    Reviewers: smartins
    
    Reviewed By: smartins
    
    Differential Revision: https://phabricator.kde.org/D28887
    579779bd