Commit Graph

2327 Commits

Author SHA1 Message Date
Jack He
19ba320263 Bluetooth: Only show devices when their names are resolved
* Add a developer menu option to allow name-less devices to be shown
  when a Bluetooth developer needs it, but hide it for non-developer
  users.
* Set BluetoothDevicePreference to invisible when CachedBluetoothDevice
  does not have a name besides MAC address and the above developer option
  is false.
* This affects BluetoothPairingDetail and DevicePickerFragment, but does
  not affect BluetoothSettings. BluetoothSettings will show all paired
  devices regardless whether an user friendly name exists.

Bug: 34685932
Test: pair Bluetooth device, send file over Bluetooth, unit tests
Change-Id: Idd7ad4b1671dfdcf3204efb50eddb6dae1065aa5
2017-08-25 16:27:30 -07:00
TreeHugger Robot
77bd8c3a73 Merge "Add battery indicator to bluetooth icon" into oc-mr1-dev 2017-08-25 18:25:03 +00:00
jackqdyulei
7661137981 Add battery indicator to bluetooth icon
This cl change util method in bluetooth package to return
drawable instead of resId.

If the bt device has battery level, then method return customized
layerDrawable, otherwise return a simple drawable created from
resId.

Bug: 63393322
Test: RunSettingsRoboTests

Change-Id: Ib21822eafda0e8570212ce5cb070478e4f4876a2
Merged-In: Ib21822eafda0e8570212ce5cb070478e4f4876a2
2017-08-24 16:53:01 -07:00
Doris Ling
5b01294d84 Fix jank in showing conditions and suggestions in cold start.
When we first initialize the dashboard view, and register the condition
listener, it will trigger the condition changed callback immediately.
This results in unnecessary refresh of the dashboard header. Add check
to not do the refresh when we first initialize the view.

Change-Id: If7c69637463734c150b7f5eb7f3c042cf73837fa
Fixes: 64811475
Test: make RunSettingsRoboTests
2017-08-24 13:53:30 -07:00
TreeHugger Robot
efcc8be05c Merge "Move the Robolectric shadow config up." into oc-mr1-dev 2017-08-24 19:27:23 +00:00
TreeHugger Robot
f83b94aa0c Merge "Extending SearchFeatureProvider API to provide timeout" into oc-mr1-dev 2017-08-24 04:11:48 +00:00
TreeHugger Robot
d94fbbc325 Merge "Fix null pointer exception when logging suggestions." into oc-mr1-dev 2017-08-24 00:36:43 +00:00
TreeHugger Robot
0e800978bf Merge "Set preference invisible when no anomaly" into oc-mr1-dev 2017-08-23 19:57:41 +00:00
TreeHugger Robot
d0066e3875 Merge "Update strings when shortString is true" into oc-mr1-dev 2017-08-23 19:38:40 +00:00
jackqdyulei
4242ee0dd4 Set preference invisible when no anomaly
In the previous code path, we will create an invisible anomaly preference
and update it to visible if it contains any anomaly. However, when
anomaly is dismissed we don't reset preference to invisible.

So, this cl adds code to set it to invisible explicitly when anomaly list
is empty.

Bug: 64617126
Test: RunSettingsRoboTests
Change-Id: Ie7a3498da91243f05f4c47fb1cc5f67b177d04b1
2017-08-23 10:09:19 -07:00
TreeHugger Robot
a097d68c4b Merge "Stop display "Cell network" item for tablet" into oc-mr1-dev 2017-08-23 01:42:42 +00:00
Soroosh Mariooryad
98fc9b139c Extending SearchFeatureProvider API to provide timeout
Bug: 38197948
Test: RunSettingsRoboTests

Change-Id: I5b04085ba93061dafe8977b42ebe5092bc9a9d09
2017-08-22 10:38:32 -07:00
Tony Mak
c74bbcd3b2 A separate entry for work profile CA cert
We mixed both primary and work profile CA certs into single entry
previously which is not aligned with the CTS requirement.
Separate them from now.

Test: m -j RoboSettingsTest
Test: Run related manual test in CtsVerifier

