Skip to content
Snippets Groups Projects
  1. May 28, 2020
    • Paul Duffin's avatar
      Switch framework-tethering to use java_sdk_library · cbac8e0b
      Paul Duffin authored
      The names of the individual modules do not quite follow the pattern
      that java_sdk_library uses so this temporarily sets the following:
          naming_scheme: "frameworks-modules"
      
      That causes java_sdk_library to use a naming scheme that matches the
      one used by the individual modules of this. It will be cleaned up
      later.
      
      Part of the purpose of the java_sdk_library is to hide the
      implementation code and force users of the library to depend on stubs
      for a well defined API. Ideally, it would allow access to the
      implementation in those cases where it is safe, e.g. from within the
      same APEX, or from tests for the implementation. Unfortunately, due to
      limitations in the build it does not yet have enough information to
      make that decision correctly which means that any code that needs to
      compile against the implementation is broken which would prevent us
      from converting the module to java_sdk_library.
      
      However, the only way to provide the additional information to allow
      the implementation to be correctly exposed is to convert the modules
      to java_sdk_library; a cycle.
      
      In order to break that cycle the java_sdk_library creates a special
      <module>.impl target which is used directly by tests and any other code
      that needs it. Once all the modules have been converted to a
      java_sdk_library then we can resolve the limitations in the build and
      remove the direct references to <module>.impl.
      
      Test: m Tethering InProcessTethering checkapi
      Bug: 155164730
      Merged-In: If5c115f482751f9f4b5f047e9e401a18e36799ef
      Change-Id: Id1c2e848430c49a2da7402244814cd084f5da77c
      cbac8e0b
  2. May 27, 2020
  3. May 25, 2020
    • Mark Chien's avatar
      Adjust TTL for ipv6 tethering · cd309138
      Mark Chien authored
      If upstream is cellular, set the TTL in Router Advertisements to
      "network-set TTL - 1" for carrier requirement. For other non-cellular
      upstream, set TTL as "network-set TTL + 1" to preventing arbitrary
      distinction between tethered and untethered traffic.
      
      Bug: 154776299
      Test: atest TetheringTests
      
      Merged-In: I7f2696a642f96c6aafb5613b980bf5bcdd08bbda
      Change-Id: I7f2696a642f96c6aafb5613b980bf5bcdd08bbda
      cd309138
    • Mark Chien's avatar
    • markchien's avatar
      TetheringServiceTest: test caller permission · 5232658d
      markchien authored
      Bug: 154869719
      Test: atest TetheringTests
      Original-Change: https://android-review.googlesource.com/1288503
      
      Fix TetheringServiceTest test WRITE_SETTINGS permission failure
      
      AdoptShellPermissionIdentity can not pass permission check by
      Settings#checkAndNoteWriteSettingsOperation. It would compare the caller
      uid and its package name. See error below:
      1. java.lang.SecurityException:
      Specified package com.android.shell under uid 10239 but it is really 2000
      2. java.lang.SecurityException:
      uid 10245 does not have android.permission.UPDATE_APP_OPS_STATS.
      
      Override the method and test if caller hold WRITE_SETTINGS directly.
      
      Bug: 154869719
      Test: TetheringTests, TetheringCoverageTests, NetworkStackNextTests,
      NetworkStackCoverageTests
      Original-Change: https://android-review.googlesource.com/1313806
      
      Change-Id: I7beea3f011d930e433443ed62d772a3f8cce5d78
      Merged-In: I7beea3f011d930e433443ed62d772a3f8cce5d78
      5232658d
  4. May 18, 2020
    • Xiao Ma's avatar
      Support MirrorLink DHCPDECLINE. · 65401347
      Xiao Ma authored
      Add the specific implementation of onNewPrefixRequest callback
      on IpServer side, also refactor some common code.
      
      Bug: 130741856
      Test: atest TetheringTests
      Merged-In: If2871bf899cb5890bbfee18063a194c92b6f474e
      Change-Id: If2871bf899cb5890bbfee18063a194c92b6f474e
      65401347
  5. May 14, 2020
  6. May 13, 2020
    • Nucca Chen's avatar
    • markchien's avatar
      Make members final in TetheringService · c96e106d
      markchien authored
      1. Move isTetheringSupport logic from TetheringService to Tethering.
      2. Small readability improvement in TetheringTest. Also change
      config_tether_upstream_automatic from false to true in TetheringTest.
      So TetheringTests would default run automatic select upstream flow
      instead of selecting by legacy perferred network type list.
      
      Bug: 153609486
      Test: atest TetheringTest
      Change-Id: I5a82a6347f62d3a7031db5c56e8e0c8530dafd8f
      Merged-In: I5a82a6347f62d3a7031db5c56e8e0c8530dafd8f
      c96e106d
    • Paul Duffin's avatar
      Cleanup packages/Tethering/common/TetheringLib · b016744a
      Paul Duffin authored
      Merge the otherwise unused tethering-aidl-interfaces into
      framework-tethering.
      
      This is in preparation for converting to use java_sdk_library.
      
      Bug: 155164730
      Test: m droid
      Merged-In: I4583539d11ba69320aa5a0dfcfee072c81affac2
      Change-Id: I4583539d11ba69320aa5a0dfcfee072c81affac2
      (cherry picked from commit 267dd95c3e93f75c42c3f4e5cf576829b528f6c2)
      b016744a
    • Maciej Żenczykowski's avatar
      A minor followup change for BPF offload device option stuff · fd8b4bbe
      Maciej Żenczykowski authored
      - Correct description and spelling in the code and xml files.
      - Add a TODO for refactoring the IpServer constructor.
      - Refine the if-statement for starting IP neighbor monitor.
      
      Bug: 149997301
      Test: atest IpServerTest
      Original-Change: https://android-review.googlesource.com/1309273
      Merged-In: If9c8bc6f785fa80575db56de4e223292e9807ace
      Change-Id: If9c8bc6f785fa80575db56de4e223292e9807ace
      fd8b4bbe
    • Mark Chien's avatar
      Add test for OffloadHardwareInterface · 7c23d311
      Mark Chien authored
      Bug: 145490751
      Test: atest TetheringTests
      
      Merged-In: Ia402a6caaa0dfaa05d25a02101c515bbd884d33f
      Change-Id: Ia402a6caaa0dfaa05d25a02101c515bbd884d33f
      7c23d311
    • Nucca Chen's avatar
    • Nucca Chen's avatar
      Add tether BPF offload config to device config and resource · 0bbfe12d
      Nucca Chen authored
      The tether bpf offload can be enabled by resource config and
      device config. The device config has higher priority and it
      could override this config which is set by resource config.
      
      Bug: 149997301
      Test: -build, flash, boot
            -atest TetheringConfigurationTest
      Original-Change: https://android-review.googlesource.com/1276007
      
      Use device option to control BPF offload features
      
      If BPF offload device config is not enabled:
      - Does not add/remove offload forwarding rules through disabling IP
        neighbor monitor.
      - Does not apply the RA MTU reduction.
      
      Bug: 149997301
      Test: atest IpServerTest
      Original-Change: https://android-review.googlesource.com/1284578
      Merged-In: I2d6f80f0229f580c4b16243a064e889a6c37f77a
      Change-Id: I2d6f80f0229f580c4b16243a064e889a6c37f77a
      0bbfe12d
    • Jooyung Han's avatar
      InProcessTethering: set min_sdk_version · 595adc05
      Jooyung Han authored
      Modules contributing mainline modules (APK/APEX) should set
      min_sdk_version as well as apex_available.
      
      InProcessTethering is a part of com.android.tethering.inprocess,
      therefore min_sdk_version is set.
      
      Exempt-From-Owner-Approval: CP from AOSP
      
      Bug: 145796956
      Bug: 150999716
      Test: m
      Merged-In: I655211e0b9aa4bd7cb3718b6f567f0aa1a0176a5
      Change-Id: I655211e0b9aa4bd7cb3718b6f567f0aa1a0176a5
      (cherry picked from commit ace605ef568fecfe148d2785f4681c9c858487aa)
      595adc05
    • Jooyung Han's avatar
      Set min_sdk_version for updatable mainline modules · 5f9f31c1
      Jooyung Han authored
      Modules contributing mainline modules (APK/APEX) should set
      min_sdk_version as well as apex_available.
      
      For now setting min_sdk_version doesn't change build outputs.
      But build-time checks will be added soon.
      
      Bug: 145796956
      Bug: 150999716
      Test: m
      Merged-In: Ifaecb49a47a1f43edea3ea06e1cf704a177d1044
      Change-Id: Ifaecb49a47a1f43edea3ea06e1cf704a177d1044
      (cherry picked from commit 33aa294e96f13906f596e427b96652fe80cf199b)
      5f9f31c1
  7. May 08, 2020
  8. May 07, 2020
    • Mark Chien's avatar
    • Mark Chien's avatar
      Refactor the EntitlementManager · 92afd387
      Mark Chien authored
      1. Change ArraySet usage to BitSet
      2. Change mCellularUpstreamPermitted to mLastCellularUpstreamPermitted.
      
      Before this change:
      a member variable(mCellularUpstreamPermitted) is
      used to check whether cellular upstream is permitted, the code must
      ensure to update this variable once entitlement result is changed or the
      entitlement check is triggered but does not have a result yet.
      
      In this change:
      Instead of storing the information about whether cellular is permitted in
      a member variable. The information is recalculated every time when user
      call isCellularUpstreamPermitted(). Now isCellularUpstreamPermitted() is
      always be used to check whether cellular upstream is permitted no matter
      inside or outside EntitlementManager.
      This make the code be easier to maintain that we do not need to care
      when mCellularUpstreamPermitted need to be updated because the
      information would be recalculated every time. And the recalculation is
      lock free because this is only used inside tethering while running in
      the same thread.
      
      Bug: 141256482
      Test: atest TetheringTests
      
      Merged-In: Ic83f42ff4eec38adf039d55d80fcb9b0f16373cc
      Change-Id: Ic83f42ff4eec38adf039d55d80fcb9b0f16373cc
      92afd387
    • Jeongik Cha's avatar
      Use stable networkstack-aidl-interfaces · 1aba7987
      Jeongik Cha authored
      Test: m nothing
      Bug: 133526962
      Original-Change: https://android-review.googlesource.com/1301313
      Merged-In: I507f40866d04db5ed3361831e01eaa4dfaf20bed
      Change-Id: I507f40866d04db5ed3361831e01eaa4dfaf20bed
      1aba7987
    • Mark Chien's avatar
      Test tethering log dump · c96fbe0a
      Mark Chien authored
      Bug: 145490751
      Test: atest TetheringTests
      Merged-In: I01fc6969041711f7a15880144ee5eac591086ecd
      Change-Id: I01fc6969041711f7a15880144ee5eac591086ecd
      c96fbe0a
    • markchien's avatar
      Override tethering module APK-in-APEX for Go variant · 9548c858
      markchien authored
      Bug: 155604224
      Test: build
      Change-Id: I4147173b5f3668491ff9cb7f1f86715b036d6d4b
      9548c858
  9. May 06, 2020
  10. May 05, 2020
    • Anton Hansson's avatar
      Enable api lint and check_last_api for modules · 5b0be161
      Anton Hansson authored
      This adds checking of module api compatibility to the individual module
      api rules. Until now, this checking has been done via the monolithic
      metalava runs which we are aiming to get rid of.
      
      Now is a good time to do this because we can compare them to the just
      finalized version 30 API, which we have no diffs with. Baseline the
      existing wifi failures that metalava fails to find in the previous API.
      
      Bug: 144149403
      Test: m checkapi
      Change-Id: Id222895daa3a769c265965b052a17d5a1ca18462
      5b0be161
    • Junyu Lai's avatar
      [SP18.6] Make offload controller poll interval configurable · e1a04c04
      Junyu Lai authored
      Test: atest TetheringTests
      Bug: 149467454
      
      Change-Id: I0b07a0b520dedb479bf863fbfe898ae85b84b0f3
      Merged-In: I0b07a0b520dedb479bf863fbfe898ae85b84b0f3
      (cherry picked from commit 8371fa281839d5b1a1027936f2f83e59bf5301a3)
      e1a04c04
    • junyulai's avatar
      [SP18.5] Create offload controller poll interval to resource · 2a5f2142
      junyulai authored
      Test: atest TetheringConfigurationTest
      Bug: 149467454
      Change-Id: I8b4ad920a4945504914d3741a9fba5c096fbf452
      Merged-In: I8b4ad920a4945504914d3741a9fba5c096fbf452
      (cherry-picked from aosp/1299413)
      2a5f2142
    • junyulai's avatar
      [SP18.4] Add unit test for polling network stats in OffloadController · 14722baf
      junyulai authored
      Test: atest OffloadControllerTest
      Bug: 149467454
      Change-Id: I9b9c9c096a2366aaf383d5c2d567db6682f02dad
      Merged-In: I9b9c9c096a2366aaf383d5c2d567db6682f02dad
      (cherry-picked from aosp/1295347)
      14722baf
    • junyulai's avatar
      [SP18.3] Adapt TestableNetworkStatsProviderCbBinder · b7011d22
      junyulai authored
      This is a no-op refactoring to adapt new test provider callback.
      Also this patch adapts TestLooper to allow better control on
      delay messages that will be verified in subsequent tests.
      
      Test: atest OffloadControllerTest
      Bug: 149467454
      Change-Id: Icfd6ff289d6689ae2d5753d3fe472516c808dc7a
      Merged-In: Icfd6ff289d6689ae2d5753d3fe472516c808dc7a
      (cherry-picked from aosp/1295346)
      b7011d22
  11. May 02, 2020
  12. May 01, 2020
  13. Apr 30, 2020
    • Anton Hansson's avatar
      Rename module dist files · d7f1fabc
      Anton Hansson authored
      This makes the filenames of the disted artifacts (api txts and stubs)
      match the module name of the modules they're from. This matches the
      naming scheme used by java_sdk_library, which should make the future
      transition to this build rule easier.
      
      Bug: 149293194
      Test: lunch sdk_phone_armv7 && m sdk dist && find out/dist/apistubs
      Change-Id: I076f30931bf2524d57703873cd7de25b3f23b457
      d7f1fabc
    • Anton Hansson's avatar
      Fix tethering module lib stub default · dc8e0fc1
      Anton Hansson authored
      It was using the systemapi stub defaults, but should be using the
      module_lib default.
      
      Bug: 144149403
      Test: m
      Change-Id: Iaab154d9d71900284d92d518a086fc1227c00d5c
      dc8e0fc1
    • Junyu Lai's avatar
      Merge changes I38628dad,I2467b647 into rvc-dev · 027c80d2
      Junyu Lai authored
      * changes:
        [SP18.1] add dependency object to OffloadController
        [SP18] Poll network stats in OffloadController to support data warning
      027c80d2
    • Treehugger Robot's avatar
      [SP18.1] add dependency object to OffloadController · 40092b1f
      Treehugger Robot authored
      In order to mock constant in unit test, a dependency object is
      introduced with minimum code change to achieve this.
      
      Test: atest TetheringTests
      Bug: 149467454
      Change-Id: I38628daddcb7be7c74846e78d36dc88f065b97d9
      Merged-In: I38628daddcb7be7c74846e78d36dc88f065b97d9
      (cherry picked from commit 29aee20b)
      40092b1f
    • Junyu Lai's avatar
      [SP18] Poll network stats in OffloadController to support data warning · bf6fa99b
      Junyu Lai authored
      The OEM implemented tether offload does not support
      data warning since the HAL only tells the hardware about data limit
      but not warning. However, to add such interface in HAL needs OEM to
      comply and implement in hardware.
      
      Thus, as a short-term solution, polls network statistics from HAL
      and notify upper layer when it reaches the alert quota set by
      NetworkStatsService.
      
      Note that when CPU is sleeping, the data warning of tethering offload
      will not work since the polling is also suspended.
      
      Test: manual
      Test: atest OffloadControllerTest
      Bug: 149467454
      Change-Id: I2467b64779b74cd5fec73b42fb303584f52cb1cb
      Merged-In: I2467b64779b74cd5fec73b42fb303584f52cb1cb
      (cherry picked from commit 93660e38)
      bf6fa99b
  14. Apr 28, 2020
Loading