am 7b8f782e: Merge change 6183 into donut
Merge commit '7b8f782eaaef392154fe3acd3ffb48c0a81024e9' * commit '7b8f782eaaef392154fe3acd3ffb48c0a81024e9': Fix null data handling in ServiceCommand.writeCommand()
This commit is contained in:
committed by
The Android Open Source Project
commit
f8ef6209b5
@@ -140,7 +140,7 @@ public class ServiceCommand {
|
||||
|
||||
private boolean writeCommand(int cmd, String _data) {
|
||||
byte buf[] = new byte[8];
|
||||
byte[] data = _data.getBytes();
|
||||
byte[] data = (_data == null) ? new byte[0] : _data.getBytes();
|
||||
int len = data.length;
|
||||
// the length of data
|
||||
buf[0] = (byte) (len & 0xff);
|
||||
|
||||
Reference in New Issue
Block a user