Commit Graph

132 Commits

Author SHA1 Message Date
Fan Zhang
00d617df0b Update bluetooth summary text when state changes.
- Refresh connected state before setting summary text.
- Detect inconsistent state (BT manager says connected but doesn't
  provide a connected device)

(This basically syncs implementation between settings and QS tile)

Change-Id: Id23138f8432b9aecd194f5016bf2576e33e8ca98
Fixes: 33341275
Test: RunSettingsRoboTests
2016-12-27 14:18:58 -08:00
Fan Zhang
ec407ff78c Left align preferences and graphs to leave space for icon.
Bug: 33559277
Test: Visual inspection
Change-Id: Iacf9556826174a03b1cbf8a6f179b63d8686c5f5
2016-12-19 13:41:37 -08:00
Fan Zhang
d5b48454a3 Build a new FooterPreference UI.
- Create a new layout for footer prefs.
- Create a new FooterPreference type to use the layout
- Create a Mixin to create and add the pref to screen
- Create a new lifecycle observer type to invoke mixin at right time
- Switch SettingsPreferenceFragment to use footer mixin.
- Switch FingerprintSettings to use the new footer pref.

Bug: 33579394
Test: RunSettingsRoboTests
Change-Id: I548ac39a0d120196a7ffed09b4f98bd9a80bae90
2016-12-14 16:41:49 -08:00
Tamas Berghammer
265d3c2a0c Update package names to work with the proto3 compiler
Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
2016-11-08 14:06:17 +00: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
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
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
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
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
Jason Monk
9e9ba0d751 Fix localization issues with disabled
Change-Id: Iba63b50000f546a1e323c855462841e82fce4df8
Fixes: 27948378
2016-04-11 09:58:55 -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
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Avish Shah
ad1f28cde0 Device Discoverability not set properly when Bluetooth is toggled
Issue:
When BT is turned off/on staying in the same BT Settings
screen discoverability was not set again.

Fix:
Handle setting discoverability Bluetooth state change
intents also when BT state is  turned ON.

Bug: 21944289
Change-Id: Ic3c8d476c53673b21d40ea2bd9669758d89c2aee
2015-07-01 01:35:29 +00:00
Lifu Tang
55601622d5 Language Update for Wi-Fi/Bluetooth Scanning
Bug: 22046234
Change-Id: Iea8fa2368d1e568a8e1fdd3edefa8f4fc6053e48
2015-06-23 18:54:27 -07:00
Jason Monk
0d7d927216 Change DeviceProfilesSettings to DialogFragment
This makes the lifecycle simpler to fix a crash after rotation.
Also do some adjusting of alignment while here.

Bug: 21444336
Bug: 21205689
Change-Id: I67eccf4833f53b5e5088ae5e6038d041e8653565
2015-06-02 16:33:57 -04:00
Jason Monk
f2819e0ead Fix battery usage screen issues
Tint icons properly
Bug: 21077770

Show better icons for wifi and bt (remove the old ones)
Bug: 21172936

Also add a way to show fake items in power list for testing.

Change-Id: I6b6804673a68190ebc3f2ea32802e30811a7f5b2
2015-06-02 16:03:32 -04:00
Sanket Padawe
d713980221 Merge "Start bluetooth scan on screen orientation change." into mnc-dev 2015-05-13 20:00:13 +00:00
Sanket Padawe
95de1ae40f Start bluetooth scan on screen orientation change.
Bug: 20666842
Change-Id: I95975f46c1ead1399c8f1a9197bd7357992cc3b0
2015-05-11 13:09:59 -07:00
Chris Wren
1b6ffba9e6 log more settings actions
airplane mode
  bluetooth
  cell data
  do not disturb

Bug: 20264417
Change-Id: I726033a126fba9f9dffc916806d636feea04033b
2015-05-08 18:48:24 -04:00
Lifu Tang
be794c30ca Added links to scanning settings
Bug: 19918721
Change-Id: Ifb1508807d34b675e9ea1522f86a9310ed6b663f
2015-04-06 11:00:04 -07:00
Chris Wren
8a963babe2 log visibility of views
Depends-On: I5b1dccb5d103ece3112acf38889bae16273b092f
Change-Id: I116aed2bb805f723a5bf2ec9eb94257de0b4a7b5
2015-03-27 13:39:07 -04:00
Jason Monk
f2982a9ba1 Move isolatable bluetooth code to SettingsLib
Move the non-ui bluetooth control/tracking code to SettingsLib so
that it can be shared with others.

Mostly just move classes to frameworks/base/packages/SettingsLib,
however a few things had to move around.
 - Dock handling had to move back to code still in settings
 - Local preference related code had to be moved back to settings
 - Added an error flow from SettingsLib to Settings

Depends on I69fd888362c6dbb325f6113b32c4b15cc6a23a41
Bug: 19180466
Change-Id: Ie57fe26a27bbb0adc2ef69e042a05c7290c6a52a
2015-02-05 10:43:57 -05:00
PauloftheWest
9bab4ea695 Fixed a Bluetooth discovery bug.
+ Now when a user goes to Settings->Bluetooth and turns on Bluetooth,
the device will be discoverable.

Bug: 17368189
Change-Id: Ia0d8000ddf7e3c3b43172c08ee28e7305d205462
2014-09-19 14:07:29 -07:00
PauloftheWest
8d6991348b Fixed multiple Bluetooth Settings crashes.
+ Fixed a crash when selecting On/Off multiple times on an input device.
+ Fixed a crash when visiting different Bluetooth Settings after
disabling an input device.

