* connect: remove connected device check logic. MapClientService
will check it.
* remove member variable V and related checks.
* wrap if/else statement in curly brackets.
* add robotest for MapClientProfile.
Bug: 111812003
Test: make -j42 RunSettingsLibRoboTests ROBOTEST_FILTER=MapClientProfileTest
Change-Id: Ic3620c8910e5acbb14e33369ff437d434b514ddf
(cherry picked from commit a199c59436581b73eaf5dfc4f58f292f7f1fca25)
* connect: remove connected device check logic. PbapClientService
will check it.
* remove member variable V and related checks.
* wrap if/else statement in curly brackets.
* add robotest for PbapClientProfile.
Bug: 111812003
Test: make -j42 RunSettingsLibRoboTests ROBOTEST_FILTER=PbapClientProfileTest
Change-Id: Ide43ee5cec560945ad69639782ad6f214ea0cece
(cherry picked from commit 12ed2468d290d5c861e5d1d88a763630dabe97da)
This reverts commit c386c87b0e.
Reason for revert:
To fix null pointer crash in Pairing dialog. Dialog maybe triggered by intent, in which LocalBluetoothManager couldn't have instance for BluetoothDevice and will return null. As a result, we need to depend on method in CachedBluetoothManager to handle it.
Bug: 115754654
Bug: 112735753
Change-Id: I727089cfd23819f292f96f0d0232f35bc6ebac64
* getConnectionStatus: remove connected device check logic.
HidDeviceService will check it.
* rewrite the annotation about this class
* remove member variable DEBUG and related checks.
* add robotest for HidDeviceProfile
Bug: 111812003
Test: make -j42 RunSettingsLibRoboTests ROBOTEST_FILTER=HidDeviceProfileTest
Change-Id: I2e7fdd69a46707339a32db4304666e50fd0cf954
(cherry picked from commit 89b1e5c013d250d846832634be34d8696d7160e9)
* connect: remove connected device check logic. A2dpSinkService
will check it.
* Remove member variable V and related checks.
* wrap if/else statement in curly brackets.
* add robotest for A2dpSinkProfile.
Bug: 111812003
Test: make -j42 RunSettingsLibRoboTests ROBOTEST_FILTER=A2dpSinkProfileTest
Change-Id: Ia0a118d73e5bb35ed3b2b75e67aeb98ae936981f
(cherry picked from commit b31a745fc0264a622ea9565f2d3da9c267f7f346)
* connect: remove connected device check logic.
HeadsetClientStateMachine will check it.
* Remove member variable V and related checks.
* wrap if/else statement in curly brackets.
* add robotest for HfpClientProfile.
Bug: 111812003
Test: make -j42 RunSettingsLibRoboTests ROBOTEST_FILTER=HfpClientProfileTest
Change-Id: Ie36efd6d0a9f8e6501a3690b026ea4bd39744b5c
(cherry picked from commit 2ecfa2abe6bee9318dcc5f0b4c3b3d3ec634f0e4)
Also make the new lib only use system-apis.
This allows mainline module to use the new
RestrictedLockUtilsSettingLib.
Unfortunately the whole RestrictedLockUtils would have caused to much
new system-api. Hence it was split into RestrictedLockUtils and
RestrictedLockUtilsInternal. This caused a lot of trivial code changes.
Bug: 110953302
Test: Built
Change-Id: I693b3bf56f3be71f0790776e3aad5694717786ef
Make BluetoothEventManager fields final and remove the method to
unregister receivers unnecessarily (introduced in b/35415158).
Bug: 113122466
Test: runtest systemui && make RunSettingsLibRoboTests
Change-Id: I8f34ab1a809638959ab4096a829c72b3d1ac3a23
This is the first of a few sub-libraries that will get factored out of
the settings lib. These libs will be included by mainline modules which
are compiles against system-api.
Bug: 110953302
Test: Looked at UI
m -j RunRoboSettingsLibTests
Change-Id: I16347e565aca554d6a8653df35765c2194479e78
In LocalBluetoothProfileManager, we will update profiles in constructor
by register service callback to bluetooth profiles. So the callback may
return before this constructor, in which case mBluetoothProfileManager
maybe null in LocalBluetoothMangaer.
This cl moves the updateLocalProfiles() out of the constructor, to make
sure we will first construct mBluetoothProfileManger and then connect to
bluetooth profiles.
Change-Id: I93a388cf0598555d26181a6b0da99dcb35f227dd
Fixes: 113290231
Test: RunSettingsRoboTests
Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I9acb311ec05f72f0a37f08b0d26785841fe91de5
To make behavior consistent in the long run and refactor the code
into settingslib and call it from both Settings and SystemUI.
Bug: 110973964
Test: run testcase as below:
1. frameworks/base/packages/SettingsLib: -> ALL PASS
make RunSettingsLibRoboTests -j40
2. frameworks/base/packages/SystemUI: -> ALL PASS
atest frameworks/base/packages/SystemUI/tests/src/com/android/systemui
/statusbar/policy/NetworkControllerSignalTest.java
Change-Id: Ie8899dd5398a503b861557c222bbd93bd2049d10
In constructor the mProfileIntentFilter is empty, we don't need to
register at that time.
LocalBluetootohProfileManager will tell EventManger to register
after all the profiles are finalized.
Bug: 111803044
Test: robo still pass
Change-Id: I0ac485eb80c297bc230056c1f40c19a14b7634b2
This ensures the metadata is refreshed every time we query tiles (which
happens every time when we launch a new settings page).
So if things are stale, it will be refreshed at next page load.
Fixes: 77600770
Test: robotests
Change-Id: I0259673da3e3498d8ef9643704b7e9baed69dfab
1. Use BluetoothDevice.getAliasName() to get the cached name instead of
use mName that is local cached.
2. Add test to verify following situations:
1. Verify when alias name is not null return alias name otherwise return
address.
2. Verify the BluetoothDevice.setAlias() will be called when set
name is not null.
Bug: 112517004
Test: make -j42 RunSettingsLibRoboTests ROBOTEST_FILTER=CachedBluetoothDeviceTest
Change-Id: Ib4f002da6ceac8e8e562bf17a167a0c9ae6a3953
- the function is to check Hfp connection status
Bug: 110072747
Test: make -j50 RunSettingsLibRoboTests
Change-Id: If64b6b93025f8aa66a29874965b774e33add8b6e
- the function is to check A2dp connection status
Bug: 110072747
Test: make -j50 RunSettingsLibRoboTests
Change-Id: I3be9c6528e978a3741781c8e6424f5e97fc36017
- LocalBluetoothAdapter is only for setProfileManager() to refresh profiles when Bluetooth turned back on
- use BluetoothAdapter.getDefaultAdapter() to call getSupportedProfiles()
- add ShadowBluetoothAdapter.java to handle the test cast without mock adapter
- no more pass LocalBluetoothAdapter to each Bluetooth profile
- no more pass LocalBluetoothAdapter to CachedBluetoothDeviceManager::addDevice()
Bug: 111815935
Test: make -j50 RunSettingsLibRoboTests
Change-Id: I87f328b04cfe86bbd42babb57187e7c0b2638aea