Commit Graph

2364 Commits

Author SHA1 Message Date
TreeHugger Robot
0e675bd901 Merge "Exempt tests for hidden APIs." into pi-dev 2018-04-10 16:34:05 +00:00
TreeHugger Robot
086633e03d Merge "WifiConfiguration: Remove a bunch of unused fields" into pi-dev 2018-04-06 19:54:20 +00:00
TreeHugger Robot
1024314c67 Merge "WifiConfiguration: Modify time display in toString" into pi-dev 2018-04-06 18:16:36 +00:00
Nicolas Geoffray
b0284fb5de Exempt tests for hidden APIs.
Bug: 64382372
Bug: 74963051
Test: m
Change-Id: I5234dd6230f2bdd6ffccbf12b25a02d929d20161
2018-04-06 14:54:39 +01:00
Rebecca Silberstein
9c2c8f5df6 Merge "WifiManager: allow setWifiApConfiguration to return false" into pi-dev 2018-04-06 04:42:36 +00:00
Roshan Pius
7fbf0a8e9c WifiConfiguration: Modify time display in toString
Use TimeUtils to format the time display fields which hold wall clock
time.
Also, use |elapsedRealTime| to calculate the time durations for the
fields which are populated using elapsedRealTime.

Bug: 77224338
Test: Unit tests
Test: 'adb shell dumpsys wifi'
Change-Id: I850ebdc3ba1f7bfb7d5137382d2feed7e551c311
2018-04-05 15:32:34 -07:00
Roshan Pius
682ac77a65 WifiConfiguration: Remove a bunch of unused fields
Bug: 77224338
Test: Compiles
Change-Id: I0e1bfcfa1c00a493452c51e7212d176dd9919f3c
2018-04-05 15:32:33 -07:00
Mukesh Agrawal
0f57f60b7c Merge ""02:00:00:00:00:00" invalid for MAC randomization" into pi-dev 2018-03-29 22:25:13 +00:00
Rebecca Silberstein
cf1b40fb2b WifiManager: allow setWifiApConfiguration to return false
The api for setWifiApConfiguration allows for config saves to return
false, but the implementation always returns true (if there wasn't an
exception thrown).  This CL allows the API to actually return false and
adds unittests.

Bug: 67601382
Test: frameworks/base/wifi/tests/runtests.sh
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manually update ap config in settings and verify save
Test: wifi integration tests
Change-Id: I038ab68f5fc4bf22df5b61d329077eacda547338
2018-03-29 15:15:41 -07:00
Jeff Sharkey
407932ebc0 Merge "Tidy up users of TRANSPORT constants." into pi-dev 2018-03-29 19:23:38 +00:00
Jeff Sharkey
c159d52942 Tidy up users of TRANSPORT constants.
Some call sites using explicit TRANSPORT types want to know about the
raw underlying transport, and they don't want to know about VPNs
that are going over that transport.

For example, SettingsLib always wants to know about the actual
Wi-Fi network, so it uses NOT_VPN to avoid being confused by VPN
networks that are backed by a TRANSPORT_WIFI network.

GnssLocationProvider wants to know about any validated internet
access, regardless of the underlying transport.

Test: atest com.android.settingslib.wifi
Bug: 68499889
Change-Id: Ib5897946d856444d9ff3b54c4aeace6baa42f8bf
2018-03-28 13:05:23 -06:00
Etan Cohen
7a60ea4c6a [RTT] Expose new public API for number of measurements
The RTT distance and standard deviation are calculated based on a set
of N measurements. Of those M (M<=N) may be successful.

The quality of the provided results can be assessed by 2 measures:

1. The standard deviation of the results

The standard deviation is only valid if the number of successful
measurements is >1 otherwise a 0 is returned. A value of 0 cannot be
differentiated from a legitimate 0 standard deviation.