Bug: 64567417

Change-Id: Iaff2d9f25ef15b96c11727e7075bdae8e90ec8ce
2017-08-22 18:24:30 +01:00
Daniel Nishi
739b0eef10 Move the Robolectric shadow config up.
In my testing, this reduces the runtime of the Robolectric Settings test
suite on my Z840 workstation from 440 seconds to 402 seconds on average.
By avoiding having a method-level Robolectric shadow import, we avoid
going down a code path which needs to add more shadows later in the
Robolectric execution.

Bug: 64808827
Test: Settings robotests still pass
Change-Id: I7b40d73b30306ae3f9759281afbd7f7266579e24
2017-08-17 14:37:27 -07:00
TreeHugger Robot
f51b4a580f Merge "Suppress some search results" into oc-mr1-dev 2017-08-17 01:20:42 +00:00
Doris Ling
97da51876b Fix null pointer exception when logging suggestions.
In monkey test, the suggestions list can become null. So, add check
for valid suggestions list before trying to iterate through the
suggestions.

Fixes: 64757618
Test: make RunSettingsRoboTests
Change-Id: Ib670808a4f222187b9cd53d7d939e71b5ce8dbae
2017-08-16 15:26:03 -07:00
Fan Zhang
83eaff5e4a Suppress some search results
Fixes: 62137086
Test: reindex search
Test: robotests
Change-Id: I12e873edade80e4c0007d10352fb037b3230c643
2017-08-16 22:25:29 +00:00
Antony Sargent
563c4a6557 Fix rotation bug in Bluetooth pairing PIN dialog
BluetoothPairingDialogFragment has code that makes the OK button on the
dialog disabled until the user has entered at least one character into
the PIN field. However it didn't properly handle the case where the user
had entered some text and then rotated the screen - because it always
marked the OK button as disabled during onShow even if it already had
some content. This CL fixes that by looking at the text content and only
disabling the OK button if the content is empty.

Bug: 36514895
Test: make RunSettingsRoboTests
Change-Id: I4e8e70089a862e67b20ff614bbaa64fc2b641fd4
2017-08-16 15:19:47 -07:00
jackqdyulei
ae4b79ee6d Update strings when shortString is true
After b/64124535, battery strings in settings page use shortString
version. This cl updates the charging string in this situation to
match the mock.

Note that no matter whether we use shorString, the chargingLabel
should remain the same.

Bug: 64752046
Test: RunSettingsRoboTests
Change-Id: I4395d4660e212688cd560ca0b124acbd9c099cc9
2017-08-16 14:42:35 -07:00
Ajay Nadathur
719d80e6e0 Merge "Update strings for skip fingerprint setup" into oc-mr1-dev 2017-08-11 17:12:26 +00:00
TreeHugger Robot
14450c5669 Merge "Clean up AssistGesturePreferenceController" into oc-mr1-dev 2017-08-11 03:01:33 +00:00
Kevin Chyn
bd947c7ba9 Clean up AssistGesturePreferenceController
The preference controller shouldn't be shared between the
"Assist Gesture" parent setting, and the child setting within

Fixes: 64318213

Test: manual test of settings && make -j RunSettingsRoboTests
Change-Id: I2d2437e2036881a08977924dc1386aa1fab67070
2017-08-11 00:58:09 +00:00
Ajay Nadathur
58c2da2d9e Update strings for skip fingerprint setup
bug: 64092225
Test: Manually tested and verified updated strings used
Change-Id: I813f72abb8cb9fd2ba9ec952c0926ecd2f670ed0
2017-08-11 00:42:30 +00:00
jackqdyulei
28284a52e6 Stop display "Cell network" item for tablet
If device doesn't support MOBILE_DATA, then stop show
"Mobile network standby" in battery advanced page.

Bug: 63252393
Test: RunSettingsRoboTests
Change-Id: Icaf5c0c781c96fa1d4df999c6769c27a84c27446
2017-08-10 13:33:25 -07:00
Antony Sargent
8cd8519eab Merge "Stay discoverable in Bluetooth settings and pairing pages" into oc-dr1-dev
am: 49cd8f2327

