Makes it easier to follow what is going on and also clean-up in
preparation of stand way for AM to interact with containers in WM.
Test: Existing tests pass and manual testing
Change-Id: I91754b6d974dce2f696453cdaed175efb0f10c73
So that test assumptions match previous changes in ipconnectivity.proto.
This patch also tags metrics tests with @SmallTest.
Test: $ runtest frameworks-net
Bug: 32561414
Bug: 32198976
Change-Id: Id58baf6eb9ddf0e10266e9150cb7688dd3136953
This patch introduces an assertEventuallyThat helper function in
ConnectivityServiceTest which given a boolean function retries until the
function returns true or until a maximum retry time is reached.
This function is used to fix flakyness of testAvoidBadWifiSetting where
the Message posted by reevaluate() could reach the Handler's
MessageQueue after waitForIdle takes effect, resulting in the test to
fail.
Instead of fixing the flakyness by introdcing hard sleep times,
assertEventuallyThat is used to reduce the overall test time.
With this change the test has been observed to pass with 100% success
rate over 50000 invocations.
Test: $ runtest frameworks-net
Bug: 32561414
Change-Id: Ib20f4656620b119456c2cb1c709a7fe8195fe44d
This patch fixes flakyness of testRequestBenchmark by adjusting time
limit for callback registration from 100ms to 180ms, and time limits for
onAvailable and onLost triggers from 30ms to 40ms.
With these timeouts the test succeeds 100% over 5000 iterations.
When using 150ms for registration timeout, running the test 5000 times
fails 2 times.
When using 30ms for onLost timeout, running the test 5000 times fails
1 times.
In addition, this patch also cleans testRequestBenchmark and uses the
more stable SystemClock.elapsedRealtime() for duration measurements.
Test: $ runtest frameworks-net
Bug: 32561414
Change-Id: I7601b2f1f11f83914f885a74c8a376173eed186b
Guarantees that timeouts are only delivered if a network never
becomes available. Once a network is available the timeout is
canceled.
Bug: 31402633
Test: all timeout related unit tests pass (new one added)
Change-Id: I2b7adffd82173cf8b99084cbfe5399961d51e148
This activates all frameworks-test tests in runs of the continuous
platform tests.
Test: $ runtest frameworks-net passes (expect Tether
Bug: 32561414
Change-Id: Ib42c4ab2d7214891cd451875ca4bf6db195538c1
Window tokens can now only be on one display, so we now require clients
that want to add/remove window tokens to specify the display they would
like the token to be created on. This simplifies the token handling code
in WM and will be useful moving forward for clients that want to add
windows to external displays.
Test: Existing tests pass
Change-Id: I6b2d8d58a913b3624f1a9a7bebbb99315613f103
This CL adds:
1) Setter and getter in DPM to manipulate logging switch (retrieval
method to come in a subsequent CL(s)).
2) A way for DPM to register to listen for events.
3) Skeleton of NetworkLogger class (more to come in subsequent CL(s)).
Bug: 29748723
Change-Id: I5c04662ccc6febd2ba294b0eaca1ed1da9c16e47
Test methods not tagged with @{Small,Medium,Large}Test will not appear
in the Android Platform Continuous Testing dashboard.
Test methods tagged with @LargeTest will not be run in the Android
Platform Continuous Testing dashboard.
Test: ApfTest passes ($runtest frameworks-net)
Bug: 31479480
Change-Id: Iae28fc30b6229a161388233c40863f38b902991d
* changes:
Move the connectivity tests to frameworks/base/tests/net.
De-guava BroadcastInterceptingContext and move it to testutils.
Move FakeSettingsProvider to a common location.
This was broken by the implementation of IPv6 tethering, which
relies on various private classes which end up calling unmockable
final classes like NetworkInterface.
Making everything public like this is almost certainly not the
best way of fixing this test, but on the other hand there is
value to the test continuing to pass.
Test: runtest frameworks-net # Everything passes.
Test: IPv6 tethering continues to work.
Change-Id: I99cb146b04fd29c6c94080652e1138e8699d58d5
This will give us a good place to put all the networking tests.
Fix: 31479480
Test: adb shell am instrument -w -e notClass com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest 'com.android.frameworks.tests.net/android.support.test.runner.AndroidJUnitRunner' # PASS
Change-Id: I4b389f7f4e33a996885b38670f585e58ca66f777
Removing the static dependency on guava reduces test compile time
by about 20 seconds on a Z840, thus substantially speeding up the
compile/test cycle.
Make FutureIntent public instead of package-private because it is
used directly by NetworkPolicyManagementServiceTest, which as of
this CL is now in a different package.
Test: runtest frameworks-services -c com.android.server.ConnectivityServiceTest # PASS
Test: runtest frameworks-services -c com.android.server.NetworkPolicyManagerServiceTest # PASS
Test: runtest frameworks-services -c com.android.server.net.NetworkStatsServiceTest # PASS
Test: runtest frameworks-services -c com.android.server.NetworkManagementServiceTest # Already failing.
Bug: 31479480
Change-Id: Ifab32c9214e9caab71dbf93b3d3ca88df6f49636
Now display-specific settings, such as dimensions and orientation,
are stored in display override config. For default display it is
mirroring the global config. Each time when global config is updated,
override of the default display should be updated too and vice versa.
Test: Existing and manual tests still pass.
Change-Id: Ic6c2190092d328820f314a05bed43c875db18170
This introduces a new feature of the IBinder command protocol
to allow the shell command implementation to call back into
its caller to ask it to open files in the calling context. This
is needed so that commands that have arguments specifying files
can open those files as the calling shell, not the system (or
whatever) process.
To test this all out, move the "am start" implementation over
to ActivityManagerShellCommand, in particular along with its
option to specify a file in which to write profiling data.
Test: Manual
Change-Id: I0c1e3857defefbd19a2ac29413aafbb34b1e48a3
Test: Tested this change with a device with http://go/ag/1451804 to
make sure the new protocol was understood.
Change-Id: I9c42cfeb27951ae66a77386d0644d84c230a4923
- Setting config_UsbDeviceConnectionHandling_component leads into
launching specified Activity whenever USB device is connected.
- This allows external Activity to manage USB device based on
its own setup and settings.
- Device access can be passed to other app with permission update
by UsbManager.grantPermission.
- added UsbDeviceConnection.resetDevice() to reset USB device connected.
This is necessary to get device out from AOAP.
- Test requires installing UsbHostExternalManagmentTestApp and
AoapTestHost to USB host, and AoapTestDevice to USB Device.
bug: 26404209
Change-Id: I8e77ddc646c15454d9b2ecf1356924cf6351fc28