Skip to content
Snippets Groups Projects
  1. May 21, 2021
  2. May 20, 2021
    • Chiachang Wang's avatar
      Use CS identity to update setting while performing factory reset · bc667123
      Chiachang Wang authored
      When apps try to call factoryReset to do networking reset, it
      will result in updating the setting in SettingsProvider.
      ContentProvider will verify if the package name of the caller
      that initiated the request being processed on the current thread.
      The package should belong to the calling UID. The setting update
      started from the ConnectivityService context, so the package will
      be android but the calling UID will be the calling app. It will
      cause a SecurityException. The behavior is fine previously as its
      known caller(Settings) shares system UID. But it will be a
      problem for other callers, such as CTS. Thus, clear the identity
      since the necessary permission check should be examined at the
      top of the method. The following actions should be fine to be
      proceed from the system itself. Also replace the user restriction
      check via hasUserRestrictionForUser with the UserHandle created
      from the calling uid to ensure it's verified with correct user.
      
      Bug: 186061922
      Test: Factory reset from Settings
      Change-Id: If2dd69f702a1eafff331f9e71f6b92aeadfb715d
      bc667123
  3. May 17, 2021
  4. May 16, 2021
    • paulhu's avatar
      Register APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting observer · f11da7e2
      paulhu authored
      PermissionMonitor register APPS_ALLOWED_ON_RESTRICTED_NETWORKS
      setting observer to listen setting changed callback. Then update
      or revoke permission for those apps.
      
      Bug: 185149952
      Test: atest FrameworksNetTests
      Change-Id: I4b6a21bd3f47b7bcaac36fcabf1202a5a84a4520
      f11da7e2
    • paulhu's avatar
      Read APPS_ALLOWED_ON_RESTRICTED_NETWORKS setting from PermissionMonitor · a7b9535f
      paulhu authored
      Let PermissionMonitor read APPS_ALLOWED_ON_RESTRICTED_NETWORKS
      setting and grant netd system permission to uids whose package
      name is listed in setting.
      
      Bug: 185149952
      Test: atest FrameworksNetTests
      Change-Id: I856b545c0339a262abbe9d432cfda125bc82dc12
      a7b9535f
  5. May 15, 2021
    • Junyu Lai's avatar
      Merge changes I3ba50cbd,I970ee365 · 2a7ab18c
      Junyu Lai authored
      * changes:
        [FUI29] Migrate ConnectivityService to use getAllNetworkStateSnapshots
        [FUI27] Fix internal naming of notifyNetworkStatus
      2a7ab18c
  6. May 14, 2021
  7. May 13, 2021
    • Remi NGUYEN VAN's avatar
      Move NetIdManager, ProfileNetworkPreferences · c71c7891
      Remi NGUYEN VAN authored
      Move NetIdManager and ProfileNetworkPreferences from services/core to
      packages/Connectivity/service.
      
      This is a partial cherry-pick of a downstream change.
      
      Bug: 186628461
      Test: m
      Merged-In: I454e8a0a8d0e0f9e6d21a8e8faf5a9e299962ad4
      Change-Id: I6734c181dac39518b8d69be1e49d7f5f0a0a18da
      c71c7891
    • Remi NGUYEN VAN's avatar
      Move connectivity sources to packages/Connectivity · cdb45f8e
      Remi NGUYEN VAN authored
      The service-connectivity sources should be in
      packages/modules/Connectivity. Move them to
      frameworks/base/packages/Connectivity, so that the whole directory can
      be moved to the dedicated packages/modules/Connectivity git project.
      
      Bug: 186628461
      Test: m
      Merged-In: I26d1a274058fa38763ad4f605549d880865b4d76
      Change-Id: Ie0562db92ebee269b901926d763ae907bde61b98
      cdb45f8e
    • Jayachandran C's avatar
      QOS filter matching support based on remote address and port number for connected sockets · 735e1ce5
      Jayachandran C authored
      This CL adds APIs for telephony to perform filter matching based on
      remote address if the socket is connected. Additional checks will be
      performed on the state of socket to avoid the future callbacks in a
      separate CL.
      
      Bug: 181916576
      Test: Manually verified in live T-Mobile network
            atest ConnectivityServiceTest
            atest com.android.internal.telephony.dataconnection.QosCallbackTrackerTest
      
      Change-Id: I6fbd4e84c76bc4acbf4e59f06f8e86e0237bae29
      735e1ce5
    • Remi NGUYEN VAN's avatar
    • Lorenzo Colitti's avatar
      Merge changes Ia5bc896c,I0c9406f4,I3108ee94 · e562d167
      Lorenzo Colitti authored
      * changes:
        Make VcnTransportInfoTest pass on AOSP.
        Immediately redact VcnTransportInfo.
        Do not automatically redact TransportInfo objects.
      e562d167
    • Paul Hu's avatar
      a035d3a7
    • Chalard Jean's avatar
      [NS04] Introduce Network Offers and their callbacks · 823f81c3
      Chalard Jean authored
      This patch introduces the concept of a network offer that
      providers send to Connectivity to register for relevant
      requests. This lets them see only requests that they can
      hope to satisfy considering their capabilities and score
      filters.
      
      This is meant to replace the filtering mechanism currently
      implemented by NetworkFactory. The reason for replacing
      this mechanism is that the old mechanism does caps and
      score filtering on the factory side, which requires these
      two filters to be contextless and available system-wide,
      including in separate processes from the system server.
      These constraints severely limit and complexify in
      particular what the score comparisons may look like. In
      the past the score comparison was only integer-based,
      making the code duplication not much of a problem, but as
      this scheme is becoming unsustainable by spreading the
      complexity of the selection across the entire stack, a
      centralized mechanism is now necessary.
      
      This patch only introduces the new objects and has CS
      keep track of them, but does not actually use them yet.
      Followup patches will implement the logic of calling
      the offer callbacks.
      
      Test: FrameworksNetTests NetworkStackTests FrameworksWifiTests
      Bug: 167544279
      Merged-In: Idec1fe8eb4ac6f562bf098e3dd470f11024d04f2
      (clean cherry-pick)
      
      Change-Id: Idec1fe8eb4ac6f562bf098e3dd470f11024d04f2
      823f81c3
    • Lorenzo Colitti's avatar
      Do not automatically redact TransportInfo objects. · a869887d
      Lorenzo Colitti authored
      Currently, NetworkCapabilities always redacts the TransportInfo
      objects it contains whenever a defensive copy is made. This makes
      it impossible to make a defensive copy on a TransportInfo
      parcelled from another process without redacting it.
      
      Stop redacting by default; instead rely on ConnectivityService
      explicitly calling NetworkCapabilities' redacting constructor
      when it returns a NetworkCapabilities object to an app via a
      callback or synchronous call. This is currently done by
      - createWithLocationInfoSanitizedIfNecessaryWhenParceled, which
        is called from callCallbackForRequest, getNetworkCapabilities,
        and getDefaultNetworkCapabilitiesForUser.
      - getNetworkCapabilitiesWithoutUids, which is used when sending
        ConnectivityDiagnosticsManager callbacks. In this method,
        unconditionally redact all information, which is what the code
        did previously due to the default redaction setting for empty
        NetworkCapabilities objects being REDACT_ALL.
      
      Bug: 183938194
      Test: atest NetworkCapabilitiesTest
      Test: atest FrameworksNetTests CtsNetTestCases HostsideVpnTests
      Change-Id: I3108ee94cb0930958e071ba678c3554525b0db82
      a869887d
    • paulhu's avatar
      Update mobile data preference getter/setter · 344c1166
      paulhu authored
      To satisfy OEM's requests, setting mobile data preference
      should be by uid. Thus, update the getter/setter to
      return/accept set of uids that need to apply mobile data
      preference.
      
      Bug: 171872461
      Test: atest FrameworksNetTests
      Change-Id: Id44efd2a6d820867f4405426c91e65b9ef155898
      344c1166
    • Remi NGUYEN VAN's avatar
      Move net unit tests to packages/Connectivity · 31022d6c
      Remi NGUYEN VAN authored
      Move the tests together with packages/Connectivity code, so both can be
      moved to packages/modules/Connectivity together.
      
      Also reorganize unit tests in a unit/ directory, as other tests
      (integration/, common/ etc.) have been added in tests/net since they
      were created. This makes the directory structure consistent.
      
      Test: atest FrameworksNetTests
      Bug: 187814163
      Merged-In: I254ffd1c08ec058d594b4ea55cbae5505f8497cc
      
      Change-Id: I254ffd1c08ec058d594b4ea55cbae5505f8497cc
      31022d6c
    • paulhu's avatar
      Add RESTRICTED_ALLOWED_APPS setting · 69afcd51
      paulhu authored
      This setting is OEM upstream requirement for third party apps
      using restricted networks.
      
      Bug: 185149952
      Test: atests FrameworksNetTests
      Change-Id: I5e16b46cf2935f38ee1e516bb8b85fa487cf9f61
      69afcd51
  8. May 12, 2021
  9. May 11, 2021
Loading