2092 Commits

Author SHA1 Message Date
Sundeep Ghuman
a419b9b4db Implement score cache eviction in AccessPoint.
This prevents cached scores from being held indefinitely and used for
SSID fallback logic in WifiTracker (Picker).

Bug: 63073866
Test: runtest --path frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/AccessPointTest.java
Change-Id: Ib351d20db30dfd18b69bb1f8e4d4f26fc6b74ef0
Merged-In: Ib351d20db30dfd18b69bb1f8e4d4f26fc6b74ef0
2017-08-23 15:22:28 -07:00
Sundeep Ghuman
6390fa836e Generate fallback speed label in AccessPoint.java
Cache all seen matching ScoredNetworks, and use these networks to
generate a fallback curve. This cache is kept in sync with WifiTracker's
WifiNetworkScoreCache, hence it does not permanently create any new
objects other than the map itself.

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

Change-Id: I0cdf17f63f0238e0e3a8324190f75d82beaa6672
Merged-In: I0cdf17f63f0238e0e3a8324190f75d82beaa6672
2017-08-15 20:28:48 -07:00
Justin Klaassen
6a46200937 Merge "Update Qualcomm(R) aptX(TM) strings" into oc-dr1-dev
am: 8d7cd4bcaa

Change-Id: Idfc54941a233d2b37cc4585d0064b8d86a74d465
2017-08-15 17:31:17 +00:00
Justin Klaassen
2445f80938 Update Qualcomm(R) aptX(TM) strings
Bug: 63899732
Test: Verified strings in Settings > System > Developer Options.
Change-Id: I21d764b0c11ff1cc934d379b2062ecc5a697624c
2017-08-14 20:01:36 -07:00
Bill Yi
2d1e020b2f Revert "Import translations. DO NOT MERGE"
This reverts commit 4a4ff70ab2eaadf6ff2673db7a2454d54526d451.

Change-Id: I27cd5204cc25e664b2722815f9efcfa0fde6b48b
2017-08-14 13:35:56 +00:00
Bill Yi
4a4ff70ab2 Import translations. DO NOT MERGE
Change-Id: Ia4d8ddb6e113bbe2cccf4dc6d2a1c69cc0ea7746
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-08-12 07:17:15 -07:00
The Android Open Source Project
c8c06ce913 Import translations. DO NOT MERGE
Change-Id: I8720da8cd27dd431d0428aac436e75b7fe04b677
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-08-08 17:14:59 -07:00
TreeHugger Robot
6a820f2238 Merge "Remove logic for parsing dismiss rule" into oc-mr1-dev 2017-08-08 22:13:11 +00:00
TreeHugger Robot
a5a660a84d Merge "Refactor WifiTracker sStaleScanResults." into oc-mr1-dev 2017-08-08 19:35:36 +00:00
TreeHugger Robot
ed0c5cf48f Merge "Update string for not charging." into oc-mr1-dev 2017-08-08 19:27:29 +00:00
Sundeep Ghuman
a580215fc3 Refactor WifiTracker sStaleScanResults.
In ag/2580164, in order to minimize changes, we used mutable static
state in WifiTracker to control cache eviction. This breaks a certain
flow in SetupWizard. This change reverts sStaleScanResults to an
instance member and then pipes the value into the AccessPoint update
call to control cache eviction instead of relying on error prone use of
mutable static state.

Bug: 63479352
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
Manual: See bug

Change-Id: Ia6d79c1904294da69841cbdf6eafbf42fa70f2d0
Merged-In: Ia6d79c1904294da69841cbdf6eafbf42fa70f2d0
2017-08-08 09:45:57 -07:00
Sundeep Ghuman
d1e449267a Refactor WifiTracker sStaleScanResults.
In ag/2580164, in order to minimize changes, we used mutable static
state in WifiTracker to control cache eviction. This breaks a certain
flow in SetupWizard. This change reverts sStaleScanResults to an
instance member and then pipes the value into the AccessPoint update
call to control cache eviction instead of relying on error prone use of
mutable static state.

Bug: 63479352
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
Manual: See bug

