* 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
This cl:
Set up the environment for functional test
1. Update Android.mk by adding instrumentation and libs
2. Update AndroidManifest.xml by adding runner
Add functional test for bt anomaly, with the following workflow
1. reset battery stats
2. pretend unplug and screen off
3. Start AnomalyTester app, set values and click start button
4. Wait its running
5. Check anomaly preference in battery main page
6. reset all parameters
Bug: 63815938
Test: runtest -x BluetoothAnomalyTest
Change-Id: Ief02a314d21f6c32d70729047a1d4bdce9ad9920
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
This cl adds action to hold the wakelock for specific time. With
this action we could test whether wakelock detector is effective.
Bug: 2731722
Test: make -j40 AnomalyTester
Change-Id: I1d44c12363f126ea9b8fc44f4c135e46b898186c
This cl adds the action to start bluttooth unoptimized scanning.
With this action we could test whether bt anomaly detector is
effective.
Bug: 62602318
Test: make -j40 AnomalyTester
Change-Id: I7f41dbb07384fbf3c5a81e460a3629306bc33f59
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
This cl set up the basic android framework for anomly test app.
Anomaly test app has the similar architecture compared with
settings api tester.
1. Add Android.mk and AndroidManifest.xml
2. Add blank AnomalyActivity
3. Add related resource files.
Bug: 62602318
Test: make -j40 AnomalyTester
Change-Id: I1d59517c9c2d8d0b8e219e3a67dfae73ca5a968e
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
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
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
Bug: 36719359
Test: runtest --path
packages/apps/Settings/tests/unit/src/com/android/settings/wifi/SavedNetworkSettingsTest.java
Test: Open saved networks from WifiSettings. Ensure that exiting and
resuming the activity keeps the "Add Network" button on the bottom of
the network list. This is tested through the cases where networks are
forgotten/saved before resuming, and that pausing/resuming when the dialog
is open or closed does not affect the result.
Change-Id: Ib719a1f6b9468c0f8f44470eeed9144904672cf1
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
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
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
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
If device doesn't support MOBILE_DATA, then stop show
"Mobile network standby" in battery advanced page.
Bug: 63252393
Test: RunSettingsRoboTests
Change-Id: Icaf5c0c781c96fa1d4df999c6769c27a84c27446
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
Convert input device search into a search query loader
And remove old logic from DynamicIndexableContentMonitor
Change-Id: If652b1ea7c8add9185bbd025055e14925d3a8eec
Bug: 64310452
Bug: 63831980
Test: robotests
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