Android: fix null array when requesting available providers
When requesting available positioning providers, the Java side can
return new int[0];
in some cases. This is a perfectly valid way to return a zero-length
array in Java.
However, according to the linked bugreport, some JNI implementations
seem to convert it into nullptr, which later causes a crash when
passing a nullptr to GetIntArrayElements() JNI method.
Guard against it by explicitly checking that the array received from
the Java side is not nullptr.
Fixes: QTBUG-116645
Pick-to: 6.6 6.5 6.2
Change-Id: I657570ec5b0c62b994ed7d56c8142ab8992339b7
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>