mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Merge "p2p: support find a specific channel"
This commit is contained in:
@@ -93,4 +93,6 @@ interface ISupplicantP2pIface {
|
||||
String startWpsPinDisplay(in String groupIfName, in byte[] bssid);
|
||||
void startWpsPinKeypad(in String groupIfName, in String pin);
|
||||
void stopFind();
|
||||
void findOnSocialChannels(in int timeoutInSec);
|
||||
void findOnSpecificFrequency(in int freqInHz, in int timeoutInSec);
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ interface ISupplicantP2pIface {
|
||||
* Initiate a P2P service discovery with an optional timeout.
|
||||
*
|
||||
* @param timeoutInSec Max time to be spent is performing discovery.
|
||||
* Set to 0 to indefinely continue discovery until an explicit
|
||||
* Set to 0 to indefinitely continue discovery until an explicit
|
||||
* |stopFind| is sent.
|
||||
* @throws ServiceSpecificException with one of the following values:
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
@@ -778,4 +778,36 @@ interface ISupplicantP2pIface {
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_DISABLED|
|
||||
*/
|
||||
void stopFind();
|
||||
|
||||
/**
|
||||
* Initiate a P2P device discovery only on social channels.
|
||||
*
|
||||
* Full P2P discovery is performed through |ISupplicantP2pIface.find| method.
|
||||
*
|
||||
* @param timeoutInSec The maximum amount of time that should be spent in performing device
|
||||
* discovery.
|
||||
* Set to 0 to indefinitely continue discovery until an explicit
|
||||
* |stopFind| is sent.
|
||||
* @throws ServiceSpecificException with one of the following values:
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_DISABLED|
|
||||
*/
|
||||
void findOnSocialChannels(in int timeoutInSec);
|
||||
|
||||
/**
|
||||
* Initiate a P2P device discovery on a specific frequency.
|
||||
*
|
||||
* Full P2P discovery is performed through |ISupplicantP2pIface.find| method.
|
||||
*
|
||||
* @param freqInHz the frequency to be scanned.
|
||||
* @param timeoutInSec Max time to be spent is performing discovery.
|
||||
* Set to 0 to indefinitely continue discovery until an explicit
|
||||
* |stopFind| is sent.
|
||||
* @throws ServiceSpecificException with one of the following values:
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_DISABLED|
|
||||
*/
|
||||
void findOnSpecificFrequency(in int freqInHz, in int timeoutInSec);
|
||||
}
|
||||
|
||||
@@ -480,6 +480,20 @@ TEST_P(SupplicantP2pIfaceAidlTest, Find) {
|
||||
EXPECT_TRUE(p2p_iface_->find(kTestFindTimeout).isOk());
|
||||
}
|
||||
|
||||
/*
|
||||
* FindSocialChannelsOnly
|
||||
*/
|
||||
TEST_P(SupplicantP2pIfaceAidlTest, FindSocialChannelsOnly) {
|
||||
EXPECT_TRUE(p2p_iface_->findOnSocialChannels(kTestFindTimeout).isOk());
|
||||
}
|
||||
|
||||
/*
|
||||
* FindSpecificFrequency
|
||||
*/
|
||||
TEST_P(SupplicantP2pIfaceAidlTest, FindSpecificFrequency) {
|
||||
EXPECT_TRUE(p2p_iface_->findOnSpecificFrequency(2412, kTestFindTimeout).isOk());
|
||||
}
|
||||
|
||||
/*
|
||||
* StopFind
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user