518 Commits

Author SHA1 Message Date
Eric Schwarzenbach
a99b90b24f Remove WifiNetworkScoreCache fake
Now that robolectric supports O, we no longer need the fake
WifiNetworkScoreCache for tests.

Bug: 64262653
Test: n/a
Change-Id: Ie9cdd817d3436b7ff5b1642efbf255faf216a7fb
2017-10-13 09:31:10 -07:00
Fan Zhang
94f8d9f288 NPE Guard lifecycle in preference controllers
Bug: 65492237
Test: robotests
Change-Id: I8a83da46e038e8d99870b2bf4b640d734fd4d1f6
2017-10-10 16:29:11 -07:00
TreeHugger Robot
32f38bde73 Merge changes from topic "StatusFragment"
* changes:
  Update to Robolectric 3.4.2
  Convert more of StatusFragment to PreferenceControllers
2017-10-10 21:04:30 +00:00
Tony Mantler
f6631bf618 Update to Robolectric 3.4.2
Bug: clean-up
Test: RunSettingsLibRoboTests
Change-Id: Id812a4d8aa6b1a4260d73087b742b043e79ab6a1
2017-10-10 11:09:08 -07:00
jeffreyhuang
48085a8f3a Add more test to LogdSizePreferenceController
- Added additional tests

Bug: 34203528
Test: make RunSettingsLibRoboTests -j40
Change-Id: I92297a4cfd6175b9dd684a17b3060f89c2bedc31
2017-10-09 16:14:13 -07:00
Tony Mantler
73f950dd04 Convert more of StatusFragment to PreferenceControllers
Bug: 67410808
Test: RunSettingsLibRoboTests
Change-Id: I0184255878155124dc798137cfbf5aa1270e8ef6
2017-10-09 13:54:03 -07:00
Tony Mantler
81780efb87 Merge "Move SerialNumberPreferenceController to SettingsLib" 2017-10-04 20:30:37 +00:00
Tony Mantler
f43b986e20 Move SerialNumberPreferenceController to SettingsLib
Bug: 67410808
Test: RunSettingsLibRoboTests
Change-Id: I6571934af7ff4015dad1e4400f52ab5b7bca0c5d
2017-10-04 10:12:23 -07:00
Daniel Nishi
dbdc059d4d Merge "Fix a cache calculation regression." into oc-mr1-dev am: fcd9565ec5
am: aed0474a6d

Change-Id: If9b4497b41f2f917ac1d2da18beca53fb854a454
2017-10-03 20:41:59 +00:00
Daniel Nishi
13d875fb52 Fix a cache calculation regression.
Cache size was being double-counted for apps in their drilldown.

Change-Id: I44ec03470050dfbce392348c3336dd5e9bb54c36
Fixes: 67028136
Test: SettingsLib integ tests
2017-10-03 10:16:38 -07:00
Tony Mantler
0edf09bd36 Make WifiTracker lifecycle aware
Bug: 66953027
Test: m -j checkbuild
Change-Id: I0609a16a3b2afd2af689ff44896a9a82138fa370
2017-09-29 14:35:10 -07:00
jackqdyulei
0c1739aae4 Merge "Update the bt background color." into oc-mr1-dev am: 4a324cb196
am: da95863025

Change-Id: I31e6dbb096f893c06bdf9613ec98ca4ba0869bf4
2017-09-26 20:40:34 +00:00
jackqdyulei
b4f8a0be8d Update the bt background color.
The previous cl pass in the resource id rather than real color.
This cl fix the bug.

Bug: 65397557
Test: RunSettingslibRoboTests
Change-Id: I9dafc8bef6adf48b37eba4deff7462f9ba83a695
2017-09-21 15:53:43 -07:00
Ajay Nadathur
f651e0c016 Merge "Deferred setup banner updates intermittently" into oc-mr1-dev am: 19e00be16b
am: f4f1c4d425

