Commit Graph

4204 Commits

Author SHA1 Message Date
Hugo Benichi
e504d0be0b Merge "Relax SharedLogTest asserts" am: 91464bfe68 am: 541079e0d7
am: a29861b0c9

Change-Id: I53d99edee6729b753707db251e252297b927d2a7
2017-06-24 12:44:45 +00:00
Hugo Benichi
a29861b0c9 Merge "Relax SharedLogTest asserts" am: 91464bfe68
am: 541079e0d7

Change-Id: I7a584c155915196c9b6b1a856141a3d9ab5699db
2017-06-24 12:37:45 +00:00
Hugo Benichi
541079e0d7 Merge "Relax SharedLogTest asserts"
am: 91464bfe68

Change-Id: Ibcf2ee24ac33a23fb3813dc6045db154644e1a3d
2017-06-24 12:29:28 +00:00
Hugo Benichi
e9f469df84 Relax SharedLogTest asserts
This patch makes the asserts of SharedLogTest looser so that it is less
likely to get invalidated by a date formatting change.

The timestamp format of LocalLog changed in commit 6229d99082 from
"mm-dd HH:MM:SS.xxx" to "yyy-mm-ddTHH:MM:SS.xxx".

Bug: 62918393
Test: runtest frameworks-net pass
Change-Id: I57ab3e05a0f3093f9c7b1760e596a3919d4f2ed7
2017-06-23 13:44:28 +09:00
Erik Kline
c009f2edcd Merge "Always allow Ethernet to be an upstream" am: ecbe6fa147 am: 9cec380720
am: cc6cd46d70

Change-Id: Id60706e623febcc35063ccb96c797fc4f9a223b1
2017-06-21 07:27:48 +00:00
Erik Kline
cc6cd46d70 Merge "Always allow Ethernet to be an upstream" am: ecbe6fa147
am: 9cec380720

Change-Id: I97cc3c5ad7dcd4359c28e6aa817856a226a4f8cc
2017-06-21 07:20:54 +00:00
Erik Kline
9cec380720 Merge "Always allow Ethernet to be an upstream"
am: ecbe6fa147

Change-Id: Ic9fd4bfd6ba7ecc00552019f804b87bc203ea98a
2017-06-21 07:13:46 +00:00
Erik Kline
0e61baa0ac Always allow Ethernet to be an upstream
If there are any upstream types defined at all, make sure that
either TYPE_ETHERNET is included somewhere within the sorted list
or force it to be at the front.

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 32163131
Bug: 36076442
Change-Id: Ie61d1358f73d518de23f6ca48ca2765ca14a1067
2017-06-21 14:03:03 +09:00
Erik Kline
0cec17209e resolve merge conflicts of 9e6b6e2a58 to oc-dev-plus-aosp
am: b912c50b19

Change-Id: I973bdc5b540cce66a9713cebfd5071ad4a4b0a08
2017-06-20 15:05:23 +00:00
Erik Kline
b912c50b19 resolve merge conflicts of 9e6b6e2a58 to oc-dev-plus-aosp
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I2104ecf8102c8f9541ee2d3ce6589b0081db4fe3
2017-06-20 22:04:32 +09:00
Erik Kline
9e6b6e2a58 Merge "Create a TetherInterfaceStateMachine when told the interface name."
am: 51ee00785c

Change-Id: If79a096375e6b9665d5ba4aa0bcd9dbec6a8adab
2017-06-20 11:12:00 +00:00
Erik Kline
41531e267d Create a TetherInterfaceStateMachine when told the interface name.
Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 32163131
Bug: 62343300

Change-Id: I93f3bdcf20dc4f03cd621d7ab6066344642550e3
2017-06-20 17:28:55 +09:00
Siarhei Vishniakou
d5c0ef9467 Merge "Revive DeadZone" into oc-dev am: b278424fa6
am: 305fe47d65

Change-Id: I1402412d130edc9ad32cc60c030c92711a487b96
2017-06-20 00:06:08 +00:00
Siarhei Vishniakou
305fe47d65 Merge "Revive DeadZone" into oc-dev
am: b278424fa6

Change-Id: I5a06302eaad1e955aaea6ae8d2785c0b12e53cc4
2017-06-19 23:59:46 +00:00
Siarhei Vishniakou
d37884a528 Merge "Revive DeadZone" into oc-dev
am: b278424fa6

