Commit Graph

38886 Commits

Author SHA1 Message Date
jackqdyulei
d8bfc74256 Add functional test for wakelock anomaly detector
Bug: 63815938
Test: runtest -x WakelockAnomalyTest
Change-Id: I4d10d5be8b38264f29c67c2c945fdbbd1090430d
2017-08-25 14:02:39 -07:00
jackqdyulei
e4298941b4 Add functional test for bt anomaly detector
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
2017-08-25 13:45:16 -07:00
jackqdyulei
0cc62f860c Add wakelock action in testing app
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
2017-08-24 16:15:44 -07:00
jackqdyulei
9d78df0d30 Add bt anomaly action in testing app
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
2017-08-24 16:15:24 -07:00
TreeHugger Robot
efcc8be05c Merge "Move the Robolectric shadow config up." into oc-mr1-dev 2017-08-24 19:27:23 +00:00
Lei Yu
3949ed53a9 Merge "Add UI components for bluetooth anomaly" into oc-mr1-dev 2017-08-24 17:35:15 +00:00
Lei Yu
8cac6b07bc Merge "Set up anomaly test app in settings" into oc-mr1-dev 2017-08-24 17:34:56 +00:00
TreeHugger Robot
8dce5e57c3 Merge "Import translations. DO NOT MERGE" into oc-mr1-dev 2017-08-24 07:49:30 +00:00
Bill Yi
89ebaf6c52 Import translations. DO NOT MERGE
am: 683fdb8177  -s ours

Change-Id: I6d6c17a868765261ace38e0532c95695c2dfb840
2017-08-24 07:37:10 +00:00
Bill Yi
683fdb8177 Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import

Bug: 64712476
Change-Id: I452434cbf7282ba20233b9345b75ebdf9251ef98
2017-08-23 22:15:37 -07:00
Bill Yi
ed1712a7ef Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import

Bug: 64712476
Change-Id: I5ac7b8c39cb58c662a744ac1c0608ed901fb670e
2017-08-23 21:58:28 -07: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
a78eeb2d61 Merge "Add a "Add Network" button to SavedAccessPointsWifiSettings" into oc-mr1-dev 2017-08-24 01:43:58 +00:00
jackqdyulei
693fe62fe0 Add UI components for bluetooth anomaly
Bug: 62602318
Test: make -j40 AnomalyTester
Change-Id: I4584e6ada784d8d87558a5b30cf55e2de33d443a
2017-08-23 17:37:18 -07:00
TreeHugger Robot
d94fbbc325 Merge "Fix null pointer exception when logging suggestions." into oc-mr1-dev 2017-08-24 00:36:43 +00:00
jackqdyulei
7e97d2d9a5 Set up anomaly test app in settings
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
2017-08-23 17:35:26 -07: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
TreeHugger Robot
a6b67d15eb Merge "Pattern entry views should be consistent" into oc-mr1-dev 2017-08-23 00:24:13 +00:00
TreeHugger Robot
e040ef4a39 Merge "A separate entry for work profile CA cert" into oc-mr1-dev 2017-08-22 18:04:00 +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
Kevin Chyn
e4cfb6a594 Pattern entry views should be consistent
This change makes confirm_pattern consistent with choose_pattern

Fixes: 27290562