Change-Id: Ia6d79c1904294da69841cbdf6eafbf42fa70f2d0
2017-08-08 09:30:22 -07:00
Bill Yi
158bd8c90e Import translations. DO NOT MERGE
Change-Id: Ib2fd9bee8040fa4c57a62cbf22a64361201ab7cd
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-08-05 18:33:48 -07:00
Bill Yi
098e033d17 Import translations. DO NOT MERGE
Change-Id: I11e8908001cbf5e33e280ca2c8fb3b30c686f3f2
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-08-04 16:14:49 -07:00
Sundeep Ghuman
850ec9b235 Merge "Fix race condition / test flakiness." into oc-dr1-dev
am: 0c8e5b6dda

Change-Id: I0e7541f39696e226baf68418ea86ed94cea34827
2017-08-04 21:08:43 +00:00
TreeHugger Robot
0c8e5b6dda Merge "Fix race condition / test flakiness." into oc-dr1-dev 2017-08-04 20:59:34 +00:00
Fan Zhang
c07ae9cf09 Remove logic for parsing dismiss rule
We now still parse dismiss_rule from activity metadata, but intead of
treating it as "first show on Day x, then on day y if user dismiss
suggestion", we simply start showing suggestion on day x. If user
dismisses the suggestion, it's gone forever.

Change-Id: Ia4d14167a407983df22e582f8dbab0c2cc153e1e
Fix: 64297191
Test: robotests
2017-08-03 17:48:11 -07:00
Andre Eisenbach
39a9832df1 Remove "Couldn't pair" prompt on ACTION_PAIRING_CANCEL
am: 61ad5ae921

Change-Id: Iadbb0716f82a42366d8aba687208a1df81eafb70
2017-08-03 19:00:00 +00:00
Andre Eisenbach
61ad5ae921 Remove "Couldn't pair" prompt on ACTION_PAIRING_CANCEL
ACTION_PAIRING_CANCEL is triggered as a result of an ACL connection
going down, causing a "Couldn't pair" prompt. This can happen on some
car kits, even if the pairing is successful and the car kit briefly
tearing down the ACL connection after pairing and resuming it
immediately afterwards.

If a connection gets disconnected during a normal bonding procedure, the
UNBOND_REASON_REMOTE_DEVICE_DOWN reason code for the
ACTION_BOND_STATE_CHANGED already indicates this issue and will inform
the user.

Bug: 63975046
Test: manual
Change-Id: I663d8b7700741927c72e38e30cd993c0b81511a9
2017-08-03 18:40:39 +00:00
TreeHugger Robot
fca9a47ba8 Merge "SettingsLib: wifi: add support for tracking carrier Wi-Fi APs" into oc-mr1-dev 2017-08-03 04:28:24 +00:00
TreeHugger Robot
e5ae77c679 Merge "Import translations. DO NOT MERGE" into oc-mr1-dev 2017-08-02 15:20:57 +00:00
TreeHugger Robot
5af90f9fc6 Merge "Show correct security type for PasspointConfiguration" into oc-mr1-dev 2017-08-02 06:01:04 +00:00
Bill Yi
4f2d65e063 Import translations. DO NOT MERGE
Change-Id: I2c6419d6531613745bd3911f59bec65c2cbcbf51
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-08-01 16:55:49 -07:00
Sundeep Ghuman
8bf1f86606 Merge "Fix broken robotests." into oc-dr1-dev
am: a048e3c03f

Change-Id: If07fc6d27b94cd515f2b205ab2cd77bd84302942
2017-08-01 22:47:07 +00:00
Peter Qiu
280581b105 SettingsLib: wifi: add support for tracking carrier Wi-Fi APs
Added carrier network info AccessPoint to indicate if a given
AP is associated with a cellular carrier.

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

Change-Id: I10e44b5e18099c7052a973ea24809e75bb2ba9ea
2017-08-01 13:53:05 -07:00
Sundeep Ghuman
370660915d Fix broken robotests.
In ag/2580164 AccessPoint.java made a reference to WifiTracker, which
in term references WifiNetworkScoreCache. Since the Robolectric in the
platform still has not been updated to support API 26 (Android O), this
caused the test to break.

By definining the class in the test package, the test can be fixed until
proper Android O support is added to the robolectric prebuilts in the
platform code.

Bug: 64217019
Test: make -j40 RunSettingsLibRoboTests
Change-Id: I6cfd5c17d1aba98d43cca4828058493960a7ff79
2017-07-31 18:46:45 -07:00
Eric Schwarzenbach
0b8700f842 Add individual ScanResult speeds to verbose logging.
Moves the individual ScanResult summary string generation out of
getVisibilityStatus into its own method `verboseScanResultSummary`,
to reduce duplication and to enable testing the per-ScanResult speed labeling.

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