Change-Id: I4b8989fd95405bfeb7ada518b0ce2f76dec5cdb3
2017-08-10 07:25:53 +00:00
TreeHugger Robot
49cd8f2327 Merge "Stay discoverable in Bluetooth settings and pairing pages" into oc-dr1-dev 2017-08-10 07:23:29 +00:00
Antony Sargent
c86440538f Stay discoverable in Bluetooth settings and pairing pages
There are two problems with the Bluetooth settings and pairing pages
that are fixed by this CL:

(1) We advertise on the page that the local device is visible to other
devices, but that only lasts for the length of the default timeout (120
seconds) for the local adapter being in discoverable mode.

(2) Both the BluetoothSettings and BluetoothPairingDetail fragments
enter discoverable mode in their onStart handler and exit it in their
onStop handler. Unfortunately when doing a fragment navigation the
onStart and onStop events interleave in a non-intuitive manner. When you
go from BluetoothSettings to BluetoothPairingDetail, we see the onStop
event for BluetoothSettings *after* the onStart event for
BluetoothPairingDetail, and similarly when going back from
BluetoothSettings to BluetoothPairingDetail. What this means in practice
is that if you go to the BluetoothSettings page, the device will be
discoverable, but once you navigate to BluetoothPairingDetail or back
again you won't be discoverable again until you go somewhere else or end
the settings activity.

This CL adds a new object called AlwaysDiscoverable which can be used to
start and stop a mode of "always being discoverable". While started, it
will listen for changes to the discoverable state, and return to
discoverable mode. This fixes (1) by returning to discoverable mode
whenever the normal timeout expires, and (2) similary by returning to
discoverable mode when we accidentally exit it due to the onStop/onStart
mismatch.

A better fix for (2) would be to avoid the "glitch" of briefly exiting
discoverable mode only to re-enter it, but the implementation of that is
a little more complicated so that's being left as future work in order
to keep this CL as small as possible.

Bug: 64130265
Test: make RunSettingsRoboTests
Change-Id: I559dd8187263ea6a0008be1a8abdfffac97cb87a
2017-08-09 22:10:40 -07:00
TreeHugger Robot
7074e25a0e Merge "Log preference change as Integer instead of Long." into oc-mr1-dev 2017-08-10 03:41:07 +00:00
TreeHugger Robot
db56114b34 Merge "Initialize the volume seekbar preference max and progress." into oc-mr1-dev 2017-08-10 01:41:45 +00:00
Doris Ling
9dbd807ea1 Log preference change as Integer instead of Long.
Change-Id: I3dc93a4b8a5aa7f03bef05d39bd4504ed205334f
Fix: 64485529
Test: make RunSettingsRoboTests
2017-08-09 17:36:02 -07:00
TreeHugger Robot
5b820431d3 Merge "Delete DynamicindexableContentMonitor & all refs to it" into oc-mr1-dev 2017-08-10 00:28:03 +00:00
Fan Zhang
e3535d9998 Delete DynamicindexableContentMonitor & all refs to it
Convert input device search into a search query loader

And remove old logic from DynamicIndexableContentMonitor

Change-Id: If652b1ea7c8add9185bbd025055e14925d3a8eec
Bug: 64310452
Bug: 63831980
Test: robotests
2017-08-09 17:27:02 -07:00
Daniel Nishi
8bbc28a95b Merge "Expose the notification-swipe controls." into oc-dr1-dev
am: c075f8943e

Change-Id: I479a411c032df7426d89838a668f4303c4d67a54
2017-08-09 22:37:34 +00:00
Justin Klaassen
a22c8345fa DO NOT MERGE - Ask device owner for master clear in demo mode
Bug: 62712426
Test: make RunSettingsRoboTests -j19
Change-Id: I29f92ff1062590f2c5eb7713e5969da7870fc582
2017-08-09 15:37:01 -07:00
Doris Ling
b7490bea28 Initialize the volume seekbar preference max and progress.
When the media stream is set, initialize the preference max and progress
with the streams current value. Otherwise, when we initialize the seekbar
volumizer, it will first set the seekbar max to 0 and progress to 0,
then update with the correct value, which will result in the jank that
is seen when the sound settings are displayed.

