Commit Graph

22 Commits

Author SHA1 Message Date
hughchen
eba97c8ce6 Update profile api
The profile will auto connect / disconnect when set enable / disable
profile. This CL remove connect / disconnect method.

Bug: 141582844
Test: make -j42 RunSettingsRoboTests
Change-Id: Ib875d126be0d8483fb539e7ba950242a4f38cf81
2020-02-05 16:04:36 +08:00
hughchen
cfca56fef1 Update Bluetooth api
This CL is used to update Bluetooth api.

- Use BluetoothProfile.CONNECTION_POLICY_ALLOWED instead of
  BluetoothProfile.PRIORITY_ON
- Use BluetoothProfile.CONNECTION_POLICY_FORBIDDEN instead of
  BluetoothProfile.PRIORITY_OFF

Fixes: 141582844
Test: manually
Change-Id: I527813e38583a4e4a1489090e8a17c6bd50c3e81
2019-12-10 11:21:16 +00:00
jackqdyulei
715408e592 Add intent action for BT device detail page
Also update detail page to accept cold start:
1. Check whether profile is ready
2. When it is ready, refresh UI

Bug: 123665527
Test: SettingsRoboTests
Change-Id: I39382fd97e9da46fca08cd2e4a3ef15d32703664
2019-02-11 13:48:16 -08:00
James Lemieux
f1dade40d2 Use binary resource support in robolectric
The resources available to tests are now exactly the merged resources
located in the APK under test.

Bug: 74359828
Test: make -j56 RunSettingsRoboTests
Change-Id: I050db81a92decefea23314b5ec7a62f77ff4bb2b
2018-12-12 19:53:49 -08:00
Leon Liao
1f1671ca28 Merge "Rename isConnectable()" am: ec65174f11 am: 09385137e3
am: af7aed6d79

Change-Id: I5b0a11396ccce092778b6cfda444f52cfd469525
2018-09-26 06:25:41 -07:00
Leon Liao
09385137e3 Merge "Rename isConnectable()"
am: ec65174f11

Change-Id: Ibfc536ba78a118bc33890e52efa6650b21bff62e
2018-09-26 05:59:20 -07:00
Leon Liao
6786e32a73 Rename isConnectable()
LocalBluetoothProfile.isConnectable() checks whether the user can initiate a connection
for a specific profile, not really whether the profile is connectable.

Change-Id: If6c6cd1554acf35db2460ea6ddb65148a7e86e45
Bug: 79982487
Test: atest tests/robotests/src/com/android/settings/bluetooth/BluetoothDetailsProfilesControllerTest.java
2018-09-20 09:23:30 +08:00
Fan Zhang
de117046ad DO NOT MERGE Import clean up.
Reordered all imports according to Android codestyle.

Test: rebuild
Change-Id: I750f01f70f2114d51838bf652833aebdc4065c98
2018-09-04 13:54:46 -07:00
Aurimas Liutikas
03fcde338b Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
Merged-In: I941dea40562170649bf056e675cc32e5163c0e39
(cherry picked from commit a290b873d0)
(cherry picked from commit b1af85d155)
2018-08-28 16:35:52 -07:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
Aurimas Liutikas
b1af85d155 Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
Merged-In: I941dea40562170649bf056e675cc32e5163c0e39
(cherry picked from commit a290b873d0)
2018-08-28 11:48:56 -07:00
hughchen
ab1bc299d8 Use BluetoothDevice.ACCESS_* instead of CachedBluetoothDevice.ACCESS_*
1. Use BluetoothDevice.ACCESS_* instead of CachedBluetoothDevice.ACCESS_*
2. Use BluetoothDevice.setPhonebookAccessPermission() directly.
3. Use BluetoothDevice.setMessageAccessPermission() directly.
4. Use BluetoothDevice.getPhonebookAccessPermission() directly.
5. Use BluetoothDevice.getMessageAccessPermission() directly.
6. Use BluetoothDevice.getSimAccessPermission() directly.

Bug: 112517004
Test: make -j42 RunSettingsRoboTests
Change-Id: Ibe6b207b891b9bd2b328a2e2c7264a9a78cb498f
2018-08-23 11:27:49 +08:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Ryan Lin
440e08faf5 Merge "Implement getProfileId() method in the subclass" into pi-dev am: 0a87e54edb
am: 325b292eb6

Change-Id: Ia68e70ba6ebffa2df20c9b0b909abfaf9d7250e2
2018-05-11 15:25:02 -07:00
ryanywlin
ef301823d3 Implement getProfileId() method in the subclass
Add getProfileId() method in LocalBluetoothProfile interface,
implement this method in subclass.

Bug: 76447449
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDetailsProfilesControllerTest -j28
Change-Id: I8082716b7cdaf7394ee2f8a4b636058716af7bb1
2018-05-11 20:25:13 +08:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
James Lemieux
22a39c2b93 Use external/robolectric-shadows/run_robotests.mk
This allows Settings to test against the latest framework changes.

Also replaced TestConfig with traditional robolectric.properties.

Bug: 73173204
Bug: 73892008
Test: make -j56 RunSettingsRoboTests
Change-Id: I3135b4fa5f095ba79b282a76f45dd9baa2584bc7
2018-03-04 03:50:08 -08:00
jeffreyhuang
cbfb099a40 Rename SDK_VERSION_O to SDK_VERSION
Test: make RunSettingsRoboTests -j40
Change-Id: I6715062d8addadda441e32809db1af55f15e3a90
2017-12-05 16:43:54 -08:00
Fan Zhang
7020d97545 Fix a NPE when displaying device detail page.
Bug: 68956750
Test: robotests
Change-Id: I1eed4e07ad723ee787a333ae88cd2ced62b3d34f
2017-11-10 17:12:50 -08:00
Jack He
04f5967c95 Bluetooth: Use string in remote device summary
* Use String in connected device summary instead of resource id
* This allows dynamic strings to be built by CachedBluetoothDevice
  such as ones involve battery level percentages

Bug: 35874078
Test: make, unit test, test with Bluetooth devices
Change-Id: I583eac73280ca17387b215a4e7095e27de399998
2017-07-06 01:22:35 +00:00
Andrew Sapperstein
9f1e911759 Refactor test runner to use static list of resource paths
Previously everything lived in an inner class method of
SettingsRobolectricTestRunner. That method has now been turned into
a static method so that it can be called by other runners.

Bug: 62460102
Test: robotests
Change-Id: I6612b1f26404587301c534c8ba60e39d59d6c840
2017-06-09 09:21:26 -07:00
Antony Sargent
04a3b2199e Add a new Bluetooth device details page
Bug: 35877479
Test: make RunSettingsRoboTests

The existing behavior is to bring up a dialog with Bluetooth device
details with checkboxes for each supported profile. This adds a new page
that serves the same purpose with a switch for each profile and a footer
containing the MAC address.

Whether to use the new page or old dialog is controlled by a flag
accessible via BluetoothFeatureProvider.

Change-Id: I026c363d4cd33932a84017a67cbef51c258bad10
2017-06-05 11:17:06 -07:00