Add suspendable option in NanDiscoveryCommonConfig

Test: m
Bug: 263014869
Change-Id: I0bef43f361a3773ff3e589d44afe4595ddd4e21f
This commit is contained in:
Biswarup Pal 2023-01-09 14:10:51 +00:00
parent 65ea0b9345
commit 11921783d5
3 changed files with 10 additions and 0 deletions

View file

@ -54,4 +54,5 @@ parcelable NanDiscoveryCommonConfig {
android.hardware.wifi.NanRangingIndication configRangingIndications;
char distanceIngressCm;
char distanceEgressCm;
boolean enableSessionSuspendability;
}

View file

@ -155,4 +155,10 @@ parcelable NanDiscoveryCommonConfig {
*/
char distanceIngressCm;
char distanceEgressCm;
/**
* Specifies whether suspension can be possible in this discovery session.
* The request would fail if |enableSessionSuspendability| is true but
* |NanCapabilities.supportsSuspension| is false.
*/
boolean enableSessionSuspendability;
}

View file

@ -1850,6 +1850,7 @@ bool convertAidlNanPublishRequestToLegacy(const NanPublishRequest& aidl_request,
LOG(ERROR) << "convertAidlNanPublishRequestToLegacy: invalid pairing config";
return false;
}
legacy_request->enable_suspendability = aidl_request.baseConfigs.enableSessionSuspendability;
return true;
}
@ -1996,6 +1997,8 @@ bool convertAidlNanSubscribeRequestToLegacy(const NanSubscribeRequest& aidl_requ
LOG(ERROR) << "convertAidlNanSubscribeRequestToLegacy: invalid pairing config";
return false;
}
legacy_request->enable_suspendability = aidl_request.baseConfigs.enableSessionSuspendability;
return true;
}