Change-Id: Ib4388b31d3b636826c428a89389585ae5b9cb25e
2017-06-19 23:58:04 +00:00
Siarhei Vishniakou
6ad0e39f33 Revive DeadZone
Override dispatchTouchEvent for the root FrameLayout
of NavigationBar to process ACTION_OUTSIDE MotionEvents
and dispatch directly to DeadZone to keep track of the
most recent outside tap.
Clarified documentation of ACTION_OUTSIDE behaviour.

Bug: 37552674
Test: open IME, tap any key, then quickly tap on top half
of the home button. The home button tap is ignored
and device does not go to homescreen.

Change-Id: Icb5cf6c76959f3514b8b94c09e38cc5434f31b23
2017-06-19 14:06:21 -07:00
Erik Kline
576d67b453 Merge "Make interface IP serving code set LinkProperties" am: 1dae9a4709 am: 9461f78541
am: 5219f643dd

Change-Id: I39a1744a7fa9b91e3b607429c79f39578e9bde19
2017-06-19 13:37:15 +00:00
Erik Kline
5219f643dd Merge "Make interface IP serving code set LinkProperties" am: 1dae9a4709
am: 9461f78541

Change-Id: I753ab701f2109c0972816724e73119dc1dbc4dca
2017-06-19 13:26:13 +00:00
Erik Kline
9461f78541 Merge "Make interface IP serving code set LinkProperties"
am: 1dae9a4709

Change-Id: I84e4b3fb0be210f59eb663597a6c81c95d3e51d6
2017-06-19 13:15:02 +00:00
TreeHugger Robot
7284e2a88b Merge "make UpsreamNetworkMonitor the sole source of upstream network information" into oc-dr1-dev 2017-06-19 08:31:38 +00:00
Erik Kline
dd4d582034 Make interface IP serving code set LinkProperties
Additionally, clean up awkward IPv6TetheringInterfaceServices
instantiation mechanics.  In future, this class will be absorbed
by TetherInterfaceStateMachine (prior to its renaming to IpServer).

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 29337859
Bug: 32163131

Change-Id: Ib620e3df182f9f8e2c019aae1cd8981eb0b29376
2017-06-19 15:51:50 +09:00
Lucas Dupin
af26f72fb8 Merge "K-Means color clustering" into oc-dr1-dev
am: 11cc260047

Change-Id: If99425cb57a322900f476227932cdcadd85abf00
2017-06-17 17:26:20 +00:00
Lucas Dupin
1d3c00d5c7 K-Means color clustering
Test: runtest -x tests/Internal/src/com/android/internal/ml/clustering/KMeansTest.java
Bug: 37014702
Change-Id: Idabc163df5ded362acbe462ae6b351394a36db10
2017-06-16 18:04:42 -07:00
Erik Kline
2e290617c5 Merge "Fixes for tetheroffload crashes" am: 5ac7a03f9f
am: eeb0b31afa

Change-Id: I58c467be3482e01f84c9860e2b9d4b03713c1dbd
2017-06-16 14:10:44 +00:00
Erik Kline
eeb0b31afa Merge "Fixes for tetheroffload crashes"
am: 5ac7a03f9f

Change-Id: I08406513912c9fbd383625f10837085abb5c0516
2017-06-16 14:03:10 +00:00
Erik Kline
664d208a23 Fixes for tetheroffload crashes
Now that we can talk to the HALs (with some out of tree CLs and
"setenforce 0"), several crashes were encountered.

Fixes here include:
    - avoid hidl_handle move semantics
    - check HIDL method status return value (isOk())
    - convert Java short port numbers to ints
    - don't pass nulls to HIDL where Strings are required
      (limitations in parceling)

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
    - "setenforce 0" and start tethering
Bug: 29337859
Bug: 32163131

Merged-In: I5fa930be0c9eda491cf17bd4de9b55ab33672d25
Merged-In: Id1037d22826f4d426bccfa17dce0962c54518d64
Change-Id: I91314440c3a04e5f2502579b5f06dac9f25cf0cd
(cherry picked from commit 1185459c41)
2017-06-16 21:11:39 +09:00
Erik Kline
c1189434c0 Merge "Fixes for tetheroffload crashes" into oc-dr1-dev
am: b71e5377f2

