1911 Commits

Author SHA1 Message Date
TreeHugger Robot
b978569fce Merge "Import translations. DO NOT MERGE" into oc-dr1-dev 2017-07-26 18:39:16 +00:00
Bill Yi
e0144f0fa7 Import translations. DO NOT MERGE
Change-Id: Ia3879f9882a8fde1edcc669f31b4cb5125786ea5
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-07-26 07:30:33 -07:00
TreeHugger Robot
1e74fdb684 Merge "@Keep all the things in TestAccessPointBuilder" into oc-dr1-dev 2017-07-26 10:53:34 +00:00
Antony Sargent
08be449368 @Keep all the things in TestAccessPointBuilder
The test in packages/apps/Settings/tests/unit/src/com/android/settings/
wifi/WifiSettingsUiTest.java fails because the TestAccessPointBuilder
class and all methods in it seem to get stripped during build time
since they aren't referenced by code within the settings app itself.

Bug: 33245941
Test: runtest --path packages/apps/Settings/tests/unit/src/com/android/settings/wifi/WifiSettingsUiTest.java
Change-Id: I22b7e9fa54fcd67e0f754aca47907d87db9d7056
Merged-In: I92b56b7908e5be8a3553a2779646d48bb5b94f01
2017-07-26 07:02:03 +00:00
TreeHugger Robot
d68b6dc56b Merge "Do not evict scan results in cold start." into oc-dr1-dev 2017-07-25 22:41:39 +00:00
Sundeep Ghuman
4205874ec7 Do not evict scan results in cold start.
When starting WifiTracker, show whatever results are available from
platform until new scan results come in. This allows us to show the best
available results from the previous location scan. Once we have resumed
scanning and new scan results come in, the previous logic of evicting
scan results older than 15 seconds applies.

Also prevent unnecessary onConnectedChanged callbacks from being fired,
which may unnecessarily cause UI reloading bars to appear by performing
unnecessary work.

Bug: b/38212080
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java &&
runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java

Change-Id: I3db9d98425b3d2fc66fa0757807a318d0c7456ee
2017-07-24 13:15:23 -07:00
Salvador Martinez
52737f9266 move icon so that inline actions in settings can use it
Test: tests still pass
Bug: 62022517
Change-Id: Ifc01797c6ada51130586b5b42570c3357923ef85
2017-07-24 13:06:18 -07:00
TreeHugger Robot
69e41a4e9c Merge "Import translations. DO NOT MERGE" into oc-dr1-dev 2017-07-22 16:31:16 +00:00
Bill Yi
19a8d0af26 Import translations. DO NOT MERGE
Change-Id: I1670c714954e5835f6c79f446c463ee18d72d17b
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-07-22 02:47:35 -07:00
TreeHugger Robot
1cc73a5773 Merge "Move icon resources into SettingsLib for phone buddy" into oc-dr1-dev 2017-07-22 03:31:53 +00:00
Matthew Fritze
ab8148f2f6 Move icon resources into SettingsLib for phone buddy
The external settings api needs to pass icons for
corresponding settings. The following signals didn't have
icons in Settings.
- Night display
- Location

Bug: 62706782
Test: make RunSettingsGoogleRoboTests
Change-Id: Ia2feaa9cfea7dbce165545e5b7d96ad0798b8e07
2017-07-21 17:39:58 -07:00
TreeHugger Robot
689359914d Merge "Fix suggestion crash if parser fails to parse dismiss rule" into oc-dr1-dev 2017-07-21 22:59:13 +00:00
Fan Zhang
15ea628204 Fix suggestion crash if parser fails to parse dismiss rule
We store a index value in shared pref to figure out when a suggestion
should be displayed next time. However the rule can change due to
various reasons. When the index and the rule itself go out of sync, we
should not crash.

Merged-In: Id3ea88b6d321434e20ac0cd3e2670524c237e24e
Change-Id: Ied4a0359f9bc22ee94ec79c0591d2671a9c31b86
Fix: 63908636
Test: robotests
2017-07-21 12:57:14 -07:00
TreeHugger Robot
860f185c66 Merge "Don't set AccessPoint with WifiInfo.INVALID_RSSI" into oc-dr1-dev 2017-07-21 02:30:17 +00:00
TreeHugger Robot
3b63aa79eb Merge "Do not clear scores during stopTracking." into oc-dr1-dev 2017-07-21 00:56:42 +00:00
Glen Kuhne
d38708c1ab Don't set AccessPoint with WifiInfo.INVALID_RSSI
This stops the RSSI of an AccessPoint object being updated from WifiInfo
for the current network, when that WifiInfo does not have a valid RSSI.
This occurs when attempting to connect to a network, and the connection
has not yet been established.
Fixes a UI bug where the signal strength would appear to be zero when
attempting to connect to something, or after failing to.

Bug: 63487286
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java
Test: Manual. Attempt to connect to network with bad PSK. Observe Signal
strength does not get set to zero.

