Commit Graph

14 Commits

Author SHA1 Message Date
Hieu Dang
8115b87ea3 Change API name
Change getCreateBondCaller to getPackageNameOfBondingApplication

Bug: 269604212
Test: atest BluetoothDeviceTest
Tag: #refactor
Change-Id: Ib596f94a6a718069ca9fb3a1c572ee3583f7504b
2023-02-19 15:11:42 +00:00
My Name
2e552331e9 Show Bluetooth dialog in a specific case
If the application that initiate the bonding with
BluetoothDevice#createBond is in foreground, then should dialog only
instead of showing the notification & dialog

Bug: 175931562
Tag: #refactor
Test: manual
Change-Id: I3673a0b58cbf9caabf62c951b84b49e17cfb13b8
2023-02-10 08:31:34 +00:00
hughchen
e94b02206e Use BluetoothAdapter instead of LocalBluetoothAdapter
LocalBluetoothAdapter only has a few APIs that is not supported
by BluetoothAdapter, and lots of LocalBluetoothAdapter function
pass parameter to BluetoothAdapter directly.
Do the refactor in Settings, use BluetoothAdapter instead of
LocalBluetoothAdapter.

Bug: 111769754
Test: make -j42 RunSettingsRoboTests
Change-Id: I88e5a8377b5d1106c7679e6a8c3fd1ca1a80ea6f
2018-07-31 11:35:36 +08:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Marie Janssen
c2ab27e2f8 Remove Bluetooth autoconnect on dock
Test: compiles
Change-Id: I31305c70269c685893132f14975c32a051280afc
Fix: 35219649
2017-02-09 20:02:52 -08:00
Marie Janssen
683528db8b Bluetooth: remove BluetoothDiscoveryReceiver
Use new function getDiscoveryEndMillis() to replace use of shared preferences
and intents.

Test: scan recently, then connect from external BT device
Bug: 34395439
Change-Id: Ia498b3bb4868b656cbbb9fbdc607a49af948343b
2017-01-26 15:38:05 -08:00
Michael Wright
dab743b95c Always show pairing dialog for device-specific keyboard.
Bug: 22876536
Change-Id: Ief9f6343d435747050bb7910f934e4777f5116de
2015-09-17 15:23:46 +01:00
Jason Monk
f2982a9ba1 Move isolatable bluetooth code to SettingsLib
Move the non-ui bluetooth control/tracking code to SettingsLib so
that it can be shared with others.

Mostly just move classes to frameworks/base/packages/SettingsLib,
however a few things had to move around.
 - Dock handling had to move back to code still in settings
 - Local preference related code had to be moved back to settings
 - Added an error flow from SettingsLib to Settings

Depends on I69fd888362c6dbb325f6113b32c4b15cc6a23a41
Bug: 19180466
Change-Id: Ie57fe26a27bbb0adc2ef69e042a05c7290c6a52a
2015-02-05 10:43:57 -05:00
Wei Wang
17d2124c1c Revert "BLE peripheral mode (4/4): Settings change for advertising preference."
This reverts commit eb56b9ccb8.

Conflicts:
	src/com/android/settings/bluetooth/BluetoothDiscoverableEnabler.java
	src/com/android/settings/bluetooth/BluetoothSettings.java
	src/com/android/settings/bluetooth/LocalDeviceProfilesSettings.java

Change-Id: I2ce6b9eb0e335ba1b9aa4e1cb61a041f00d9aa87
2014-03-03 11:18:21 -08:00
Wei Wang
eb56b9ccb8 BLE peripheral mode (4/4): Settings change for advertising preference.
Change-Id: I5721f136267fe25e55f764bb4a6c53acd45b318b
2014-01-13 17:41:02 -08:00
Kim Schulz
5d2595f051 MAP 1.1 Review fixes
- Fixes to the issues found during review.
- added support for BluetoothProfile ProfileService Classes
- Added new MapProfile.java to comply with new structure
- changed ORDINAL to use BluetoothProfile.MAP directly
- Moved construction of MapProfile to LocalBluetoothProfileManager constructor
- Added support for multiple concurent permission activities and/or multiple notifications (i.e. pbap and map permission request right after each other)
- cleanup
- changed settings to use Notification.Builder
- made the notifications for map/pbab more informative
- added handling of back button + "clear all notifications"

Bug:10692365
Change-Id: I9803c9658a96b1a9c1d4734d2fdd22f1421d2827
2013-09-13 15:44:26 -07:00
Justin Koh
7b065464c9 Move BT settings appliance check after foreground check.
Move the BT settings appliance check after the foreground activity check.
This allows us to pair bt devices if we have a UI hooked up instead of never
allowing it.

TESTED = runs on Nexus Q.

Change-Id: I3c1ea4abb8d05236d91d2525934bec757cc5ca88
2012-07-31 18:32:39 -07:00
Justin Koh
519dda9c57 Disables BluetoothPairingDialog if in appliance mode.
Disables the BluetoothPairingDialog if we are in appliance mode.

Bug: 6392817

TESTED = runs on Tungsten.

Change-Id: I62191496b412c6196e9a18a1dd1d3bc3dd70ba0c
2012-04-30 18:08:19 -07:00
Jake Hamby
436b29e68e Refactor Bluetooth settings for readability and performance.
Major refactoring of Bluetooth settings classes.
- Moved all functionality from LocalBluetoothManager into new
  LocalBluetoothAdapter and LocalBluetoothPreferences, and into
  existing classes.
- Refactored functionality from BluetoothEventRedirector into new
  BluetoothEventManager class, deleting the original version. New
  version uses a HashMap from action Strings to implementers of the
  BluetoothEventManager.Handler interface.
- Created new BluetoothDiscoveryReceiver to update shared preferences
  timestamp for Bluetooth discovery start/finish. This is the only event
  handling we need to do when the settings app is not visible, so it has
  its own receiver entry in AndroidManifest.xml. Edits are written using
  QueuedWork.singleThreadExecutor(), which BroadcastReceiver knows about
  and will wait for completion, eliminating the need for PendingResult.
- Miscellaneous cleanups to code style and logic for readability.
- Pulled some large switch statement code blocks into new methods.
- Changed all Bluetooth state references to the new BluetoothProfile
  constants.
- Changed use of deprecated Notification constructor in
  BluetoothPairingRequest to use Notification.Builder.
- Moved Utf8ByteLengthFilter helper function from BluetoothNamePreference
  into its own class, and moved test cases into the same package.
- Moved all LocalBluetoothProfileManager functionality related to
  specific profiles into new top-level classes (A2dpProfile, etc.), all
  implementing the LocalBluetoothProfile interface.
- Moved all UI-related methods from CachedBluetoothDevice into the class
  that uses the method, or into the static Utils class for shared methods.

Change-Id: I6d49b7f4ae0c7d7dcf62551ee40b51ecb5fe4f47
2011-03-01 18:44:36 -08:00