Skip to content

Commit

Permalink
[voicecall] Enable voicecall record if feature is available and allow…
Browse files Browse the repository at this point in the history
…ed. JB#38419

Voicecall record feature may exist but it is usable only if the feature
is allowed as well.
  • Loading branch information
jusa committed Apr 27, 2017
1 parent 9541332 commit b0f4ccf
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions plugins/declarative/src/voicecallaudiorecorder.cpp
Expand Up @@ -71,8 +71,8 @@ QDBusMessage createVoicecallFeaturesMessage(void)
struct ManagerFeature
{
QString name;
unsigned unused1;
unsigned unused2;
unsigned allowed;
unsigned unused;
};
typedef QList<ManagerFeature> ManagerFeatureList;

Expand All @@ -83,8 +83,8 @@ QDBusArgument &operator<<(QDBusArgument &arg, const ManagerFeature &feature)
{
arg.beginStructure();
arg << feature.name;
arg << feature.unused1;
arg << feature.unused2;
arg << feature.allowed;
arg << feature.unused;
arg.endStructure();
return arg;
}
Expand All @@ -93,8 +93,8 @@ const QDBusArgument &operator>>(const QDBusArgument &arg, ManagerFeature &featur
{
arg.beginStructure();
arg >> feature.name;
arg >> feature.unused1;
arg >> feature.unused2;
arg >> feature.allowed;
arg >> feature.unused;
arg.endStructure();
return arg;
}
Expand Down Expand Up @@ -188,7 +188,8 @@ void VoiceCallAudioRecorder::featuresCallFinished(QDBusPendingCallWatcher *watch
} else {
const ManagerFeatureList features = reply.argumentAt<4>();
foreach (const ManagerFeature &feature, features) {
if (feature.name == QStringLiteral("voicecallrecord")) {
if (feature.name == QStringLiteral("voicecallrecord") &&
feature.allowed == 1) {
featureAvailable = true;
emit availableChanged();
break;
Expand Down

0 comments on commit b0f4ccf

Please sign in to comment.