In one case (number of samples > 1) a standard deviation of 0 indicates
high confidence in the result. In the other case (number of samples = 0)
no confidence information can be derived.

2. The ratio of successful to total attempted measurements

Add API which provides the number of attempted measurements and number
of successful measurements used to calculate the final results.

Bug: 76445930
Test: N/A (unhide CL only, code verified earlier)
Change-Id: Ia7322b3abc28e83c29d0b0ae79db30fd99bb7fe1
2018-03-28 11:28:11 -07:00
Etan Cohen
ce7179bfcf [RTT] Add API for number of measurements
Add information about the number of attemped and successful measurements
used to calculate the final results (especially critical for standard
deviation).

Bug: 76445930
Test: unit tests & integration tests
Change-Id: I906b6e8a4d74799447ab7c2e55965fdd448dc470
2018-03-27 16:18:54 -07:00
Jong Wook Kim
d184ba5435 "02:00:00:00:00:00" invalid for MAC randomization
Since we are using "02:00:00:00:00:00" as the default/invalid MAC
address in the Wifi Framework, we should make it invalid for Connected
MAC Randomization for consistency.

Updated the configuration to use "02:00:00:00:00:00" as the default
invalid MAC and attempt multiple time to generate valid random MAC.

Bug: 74436465
Bug: 74446723
Test: Unittest
Change-Id: Ia5ac806d478191d7e8fad247d5c3a1b97d16498f
2018-03-21 15:52:52 -07:00
Oscar Shu
c275307166 Merge "Remove unused ScanSettings and WifiChannel classes" into pi-dev 2018-03-20 17:16:27 +00:00
Oscar Shu
6604af68c5 Merge "Deleting Visibility from WifiConfiguration" into pi-dev 2018-03-16 18:45:27 +00:00
TreeHugger Robot
dbeb6bc3f1 Merge "WifiConfiguration: Undeprecate WPA_PSK" into pi-dev 2018-03-15 02:11:46 +00:00
TreeHugger Robot
5e278aedfa Merge "[RTT][AWARE] Minor update to distance documentation" into pi-dev 2018-03-15 02:07:13 +00:00
Roshan Pius
8f1a910ad8 WifiConfiguration: Undeprecate WPA_PSK
This is needed for client mode operations for configuring WPA_PSK
networks. There is no alternative public value for WPA_PSK.
The intention was to deprecate usage of this value for AP
mode, but since we share the same object across client & AP mode
operations, we cannot mark this field deprecated.

Bug: 72332080
Test: make update-api
Change-Id: I75f675b630080d853422f945d7cbc37c5f205fde
2018-03-14 15:17:00 -07:00
Etan Cohen
647ee3aeff [RTT][AWARE] Minor update to distance documentation
Clarify that measured distance may be negative.

Bug: 63446747
Test: builds
Change-Id: Iff73c1e22dcf98dfce6fc69b7c9d4cf8a05af8d7
2018-03-14 13:49:43 -07:00
TreeHugger Robot
7cadb341cf Merge "[AWARE] Minor fix to documentation for Aware + Discovery" into pi-dev 2018-03-14 17:00:51 +00:00
Etan Cohen
881ed3dd89 [RTT] Update LCI/LCR documentation to refect to IEEE 802.11-2016 spec.
Update API doc.

Bug: 73953299
Test: builds
Change-Id: I608f1bc631902baf76d9e21a6dd586b188fdfac1
2018-03-13 07:30:12 -07:00
Ningyuan Wang
e6d152ead2 Remove unused ScanSettings and WifiChannel classes
This is an internal cleanup patch

Bug: 68388459
Test: compile, unit tests
Test: manual test that wifi scan still works

Change-Id: I30ee0b342a04fe55fc8da8142600ccc4d34b30c1
2018-03-12 11:24:25 -07:00
Etan Cohen
e23bb145b0 [AWARE] Minor fix to documentation for Aware + Discovery
Clarify that limits include "=". This is particuarly critical for
the lower range value of 0 since in very close quarters measurements
will result in negative values which will be translated to a 0 - i.e.
must have >=0 for ranging to trigger discovery.

