Skip to content
Snippets Groups Projects
  1. Mar 18, 2021
    • Sudheer Shanka's avatar
      Reland "Add an API to listen for changes in network blocked status of an uid." · 9967d463
      Sudheer Shanka authored
      This reverts commit 13341031.
      
      Reason for revert: The issue causing the build breakage has been fixed
      
      Change-Id: I03fa406551b51aaa4d4d9255cf1a53f9b4bcc1bd
      Merged-In: Ib9949b8619c6b148f73630b314c4113d76c31ec1
      9967d463
    • Anthony Stange's avatar
      Revert "Add an API to listen for changes in network blocked status of an uid." · 13341031
      Anthony Stange authored
      This reverts commit 394269d8.
      
      Reason for revert: Breaking build - b/183106805
      Bug: 183106805
      Merged-In: Ib9949b8619c6b148f73630b314c4113d76c31ec1
      Change-Id: I9789ed81e630f49c71034b6917188983bd11d774
      13341031
    • Sudheer Shanka's avatar
      Add an API to listen for changes in network blocked status of an uid. · 394269d8
      Sudheer Shanka authored
      Given that ConnectivityService is moving to a mainline module, we need
      a @SystemApi for it to listen for changes in blocked status of an uid.
      So, we decided to create a new API for this which can provide
      ConnectivityService with more info about why an uid is blocked (which
      will be useful for adding a new similar onBlockedStatusChanged callback
      in CM.NetworkCallback) and also captures data saver restriction without
      having out to track it separately.
      
      Currently, NPMS does some redundant computations because we are
      calculating both uid rules and blocked reasons separately. In a
      follow-up change, we will compute uid rules using blocked reasons
      and later possibly remove that onUidRulesChanged callback.
      
      Bug: 176289731
      Test: atest ./tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
      Test: atest ./tests/net/java/com/android/server/ConnectivityServiceTest.java
      Test: atest ./services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java
      Change-Id: Ib9949b8619c6b148f73630b314c4113d76c31ec1
      Merged-In: Ib9949b8619c6b148f73630b314c4113d76c31ec1
      394269d8
  2. Mar 17, 2021
  3. Mar 16, 2021
  4. Mar 15, 2021
    • paulhu's avatar
      Replace interal okhttp APIs · 405d8911
      paulhu authored
      Connectivity is becoming a mainline module in S but mainline
      modules are not allowed to use non-formal APIs. Thus, replace
      internal okhttp APIs to stable libcore APIs which are created for
      using HttpURLConnectionFactory.
      
      Bug: 182238821
      Test: atest FrameworksNetTests
      Change-Id: I56ba1b9e6e94f9c6519c3f1c8f0c5993fccbe185
      405d8911
    • Lorenzo Colitti's avatar
    • Aaron Huang's avatar
      Merge changes from topic "pacproxy-service" · c8e73fa9
      Aaron Huang authored
      * changes:
        Make PacProxyService be a system service
        Revert^2 "Refactor setCurrentProxyScriptUrl to a void method"
      c8e73fa9
    • Sorin Basca's avatar
      Merge changes from topic "jni-errno-exception" · 3a810d37
      Sorin Basca authored
      * changes:
        Using jniThrowErrnoException in android_util_Process
        Using jniThrowErrnoException in android_os_SharedMemory
        Using jniThrowErrnoException in android_net_NetworkUtils
      3a810d37
    • lucaslin's avatar
      Add comments to describe the value of converting hex to decimal · 0cdcea18
      lucaslin authored
      Bug: 172183305
      Test: N/A
      Change-Id: Id274295d6c8c97d3014214f875168ff968f79bb6
      0cdcea18
    • Chalard Jean's avatar
      [NS01] Add NetworkScore · 2801857f
      Chalard Jean authored
      As attested by numerous TODOs in the code, a new way of
      representing network quality and policy is needed instead
      of an int.
      
      An int representing the quality of the network requires
      all parties using it to know how all other parties are
      using it, and implementation details about the decision
      algorithm. For all intents and purposes, the selection
      is left to individual network factories who try to
      achieve a desired result while piecing together all
      possible states of the system.
      
      As the number of such cases and desires increases, this
      becomes both intractable and unmaintainable. Indeed, at
      this time in the codebase nobody can really predict exactly
      how a given change in score will affect selection across
      the board, and it is essentially impossible to figure out
      the behavior of network selection by inspecting the code
      because the moving parts are scattered throughout the
      entire codebase.
      
      Having an object encapsulating policy and quality values
      will let us centralize the selection and make it again
      possible to maintain without knowledge of all behaviors
      of all network factories. It will also provide better
      guarantees of respecting policy, and allow bugfixes that
      were not possible before because they'd touch too many
      parts of the code.
      
      Test: FrameworksNetTests FrameworksWifiTests NetworkStackTests
      Change-Id: I3185a6412b9b659798faf0c6882699e9c63cc115
      2801857f
    • Frank Li's avatar
      8ccc6abe
    • Remi NGUYEN VAN's avatar
    • Remi NGUYEN VAN's avatar
      Revert "Remove connectivity dependency on Preconditions" · 5086c295
      Remi NGUYEN VAN authored
      This reverts commit 62b1df44.
      
      Reason for revert: Build broken: b/182721112
      
      Change-Id: Ibc84ec6d7900fdcf0bc14cd7036f9c08287711db
      5086c295
    • Paul Hu's avatar
      Merge "Replace InetAddress#parseNumericAddress" · 05c16014
      Paul Hu authored
      05c16014
    • Aaron Huang's avatar
      Make PacProxyService be a system service · f9fa0b95
      Aaron Huang authored
      PacProxyInstaller class is running a thread all the time and is
      listening to intent ACTION_PAC_REFRESH so it would be better to
      make it be a system service with a manager class PacProxyManager
      which is obtained with getSystemService(PacProxyManager.class).
      Besides, rename PacProxyInstaller to PacProxyService will
      be easier to know it's the service for PacProxyManager.
      
      ConnectivityService is going to be a mainline module and it
      needs constructor of PacProxyService to be SystemApi.
      However, in current design, it needs to pass a handler and
      an int arguments to the constructor which would be difficult
      to maintain if just expose the constructor directly.
      
      So, define a listener for the event that the current PAC
      proxy has been installed so that the handler and the int
      arguments can be removed from the constructor.
      
      Bug: 177035719
      Test: FrameworksNetTests
      Change-Id: I2abff75ec59a17628ef006aad348c53fadbed076
      f9fa0b95
    • Remi NGUYEN VAN's avatar
    • lifr's avatar
      [CS15]Do not use hidden API of PlatformProperties · b885e615
      lifr authored
      ConnectivityService is going to become a mainline module, and
      it will not able to use hidden method anymore. Using PlatformProperties
      as a static library instead of hidden API.
      
      Bug: 170917042
      Test: atest FrameworksNetTests
      Merged-In: I3a3deca5d2e0f690db8c0061de2db2217376d268
      Change-Id: I3a3deca5d2e0f690db8c0061de2db2217376d268
      b885e615
    • lucaslin's avatar
      Call clearCallingIdentity when calling registerNetworkProvider in TNS · 10cb5421
      lucaslin authored
      The caller to create a TestNetworkService via
      ConnectivityManager#startOrGetTestNetworkManager should have
      passed the MANAGE_TEST_NETWORKS permission check and the caller
      doesn't need to declare the permission to pass the permission
      check of registerNetworkProvider. So call clearCallingIdentity
      when calling registerNetworkProvider in TestNetworkService.
      
      Bug: 181573283
      Test: atest CtsNetTestCases:ConnectivityManagerTest#testRequestBackgroundNetwork
      Change-Id: Ia28627dacf933d1937978ed9709b975c9a4660ce
      10cb5421
    • Remi NGUYEN VAN's avatar
      e87d4bca
    • Remi NGUYEN VAN's avatar
    • Remi NGUYEN VAN's avatar
      Add ParseException constructors to API · 94e5fff5
      Remi NGUYEN VAN authored
      ParseException constructors are used by both platform and mainline
      module code, so they can't be package-private.
      Removing dependencies on either side is not possible as the class
      itself is part of the public API, and supports APIs on both sides.
      
      Having the constructors part of the API makes the class usable by both
      sides.
      
      Fixes: 182705505
      Test: CtsNetTestCases for APIs using the exception
      Change-Id: Ia396ab2fa3afaed3cf474c8e60f72fc7f3f4fded
      94e5fff5
Loading