Commit Graph

409 Commits

Author SHA1 Message Date
Zhihai Xu
7e6fe14f02 am 54499194: am 2e8a2d20: Merge "LE: Return false if an attribute read/write is in progress" into klp-modular-dev
* commit '544991946287bdd3a9e6a71855642e378594bf73':
  LE: Return false if an attribute read/write is in progress
2014-04-10 01:07:26 +00:00
Andre Eisenbach
cc68cc962d LE: Return false if an attribute read/write is in progress
bug:12109128
Change-Id: I0155fcddc850aba47a1bf3e174d4ee582d50b187
2014-04-09 10:59:44 -07:00
Zhihai Xu
6b96c1b2ea am 7d394df2: am ae1b763c: Merge "LE: Add API to configure MTU for a given connection (3/4)" into klp-modular-dev
* commit '7d394df2ab8f951215a775df8d2bd9e6518e746a':
  LE: Add API to configure MTU for a given connection (3/4)
2014-03-31 21:35:38 +00:00
Zhihai Xu
ae1b763cde Merge "LE: Add API to configure MTU for a given connection (3/4)" into klp-modular-dev 2014-03-31 21:21:54 +00:00
Wei Wang
ab4fc115e9 am 1b09c97d: am 4447405d: Merge "Callback on correct method when status is unsuccessful." into klp-modular-dev
* commit '1b09c97d8a7156a9f35ebab3c98db7b103852a58':
  Callback on correct method when status is unsuccessful.
2014-03-29 02:03:03 +00:00
Wei Wang
c07a5dd709 Callback on correct method when status is unsuccessful.
Change-Id: I63c07bbae559765af1aecb492379ab18268336d8
2014-03-29 01:42:41 +00:00
Wei Wang
45e1bcdac3 am 0d68a52a: am 9d3e0996: Merge "Add comment of using same callback for start/stop advertising." into klp-modular-dev
* commit '0d68a52ad32bb2c07314721b19e7973df6045d34':
  Add comment of using same callback for start/stop advertising.
2014-03-28 05:35:38 +00:00
Wei Wang
f3f52b1b4c Add comment of using same callback for start/stop advertising.
Change-Id: Ice268e83e4f2ceb5053a0e03f73b877f548bd13b
2014-03-27 19:34:46 -07:00
Andre Eisenbach
580b0a1302 LE: Add API to configure MTU for a given connection (3/4)
bug:13571470
Change-Id: I3619617eaf864701a35f7802bc71805784d768d0
2014-03-25 18:02:06 -07:00
Dianne Hackborn
466ce96da8 Get rid of not specifying a user errors in bluetooth.
W/ContextImpl( 1772): Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:1559 android.content.ContextWrapper.bindService:513 android.bluetooth.BluetoothInputDevice.doBind:262 android.bluetooth.BluetoothInputDevice.<init>:255 android.bluetooth.BluetoothAdapter.getProfileProxy:1365
W/ContextImpl( 1772): Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:1559 android.content.ContextWrapper.bindService:513 android.bluetooth.BluetoothPan.doBind:148 android.bluetooth.BluetoothPan.<init>:140 android.bluetooth.BluetoothAdapter.getProfileProxy:1368
W/ContextImpl( 1772): Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:1559 android.content.ContextWrapper.bindService:513 android.bluetooth.BluetoothMap.doBind:108 android.bluetooth.BluetoothMap.<init>:101 android.bluetooth.BluetoothAdapter.getProfileProxy:1374
W/ContextImpl( 1772): Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:1559 android.content.ContextWrapper.bindService:513 android.bluetooth.BluetoothPbap.doBind:163 android.bluetooth.BluetoothPbap.<init>:156 com.android.settings.bluetooth.PbapServerProfile.<init>:68

Change-Id: I0a1e24ee71aef7d796fcee5692b9d19462a93637
2014-03-20 10:10:03 -07:00
Wei Wang
32779536bc am 13bd8577: am c0384b6b: DO NOT MERGE: Move advetise clean up to callback code. fixes b/13289050 Cherrypick from master to fix b/13289050
* commit '13bd85772f6279d14303ec3a18615613c3722844':
  DO NOT MERGE: Move advetise clean up to callback code. fixes b/13289050 Cherrypick from master to fix b/13289050