Bug: 65108607
Test: N/A
Change-Id: I443c2fff7fe8dad6133d66a82f645a8304787f4c
2018-03-12 10:28:40 -07:00
TreeHugger Robot
21e331ed2d Merge "Update javadoc for WifiConfiguration.setHttpProxy" into pi-dev 2018-03-09 12:42:55 +00:00
TreeHugger Robot
f5435948d8 Merge "[RTT] COARSE -> FINE permission requirements" into pi-dev 2018-03-09 03:19:50 +00:00
Etan Cohen
eed77825b2 [RTT] COARSE -> FINE permission requirements
Bug: 74358581
Test: rtt unit tests
Test: acts/sl4a RangeApSupporting11McTest:test_rtt_80211mc_supporting_aps
Change-Id: Ie65efe227663f7b85344607c765eaa1a231a2533
2018-03-08 11:08:42 -08:00
Anton Hansson
d137c872cd frameworks/base: Set LOCAL_SDK_VERSION where possible.
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.

Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.

Test: make relevant packages
Bug: 73535841
Exempt-From-Owner-Approval: Global cleanup
Change-Id: I26458e41ecb84de91ac9a356a5d4bafb44f463c1
2018-03-07 11:42:04 +00:00
Rubin Xu
df2ec09a9c Update javadoc for WifiConfiguration.setHttpProxy
Clarify that this method is only available to device owner and
profile owner.

Change-Id: I2f77a16442a0403cc7895bdc3b8375cb22cb68a9
Fixes: 70038439
Test: builds
2018-03-06 15:34:42 +00:00
xshu
2eee7760b5 Deleting Visibility from WifiConfiguration
Removing @hide class that's not being used.

Bug: 74019502
Test: compile, run ./frameworks/base/wifi/tests/runtests.sh
This is CP from master fbce0f15544edc80b1ae49061f6fee365e3a2fea

Change-Id: I8b364bfa09f6fe6a585fbec01e5ff94b8b745bca
2018-03-05 15:26:05 -08:00
Etan Cohen
caf222f814 Merge "[AWARE] Update documentation to reflect Aware+Ranging best effort" 2018-03-02 18:36:10 +00:00
TreeHugger Robot
f10198f1a5 Merge "[AWARE] Update PeerHandle doc to reflect good practice on usage" 2018-03-02 17:08:24 +00:00
Etan Cohen
e43df4defb [AWARE] Add target API check to the Responder to ANYONE config
Responder to ANYONE was deprecated for API >= P. But the manager
code did not check for target API - i.e. even older apps would have
been rejected. Added the target API check to the manager code.

Bug: 72175022
Test: unit test + integration tests
Change-Id: I52e0c877e0af0756816b5b13e42f432504461e20
2018-02-28 10:22:10 -08:00
Etan Cohen
a1b8696787 Merge "[RTT] Fix legacy RTT API" 2018-02-27 05:24:02 +00:00
Andreas Gampe
d33464629d Merge "Frameworks: Annotate JUnit4 test with @Test" am: 3a12454f9a am: af8f4b192d
am: b4654687ef

Change-Id: I7904252d10121901349e49c62577a98f06355cba
2018-02-27 02:09:58 +00:00
Andreas Gampe
b4654687ef Merge "Frameworks: Annotate JUnit4 test with @Test" am: 3a12454f9a
am: af8f4b192d

Change-Id: Id390ce18897982a278b0b8b74650e45fa25e5a36
2018-02-27 01:54:13 +00:00
Etan Cohen
ffb49e3a60 [RTT] Fix legacy RTT API
Legacy RTT APIs wrap around the new RTT API. The translation of
results from new to legacy APIs allocated the full number of
results - but only filled-in one of the results - the others
were left null.

