diff options
author | Arne Schwabe <arne@rfc2549.org> | 2024-07-23 14:18:13 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2024-07-23 15:02:45 +0200 |
commit | 879ed38be52fbc1d7079ced9c31756c7635a1fa1 (patch) | |
tree | 6f828931a371cf8846b36217aeec117542dd6479 | |
parent | 5bdac9a6be1716738bd90816247fd52672a16568 (diff) |
Small coverity fixes
-rw-r--r-- | main/build.gradle.kts | 1 | ||||
-rw-r--r-- | main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java | 2 | ||||
-rwxr-xr-x | runcoverity.sh | 3 |
3 files changed, 3 insertions, 3 deletions
diff --git a/main/build.gradle.kts b/main/build.gradle.kts index 94f0af41..984f075f 100644 --- a/main/build.gradle.kts +++ b/main/build.gradle.kts @@ -12,7 +12,6 @@ plugins { } android { - buildToolsVersion = "33.0.1" buildFeatures { aidl = true } diff --git a/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java b/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java index 6f20d414..a1411b5e 100644 --- a/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java +++ b/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java @@ -309,7 +309,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac nbuilder.setOngoing(true); nbuilder.setSmallIcon(icon); - if (status == LEVEL_WAITING_FOR_USER_INPUT) { + if (status == LEVEL_WAITING_FOR_USER_INPUT && intent != null) { PendingIntent pIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_IMMUTABLE); nbuilder.setContentIntent(pIntent); } else { diff --git a/runcoverity.sh b/runcoverity.sh index 988b5cda..eba44a7e 100755 --- a/runcoverity.sh +++ b/runcoverity.sh @@ -12,7 +12,8 @@ cov-configure --config .coverity/cfg.xml --kotlin cov-configure --config .coverity/cfg.xml --java ./gradlew -b build.gradle.kts --no-daemon clean -cov-build --dir .coverity/idir --config .coverity/cfg.xml ./gradlew -b build.gradle.kts --no-daemon assembleUiOvpn23Release +# Coverity needs the --fs-capture-search for Kotlin according to https://community.synopsys.com/s/article/How-to-analyze-Kotlin-project +cov-build --fs-capture-search main/src --dir .coverity/idir --config .coverity/cfg.xml ./gradlew -b build.gradle.kts --no-daemon assembleUiOvpn23Release NDK_VER=${NDK_VER:-26.1.10909125} cov-analyze --dir .coverity/idir --all --strip-path ${PWD}/main/src/main/cpp --strip-path ${PWD}/main/src --strip-path ${PWD} --strip-path ${ANDROID_HOME}/ndk/${NDK_VER}/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/ --strip-path ${ANDROID_HOME}/ndk/${NDK_VER}/toolchains/llvm/prebuilt/linux-x86_64/sysroot |