Commit Graph

5098 Commits

Author SHA1 Message Date
Anton Hansson
ab6ec61251 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
Change-Id: I4233b9091d9066c4fa69f3d24aaf367ea500f760
2018-02-28 15:13:23 +00:00
Pavel Maltsev
b1a83edb5c Merge "Add OEM_PAID network capability" am: 4c00edd361 am: 7b87c2050c
am: 3b7de55419

Change-Id: Id64d288764dc5a556b60f5e3b866b40792647ac0
2018-02-28 08:42:24 +00:00
Pavel Maltsev
3b7de55419 Merge "Add OEM_PAID network capability" am: 4c00edd361
am: 7b87c2050c

Change-Id: Ie0377fea66f784c910bd0a06f87543cc5cf82c84
2018-02-28 08:28:25 +00:00
Treehugger Robot
4c00edd361 Merge "Add OEM_PAID network capability" 2018-02-28 07:06:00 +00:00
TreeHugger Robot
23aee1bbb5 Merge changes from topic "terminal_type_fix"
* changes:
  Add test for UsbDescriptorParser.java
  USB Audio: broaden Terminal Type interpretation
2018-02-28 00:09:15 +00:00
Andreas Gampe
8fa73a4b87 Merge "Frameworks: Annotate JUnit4 test with @Test" am: 4d9bec6b4a am: 0e8e9472ba
am: 20f00dfe66

Change-Id: I0c611c22eedda2d849bd16ef2e2bb7e2e60e0a5a
2018-02-27 19:39:51 +00:00
Andreas Gampe
20f00dfe66 Merge "Frameworks: Annotate JUnit4 test with @Test" am: 4d9bec6b4a
am: 0e8e9472ba

Change-Id: I70e11136f6e261cccf4ce57f757f97999f74b402
2018-02-27 19:19:01 +00:00
Andrew Chant
7db57cbea2 Add test for UsbDescriptorParser.java
Tests with descriptors from USB-C to 3.5mm adapter in four cases:
 - line level load connected, no microphone
 - low impedance load with microphone
 - low impedance load without microphone
 - no load attached.

Test: Ran tests without fix for bug 73813676, failed.
Ran tests with fix, all passed.

Change-Id: I067a15a122996e80c70bf287c6982611b6deee01
2018-02-26 17:41:26 -08:00
Arthur Eubanks
886a7bdc3b Remove internal links from ActivityManagerPerfTests README
Test: None
Change-Id: I0dd9cfa210c5ce3a207708c80813fed032c6e196
2018-02-26 15:06:19 -08:00
TreeHugger Robot
5f50a4b827 Merge "Improve output of voice interaction test app." 2018-02-26 22:29:16 +00:00
Narayan Kamath
f157b9f983 Merge "CoreTests: Tidy up legacy tests." 2018-02-26 17:11:50 +00:00
Andreas Gampe
a7b26b59af Frameworks: Annotate JUnit4 test with @Test
Mollify Errorprone.

Bug: 72076216
Test: m javac-check RUN_ERROR_PRONE=true
Test: atest IpSecServiceParameterizedTest
Change-Id: Ia3a253c4c5994937efc0f498ac047c5fb4eee3e9
2018-02-26 08:09:26 -08:00
Dianne Hackborn
dec475649a Improve output of voice interaction test app.
Bug: 73830394
Test: built and ran
Change-Id: I9722b91021585e15ec52ffd36325f884e784f7da
2018-02-23 15:38:03 -08:00
Gopinath Elanchezhian
aa23db0fdc Merge "Add support for hot launch in App launch test." 2018-02-23 22:20:22 +00:00
Andreas Gampe
c5f5ad103f Merge "Frameworks: Remove bogus test method" am: c65d52ff78 am: 8120e8616b
am: dd531adbd2

Change-Id: I0317dedfe5c20c54551f72e6c691dea67dde83ca
2018-02-23 21:26:02 +00:00
Andreas Gampe
dd531adbd2 Merge "Frameworks: Remove bogus test method" am: c65d52ff78
am: 8120e8616b

Change-Id: I1dd4cb24ed7c5afdb9185bacabf7b0a3e8f3a7d8
2018-02-23 21:15:06 +00:00
gopinath
55ca1f4c47 Add support for hot launch in App launch test.
force-stop-app option is added to control hot launch and
cold launch.

Bug: b/73091210

