storaged: replace string functions that can throw exception

android coding style doesn't allow exception handling which leads
to crash when any function throws exception. Replace such functions
in storaged to gracefully handle invalid inputs.

Test: adb shell dumpsys storaged --hours N --time_window 300
Bug: 36131658
Change-Id: I36be1b49c4d9977a01d1bd4c9ca57d49322d95f4
2 files changed