Commit Graph

521 Commits

Author SHA1 Message Date
TreeHugger Robot
45a072ecac Merge "Robotests for BluetoothPairingDialog" 2016-10-26 01:33:28 +00:00
Jaewoong Jung
d0255d7673 Merge "Changes event handling phases for DeviceListPreferenceFragment." 2016-10-26 00:39:18 +00:00
Salvador Martinez
f492c28cc1 Robotests for BluetoothPairingDialog
Created some tests to protect some basic bluetooth
pairing dialogs features from regressing. Most of the
tests in this CL ensure that the view is properly
created and that it is properly updating the
associated controller when a relevant action occurs.

Test: make RunSettingsRoboTests
Bug: 32180625
Change-Id: I2f4103a39ffced52353712f952e8ff3d26590169
2016-10-25 17:18:53 -07:00
Salvador Martinez
d98d0837d8 Refactoring for bluetooth dialogs
Dialogs displayed when attempting to connect
to a bluetooth device have been refactored so
that they use a proper dialog fragment. Hardware
dependencies have also been refactored into a
controller class to make it possible to test
these dialogs as well as the controller
independently of one another.

Test: RoboTests
Bug: 32180625
Change-Id: I5447f8299bc13e139052635fc63546cbfc997f33
2016-10-18 11:13:44 -07:00
Jaewoong Jung
e8d5c8fda1 Changes event handling phases for DeviceListPreferenceFragment.
Bug: 31273140
Test: Manual inspection.

Change-Id: If4622b8d367813eb86a54a45f2e8fa4a55ca38b1
2016-10-13 11:22:54 -07:00
Fan Zhang
71ab9605a3 Use a Digit TtsSpan for pairing pins for talkback.
Fixes: 31539689
Test: manually enabled talkback and focused on bt pairing pin. Verified
read-out is digits instead of a big number.

Change-Id: I71c53094762a71459e70485470684c515053b600
2016-10-06 13:17:06 -07:00
Salvador Martinez
4d279a56f5 BluetoothDialog view fixed for no pair code case
BluetoothPairingDialog no longer asks for a
pair code when the user only needs to
confirm that they would like to connect
to a device. Also, the layout padding
was updated a bit to make it look nicer.

Test: RunSettingsRoboTests
Bug: 31340598
Change-Id: I9394fcd53dffcff9a17fbafabdce0e94ae88fba2
2016-09-30 21:04:20 +00:00
Fan Zhang
84e6446ca8 Connect button click handler for bluetooth forget dialog. am: f8c29641da am: e469371dac
am: c4a53b367e

Change-Id: Ie0968931c918718417948214b6ba7d54733c91cf
2016-09-28 02:04:26 +00:00
Fan Zhang
e469371dac Connect button click handler for bluetooth forget dialog.
am: f8c29641da

Change-Id: I2529056af5cfa947c85dcc6633bb2b4498ac9fa6
2016-09-28 01:57:49 +00:00
Fan Zhang
f8c29641da Connect button click handler for bluetooth forget dialog.
Bug: 31761184
Test: manual
Change-Id: I48aac6899cb9a49bf988d3b9e6480dfd6fe0c1c2
2016-09-27 22:45:58 +00:00
Andre Eisenbach
aa0bf8e052 Move Bluetooth device "Forget" button to the left am: aece754d77 am: 75e4d44f0d
am: ecee9e662d

Change-Id: Ibfc862406b4e67426a8686a7090d1ef1a93e7bb3
2016-09-26 22:05:52 +00:00
Andre Eisenbach
75e4d44f0d Move Bluetooth device "Forget" button to the left
am: aece754d77

Change-Id: I5732a476c5f6fb6753fc3d8a59b5ce9c293692b1
2016-09-26 21:52:13 +00:00
Andre Eisenbach
aece754d77 Move Bluetooth device "Forget" button to the left
"Forget" and "OK" actions are too close together.

Bug: 31693959
Change-Id: Iee452347a53b186df7aecad5d971edcfb7645f1d
2016-09-24 00:16:21 +00:00
Fan Zhang
aa71afe597 Use MetricsFeatureProvider for logging in Settings.
Bug: 31664539
Test: make RunSettingsRoboTests for regression
Test: adb logcat -b events | egrep "(sysui_|notification_)" for
      verifying log

Change-Id: Id944be7c4ff9911aebee481c2df485542f1318f0
2016-09-23 08:37:37 -07:00
Fan Zhang
1e516287bd Add visibility metrics to dialogs.
Bug: 30681529
Test: adb logcat -b events | egrep "(sysui_|notification_)"
Change-Id: I199d2e1b2cb8588a562b46bb8128d8ece24952f0
2016-09-19 17:34:12 -07:00
Robin Lee
788671647c Eliminate useless 'isManagedProfile' utils method
This exists in UserManager now