Test:
am instrument -w -r   -e debug false -e launch_directory /sdcard
-e apps "Calculator^Calculator|Clock^Clock" -e trial_launch true
-e log false -e timeout_msec 300000 -e force-stop-app false
-e launch_order CYCLIC -e simpleperf_cmd "simpleperf stat -a"
-e launch_iterations 10 com.android.tests.applaunch/android.test.InstrumentationTestRunner

Change-Id: I4b0f7a61c46e8091e69cad9fa65b5b34f680252d
2018-02-23 19:42:15 +00:00
Jeff Sharkey
725024bb2a Merge "Name specific app for rapid data usage." 2018-02-23 16:28:58 +00:00
Jeff Sharkey
e0c2995d0f Name specific app for rapid data usage.
When a single app is responsible for more than half of the data usage
that caused us to trigger a "rapid usage" alert, name that app in the
notification.  Tests to verify.

Move NPMS->NSS direct calls to "Internal" pattern, following
best-practices to avoid unnecessary AIDL exposure.

Remove 3G/4G split mobile plan support, which has been deprecated for
years and was never supported in a shipping product.

Move MultipathPolicyTracker in tree to reflect its package name.

Test: bit FrameworksNetTests:*
Test: bit FrameworksServicesTests:com.android.server.NetworkPolicyManagerServiceTest
Bug: 69263587, 64221505, 73431080, 72746951
Exempt-From-Owner-Approval: approved in previous PS
Change-Id: I3e4ec1ae2222d51b232f76f32faca93d4f8cd272
2018-02-23 16:27:39 +00:00
Andreas Gampe
336dd4c262 Frameworks: Remove bogus test method
It's tripping Errorprone's JUnit3 test pattern.

Bug: 73797534
Test: m javac-check RUN_ERROR_PRONE=true
Change-Id: Ib0b9b342e085ba640d60e82ebd9a1bbb4fc4e916
2018-02-22 21:25:25 -08:00
TreeHugger Robot
f8149eb6ae Merge "Start target package by binding to Service, not starting Activity" 2018-02-22 18:49:15 +00:00
Arthur Eubanks
ebd2ea0daf Start target package by binding to Service, not starting Activity
This reduces the stddev for a bunch of perf tests by quite a bit
(mostly the ones that rely on starting the package).

This is because previously the target
package was made to start running by starting an Activity, which takes
up CPU cycles.

Now we start a Service and wait for it to report back that its Looper
queue is idle, then proceed.

This does seem to slightly increase the runtime for some of the tests
though...

Some test numbers (only tests that have a large difference before and
after):

Before:
registeredBroadcast_mean=1920309
registeredBroadcast_median=1724844
registeredBroadcast_stddev=559809
manifestBroadcastRunning_mean=2395693
manifestBroadcastRunning_median=2063385
manifestBroadcastRunning_stddev=809836
contentProviderRunning_mean=668463
contentProviderRunning_median=588125
contentProviderRunning_stddev=214116
bindServiceAllowOomManagement_mean=1952431
bindServiceAllowOomManagement_median=2017682
bindServiceAllowOomManagement_stddev=289311
bindServiceAlreadyBound_mean=2146257
bindServiceAlreadyBound_median=2022891
bindServiceAlreadyBound_stddev=614549
bindServiceRunning_mean=4947541
bindServiceRunning_median=4710521
bindServiceRunning_stddev=962094
startServiceProcessRunningReadUriPermission_mean=1914106
startServiceProcessRunningReadUriPermission_median=1915209
startServiceProcessRunningReadUriPermission_stddev=196136
startServiceProcessRunning_mean=2841122
startServiceProcessRunning_median=2564792
startServiceProcessRunning_stddev=684654

After:
registeredBroadcast_mean=2559587
registeredBroadcast_median=2579792
registeredBroadcast_stddev=191377
manifestBroadcastRunning_mean=2709707
manifestBroadcastRunning_median=2725365
manifestBroadcastRunning_stddev=165661
contentProviderRunning_mean=663058
contentProviderRunning_median=639062
contentProviderRunning_stddev=97864
bindServiceAllowOomManagement_mean=1899179
bindServiceAllowOomManagement_median=1932553
bindServiceAllowOomManagement_stddev=184329
bindServiceAlreadyBound_mean=2023920
bindServiceAlreadyBound_median=2051614
bindServiceAlreadyBound_stddev=159993
bindServiceRunning_mean=6683975
bindServiceRunning_median=6753699
bindServiceRunning_stddev=475811
startServiceProcessRunningReadUriPermission_mean=2388997
startServiceProcessRunningReadUriPermission_median=2405365
startServiceProcessRunningReadUriPermission_stddev=244184
startServiceProcessRunning_mean=3384101
startServiceProcessRunning_median=3388282
startServiceProcessRunning_stddev=207333