Change-Id: I0045019061b59d08e576a0c343f694804668870a
2017-09-19 22:37:44 +00:00
TreeHugger Robot
19e00be16b Merge "Deferred setup banner updates intermittently" into oc-mr1-dev 2017-09-19 22:13:28 +00:00
Sundeep Ghuman
c43b30ca47 Do not pause scanning during Network state changes.
This prevents UI bugs in WifiSettings where scan results would become to
old upon switching networks and thus all the APs would be removed from
the wifi picker. Now scanning is only paused/resumed during start/stop
tracking as well as on wifi state changes between enabled/ not enabled.

Also adds additional logging to scan result age in verbose logging.

Bug: b/64989100
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
Manual: 1. Repeated switch back and forth between different networks.
2. Ensure that AccessPoints in WifiSettings do not disappear after new
connections.

Change-Id: I11e424bcce799a5f3d003a955dcee004294058b7
Merged-In: I11e424bcce799a5f3d003a955dcee004294058b7
(cherry picked from commit db9b94c195f056248b1f5c3b4ef5e907c1b82028)
2017-09-18 19:04:25 -07:00
TreeHugger Robot
d2c78d6824 Merge "Fix InputMethodPreference.compareTo method" 2017-09-16 11:46:45 +00:00
Doris Ling
f16ea680f5 Move BluetoothA2dpWrapper to the wrapper package.
- and get rid of the interface/impl implementation.

Change-Id: Ic9c6f15f388d1ca25af2fc9cfd688440b579a900
Fixes: 65634579
Test: make RunSettingsLibRoboTests
2017-09-15 15:02:19 -07:00
Ajay Nadathur
d1b730b940 Deferred setup banner updates intermittently
bug: 65641145
Test: Manually tested, robolectric tests added
Change-Id: Ic4e770d33ee455c9d9281d04b9b8c9588674037e
2017-09-15 18:36:11 +00:00
Lei Yu
c57a9334b6 Merge "Change battery icon to the side of bt icon" into oc-mr1-dev am: a57aea0d61
am: d5d9766793

Change-Id: I8dbc10eff33b8eeee0b5942a53080c7d504ec7d9
2017-09-15 11:14:58 +00:00
Tadashi G. Takaoka
9f240ad697 Fix InputMethodPreference.compareTo method
Fixes: 64232283
Test: bit SettingsLibTests:com.android.settingslib.inputmethod.InputMethodPreferenceTest
      bit SettingsLibTests:com.android.settingslib.inputmethod.InputMethodSubtypePreferenceTest
Change-Id: I5b18e8c854dc6a8e4ff35aa356c9acd63acd3a53
2017-09-15 16:46:12 +09:00
Lei Yu
a57aea0d61 Merge "Change battery icon to the side of bt icon" into oc-mr1-dev 2017-09-14 21:31:11 +00:00
Ajay Nadathur
daf30767d1 Merge "Fix jank issue in Settings caused by fetching tile info" into oc-mr1-dev am: 4562ecebc6
am: 9ebf5a8220

Change-Id: Ia34424f3b5f3f1882721d4d1aed85207113f000f
2017-09-14 02:27:06 +00:00
TreeHugger Robot
2193f912f3 Merge "Change score cache eviction time to settings value." into oc-mr1-dev 2017-09-13 23:12:21 +00:00
Sundeep Ghuman
1e98151104 Change score cache eviction time to settings value.
Reduce default eviction time from intended 24 hours (erroneously input
as 24 days) to 20 minutes.

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

Change-Id: I89eae2483b9a65a65d7cf5b1151952609b6b7fd7
Merged-In: I89eae2483b9a65a65d7cf5b1151952609b6b7fd7
2017-09-13 13:23:55 -07:00
jackqdyulei
98b7fdbd5c Change battery icon to the side of bt icon
Also add a new parameter to control the size of battery icon at
the side.

In spec the height of battery icon should be 55% of the bt icon.
Since bt icon has different natural margin in its vector drawable.
This cl adds a padding and then change the ratio to 75%.

