Commit Graph

24 Commits

Author SHA1 Message Date
Doris Ling
6776da1cad Do not turn on NFC automatically when airplane mode is off.
- besides checking the value for AIRPLANE_MODE_TOGGLEABLE_RADIOS, also
check the value for AIRPLANE_MODE_RADIOS to determine if we should turn
off NFC when airplane mode is on.
- when user turns off airplane mode, only re-enable the NFC preference
and do not enable NFC by default.
- remove listening to airplane mode directly from the android beam
preference controller, as it is already listening to Nfc state, which
handles the beam state already.

Change-Id: Id41fef15fb2de873729d20d7f53b1a88b164cf95
Fixes: 80217047
Test: make RunSettingsRoboTests
2018-06-13 13:44:15 -07: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
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -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
Ruchi Kandoi
1eab553653 Avoid Race condition with accessibility for NFC toggle switch
Bug: 64429429
Test: Enable TalkBack; Toggle NFC settings
Change-Id: Iadeae0ca33c32b320c202efc2acf0be647b10078
2017-08-08 20:58:29 +00:00
Sudheer Shanka
9e9e63b7b3 Part3 - Don't add padlock if the restriction is not set by admin.
Bug: 26687435
Change-Id: Ibfea6d7d5bd32e7a05dcc2cc32b121c9e50b6a34
2016-02-16 11:04:11 +00:00
Sudheer Shanka
682a916836 Add padlocks to preferences that can be disabled by policy.
Change-Id: I43b6b5954ef6ec65b86d99321cabab9f49df842d
2016-01-20 17:48:27 +00:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Amith Yamasani
25a1e95ed6 Handle disallowed NFC beam restriction
Don't enable the beam setting and toggle if it is disallowed for
the current user.

Bug: 17387303
Change-Id: Ifdfe049bef281454c978a37acb49c59758344ae6
2014-09-09 12:07:11 -07:00
Fabrice Di Meglio
4325f80808 Update NFC to use a SwitchPreference
- do the switch

See bug: #15730311 Checkboxes on R side should update to Quantum/Material on/off switch

Change-Id: I78ab5b86fe6b541f9f3dc3d77115fde656d40c80
2014-08-15 14:28:04 -07:00
Jeff Hamilton
3d670de5ce Bring back the Android Beam settings panel.
Bug: 5350022
Change-Id: I22d2c6f91f7ab86501021fe97a2d57b109ed10bf
2011-09-22 12:35:55 -05:00
Martijn Coenen
943af0bc69 Remove NFC sharing from Settings.
Bug: 5297151
Change-Id: I64304230296912519aa057a89f139a2242b557e3
2011-09-15 22:31:51 +02:00
Nick Pelly
0fb33abfb4 Rename {zeroclick, share_tap} -> ndef_push in code.
Not sure what the product name will be, but ndef push seems to be a
nice neutral name for the code.

Text strings are left as "Share Tap" for now.

Change-Id: I9dbf82eda2273220c23f443710a340c2c93e8291
2011-08-26 16:35:44 -07:00
Nick Pelly
9894d4ade4 Add support for NFC in airplane mode.
Also update logic in Settings for new async NfcAdapter.enable() and disable().

Change-Id: Ie1e5407498ac7beb5a4e21daec0ada0e8ae9c388
2011-08-09 09:30:25 -07:00
Martijn Coenen
ba53440801 Added setting for zero-click sharing over NFC.
Change-Id: I3848c4815d65d3a8b9b5e579c6a353dde6901ee4
2011-07-21 11:39:41 +02:00
Gilles Debunne
dfc2637eba Removed summary text and categories in Wireless settings
Bug 5002377 and 5002476.

Change-Id: Ia35dd9701f59a18a812b5079396835cc19e6d901
2011-07-08 10:05:14 -07:00
Nick Pelly
267419ff8b Update Settings for new NfcAdapter.getDefaultAdapter(Context)
Change-Id: I3321d9ebd90313f98664d66b53bb36690808911a
2010-12-09 19:39:58 -08:00
Nick Pelly
91ba0709b0 Update settings text on success, so we clear out error text after recovery.
Change-Id: Ie6bff9f1b56d0218120cf98638b9cbfe505bd02d
Signed-off-by: Nick Pelly <npelly@google.com>
2010-11-03 21:56:36 -05:00
Nick Pelly
e16f78d54a NFC Settings cleanup.
NFC service now tracks its own settings. Call the NFC API to determine
state.

Change-Id: Ibdb33e68abdbe36df31fb13ad95c8ca1b3bcb35b
Signed-off-by: Nick Pelly <npelly@google.com>
2010-10-20 18:42:23 -07:00
Brad Fitzpatrick
d36d650a81 NFC: async enabling/disabling, ala Bluewooth & Wifi.
Don't ANR when toggling.

Bug: 3097279
Change-Id: Ief09a5a4d023f32b02b2f3b72ac701e8089254c8
2010-10-18 15:25:49 -07:00
Amith Yamasani
1bdb7874ad Make summary appear for both checked and unchecked NFC checkbox in Settings.
And remove the extra "Tag" in the summary.

Bug: 3083079
Change-Id: I998c2556a88180098a060d43b720276a7619a368
2010-10-15 10:00:40 -07:00
Nick Pelly
083310d316 Update NFC settings description, and fix polarity.
Change-Id: I0d45652113617230e04536a7cc2ff148dd52595a
2010-10-12 21:22:54 -07:00
Nick Pelly
454d2ef051 Update settings app for new NFC API.
Change-Id: I2702e36d33591245fa86e00454348fc1a16f5cf8
Signed-off-by: Nick Pelly <npelly@google.com>
2010-10-12 13:07:06 -07:00
Nick Pelly
ad50ba065d Add NFC checkbox to Settings app.
Based on Trusted_NFC_Device_Host_AA03.01e02_google.zip code drop (23-Sep-2010)

Heavily modified to remove dead code.

Change-Id: I9e5f0bf2d32105feff4d68f03adebe87d2e9d900
2010-09-28 21:26:50 -07:00