Change-Id: Id1037d22826f4d426bccfa17dce0962c54518d64
2017-06-16 10:35:22 +00:00
Erik Kline
1185459c41 Fixes for tetheroffload crashes
Now that we can talk to the HALs (with some out of tree CLs and
"setenforce 0"), several crashes were encountered.

Fixes here include:
    - avoid hidl_handle move semantics
    - check HIDL method status return value (isOk())
    - convert Java short port numbers to ints
    - don't pass nulls to HIDL where Strings are required
      (limitations in parceling)

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
    - "setenforce 0" and start tethering
Bug: 29337859
Bug: 32163131

Change-Id: I91314440c3a04e5f2502579b5f06dac9f25cf0cd
2017-06-16 17:06:05 +09:00
Paul Duffin
68117e559a Fix dependencies of packages that target earlier releases
am: 37e9a28262

Change-Id: Ib8b9272423ba7513ea653843335fd1907970c40f
2017-06-15 11:04:30 +00:00
Paul Duffin
37e9a28262 Fix dependencies of packages that target earlier releases
A previous change added legacy-android-test as a static dependency to
all packages that build against the current, test_current or
system_current and failed to compile when the junit and android.test
classes were removed from the API. Unfortunately, those changes did not
take into account that some of those packages target earlier API
versions and so will always have the classes available at runtime.

This change replaces those static dependencies with dynamic dependencies
for any package that targets an earlier API version. The file changes
were made automatically by a tool that constructed and then analyzed a
full dependency graph of all the Android Java modules. The individual
changes were checked manually to ensure that the changes matched the
intent. The affected modules were built against an API with the junit
and android.test classes removed. Any issues found during this process
resulted in either the tool being updated to address the issue or a
separate change being made to fix an existing problem with the build. A
sample of the affected packages were run to ensure that they worked as
expected at runtime; no issues were found during testing.

The following change descriptions were generated automatically and so
may be a little repetitive. They are provided to give the reviewer
enough information to check the comments match what has actually been
changed and check the reasoning behind the changes.

* packages/SettingsProvider/test/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because SettingsProviderTest's manifest file (AndroidManifest.xml)
    targets API level 21 and dynamically includes the
    android.test.runner library at runtime so there is no point in
    statically including the classes.

    Added 'legacy-android-test' to LOCAL_JAVA_LIBRARIES because module
    SettingsProviderTest uses classes from package android.test
    (possible indirectly) and needs them available at compile time.

    Dependency 'legacy-android-test' is used instead of
    'android.test.runner' because the latter will conflict with
    dependencies on junit.

* services/tests/servicestests/Android.mk
    Replaced 'android.test.runner' with 'android.test.mock' and
    'legacy-android-test' in LOCAL_JAVA_LIBRARIES because module
    FrameworksServicesTests uses classes from packages android.test and
    android.test.mock (possible indirectly) and needs them available at
    compile time.

    Dependency 'legacy-android-test' is used instead of
    'android.test.runner' because the latter will conflict with
    dependencies on junit.

    They were not added to LOCAL_STATIC_JAVA_LIBRARIES because
    FrameworksServicesTests's manifest file (AndroidManifest.xml)
    targets API level 26 and uses the android.test.runner library which
    will provide the classes dynamically at runtime.

    Dependency 'android.test.mock.sdk' is used instead of
    'android.test.mock' because module FrameworksServicesTests builds
    against internal jars not the API and so should use libraries that
    build against internal jars not the API.

* tests/AppLaunch/Android.mk
    Replaced 'android.test.runner' with 'legacy-android-test' in
    LOCAL_JAVA_LIBRARIES because module AppLaunch uses classes from
    package android.test (possible indirectly) and needs them available
    at compile time.

    Dependency 'legacy-android-test' is used instead of
    'android.test.runner' because the latter will conflict with
    dependencies on junit.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because AppLaunch's manifest file (AndroidManifest.xml) targets API
    level 24 and dynamically includes the android.test.runner library
    at runtime so there is no point in statically including the
    classes.

* tests/Camera2Tests/SmartCamera/SimpleCamera/tests/Android.mk
    Replaced 'android.test.runner' with 'legacy-android-test' in
    LOCAL_JAVA_LIBRARIES because module SmartCamera-tests uses classes
    from package android.test (possible indirectly) and needs them
    available at compile time.

    Dependency 'legacy-android-test' is used instead of
    'android.test.runner' because the latter will conflict with
    dependencies on junit.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because SmartCamera-tests's manifest file (AndroidManifest.xml)
    targets API level 17 and dynamically includes the
    android.test.runner library at runtime so there is no point in
    statically including the classes.

