All the tests are now asynchronous. The only remaining uses of
Thread.sleep() are in the tests that check for NetworkRequest
timeouts.
Test: ConnectivityServiceTest passes 100 times in a row
Bug: 32561414
Change-Id: If420bd66c692a90d5031ee06a888a8cc3b4398a8
The calls in testAvoidBadWifi are no longer necessary now that
waitForIdle is reliable, and the calls in testPacketKeepalives
are replaced with a wait for the NetworkAgent to disconnect.
Test: ConnectivityServiceTest passes 100 times in a row.
Bug: 32561414
Change-Id: Icbb161ca6e343bd14764a1c9ccfdd14b6cd6803f
Rename the class and ensure that all code related to bad wifi
avoidance has names that reflect its purpose. This will allow us
to reuse most of the the code for other purposes in future CLs.
Test: runtest frameworks-net passes
Bug: 34630278
Change-Id: Ida190e5a79e7a12f4eec07e1a3e4d9d138e83bcd
The current implementation of IdleableHandlerThread is based on
the assumption that MessageQueue#isIdle will return true iff the
message loop has finished processing its messages.
Unfortunately, this is incorrect: isIdle returns true iff are no
more messages waiting in the queue; thus, it will also return
true while it is processing the last message before going idle.
Instead of using idle handlers, take the simpler approach of
posting a runnable to the message loop and waiting for it to
be processed.
Test: see other CLs in this patch series
Bug: 31479480
Change-Id: Iae75781f067b762c8653a488a5e4d5ee0c789e01
testApfFilterRa is failing with probabiliy 1/10 ~ 1/15 on the following
assert: assertDrop(program, packet, lifetime/6), for lifetime values
that are multiple of 6, where 6 is the hardcoded fraction of RA lifetime
to filter in ApfFilter.java.
When the lifetime is not a multiple of 6, the remainder of 1 to 5
seconds gives enough margin so that when the APF program is simulated
the faked lifetime of the program is less than lifetime/6 away and the
packet is dropped.
However for lifetimes which are exact multiples of 6, this margin is
always 0s and that result in nondeterminism in the result. This is
consistent with the obervation that the only failed assert was for a
lifetime of 300s, the only multiple of 6.
This can be observed by detecting the age limit at which the filter
stops dropping packet oscillating between lifetime/6 and lifetime/6 + 1
for lifetimes which are multiple of 6.
This patch fixes the flakyness by freezing the flow of time in tests so
that the expected filter age threshold is consistent and stable.
Test: no failure observed in 1000 runs.
Bug: 32561414
Change-Id: I5251d047039f34b82ce8a5d20ae46563e1e0cce8
Couple unit tests are failing due to conditional statements
not enclosed in the parenthesis, which causes unexpected
returned value for the equals function. So fix it.
Bug: 34764955
Test: frameworks/base/wifi/tests/runtests.sh
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: Iaf0151803cb62eb8af308e5de40558617f84cd2f
Broadcasts are not sent until BOOT_COMPLETED is received.
When the device boots with usb plugged, the UPDATE_STATE
for connted and configured would be received way before
BOOT_COMPLETED is received. Since, devices can continue
to stay in same usb configuration(set through persistent
property trigger), check and send a usb state broadcast
if needed.
BUG: 34451258
Test: Manually checked to verify the broadcasts sent.
Change-Id: I8eca5f241ad758f5c4f1afa6c9807868dfd6195a
This prevents cases where the device starts up and attempts
to change the config, but intents cannot yet be sent.
A patch to resend this skipped intent is necessary to
finish fixing the bug.
Bug: 34451258
Test: Check that usb state is properly handled on boot
Change-Id: I9d79c67ce8982fd5b43fa40781b66bb9ae820694
Adds the @hide API to grant ImsServices default permissions
using the PackageManager and DefaultPermissionGrantPolicy APIs.
Test: Manual
Bug: 32460405
Change-Id: Ia143ede42623b4c2203261fc6e83624d73c478f1
Callbacks are possible even if no listener was defined.
Perform a check and print error (as opposed to crashing).
Bug: 32315992
Test: unit-tests + integration tests passing
Change-Id: Ia5eb81448ace6b88abcd448e4f378da6530ac630
This patch defines 4 new constants in metrics_constants.proto
corresponding to the 4 network notifications shown by
NetworkNotificationManager.
Estimates for the average number of notifications:
- SIGN_IN: 3/day/device
- NO_INTERNET: 5/day/device
- LOST_INTERNET: 5/day/device
- NETWORK_SWITCH: 3/day/device (turned off right now)
Test: no functional change
Bug: 32198726
Bug: 33030620
(cherry picked from commit e1cbf15f1ad7f2f7e1cc1e96e6a82c3fa2f70bdf)
Change-Id: I6020c283329f752170cef451725b4e5287509bc5
Method to tell when the adapter finished (or will finish) being in
discovery mode.
Test: compiles and still can scan
Bug: 34395439
Change-Id: I41b48c2b934c0a1d5e1727cec08f3f762e3cb309
- Adds config_ims_package device overlay, which specifies the default
package name to bind to.
- Adds config_dynamic_bind_ims device overlay, which determines
whether or not the new dynamic binding system is used.
- Adds @hide TelephonyManager API to interface with the ImsResolver
Test: Manual
Merged-In: I82a41da00e6da34629a40db431f13b968dfafe2e
Change-Id: I82a41da00e6da34629a40db431f13b968dfafe2e
If a null certificate is passed to setClientKeyEntry() we should
not pass a non-null array with a single null element to the
setClientKeyEntryWithCertificateChain helper method. Instead we
should pass a null array.
Cherry-pick of 410a3498ac28dccf69212d94a533040893c7ce0c
Bug: 34765004
Test: cts-tradefed run cts -d --module CtsNetTestCases --test android.net.wifi.cts.WifiEnterpriseConfigTest
Change-Id: I02793b4b29bc7325f98833c58bf652ba68353827
For notifying ART it will run a debuggable app.
Also rename ENABLE_DEBUGGER to ENABLE_JDWP.
Test: builds and runs
bug: 28769520
Change-Id: Ic096a176edfd5bf0bbe92b8367fbaa687a07d284
SystemProperties.get() is not particularly fast,
especially if a string is returned. Since ro.* values
are unable to be changed, there's no need to
continously re-query them. Cache the value at
static init time to trivially fix this.
Test: refactoring CL.
Change-Id: Iccb021d3cb2ba3a4a1d0048ddec6811bb7409eec
(cherry picked from commit aa67f684ff43c81e3280c846245ec6ebe907787e)
Add a list of supporting certificates to be presented in the process
of presenting client credentials.
Cherry-pick of e3511767169357a1409119b5666c62d50e005583
Bug: 34688653
Test: Compile, unit tests
Change-Id: I6afd8baf67312e8ddaaeefd26f30dacc51aa33bb
Adding #9 as a country-specific exception of MMI codes so that
we can treat it as Dial number. This config change is necessary
to fulfill carrier's requirement.
Test: manual - check dialing #9
Bug: 34755732
Change-Id: I485e48cf30610ff012f84d43935454e693b0d94d
The character limit for message "Use System Selection (Default)"
has been increased from 40 to 50.
Test: UI visual inspection
Bug: 34662759
Change-Id: I9aba6847ddab27bb0456fb6dfd429692732f07c2
The changes include:
- Split WNM notifications intent to dedicated intent for each
event: Deauth Imminent Notice and Subscription Remediation
- Add intent for broadcast OSU Providers List
- Update Passpoint icon intent definitions to conform to the
API guide
- Make WifiManager#queryPasspointIcon public
All added/updated intents will required receiver to have
android.Manifest.permission.ACCESS_WIFI_STATE in order to
receive the intents.
The deprecated hidden intent definitions will be removed once
the WifiService is updated to use the new intents.
Bug: 34198926
Test: make -j32
Change-Id: If28a5710f68271069c663a953538f920512e3240
Merged-In: Ic17eef8364d79144eb530c68c6877712efcb5209
This is for use while preferred upstreams are expressed as legacy types.
Test: as follows
- built (bullhead)
- flashed
- booted
- runtest frameworks-net passes
- USB tethering to WiFi and DUN works
Bug: 32163131
Change-Id: I76e7b6c95eb1b54e926096b2791163617bb0a818
Add option '--streaming' to 'am start' and 'am profile' commands.
If the option is given, the output of method trace profiling
will be streamed into the specified file, so the output is no
longer limited by the buffer size.
Test: m -j48 test-art-host;
m -j48 ART_TEST_TRACE=true ART_TEST_TRACE_STREAM=true test-art-host;
I also tested manually. Tried all 8 combinations of
sampling/instrumention
streaming/non-streaming
'am start --start-profiler' / 'am profile start'
The output files are all in expected shape.
Bug: 33300765
Merged-In: I8a5136a1c7330c8260b7c6c8da63f42a73aee275
Change-Id: I8a5136a1c7330c8260b7c6c8da63f42a73aee275