Skip to content
Snippets Groups Projects
  1. Jan 23, 2024
  2. Dec 11, 2023
    • Motomu Utsumi's avatar
      Remove TrunkStable.bp · b17d6014
      Motomu Utsumi authored
      Aconfig Flag for android network is defined in the platform and
      TrunkStable.bp is not used.
      
      Test: TH
      Bug: 315302281
      Change-Id: I46d988f25a366e51da52af01ad34e2ce1511c942
      b17d6014
  3. Dec 08, 2023
    • Motomu Utsumi's avatar
      Use flags.aconfig in platform for android networking · 31abe92c
      Motomu Utsumi authored
      flags.aconfig for android networking is under
      packages/modules/Connectivity.
      But, currently, mainline code should not read trunk stable flag.
      To avoid confusion, this CL moves flags.aconfig to platform.
      
      Bug: 315302281
      Test: TH
      Change-Id: I3a667cfa14d51e481bb4e99301c10319d2600e00
      Merged-In: I44c111577643bacb35b532cb156a61d30cfea31a
      31abe92c
  4. Dec 07, 2023
  5. Nov 23, 2023
    • Paul Hu's avatar
      Remove unused aconfig · af9e181b
      Paul Hu authored
      Remove nsd_expired_services_removal aconfig, since it is no
      longer used.
      
      Bug: 312669635
      Test: m
      Change-Id: I9b21b6102ed9a8160be3d853d44d9b051997d09e
      af9e181b
  6. Nov 16, 2023
  7. Nov 08, 2023
    • Suprabh Shukla's avatar
      New firewall chain for default background restrictions · 2d893b68
      Suprabh Shukla authored
      A new firewall chain is needed to configure background network
      restrictions for apps.
      This change only adds the API stubs and traffic controller constants to
      make the chain work. Policy changes using this chain will follow in
      the framework code.
      
      Test: atest CtsNetTestCases:ConnectivityManagerTest
      Test: atest ConnectivityServiceTest
      
      NO_IFTTT=The Lint rule along with the relevant code in Common.h is
      being deleted in aosp/2819759
      
      Bug: 304347838
      Change-Id: I33e2db6671431f7c576fc931d9f96e684fc1e78a
      2d893b68
  8. Nov 06, 2023
    • Junyu Lai's avatar
      [BR03.1] Expose isUidNetworkingBlocked · bb594807
      Junyu Lai authored
      Test: atest CtsHostsideNetworkTests:com.android.cts.net.HostsideNetworkCallbackTests
      Bug: 297836825
      Change-Id: I70b2351b9cd1c3c6fa34258397e0bf22cb8150b2
      bb594807
  9. Oct 31, 2023
  10. Oct 26, 2023
  11. Oct 24, 2023
    • Junyu Lai's avatar
      Revert "Revert "[BR07.1] Expose setDataSaverEnabled from Connect..." · df210365
      Junyu Lai authored
      Revert submission 2799494-revert-2745215-npmsbpf-OBOPDXREUI
      
      Reason for revert: Need to 1. Merge API first. 2. Wait for prebuilt. 3. Merge the caller.
      
      Reverted changes: /q/submissionid:2799494-revert-2745215-npmsbpf-OBOPDXREUI
      
      Change-Id: Icd5f3d40595a0d2a221b016cec70568bf3597c16
      df210365
  12. Oct 23, 2023
    • Jordan Silva's avatar
      Revert "[BR07.1] Expose setDataSaverEnabled from ConnectivityManager" · 457ae0f0
      Jordan Silva authored
      Revert submission 2745215-npmsbpf
      
      DroidMonitor: Potential culprit for Bug 307256512 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
      
      
      Reason for revert: 307256512
      
      Reverted changes: /q/submissionid:2745215-npmsbpf
      
      Change-Id: I27119a7484453d1369bbdf71ad2479edec7d664f
      457ae0f0
    • Junyu Lai's avatar
      [BR01.1] Support BpfNetMapsReader · 626045a6
      Junyu Lai authored
      A helper class to *read* java BpfMaps. This is designed to
      provide direct bpf access in the caller process through
      ConnectivityManager APIs.
      
      The change also removes any statical link to
      net-utils-device-common-struct from service-connectivity.
      This is because net-utils-device-common-struct is already
      included in framework-connectivity. Including it again in
      service-connectivity would create a r8 build fail by circular
      dependency.
      
      Test: atest FrameworksNetTests:android.net.connectivity.com.android.server.BpfNetMapsTest
      Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.net.module.util.StructTest
      Test: atest FrameworksNetTests:android.net.connectivity.android.net.BpfNetMapsReaderTest
      Bug: 297836825
      Change-Id: I7a6d2eb816d0dc7343167bddd672806b199f44fe
      626045a6
  13. Oct 19, 2023
    • Junyu Lai's avatar
      [BR07.1] Expose setDataSaverEnabled from ConnectivityManager · c279f183
      Junyu Lai authored
      Currently, data saver switch is controlled in NPMS, which
      calls into NetworkManagementService and netd when switching
      status. In netd, BandwidthController manipulates the
      bw_data_saver chain to control the overall behavior.
      
      However, this code are all platform implementation, which
      are not updatable. In order to migrate data saver switch
      from iptables to bpf, this API is needed for Connectivity to
      change the implementation to directly write bpf in later
      patches.
      
      Test: atest CtsHostsideNetworkTests:com.android.cts.net.HostsideRestrictBackgroundNetworkTests
      Test: atest FrameworksServicesTests:NetworkManagementServiceTest
      Bug: 297836825
      Change-Id: I71fa41ca739fef8e191fba91b02758ad5f732d5c
      c279f183
  14. Oct 18, 2023
    • Paul Hu's avatar
      Add expired services removal flag · f3fe3333
      Paul Hu authored
      The TTL check and removal of expired services is currently only
      performed when a mDNS query is sent. This can result in expired
      services remaining in the cache if no queries are sent. To
      address this, the remaining TTL will be checked when retrieving
      services from the MdnsServiceCache. Add a new flag to enable
      the expired services removal feature. This feature will be
      implemented in subsequent changes.
      
      Bug: 265787401
      Bug: 304649384
      Test: atest FrameworksNetTests CtsNetTestCases
      Change-Id: I30f0eea568ee45d363cc02821de0921d6040f981
      f3fe3333
  15. Oct 11, 2023
    • Chalard Jean's avatar
      Prepare exposing Network{Request,Caps}.forbiddenCapabilities · cf7dbcae
      Chalard Jean authored
      This is useful going forward in particular because there will
      be a default forbidden capability for LOCAL_NETWORKS. This
      means it will be useful to be able to remove it.
      
      It is also generally useful and we have been wanting to open
      this API to the public, so this is a good opportunity to do so.
      
      Test: new tests for NetworkRequest
            NetworkCapabilitiesTest already has tests because it
            already was @SystemApi
      Change-Id: Ibb8d33b799f2d274326fd9cd0b05a2c33a18032a
      cf7dbcae
  16. Oct 06, 2023
    • Motomu Utsumi's avatar
      Add aconfig_declarations for flags in android_core_networking · e63d38ff
      Motomu Utsumi authored
      Add aconfig_declarations so that platform code can use this flag.
      Following CLs(aosp/2606670) use this flag to sync the mainline behavior
      change and platform behavior change.
      Having merged-in to avoid being merged to udc-mainline-prod where
      aconfig soong targets are not supported
      
      Bug: 267870186
      Test: TH
      Merged-In: I4870fbe882ce0ec995dcaeb8a2624071fee6dce7
      Change-Id: I2260dc3d60689da9328fe4f98c3f3048d96bbf6d
      e63d38ff
    • Motomu Utsumi's avatar
      Add aconfig flag file · dca83676
      Motomu Utsumi authored
      This CL does not have Merged-In since all the branches should have the
      aconfig file so that adding flags to the file does not have conflicts.
      Following CL adds aconfig_declarations to Android.bp only on branches
      where aconfig soong targets are supported
      
      Bug: 267870186
      Test: TH
      Change-Id: I621228a2c9594bf7bfe1cf335619c417e9339743
      dca83676
  17. Jun 15, 2023
  18. Nov 02, 2022
    • Cole Faust's avatar
      Fix errorprone warnings that should be errors · 22f05839
      Cole Faust authored
      This commit is part of a large scale change to fix errorprone
      errors that have been downgraded to warnings in the android
      source tree, so that they can be promoted to errors again.
      The full list of changes include the following, but not all
      will be present in any one individual commit:
      
      BadAnnotationImplementation
      BadShiftAmount
      BanJNDI
      BoxedPrimitiveEquality
      ComparableType
      ComplexBooleanConstant
      CollectionToArraySafeParameter
      ConditionalExpressionNumericPromotion
      DangerousLiteralNull
      DoubleBraceInitialization
      DurationFrom
      DurationTemporalUnit
      EmptyTopLevelDeclaration
      EqualsNull
      EqualsReference
      FormatString
      FromTemporalAccessor
      GetClassOnAnnotation
      GetClassOnClass
      HashtableContains
      IdentityBinaryExpression
      IdentityHashMapBoxing
      InstantTemporalUnit
      InvalidTimeZoneID
      InvalidZoneId
      IsInstanceIncompatibleType
      JUnitParameterMethodNotFound
      LockOnBoxedPrimitive
      MathRoundIntLong
      MislabeledAndroidString
      MisusedDayOfYear
      MissingSuperCall
      MisusedWeekYear
      ModifyingCollectionWithItself
      NoCanIgnoreReturnValueOnClasses
      NonRuntimeAnnotation
      NullableOnContainingClass
      NullTernary
      OverridesJavaxInjectableMethod
      ParcelableCreator
      PeriodFrom
      PreconditionsInvalidPlaceholder
      ProtoBuilderReturnValueIgnored
      ProtoFieldNullComparison
      RandomModInteger
      RectIntersectReturnValueIgnored
      ReturnValueIgnored
      SelfAssignment
      SelfComparison
      SelfEquals
      SizeGreaterThanOrEqualsZero
      StringBuilderInitWithChar
      TreeToString
      TryFailThrowable
      UnnecessaryCheckNotNull
      UnusedCollectionModifiedInPlace
      XorPower
      
      See https://errorprone.info/bugpatterns for more
      information on the checks.
      
      Bug: 253827323
      Test: m RUN_ERROR_PRONE=true javac-check
      Change-Id: I7625fa386afe93823b97cb2ecb8fd09a5856c05b
      22f05839
  19. Sep 17, 2022
    • Maciej Żenczykowski's avatar
      CookieTagMapValue.java - uid U32 -> S32 · 0ba23a5a
      Maciej Żenczykowski authored
      
      The kernel is actually not consistent in whether uids & gids
      are signed or unsigned, and neither is our Java code, which
      also commonly uses just 'int' for uid.  In practice values
      greater or equal to 2**31 often don't quite work right.
      For example icmp sockets are enabled via a sysctl that
      takes a minimum and maximum gid - and these are signed int32s.
      
      Test: TreeHugger
      Signed-off-by: default avatarMaciej Żenczykowski <maze@google.com>
      Change-Id: I6576798cfeb52bf5574bf6853f0f7378022b3a2f
      0ba23a5a
  20. Sep 16, 2022
  21. Aug 18, 2022
  22. Jul 22, 2022
    • Hungming Chen's avatar
      Move struct CookieTagMap{Key, Value} to Connectivity/common · ef028028
      Hungming Chen authored
      Need to share struct CookieTagMap{Key, Value} with:
      service/src/com/android/server/connectivity/ClatCoordinator.java
      service-t/src/com/android/server/net/NetworkStatsService.java
      tests/unit/java/com/android/server/connectivity/ClatCoordinatorTest.java
      tests/unit/java/com/android/server/net/NetworkStatsServiceTest.java
      
      These files only have different package name as expected.
      
      $ diff common/src/com/android/net/module/util/bpf/CookieTagMapKey.java service-t/src/com/android/server/net/CookieTagMapKey.java
        17c17
        <- package com.android.net.module.util.bpf;
        ---
        -> package com.android.server.net;
      
      $ diff common/src/com/android/net/module/util/bpf/CookieTagMapValue.java service-t/src/com/android/server/net/CookieTagMapValue.java
        17c17
        <- package com.android.net.module.util.bpf;
        ---
        -> package com.android.server.net;
      
      Bug: 237369591
      Test: atest ConnectivityCoverageTests
      Change-Id: Ibede81376382f0dd7a032c8c988dd84c7422eece
      ef028028
  23. Jun 29, 2022
    • Hungming Chen's avatar
      Move struct {Clat*, Tether4*, TetherStats*} to connectivity module · 01f2550a
      Hungming Chen authored
      Needed because these struct classes should not be exposed.
      Only used for the connectivity module and its tests.
      
      Bug: 234160319
      Test: atest ConnectivityCoverageTests
      
      The moved files are identical.
      
      diff packages/modules/Connectivity/common/src/com/android/net/module/util/bpf/ClatEgress4Key.java frameworks/libs/net/common/device/com/android/net/module/util/bpf/ClatEgress4Key.java
      diff packages/modules/Connectivity/common/src/com/android/net/module/util/bpf/ClatEgress4Value.java frameworks/libs/net/common/device/com/android/net/module/util/bpf/ClatEgress4Value.java
      diff packages/modules/Connectivity/common/src/com/android/net/module/util/bpf/ClatIngress6Key.java frameworks/libs/net/common/device/com/android/net/module/util/bpf/ClatIngress6Key.java
      diff packages/modules/Connectivity/common/src/com/android/net/module/util/bpf/ClatIngress6Value.java frameworks/libs/net/common/device/com/android/net/module/util/bpf/ClatIngress6Value.java
      diff packages/modules/Connectivity/common/src/com/android/net/module/util/bpf/Tether4Key.java frameworks/libs/net/common/device/com/android/net/module/util/bpf/Tether4Key.java
      diff packages/modules/Connectivity/common/src/com/android/net/module/util/bpf/Tether4Value.java frameworks/libs/net/common/device/com/android/net/module/util/bpf/Tether4Value.java
      diff packages/modules/Connectivity/common/src/com/android/net/module/util/bpf/TetherStatsKey.java frameworks/libs/net/common/device/com/android/net/module/util/bpf/TetherStatsKey.java
      diff packages/modules/Connectivity/common/src/com/android/net/module/util/bpf/TetherStatsValue.java frameworks/libs/net/common/device/com/android/net/module/util/bpf/TetherStatsValue.java
      diff packages/modules/Connectivity/common/src/com/android/net/module/util/bpf/ClatEgress4Key.java frameworks/libs/net/common/device/com/android/net/module/util/bpf/ClatEgress4Key.java
      (no diff)
      
      Change-Id: I4ce8045150bdbf04c63c5262c58a0ebcc30d395c
      01f2550a
Loading