* tests/Compatibility/Android.mk
    Replaced 'android.test.runner' with 'legacy-android-test' in
    LOCAL_JAVA_LIBRARIES because module AppCompatibilityTest uses
    classes from package android.test (possible indirectly) and needs
    them available at compile time.

    Dependency 'legacy-android-test' is used instead of
    'android.test.runner' because the latter will conflict with
    dependencies on junit.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because AppCompatibilityTest's manifest file (AndroidManifest.xml)
    targets API level 21 and dynamically includes the
    android.test.runner library at runtime so there is no point in
    statically including the classes.

Bug: 30188076
Test: make checkbuild and ran a sample of tests
Change-Id: I3d183a96bf87437028a2d4b774d311e40349f4d0
2017-06-15 09:10:13 +01:00
Erik Kline
1e2897dcff make UpsreamNetworkMonitor the sole source of upstream network information
Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 29337859
Bug: 32163131

Merged-In: If45443143777e1446c812563742ae8af68d8f73e
Merged-In: Ifeb49f1b19ab36e438763b569c78a335b094f7d0
Merged-In: Idfebb9b79074f21aeccf773cac98aa7839bda9da
Change-Id: I66ce682cf9c31887264a095a4e4638d281d8ed39
(cherry picked from commit 5bbece747f)
2017-06-15 15:28:50 +09:00
Erik Kline
3760999e34 Move findPreferredUpstreamType into UNM
This changes the way in which available networks are found. Previously
Tethering asked ConnectivityService for NetworkInfo and checked for
whether or not it was in state CONNECTED.

Here we use the fact that ConnectivityService will not call UNM's
callbacks' onAvailable() methods until the networks in question have
become connected.

Test: as follows
    - built
    - flashed
    - booted
    - runtest framework-net passed
Bug: 29337859
Bug: 32163131

Merged-In: I9937297727aa1a063e499fccd5833ace229b1e8a
Merged-In: Ifa1a34a1fb32149085421a63cb0f2586d2862d6b
Merged-In: Ia215e55b69b856f5511e5d4f852e39fa6c11462e
Change-Id: I97abe225fdd3accb38bd9168f545445b761a90d8
(cherry picked from commit a1d368af2f)
2017-06-15 15:28:50 +09:00
Gopinath Elanchezhian
4372af3090 Merge "Use TotalTime instead of ThisTime in app launch test" into oc-dev
am: cbf19dcd76

Change-Id: If78cc6a4c6a0677e872a99aab9a607022b9008ad
2017-06-15 05:12:45 +00:00
Erik Kline
a8e2e799a8 Merge IPv6TetheringInterfaceServices into TetherInterfaceStateMachine
Ideally this would have been done immediately after IPv6 tethering code
was made part of an official named release. Getting this in now should
help with the relaying of LinkProperties that is required for offload.

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
    - runtest frameworks-wifi passes
Bug: 29337859
Bug: 32163131

Merged-In: Ib6e6356e6caa469523fc098e850108de97b494e2
Merged-In: Iec52309a56dd38ac9854ce40a792b3b622f0b015
Merged-In: I5eb3c02331aabc033ecfebee2900477c61e1b6f6
Change-Id: I015fa3cb05a15624f9e80b7aa5a871cefef431b7
(cherry picked from commit 94ae4c99c5)
2017-06-14 19:45:34 +09:00
Erik Kline
607df03ae0 Merge "Merge IPv6TetheringInterfaceServices into TetherInterfaceStateMachine" am: 6f029bbc82 am: 35728f01cb
am: d2bf55e300

Change-Id: Iec52309a56dd38ac9854ce40a792b3b622f0b015
2017-06-14 10:32:29 +00:00
Erik Kline
d2bf55e300 Merge "Merge IPv6TetheringInterfaceServices into TetherInterfaceStateMachine" am: 6f029bbc82
am: 35728f01cb

Change-Id: I5eb3c02331aabc033ecfebee2900477c61e1b6f6
2017-06-14 10:25:33 +00:00
Erik Kline
35728f01cb Merge "Merge IPv6TetheringInterfaceServices into TetherInterfaceStateMachine"
am: 6f029bbc82

