14 static const bool lowLatencyIsSupported = []() {
16 QJniObject ctx(QNativeInterface::QAndroidApplication::context());
20 QJniObject pm = ctx.callObjectMethod(
"getPackageManager",
21 "()Landroid/content/pm/PackageManager;");
25 QJniObject audioFeatureField =
26 QJniObject::getStaticObjectField(
"android/content/pm/PackageManager",
27 "FEATURE_AUDIO_LOW_LATENCY",
28 "Ljava/lang/String;");
29 if (!audioFeatureField.isValid())
32 bool hasFeature = pm.callMethod<jboolean>(
"hasSystemFeature",
33 "(Ljava/lang/String;)Z",
34 audioFeatureField.object());
39 return lowLatencyIsSupported;