Replace not needed usage of deprecated method in newFromSerialization

Change-Id: I7756fffdbd0d0e878c5d308191dc7cdd77930bd6
Merge "Replace not needed usage of deprecated method in newFromSerialization"