Commit Graph

2958 Commits

Author SHA1 Message Date
Antony Sargent
f92f6c24f1 Merge "Fix Bluetooth switch status in Connected devices screen" into oc-mr1-dev
am: c3b47925e3

Change-Id: I7c9a07543340992e8bd3ff15538d74d28a1aab22
2017-09-06 16:53:28 +00:00
Antony Sargent
c3b47925e3 Merge "Fix Bluetooth switch status in Connected devices screen" into oc-mr1-dev 2017-09-06 16:42:41 +00:00
Charles He
e7cf5e6221 Merge "Enforce wifi config lockdown on details page." into oc-mr1-dev
am: 10adff1163

Change-Id: I8aed4d127bc84c457a672cc5e524aa7ac477b15d
2017-09-06 16:06:32 +00:00
Charles He
289af93896 Enforce wifi config lockdown on details page.
Fixes the bug that, on the new WifiDetailPreference page, the "Forget"
button is not disabled properly for wifi configs created and protected
by DevicePolicyManger.

Robolectric test to follow in a separate CL.

Test: manual, by locking down wifi config with TestDPC
Test: make RunSettingsRoboTests
Bug: 64971700
Bug: 65396674
Change-Id: I27740eabd5eb94415e4258c9c80f91df2d9ab476
2017-09-06 15:58:14 +00:00
Antony Sargent
c626fcc028 Fix Bluetooth switch status in Connected devices screen
The symptom observed is that the Bluetooth master switch on the
Connected devices page doesn't properly respond to Bluetooth turning off
via quicksettings - either turning on airplane mode or just toggling
Bluetooth.

The root cause was that MasterSwitchPreference's isChecked method would
not return the true value of whether the switch was checked - if the
control is disabled, it always just returns false. This interacts badly
with code in BluetoothEnabler - we disable the switch when the Bluetooth
state is in transition (eg becomes STATE_TURNING_OFF), and we also
attempt to avoid calling setChecked if the switch is already in the
desired state. So the switch would be checked but disabled, and we'd
avoid ever calling setChecked(false) on it.

A thorough fix would be to remove the code from MasterSwitchPreference's
isChecked method that looks at the enabled state, since enabled and
checked really should be treated as separate concerns. But given the
timeframe of MR1, we're opting for a more conservative fix of directly
accessing the switch and checking it's state, to avoid introducing bugs
in other consumers that might be depending on the current
behavior. We'll then do the thorough fix on the master branch which will
give a lot more time for any unexpected issues to be found (I audited
other usages and none seemed likely to be a problem, but it's better to
be safe than sorry).

Change-Id: I19a6c6b71e74595be3ef32a9718a430b67a89d53
Bug: 64940731
Test: make RunSettingsRoboTests
2017-09-05 17:10:30 +00:00
Daniel Nishi
5467aed58d Merge "Make photos/videos storage preference normal." into oc-mr1-dev
am: 3d1f6abd6f

Change-Id: Ic944357091b2cd16115fd4b0f3ff0459090a3e27
2017-09-02 03:39:51 +00:00
TreeHugger Robot
3d1f6abd6f Merge "Make photos/videos storage preference normal." into oc-mr1-dev 2017-09-02 03:29:52 +00:00
Daniel Nishi
9be0ce09c9 Make photos/videos storage preference normal.
We had special behavior for it in the past, but this defines new
behavior that is much closer to what the other storage preferences do.
A photo app filter is used and a photos/video files preference exists on
it which intents over to the gallery app.

Fixes: 64147318
Test: Settings robotests

Change-Id: I47284515fe2dfcc924ae61a44bc47051e9f5fda6
2017-09-01 17:51:56 -07:00
Doris Ling
c905662743 Merge "Set drawable for the entity header app preference button." into oc-mr1-dev
am: 5fe8e76b36

Change-Id: I02625057fd4636f8ce61d5772f7ce4083fb7f81f
2017-09-02 00:41:28 +00:00
TreeHugger Robot
5fe8e76b36 Merge "Set drawable for the entity header app preference button." into oc-mr1-dev 2017-09-02 00:17:08 +00:00
Daniel Nishi
d3e0d745a8 Merge "Show work profile apps only on app list." into oc-mr1-dev
am: 8618b8649f

Change-Id: I8757ff64193dc0754b01aa769e55a355464e2d01
2017-09-01 23:17:06 +00:00
Doris Ling
a7b40995de Set drawable for the entity header app preference button.
In the entity header layout, the action buttons resource is set to null by
default. When we bind the button with the app preference action, we
should also set the drawable to the settings icon as well.

Change-Id: Ic259b4c538f529671ca5a9c67664ef32fbbb25ae
Fixes: 64826061
Test: make RunSettingsRoboTests
2017-09-01 14:52:30 -07:00
Daniel Nishi
83ceab82e4 Show work profile apps only on app list.
For the work profile drilldown, we used to show all apps when the user
drilled down into the categories. This makes it so that the drill down
only shows the work apps when that deep.

Change-Id: I492cd3e9b9b923b87b68645a871dcfb2b91b4f95
Fixes: 62963093
Test: Settings robotest
2017-09-01 13:08:48 -07:00
Lei Yu
ec8007b426 Merge "Add device/profile app check in background check" into oc-mr1-dev
am: f5d7db2cfa

