Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8323934 authored by Andre Eisenbach's avatar Andre Eisenbach Committed by Android Git Automerger
Browse files

am c9149984: Merge "Prevent NullPointerException in getStringValue if no value...

am c9149984: Merge "Prevent NullPointerException in getStringValue if no value is set" into lmp-mr1-dev

* commit 'c9149984':
  Prevent NullPointerException in getStringValue if no value is set
parents 5196dd04 c9149984
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -502,7 +502,7 @@ public class BluetoothGattCharacteristic {
     * @return Cached value of the characteristic
     */
    public String getStringValue(int offset) {
        if (offset > mValue.length) return null;
        if (mValue == null || offset > mValue.length) return null;
        byte[] strBytes = new byte[mValue.length - offset];
        for (int i=0; i != (mValue.length-offset); ++i) strBytes[i] = mValue[offset+i];
        return new String(strBytes);