Change-Id: I515c97bbc6ec38bbe92755e3d7cb53bb13ac52d0
Fix: 34035654
Test: make RunSettingsRoboTests
2017-08-09 13:56:13 -07:00
Salvador Martinez
7bc388d823 Merge "Update availability for mobile network" into oc-dr1-dev
am: 4bcc3eb193

Change-Id: I8dca27c407709961ed28c64b76304894d5456781
2017-08-09 20:21:32 +00:00
TreeHugger Robot
0ed0319005 Merge "Show confirmation dialog when user tries to skip fingerprint" into oc-mr1-dev 2017-08-09 20:15:20 +00:00
TreeHugger Robot
d59854de24 Merge "Ask device owner for master clear in demo mode" into oc-mr1-dev 2017-08-09 19:40:03 +00:00
Daniel Nishi
97e0e42959 Merge "Add floats to the SecureSettings shadow." into oc-dr1-dev 2017-08-09 19:25:35 +00:00
TreeHugger Robot
3161375f78 Merge "Fix DataSaverBackend objects created on background threads" into oc-dr1-dev 2017-08-09 19:15:27 +00:00
TreeHugger Robot
e0c0616d6f Merge "Fix DataSaverBackend objects created on background threads" into oc-mr1-dev 2017-08-09 18:22:21 +00:00
TreeHugger Robot
293899d5ce Merge "Refresh preferences when background data switch is toggled" into oc-mr1-dev 2017-08-09 17:53:22 +00:00
Ajay Nadathur
bf3a135170 Show confirmation dialog when user tries to skip fingerprint
- After the user finished adding lock screen, if the user tries to skip
fingerprint setup, show a confirmation dialog

bug: 64092225
Test: Manually tested; robolectric tests also added
Change-Id: Iba5088a9db93153988942cf78f11077f427e50cb
2017-08-09 17:51:50 +00:00
Justin Klaassen
3025727e16 Ask device owner for master clear in demo mode
Bug: 62712426
Test: make RunSettingsRoboTests -j19
Change-Id: I29f92ff1062590f2c5eb7713e5969da7870fc582
2017-08-09 10:44:19 -07:00
Daniel Nishi
c075f8943e Merge "Expose the notification-swipe controls." into oc-dr1-dev 2017-08-09 16:16:49 +00:00
Matthew Fritze
7c1825aa64 Fix DataSaverBackend objects created on background threads
Add the main looper to the handler created with each
DataSaverBackend to avoid crashes when the objects are
created on background threads.

Bug: 62022517
Test: make RunSettingsRoboTests
Change-Id: I7396107e4ed06982c8cd300912ce1f4e3c63df4c
Merged-In: Ie5ffabbfbe7660761527b3ecd51e6bc5a43c1ace
2017-08-09 02:06:42 +00:00
Matthew Fritze
c6211c8829 Fix DataSaverBackend objects created on background threads
Add the main looper to the handler created with each
DataSaverBackend to avoid crashes when the objects are
created on background threads.

Bug: 62022517
Test: make RunSettingsRoboTests
Change-Id: Ie5ffabbfbe7660761527b3ecd51e6bc5a43c1ace
2017-08-08 19:03:43 -07:00
Fan Zhang
816efc02fc Refresh preferences when background data switch is toggled
Change-Id: Id58f565645fc3c668b516dbd05049559afa9535e
Fixes: 64466310
Test: robotests
2017-08-08 17:38:28 -07:00
Daniel Nishi
f89327aa88 Expose the notification-swipe controls.
Bug: 62022517
Test: Settings robotest
Change-Id: I41368a9e03f38052bb47d04f6b98d56808d07e48
2017-08-08 17:30:38 -07:00
TreeHugger Robot
fef5f6aa4a Merge "Clean up logic for dismissing suggestion" into oc-mr1-dev 2017-08-08 22:13:13 +00:00