Commit Graph

217 Commits

Author SHA1 Message Date
Aaron Huang
75ed57cd6a Merge "Move NETWORK_TYPE_5G_NSA from NetworkTemplate to NetworkStatsManager" 2022-01-27 08:36:23 +00:00
Rahul Sabnis
d93ed0045d Merge "Moving over core/api/*txt files" 2022-01-27 05:42:18 +00:00
Aaron Huang
de58e7cea5 Move NETWORK_TYPE_5G_NSA from NetworkTemplate to NetworkStatsManager
Move NETWORK_TYPE_5G_NSA to NetworkStatsManager. Also expose it as
module API so that it can be used out of module.

Bug: 210073043
Test: builds, FrameworksNetTests
Change-Id: I670c7e1405107bbe30b92fe1a8d81652c46de6d9
2022-01-27 12:23:56 +08:00
Roopa Sattiraju
86058b62d8 Moving over core/api/*txt files
Bug: 196026708
Test: Compile
Merged-In: I636f00132a13467e63b08f21d9cc9dcaab250b8a
Change-Id: I636f00132a13467e63b08f21d9cc9dcaab250b8a
2022-01-26 14:21:29 -08:00
junyulai
2e57bf87bc [MS74] Expose NetworkTemplate#matches
This is used by NetworkPolicyManagerService to find
relevant networks of a given NetworkPolicy.

Test: TH
Bug: 204830222
Change-Id: I7176ab727bf208e0fd05ecb9c2bcb00cd3438031
2022-01-26 01:38:44 +08:00
Junyu Lai
c49afb4094 Merge "[DU09-0]Adding the NetworkStatsCollection Builder" 2022-01-25 16:44:16 +00:00
William Escande
63c3c1f3d4 Merge changes from topics "bluetooth-localsocket-from-filedescriptor", "localsocket-from-filedescriptor"
* changes:
  Delete LocalSocket#createConnectedLocalSocket.
  Add a module-lib API for constructing a LocalSocket from an fd.
2022-01-25 15:41:08 +00:00
Frank
c7cebd80cc [DU09-0]Adding the NetworkStatsCollection Builder
The purpose is provide NetworkStatsCollection.Builder as
public API for adding the stats {@link NetworkStatsHistory}

Bug: 215862801
Test: atest NetworkStatsCollectionTest
Change-Id: I65ad589473cbb7785cbe8297f793ce9f18a55c35
2022-01-25 18:46:01 +08:00
Junyu Lai
cea0daac70 Merge "[MS67.1] Expose registerUsageCallback with template" 2022-01-25 01:23:45 +00:00
Junyu Lai
513d8dd2ac Merge "[MS61] Remove NetworkManagementSocketTagger#install dependency" 2022-01-25 00:48:23 +00:00
Lorenzo Colitti
8093d78d1c Add a module-lib API for constructing a LocalSocket from an fd.
This allows constructing a LocalSocket from a FileDescriptor
referring to an already-connected socket. The LocalSocket can
then be used to exchange ancillary filedescriptors and fetch
peer socket credentials for the existing FD.

The fd is not dup'd or closed by the API, and the caller is
responsible for closing it. This is consistent with the
constructor of the related LocalServerSocket class, which also
takes an fd and does not manage its lifecycle.

Bug: 200200870
Test: atest CoreTests:android.net.LocalSocketTest CtsNetTestCases:android.net.cts.LocalSocketTest
Change-Id: I86448ba80475c4563194a4a2d9a0c0bbd0b76444
2022-01-25 00:56:44 +09:00
junyulai
3d5840d72d [MS67.1] Expose registerUsageCallback with template
Test: atest FrameworksNetTests
Bug: 204830222
Change-Id: I643e2d96144210852fc8916ec9c483f2b207a48b
2022-01-24 19:38:06 +08:00
Junyu Lai
6629435836 [MS58] Expose Apis which will be used by data migration utility
This includes:
1. NetworkIdentity
2. NetworkIdentitySet
3. NetworkStatsHistory

NetworkStatsCollection Apis will be exposed in a separate CL.

Test: TH
Bug: 204830222
Change-Id: I47b2d3ac3b86cb4e6879afaae34326ca3c050ffa
2022-01-24 15:44:27 +08:00
Junyu Lai
5262c0eb82 [MS61] Remove NetworkManagementSocketTagger#install dependency
Expose TrafficStats#attachSocketTagger and use it instead.

Test: atest TrafficStatsTest
Bug: 204830222
CTS-Coverage-Bug: 214979748
Change-Id: I1748d349b499053ad08bd62202325fa759ad8da5
2022-01-22 13:51:55 +08:00
Junyu Lai
de9cf3392d [MS66] Initialize TrafficStats with context
TrafficStats has static methods created in API level 8 that need
access to NetworkStatsManager but doesn't take a context.
Previously this was achieved by using ServiceManager, but
with TrafficStats moving to the connectivity module, this
is no longer possible.

Instead, make sure TrafficStats has an appropriate context by
the time any client code can call the relevant methods.
• In app code, this achieved by passing the application
  context from ActivityThread#handleBindApplication, before any
  app code can run.
• In the system server, this is achieved by passing the context
  right after creating service.

Test: atest TrafficStatsTest CtsWebkitTestCases
Bug: 204830222

Change-Id: I251bb8a4431ad12ff61929879ef1363cf06b9244
2022-01-22 01:01:49 +08:00
Mark Chien
e44282f897 Merge "Added callback from Tethering to PanService" 2022-01-21 08:43:53 +00:00
Treehugger Robot
be70a4353a Merge "[MS29] Remove Trace hidden API dependencies" 2022-01-21 08:29:29 +00:00
Junyu Lai
c048d53e60 [MS29] Remove Trace hidden API dependencies
Since data usage related code is going to move to mainline module,
hidden classes and methods can no longer be accessed. Thus,
expose the needed system apis since there is no alternative.

Test: TH
Fix: 215152167
Bug: 204830222
Change-Id: I41046f90b9ff8f1755304e5d289584d39599fd13
2022-01-21 06:34:55 +00:00
Junyu Lai
159be51df6 Merge changes from topic "ms57-migrationapi"
* changes:
  [MS57.1] Prepare APIs for data migration utility
  [MS45] Expose SystemApis to query summary and history with template
2022-01-21 04:26:57 +00:00
Etienne Ruffieux
06580338e6 Merge "Making Process.NFC_UID SystemApi for modules" 2022-01-20 23:19:12 +00:00
Etienne Ruffieux
fe195c9b7e Making Process.NFC_UID SystemApi for modules
In order for Bluetooth to be a mainline module, we need to
remove all hidden APIs calls from and to it. NFC_UID is
used inside BluetoothManagerService so we need to be able
to access it.

Tag: #feature
Test: make
Bug: 211851706
Change-Id: Ie778c4467f5db1efa1f759c405373cc3e34747ca
2022-01-20 19:09:50 +00:00
Junyu Lai
685a738d19 [MS45] Expose SystemApis to query summary and history with template
This includes:
1. queryDetailsForDevice: get history of network stats that
   matches the given template.
2. querySummaryForDevice: similar to the above one, but the
   result is aggregated over time.
3. queryDetailsForUidTagState: get history of uid stats that
   matches the given template, uid, tag and other conditions.
4. querySummary: similar to the above one, but the
   result is aggregated over time.
5. queryTaggedSummary: similar to the above one, but only
   return tagged data.

Test: TH
Bug: 204830222
Change-Id: Ic18010822a33e340b954e9c53dc515f3b6224d6d
2022-01-20 13:03:39 +00:00
Paul Hu
f276eba866 Merge "Split out the nsd API surface and use framework-connectivity-tiramisu" 2022-01-20 03:02:56 +00:00
Etienne Ruffieux
7951f08f7d Added callback from Tethering to PanService
To remove hidden networking APIs we need a new way of
communication with Tethering. Adds callback to notify
Tethering when Bluetooth is ready.

Tag: #feature
Bug: 190438212
Test: atest BluetoothInstrumentationTests
Change-Id: I3102d7c907f9933fceab9da35c2e83982878ba82
2022-01-19 15:36:01 +00:00
paulhu
c100db56a2 Split out the nsd API surface and use framework-connectivity-tiramisu
- Split out nsd APIs and hidden APIs to Connectivity module.
- Keep the all files in f/b/packages/Connectivity-T and add
  framework-connectivity-tiramisu library on p/m/Connectivity.
  Then make framework to use this module library.
- Remove NsdService from SystemServer which will register from
  ConnectivityServiceInitializer

Bug: 206893064
Test: m online-sdk-dev-docs
Test: atest FrameworksNetTests CtsNetTestCases
CTS-Coverage-Bug: 207804007
Merged-In: I72c7de124b9cc53f2263bd452ecd5f39e88e485b
Change-Id: I72c7de124b9cc53f2263bd452ecd5f39e88e485b
2022-01-19 18:47:45 +08:00
Junyu Lai
b52609172e Merge changes I16418791,I210f5ddc
* changes:
  [MS37.1] Expose APIs which is used by NPMS
  [MS55] Remove INetworkStats dependency from DataIdleTest
2022-01-19 07:08:15 +00:00
Junyu Lai
53d603a751 [MS37.1] Expose APIs which is used by NPMS
Test: TH
Bug: 204830222
CTS-Coverage-Bug: 213124616
Change-Id: I16418791246b12fc3da7348ed36b58274e20db54
2022-01-19 07:07:34 +00:00
lifr
c1d2e899ac [DU04-1]Remove NetworkPolicyManagerInternal from NetworkStatsService
Expose system APIs for use by NetworkStatsService.

Bug: 211843446
Test: atest NetworkStatsServiceTest NetworkPolicyManagerTest
            NetworkPolicyManagerServiceTest
Change-Id: I56a066b7f4b4c2c8fefdd185c2e50de63b1e2629
2022-01-18 03:16:51 +08:00
William Escande
2d39eb02ca Merge "Add BtProfileConnectionInfo.a2dpSinkInfo" 2022-01-14 17:02:46 +00:00
William Escande
543d84f6b2 Make ACTION_SETTING_RESTORED SystemApi
Because Bluetooth is going mainline, we need to remove call to hidden
API.
Intent.ACTION_SETTING_RESTORED and extra are currently hidden.
There is no known alternative, so this CL make them SystemApi.

Bug: 211851706
Test: Build + start bt
Tag: #refactor
Change-Id: I7a105946f075819f21b91a39bc37c6e167439bf4
2022-01-12 19:33:02 +00:00
Junyu Lai
64c6943777 [MS09] Expose NetworkTemplate APIs which are needed by NetworkPolicy
This change also remove getWifiNetworkKey which should not be exposed
as system API.

Test: atest NetworkTemplateTest
Bug: 204830222
Change-Id: I924f62025a8672167f778ff790cd208c74eed878
2022-01-06 09:22:52 +00:00
Junyu Lai
0cf9e87c79 [MS27] Expose noteUntaggedSocket SystemApi
While Data usage related codes are moving to mainline module,
StrictMode#vmUntaggedSocketEnabled() and onUntaggedSocket()
can no longer be accessed from NetworkManagementSocketTagger.

Thus, expose alternative SystemApi to allow invocations from
the module.

Test: TH
Bug: 204830222
Exempt-From-Owner-Approval: 1. Owner approved the change with
  explicitly granted submission after adderessing the
  straight-forward comment. 2. Owner is OOO for 3 months.
Change-Id: Ib54ff54ce3617ae0d04080a1740e78b086bbb039
2022-01-06 08:49:46 +00:00
William Escande
b22dcdb6a1 Add BtProfileConnectionInfo.a2dpSinkInfo
Following aosp/1782984 comment from QC, we are adding the a2dpSinkInfo
method.

Test: build
Tag: #feature
Bug: 190422401
Change-Id: I456ced3bb87dcffcea7bd0c24b63e06d62d9b95a
2021-12-31 11:53:31 +01:00
William Escande
837956204e Merge "Add SystemApi to AudioManager method" 2021-12-21 13:23:13 +00:00
William Escande
a05cb45b0e Add SystemApi to AudioManager method
getHwOffloadFormatsSupportedForBluetoothMedia is convert to a SystemApi
for module only (only use in BT)

Change-Id: Iae212ff5fd2159198543c0b877c2e56e3aefdb7c
Test: Build
Bug: 190422401
Tag: #refactor
2021-12-21 00:51:38 +01:00
Aaron Huang
935cafbabe Make IpSecManager.DIRECTION_FWD @SystemApi
IpSecManager.DIRECTION_FWD is used by VcnGatewayConnection and
it will be not visible to platform after IpSec was moved into
Connectivity mainline module. Therefore, make DIRECTION_FWD
@SystemApi so that it can be used by VcnGatewayConnection.

Bug: 204153604
Test: FrameworksNetTests
Change-Id: I80dc2a5b4940504820cee0d8e2d2e59ef3fcca18
2021-12-19 02:44:24 +08:00
paulhu
474a8aaffc Register NSD service from ConnectivityFrameworkInitializerTiramisu
INsdManager is going to move into connectivity mainline module
and it will be not visible to SystemServiceRegistry after
migration done. Thus, use ConnectivityFrameworkInitializerTiramisu
to register NSD service instead.

ConnectivityFrameworkInitializerTiramisu will be implemented in
the framework-connectivity-tiramisu bootclasspath JAR, which need
to be separated from the S+ framework-connectivity bootclasspath
JAR to be only loaded by the module on T+. So its methods cannot
be in the same class as ConnectivityFrameworkInitializer.

Bug: 206702844
Test: atest FrameworksNetTests CtsNetTestCases
Merged-In: Ibf89ab9a35e35dac4978ba70c7ab306b6155a4a3
Change-Id: Ibf89ab9a35e35dac4978ba70c7ab306b6155a4a3
2021-12-13 15:33:03 +08:00
wescande
3fe5af4890 A2DP switch device refactor
Bluetooth mainline effort to reduce AudioManager API

Test: Manual
Tag: #refactor
Bug: 190422401
Fix: 197715842
Fix: 197932292
Merged-In: I65c6561969d443e80f0a49256770279cd0959352
Change-Id: I65c6561969d443e80f0a49256770279cd0959352
2021-11-11 15:22:20 +01:00
Roopa Sattiraju
30cd5df67f Merge "Change getEnabledComponentOverrides return type" 2021-11-05 17:33:00 +00:00
William Escande
ef429b62b1 remove AudioManager.setParameters from bluetooth
All uses of AudioManager.setParameters are a hack that we have to remove.

Bug: 196440888
Tag: #refactor
Test: Build
Change-Id: I6deeffef8fbd8ba1c501f41c74b4763503106cc0
2021-11-02 16:38:15 +01:00
William Escande
5b4de494a0 Fix queryRawContactEntity api
Bug: 203535224
Tag: #refactor
Test: build
Change-Id: Id2e4be7a7985c47e81b6bafee5c35d0df3f33d8f
2021-10-19 21:21:48 +02:00
William Escande
e44b464866 Add a method to get rawContact
This remove the leak of hidden private field and add an api to get
entreprise raw contact
Bug: 194119078
Test: Build
Tag: #refactor

Change-Id: I9285cd54545e1359a4a7f57826ddb1a0e1dcdfbe
2021-10-15 13:33:52 +02:00
William Escande
a47b950bd1 Change getEnabledComponentOverrides return type
Use ComponentName type
Use module systemApi

Bug: 200698832
Tag: #refactor
Test: Build
Change-Id: I0b6057c0b03f40607eb0eb8a7556dea1d4a7d962
2021-10-11 14:27:22 +02:00
Etienne Ruffieux
4c70432d82 API renaming asked by API Council
Renamed all "cancelled" to "canceled" for PendingIntent.

Tag: #feature
Bug: 201405682
Test: atest android.app.cts.PendingIntentTest#testCancelListener
Change-Id: I0f5457f58836c6e80845dcd4d874a810008a320e
2021-09-29 13:08:09 +00:00
Makoto Onuki
30bd1bb72d Expose PendingIntent.addCancelListener
Bug: 195146423
Test: atest android.app.cts.PendingIntentTest#testCancelListener
Change-Id: I74e6ae49bfb2b31f0bc693d75e1f1433206011ce
2021-09-27 09:35:48 +00:00
Treehugger Robot
ce81ce3148 Merge "Adding module permission for SubscriptionManager" am: 116c365563
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1778969

Change-Id: I9e8a4aea7ff0006289000ca0a129fc9886a49223
2021-08-27 17:47:45 +00:00
Treehugger Robot
116c365563 Merge "Adding module permission for SubscriptionManager" 2021-08-27 17:29:58 +00:00
Treehugger Robot
4cef59a768 Merge "ServiceManager APIs for Wi-Fi mainline module" am: 0ce930a02e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1768620

Change-Id: I2591edfe683ccab7fd482c342dc88630a9561bb4
2021-08-23 19:49:51 +00:00
Steven Moreland
ce81994f5f ServiceManager APIs for Wi-Fi mainline module
ServiceManager.waitForDeclaredService and .isDeclared needed for Wi-Fi mainline module.

Test: boot
Change-Id: I9e82dd1a6663396f1c79bc3f27c36711b0b6f3eb
2021-08-20 22:21:35 +00:00
Etienne Ruffieux
6a646db625 Adding module permission for SubscriptionManager
Adding module SystemApi to SubscriptionManager functions
used by Bluetooth to add SUBSCRIPTION_TYPE_REMOTE_SIM.

Tag: #feature
Bug: 190441152
Test: Manual
Change-Id: Ia2c8609524027c5ec448c1d1eb1f58dd7b3db5de
2021-08-02 08:57:04 +00:00