3505 Commits

Author SHA1 Message Date
Hugo Benichi
28d240c72d Merge "Fix IP connectivity metrics tests" 2016-12-13 03:56:53 +00:00
Hugo Benichi
74b45cd4dc Merge "Unit tests for NetworkNotificationManager" 2016-12-13 02:23:05 +00:00
TreeHugger Robot
2894d0ac51 Merge "Untangle creation of Task from addition of AppToken in WM." 2016-12-13 00:56:09 +00:00
Wale Ogunwale
72919d2c31 Untangle creation of Task from addition of AppToken in WM.
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
2016-12-12 15:09:03 -08:00
Chad Brubaker
5297f03d90 Merge "Default to not allowing cleartext traffic for ephemeral apps" 2016-12-12 18:19:02 +00:00
John Reck
912bebeb74 Fix window copy for rotation = 90/270
Bug: 33421965
Test: Manual via PixelCopyWindow test in HwAccelerationTest
Change-Id: I2a59fd6a26499635a22444e124cd1ec6f82f6e31
2016-12-08 11:22:31 -08:00
Hugo Benichi
74264329da Unit tests for NetworkNotificationManager
Test: new unit test, no functional changes.
Bug: 32198726
Change-Id: I7c371ee547b36531924df34846c26f56a7f2dd7a
2016-12-08 09:54:49 +09:00
Chad Brubaker
b8feba10f4 Default to not allowing cleartext traffic for ephemeral apps
Test: NetworkSecurityPolicy.isCleartextTraffic permitted returns the
expected defaults.
Change-Id: I7d6577f8461bbf1f44eb21b4d813dba1746449fa
2016-12-07 13:17:41 -08:00
Hugo Benichi
80df43ea8a Fix IP connectivity metrics tests
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
2016-12-06 11:56:23 +09:00
Hugo Benichi
f98182ef5e APF: also drop any ICMPv6 RSs
Test: new unit test + $ runtest franeworks-net
Bug: 32833400
Change-Id: Ibd7ce2e3565eab74043fe9604fe2b23abd53a2eb
2016-12-03 14:38:58 +09:00
TreeHugger Robot
42e55d81bd Merge "ConnectivityServiceTest: fix testAvoidBadWifiSettings" 2016-11-24 03:57:01 +00:00
TreeHugger Robot
81981fe852 Merge "Fix ConnectivityServiceTest testRequestBenchmark" 2016-11-23 11:24:15 +00:00
Hugo Benichi
99c8294ef0 ConnectivityServiceTest: fix testAvoidBadWifiSettings
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
2016-11-23 18:29:52 +09:00
Hugo Benichi
38be57b438 Fix ConnectivityServiceTest testRequestBenchmark
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
2016-11-23 18:27:05 +09:00
Etan Cohen
681fcda589 [CS] Remove timeout event after first available
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
2016-11-21 19:15:10 +00:00
Sudheer Shanka
dc589ac82b Update usage of ActivityManagerNative.
- Remove references to ActivityManagerProxy.
- Add isSystemReady to ActivityManager.

Bug: 30977067
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test android.server.cts
      adb shell am instrument -e class com.android.server.am.ActivityManagerTest,com.android.server.am.TaskStackChangedListenerTest \
          -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I07390b6124fb1515821f5c0b37baf6ae74adc8fa
2016-11-14 11:27:12 -08:00
Lorenzo Colitti
667f31278e Merge "Unbreak TetherInterfaceStateMachineTest." 2016-11-10 08:37:58 +00:00
Tamas Berghammer
383db5ebcc Update package names to work with the proto3 compiler
Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
2016-11-08 14:06:09 +00:00
Hugo Benichi
19dfc38434 Merge "frameworks-test: adding missing @SmallTest" 2016-11-07 00:09:56 +00:00
Sudheer Shanka
fc46e9b643 Move IActivityManager to aidl.
Bug: 30977067
Test: Existing tests are passing, dump commands still working.
Change-Id: I9cf81c4d381ebce14a6c701e409cbb269f2ff1fb
2016-11-04 10:43:25 -07:00
Hugo Benichi
fa8a6f6220 frameworks-test: adding missing @SmallTest
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
2016-11-04 16:46:29 +09:00
Wale Ogunwale
ac2561e820 Make window token add/remove APIs require displayId
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
2016-11-02 10:28:45 -07:00
Hugo Benichi
790815453d Merge "ApfTest: tag tests with @SmallTest or @MediumTest" 2016-11-02 12:35:48 +00:00
Michal Karpinski
dd9bb4fdd9 [DPM] DO can start network logging and listen for events
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
2016-11-02 08:52:53 +00:00
Hugo Benichi
4195c28347 ApfTest: tag tests with @SmallTest or @MediumTest
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
2016-11-02 15:12:35 +09:00
Lorenzo Colitti
7072f32b32 Merge changes from topic 'frameworks-net-tests'
* changes:
  Move the connectivity tests to frameworks/base/tests/net.
  De-guava BroadcastInterceptingContext and move it to testutils.
  Move FakeSettingsProvider to a common location.
