Commit Graph

30 Commits

Author SHA1 Message Date
Roshan Pius
21c3bca13f settings(nfc): Remove NFC beam settings
This API was already deprecated and not supported for a few years. The
API was completely removed in Android U (see b/236980291).

Bug: 307352220
Test: Verified NFC settings works correctly
Change-Id: I40974a26d170cf3eeec18e6a07a21f6c420eca9e
2023-10-27 13:26:07 -07:00
Shen Lin
0b9a6304aa Fix NPE crash in UwbPreferenceController and optimize the lifecycle observer adding condition in page
This patch contains two fixes:

- Make sure mUwbManager is non-null by calling isUwbSupportedOnDevice to avoid a NPE.
- Modify AdvancedConnectedDeviceDashboardFragment, add lifecycle observer only if device supports UWB.

Bug: 244871579

Test: manual test and Robotest.
Change-Id: I78f97794a66f3fb487f067c4570899e21c254acf
2022-09-06 14:55:08 +08:00
Chienyuan
f06def46f7 RESTRICT AUTOMERGE Remove connection preferences "Files received via Bluetooth" am: 1b9a21ffb5
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16048451

Change-Id: I7a693b6644e200a7aa66f09704e39c178aa2baa7
2021-10-21 15:18:13 +00:00
Joy Babafemi
06a39e9e34 Update UWB toggle display after lifecycle events.
Bug: 201790864
Test: Manual
Change-Id: I05cb52331fe106017b2cb6718a897690720725db
2021-10-15 23:48:41 +00:00
Chienyuan
1b9a21ffb5 RESTRICT AUTOMERGE Remove connection preferences "Files received via Bluetooth"
Bug: 197609370
Bug: 201630499
Test: manual
Change-Id: I597a2105ca851dd41d92109f7b1a5d0137942601
(cherry picked from commit 5be9255ddf)
2021-10-14 08:47:16 +00:00
Raff Tsai
ac3e0d0988 Directly use BaseIndexableProvider
- Add function getXmlResourceId, Fragments don't need to write
xml resource id twice.
- Remove getPreferenceControllers from Indexable.java. Because it will
move to SettingsLib later for other apps which don't need this function

Bug: 135053028
Test: robolectric
Change-Id: I1e74519aecdea3dde64a5aea79f08d766dbc0003
2019-09-24 00:35:52 +08:00
Fan Zhang
31b210017b Migrate all MetricsProto enums to SettingsEnums
Bug: 122855168
Test: rebuild
Change-Id: I962d9a71179f86b7cae9dc5e9a00e0aa1557dc76
2019-01-17 14:55:42 -08:00
Fan Zhang
018fe5adf5 Clean up bluetooth while driving code.
Test: robotests
Change-Id: I50aedc61a9a7836672e934e188837dbe49c64be2
2018-11-07 15:52:18 -08:00
Fan Zhang
9ce4a1fcde Use searchable="false" to suppress nonIndexables.
When possible, remove or simplify getNonIndexable() logic in fragments,
and use searchable="false" in xml to suppress index.

Change-Id: I5bdf5bc7d5494a64cdd9e230a51321a4b210af69
Fixes: 112608186
Test: robotest and manual search
2018-08-17 09:21:05 -07: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
Matthew Fritze
58019a84ed Merge "Fix bluetooth search result no-op" into pi-dev am: f14bfcbfa6
am: 9cb3dd123d

Change-Id: Ib35794ec9c9e71c53145f418629287fd72d9adc6
2018-05-29 12:56:44 -07:00
TreeHugger Robot
f14bfcbfa6 Merge "Fix bluetooth search result no-op" into pi-dev 2018-05-29 19:40:14 +00:00
Matthew Fritze
d5fc3a95c6 Fix bluetooth search result no-op
Bluetooth fragment was manually setting intent information,
which meant that the result didn't fire an intent properly.

This type of regression or mistake will be caught in the fix for
b/77921040.

