2058 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Matthew Fritze
1986c25da7 Merge "Move icon resources into SettingsLib for phone buddy" into oc-dr1-dev
am: 1cc73a5773

Change-Id: Iebb70bf9db4c3eabf0aecd07a0ecf9178ff8944b
2017-07-22 03:37:46 +00: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
7b77cf8938 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.

Change-Id: Id3ea88b6d321434e20ac0cd3e2670524c237e24e
Bug: 63908636
Test: robotests
(cherry picked from commit 4d37a1a1e1ca902b8a65bce64fafa0eeea51a4dd)
2017-07-21 22:11:41 +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
Bill Yi
c87481965f Import translations. DO NOT MERGE
Change-Id: I9905307a26573e5e19db63f85ba4a89bab47b166
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-07-21 12:05:22 -07:00
Jeff Sharkey
84c6684bba Merge "Expose SubscriptionPlan API." into oc-mr1-dev 2017-07-21 17:14:30 +00:00
Glen Kuhne
640f04ef38 Merge "Don't set AccessPoint with WifiInfo.INVALID_RSSI" into oc-dr1-dev
am: 860f185c66

Change-Id: I9069d51fa6214d9b78c04eea6ab6adebff13ca2e
2017-07-21 02:37:58 +00: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
Jeff Sharkey
17bebd2fd7 Expose SubscriptionPlan API.
Clean up SubscriptionPlan, add docs, and expose as public API.

Deprecate older constants in CarrierConfigManager, and point users
towards new API.  (The goal of CarrierConfigManager is to express
key/value pairs that are identical for all users on a particular
carrier, not to configure details that vary between users.)

Since a CarrierService may itself not have access to the plan
details, allow them to "delegate" the capability to configure plans
to another package name.

Factor out new RecurrenceRule class which is used by both
NetworkPolicy and SubscriptionPlan internally.  Polish it to support
arbitrary periods, and continue to test it through NPMST.

Bug: 63391323
Test: bit FrameworksCoreTests:android.util.RecurrenceRuleTest
Test: bit FrameworksServicesTests:com.android.server.NetworkPolicyManagerServiceTest
Exempt-From-Owner-Approval: Bug 63673347
Change-Id: I93fae4a43e58e9e4c32f8bf345a257dcd607f088
2017-07-20 14:55:57 -06:00
Eric Schwarzenbach
f4f3842b02 Sort APs by Speed label value instead of ranking score.
This prevents unintuitive sorting if the ranking score (somehow)
sorts differently from the speed label.

This change also fixes a broken test in AccessPointTest.java
'testSummaryString_showsSpeedLabel()'.

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

Change-Id: I4a9e55950541ddbf32e01508484bd40326ef228e
(cherry picked from commit 0b431c9af2324f412edfb329047c5ae9f1ebccd8)
2017-07-20 20:45:31 +00:00
Eric Schwarzenbach
b77d3d7475 Only display RSSI/band information if network is connected.
Change the verbose AccessPoint summary to only display visibility summary
if it is the currently connected network.

Note: This does not fix the underlying behavioral issue where
WifiTracker does not correctly null out the AccessPoint's mWifiInfo.

Bug: 62317380
Test: manual

Change-Id: Idcdd182200d2d2ded6b3200b67c4ed654d45a9b7
(cherry picked from commit 3c4f4ffc5c26981020942397fe54c53f551ea7ca)
2017-07-20 20:21:09 +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
TreeHugger Robot
de82accc3a Merge "Use scores from connected AP only." 2017-07-20 01:26:44 +00:00
TreeHugger Robot
2a0e61f1db Merge "Add Wifi's security type to contentDescription" 2017-07-19 23:31:56 +00:00
Sundeep Ghuman
a28050ae42 Use scores from connected AP only.
When connected to a specific base station, show the speed label for that
specific access point, rather than the best label for all similar access
points in the area.

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

Change-Id: Ic3b3c5838ca8b43daa226335125bb8046dee3884
2017-07-19 16:30:19 -07:00
TreeHugger Robot
a54c89ec56 Merge "Standardize usages of "/" separator in SettingsLib" 2017-07-19 20:39:10 +00:00
Fan Zhang
60b850de5e Add Wifi's security type to contentDescription
Change-Id: I0c1945fd8776814ddf0097c0c1f27ed4dd1c73b2
Fix: 63805288
Test: robotests
2017-07-19 09:22:49 -07:00
Glen Kuhne
446afac159 Add FailureReason to WifiConfiguration
Added a new field that caches extra details about connection failures so
that they may be surfaced in the UI.

Bug: 62915994
Test: Manual...
Change-Id: I6e7860df4ea755e72fbdd4b6bf514338f2f1de80
2017-07-18 14:03:32 -07:00
Daniel Nishi
6c790c2cf8 Merge "Add home activity methods to wrapper." into oc-dr1-dev am: d332076636
am: 5ec6335b74

Change-Id: Iee4b88878f5784172e363c9670f234bda092c6fd
2017-07-18 20:02:34 +00:00
Daniel Nishi
5ec6335b74 Merge "Add home activity methods to wrapper." into oc-dr1-dev
am: d332076636

Change-Id: I623d431fe052649ee2bf80a6ab459f6424f7e9e0
2017-07-18 19:44:33 +00:00
TreeHugger Robot
e1951ac1d5 Merge "Internationalize ZoneGetter properly" 2017-07-18 19:42:07 +00:00
Daniel Nishi
d332076636 Merge "Add home activity methods to wrapper." into oc-dr1-dev 2017-07-18 19:34:42 +00:00
Roozbeh Pournader
5b81031a2f Internationalize ZoneGetter properly
Previously, the string for "GMT", as well as the digits and the
positive and negative signs for timezones were hardcoded (these
should have been different for various locales that use native digits
or an actual minus sign). Also, the number of digits used for the
hour was hardcoded to be two, where for Czech and Finnish they should
only use one digit if the hour is less than ten.

Fixes: 63675397
Bug: 63652836
Test: make -j RunSettingsLibRoboTests
Test: make -j RunSettingsRoboTests
Test: Checked time zone picker in Settings under en-US, fa-IR, ar-EG,
      cs-CZ, he-IL, sq-AL, and fr-FR.

Change-Id: I65191429b8b562f77977b1aa4a7db86a779dddc8
2017-07-17 15:13:06 -07: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
Tony Mantler
09bd539969 Merge changes from topic 'AdbEnableController'
* changes:
  Add ADB enable/disable PreferenceController
  Move to newer mockito/robolectric
2017-07-17 20:26:41 +00:00
TreeHugger Robot
42b4446b0e Merge "Iterate NetworkPolicy towards SubscriptionPlan." 2017-07-15 19:57:08 +00:00
Maurice Lam
68cf9f538b Merge "Load internal resources using name rather than ID" into oc-dr1-dev am: 43e249ff27
am: f4d873fd56

Change-Id: If4b688989d8f7c0da73e32a98a9ebba619c53397
2017-07-15 15:09:44 +00:00
Maurice Lam
f4d873fd56 Merge "Load internal resources using name rather than ID" into oc-dr1-dev
am: 43e249ff27

Change-Id: Ifa239877c607468fe4ca9bdb87f712b10633762b
2017-07-15 15:01:13 +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
Tony Mantler
ec4bae9d86 Add ADB enable/disable PreferenceController
Bug: 34203528
Test: EnableAdbControllerTest
Change-Id: I6bff5fccf4a299df3da46a593bc36447945571c3
2017-07-14 15:39:47 -07:00