Skip to content
  1. Dec 09, 2016
    • Treehugger Robot's avatar
      a44c8330
    • Przemyslaw Szczepaniak's avatar
    • Hugo Benichi's avatar
      Removing bogus file added by mistake · eb96bb73
      Hugo Benichi authored
      This patch deletes a bogus file added by mistake in the change with
      commit hash 147aa6d5.
      
      Test: no code change.
      Bug: 32198726
      
      Change-Id: Iffc6b3a5ebd854dc81d537576a4405955abacba7
      eb96bb73
    • Lorenzo Colitti's avatar
      Merge changes from topic 'framework-net-aosp' · ab4c79bd
      Lorenzo Colitti authored
      * 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.
      ab4c79bd
    • Hugo Benichi's avatar
      DO NOT MERGE: frameworks-test: adding missing @SmallTest · cfcc1cb7
      Hugo Benichi authored
      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 fa8a6f62)
      
      Change-Id: I7b0706a7e3368f971d508388e8ad4afc5de9d646
      cfcc1cb7
    • Hugo Benichi's avatar
      DO NOT MERGE: Netd events: record connect() success/errno · 5d0f28c7
      Hugo Benichi authored
      Test: $ runtest frameworks-net pass
      Bug: 32198976
      
      (cherry picked from commit 8b06bcdf)
      5d0f28c7
    • Lorenzo Colitti's avatar
      DO NOT MERGE: Add missing dependency. · 744b0206
      Lorenzo Colitti authored
      Change-Id: I5deb8e03eb368ab7003f9376f7b4459d2ef5e934
      744b0206
    • Tony Mak's avatar
      DO NOT MERGE: Show notification for always-on app VPN · de7f7d19
      Tony Mak authored
      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 1a405fe3)
      
      Change-Id: I929a05c24df01e21415535a333bb14ac4b790a9d
      de7f7d19
    • Stephen Chen's avatar
      DO NOT MERGE: Implement metered tracking for NetworkStats summary queries. · 963e8ddf
      Stephen Chen authored
      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 25147878)
      
      Change-Id: I46da93ba4afa968facf98f7c3d844fd0c469095a
      963e8ddf
    • Hugo Benichi's avatar
      DO NOT MERGE: NetworkMonitor: send one DNS probe per web probe · 2a43b208
      Hugo Benichi authored
      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 ab61e7c3)
      
      Change-Id: I3b32ae451f2241849fffe24956758a9f571b1ef1
      2a43b208
    • Hugo Benichi's avatar
      DO NOT MERGE: NetworkMonitor metrics: add first validation information · 21680fd2
      Hugo Benichi authored
      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 147aa6d5)
      
      Change-Id: Ie7a62c4f62a13ce52806d3adaa9e627cb246073c
      21680fd2
    • Hugo Benichi's avatar
      DO NOT MERGE: APF: also drop any ICMPv6 RSs · 02428988
      Hugo Benichi authored
      Test: new unit test + $ runtest franeworks-net
      Bug: 32833400
      
      (cherry picked from commit f98182ef)
      
      Change-Id: Ifaf6e778c811c7d865c790a293b1fce3f43cad1c
      02428988
    • Hugo Benichi's avatar
      DO NOT MERGE: ConnectivityServiceTest: fix testAvoidBadWifiSettings · 53d83d51
      Hugo Benichi authored
      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 99c8294e)
      
      Change-Id: If41a24989d5f65aeb439f68741f511b5eb53b18d
      53d83d51
    • Hugo Benichi's avatar
      DO NOT MERGE: Fix ConnectivityServiceTest testRequestBenchmark · cbf8ff83
      Hugo Benichi authored
      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 38be57b4)
      
      Change-Id: I196ab9ef7f5abe456a783eed65db09279d2ecb8c
      cbf8ff83
    • Jeff Sharkey's avatar
      DO NOT MERGE: Switch over to new "time.android.com" NTP pool. · dda938a6
      Jeff Sharkey authored
      Also add logging to measure success/failure details.
      
      Test: builds, boots, and NTP fix obtained
      Bug: 32969463
      
      (cherry picked from commit d3f689bf)
      
      Change-Id: I7da416099ae903fd92beb516251ef4e51673eecf
      dda938a6
    • Stephen Chen's avatar
      DO NOT MERGE: Define API for metering network stats buckets. · dadf6caf
      Stephen Chen authored
      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 9ac251d1)
      
      Change-Id: I6a2fcc8577d62daa8823dff9e0128a5cf39ede7b
      dadf6caf
    • Felipe Leme's avatar
      DO NOT MERGE: Refactored NetworkStatsServiceTest to use Mockito instead of EasyMock. · e4c02991
      Felipe Leme authored
      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 b8f946dc)
      
      Change-Id: Ia9929295ab2396a7ebb133e65d157f98414e4dfa
      e4c02991
    • Felipe Leme's avatar
      DO NOT MERGE: Use @Ignore to explicitly disable a @Test method. · 2026ca14
      Felipe Leme authored
      BUG: 30839080
      BUG: 31007021
      
      (cherry picked from commit fc7d7a35)
      
      Change-Id: I35942e60493adebb22871541a34240368c691ee7
      2026ca14
    • Felipe Leme's avatar
      DO NOT MERGE: Fixed NetworkStatsServiceTest and converted it to JUnit4. · 77cba4bd
      Felipe Leme authored
      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 574f370c)
      
      Change-Id: Ie09b2f43cf6ec745e404d5ec98bd0b072d211ea3
      77cba4bd
    • Jeremy Joslin's avatar
      DO NOT MERGE: VPN network stat accounting changes. · ffe5a46b
      Jeremy Joslin authored
      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 8b436d86)
      
      Change-Id: I06f01aa8fe5fdc06b2d36cfb9c68feb244c2e5de
      ffe5a46b
    • Hugo Benichi's avatar
      DO NOT MERGE: ConnectivityThread: use lazy holder idiom · ce765b7a
      Hugo Benichi authored
      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 c4fe5d37)
      
      Change-Id: If13b363889a8e9396273a90c3d9f9421a48aecbc
      ce765b7a
    • Hugo Benichi's avatar
      DO NOT MERGE: ConnectivityManager: use ConnectivityThread looper · 1853f78d
      Hugo Benichi authored
      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 7724cdd8)
      
      Change-Id: If956addbf8e7b11b36a4b966de7fca00e8f362c1
      1853f78d
    • Hugo Benichi's avatar
      DO NOT MERGE: ConnectivityManager: a simpler CallbackHandler · 4983e558
      Hugo Benichi authored
      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 d42650fa)
      
      Change-Id: I1b5fe2a361b5f623a8310ae698497c83d72f3034
      4983e558
    • Philip P. Moltmann's avatar
      DO NOT MERGE: Indicate the NsdServiceInfo attributes are only filled in for a resolved service. · 29154b00
      Philip P. Moltmann authored
      Fixes: 28530428
      
      (cherry picked from commit 7d5da4b0)
      
      Change-Id: If2bfc06589adb361f11b89cd5923cb5c255cb680
      29154b00
    • Jeremy Klein's avatar
      DO NOT MERGE: Add a null check for the OnStartTetheringCallback. · c8e4cc8e
      Jeremy Klein authored
      This avoids a NullPointerException when trying to call the callback
      and gives a more readable error message.
      
      (cherry picked from commit 5f277e16)
      
      Change-Id: Ia419ff68ef10f308f9e44be47420e27099ee6070
      c8e4cc8e
    • Treehugger Robot's avatar
      Merge changes from topic 'framework-net-aosp' · 25afce88
      Treehugger Robot authored
      * 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
      25afce88
    • Hugo Benichi's avatar
      DO NOT MERGE: IpConnectivityMetrics: rate limit ApfProgramEvents · f99a33a1
      Hugo Benichi authored
      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 e1c173d2)
      
      Change-Id: Idb640dec13ba64180985544b9709a586af66eb6e
      f99a33a1
    • Hugo Benichi's avatar
      DO NOT MERGE: TokenBucket for rate-limiting and throttling · 05ad47ad
      Hugo Benichi authored
      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 998493f0)
      
      Change-Id: I4012ae6d02f7004bceee9a2ba03914f2a2506031
      05ad47ad
    • Hugo Benichi's avatar
      DO NOT MERGE: IpConnectivityMetrics reads buffer size in settings · 8c9e4b68
      Hugo Benichi authored
      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 05686dbb)
      
      Change-Id: Iefbeac3a688b260fb3f92dfe0bfd9db28e26749d
      8c9e4b68
    • Lorenzo Colitti's avatar
      DO NOT MERGE: CaptivePortalLogin: set mixed content policy to compatibility. · b55bf383
      Lorenzo Colitti authored
      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 62516637)
      
      Change-Id: Ia82958192d978280715442e182c34f9da5c88c66
      b55bf383
    • Hugo Benichi's avatar
      DO NOT MERGE: Add IP conn metrics to dumpsys and bug reports · 5635c270
      Hugo Benichi authored
      Test: manually created a bug report and inspected content.
      
      (cherry picked from commit 51d14cb6)
      
      Change-Id: I9649cc2f9bb7a1975e60baaae55fcdb2a48c3b93
      5635c270
    • Hugo Benichi's avatar
      DO NOT MERGE: IpConnectivity metrics: add version number · 9df2ae13
      Hugo Benichi authored
      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 d680d4c8)
      
      Change-Id: If8f167c0dc4c1abe0e235e2adfd131168a4ddc52
      9df2ae13
  2. Dec 08, 2016
    • Treehugger Robot's avatar
    • Lorenzo Colitti's avatar
      Merge changes from topic 'framework-net-aosp' · b92aa5bd
      Lorenzo Colitti authored
      * 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.
      b92aa5bd
    • Etan Cohen's avatar
      DO NOT MERGE: [CS] Remove timeout event after first available · bf3b1bad
      Etan Cohen authored
      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 681fcda5)
      
      Change-Id: I7cd3086544c881915fc6dbf14b87a24ab0cd8748
      bf3b1bad
    • Hugo Benichi's avatar
      DO NOT MERGE: ApfTest: tag tests with @SmallTest or @MediumTest · 5d265412
      Hugo Benichi authored
      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 4195c283)
      
      Change-Id: Ia215fc8e2ccc61f6223c24fdf390e1e759de302f
      5d265412
    • Lorenzo Colitti's avatar
      DO NOT MERGE: Unbreak TetherInterfaceStateMachineTest. · 5bce5a16
      Lorenzo Colitti authored
      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 7e0eeca8)
      
      Change-Id: I8a3cf466871c026f4ae0f5cfa73071338cdf5b7e
      5bce5a16
    • Lorenzo Colitti's avatar
      DO NOT MERGE: Move the connectivity tests to frameworks/base/tests/net. · 7ceef950
      Lorenzo Colitti authored
      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 ecc986d4)
      
      Change-Id: I993eeaa5dec001c39389023f355f506129b356e7
      7ceef950
    • Lorenzo Colitti's avatar
      DO NOT MERGE: De-guava BroadcastInterceptingContext and move it to testutils. · 3c295b59
      Lorenzo Colitti authored
      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 281a17c9)
      
      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
      3c295b59
    • Lorenzo Colitti's avatar
      DO NOT MERGE: Move FakeSettingsProvider to a common location. · b8df76e4
      Lorenzo Colitti authored
      (cherry picked from commit 7df1a828)
      
      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
      b8df76e4
Loading