Change-Id: I49f87f40acbfc3f74ea2e97835f2644d443169e2
Fixes: 80317645
Test: robotests
2018-05-29 11:38:52 -07:00
Chihhang Chuang
6719a9b73e Refactor nfc preference controller
- Remove BaseNfcPreferenceController.
- NfcPreferenceController inherit from TogglePreferenceController.
- AndroidBeamPreferenceController inherit from BasePreferenceController.
- Override getIntentFilter in NfcPreferenceController to listen changes.
- Add an API (hasAsyncUpdate) into BasePreferenceController to
distinguish the setting which is updated asynchronously.

Change-Id: I1abe4410169e305a0d6106e24c54e7f2e763fc91
Merged-In: I7c9c48ea7f1ad01a02524beabf9d30baa3db891f
Fixes: 67997761
Fixes: 74887543
Test: RunSettingsRoboTests
2018-05-24 10:31:44 +08:00
Chihhang Chuang
3b387a028a Refactor nfc preference controller
- Remove BaseNfcPreferenceController.
- NfcPreferenceController inherit from TogglePreferenceController.
- AndroidBeamPreferenceController inherit from BasePreferenceController.
- Override getIntentFilter in NfcPreferenceController to listen changes.
- Add an API (hasAsyncUpdate) into BasePreferenceController to
distinguish the setting which is updated asynchronously.

Change-Id: I7c9c48ea7f1ad01a02524beabf9d30baa3db891f
Fixes: 67997761
Fixes: 74887543
Test: RunSettingsRoboTests
2018-05-23 13:58:28 +08:00
hughchen
52feedf354 Bluetooth and NFC added back to Connection preferences
* Bluetooth and NFC added back to "Connection preferences"

Bug: 79299421
Test: make -j50 RunSettingsRoboTests
Change-Id: I8f4c389c28c7cc752f198be2b59b28b6e9af2c90
Merged-In: I8f4c389c28c7cc752f198be2b59b28b6e9af2c90
2018-05-16 17:03:31 +00:00
hughchen
4bf7c3a921 Bluetooth and NFC added back to Connection preferences
* For fix the TreeHugger error in pi-dev, cherry pick the ag/4023339 in
  master and fix TreeHugger "Automatic merge failed" error.
* Bluetooth and NFC added back to "Connection preferences"

Bug: 79299421
Test: make -j50 RunSettingsRoboTests
Change-Id: I8f4c389c28c7cc752f198be2b59b28b6e9af2c90
2018-05-16 08:03:00 +00:00
Tony Mantler
0fcd6cbaa8 Autogenerate SearchIndexableResources subclass
Bug: 77148954
Test: RunSettingsLibRoboTests RunSettingsRoboTests RunSettingsGoogleRoboTests RunArcSettingsRoboTests
Change-Id: I842c42c55014c3310070ef22bd4f0d9a70dfd804
2018-04-03 10:26:55 -07:00
HJ ChangLiao
b247311b2a Move BT, NFC out of Conntection pref
Move BT, NFC preference out of Connection Preference,
To Connected devices page.
Because NFC and Android Beam are controlled by the same controller,
Create each controller for those preference and leave the sharing part.

Change-Id: I8bc303a5f487de9c667487119b49e1e4130aa80c
Fixes: 72458929
Test: manually test, make RunSettingsRoboTests
2018-03-28 09:55:22 +08:00
Jerry Zhang
40bd570352 Remove unused classes and tests.
Old usb pages have been replaced by UsbDetailsFragment
and UsbDefaultFragment. Old connected devices has
been replaced by new connected devices.

Bug: 70848054
Test: Passes
Change-Id: I538cbb88d4f878449a83da9a4a0381e74e840c6a
2018-02-27 13:50:10 -08:00
Fan Zhang
f7843adabd More renaming in DashboardFragment
getPreferenceControllers() -> createPreferenceControllers() for the same
reason as in ag/3647936