Test: m ActivityManagerPerfTestsTestApp ActivityManagerPerfTests
Test: adb install \
$OUT/data/app/ActivityManagerPerfTestsTestApp/ActivityManagerPerfTestsTestApp.apk
Test: adb install \
$OUT/data/app/ActivityManagerPerfTests/ActivityManagerPerfTests.apk
Test: adb shell am instrument -w \
com.android.frameworks.perftests.amtests/android.support.test.runner.AndroidJUnitRunner

BUG: 67460485
Change-Id: Iaaaf7d8db885cc1149e74cb7ce4b47a295ab20e4
2018-02-21 17:36:38 -08:00
Kevin Neas
2f72369ee9 Updating AppLaunchWear to correctly parse the launch message.
When we don't kill Home, we get an Warning message:
"Warning: Activity not started, its current task has ben brought to
the front"

This causes the current parser to think the app didn't launch, because
it's looking in the wrong line. Adding +1 to each line, in the cases
where we launch Home

Test: locally
Change-Id: Ie232a57921ed7cf82a6f17b607fbb47591bcdbed
2018-02-21 15:38:50 -08:00
TreeHugger Robot
e70172cbd3 Merge "Update ActivityManagerPerfTests README with atest" 2018-02-21 20:40:47 +00:00
Kevin Neas
e8520b4fc9 Updating AppLaunchWear with more logging and logic.
Agenda keeps failing. Need to more logging to know why
Contacts keeps getting killed. Again, need more logging

Test: local

Change-Id: I6930892d8a2eaa7ad410284fba9ed1c4980820f7
2018-02-21 12:34:43 -08:00
Kevin Neas
f186295584 Merge "Updating AppLaunchWear to add more logging." 2018-02-21 16:59:20 +00:00
Narayan Kamath
0fbfc627ee CoreTests: Tidy up legacy tests.
(not to be confused with core/tests/FrameworksCoreTests.)

- JniLibTest: Completely broken, ther's no Jni lib to load.
- MiscRegressionTest: Doesn't test anything.
- Sha1Test: We have more systematic and complete benchmarks in libcore.

The Apache HTTP tests remain, and only because they are the only
remaining tests of the Apache HTTP lib. They will be moved to the apache
repository in a separate commit.

Also remove bogus dependencies on conscrypt and bouncycastle.

Bug: 73635411
Test: adb shell am instrument -w android.core/android.test.InstrumentationTestRunner

Change-Id: Ia3648da023ceabcb6023941961810516857c4f48
2018-02-21 14:52:51 +00:00
Kevin Neas
514fc73122 Updating AppLaunchWear to add more logging.
Test: local
Change-Id: Ib29afa44819c053789dd956d655395f205b89f64
2018-02-21 04:37:05 +00:00
Arthur Eubanks
ca17a8ea26 Update ActivityManagerPerfTests README with atest
atest command now works

Test: atest -v ActivityManagerPerfTests
Change-Id: I4368199bacb2359d2ddef66ba9783ce1b663e2ab
2018-02-20 17:24:36 -08:00
gopinath
0799a5f5c5 Fix string format in App launch
Change-Id: I22676ab95d39b8b92118eb48145b0d7614d0f03f
2018-02-20 17:24:33 -08:00
nharold
e7e42ceb02 Merge "Fix ConnectivityServiceTest for NATT Keepalive" am: 6d5aea8811 am: ad96984eb5
am: 0a177afbb8

Change-Id: I2ce9d740b82f591b847150ec1eaffa39bfbd0241
2018-02-20 23:21:59 +00:00
nharold
0a177afbb8 Merge "Fix ConnectivityServiceTest for NATT Keepalive" am: 6d5aea8811
am: ad96984eb5

Change-Id: I3c28cbb55f8226776792df9cacf1b5e527389157
2018-02-20 23:07:53 +00:00
nharold
6d5aea8811 Merge "Fix ConnectivityServiceTest for NATT Keepalive" 2018-02-20 19:17:23 +00:00
Chalard Jean
29ff057e1a Merge changes Ic28c5653,Ic635f97b am: 1ea3d9411a am: 27dbc898dc
am: bb186ddfb4

Change-Id: Ieea9917b3a68e08686c74ebf39e5fed61f641a7a
2018-02-19 08:36:01 +00:00
Chalard Jean
bb186ddfb4 Merge changes Ic28c5653,Ic635f97b am: 1ea3d9411a
am: 27dbc898dc

