NsdManager: remove duplicated argument validation
This patch simplifies argument validation in NsdManager public api and regroup duplicated validation into common methods. This makes stack traces more actionable as now specific errors will cause the api to throw exception from specific methods, whereas before IllegalArgumentException would be thrown from inside the same api method for different reasons. This patch also includes a couple of other small cleanups. Test: $ runtest -x frameworks/base/tests/net/../NsdManagerTest.java Bug: 37013369 (cherry picked from commit ff3e6ccc) Change-Id: Icf047532aa551fbe0a70721cfb95507eaa84d51e
Loading
Please register or sign in to comment