Add mDesiredServingState field in BaseServingState

As the suggestion from:
https://android-review.git.corp.google.com/c/platform/packages/modules/Connectivity/+/2489359/9/Tethering/src/android/net/ip/IpServer.java#b1176

Make BaseServingState an abstract class to prevent it from being used
directly. Additionally, move the handleNewPrefixRequest method into
BaseServingState because it is the only class that uses it.
To avoid TetheredState and LocalHotspotState from having to implement
their own enter function, add the mDesiredInterfaceState field to
BaseServingState.

Bug: 233175023
Test: atest TetheringTests
(cherry picked from https://android-review.googlesource.com/q/commit:3ec851ef03d60308a9ecc57557f378a186bb9ac0)
Merged-In: I03269c37e666345efb0c61039a2bb213f223a5a2
Change-Id: I03269c37e666345efb0c61039a2bb213f223a5a2
1 file changed