Change-Id: Ia5343fb6f0935134e6a4f82034de164342fe55d4
2017-07-20 19:11:59 +00:00
Bill Yi
a7a70f7e10 Import translations. DO NOT MERGE
Change-Id: I2ed6f707aa5196125419a43b85be6b9644364c24
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-07-19 21:48:02 -07:00
Daniel Nishi
d332076636 Merge "Add home activity methods to wrapper." into oc-dr1-dev 2017-07-18 19:34:42 +00:00
Daniel Nishi
bf8eb3d254 Add home activity methods to wrapper.
This allows us to properly use it in Robolectric tests.

Bug: 63154615
Test: Used in Settings unit test

Change-Id: I9f55529449313003a5ed10a997e21591ceae43cb
2017-07-17 21:41:42 +00:00
TreeHugger Robot
43e249ff27 Merge "Load internal resources using name rather than ID" into oc-dr1-dev 2017-07-15 14:53:44 +00:00
TreeHugger Robot
9f675cee28 Merge "Update the max height/width attribute of the TwoTargetPreference icon." into oc-dr1-dev 2017-07-13 20:59:39 +00:00
TreeHugger Robot
479d915db5 Merge "ProfileSelectDialog no longer removes caller activity from task." into oc-dr1-dev 2017-07-13 19:59:40 +00:00
Nikolas Bravo
9752ce32ef ProfileSelectDialog no longer removes caller activity from
task.

In Settings, after calling ProfileSelectDialog and choosing a profile,
then going back would go 2 activities back. The issue is that
ProfileSelectDialog was calling finish() in the no-longer-used
SettingsDrawerActivity. This caused the any activity calling the
dialog to be removed from the task, and thus being impossible to
go back to. This call to the drawer is also a code smell.

Bug: 36237246
Fixes: 36237246
Test: NA
Change-Id: I6f309b220ffae1d86e6879ddf6a0305ad3dde3e8
(cherry picked from commit b975c0e44445f76d67e7576c1e8e08609b696408)
2017-07-13 17:59:44 +00:00
Doris Ling
a9fbf3817a Update the max height/width attribute of the TwoTargetPreference icon.
Change the namespace for the icon image view to settings package.

Change-Id: Id1ffbc1742bedab93c9f03e9d464f532fe2c33af
Fix: 63666970
Test: Visual
(cherry picked from commit a990b5da04b4f5d475ff038f99d7dd908e931d63)
2017-07-13 17:41:24 +00:00
Maurice Lam
7f6fc86b9c Load internal resources using name rather than ID
Since setup wizard is distributed by binary, and internal framework
resource IDs may shift due to OEM customizations, load the resource
via its name instead.
Long term SUW should move away from depeneding on framework internal
resources or be open sourced.

Test: Existing tests pass
Bug: 63546650
Change-Id: I3555945d1f310ee79bdfc3542411d46a4fd4bf7d
2017-07-13 17:17:02 +00:00
Bill Yi
aaba1d30a3 Import translations. DO NOT MERGE
Change-Id: I0d916ea4bce1d259de0703e12701b534f31178a3
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-07-13 06:42:58 -07:00
Sundeep Ghuman
75f9480341 Do not clear scores during stopTracking.
Bug: b/63034725
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java

Change-Id: Ic15c7f42ec9a3883e8ba34194d9a9410457e4399
(cherry picked from commit 4bb84116636b51bf6925580df569fdeedf6061ae)
2017-07-13 05:52:59 +00:00
Bill Yi
58a524a39d Import translations. DO NOT MERGE
Change-Id: Ic838cd08ba00fe8aaf462f7de5908e63bcea79f5
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-07-10 14:08:01 -07:00
TreeHugger Robot
e72ec3cab2 Merge "Change initial value of mStaleScanResults to true." into oc-dr1-dev 2017-07-08 03:06:37 +00:00
Sundeep Ghuman
d2b84a8229 Change initial value of mStaleScanResults to true.
In ag/2409026 we introduced a stale scan result bit to prevent callbacks
from sticky broadcasts from occuring until we have fetched the latest
set of scan results. However, this initial value was set to false hence
there is a race condition in which the currently connected network can
still be shown without any other networks, as the scan results have not
yet been processed.

By changing the initial value to true, we address this race condition.

Bug: b/62493360
Test:  runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java

Change-Id: I5f2108e17d2c549e2176ccf64e640fbd4808b5f1
2017-07-07 17:50:44 -07:00
Bill Yi
a9aa6ffc41 Import translations. DO NOT MERGE
Change-Id: I0f7d8a0b363893098604e0b912974ca56b67100c
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-07-07 02:16:14 -07:00
Daniel Nishi
25937550af Merge "Change visibility on formatPercentage(double)." into oc-dr1-dev 2017-07-06 17:04:59 +00:00
Jason Monk
f636e3fb52 Merge "Fix some config issues with sysui" into oc-dr1-dev 2017-07-06 13:13:55 +00:00
TreeHugger Robot
cf694adee3 Merge "Add strings for a "Tethering hardware acceleration" setting." into oc-dr1-dev 2017-07-06 06:14:00 +00:00
TreeHugger Robot
e59ba746f1 Merge "Fix NPE on network forget from details page." into oc-dr1-dev 2017-07-06 05:16:14 +00:00
Sundeep Ghuman
d911da3adc Fix NPE on network forget from details page.
Forgetting a network from the wifi network details page throws an NPE in
WifiSettings when the details fragment exits, crashing the app.