Change-Id: I6596fae1946bffade125a14b3bd095eda557a7a5
2018-02-19 08:24:47 +00:00
Treehugger Robot
1ea3d9411a Merge changes Ic28c5653,Ic635f97b
* changes:
  [LT2] Fix release request while lingering.
  [LT1] Add a test for release request while lingering
2018-02-19 03:45:27 +00:00
Chalard Jean
b72b62d2f7 [LT2] Fix release request while lingering.
Test: runtest framework-net
Change-Id: Ic28c5653d16351903b792e76ba8b199b7ed1f8d4
2018-02-19 11:00:58 +09:00
TreeHugger Robot
f084a7a40f Merge "Switch to inline mockito for a bunch of tests" 2018-02-18 19:43:54 +00:00
Jason Monk
1fc931a38a Switch to inline mockito for a bunch of tests
So we can mock final stuff

Test: The tests
Change-Id: Ia3a47c6655c4b0b9af0aea0ee6f8f6cb9ebaab09
2018-02-18 13:02:25 -05:00
Etan Cohen
25c50380df Merge "Add Executor to the TestLooper" 2018-02-17 15:36:59 +00:00
Nathan Harold
63dd81390d Fix ConnectivityServiceTest for NATT Keepalive
Fix test breakages I caused when adding cell
support for NATT keepalives.

-Make the minimum keepalive interval a constant in
 ConnectivityManager and use it in tests.
-Re-Disallow IPv6 Keepalives

Bug: 73327535
Test: 'runtest -x ConnectivityServiceTest' now passes
Change-Id: I5ec4367d250ee371014e65c897c3897a25a05e2d
2018-02-16 16:34:50 -08:00
Jeff Sharkey
5e4bebb891 Merge "Better handling of NTP-based clocks." 2018-02-16 22:13:01 +00:00
Jeff Sharkey
9911a28adb Better handling of NTP-based clocks.
Now that we have a nice Clock abstraction, we can use it to represent
a clock backed by an NTP fix.  (This makes testing logic much easier
to write.)

We now rely completely on NetworkTimeUpdateService to keep our NTP
fix up to date, instead of trying to refresh in the middle of
critical paths which could trigger random ANRs.

Add internal FallbackClock to make it easier to handle missing NTP
fixes.  Add internal SimpleClock to let implementers focus on single
millis() method.

Test: bit FrameworksNetTests:com.android.server.net.NetworkStatsServiceTest
Test: bit FrameworksServicesTests:com.android.server.NetworkPolicyManagerServiceTest
Bug: 69714690, 72320957
Change-Id: Ic32cdcbe093d08b73b0e4b23d6910b23ea8e1968
Exempt-From-Owner-Approval: approved in previous PS
2018-02-16 22:11:35 +00:00
Benedict Wong
f04eb2edaf Merge "Correct bug in IpSecTransformTest" am: 999d1fc172 am: c9f558d46d
am: 12cb5aae57

Change-Id: Ic29f13053365f3de8d01f9c38f8460d92748a41d
2018-02-16 20:51:37 +00:00
Benedict Wong
12cb5aae57 Merge "Correct bug in IpSecTransformTest" am: 999d1fc172
am: c9f558d46d

Change-Id: I990729e8592e70898867fe72a3d628fd7f9fdaf0
2018-02-16 20:43:12 +00:00
Etan Cohen
cff2fe4f76 Add Executor to the TestLooper
Add a method to obtain an Executor from a TestLooper: the executor
executes on a new Handler on the test looper.

Bug: 73088768
Test: new unit test for executor
Change-Id: Ib0aa10011116a4d998f8d3a7434939338d9b516d
2018-02-16 10:13:26 -08:00
Kevin Neas
a24da17e75 Merge "AppLaunch tests for Wear" 2018-02-16 16:06:19 +00:00
Nicolas Geoffray
3713218355 Merge "Small cleanup in AppLaunch." 2018-02-16 11:28:13 +00:00
Chalard Jean
1fa777d404 [LT1] Add a test for release request while lingering
Test: runtest framework-net
Change-Id: Ic635f97bf3dad8b695b3b8cc32c1a8b891166f9f
2018-02-16 18:09:42 +09:00
Kevin Neas
aff528421f AppLaunch tests for Wear
Wear needs specific changes that the platform team is unable to support.
Most of this code is an exact copy of the AppLaunch file, with a specific
check to not kill the app is Wear Home.

Change-Id: I2332416d61676b52518d6988849271e0b0777009
2018-02-16 04:46:49 +00:00