2016-10-31 04:16:51 +00:00
Lorenzo Colitti
7e0eeca8ba Unbreak TetherInterfaceStateMachineTest.
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
2016-10-28 18:41:55 +09:00
Lorenzo Colitti
ecc986d430 Move the connectivity tests to frameworks/base/tests/net.
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
2016-10-28 17:12:36 +09:00
Lorenzo Colitti
281a17c958 De-guava BroadcastInterceptingContext and move it to testutils.
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
2016-10-28 17:12:36 +09:00
Lorenzo Colitti
7df1a82802 Move FakeSettingsProvider to a common location.
Test: runtest frameworks-util -c com.android.internal.util.test.FakeSettingsProviderTest
Test: runtest frameworks-services -c com.android.server.ConnectivityServiceTest
Test: runtest frameworks-services -c com.android.server.retaildemo.PreloadAppsInstallerTest
Test: runtest frameworks-services -c com.android.server.retaildemo.RetailDemoModeServiceTest
Bug: 31479480
Change-Id: I82a1a1a7219cf1385092b84d85eddf9dda90c685
2016-10-28 17:12:31 +09:00
John Reck
6bc7014210 Add SurfaceHolder#lockHardwareCanvas()
Bug: 26988043
Test: SurfaceViewTests#testSurfaceHolderHardwareCanvas CTS test
Change-Id: I3e5352d498dbe2fc56a18ca27360d129a14c7784
2016-10-27 14:13:44 -07:00
Andrii Kulian
5406e7ade8 Apply display override config for secondary displays
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
2016-10-25 13:22:10 -07:00
Chris Craik
9f891300bb Merge "Add SlowNestedRecyclerViewActivity" 2016-10-13 16:45:50 +00:00
Chris Craik
58d30ae209 Add SlowNestedRecyclerViewActivity
Bug: 31063101
Test: adb shell am instrument -e iterations 10 -w -e class com.android.uibench.janktests.UiBenchJankTests#testSlowNestedRecyclerViewFling com.android.uibench.janktests/android.test.InstrumentationTestRunner

Change-Id: I43e988e889f356323c9aea099f0efc6a04556f11
2016-10-12 16:21:20 -07:00
Julia Reynolds
b754ca6876 Fix channel conditional in cancelAll.
Bug: 32083625
Test: manual and runtest systemui-jank -c android.platform.systemui.tests.jank.SystemUiJankTests -m testNotificationListPull
Change-Id: I1b9bb7a287be461d832816f22822c6dd6eb5e8f0
2016-10-12 10:32:56 -04:00
John Reck
e692f31fd6 Add a graph to jitter test
Test: manual
Change-Id: I914c0852d801d9cd5c4f14cc5a9cfae4b64ff334
2016-10-06 18:06:32 -07:00
John Reck
03a1edfe7f Jitter-specific test exploration
Test: manual, run the RenderingJitter activity
Change-Id: Id6ae9ed471bf02ed3015d369cdf5ea248898bbc2
2016-10-06 15:58:03 -07:00
Dianne Hackborn
354736e196 New infrastructure to switch remaining commands to "cmd" calls.
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
2016-09-29 10:58:44 -07:00
TreeHugger Robot
9af3544905 Merge "Handle the case where window position comes before view map" 2016-09-17 02:05:01 +00:00
Manu Cornet
8439c6dcb2 Handle the case where window position comes before view map
Test: Tested this change with a device with http://go/ag/1451804 to
make sure the new protocol was understood.

Change-Id: I9c42cfeb27951ae66a77386d0644d84c230a4923
2016-09-16 17:06:24 -07:00
Chris Craik
1d01d31503 Slow RecyclerView item binding benchmark am: 58427a62ac am: 3346f28b28
am: bb6491755b

Change-Id: I6154d52beba54f5c7cbbcd9c0714f3b873d35117
2016-09-16 22:40:28 +00:00
Chris Craik
bb6491755b Slow RecyclerView item binding benchmark am: 58427a62ac
am: 3346f28b28

Change-Id: I65f2f0f35e887171d271a7c25b687ed57cfd219d
2016-09-16 22:24:06 +00:00
Chris Craik
3346f28b28 Slow RecyclerView item binding benchmark
am: 58427a62ac

Change-Id: I55d2333c4630fd539d9fdc22a15023e5f4d8c25c
2016-09-16 22:15:31 +00:00
Chris Craik
58427a62ac Slow RecyclerView item binding benchmark
bug:27106058
bug:31063101

Change-Id: Ib903a31be707ba16fccf95cbbe24cd0f0b3baee3
2016-09-13 14:45:53 -07:00
Teng-Hui Zhu
b6bcba34f0 Remove redundant code am: 4ebc5986a8 am: 82907dfd36
am: 4ad89dafb2

Change-Id: I8aee87bd0d1f910ac4ad428f6f063cb07ee58652
2016-09-02 20:42:45 +00:00
Teng-Hui Zhu
4ad89dafb2 Remove redundant code am: 4ebc5986a8
am: 82907dfd36

Change-Id: Ia55faf872466f837ea1b7c327ffc30590d781d60
2016-09-02 17:53:59 +00:00
Teng-Hui Zhu
4ebc5986a8 Remove redundant code
This can save both system image size and run time memory usage.
Every byte counts. :)

b/30956516

Change-Id: I1af0455fe488e3122f6cf8e8fca5a5a43a4614f2
2016-08-31 14:30:37 -07:00
Guang Zhu
d059031c73 Merge "Avoid JUnit4 collision in android-support-test, mockito-target" 2016-08-25 20:42:32 +00:00
Guang Zhu
01c560f4af Avoid JUnit4 collision in android-support-test, mockito-target
Bug: 31072145
Test: make droid checkbuild

Change-Id: I1462b0ba70aa3ede1a5b2ccc407e234dea1eb1b2
2016-08-25 19:37:46 +00:00
Keun-young Park
badbbae6fa allow external USB host management
- 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
2016-08-24 15:00:08 -07:00