Bug: b/63351286
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java

Change-Id: I749ecbda5654ff7a86ffe4c38ca74ebe338923f0
2017-07-05 20:08:26 -07:00
Jack He
6258aae548 Bluetooth: Display battery level of connected devices
* Add handler for BluetoothDevice.ACTION_BATTERY_LEVEL_CHANGED intent
* Check battery level information when UI is updated
* Show battery level in Quick Settings connected device summary line
* Show battery level in Bluetooth Settings connected device summary line
* Show battery level in Bluetooth device details page device summary
  line
* Add unit test for CachedBluetoothDevice, change HeadsetProfile and
  HidProfile to not final to enable mocking

Bug: 35874078
Test: make, unit test, connect to remote devices, connect/disconnect
      profiles
Change-Id: I729048cace73aab29337a8002a2897d2acf22fa6
2017-07-06 01:22:52 +00:00
Antony Sargent
7a4157d7b4 Merge "Add a convenience method to facilitate tests" into oc-dr1-dev 2017-07-05 22:49:11 +00:00
Daniel Nishi
3f94f68b3b Change visibility on formatPercentage(double).
Bug: 37923610
Test: Manual

Change-Id: I05a2e244a07e737784988a6353841ee55bbdcad0
2017-07-05 15:38:33 -07:00
Jason Monk
f3fe3bf5b9 Fix some config issues with sysui
It wasn't creating a delta so as soon as a change happened, it would
return true for any config changes.

Also StatusBar wasn't receiving config changes because the callback
was named wrong and SystemBars no longer passes it through.

Test: manual
Fixes: 62968485
Fixes: 62893293
Change-Id: I56750047168007edd0ca9ea35cb36c23dc790661
2017-07-05 12:38:50 -04:00
Lorenzo Colitti
66dfbfaa9c Add strings for a "Tethering hardware acceleration" setting.
Bug: 29337859
Test: builds
Change-Id: I0ee6846df58db15b8ec72d63b629cc56766c999b
2017-07-05 00:38:25 +09:00
Bill Yi
919dc2775d Import translations. DO NOT MERGE
Change-Id: I3e5fd8c8510ef2804f354fd8ffaa3c716daffde7
Auto-generated-cl: translation import
2017-06-30 17:09:53 -07:00
Antony Sargent
7ad051ed4c Add a convenience method to facilitate tests
In app tests (as opposed to RoboTests), we don't have a shadow
BluetoothSettings class and can't mock it because it's final, but we
need a way to mock out the address of a CachedBluetoothDevice. So this
adds a convenience method on CachedBluetoothDevice that can be mocked.

Bug: 62447414
Test: (should be covered by other tests)
Change-Id: If818d3dcc783b4aa03f7c6d7c441ba44ea980ab7
2017-06-30 09:53:03 -07:00
TreeHugger Robot
e269956acb Merge "Add strings for battery level info of connected devices" into oc-dr1-dev 2017-06-30 02:20:34 +00:00
TreeHugger Robot
6829db0cb6 Merge "Remove IPC calls from synchronized block." into oc-dr1-dev 2017-06-30 01:50:48 +00:00
Jack He
0e16a861dd Add strings for battery level info of connected devices
* SystemUI: quick_settings_connected_battery_level
* SettingsLib:
	bluetooth_connected_battery_level
	bluetooth_connected_no_headset_battery_level
	bluetooth_connected_no_a2dp_battery_level
	bluetooth_connected_no_headset_no_a2dp_battery_level

Bug: 63027849
Test: make, test using these strings
Change-Id: I9052dad87d2afd30d005d050c6b3bfc4813853df
2017-06-29 16:45:28 -07:00
Sundeep Ghuman
7c32aa3039 Move generatePreferenceKey to AccessPointPreference.
This allows it to be reused in the SavedAccessPointsWifiSettings.

Bug: b/62374459
Test: make -j40 RunSettingsLibRoboTests
Change-Id: Id137f56ceafe461d217c0eee6b571ccfa4eaff1f
2017-06-29 12:51:48 -07:00
Sundeep Ghuman
ce6b0b2539 Move TestAccessPointBuilder.
This is necessary to make it accessible to other test packages, such as
WifiSettingsUiTest.java in packages/apps/Settings.

Bug: 37558394
Test: runtest --path
packages/apps/Settings/tests/unit/src/com/android/settings/wifi/WifiSettingsUiTest.java

Change-Id: Ic1e4185639b2947433d6371e74448097d6adb962
2017-06-29 09:48:44 -07:00
TreeHugger Robot
c93f7b215b Merge "Update WifiConfiguration in AccessPoint." into oc-dr1-dev 2017-06-29 16:20:13 +00:00
TreeHugger Robot
e644b8cfa3 Merge "Clear AccessPoints in WifiTracker when Wifi is Off." into oc-dr1-dev 2017-06-29 05:51:39 +00:00