support chinese character for ota package's path

It had been tested work well for both english characters 
and chinese english misc characters.
Because utf-8 is supported in recovery mode, so
if we stored message by utf-8 encoding, we can
handle non-ascii character for ota packages's path.

Change-Id: I19555dc75640bbfd481f23009bff511c07ae0bdb
Signed-off-by: aquanox <aquanox@163.com>
This commit is contained in:
aquanox
2017-09-02 01:49:50 +08:00
parent d8f298365a
commit b80c3cd1cf

View File

@@ -285,8 +285,9 @@ public final class RecoverySystemService extends SystemService {
// Send the BCB commands if it's to setup BCB.
if (isSetup) {
dos.writeInt(command.length());
dos.writeBytes(command);
byte[] cmdUtf8 = command.getBytes("UTF-8");
dos.writeInt(cmdUtf8.length);
dos.write(cmdUtf8, 0, cmdUtf8.length);
dos.flush();
}