OSDN Git Service
Josh Gao [Tue, 29 Nov 2016 18:57:01 +0000 (10:57 -0800)]
Add trace category for adb.
Bug: http://b/
31289465
Test: systrace
Change-Id: I765c55c264329227556ff25655e3f00c5c3e8b54
Jeff Sharkey [Mon, 12 Dec 2016 19:30:22 +0000 (19:30 +0000)]
Merge "Catch all exceptions from installd, log codes."
Neil Fuller [Mon, 12 Dec 2016 17:23:18 +0000 (17:23 +0000)]
Merge "Track BufferIterator changes in libcore"
Jeff Sharkey [Mon, 12 Dec 2016 17:15:37 +0000 (10:15 -0700)]
Catch all exceptions from installd, log codes.
Now that installd is throwing both SecurityException and
IllegalArgumentException, it's time that we turned all these
into InstallerException.
Also extend ServiceSpecificException to include the contained
errorCode value when printing.
Test: builds, boots, apps install/uninstall fine
Bug:
13758960,
30944031
Change-Id: Ic9c1e99ae87f4442402ef528bf352c7978572c85
Treehugger Robot [Mon, 12 Dec 2016 08:16:35 +0000 (08:16 +0000)]
Merge "Stop setting net.dns{1234} system properties."
Jeff Sharkey [Sat, 10 Dec 2016 22:57:22 +0000 (22:57 +0000)]
Merge "Remove DEXOPT_OTA flag."
Jeff Sharkey [Sat, 10 Dec 2016 22:54:51 +0000 (22:54 +0000)]
Merge "Final push of installd to Binder; goodbye socket!"
Michael Rosenfeld [Sat, 10 Dec 2016 00:48:52 +0000 (00:48 +0000)]
Merge "Copy preload2.jar to build artifacts"
Michael Rosenfeld [Wed, 7 Dec 2016 19:49:34 +0000 (11:49 -0800)]
Copy preload2.jar to build artifacts
Test: local build
Bug:
33492076
Change-Id: I76de648cd1947e49278a678a4c6f1dce8092bbd4
Jeff Sharkey [Sat, 10 Dec 2016 00:08:06 +0000 (17:08 -0700)]
Remove DEXOPT_OTA flag.
Test: builds, boots
Bug:
13758960,
30944031
Change-Id: I266a39c6dc7948f784580e4ef1cf0bb8ee27d0e7
Treehugger Robot [Fri, 9 Dec 2016 23:56:34 +0000 (23:56 +0000)]
Merge "Update registerNetworkScoreCache() to accept a filter type."
Jeff Sharkey [Fri, 9 Dec 2016 21:31:26 +0000 (14:31 -0700)]
Final push of installd to Binder; goodbye socket!
Move last two straggling installd commands to Binder and destroy the
socket-based communication channel forever.
Test: builds, boots, apps install fine, pre-OTA dexopt works
Bug:
13758960,
30944031
Change-Id: I9afb9f71858febde34a94f53839b2986493b68a0
Jeremy Joslin [Wed, 30 Nov 2016 23:05:40 +0000 (15:05 -0800)]
Update registerNetworkScoreCache() to accept a filter type.
Defined a new IntDef in NetworkScoreManager named CacheUpdateFilter
with 3 values. Caches must be registered with a filter value and will
only receive updates based on their registered filter. Actual
filtering implementation will follow.
Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
BUG:
32912120
Change-Id: I3ce0bee171e6405176358479fa8a532fd5193824
Merged-In: I8940e0ed1a7bbcb5a81fb3b6a7fafe4fbbc33875
Jeff Sharkey [Fri, 9 Dec 2016 16:42:25 +0000 (16:42 +0000)]
Merge "Prepare to move dexopt calls to Binder."
Neil Fuller [Fri, 9 Dec 2016 14:59:26 +0000 (14:59 +0000)]
Track BufferIterator changes in libcore
Addition of a new method pos().
Bug:
31008728
Test: make
Change-Id: Id5fcb13104a8580ffaa7d4f8d3c473fe14ac5ccd
Paul Duffin [Fri, 9 Dec 2016 14:56:37 +0000 (14:56 +0000)]
Merge "Move android.test classes from core/java to legacy-test/src"
Treehugger Robot [Fri, 9 Dec 2016 10:50:10 +0000 (10:50 +0000)]
Merge "Removing bogus file added by mistake"
Przemyslaw Szczepaniak [Fri, 9 Dec 2016 10:46:18 +0000 (10:46 +0000)]
Hugo Benichi [Wed, 7 Dec 2016 05:39:05 +0000 (14:39 +0900)]
Removing bogus file added by mistake
This patch deletes a bogus file added by mistake in the change with
commit hash
147aa6d53bc1e9f8a3632553abcf936023806e1d.
Test: no code change.
Bug:
32198726
Change-Id: Iffc6b3a5ebd854dc81d537576a4405955abacba7
Lorenzo Colitti [Fri, 9 Dec 2016 09:11:21 +0000 (09:11 +0000)]
Merge changes from topic 'framework-net-aosp'
* changes:
DO NOT MERGE: frameworks-test: adding missing @SmallTest
DO NOT MERGE: Netd events: record connect() success/errno
DO NOT MERGE: Add missing dependency.
DO NOT MERGE: Show notification for always-on app VPN
DO NOT MERGE: Implement metered tracking for NetworkStats summary queries.
DO NOT MERGE: NetworkMonitor: send one DNS probe per web probe
DO NOT MERGE: NetworkMonitor metrics: add first validation information
DO NOT MERGE: APF: also drop any ICMPv6 RSs
DO NOT MERGE: ConnectivityServiceTest: fix testAvoidBadWifiSettings
DO NOT MERGE: Fix ConnectivityServiceTest testRequestBenchmark
DO NOT MERGE: Switch over to new "time.android.com" NTP pool.
DO NOT MERGE: Define API for metering network stats buckets.
DO NOT MERGE: Refactored NetworkStatsServiceTest to use Mockito instead of EasyMock.
DO NOT MERGE: Use @Ignore to explicitly disable a @Test method.
DO NOT MERGE: Fixed NetworkStatsServiceTest and converted it to JUnit4.
DO NOT MERGE: VPN network stat accounting changes.
DO NOT MERGE: ConnectivityThread: use lazy holder idiom
DO NOT MERGE: ConnectivityManager: use ConnectivityThread looper
DO NOT MERGE: ConnectivityManager: a simpler CallbackHandler
DO NOT MERGE: Indicate the NsdServiceInfo attributes are only filled in for a resolved service.
DO NOT MERGE: Add a null check for the OnStartTetheringCallback.
Hugo Benichi [Fri, 4 Nov 2016 07:06:34 +0000 (16:06 +0900)]
DO NOT MERGE: 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
(cherry picked from commit
fa8a6f6220d1a0027ba7969c2d3f72690ddc6495)
Change-Id: I7b0706a7e3368f971d508388e8ad4afc5de9d646
Hugo Benichi [Mon, 31 Oct 2016 06:04:37 +0000 (15:04 +0900)]
DO NOT MERGE: Netd events: record connect() success/errno
Test: $ runtest frameworks-net pass
Bug:
32198976
(cherry picked from commit
8b06bcdfd24100302818ae0e11ee751dd813d5cf)
Lorenzo Colitti [Fri, 9 Dec 2016 05:19:57 +0000 (14:19 +0900)]
DO NOT MERGE: Add missing dependency.
Change-Id: I5deb8e03eb368ab7003f9376f7b4459d2ef5e934
Tony Mak [Thu, 30 Jun 2016 10:19:20 +0000 (11:19 +0100)]
DO NOT MERGE: Show notification for always-on app VPN
This is the same notification as the one shown during legacy lockdown
mode, sans the 'reset' button.
The notification is only shown during times when VPN has not yet
established or has failed, for example during boot or after a crash.
Bug:
29123115
(cherry picked from commit
1a405fe300950d6ceae2166fd074b596d8110dbe)
Change-Id: I929a05c24df01e21415535a333bb14ac4b790a9d
Stephen Chen [Fri, 21 Oct 2016 19:44:26 +0000 (12:44 -0700)]
DO NOT MERGE: Implement metered tracking for NetworkStats summary queries.
Dependent on ag/
1550196 where API is defined.
Bug:
31015360
Bug:
26545374
Test: runtest --path
frameworks/base/core/tests/coretests/src/android/net/NetworkStatsTest.java,
other test classes.
(cherry picked from commit
25147878974f82f875062e99cdee85dd33f3f078)
Change-Id: I46da93ba4afa968facf98f7c3d844fd0c469095a
Hugo Benichi [Wed, 16 Nov 2016 09:18:08 +0000 (18:18 +0900)]
DO NOT MERGE: NetworkMonitor: send one DNS probe per web probe
This patch changes sligthly the two web probes mechanism for captive
portal detection and network validation so that DNS resolution is always
done for both probes.
In general the target web servers of the two parallel HTTP and HTTPS probes
are now different. This introduces a bias in the latency measurement of
th HTTPS probe since this latency will also include DNS resolution in
general.
Test: manual verification + $ runtest frameworks-net
Bug:
32198726
(cherry picked from commit
ab61e7c324b24e46829495bc2597e42ea907c53d)
Change-Id: I3b32ae451f2241849fffe24956758a9f571b1ef1
Hugo Benichi [Tue, 15 Nov 2016 14:23:24 +0000 (23:23 +0900)]
DO NOT MERGE: NetworkMonitor metrics: add first validation information
This patch adds first validation information to:
- ValidationProbeEvent, by extending the probe_type int field of to
also include a bit indicating if the probe was part of a first
validation attempt or not.
- NetworkMonitorEvent, by defining new contants for the event_type
field.
Test: $ runtest frameworks-net
+ manually generating events and inspecting the
output of $ adb shell dumpsys connmetrics list
Bug: b/
32198726
(cherry picked from commit
147aa6d53bc1e9f8a3632553abcf936023806e1d)
Change-Id: Ie7a62c4f62a13ce52806d3adaa9e627cb246073c
Hugo Benichi [Fri, 2 Dec 2016 17:41:05 +0000 (02:41 +0900)]
DO NOT MERGE: APF: also drop any ICMPv6 RSs
Test: new unit test + $ runtest franeworks-net
Bug:
32833400
(cherry picked from commit
f98182ef5e80ede5de7f2c2a5f40fc92a46c9704)
Change-Id: Ifaf6e778c811c7d865c790a293b1fce3f43cad1c
Hugo Benichi [Tue, 15 Nov 2016 04:42:34 +0000 (13:42 +0900)]
DO NOT MERGE: 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
(cherry picked from commit
99c8294ef0c7a720364abb5884063e0a9d1bb5fe)
Change-Id: If41a24989d5f65aeb439f68741f511b5eb53b18d
Hugo Benichi [Tue, 15 Nov 2016 02:25:52 +0000 (11:25 +0900)]
DO NOT MERGE: 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
(cherry picked from commit
38be57b438a0c1754091f045317db2049304e16f)
Change-Id: I196ab9ef7f5abe456a783eed65db09279d2ecb8c
Jeff Sharkey [Fri, 2 Dec 2016 19:17:21 +0000 (12:17 -0700)]
DO NOT MERGE: Switch over to new "time.android.com" NTP pool.
Also add logging to measure success/failure details.
Test: builds, boots, and NTP fix obtained
Bug:
32969463
(cherry picked from commit
d3f689bf14a05de735b5cc92dcf20e7226c78690)
Change-Id: I7da416099ae903fd92beb516251ef4e51673eecf
Stephen Chen [Tue, 18 Oct 2016 23:41:47 +0000 (16:41 -0700)]
DO NOT MERGE: Define API for metering network stats buckets.
This is a continuation of b/
26545374, since now we can also set the
metered bit with NetworkScorer. The tracking of metered state changes
will be implemented in a seperate CL.
Bug:
31015360
Bug:
26545374
Test: N/A
(cherry picked from commit
9ac251d1169639c7b955d63b21e80cbc5c394090)
Change-Id: I6a2fcc8577d62daa8823dff9e0128a5cf39ede7b
Felipe Leme [Thu, 18 Aug 2016 23:20:01 +0000 (16:20 -0700)]
DO NOT MERGE: Refactored NetworkStatsServiceTest to use Mockito instead of EasyMock.
Test: m -j32 FrameworksServicesTests && adb install -r -g ${ANDROID_PRODUCT_OUT}/data/app/FrameworksServicesTests/FrameworksServicesTests.apk && adb shell am instrument -e class "com.android.server.net.NetworkStatsServiceTest" -w "com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner"
BUG:
30943463
(cherry picked from commit
b8f946dc4b24998f14e28573e452ab13ed533347)
Change-Id: Ia9929295ab2396a7ebb133e65d157f98414e4dfa
Felipe Leme [Mon, 22 Aug 2016 15:50:43 +0000 (08:50 -0700)]
DO NOT MERGE: Use @Ignore to explicitly disable a @Test method.
BUG:
30839080
BUG:
31007021
(cherry picked from commit
fc7d7a359f800d7320d29055ef3b4b75157aaf13)
Change-Id: I35942e60493adebb22871541a34240368c691ee7
Felipe Leme [Thu, 18 Aug 2016 22:31:45 +0000 (15:31 -0700)]
DO NOT MERGE: Fixed NetworkStatsServiceTest and converted it to JUnit4.
Most tests were failing because due to a null NetworkCapabilities.
Example:
1) testNetworkStatsWifi(com.android.server.net.NetworkStatsServiceTest)
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.net.NetworkCapabilities.hasCapability(int)' on a null object reference
at
com.android.server.net.NetworkStatsService.updateIfacesLocked(NetworkStatsService.java:983)
BUG:
30839080
(cherry picked from commit
574f370c6da52eeffe747248d68ef044617c7bcf)
Change-Id: Ie09b2f43cf6ec745e404d5ec98bd0b072d211ea3
Jeremy Joslin [Mon, 8 Aug 2016 23:07:37 +0000 (16:07 -0700)]
DO NOT MERGE: VPN network stat accounting changes.
Properly account for VPN apps that make heavy use of the tun
interface. Prior to this change a VPN app could be incorrectly charged
for more data than it actually used if it sent more traffic through
the tun interface than the underlying interface.
This change excludes VPN app traffic on the tun interface from the
adjustment pool and doesn't redistribute traffic to the VPN app.
Instead all of the redistributed traffic is deducted from the VPN app
which effectively represents any overhead incurred by the VPN app.
BUG:
30557871
(cherry picked from commit
8b436d865c9f287e9ae491e5278cd8874f4a865b)
Change-Id: I06f01aa8fe5fdc06b2d36cfb9c68feb244c2e5de
Hugo Benichi [Thu, 13 Oct 2016 07:48:42 +0000 (16:48 +0900)]
DO NOT MERGE: ConnectivityThread: use lazy holder idiom
This patch changes the way that the ConnectivityThread is lazily
instantiated by using the "lazy initialization holder class idiom".
The first code point that tries to obtain a reference to the unique
ConnectivityThread instance will trigger the creation of the Singleton
class, which will guarantee a thread-safe initialization of the static
INSTANCE field inside Singleton according to the language specs.
This is the Item #71 of Effective Java.
The unique static instance of ConnectivityThread is not stored directly
inside ConnectivityThread class but is stored in a static nested class.
This is to avoid triggering the creation of that unique instance when
Zygote does class preloading at phone startup. Otherwise this would lead
to Zygote creating a new OS thread during preloading, which is a fatal
error.
Test: frameworks-wifi tests pass
Bug:
26749700
Bug:
28537383
Bug:
32130437
(cherry picked from commit
c4fe5d373caa9f53686e4d58e61394dd40558957)
Change-Id: If13b363889a8e9396273a90c3d9f9421a48aecbc
Hugo Benichi [Thu, 7 Jul 2016 01:15:56 +0000 (10:15 +0900)]
DO NOT MERGE: ConnectivityManager: use ConnectivityThread looper
This patch removes the static singleton looper used by
ConnectivityManager and instead uses the common ConnectivityThread.
This allows to removes the static atomic counter used to track
the number of registered NetworkCallback in ConnectivityManager, because
the looper is not turned off anymore when no callbacks are registered.
Also an overloaded version of sendRequestForNetwork is added taking as a
new parameter a Handler. This will allow to overload various callback
and request related API calls with user provided Handlers.
Test: ConnectivityServiceTest passes
Bug:
26749700
Bug:
28537383
Bug:
32130437
(cherry picked from commit
7724cdd8b90006c852644d06cf6c8a28450c71c6)
Change-Id: If956addbf8e7b11b36a4b966de7fca00e8f362c1
Hugo Benichi [Wed, 6 Jul 2016 13:53:17 +0000 (22:53 +0900)]
DO NOT MERGE: ConnectivityManager: a simpler CallbackHandler
This patch simplifies CallbackHandler in the following way:
- CallbackHandler directly uses the static references to
sNetworkCallback and sCallbackRefCount. This allows to remove
instance fields in CallbackHandler.
- CallbackHandler does not have a reference to ConnectivityManager
anymore
- CallbackHandler.getObject() is now generic in a type-safe way.
Test: ConnectivityServiceTest passes
Bug:
28537383
Bug:
32130437
(cherry picked from commit
d42650faaa33ec6274278c65a6042228555ddd4f)
Change-Id: I1b5fe2a361b5f623a8310ae698497c83d72f3034
Philip P. Moltmann [Mon, 18 Apr 2016 23:23:06 +0000 (16:23 -0700)]
DO NOT MERGE: Indicate the NsdServiceInfo attributes are only filled in for a resolved service.
Fixes:
28530428
(cherry picked from commit
7d5da4b044183826ac8388c8bdb94ac979a81797)
Change-Id: If2bfc06589adb361f11b89cd5923cb5c255cb680
Jeremy Klein [Sun, 13 Mar 2016 00:29:54 +0000 (16:29 -0800)]
DO NOT MERGE: Add a null check for the OnStartTetheringCallback.
This avoids a NullPointerException when trying to call the callback
and gives a more readable error message.
(cherry picked from commit
5f277e1667b49976a77c9fa79b9a04d775f3b49e)
Change-Id: Ia419ff68ef10f308f9e44be47420e27099ee6070
Treehugger Robot [Fri, 9 Dec 2016 03:19:13 +0000 (03:19 +0000)]
Merge changes from topic 'framework-net-aosp'
* changes:
DO NOT MERGE: IpConnectivityMetrics: rate limit ApfProgramEvents
DO NOT MERGE: TokenBucket for rate-limiting and throttling
DO NOT MERGE: IpConnectivityMetrics reads buffer size in settings
DO NOT MERGE: CaptivePortalLogin: set mixed content policy to compatibility.
DO NOT MERGE: Add IP conn metrics to dumpsys and bug reports
DO NOT MERGE: IpConnectivity metrics: add version number
Hugo Benichi [Tue, 18 Oct 2016 01:36:33 +0000 (10:36 +0900)]
DO NOT MERGE: IpConnectivityMetrics: rate limit ApfProgramEvents
This patch uses the previously introduced TokenBucket to rate limit
ApfProgramEvents, still allowing for burst of ApfProgramEvents when a
new interface is set up (due to ipv4 provisioning, multicast lock, ipv6 RAs
triggering new APF program events in short amounts of time).
Test: new test in IpConnectivityMetricsTest
Bug:
1550402
(cherry picked from commit
e1c173d2240a8eedf7685c9371087dc047a6931f)
Change-Id: Idb640dec13ba64180985544b9709a586af66eb6e
Hugo Benichi [Mon, 17 Oct 2016 23:43:30 +0000 (08:43 +0900)]
DO NOT MERGE: TokenBucket for rate-limiting and throttling
This patch adds a TokenBucket class that can accumulate and distribute
tokens over time.
Test: comes with unit tests.
Bug:
32198637
(cherry picked from commit
998493f0ee39ae0e9ffdea27f48f1b11b0807fcb)
Change-Id: I4012ae6d02f7004bceee9a2ba03914f2a2506031
Hugo Benichi [Wed, 19 Oct 2016 02:17:28 +0000 (11:17 +0900)]
DO NOT MERGE: IpConnectivityMetrics reads buffer size in settings
Test: IpConnectivityMetricsTest passes. Also manually changed the new
setting and verified the buffer size is as expected after flushing the
buffer.
Bug:
32198637
(cherry picked from commit
05686dbb6b965eb1a54591d2ed2334337886c6ee)
Change-Id: Iefbeac3a688b260fb3f92dfe0bfd9db28e26749d
Lorenzo Colitti [Fri, 21 Oct 2016 09:41:25 +0000 (18:41 +0900)]
DO NOT MERGE: CaptivePortalLogin: set mixed content policy to compatibility.
This makes the policy for mixed HTTP/HTTPS content match Chrome.
This allows us to display login pages where unimportant
subresources are HTTP.
Bug:
32171569
(cherry picked from commit
625166377b2d7c5f09d1e7617b3eac3a464fba53)
Change-Id: Ia82958192d978280715442e182c34f9da5c88c66
Hugo Benichi [Wed, 19 Oct 2016 04:48:40 +0000 (13:48 +0900)]
DO NOT MERGE: Add IP conn metrics to dumpsys and bug reports
Test: manually created a bug report and inspected content.
(cherry picked from commit
51d14cb60793a9a073b8a29ff7875bb518cd7d54)
Change-Id: I9649cc2f9bb7a1975e60baaae55fcdb2a48c3b93
Hugo Benichi [Thu, 13 Oct 2016 04:16:16 +0000 (13:16 +0900)]
DO NOT MERGE: IpConnectivity metrics: add version number
This patch adds a version field to ipconnectivity.proto and populates it
to 2, which is the logical version number for NYC-MR2.
Test: IpConnectivity{EventBuilder,Metrics}Test pass
Bug:
32127906
(cherry picked from commit
d680d4c856f54bea0c60dea74ba4204822391e49)
Change-Id: If8f167c0dc4c1abe0e235e2adfd131168a4ddc52
Erik Kline [Tue, 6 Dec 2016 02:53:25 +0000 (11:53 +0900)]
Stop setting net.dns{1234} system properties.
Nothing in the system consumes these properties, they were never part
of an official public API, and they can leak information about the
current network to applications without networking prvileges.
Specifically, these properites allow applications to access network state
(and detect network changes, etc.) without having the ACCESS_NETWORK_STATE
permission.
Test: runtest ConnectivityServiceTest passes
Bug:
33308258
Change-Id: I85abc52bc11aee33940fd0af2397478a9a5c3b8f
Treehugger Robot [Thu, 8 Dec 2016 20:52:14 +0000 (20:52 +0000)]
Merge "Don't include front most excluded task in Multi-Window mode"
Jeff Sharkey [Wed, 7 Dec 2016 21:57:34 +0000 (14:57 -0700)]
Prepare to move dexopt calls to Binder.
Since InstallerConnection is about to be replaced by a new installd
Binder interface, this change moves OtaDexoptService to override and
manually cook up the 'dexopt' command line that it expects to collect
from PackageDexOptimizer.
Since OtaDexoptService is designed to be run in isolation, add a new
mode to Installer which ignores calls that aren't being intercepted.
Also moves to a single dexopt() method instead of having overloads.
Test: builds, boots, fake OTA works
Bug:
13758960,
30944031
Change-Id: I3a6a115289f1542d6df3e2993b9720118b7d1e8d
Paul Duffin [Wed, 30 Nov 2016 13:29:39 +0000 (13:29 +0000)]
Move android.test classes from core/java to legacy-test/src
(cherry picked from
2395179afb2ea957a9ba66404021c14160361611)
Bug:
30188076
Test: make checkbuild
Merged-In: Ifa291909fcf47da788627b496bd72f54efd78ed7
Change-Id: Ie20dceb9f89df245ed6da5fc2fb06185bd7b104b
Lorenzo Colitti [Thu, 8 Dec 2016 09:56:18 +0000 (09:56 +0000)]
Merge changes from topic 'framework-net-aosp'
* changes:
DO NOT MERGE: [CS] Remove timeout event after first available
DO NOT MERGE: ApfTest: tag tests with @SmallTest or @MediumTest
DO NOT MERGE: Unbreak TetherInterfaceStateMachineTest.
DO NOT MERGE: Move the connectivity tests to frameworks/base/tests/net.
DO NOT MERGE: De-guava BroadcastInterceptingContext and move it to testutils.
DO NOT MERGE: Move FakeSettingsProvider to a common location.
DO NOT MERGE: ConnectivityServiceTest: mark flaky test as such
DO NOT MERGE: Add option to skip and avoid captive portals.
DO NOT MERGE: ApfFilter: use elapsedRealTime for RA lifetime
DO NOT MERGE: Do not synchronize boolean reads/writes
DO NOT MERGE: ApfFilter: systematically use u8, u16, u32 getters
DO NOT MERGE: Add fuzzing tests to ApfFilter RA processing
DO NOT MERGE: Support timeouts for requestNetwork() invocations.
DO NOT MERGE: Silence the obnoxious MTU 0 error message that occur when no MTU is specified for a given network.
Etan Cohen [Thu, 27 Oct 2016 22:05:50 +0000 (15:05 -0700)]
DO NOT MERGE: [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)
(cherry picked from commit
681fcda5896fd6c94f8a543ef9983c0a0644e87e)
Change-Id: I7cd3086544c881915fc6dbf14b87a24ab0cd8748
Hugo Benichi [Wed, 2 Nov 2016 04:43:22 +0000 (13:43 +0900)]
DO NOT MERGE: 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
(cherry picked from commit
4195c28347cc100954f83c3c92b4dde4673f8608)
Change-Id: Ia215fc8e2ccc61f6223c24fdf390e1e759de302f
Lorenzo Colitti [Fri, 28 Oct 2016 08:45:55 +0000 (17:45 +0900)]
DO NOT MERGE: 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.
(cherry picked from commit
7e0eeca8ba4063d0d35dda9a8dfcc612e45efb87)
Change-Id: I8a3cf466871c026f4ae0f5cfa73071338cdf5b7e
Lorenzo Colitti [Fri, 28 Oct 2016 03:48:36 +0000 (12:48 +0900)]
DO NOT MERGE: 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
(cherry picked from commit
ecc986d430f4b8158f177ed97d2edb741f11ff71)
Change-Id: I993eeaa5dec001c39389023f355f506129b356e7
Lorenzo Colitti [Fri, 28 Oct 2016 03:56:03 +0000 (12:56 +0900)]
DO NOT MERGE: 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.
(cherry picked from commit
281a17c9580de5c9898be7d9654d428801976511)
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
Lorenzo Colitti [Fri, 28 Oct 2016 03:37:38 +0000 (12:37 +0900)]
DO NOT MERGE: Move FakeSettingsProvider to a common location.
(cherry picked from commit
7df1a82802cdf842d07a86a80383c7d5ea7ae53a)
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: I8d4d4de2937012dd33924f53e68f96241a9b2b4f
Hugo Benichi [Mon, 17 Oct 2016 06:54:51 +0000 (15:54 +0900)]
DO NOT MERGE: ConnectivityServiceTest: mark flaky test as such
This patch extracts into its own independent test a test sub-block looking
for a race condition when not waiting on handlers to become idle:
there is no way to prevent the race from not happening when looking for
it this way. This makes the test flakky.
This new independent test is tagged with @FlakkyTest(tolerance = 3).
Test: ConnectivityServiceTest passes, with higher probability.
Bug:
31479480
(cherry picked from commit
c8c1027762d66c12c9c153ccbb8f80acdee8571c)
Change-Id: I3c702bd981ed80ed606be0fb52d61eb3d7195a6f
Calvin On [Tue, 11 Oct 2016 22:10:46 +0000 (15:10 -0700)]
DO NOT MERGE: Add option to skip and avoid captive portals.
Test: ConnectivityServiceTest updated with test cases.
Test: Manually tested against att-wifi in B42.
Bug:
30222699
(cherry picked from commit
be96da11ccb5dd500f920c3ba90d350857293b3d)
Change-Id: I90c0f97fe0e41de4059bceae7b56ab3a70145696
Hugo Benichi [Mon, 17 Oct 2016 05:21:33 +0000 (14:21 +0900)]
DO NOT MERGE: ApfFilter: use elapsedRealTime for RA lifetime
This patch replaces System.currentTimeMillis() with
SystemClock.elapsedRealTime() to make RA lifetime computation more
resilient to various external events inducing jumps in
currentTimeMillis().
Test: ApfTest passes.
(cherry picked from commit
305af8e98a4fce712c1a93daf3b050dac2e8b91a)
Change-Id: If19011fc0c905948f2e42b975cfcc5f8672a95fb
Hugo Benichi [Tue, 4 Oct 2016 02:24:12 +0000 (11:24 +0900)]
DO NOT MERGE: Do not synchronize boolean reads/writes
This patch removes the synchronization around the private variable
mRunning inside of IpReachabilityMonitor and instead qualifeis the field
as volatile.
Synchronization is not needed for reads/writes on native fields or
object references because they are already guaranteed to be atomic.
Synchronization here was used for enforcing memory visibility across
concurrent threads indirectly through monitor acquire/release.
The volatile keyword achieves this in a more explicit way.
Also, this patch changes the way that probeAll() copies the
IpReachabilityMonitor's mIpWatchList by temporary holding mIpWatchList
keys into an ArrayList instead of a more expensive HashSet. Since Java
HashSet are just degenerated HashMaps, and that key iteration order is
based on key hash, the iteration order over this temporary collection
will be consistent for the same mIpWatchList.
Test: refactoring CL. Existing unit tests still pass.
(cherry picked from commit
b0f1186c034c4df9eb54ed29944d16ce6d7ade56)
Change-Id: I48d2b4d837a459150cd431b400ec01b87b48c014
Hugo Benichi [Thu, 13 Oct 2016 00:26:01 +0000 (09:26 +0900)]
DO NOT MERGE: ApfFilter: systematically use u8, u16, u32 getters
This patch adds a getUint8 getter for ByteBuffers and changes ApfFilter
to make uses of getUint8/16/32 everywhere.
The return types of getUint16 is also changed from long to int, which
will expand gracefully to long as an unsigned int as it is guaranteed to
be positive after getUint16.
Test: ApfTest passes
(cherry picked from commit
995dd94673005b43d32456e2de5fda0090b23576)
Change-Id: I606ebc5aedfcacde400d27cc6bc37145769b122c
Hugo Benichi [Thu, 6 Oct 2016 06:19:36 +0000 (15:19 +0900)]
DO NOT MERGE: Add fuzzing tests to ApfFilter RA processing
Test: added new unit tests
(cherry picked from commit
8acea76a2b7555b3bd5ca1170cca9d09e979fafc)
Change-Id: I847d7e4895766042043c0bba1c9b9a698a705d87
Erik Kline [Wed, 25 Nov 2015 03:49:38 +0000 (12:49 +0900)]
DO NOT MERGE: Support timeouts for requestNetwork() invocations.
(cherry-pick of
06c3ef1367e850746eef0a5462bdce8674d74c30)
(cherry picked from commit
57faba9ec73fbb311d5ca1df3278aee9728589d5)
Bug:
21414325
Change-Id: I1a58823a372154589f972b98c4c428eab0e0523e
Pierre Imai [Mon, 8 Feb 2016 07:01:40 +0000 (16:01 +0900)]
DO NOT MERGE: Silence the obnoxious MTU 0 error message that occur when no MTU is
specified for a given network.
Bug:
10705136
(cherry picked from commit
54f0d9edbf7f6ea6dd805dc77fdbf2c3848188e2)
Change-Id: I89e2fdfbbfa981d435a2974422d9d9c009872d76
Treehugger Robot [Thu, 8 Dec 2016 02:09:39 +0000 (02:09 +0000)]
Merge "Support multiple caches in NetworkScoreService."
Amin Shaikh [Wed, 7 Dec 2016 22:08:09 +0000 (14:08 -0800)]
Support multiple caches in NetworkScoreService.
- Use RemoteCallbackList for managing multiple callbacks
- Add unregisterNetworkScoreCache to the service interface
- Added NetworkScoreServiceTest
Test: runtest frameworks-services
Bug:
32913019
Change-Id: I16ca1682acca9cbe403812e520394688a026414b
Treehugger Robot [Wed, 7 Dec 2016 23:00:26 +0000 (23:00 +0000)]
Merge "Clarify doc on NETWORK_RECOMMENDATIONS_ENABLED and WIFI_WAKEUP_ENABLED."
Michael Plass [Wed, 7 Dec 2016 22:56:57 +0000 (22:56 +0000)]
Merge "Remove user-triggered disconnect counters"
Jeff Sharkey [Wed, 7 Dec 2016 22:38:48 +0000 (22:38 +0000)]
Merge "Yet another set of installd Binder methods."
Treehugger Robot [Wed, 7 Dec 2016 21:43:24 +0000 (21:43 +0000)]
Merge "Move dump() to dumpAsync(), more oneway calls."
Jeff Sharkey [Wed, 9 Nov 2016 19:25:44 +0000 (12:25 -0700)]
Move dump() to dumpAsync(), more oneway calls.
When calling out to dump services hosted by external apps, use
dumpAsync() to avoid hanging if the remote process is wedged.
(cherry picked from commit
850c83e6da3b34a4eab804133420247fc9dbb8a1)
Test: builds, boots, runs with minimal logs triggered
Bug:
32715088
Merged-In: I70aa2666ae21dae8f09ded2063bed359c0b210c5
Change-Id: Ic2be10dc8478d613cea6e2c976b9987c250b86b7
Przemyslaw Szczepaniak [Wed, 7 Dec 2016 17:43:43 +0000 (17:43 +0000)]
Track libcore change
547177ca5c312f84fb22e6e7bf12f54129034e5d
Bug:
29935305
Test: CtsLibcoreTestCases
Change-Id: I8ee39da7d7e0a4e94e3772b6e52068b53755693f
Jeff Sharkey [Wed, 7 Dec 2016 17:37:47 +0000 (10:37 -0700)]
Yet another set of installd Binder methods.
Pretty straightforward refactoring.
Test: builds, boots, apps install fine
Bug:
13758960,
30944031
Change-Id: Ide533a04e1e31475a16046722f48b1934d8cacd3
Michael Plass [Mon, 21 Nov 2016 19:35:27 +0000 (11:35 -0800)]
Remove user-triggered disconnect counters
Removes these fields of WifiConfiguration:
numUserTriggeredWifiDisableLowRSSI
numUserTriggeredWifiDisableBadRSSI
numUserTriggeredWifiDisableNotHighRSSI
numTicksAtBadRSSI
numTicksAtNotHighRSSI
numUserTriggeredJoinAttempts
Add parcel test for WifiConfiguration.
Bug:
33013630
Test: unit tests pass
Change-Id: I39566c4e7845b01899739c36d6ec633f272fec6f
Paul Duffin [Wed, 7 Dec 2016 16:37:10 +0000 (16:37 +0000)]
Merge "Add legacy-performance-test-hostdex target"
Paul Duffin [Wed, 7 Dec 2016 14:21:53 +0000 (14:21 +0000)]
Add legacy-performance-test-hostdex target
This is needed for some internal targets that currently depend
directly on the source files and which break when the source
file is moved.
Bug:
30188076
Test: make legacy-performance-test-hostdex
Change-Id: I653325605204c1f272bd5f669e2297eedeaf7d61
Paul Duffin [Wed, 7 Dec 2016 12:52:01 +0000 (12:52 +0000)]
Merge "Replace core-junit with junit"
Treehugger Robot [Wed, 7 Dec 2016 09:17:21 +0000 (09:17 +0000)]
Merge "Handle IpReachabilityMonitor errors better."
Erik Kline [Fri, 14 Oct 2016 09:33:22 +0000 (18:33 +0900)]
Handle IpReachabilityMonitor errors better.
If construction of a new IpReachabilityMonitor throws an IAE then
log it and immediately call onProvisioningFailure().
Test: runtest frameworks-wifi
passes, except for selectQualifiedNetworkDoesNotChooseDeletedEphemeral()
which fails with an NPE for unrelated reasons.
Bug:
31038971
Bug:
31742703
Change-Id: Ie91b8bdd509d06ad54d062bf446e74c092eb096c
(cherry picked from commit
e4526604664cb66ecdcbeca4d8f64e8c94750c31)
Jeff Sharkey [Wed, 7 Dec 2016 06:39:27 +0000 (06:39 +0000)]
Merge "Move more installd methods to Binder."
Andreas Gampe [Wed, 7 Dec 2016 02:05:08 +0000 (02:05 +0000)]
Merge "Workaround for javac compilation issue of lambda code"
Jeff Sharkey [Tue, 6 Dec 2016 06:39:46 +0000 (23:39 -0700)]
Move more installd methods to Binder.
Test: builds, boots, apps install fine
Bug:
13758960,
30944031
Change-Id: Ic00968214cec03d67fff7964e5175ab9e6132b36
Mark Renouf [Tue, 1 Nov 2016 15:48:24 +0000 (11:48 -0400)]
Workaround for javac compilation issue of lambda code
Since ag/
32554459 some Robolectric tests are compiling
framework code with javac. For reasons unclear so far this
code fails to compile with javac:
> ShortcutService.java:408: error: variable ri might not have been initialized
https://android-build.googleplex.com/builds/submitted/
3416256/angelfish-userdebug/latest/logs
Removing the lambda expressions corrects the issue.
(cherry picked from commit
e065f7c5a9ad4e47f5490793401445660af37624)
BUG:
32554459
Test: m
Change-Id: I189c8ef02dc93b46ef6418c1ff14f2312097898a
Treehugger Robot [Wed, 7 Dec 2016 01:40:48 +0000 (01:40 +0000)]
Merge "Fix crashing StrictJarFile due to doubled closing."
Treehugger Robot [Wed, 7 Dec 2016 01:17:16 +0000 (01:17 +0000)]
Merge "Adding a new string array resource for network recommendations."
Stephen Chen [Wed, 7 Dec 2016 00:08:52 +0000 (16:08 -0800)]
Clarify doc on NETWORK_RECOMMENDATIONS_ENABLED and WIFI_WAKEUP_ENABLED.
Bug:
32913919
Test: n/a
Change-Id: Ied075bdcc1ebb8f0a4bc0d3bf9758fa6719ce0b9
Jeremy Joslin [Thu, 1 Dec 2016 00:44:11 +0000 (16:44 -0800)]
Adding a new string array resource for network recommendations.
The new resource allows for multiple package names to be specified
in priority order.
Test: Nothing to test.
BUG:
33158362
Merged-In: I4a066d9220c723a17dd11e2566161fade6bb471b
Merged-In: Ifed73e493fe7de64b3dd051a53d16d39da1e4eef
Change-Id: I26ac87a49ae94dd0763173af5c8a2c6abe7cb5f8
Bill Yi [Tue, 6 Dec 2016 23:17:16 +0000 (15:17 -0800)]
Merge remote-tracking branch 'goog/stage-aosp-master' into HEAD
Treehugger Robot [Tue, 6 Dec 2016 23:08:02 +0000 (23:08 +0000)]
Merge "API for requesting network recommendations."
Jeff Sharkey [Tue, 6 Dec 2016 22:24:25 +0000 (22:24 +0000)]
Merge "Move moveCompleteApp() to Binder."
Jeremy Joslin [Tue, 29 Nov 2016 01:47:35 +0000 (17:47 -0800)]
API for requesting network recommendations.
Defining a new system API that will allow the system to request
network recommendations from a NetworkScoreService implementation.
Test: Coming in a future CL.
BUG:
32909424
Merged-In: I2d5c0a843b928b04e87c1862a78702a02fd54c31
Change-Id: Idd33095c6cd2f5b391796c900399f18a2c40fcc3
Jeff Sharkey [Tue, 6 Dec 2016 20:45:22 +0000 (20:45 +0000)]
Merge "Move dump() to dumpAsync(), more oneway calls."
am:
5773d9702e -s ours
Change-Id: Ifc71dfc411dfd8d4fc23b8e7f0843ee90607bb3b
Treehugger Robot [Tue, 6 Dec 2016 20:15:27 +0000 (20:15 +0000)]
Merge "Move dump() to dumpAsync(), more oneway calls."
Stephen Chen [Tue, 6 Dec 2016 19:20:24 +0000 (19:20 +0000)]
Merge "Add Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED flag."
am:
70ae1bf4db
Change-Id: If3d13f94a131188ddbebc7a35c82ea357b37e022
Treehugger Robot [Tue, 6 Dec 2016 19:11:28 +0000 (19:11 +0000)]
Merge "Add Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED flag."
Jeff Sharkey [Wed, 9 Nov 2016 19:25:44 +0000 (12:25 -0700)]
Move dump() to dumpAsync(), more oneway calls.
When calling out to dump services hosted by external apps, use
dumpAsync() to avoid hanging if the remote process is wedged.
Test: builds, boots, runs with minimal logs triggered
Bug:
32715088
Change-Id: I70aa2666ae21dae8f09ded2063bed359c0b210c5
Merged-In: I70aa2666ae21dae8f09ded2063bed359c0b210c5
Jason Monk [Tue, 6 Dec 2016 16:34:12 +0000 (11:34 -0500)]
resolve merge conflicts of
9600df0 to stage-aosp-master
Change-Id: I139c64bb2440d64312d7e763e53bdb13dcb9f1aa