Change-Id: I098bd78d29cf4119208d24977dab8494d3bf5fdb
2017-06-14 10:19:35 +00:00
gopinath
8c64bf0edf App launch test apk change
am: 0a2c9396a2

Change-Id: I2468cfc8f0db8c993ed0203d12bffb5abcd76305
2017-06-14 04:39:30 +00:00
gopinath
9326f2227c Use TotalTime instead of ThisTime in app launch test
Bug: 62272543

Test: Tested with calculator and facebook messenger launch

Change-Id: Ide4e844e54428edcb7e3356cb3d0492392f6bde3
(cherry picked from commit fb9272c637)
2017-06-14 04:33:21 +00:00
gopinath
0a2c9396a2 App launch test apk change
Support launching the app using the package name.
Remove the unused variables.

b/33226470

Change-Id: I5b3829912782a9fc0c8f09cbd6fa9ee4b5b35314
(cherry picked from commit a00259f47d)
2017-06-14 00:06:01 +00:00
Christopher Tate
d1407961f5 Merge "Fix #62545908 : 'metered' network jobs run without network" into oc-dev am: 796b510787
am: 85c9638438

Change-Id: Icc9968bcbee5fb029a4fea4368ac57fc7bc6c71d
2017-06-13 23:44:45 +00:00
Christopher Tate
4c8dccf728 Merge "Fix #62545908 : 'metered' network jobs run without network" into oc-dev
am: 796b510787

Change-Id: I0659c68ece4fef6d3e93e436a35c960dc341618b
2017-06-13 23:39:28 +00:00
Christopher Tate
85c9638438 Merge "Fix #62545908 : 'metered' network jobs run without network" into oc-dev
am: 796b510787

Change-Id: I8c87bb6ac0ed8867ffd36a6fe1692bfb933bf746
2017-06-13 23:34:51 +00:00
Christopher Tate
06f0852ead Fix #62545908 : 'metered' network jobs run without network
Test: JobSchedulerTestApp

Change-Id: I9c15022f5542163a27c6aaa4c3ee6b677cffd699
2017-06-13 14:04:48 -07:00
Erik Kline
94ae4c99c5 Merge IPv6TetheringInterfaceServices into TetherInterfaceStateMachine
Ideally this would have been done immediately after IPv6 tethering code
was made part of an official named release. Getting this in now should
help with the relaying of LinkProperties that is required for offload.

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
    - runtest frameworks-wifi passes
Bug: 29337859
Bug: 32163131

Change-Id: I015fa3cb05a15624f9e80b7aa5a871cefef431b7
2017-06-13 22:36:37 +09:00
Erik Kline
72240b9eeb Merge "make UpsreamNetworkMonitor the sole source of upstream network information" am: 30a1cf96bb am: cfaeabb3e3
am: 4bcce2b2ef

Change-Id: Ifeb49f1b19ab36e438763b569c78a335b094f7d0
2017-06-13 08:42:44 +00:00
Erik Kline
4bcce2b2ef Merge "make UpsreamNetworkMonitor the sole source of upstream network information" am: 30a1cf96bb
am: cfaeabb3e3

Change-Id: Idfebb9b79074f21aeccf773cac98aa7839bda9da
2017-06-13 08:36:14 +00:00
Erik Kline
cfaeabb3e3 Merge "make UpsreamNetworkMonitor the sole source of upstream network information"
am: 30a1cf96bb

Change-Id: I0f7234363f94694ecc4e97d87c7ffb6bb244895d
2017-06-13 08:29:06 +00:00
Erik Kline
5bbece747f make UpsreamNetworkMonitor the sole source of upstream network information
Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
Bug: 32163131
Change-Id: I66ce682cf9c31887264a095a4e4638d281d8ed39
2017-06-13 12:04:00 +09:00
Erik Kline
f3a08b44ed Add additional mocking for Context innards
Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net passes
    - cherry-picked to master and verified there as well
Bug: 32163131
Bug: 32561414

Merged-In: I2695841bfc31280060754132e589af1ca95911da
Merged-In: I9a05f34035a15b233a44d517f2b2426481679974
Change-Id: I0b5b1b12d55547d08c332c7d274f19f0023a7b07
(cherry picked from commit ec37275ec9)
2017-06-11 18:19:22 +09:00