Bug: 17402421
Change-Id: I23efa3a36ba8cf0df02cf41397586a10dae9e08c
2014-09-11 12:36:58 -07:00
PauloftheWest
1675c786bf Merge "Made Bluetooth device dialog fully scrollable." into lmp-dev 2014-09-10 22:11:56 +00:00
PauloftheWest
26747b9da0 Made Bluetooth device dialog fully scrollable.
+ Also updated padding around Available Devices.
+ Also updated opacity on Bluetooth's "your device is visible" message.

Bug: 17398966
Change-Id: Id9631334ee0f3a01e40b00470d6debf6a31abe47
2014-09-10 14:33:52 -07:00
Matthew Xie
72e5583d2a Merge "Do not remove bonded devices from cached device list upon a device scan" into lmp-dev 2014-09-10 00:48:41 +00:00
Matthew Xie
b17031bed0 Do not remove bonded devices from cached device list upon a device scan
Bug: 17405122

Change-Id: I3f5cc6ddc8f85d3b6223f9ff60e1d5eeb76c530a
2014-09-09 15:12:43 -07:00
PauloftheWest
5fe30ea841 Merge "Turning Bluetooth on will make the device discoverable." into lmp-dev 2014-09-08 21:00:11 +00:00
PauloftheWest
469c812878 Turning Bluetooth on will make the device discoverable.
Bug: 17368189
Change-Id: Ic526fb1ff9dcc15e6fe1db055a471cc570b6a2e1
2014-09-08 13:31:53 -07:00
PauloftheWest
6a1a6a943a Bug fix: Toggling Bluetooth off then on will now initiate a scan.
Bug: 17380015
Change-Id: Ie07d9a4f737df32aba7e400b028144f7a81cb37e
2014-09-04 14:10:24 -07:00
PauloftheWest
dba078fe86 Fixed a crash when loading Bluetooth Settings.
Bug: 17320674
Change-Id: Ibff0b5929b88b1a48c1fdd810fd8461bdb5f1274
2014-09-02 14:24:38 -07:00
PauloftheWest
18fbf724aa Merge "Entering Bluetooth in Settings will always initiate a scan." into lmp-dev 2014-08-27 17:24:41 +00:00
PauloftheWest
27bd00ba27 Entering Bluetooth in Settings will always initiate a scan.
Bug: 17060518
Change-Id: I4ba13097f664b4a758ba714f423fa8b34af60ce6
2014-08-20 13:23:49 -07:00
PauloftheWest
637f1b4e45 Fixed a Bluetooth Scanning issue.
+ When refreshing Bluetooth devices, sometimes it took awhile for some
devices to come back up.  This is a fix.

Bug: 17049458
Change-Id: Id6233b38585e003e0432707663af4d06b0ce98c2
2014-08-18 15:00:19 -07:00
PauloftheWest
f8cdcbf19c Revert "Add BT message access"
- removed Message Access screen from Bluetooth overflow

Bug: 15720425
Change-Id: I68191a4639ea7e6b6cd3a60e88160443fab2ba0e
2014-08-12 14:18:35 -07:00
PauloftheWest
f42a0a27e3 Refreshing Bluetooth devices will clear all available devices.
Bug: 16851309
Change-Id: I9ffb1ddaeb8e785be145ea79467fc361a022d8d7
2014-08-12 07:35:11 -07:00
PauloftheWest
ed7b44d83d Fixed Bluetooth renaming bug.
+ After renaming your Bluetooth device, the title of the Bluetooth
    Activity stays "Bluetooth" instead of changing to the new name.
+ After renaming the device, the status at the bottom Bluetooth Settings
    is correctly displayed.

Bug: 16463239
Change-Id: Ifb12df2004fe1f89bd6f918e23c2c64ae08a0191
2014-08-08 09:34:15 -07:00
PauloftheWest
689d2ce29b Changed a Bluetooth device's settings from an activity to a dialog.
+ Replace the “Paired bluetooth device” screen with a “Pair device” dialog
+ Add device name text field at the top
+ Replace “Unpair” list item with a “Forget" button at bottom of dialog
+ Change “Profiles” section header to “Use for”
+ Remove status under profile titles
+ Move checkboxes to left side of labels

Bug: 15719219
Change-Id: I3b0e8c82c761fae98f16508b9fd9c58aff651f80
2014-08-07 11:31:25 -07:00
Julia Reynolds
1a0297c544 Use restrictionsprovider framework in Settings.
Bug: 15305103

Change-Id: Ib0147e366fe90de3512d0cc06e2a47ee16012dff
2014-07-23 21:06:21 +00:00
PauloftheWest
059a70fdc0 Numerous minor updates for Bluetooth Settings
+ Remove top "this device" item from the list
+ Upon opening Bluetooth settings, cue a search for available, pair-ready devices
+ Upon opening Bluetooth settings, make the phone/tablet visible to other devices
+ Keep phone/tablet visible as long Bluetooth settings is open and screen is on
+ Filter this list so that only pair-ready devices are displayed
+ Add non-interactive text “<Device name> is now visible to nearby devices” at the bottom of the available devices list

Overflow menu:
- Remove “visibility timeout”
+ Replace “Search for devices” with “Refresh”

Bug: 15716927

Change-Id: I7c5225784af9bfb48dde511e05503ddc59be2b2b
2014-07-11 16:52:47 -07:00
PauloftheWest
c9dc66d605 Add BT message access
+ List available email accounts
+ Allow for turning each account on/off with switches--making the message content available to bluetooth devices that can read emails (like cars)

Bug: 15720425

Change-Id: Ia0c91c1e74a2644fc99a8b902c42212453d8f86e
2014-07-11 15:55:00 -07:00
Fabrice Di Meglio
ab9d6985fa Fix ProgressCategory theming and layout
- add missing constructors for correct theming
- fix layout by adding missing paddingStart / paddingEnd

Change-Id: I52a511d326b760a47339b2b9dad349c9f825dbd2
2014-06-17 14:20:09 -07:00