frameworks/base: fix: string out of boundary.

String length should use GetStringLengh() and the resultant buffer
should be GetStringUTFLength(). So Update the code accordigly to
fix the string out of boundary.

Bug: 921692
Change-Id: I2c3d37ac713b2545e740787bdf1804e15c4c5be6
1 file changed