2014-03-20 16:59:13 +00:00
Wei Wang
13bd85772f am c0384b6b: DO NOT MERGE: Move advetise clean up to callback code. fixes b/13289050 Cherrypick from master to fix b/13289050
* commit 'c0384b6b18617cc395814c5b20077955a185e392':
  DO NOT MERGE: Move advetise clean up to callback code. fixes b/13289050 Cherrypick from master to fix b/13289050
2014-03-20 03:41:47 +00:00
Wei Wang
d10bc171a5 am 15a18d07: am da084104: Merge "DO NOT MERGE: Add status callback for start/stop advertising." into klp-dev
* commit '15a18d07acc57d465e9d67bb28010912bb9ad15f':
  DO NOT MERGE:  Add status callback for start/stop advertising.
2014-03-20 03:36:45 +00:00
Wei Wang
15a18d07ac am da084104: Merge "DO NOT MERGE: Add status callback for start/stop advertising." into klp-dev
* commit 'da084104eb768f4472b7988b77a4f2b7e3f170d8':
  DO NOT MERGE:  Add status callback for start/stop advertising.
2014-03-20 03:32:17 +00:00
Wei Wang
c0384b6b18 DO NOT MERGE: Move advetise clean up to callback code. fixes b/13289050
Cherrypick from master to fix b/13289050

Change-Id: Ibf3c772561125821817c947730cf21defafd4cb2
2014-03-19 20:31:36 -07:00
Wei Wang
4b4eebb9a5 DO NOT MERGE: Add status callback for start/stop advertising.
Cherrypick from master to fix b/13289050

Change-Id: I231ba51aaa67b1f917e476ef0f2c8f82c762df77

Conflicts:
	core/java/android/bluetooth/BluetoothAdapter.java
	core/java/android/bluetooth/BluetoothGatt.java
2014-03-20 00:33:41 +00:00
Wei Wang
809476525f Move advetise clean up to callback code. fixes b/13289050
Change-Id: Ibf3c772561125821817c947730cf21defafd4cb2
2014-03-20 00:04:27 +00:00
Wei Wang
f305589f22 Add status callback for start/stop advertising.
Fixes b/13289050, b/13418851, also fixes 13418671.

Change-Id: I231ba51aaa67b1f917e476ef0f2c8f82c762df77
2014-03-18 19:33:16 -07:00
Wei Wang
0ea81eed88 am 1327e59f: Merge "DO NOT MERGE BLE peripheral mode (3/4): Add peripheral mode API." into klp-dev
* commit '1327e59f36ceea5a1ee7dc66b311206345353de5':
  DO NOT MERGE BLE peripheral mode (3/4): Add peripheral mode API.
2014-03-08 02:05:57 +00:00
Mike J. Chen
8169bc78a1 am 5adbea2e: am 784224d2: am b8a7dd63: Merge "Add handshake broadcast support" into klp-modular-dev
* commit '5adbea2e2da3a0af1357de05a04534c65a7c9f76':
  Add handshake broadcast support
2014-03-07 20:33:46 +00:00
Wei Wang
ee0b3e9f82 DO NOT MERGE BLE peripheral mode (3/4): Add peripheral mode API.
Add bluetooth adv data, APIs in BluetoothAdpater etc.

Cherry picking ble advertising changes from master to KLP MR2.
b/13137996

Change-Id: Id9d2f566b6d9ed0fffe73b67efad2e3d045360b4

Conflicts:
	core/java/android/bluetooth/BluetoothAdapter.java
	core/java/android/bluetooth/BluetoothGatt.java

Conflicts:
	core/java/android/bluetooth/BluetoothAdapter.java
2014-03-06 18:45:17 +00:00
Mike J. Chen
8faffa400b Add handshake broadcast support
Also make a log message verbose only.

Change-Id: I805ca376c0c0c37ec67897e5473a78fc943fdc63
Signed-off-by: Mike J. Chen <mjchen@google.com>
2014-03-04 17:27:16 -08:00
Mike J. Chen
5dadeba229 am 1ece04f3: Merge "BluetoothInputJava: Add broadcast action REPORT" into klp-modular-dev
* commit '1ece04f37fc93983ee058916e9913b6341e6de83':
  BluetoothInputJava: Add broadcast action REPORT
