Commit Graph

17 Commits

Author SHA1 Message Date
hughchen
0ab3283ccf Update api name
Use CachedBluetoothDevice.connect() instead of
CachedBluetoothDevice.connect(boolean) to connect
Bluetooth device.

Fixes: 141582844
Test: manually
Change-Id: I8c50678bdfd6de89fb8d56122bfa38bdd5ac5c9d
2020-01-14 16:10:06 +08:00
jackqdyulei
5e5dd25b8f Fix issues in BT detail header
1. Update isAvailable() in controller
2. Update method to get fast pair icon

Bug: 124455912
Test: RunSettingsRoboTests
Change-Id: I24a04c8c91d74e9b8b7e8746ad6279fafa37f0a9
2019-02-22 14:46:10 -08:00
jackqdyulei
47123c8224 Update BT header using BT metadata
As for unthethered headset, get BT data from BT metadata, rather than
CachedBluetoothDevice

Bug: 122460277
Test: RunSettingsRoboTests
Change-Id: Ifb5507cbbce9602726ba272c12d1bf95eff91001
2019-01-28 17:12:17 +08:00
jackqdyulei
1fc7629dda Add layout for advanced BT detail header
If device supports metadata, then we display advanced UI in Bluetooth
details header. This CL adds layout for this header.

In advanced layout, it will show:
1. Device name
2. Left, right and case icon
3. Left, right and case battery level

Once API is ready, following CL will get metadata from it and set it
to UI.
Bug: 122460277
Test: RunSettingsRoboTests
Change-Id: Ide044cf9705f350b431b2cb3a9ad82cc4425a17e
2019-01-28 14:12:49 +08:00
tmfang
8ad18fb3eb Use SettingsLib's ActionButtonsPreference
Since we moved old ActionButtonPreference into
SettingsLib, we need to update new imports and
declaration in Settings source code.

Test: robotest, manual test
Bug: 120005054
Change-Id: I1e3514ba68a856071c81534d54c99c3d1a11a8ca
2018-12-03 15:12:41 +00:00
tmfang
fe03fa546a Connect button should have correct icon
Test: visual
Change-Id: I3688a309a538112c60f5d6084c774c08a2ac05d5
Fixes: 119758987
2018-11-29 15:21:27 +08:00
tmfang
5c7f4de999 Remove setButtonPositive method
Since new UI design only exist two button in layout,
we don't need these methods anymore.

Test: robotest
Bug: 116346008
Change-Id: If2e8f7dddb9c13e480438f36fe3c5d6affa4e9ff
2018-11-16 14:33:16 +08:00
tmfang
3adb74ea60 Apply new action button visual design
- Add some icon resources.
- Add icon for each button in action button preference.
- Update "Enable" and "Disable" string to "Install" and "uninstall".
- Remove unused string.
- Add divider between entity header and action buttons.

Test: visual, robotest
Fixes: 119203074
Bug: 116346008
Change-Id: Ib8d7aeb2943d39d257e977b84f165f002bf47559
2018-11-16 14:33:03 +08: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
tmfang
27c84de325 Settings Fragment Migration (Build pass app)
This patch focused on fixing compile errors and some runtime errors.

Test: We can't test it now. But we will have an integration test later.
Bug: 110259478
Change-Id: I16c471ddcd0fa1460c665b7f74d86fcace5ee67b
2018-07-11 18:24:51 -07:00
tmfang
99cc23d0da Settings Fragment Migration (Change imports)
This commit *only* changes imports and optimize imports.
We don't do anything else.

This patch can't compile pass and run test case.
We will update other patches to fix these problem.

Change list.

1. import android.app.Fragment; ->
   import androidx.fragment.app.Fragment;
2. import android.app.DialogFragment; ->
   import androidx.fragment.app.DialogFragment;
3. import android.app.ListFragment; ->
   import androidx.fragment.app.ListFragment;
4. import android.app.LoaderManager; ->
   import androidx.loader.app.LoaderManager;
5. import android.content.AsyncTaskLoader; ->
   import androidx.loader.content.AsyncTaskLoader;
6. import android.content.Loader; ->
   import androidx.loader.content.Loader;
7. import android.app.FragmentTransaction; ->
   import androidx.fragment.app.FragmentTransaction;
8. import android.app.FragmentManager; ->
   import androidx.fragment.app.FragmentManager;
9. import android.app.LoaderManager.LoaderCallbacks; ->
    import androidx.loader.app.LoaderManager.LoaderCallbacks;

Bug: 110259478
Test: Can't test it.
Change-Id: I0a3f98fff34a3494a839c3c42aeabcec3df2c8b3
2018-07-11 18:23:51 -07:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
jackqdyulei
d3ffdc564c Switch the buttons in bt detail page
The forget button should be left and connect button be right.

Bug: 67915643
Test: RunSettingsRoboTests
Change-Id: I71bb99270c4a3d480346db1ded554ecc9b99e706
2017-10-19 16:48:28 -07:00
Fan Zhang
1105a1a465 Convert more pages to use ActionButtonPreference
- text to speech page
- blue tooth detail page
- installed app page

Change-Id: Ib743a144cc6025055cd496ec077f13fce4db0c69
Bug: 63991885
Test: robotests
2017-08-01 14:27:42 -07:00
Antony Sargent
b6fc6e31a5 Add a confirmation dialog when forgetting BT device
This adds a confirmation dialog for when you hit the "Forget" button to
unpair with a device from the Bluetooth device details page.

Bug: 37955181
Test: make RunSettingsRoboTests
Change-Id: I7643ed09bf363c48078d6de8a47583bf91fc7729
2017-07-06 12:24:32 -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