From: Matthew Xie Date: Wed, 4 Apr 2012 08:03:50 +0000 (-0700) Subject: check device.mAlias null case before copying to it X-Git-Tag: android-7.1.2_r17~1143 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=8826b161f865350f306e8f287aaca615e2f1e4a3;p=android-x86%2Fpackages-apps-Bluetooth.git check device.mAlias null case before copying to it Change-Id: I705126ce11272d9c3a5577c0266982a6478e8a87 --- diff --git a/src/com/android/bluetooth/btservice/RemoteDevices.java b/src/com/android/bluetooth/btservice/RemoteDevices.java index 6295e390..4d317514 100755 --- a/src/com/android/bluetooth/btservice/RemoteDevices.java +++ b/src/com/android/bluetooth/btservice/RemoteDevices.java @@ -225,7 +225,10 @@ final class RemoteDevices { debugLog("Remote Device ame is: " + device.mName); break; case AbstractionLayer.BT_PROPERTY_REMOTE_FRIENDLY_NAME: - System.arraycopy(val, 0, device.mAlias, 0, val.length); + // TODO(BT) is null device.mAlias a valid senario? + if (device.mAlias != null) { + System.arraycopy(val, 0, device.mAlias, 0, val.length); + } break; case AbstractionLayer.BT_PROPERTY_BDADDR: device.mAddress = val;