diff options
author | Hemant Gupta <hemantg@codeaurora.org> | 2013-08-16 14:57:55 +0530 |
---|---|---|
committer | Mike Lockwood <lockwood@google.com> | 2014-07-01 18:01:27 +0000 |
commit | 8949bfb90c415629dbd0e30d25003fb3e0375fb5 (patch) | |
tree | a11a128c60d3301f41419e1ef9598d3a1bc28cc5 /obex/javax/obex/HeaderSet.java | |
parent | e19a4fe32fd87a6c819f15155bb43d9fbe67607a (diff) | |
download | frameworks_base-8949bfb90c415629dbd0e30d25003fb3e0375fb5.zip frameworks_base-8949bfb90c415629dbd0e30d25003fb3e0375fb5.tar.gz frameworks_base-8949bfb90c415629dbd0e30d25003fb3e0375fb5.tar.bz2 |
Bluetooth: Support MAP Client role on Bluedroid.
Implementation changes to support MAP client and PBAP client
role on Bluedroid stack.
Change-Id: I1733a67bf5256bd7b181bd5e68e40b476994ebfd
Diffstat (limited to 'obex/javax/obex/HeaderSet.java')
-rw-r--r-- | obex/javax/obex/HeaderSet.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/obex/javax/obex/HeaderSet.java b/obex/javax/obex/HeaderSet.java index 2b3066f..51b560a 100644 --- a/obex/javax/obex/HeaderSet.java +++ b/obex/javax/obex/HeaderSet.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2014 The Android Open Source Project * Copyright (c) 2008-2009, Motorola, Inc. * * All rights reserved. @@ -181,6 +182,8 @@ public final class HeaderSet { private String mName; // null terminated Unicode text string + private boolean mEmptyName; + private String mType; // null terminated ASCII text string private Long mLength; // 4 byte unsigend integer @@ -235,6 +238,25 @@ public final class HeaderSet { } /** + * Sets flag for special "value" of NAME header which should be empty. This + * is not the same as NAME header with empty string in which case it will + * have length of 5 bytes. It should be 3 bytes with only header id and + * length field. + */ + public void setEmptyNameHeader() { + mName = null; + mEmptyName = true; + } + + /** + * Gets flag for special "value" of NAME header which should be empty. See + * above. + */ + public boolean getEmptyNameHeader() { + return mEmptyName; + } + + /** * Sets the value of the header identifier to the value provided. The type * of object must correspond to the Java type defined in the description of * this interface. If <code>null</code> is passed as the @@ -269,6 +291,7 @@ public final class HeaderSet { if ((headerValue != null) && (!(headerValue instanceof String))) { throw new IllegalArgumentException("Name must be a String"); } + mEmptyName = false; mName = (String)headerValue; break; case TYPE: |