Test: manual
Change-Id: Id56492df71624552c8362f648756ba64bf908965
2017-08-22 01:16:08 +00:00
TreeHugger Robot
0f5fadcb0e Merge "Set the bidi flags on Paints in DonutView" into oc-mr1-dev 2017-08-21 17:32:25 +00:00
Charles He
1d6cec8ca2 Merge "Clear "Wrong pattern" prompt automatically." into oc-mr1-dev 2017-08-21 16:04:38 +00:00
Roozbeh Pournader
4fb3e719d2 Set the bidi flags on Paints in DonutView
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)
2017-08-18 23:35:03 +00:00
Phil Weaver
6c9a1262be Merge "Ensure a11y ids for LabeledSeekBar are in bounds" into oc-mr1-dev 2017-08-18 20:20:47 +00:00
Charles He
caf9510923 Clear "Wrong pattern" prompt automatically.
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
2017-08-18 17:35:27 +01:00
TreeHugger Robot
268c6c6ca6 Merge "Null-pointer check when updating name of ZenRule." into oc-mr1-dev 2017-08-18 14:08:24 +00: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
Stephen Chen
dc1add0c61 Add a "Add Network" button to SavedAccessPointsWifiSettings
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
2017-08-17 14:00:30 -07:00
TreeHugger Robot
682ff5562c Merge "Import translations. DO NOT MERGE" into oc-mr1-dev 2017-08-17 15:33:39 +00:00
TreeHugger Robot
f51b4a580f Merge "Suppress some search results" into oc-mr1-dev 2017-08-17 01:20:42 +00:00
TreeHugger Robot
89c2adf420 Merge "Add fingerprint illustration image" into oc-mr1-dev 2017-08-17 00:49:00 +00:00
TreeHugger Robot
53a77a2452 Merge "Fix rotation bug in Bluetooth pairing PIN dialog" into oc-mr1-dev 2017-08-17 00:38:40 +00:00
TreeHugger Robot
7a5e42f3db Merge "Nfc Payment Preference check if the dialog is non-null before dismissing" into oc-mr1-dev 2017-08-17 00:32:40 +00:00
Maurice Lam
f4716e89c0 Merge "Fix bad string reference" into oc-mr1-dev 2017-08-16 23:33:43 +00:00
TreeHugger Robot
9a03b951d2 Merge "Remove gibberish summary in search when query is "lock"" into oc-mr1-dev 2017-08-16 22:57:24 +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
Fan Zhang
875b8eae39 Remove gibberish summary in search when query is "lock"
Fixes: 64165687
Test: visual for search
Test: rerun robotest for securitysettings
Change-Id: I5c44e351a767c7ce3037a81d0932d9bd6b59635e
2017-08-16 22:12:44 +00: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
Suprabh Shukla
a5e4dd2b5e Disabling the activate button when paused am: de5df8b090 am: 779237e37f am: 24547155ea -s ours am: 889036189b -s ours am: 9acf640efd -s ours am: 29c1777ca5 -s ours am: 694ab09ff3 -s ours am: a92a7e400f -s ours am: cf0caf8f22 -s ours am: 3ce6d3ee87 -s ours am: 202970aa92 -s ours am: 81ba0cc873 -s ours am: 82afc6c5fd -s ours am: 23e185adf8 -s ours am: 5d4a2bb844 -s ours am: b4678ce1d2 -s ours
am: 9a416573d7  -s ours

Change-Id: I5bad4c775a8bd9cb30c428006369335f9da8dd9f
2017-08-16 21:20:30 +00:00
Suprabh Shukla
7b59fe50a7 Disabling the activate button when paused am: 9ffee0d534 am: d27e28eab7 am: 93a9e9f7f2 -s ours am: 78a9d598f1 -s ours am: 0dba51f9f0 -s ours am: 7bd8e120cb -s ours am: d22de194f5 -s ours am: de8e1f4be5 -s ours am: b2f5566de5 -s ours am: 05fec2162a -s ours am: df39274478 -s ours am: a6b4e032c8 -s ours am: 28f6dd01bc -s ours
am: 8fe20711fa  -s ours

Change-Id: I87f9269d525a63210c55b70e347a693fa8c65ed2
2017-08-16 21:19:30 +00:00
Suprabh Shukla
832dde9768 Disabling the activate button when paused am: af5d8b9b03 am: 26f4aceece am: ccad4a3621 am: 72beaddfd4 -s ours am: 2e6cf5dcde -s ours am: 817c35056c -s ours am: 6d7bb4c4d0 -s ours am: 3dd026d5dc -s ours am: 142433924f -s ours am: 0e22588ed0 -s ours
am: bbe3047d1d  -s ours

Change-Id: If2bd687791fccfd3b5aea601053f6038be1d6577
2017-08-16 21:17:28 +00:00
Ruchi Kandoi
8bd3ec13c6 Nfc Payment Preference check if the dialog is non-null before dismissing
Test: monkey test
Bug: 64758793
Change-Id: I3905096889b2dc6ef468afc76e9767f63b4163ad
2017-08-16 13:45:39 -07:00
Suprabh Shukla
9a416573d7 Disabling the activate button when paused am: de5df8b090 am: 779237e37f am: 24547155ea -s ours am: 889036189b -s ours am: 9acf640efd -s ours am: 29c1777ca5 -s ours am: 694ab09ff3 -s ours am: a92a7e400f -s ours am: cf0caf8f22 -s ours am: 3ce6d3ee87 -s ours am: 202970aa92 -s ours am: 81ba0cc873 -s ours am: 82afc6c5fd -s ours am: 23e185adf8 -s ours am: 5d4a2bb844 -s ours
am: b4678ce1d2  -s ours

Change-Id: I199cfbc0ec36904483c35aa9712ab471cf5b4ec2
2017-08-16 20:42:38 +00:00