Change-Id: If35326a1fe0de3c7bfde842c5c170899dc5d819b
2016-09-12 16:25:28 +09:00
Svet Ganov
0cf1298a44 Update Bluetooth toggle UI to UX spec - settings
Change-Id: I171d3e55e8a480d304e4dc4e0debbd2f3ab27651
2016-09-01 16:47:09 -07:00
Ajay Panicker
9661c72700 Do not allow apps to cause Bluetooth to be discoverable forever am: 6dcab67c0c am: 091986f33a
am: c6f63a807f

Change-Id: I541318298961a88cf55d36769ffc4348d41b62fc
2016-08-18 22:09:10 +00:00
Ajay Panicker
091986f33a Do not allow apps to cause Bluetooth to be discoverable forever
am: 6dcab67c0c

Change-Id: Ifaef229a60b74bb2708159232fe8f6792ded7647
2016-08-18 21:57:51 +00:00
Fan Zhang
6507613ebc Log visibility change for all fragments.
Bug: 30681771
Test: SettingsUnitTests

Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.

Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
2016-08-18 14:04:13 -07:00
Ajay Panicker
6dcab67c0c Do not allow apps to cause Bluetooth to be discoverable forever
Trying to set a discoverable timout of 0 for Bluetooth will now
not allow bluetooth to be discoverable forever.

Bug: 28177801
Change-Id: Icfa03e2100f8e7f31415ebab39889b9ec32e6c77
2016-08-18 13:19:06 -07:00
Fan Zhang
97ca78975a Use same fallback bt name in Settings and notification.
Bug: 30126659
Change-Id: Id1432b459a4368bae9af6067307c4da0008f94aa
2016-08-08 14:48:24 -07:00
Erik Wolsheimer
a91c223657 Fix potential NPE in BluetoothPairingDialog#onDestroy am: 56c1b61e79
am: 116a68e633

Change-Id: I9a96540c9599b19c478e14629e53fa12eb59a8b8
2016-08-02 22:51:32 +00:00
Erik Wolsheimer
56c1b61e79 Fix potential NPE in BluetoothPairingDialog#onDestroy
BUG: 21478473
Change-Id: I8b2b7222f6f17d27cd18a35f83f8d48125ec4091
2016-08-01 09:18:37 -07:00
Jason Monk
3ac2f08f97 Fix multiple bluetooth devices bug am: 6666f9cc37
am: 5129b26123

Change-Id: Ib0e78cb33e6bfb46c39674efd70f42832a21beb8
2016-07-25 19:22:51 +00:00
Jason Monk
6666f9cc37 Fix multiple bluetooth devices bug
Was bug in some code trying to handle preference animations better.
Since those animations are all disabled now, just remove everything
again and re-add it.

Change-Id: If1ce07a8f2b4144d95a95cec6ebb1b423644825a
Fixes: 29314480
2016-07-25 10:37:39 -04:00
Svetoslav Ganov
b06766f129 Add Bluetooth toggle prompts - settings
If permission review is enabled toggling bluetoth on or off
results in a user prompt to collect consent. This applies
only to legacy apps, i.e. ones that don't support runtime
permissions as they target SDK 22.

bug:28715749

Change-Id: I5ae0c532c92b2c05a91f0d769ca6744002747fca
2016-07-22 20:08:44 -07:00
Christine Hallstrom
ac47013154 Log whether BT pairing dialog is accepted or canceled
Change-Id: I584cef273f16e27cd7e569b53abccedfe0bd0af7
2016-06-23 20:45:32 +00:00
Roozbeh Pournader
77893a4c4b BidiFormat adapter name for bluetooth_is_visible_message
Previously, adapter names which tend to be LTR and may appear at the
beginning of the string could cause the detected bidi direction of the whole
string (which would be RTL in RTL locales) to get miscalculated as LTR.

With this fix, not only the detected bidi direction would be correct,
but also odd adapter names would not impact the bidi layout of the
whole string.

Bug: 28816891
Change-Id: I1d25edbeeff7e9c013bb6c741e7f706431e721dc
2016-06-15 14:46:11 -07:00
Sanket Agarwal
77ad3c2531 Handle return value when Bluetooth is enabled
If the Bluetooth enable(true) returns false currently we are waiting for
a broadcast (which may not happen if enable returns false). We mark the
toggle to have failed (i.e. it is clickable and in OFF state) and the
switch bar text is appropriately shown.

Bug: b/28318203
Change-Id: I09ba46d2e102e7f2c4ef9a72bf38dedc1346364f
2016-05-19 18:27:03 +00:00
pkanwar
8fa3d44596 The "device type" icons in "Bluetooth device list" screen are
not accessible to TalkBack users.

b/28199679 Changed method to for setting the talk-back
attribute on "device type".

