Simplifying settings string generation.

Remove duplicate code for generating the settings constant strings, and
make sure not to write redundant data (setting a value to its default).

Bug: 158300259
Test: Android builds
Change-Id: Id79bae3685bfecb4858574ee38b67b2a554823fe
1 file changed