Bug: 73668763
Test: robotests
Change-Id: I97670a91a2a38d1c844d1b9d37f4222c5e6f45a0
2018-02-23 16:56:30 -08:00
Fan Zhang
aed8994f6f Rename Indexable::getAllPreferenceControllers.
To getPreferenceControllers. "all" is redundant. Then internally, the
old getPreferenceControllers() is renamed to
createPreferenceControllers() to emphasize the controllers are created
from code (versus the ones created from xml).

Bug: 73668763
Test: robotest
Change-Id: Ifec46aefdc2a418031c8e152028b30bdcd396fc7
2018-02-23 16:37:28 -08:00
Fan Zhang
2edbaa7062 Change print setting from a dynamic tile to static pref
...because dynamic tile is a lot harder to index correctly.

- Removed metadata that makes PrintSettings a dynamic tile.
- Added PrintSettings into connected_device xml.
- Added a new PreferenceController - all summary updating logic is
  copied from PrintSettingsFragment

Change-Id: I41e7c9d23e97ecd5a043ac7c33f2d404260c92e7
Fixes: 73128944
Test: robotests
2018-02-12 15:19:43 -08:00
Leslie Watkins
58eb43a2e4 Remove all reference to SmsMirroring in Android Settings.
Test: Robotests

Change-Id: I3318c6915cae95522f09838f00a3c567fe9e5fc5
2018-02-12 22:05:56 +00:00
Jerry Zhang
d18d6f1022 Add new USB details screen for Connected Devices 2.0
Also updated UsbBackend to use the new UsbFunctions
api.

Added new unit tests for UsbDetailsHeaderController
and UsbDetailsProfilesController.

Bug: 69333961
Test: make RunSettingsRoboTests
Change-Id: I133750190bb61dfe0e20b06f50e50ea13b347f1e
2018-01-31 11:23:08 -08:00
Daniel Nishi
cf4a5c7459 Add a new toggle for Bluetooth while driving.
The toggle is controlled by a platform feature flag.

Bug: 66679618
Test: Robotest
Change-Id: Ibe8e8756a4ab54a83ee03c6cf008193ed107955d
2018-01-23 09:38:04 -08:00
jackqdyulei
5ef1f502f0 Turn on the new connected device page by default
Bug: 69926683
Test: RunSettingsRoboTests
Change-Id: Ice589b825226e92eace5f5fa6b58499a13e36ef8
2017-12-15 11:08:24 -08:00
jackqdyulei
d055937664 Create BluetoothSwitchPreference
In the new design, bluetooth preference is not MasterSwitchPreference
any more. This cl creates BluetoothSwitchPreference while reuse the
BluetoothEnabler.

Future cl will remove the BluetoothMasterSwitchPreference when P
feature is finalized.

Bug: 69333961
Test: RunSettingsRoboTests
Change-Id: Ie1f934b4e93a6758a1b0cf83bb5098585a635c2a
2017-12-11 13:05:01 -08:00
jackqdyulei
e978f8c5b4 Add preference Received files
Given that BluetoothFilesPreferenceController is already
exist, we could reuse this controller and only add
preference to xml.

Bug: 69333961
Test: Screenshot
Change-Id: I11285fd9a2b6c297dbf43a9a0b118c21780e6710
2017-12-04 12:56:20 -08:00
jackqdyulei
d3f314077b Add(copy) AdvancedConnectedDeviceDashboardFragment
AdvancedConnectedDeviceDashboardFragment is the same as
ConnectedDeviceDashboardFagment except for:
1. Bt preference is not MasterSwitchPreference anymore.
2. New Bluetooth file preference.

This cl copies following files:
1. connected_devices_advanced(from *_old)
2. Advanced*Fragment(from *Old)
3. Advanced*Test(from old test)

Future cl will work on differences.

Bug: 69333961
Test: RunSettingsRoboTests
Change-Id: I4a7cb7225482fb8919af95bc5586e3bf0a80b1cb
2017-12-04 12:56:20 -08:00