From 28d9de269c777e766b1626e6bb65745ecfda86de Mon Sep 17 00:00:00 2001 From: Rebecca Silberstein Date: Tue, 24 Jan 2017 10:42:59 -0800 Subject: [PATCH] wifi.proto: add SoftApReturnCode enum SoftAp startup returns a failure mode if it does not start. This additional information is useful in determining where we need to add logging and retry logic to make SoftAp mode more reliable. The combination of Failure + failure reason is mapped to an enum defined for wifi metrics. Bug: 30899122 Test: checked WifiMetricsProto.java for the enum Test: frameworks/base/wifi/tests/runtests.sh Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh Change-Id: I944e3e249d3be5738352b26a1d12139fdd50bf80 --- proto/src/wifi.proto | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/proto/src/wifi.proto b/proto/src/wifi.proto index bfb7041976370..9aa6490fe7c06 100644 --- a/proto/src/wifi.proto +++ b/proto/src/wifi.proto @@ -435,9 +435,28 @@ message SoftApDurationBucket { // Number of occurrences of a soft AP session return code message SoftApReturnCodeCount { - // Return code of the soft AP session - optional int32 return_code = 1; + + enum SoftApStartResult { + + // SoftApManager return code unknown + SOFT_AP_RETURN_CODE_UNKNOWN = 0; + + // SoftAp started successfully + SOFT_AP_STARTED_SUCCESSFULLY = 1; + + // Catch all for failures with no specific failure reason + SOFT_AP_FAILED_GENERAL_ERROR = 2; + + // SoftAp failed to start due to NO_CHANNEL error + SOFT_AP_FAILED_NO_CHANNEL = 3; + } + + // Historical, no longer used for writing as of 01/2017. + optional int32 return_code = 1 [deprecated = true]; // Occurences of this soft AP return code optional int32 count = 2; + + // Result of attempt to start SoftAp + optional SoftApStartResult start_result = 3; }