Add check when persisting AdiDeviceStates

When persisting the AdiDeviceStates we need to make sure that the
Settings limit will not be exceeded. Calculating the max number of
devices we can have in the inventory based on the max String length that
the Secure Settings can persist

Test: trivial
Bug: 314856304
Change-Id: Id51fd2a668a8711db2024898ff6297410edb78e6
4 files changed