Bug: 65397557
Test: RunSettingsLibRoboTests

Change-Id: I442149392edcec2ee23f651232ffe3e204badc38
2017-09-13 13:22:47 -07:00
Ajay Nadathur
b0801642b3 Fix jank issue in Settings caused by fetching tile info
bug: 62713030
Test: Manually tested
Change-Id: I24c78d35c66cc2de7c3e43b1a7f7c0bda22545a6
2017-09-12 22:13:03 +00:00
Sundeep Ghuman
db9b94c195 Do not pause scanning during Network state changes.
This prevents UI bugs in WifiSettings where scan results would become to
old upon switching networks and thus all the APs would be removed from
the wifi picker. Now scanning is only paused/resumed during start/stop
tracking as well as on wifi state changes between enabled/ not enabled.

Also adds additional logging to scan result age in verbose logging.

Bug: b/64989100
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java
Manual: 1. Repeated switch back and forth between different networks.
2. Ensure that AccessPoints in WifiSettings do not disappear after new
connections.

Change-Id: I11e424bcce799a5f3d003a955dcee004294058b7
2017-09-12 14:04:00 -07:00
Eric Schwarzenbach
bd44c9e69a Fix TimestampedScoredNetwork parceling logic.
The old implementation used incompatible read/write logic. Fixes the
constructor to use readParcelable() instead of
CREATOR.createFromParcel(). Adds tests.

Bug: 65379063
Test: make -j40 RunSettingsLibRoboTests

Change-Id: I6a6c183fe065f36fcc8d4a25637f98dfdaad350d
Merged-In: I6a6c183fe065f36fcc8d4a25637f98dfdaad350d
2017-09-12 10:58:07 -07:00
Ajay Nadathur
2c1192999e Merge "Add method to update tile's remoteview using summaryUri" 2017-09-08 05:09:26 +00:00
TreeHugger Robot
6b7a5b3313 Merge "Fix TimestampedScoredNetwork parceling logic." 2017-09-08 03:27:43 +00:00
Eric Schwarzenbach
fb1c5b52d4 Fix TimestampedScoredNetwork parceling logic.
Bug: 65379063
Test: make -j40 RunSettingsLibRoboTests

Change-Id: I6a6c183fe065f36fcc8d4a25637f98dfdaad350d
2017-09-07 12:59:44 -07:00
Ajay Nadathur
00932ebb96 Add method to update tile's remoteview using summaryUri
- Calling com.android.settingslib.drawer.TileUtils#updateTileData no
longer sets the summary in RemoteView.
- To update summary and title of remoteview,
com.android.settingslib.drawer.TileUtils#updateTileUsingSummaryUri
should be called

bug: 62713030
Test: Added robolectric tests, also manually tested settings
Change-Id: I8c63601a901d5b140e36baec424c226724c43bc4
2017-09-07 11:50:28 -07:00
Ajay Nadathur
4d945fecf2 Add method to update tile's remoteview using summaryUri
- Calling com.android.settingslib.drawer.TileUtils#updateTileData no
longer sets the summary in RemoteView.
- To update summary and title of remoteview,
com.android.settingslib.drawer.TileUtils#updateTileUsingSummaryUri
should be called

bug: 62713030
Test: Added robolectric tests, also manually tested settings
Change-Id: I8c63601a901d5b140e36baec424c226724c43bc4
2017-09-07 14:56:56 +00:00
TreeHugger Robot
037444ddaf Merge "Change score cache eviction time to settings value." 2017-09-07 04:44:57 +00:00
Sundeep Ghuman
9bb85d3c4d Change score cache eviction time to settings value.
Reduce default eviction time from intended 24 hours (erroneously input
as 24 days) to 20 minutes.

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

Change-Id: I89eae2483b9a65a65d7cf5b1151952609b6b7fd7
2017-09-06 18:09:35 -07:00
Daniel Nishi
d18a1ccaa2 Merge "Fix a bug where image apps were double-counted." into oc-mr1-dev am: 5d340bce89
am: 942db56283