2014-01-28 20:44:25 +00:00
Mike J. Chen
d96d5cfffc BluetoothInputJava: Add broadcast action REPORT
It's returned by getReport() when callback data is ready.

Change-Id: I751c9e31de3d82a454a62cb8485a230e722b740d
Signed-off-by: Mike J. Chen <mjchen@google.com>
2014-01-27 17:55:40 -08:00
Mike J. Chen
729b12c7a9 am bfa3f4fd: Merge "BluetoothInputDevice: make REPORT_TYPE values match hal" into klp-modular-dev
* commit 'bfa3f4fd5c30b0d53addc071ecf8e099529f2c77':
  BluetoothInputDevice: make REPORT_TYPE values match hal
2014-01-28 01:32:53 +00:00
Mike J. Chen
1b47f7cc1a BluetoothInputDevice: make REPORT_TYPE values match hal
So we don't have to do conversion when using getReport/setReport
and can pass the value to the BT HAL directly.

Change-Id: I8d4af72d2e040d43cc9ff8a8cddfbe6cc8cfdb9a
Signed-off-by: Mike J. Chen <mjchen@google.com>
2014-01-27 16:27:04 -08:00
Zhihai Xu
01771021e3 bluetoothsocket fd leak, need close the file descriptor after detachFd.
Perform ParcelFileDescriptor close after detach to avoid bluetooth
socket leaks in strict mode.

bug:12647433
Change-Id: I22f422547b2fb33b9bf12065dc689ed7785a7269
2014-01-20 17:43:37 -08:00
Zhihai Xu
9efa3b6c63 Merge "NPE in BluetoothDevice.fetchUuidsWithSdp" 2014-01-14 06:47:06 +00:00
Wei Wang
86b3fa6090 BLE peripheral mode (3/4): Add peripheral mode API.
Change-Id: Id9d2f566b6d9ed0fffe73b67efad2e3d045360b4

Conflicts:
	core/java/android/bluetooth/BluetoothAdapter.java
	core/java/android/bluetooth/BluetoothGatt.java

Conflicts:
	core/java/android/bluetooth/BluetoothAdapter.java
2014-01-13 17:53:48 -08:00
Zhihai Xu
82e95573c7 NPE in BluetoothSocket.write()
If calling connect succeed, we should not see this NPE.
An IOException may happen after call BluetoothSocket.connect.
If you still call write after the IOException,
you will get this NPE.
add NPE protection for possible wrong calling sequence from application,
To make bluetoothSocket more error-tolerant.

bug:12104154
Change-Id: I7fa4e847b500ca9b9d2a43df432f31a1bb016c0a
2014-01-13 17:52:13 -08:00
Zhihai Xu
5d04f1c9d9 NPE in BluetoothDevice.fetchUuidsWithSdp
This is caused by access fetchUuidsWithSdp after bluetooth is turned off.
We can add check null pointer for sService,
before call sService.fetchRemoteUuids(this) to fix this problem;

bug:12533948
Change-Id: Id2cab92a56185073fabcabcfb21a243e99a60cee
2014-01-13 16:54:38 -08:00
Zhihai Xu
2208e652d6 Merge "NPE in BluetoothSocket.write()" 2014-01-04 00:54:02 +00:00
Wei Wang
18c76934f6 BLE peripheral mode (3/4): Add peripheral mode API.
Change-Id: Id9d2f566b6d9ed0fffe73b67efad2e3d045360b4

Conflicts:
	core/java/android/bluetooth/BluetoothAdapter.java
	core/java/android/bluetooth/BluetoothGatt.java
2013-12-19 16:33:32 -08:00
Zhihai Xu
610770d712 NPE in BluetoothSocket.write()
If calling connect succeed, we should not see this NPE.
An IOException may happen after call BluetoothSocket.connect.
If you still call write after the IOException,
you will get this NPE.
add NPE protection for possible wrong calling sequence from application,
To make bluetoothSocket more error-tolerant.

bug:12104154
Change-Id: I7fa4e847b500ca9b9d2a43df432f31a1bb016c0a
2013-12-17 11:39:20 -08:00
Katie McCormick
e217347556 am 9c514b8f: am 4561f199: am 08e0142f: am f85470e6: am fbbc1b79: Merge "Doc update: Update package summary for BT." into klp-docs
* commit '9c514b8fe98603072e66cd44744cd1b42e28e678':
  Doc update: Update package summary for BT.