Change-Id: I7ffb1cd690b638f4266b5e37913510f545b780b9
2017-08-30 17:15:02 +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
Bill Yi
ef5d680cc4 Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import

Bug: 64712476
Change-Id: I334be8406b13c2b00047753ed84f62cf6ae71fbd
2017-08-29 14:36:06 -07:00
Matthew Fritze
2980aecd96 Merge "Prevent race condition between SavedQuery and Query Loader" into oc-mr1-dev
am: 3042af11f0

Change-Id: I95fc4f482d864f6bf8283b10236b74bd8cddf9e1
2017-08-29 18:51:41 +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
Sundeep Ghuman
cf37a26795 Separate multiple DNS addresses with newlines.
am: 2716e841be

Change-Id: I676b5de60477f7c905b08b8bb361104e5f1e05b9
2017-08-29 04:49:28 +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
Lei Yu
3f1dfc21ec Merge changes from topics "anomaly_test_app_step_6", "anomaly_test_app_step_5" into oc-mr1-dev
am: 088393596e

Change-Id: I93f50785f54b1287167f1f87c91167365b295a64
2017-08-28 17:45:38 +00:00
Lei Yu
088393596e Merge changes from topics "anomaly_test_app_step_6", "anomaly_test_app_step_5" into oc-mr1-dev
* changes:
  Add functional test for wakelock anomaly detector
  Add functional test for bt anomaly detector
2017-08-28 17:35:59 +00:00
Jack He
7a6aadce4b Bluetooth: Only show devices when their names are resolved
am: 19ba320263

Change-Id: I23300ac9541f88b3aeb978be0771e93b85fe834f
2017-08-26 02:51:48 +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
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
c26876ade7 Merge "Add battery indicator to bluetooth icon" into oc-mr1-dev
am: 77bd8c3a73

Change-Id: I36f5729dd042c88c9f8d6a2d4abf720a05748246
2017-08-25 18:37:53 +00:00
TreeHugger Robot
77bd8c3a73 Merge "Add battery indicator to bluetooth icon" into oc-mr1-dev 2017-08-25 18:25:03 +00:00
jackqdyulei
6896e1ef05 Merge "Add wakelock action in testing app" into oc-mr1-dev
am: 08fecc4143

Change-Id: Id3125640f4d62da1161b9e894577c6285fe7c83a
2017-08-25 03:44:25 +00:00
Doris Ling
e80bb0d5ce Merge "Fix jank in showing conditions and suggestions in cold start." into oc-mr1-dev
am: 51c83353fe

Change-Id: I869238f4c9198dbd167ab02d18e41e0e67001c38
2017-08-25 03:43:37 +00:00
TreeHugger Robot
08fecc4143 Merge "Add wakelock action in testing app" into oc-mr1-dev 2017-08-25 03:35:46 +00:00
TreeHugger Robot
51c83353fe Merge "Fix jank in showing conditions and suggestions in cold start." into oc-mr1-dev 2017-08-25 03:34:34 +00:00
jackqdyulei
d52c9708b5 Merge "Add bt anomaly action in testing app" into oc-mr1-dev
am: 4aaacaf7e3

Change-Id: Icc5588c0fde97908d371452c622980fddae054df
2017-08-25 01:49:28 +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
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
Daniel Nishi
5f97c05f1c Merge "Move the Robolectric shadow config up." into oc-mr1-dev
am: efcc8be05c

Change-Id: Ie816d276fe196452f38c88ca1f944dd040f19321
2017-08-24 21:24:31 +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
TreeHugger Robot
efcc8be05c Merge "Move the Robolectric shadow config up." into oc-mr1-dev 2017-08-24 19:27:23 +00:00
Lei Yu
a9eb0eb4bc Merge "Add UI components for bluetooth anomaly" into oc-mr1-dev
am: 3949ed53a9

Change-Id: I2cfae5ecff424ff042e0a0b29a610908563b8348
2017-08-24 17:42:09 +00:00
Lei Yu
c564686ec8 Merge "Set up anomaly test app in settings" into oc-mr1-dev
am: 8cac6b07bc

Change-Id: I5be8aab32f4918814ab2273f608b38d4403b24d0
2017-08-24 17:41:25 +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
Soroosh Mariooryad
4e4d3631fc Merge "Extending SearchFeatureProvider API to provide timeout" into oc-mr1-dev
am: f83b94aa0c

Change-Id: I72618b3a6e47661c6c690638db0ed7d7c1d8c08c
2017-08-24 04:20:30 +00:00
TreeHugger Robot
f83b94aa0c Merge "Extending SearchFeatureProvider API to provide timeout" into oc-mr1-dev 2017-08-24 04:11:48 +00:00
Stephen Chen
31deb9a766 Merge "Add a "Add Network" button to SavedAccessPointsWifiSettings" into oc-mr1-dev
am: a78eeb2d61

Change-Id: Ide908ed189c110c272cd5535f9fbc99705b8555a
2017-08-24 01:58: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
Doris Ling
c2eab36c7c Merge "Fix null pointer exception when logging suggestions." into oc-mr1-dev
am: d94fbbc325

Change-Id: I4c827d601b8ed20934c4671d5a7de29a3001bd0b
2017-08-24 00:48:20 +00:00