Change-Id: If093400dfe80cd544df151fb8ee90878a9eecf51
2017-09-06 22:17:32 +00:00
Daniel Nishi
5d340bce89 Merge "Fix a bug where image apps were double-counted." into oc-mr1-dev 2017-09-06 19:58:22 +00:00
TreeHugger Robot
8c3ce8d60b Merge "Use raw string when setting wifi preference title." into oc-mr1-dev 2017-09-06 19:26:56 +00:00
TreeHugger Robot
3d6e6a63e9 Merge "Use raw string when setting wifi preference title." 2017-09-06 06:07:01 +00:00
Fan Zhang
70efb670c8 Use raw string when setting wifi preference title.
This is necessary for talkback to correctly recognize content
description on the whole viewgroup.

Merged-In: Ic792102b269b9a8db09c632f7e70d8773048c840
Change-Id: I555f94afcd6f4c681bb16dd23d94b2ae0fd4c116
Fixes: 65202862
Test: robotests
2017-09-05 18:13:11 -07:00
Fan Zhang
b6cec0d7b2 Use raw string when setting wifi preference title.
This is necessary for talkback to correctly recognize content
description on the whole viewgroup.

Change-Id: Ic792102b269b9a8db09c632f7e70d8773048c840
Bug: 65202862
Test: robotests
2017-09-06 01:12:24 +00:00
Daniel Nishi
b798b1c484 Fix a bug where image apps were double-counted.
The filter for photos apps includes them as well as the one for "other
apps". This removes them out of other apps.

Change-Id: I56058080b6492c054ea3171addd5ab343769bc9a
Fixes: 65384691
Test: SettingsLib integ test
2017-09-05 17:40:05 -07:00
Sundeep Ghuman
d1411d9ef2 Merge "Always use SSID average for SpeedLabel." into oc-mr1-dev am: 6c198f9e57
am: 94cb0ea479

Change-Id: I2c61f237e4d9a2717d3c630cd0ea24934e13fc6b
2017-09-05 23:47:17 +00:00
Justin Klaassen
7715cc2b96 Merge "Fix A2dpProfileTest#getLabelDeviceConnectedWithHighQualityCodec" into oc-mr1-dev am: ae1dd84bf0
am: 691b715e77

Change-Id: Id187f844dd22b47db7cbc0f62ba07e3b78100986
2017-09-05 22:39:08 +00:00
TreeHugger Robot
6c198f9e57 Merge "Always use SSID average for SpeedLabel." into oc-mr1-dev 2017-09-05 21:44:30 +00:00
Sundeep Ghuman
a78256947d Always use SSID average for SpeedLabel.
When showing the SpeedLabel for the connected network, continue to use
the SSID based average rather than switching to the curve for the known
AP. This addresses changes in SpeedLabel from when the user selects a
network vs when it appears in the connected section.

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

Change-Id: I06edc1ca4b1b5c8e8615f48c000544ea22a6bbbd
2017-09-05 11:07:08 -07:00
Justin Klaassen
9acc02e2c4 Fix A2dpProfileTest#getLabelDeviceConnectedWithHighQualityCodec
Fixes: 63899732
Test: make RunSettingsLibRoboTests -j7
Change-Id: I60559a04a1c234acaca2919a67e8bbe126d2bb3a
2017-09-04 17:01:11 -07:00
TreeHugger Robot
55cd5e185a Merge "Add a photos app filter and a metric for using it." into oc-mr1-dev 2017-09-02 03:29:51 +00:00
Eric Schwarzenbach
58522e0458 Merge "Change AccessPointPreference key generation to match AccessPoint." into oc-mr1-dev am: c3fbddd712
am: 05bee81788

Change-Id: Iabd8af66a650971b1d3a1c0cb3bc1b11ef98e333
2017-09-01 22:14:12 +00:00