2013-12-13 01:08:07 +00:00
Katie McCormick
f2041ac56e Doc update: Update package summary for BT.
Fixes:

b/8584860

Change-Id: Ic85436f90b46508e6a182e3fc51365f5bfb8da14
2013-12-12 15:42:00 -08:00
John Spurlock
6090995951 Remove unused imports from frameworks/base.
Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
2013-11-20 11:31:47 -05:00
Matthew Xie
3f96fdd861 am 46cfa691: am 9a53fbe4: am ce39e8ce: Merge "Change pairing api/intent permission from PRIVILEGED to ADMIN" into klp-dev
* commit '46cfa691379af957cabecac83ae909ba83f93a8f':
  Change pairing api/intent permission from PRIVILEGED to ADMIN
2013-10-21 16:11:07 -07:00
Matthew Xie
ac2c6c3a16 Change pairing api/intent permission from PRIVILEGED to ADMIN
The APIs are createBond, setPin, setPairingConfirmation
The intent is ACTION_PAIRING_REQUEST
bug 11101076

Change-Id: I3a314efd973b3ce078ab5347159c336f222d9f15
2013-10-21 14:56:33 -07:00
Narayan Kamath
98e1797367 Remove captive portal code that has no effect.
Note that this CL does not change any behaviour.

At the center of this change is
CaptivePortalTracker#detectCaptivePortal(), which does nothing
except call back into ConnectivityService. Removing it allows us to
simplify code in ConnectivityService. It also allows us to remove
ConnectivityService#captivePortalCheckComplete which was only ever
called in response to this method.

While this does not change any behaviour, it preserves existing
bad behaviour, i.e, that the CAPTIVE_PORTAL_CHECK NetworkInfo
state does not correspond to actual captive portal detection.
We transition into that state and immediately (and unconditionally)
out of it and into CONNECTED.

Change-Id: Ib3797f956d2db5e3cacaaa53e899d81aa8e958af
2013-10-16 08:10:55 +00:00
Matthew Xie
64be26fad7 Merge "Check callback null condition for register/unregsiter state change callback" into klp-dev 2013-10-10 21:56:20 +00:00
Matthew Xie
9b69399399 Check callback null condition for register/unregsiter state change callback
Fix BluetoothPan closing sequence for unregsiter state change callback
bug 11160007

Change-Id: I405ec91a938289fe9541de2ebd9abc1fb938f44a
2013-10-10 12:12:04 -07:00
Edward Jee
430e361b20 Makes ACTION_PAIRING_REQUEST require BLUETOOTH_PRIVILEGED.
Bug: 11087521
Change-Id: I99cc584987bf12fe0648b048398b4eb9836e6172
2013-10-10 18:42:34 +00:00
Mike Lockwood
68c692df5f Revert "Allow L2CAP sockets"
This reverts commit 34b0f92613.
2013-10-02 07:56:46 -07:00
Matthew Xie
091fc2ba7a Unhide setPin, setPin, setPairingConfirmation, and relevant intent fields
bug 9987787

Change-Id: Id1c149964137e35703310e2f2893c8830aacddea
2013-09-29 13:17:56 -07:00
Kim Schulz
0d37605374 Fixed review comments
- fixed review comments (internal+google)
- corrected tabs/spaces
- Add connection id header for obex client operations
- added support for implementing ProfileService class

Change-Id: Idab8b4fa54a0f31bec4ffa263a69a9850a07f858

Bug:10692365
2013-09-12 19:07:28 -07:00
Dmitry Grinberg
34b0f92613 Allow L2CAP sockets
Change-Id: Icb498e6c0430789b6168bec3beb1d4650e4f1238
2013-09-06 12:27:12 -07:00
Matthew Xie
02a25a97a2 Merge "Block ble adv api based on resource config" into klp-dev 2013-09-03 22:36:09 +00:00
Matthew Xie
c5470778a4 Block ble adv api based on resource config
bug 10516911

Change-Id: I7a62103a1116ffbf7c3c934c1794384c0e6fbdd3
2013-08-28 15:45:23 -07:00
Ying Wang
b240578f03 Fix docs build.
Change-Id: I7bfcfea052de6959230bb361400e760eab35b78c
2013-08-26 17:48:22 -07:00