Make Qt for Android compile without permissions -feature
The permissions were partially behind 'future' feature flag. Instead put permission code behind the actual 'permissions' feature flag, and require 'future' feature if permissions are enabled. Fixes: QTBUG-135617 Pick-to: 6.9 6.8 Change-Id: I573cca6a56c19bfc32a3f1df72a009cbe05ad2fb Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
parent
637a2a2983
commit
965af8548c
@ -349,8 +349,10 @@ jint QtAndroidPrivate::initJNI(JavaVM *vm, JNIEnv *env)
|
||||
return JNI_ERR;
|
||||
}
|
||||
|
||||
#if QT_CONFIG(permissions)
|
||||
if (!registerPermissionNatives(qJniEnv))
|
||||
return JNI_ERR;
|
||||
#endif
|
||||
|
||||
if (!registerNativeInterfaceNatives(qJniEnv))
|
||||
return JNI_ERR;
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <QtCore/qtimer.h>
|
||||
#include <QtCore/qset.h>
|
||||
|
||||
#if QT_CONFIG(future)
|
||||
#if QT_CONFIG(permissions)
|
||||
#include <QtCore/qpromise.h>
|
||||
#endif
|
||||
|
||||
@ -1029,6 +1029,7 @@ void QAndroidActivityCallbackResultReceiver::registerCallback(
|
||||
callbackMap.insert(receiverRequestCode, callbackFunc);
|
||||
}
|
||||
|
||||
#if QT_CONFIG(permissions)
|
||||
// Permissions API
|
||||
|
||||
QtAndroidPrivate::PermissionResult resultFromAndroid(jint value)
|
||||
@ -1192,6 +1193,8 @@ bool QtAndroidPrivate::registerPermissionNatives(QJniEnvironment &env)
|
||||
});
|
||||
}
|
||||
|
||||
#endif // QT_CONFIG(permissions)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qandroidextras_p.cpp"
|
||||
|
@ -226,7 +226,8 @@ namespace QtAndroidPrivate
|
||||
const QAndroidServiceConnection &serviceConnection,
|
||||
BindFlags flags = BindFlag::None);
|
||||
|
||||
#if QT_CONFIG(future)
|
||||
#if QT_CONFIG(permissions)
|
||||
QT_REQUIRE_CONFIG(future);
|
||||
enum PermissionResult {
|
||||
Undetermined,
|
||||
Authorized,
|
||||
|
Loading…
x
Reference in New Issue
Block a user