Change-Id: I9583d142a7d50314017154703df4e1ce69fc68aa
2017-07-31 15:46:29 -07:00
Tomoharu Hatano
2bde6e72ec Show correct security type for PasspointConfiguration
Security type for PasspointConfiguration is not shown
correctly on Wi-Fi detail screen because AccessPoint.java
does not return correct security string via getSecurityString().

Bug: 62182395
Test: manual

Change-Id: I76436d7efbf18b6f5478d35f02fac3dfcae2be53
Singed-off-by Tomonori Nanbu <tomonori.nanbu@sonymobile.com>
2017-07-31 13:38:06 -07:00
pkanwar
bf7ceec031 Add string needed to support carrier wifi in UI.
Add strings which will be used to indicate to the user in the wifi
picker and wifi config that they are connecting/connected to carrier
wifi.

Bug:30988281
Test: manual
Change-Id: I41e63ce831dface4f2baf2879dde84ebe2fecc94
2017-07-30 17:59:27 +00:00
Sundeep Ghuman
db2eabbbab Fix race condition / test flakiness.
The potential for a race condition exists in WifiTrackerTest,
which intermittently manifests in APCT. By waiting for all handlers
to be idle before asserting our test verification, we can fix this
flaky test. Also added more verification steps to test code to more
precisely indicate where a test may be failing.

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

Change-Id: I597fd7dc29e7f3b0d13c8cdebfa208326a64f507
2017-07-28 15:19:41 -07:00
Bill Yi
5f6bc5e1c4 Import translations. DO NOT MERGE
Change-Id: I2c47595d891804dd376dd6b14764d20d61891b01
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-07-28 01:50:05 -07:00
Bill Yi
03d4052fcf Import translations. DO NOT MERGE
Change-Id: I757ee47abb27616c1a9112490c805375e8710ec7
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-07-28 01:44:25 -07:00
jackqdyulei
02e8cd599d Update string for not charging.
This string means that even though charger is connected, the charger
is not charging the battery

Bug: 37546354
Test: Build
Change-Id: Ib7000047eb97623132f681d0c12833ed1ce385e6
2017-07-27 01:00:25 +00:00
TreeHugger Robot
eea2441f0a Merge "resolve merge conflicts of 1e74fdb6842b to oc-mr1-dev" into oc-mr1-dev 2017-07-26 23:25:05 +00:00
TreeHugger Robot
20c5ac18db Merge "Import translations. DO NOT MERGE" into oc-mr1-dev 2017-07-26 19:57:22 +00:00
Antony Sargent
d1dcfd1dc0 resolve merge conflicts of 1e74fdb6842b to oc-mr1-dev
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I1e90e7ff397f7a995c9d6471c876be020e6de582
Merged-In: I92b56b7908e5be8a3553a2779646d48bb5b94f01
2017-07-26 12:55:04 -07:00
TreeHugger Robot
b978569fce Merge "Import translations. DO NOT MERGE" into oc-dr1-dev 2017-07-26 18:39:16 +00:00
Bill Yi
ee8dd9c373 Import translations. DO NOT MERGE
Change-Id: Ia56580662240b965d77ec102ea91a8b0ea5a8bab
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-07-26 08:05:55 -07: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
c7886489ee Merge "Only display RSSI/band information if network is connected." into oc-mr1-dev 2017-07-26 03:42:09 +00:00
TreeHugger Robot
3b8ce7c6d7 Merge "Sort APs by Speed label value instead of ranking score." into oc-mr1-dev 2017-07-26 03:41:27 +00:00
Sundeep Ghuman
f5b7da9b32 Merge "Do not evict scan results in cold start." into oc-dr1-dev
am: d68b6dc56b

Change-Id: If442689c6a05ad261a846a5252d9a0256520508e
2017-07-25 23:05:11 +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
Salvador Martinez
ac791f4454 Merge "move icon so that inline actions in settings can use it" into oc-dr1-dev
am: f104b68a04

Change-Id: Id549831e1061088cefd261f460febcb7b3a3cb3f
2017-07-25 00:05:50 +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