Commit Graph

2430 Commits

Author SHA1 Message Date
Lei Yu
9260c92c24 Merge "Add device/profile app check in background check" into oc-mr1-dev am: f5d7db2cfa
am: ec8007b426

Change-Id: I118fee2b974a0815d21d422358250281da9804f0
2017-08-30 17:21:30 +00:00
Lei Yu
f5d7db2cfa Merge "Add device/profile app check in background check" into oc-mr1-dev 2017-08-30 17:02:21 +00:00
jackqdyulei
00015fbf50 Add device/profile app check in background check
If app is device or profile app, we disable the background check
toggle. This cl also create an util method for this check and
remove duplicate code

Bug: 64665807
Test: RunSettingsRoboTests
Change-Id: Id8336eadaac8832327bc3653aaa7dfbacde352ac
2017-08-29 16:10:36 -07:00
TreeHugger Robot
7c2aebc2b7 Merge "Fix power usage detail page is launched in wrong user" 2017-08-29 22:42:47 +00:00
Matthew Fritze
98a86c01d6 Merge "Prevent race condition between SavedQuery and Query Loader" into oc-mr1-dev am: 3042af11f0
am: 2980aecd96

Change-Id: I092b68b491669505dc2e46029d19c1fcc4061836
2017-08-29 19:03:11 +00:00
TreeHugger Robot
3042af11f0 Merge "Prevent race condition between SavedQuery and Query Loader" into oc-mr1-dev 2017-08-29 18:42:25 +00:00
Matthew Fritze
21aed344fc Prevent race condition between SavedQuery and Query Loader
SearchFragment and SavedQueryLoader share a loader manager
and had been using the same loader id for different
loaders.

Occaisionally (in monkey tests) two loaders with the same
IDs would be started and crash when they finished.

The loaders now have different IDs.

Change-Id: I11e9b7365605fbcef44cf7d2323183415422f5c8
Fixes: 64756515
Test: robotests
2017-08-29 08:20:51 -07:00
Tony Mak
49aea6af1f Fix power usage detail page is launched in wrong user
Two issues:
1. UID of settings app == system UID. But isSystemUid failed to recognize
Settings in secondary user is also a system uid.
2. For USER drain type, we should launch the detail page in current
   user.

Fix: 64506728
Test: make ROBOTEST_FILTER=AdvancedPowerUsageDetailTest -j40 RunSettingsRoboTests
Test: Switch to seconday user. Go to Settings->Battery, tap owner user
      battery entry, observe that detail page is shown.
Test: Stay long enough in Settings app, make sure no
      either Settings nor Android Framework battery entry.

Change-Id: I8d66ad55f18fcb3d9567b3bf753f737f5b98c609
2017-08-29 11:38:29 +01:00
Sundeep Ghuman
3430553a2e Separate multiple DNS addresses with newlines. am: 2716e841be
am: cf37a26795

Change-Id: I61bcfc20d43133c12fb8fe78d7bd968af1ee59eb
2017-08-29 04:57:47 +00:00
Sundeep Ghuman
2716e841be Separate multiple DNS addresses with newlines.
Bug: b/65037256
Test: make -j40 RunSettingsRoboTests
Change-Id: I4b0709648f8e236177ea73338cfb0d42a5971c06
2017-08-28 18:47:48 -07:00
Jack He
7bef28df2d Bluetooth: Only show devices when their names are resolved am: 19ba320263
am: 7a6aadce4b

Change-Id: I93ab225467dfbb51c77ea9dfde0e3082a845624c
2017-08-26 03:03:03 +00:00
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
Doris Ling
d76a310520 Merge "Fix jank in showing conditions and suggestions in cold start." into oc-mr1-dev am: 51c83353fe
am: e80bb0d5ce

Change-Id: Id3de7150516804bc7a08c665943769c27173fc9a
2017-08-25 03:48:07 +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
Lei Yu
af9138e8e3 Merge "Add battery indicator to bluetooth icon" 2017-08-24 23:39:35 +00:00
Daniel Nishi
9d0a84e95f Merge "Move the Robolectric shadow config up." into oc-mr1-dev am: efcc8be05c
am: 5f97c05f1c

Change-Id: I46c4a921a25ef17197e90038ff71a982a192aae7
2017-08-24 22:15:39 +00: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
jackqdyulei
6f5c990abd 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
2017-08-24 20:50:10 +00:00
TreeHugger Robot
efcc8be05c Merge "Move the Robolectric shadow config up." into oc-mr1-dev 2017-08-24 19:27:23 +00:00
Soroosh Mariooryad
f1ea9cc668 Merge "Extending SearchFeatureProvider API to provide timeout" into oc-mr1-dev am: f83b94aa0c
am: 4e4d3631fc

Change-Id: I5207a13fa2997cad393ec60d5f0cfb93eecbde16
2017-08-24 04:32:47 +00:00
TreeHugger Robot
f83b94aa0c Merge "Extending SearchFeatureProvider API to provide timeout" into oc-mr1-dev 2017-08-24 04:11:48 +00:00
Doris Ling
d9d877cb48 Merge "Fix null pointer exception when logging suggestions." into oc-mr1-dev am: d94fbbc325
am: c2eab36c7c

Change-Id: I09efabd3f8a4a7358f2b6a6d52a15fdd75ca7672
2017-08-24 01:11:22 +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
jackqdyulei
a5b20303ee Merge "Set preference invisible when no anomaly" into oc-mr1-dev am: 0e800978bf
am: fb13cac59f

Change-Id: I9a851fc886abb1489b8133468aed2c0548ffbd2d
2017-08-23 20:24:21 +00:00
jackqdyulei
002a20c8f3 Merge "Update strings when shortString is true" into oc-mr1-dev am: d0066e3875
am: 02e4c7d809

Change-Id: I031e65952befe7507ce09701af02e1131fe278cf
2017-08-23 20:15:19 +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
jackqdyulei
868adaa8db Merge "Stop display "Cell network" item for tablet" into oc-mr1-dev am: a097d68c4b
am: 92597b0e26

Change-Id: I68323c887d22b0f0df9801adcba436629503270b
2017-08-23 03:52:51 +00:00
TreeHugger Robot
a097d68c4b Merge "Stop display "Cell network" item for tablet" into oc-mr1-dev 2017-08-23 01:42:42 +00:00
Tony Mak
35efb10206 Merge "A separate entry for work profile CA cert" into oc-mr1-dev am: e040ef4a39
am: 237e49a7c9

Change-Id: I2b90fdcd5a6c88600077a0b09e693b006bf53177
2017-08-22 18:24:05 +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
Antony Sargent
e9ef169eee Temporarily turn off Settings CodeInspection test
Something is causing our ClassScanner to find 0 classes in the
com.android.settings class, which causes the CodeInspection test to
fail. This CL temporarily disables these tests to get the tree green
while we further investigate the root cause of the problem.

Bug: 64840107
Test: make RunSettingsRoboTests should succeed
Change-Id: I65485b41b161c2d54227ab179675bf9e3a23bab9
2017-08-18 13:58:41 -07: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
8ae8b7a931 Merge "Index TTS-Settings and dedupe TTS-engine in search result." 2017-08-17 17:30:19 +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
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