Commit Graph

3184 Commits

Author SHA1 Message Date
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
8ae8b7a931 Merge "Index TTS-Settings and dedupe TTS-engine in search result." 2017-08-17 17:30:19 +00:00
TreeHugger Robot
682ff5562c Merge "Import translations. DO NOT MERGE" into oc-mr1-dev 2017-08-17 15:33:39 +00:00
Fan Zhang
5bfe4c4309 Merge "Suppress some search results" into oc-mr1-dev am: f51b4a580f
am: f8817000ac

Change-Id: I5e1d4fa050541e2ccc7b1d4c6c5edf63802ba3de
2017-08-17 07:18:10 +00:00
Antony Sargent
fcb1073326 Merge "Fix rotation bug in Bluetooth pairing PIN dialog" into oc-mr1-dev am: 53a77a2452
am: 811b25ac2b

Change-Id: Ifa726d167f3e352f0993aa12f4d3c11089ae03f8
2017-08-17 07:15:24 +00:00
Fan Zhang
f8817000ac Merge "Suppress some search results" into oc-mr1-dev
am: f51b4a580f

Change-Id: Id8f2ae517afbfef10bce9e6811178b2772a56f07
2017-08-17 01:29:44 +00:00
Antony Sargent
811b25ac2b Merge "Fix rotation bug in Bluetooth pairing PIN dialog" into oc-mr1-dev
am: 53a77a2452

Change-Id: I5d750adc4623eacf704a12577b34f3434108b28f
2017-08-17 01:22:27 +00:00
TreeHugger Robot
f51b4a580f Merge "Suppress some search results" into oc-mr1-dev 2017-08-17 01:20:42 +00:00
Fan Zhang
18a168239e Index TTS-Settings and dedupe TTS-engine in search result.
Fixes: 63022866
Test: robotests
Change-Id: I5c711e7bafba4e413ee271768c58742be05d8640
2017-08-16 15:46:41 -07: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
TreeHugger Robot
74ca171dba Merge "Update detail icon only if its signal level changed." 2017-08-16 20:48:12 +00:00
Fan Zhang
0654a22578 Merge "Stub out feature flag UI" 2017-08-16 20:27:14 +00:00
TreeHugger Robot
c99ef27f8d Merge "Remove "saved networks" from search indexing" 2017-08-16 19:36:34 +00:00
Eric Schwarzenbach
241cb0db02 Update detail icon only if its signal level changed.
Changes behavior to only render the wifi pie icon if the new rssi has
resulted in a new signal level.

Bug: 64712237
Test: make -j40 ROBOTEST_FILTER=WifiDetailPreferenceControllerTest
RunSettingsRoboTests

Change-Id: I01be2f87d61489242d646ff2003db13c9268ea14
2017-08-16 11:52:17 -07:00
Fan Zhang
ec96dc1542 Remove "saved networks" from search indexing
Change-Id: Ic8c1f8cee2c2a325ba3518d52d0c35b230a6abfd
Fixes: 64755091
Test: robotests
2017-08-16 10:31:16 -07:00
Bill Yi
cf96c9b13f Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import

Bug: 64712476
Change-Id: If0ff6ff971291e101e464f028e79fc18afa5b6a7
2017-08-15 21:53:30 -07:00
Fan Zhang
75cd1d2010 Stub out feature flag UI
Bug: 36222960
Test: make -j40 RunSettingsRoboTests
Change-Id: Id2483d39018b2d93868f4ef7032124795ea91a53
2017-08-15 17:42:58 -07:00
TreeHugger Robot
0dfd1f7dc1 Merge "Remove references to NetworkBadging." 2017-08-16 00:11:56 +00:00
Fan Zhang
0764a663fc Merge "Compute aspect ratio properly" 2017-08-15 23:37:59 +00:00
Fan Zhang
36717d4399 Compute aspect ratio properly
Change-Id: Ic4e1f20f7354b9ab5f4e9c7564d16d06324ec23d
Fixes: 64608152
Test: visual
2017-08-15 11:14:58 -07:00
Eric Schwarzenbach
27a1b76fdc Remove references to NetworkBadging.
Removes all references to the deprecated NetworkBadging class. Replaces
Badging enums with AccessPoint.Speed. Uses SettingsLib Utils class to
get the WifiIcons.

Note: This change depends on ag/2676505.