Bug: 73884773
Test: RangeApSupporting11McTest:test_legacy_rtt_80211mc_supporting_aps
passes with multiple APs

Change-Id: Id5ec70de272868d92154bdca9eee1d398c3a1801
2018-02-26 09:33:25 -08:00
Andreas Gampe
112bbf1f43 Frameworks: Annotate JUnit4 test with @Test
Mollify Errorprone.

Bug: 72076216
Test: m javac-check RUN_ERROR_PRONE=true
Test: atest CredentialTest
Change-Id: I07635124a306f82e5442a45a1fd61edc63c015a2
2018-02-26 08:07:19 -08:00
Etan Cohen
6538650e29 [AWARE] Update PeerHandle doc to reflect good practice on usage
Update PeerHandle doc to relfect that while can be compared and hashed,
good practice will use an app level identifier.

Bug: 68931709
Test: 'make update-api' and reviewed generated doc
Change-Id: If6725e8854976d482ca18429a9b5352cff0baf93
2018-02-22 12:36:46 -08:00
Etan Cohen
8c4c5bf275 [AWARE] Update documentation to reflect Aware+Ranging best effort
Documentation update to reflect the "best effort" nature of Aware
discovery + Ranging configuration: if ranging is not enabled or
(temporarily) not available then normal discovery is performed.

Bug: 33821639
Test: builds
Change-Id: Ieb33f840809928f6025774bb9cd31dc1dd878518
2018-02-20 09:51:49 -08:00
Etan Cohen
2094d9d306 Merge "[RTT] Replace Handler with Executor in public APIs" 2018-02-17 15:37:24 +00:00
Etan Cohen
554fa64cc9 Merge "[RTT] Ranging timestamp is in millis" 2018-02-17 05:27:30 +00:00
Etan Cohen
dd01fb1e04 Merge "[RTT] RangeResult RSSI now in units of dB" 2018-02-17 05:26:57 +00:00
Etan Cohen
15235cd5f7 Merge "[RTT] LCI/LCR to System API - unparsed" 2018-02-17 00:17:55 +00:00
Etan Cohen
52982a9e40 [RTT] Replace Handler with Executor in public APIs
Per new API guidelines.

Bug: 73088768
Test: unit tests & integration tests
Change-Id: I5aba667e746f4a031fcf53c168e89cbdcfc0c5ec
2018-02-16 10:13:26 -08:00
Etan Cohen
4577b9b17c [RTT] Ranging timestamp is in millis
API review mods: change ranging timestamp to milliseconds. Update
docs to clarify which time is being measured.

Bug: 73088768
Test: unit tests & integration tests
Change-Id: I8a81e92d1a3d264abd98a1695be6a5da6fa5f6a1
2018-02-16 10:13:26 -08:00
Etan Cohen
11fa8355d4 [RTT] RangeResult RSSI now in units of dB
Changed from units of -0.5dB to units of +1dB (original is what comes
from the firmware).

Per API council feedback.

Bug: 73088768
Test: unit tests & integration tests
Change-Id: I77ccbf76f947f29b24a701626e0a1517dd85729e
2018-02-16 10:13:26 -08:00
Etan Cohen
870301c9e2 [RTT] LCI/LCR to System API - unparsed
Move LCI/LCR to a System API - unparsed:
- Punting parsing for future release
- Not widely available in APs for testing
- Usability/deployment unclear

Bug: 71643239
Bug: 73088768
Test: unit tests & sanity integration tests
Change-Id: Idd3bded55e887abbad6c51b00b31e75c859ba579
2018-02-16 10:13:20 -08:00
Oscar Shu
e7a379cdd9 Merge "Deprecate supplicant related stuff in WifiManager" 2018-02-16 18:09:01 +00:00
Oscar Shu
4d012a6b77 Merge "Deprecate WpsInfo" 2018-02-16 18:08:29 +00:00