Change-Id: I63820d861ea1075195b98c82004ba95470448a53
2016-05-05 11:25:46 -07:00
Jason Monk
ac06fed1d2 Disable animations for bluetooth.
Change-Id: I2aa77d8ce91f81b6704b4f91766ee61c79afb2f8
Fixes: 28135206
2016-04-12 14:45:41 -04:00
Jason Monk
9e9ba0d751 Fix localization issues with disabled
Change-Id: Iba63b50000f546a1e323c855462841e82fce4df8
Fixes: 27948378
2016-04-11 09:58:55 -04:00
Sanket Agarwal
e5b8ec020c Merge "PBAP Pairing Permission" into nyc-dev 2016-04-05 23:39:55 +00:00
Joseph Pirozzo
e6de78375f PBAP Pairing Permission
Remove the always there checkbox for phonebook permission when pairing
from a device that supports the client side of PBAP rather than the
server side.  A device should not support both PBAP PSE and PCE.

Bug: 25933871
Change-Id: I9535bbb9d5fcdfeaa13a2fec3461f47bb5518e28
2016-03-30 11:46:50 -07:00
Jason Monk
2de6a287ca Merge changes I22d799f8,I1bc14e7a into nyc-dev
* changes:
  Guard against crash in dev options
  Switch to whitelist for animations
2016-03-28 14:14:01 +00:00
Jason Monk
f38fb38f26 Switch to whitelist for animations
Disable animations for all SettingsPreferenceFragments, unless they
explicitly ask for them before creating their preference screens.

Turn it on for all fragments using the cached removal currently.

Bug: 27713314
Change-Id: I1bc14e7aeb3ee5b8ddb4f3547f472305cd312edf
2016-03-18 15:16:12 -04:00
Jason Monk
38d8fc0f86 Fix bluetooth device forgetting
Bug: 27476922
Change-Id: I8c5b7076a04185371311fb4ff1c1ba0df0df19dc
2016-03-18 14:11:25 -04:00
Jason Monk
15036eea99 Fix missing bluetooth settings items
In the off/turning on state all items were being removed, but never
re-added to the preference screen.

Bug: 27347029
Change-Id: I8f47ee79f428fc8555a0dc6574244c81aa85c6c8
2016-03-07 10:02:35 -05:00
Jason Monk
2071eda150 Workarounds to avoid removing all prefs
Removing all prefs causes ugly animations, so avoid it at all cost
and cache all the prefs (while still added) as long as possible.

Bug: 26271353
Change-Id: I33b84d751938b460f4b66c0158057407dd45d974
2016-02-26 11:00:01 -05:00
bohu
625bc4bd21 Emulator: avoid accessing null BluetoothAdapter
bug: 27324609
Emulator has no bluetooth support at this moment, and settings
should not crash in this case.

Change-Id: I1bfc6c907ac02d4798b6c118291e6a9d1bf23c7c
2016-02-24 06:55:16 -08:00
Sudheer Shanka
7dbbe13168 Add disabled by policy empty views to more screens.
Bug: 27214401
Change-Id: I6cd4292a63610671070bf2134105e9e348c3ab32
2016-02-19 20:18:43 +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
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05:00
Sudheer Shanka
95a71e06eb Add disabled by policy message as empty views in preferencefragment.
Change-Id: I296dc02c8e5cbea74f8415f4c8c5723f85e20b5b
2016-01-25 14:05:46 +00:00
Jason Monk
3069581512 Summary support for Settings Home
Also add summaries to a few of the major items.

Change-Id: I17924f14941fe095d819e142cdd21cf4b4e9ffd1
2015-11-17 13:51:45 -05:00
Sanket Padawe
1b4ab5f05f Uncheck checkbox for contact sharing by default for non carkit devices. am: dbc47fb262 am: 0ad16831ee am: df5b8c5b65
am: f20ba4b797

* commit 'f20ba4b797b0b11208aa72d822c17d7ab972a32e':
  Uncheck checkbox for contact sharing by default for non carkit devices.
2015-11-13 00:11:59 +00:00
Sanket Padawe
dbc47fb262 Uncheck checkbox for contact sharing by default for non carkit devices.
+ In BT pairing dialog, uncheck checkbox for contact sharing by default
for devices not recognized as carkits at pair time.

Bug: 23607427
Change-Id: I7f1d40d86e713e248d3c225459be4895c4f75d76
2015-11-12 14:55:51 -08:00
Jeff Sharkey
2f43b146f5 Merge branch \'mnc-dr-dev-plus-aosp\' of /usr/local/google/game/mirror/googleplex-android_googlesource_com/platform/packages/apps/Settings into mnc-dr-dev-plus-aosp
am: ead9448b4a

* commit 'ead9448b4a9284543e875115dde389444f2e2e3e':
  Always show pairing dialog for device-specific keyboard.
2015-10-20 23:14:42 +00:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00