Don't complain when finding no tether stats.
TetherController::addForwardChainStats returns an error if it doesn't find any tethering stats. This was fine when we were still using CommandListener, which would not attempt to fetch the stats if tethering was not enabled. Instead of returning an error when no stats are found, return an error only if the output was empty (implying that no headers were found and thus the required rules do not exist). If the output contains headers but no stats, don't return an error. Returning an error was a necessity in the previous code because it had no unit or integration tests, but such measures are not necessary now that we have test coverage. Fix: 65550883 Bug: 65369386 Test: bullhead builds, boots Test: netd_{unit,integration}_test pass Change-Id: Ie32f4d941dd52c8dc9ff09fde26cc97cedf96bc3
Loading
Please register or sign in to comment