Bug: 62355275
Test: make -j40 RunSettingsRoboTests
Change-Id: If3301ce30e22a7b2cc4d534b0a89e6d7ddfef45b
2017-08-15 09:49:53 -07:00
TreeHugger Robot
7d32761da4 Merge "Add userId to key when type is USER" 2017-08-15 01:47:05 +00:00
Fan Zhang
97e535b603 Use ThreadUtils instead of AsyncTask to get app title/icon
Change-Id: I44459d9e4a11329a3bd3bfda5057e05eb7e04d6a
Fixes: 63620905
Test: robotest
2017-08-14 12:46:24 -07:00
jackqdyulei
44dc63ec7b Add userId to key when type is USER
Before this cl, the app list couldn't distinguish different users
because all of them have the same key: USER.

This cl adds userId into key, to make sure the preference key
is unique.

Bug: 64605854
Test: RunSettingsRoboTests
Change-Id: Ia4de2ff85b214465a35f1983ca69a9280d053154
2017-08-14 18:36:31 +00:00
Bill Yi
2b027338e3 Revert "Import translations. DO NOT MERGE"
This reverts commit 5530c73afa.

Change-Id: I7804b7e3e00574424a95788ece7a4d28bcd761a7
Exempt-From-Owner-Approval: translation import
2017-08-14 13:38:36 +00:00
Bill Yi
5530c73afa Import translations. DO NOT MERGE
Change-Id: Iac929c86327445553e3c6e60aa22270bd2c43e5d
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-08-12 08:36:20 -07:00
Ajay Nadathur
2c2d41f8e9 Merge "Update strings for skip fingerprint setup" into oc-mr1-dev am: 719d80e6e0
am: aec29ee4be

Change-Id: I66480f242ed99d3f6488b2c832b0b2745e7432e8
2017-08-11 17:25:31 +00:00
Ajay Nadathur
aec29ee4be Merge "Update strings for skip fingerprint setup" into oc-mr1-dev
am: 719d80e6e0

Change-Id: I844147fa567fd168dbf14effb746d96aee12ad3a
2017-08-11 17:21:24 +00:00
Ajay Nadathur
719d80e6e0 Merge "Update strings for skip fingerprint setup" into oc-mr1-dev 2017-08-11 17:12:26 +00:00
Tony Mantler
db02207999 Merge "Don't lose dialogs during configuration change" 2017-08-11 16:28:43 +00:00
Kevin Chyn
a7144ae5b2 Merge "Clean up AssistGesturePreferenceController" into oc-mr1-dev am: 14450c5669
am: e54e3de80c

Change-Id: Ifa1964b6d9d6b32e8b2fc440c40f2431ddcc7b43
2017-08-11 03:11:27 +00:00
Kevin Chyn
e54e3de80c Merge "Clean up AssistGesturePreferenceController" into oc-mr1-dev
am: 14450c5669

Change-Id: I511a265ff31d6ced75bc3915c97e09eb95cbbc51
2017-08-11 03:06:19 +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
TreeHugger Robot
65e557754e Merge "onConnectedChanged should not update access points" 2017-08-10 23:35:07 +00:00
Tony Mantler
ff2f8c61ba Don't lose dialogs during configuration change
Bug: 62442606
Test: Rotate device when a dialog is showing
Change-Id: I616d6030e2c43937e4b59dd7f6d78dd7124228dc
2017-08-10 14:21:04 -07: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
Joachim Sauer
8a739a4bd1 Merge "Implement auto 12/24h setting toggle." 2017-08-10 16:36:47 +00:00
Joachim Sauer
95beae0089 Implement auto 12/24h setting toggle.
This implements an explicit toggle to enable/disable automatic 12h/24h
time formatting detection based on the current locale.

Previously automatic detection was the norm on a freshly wiped device,
but could never be re-enabled once either 12h or 24h format was
configured.

Bug: 32761619
Test: m RunSettingsRoboTests
Change-Id: Idbbb8f79fccec95e33bf2f12767d5736e1118fa7
2017-08-10 13:32:17 +01:00
Antony Sargent
caaccbc72c Merge "Stay discoverable in Bluetooth settings and pairing pages" into oc-dr1-dev am: 49cd8f2327 am: 0fe460a8e3
am: d9456d807b

Change-Id: I5bd24cc8cc532ffdcec05c51424140e8dcc764f8
2017-08-10 07:32:23 +00:00
Antony Sargent
d9456d807b Merge "Stay discoverable in Bluetooth settings and pairing pages" into oc-dr1-dev am: 49cd8f2327
am: 0fe460a8e3

Change-Id: I000eba2d8266b3d86f08c336f4ae3217ae48b8ac
2017-08-10 07:28:51 +00: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
Antony Sargent
0fe460a8e3 Merge "Stay discoverable in Bluetooth settings and pairing pages" into oc-dr1-dev
am: 49cd8f2327

Change-Id: I02c6056ab8efb238cb8ba97ea4d4ea6de247c13d
2017-08-10 07:25:52 +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