Replace subnet mask calculation to Inet4AddressUtils

There is existing helper method in Inet4AddressUtils to calculate
the subnet mask from IPv4 prefix calculation. Replace the
implementation in caller side to simplify design in callers.

Bug: 172183305
Test: atest SettingsRoboTests
Test: Verify the method return the same value
Change-Id: I38d7d09be612fa4788cf4052bf304d17f0ae79f4
Merged-In: I38d7d09be612fa4788cf4052bf304d17f0ae79f4
2 files changed