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 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
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
Previously, DonutView used Canvas.drawText with a Paint with default
bidi directions, which is LTR. This meant that even in RTL locales,
text was displayed assuming the direction of the paragraph the text
was appearing in was LTR. This caused an incorrect display of Arabic
percentages.
Now we set the Paint bidiFlags according to the Locale's direction.
Change-Id: Ic10228b8a23dc49de60246c37adfbaf7f8fd4e9e
Fixes: 63767043
Test: Manual (tested in ar-EG, ar-MA, fa-IR, ur-PK, and he-IL locales)
When the user enters a wrong pattern/pin/password, a "Wrong
pattern/pin/password" text shows up on ConfirmLockPattern or
ConfirmLockPassword screen. In ConfirmLockPassword, it disappears
automatically after 3 seconds, whereas it doesn't in ConfirmLockPattern.
In this change, we make the prompt in ConfirmLockPattern disappear
automatically as well.
Bug: 64781905
Test: manual
Test: make RunSettingsRoboTests
Change-Id: I53a25576413671ced4197064d51fbcc397733265
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