181 Commits

Author SHA1 Message Date
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
paulhu
670abcd53d Rename FIRST_SDK_INT to DEVICE_INITIAL_SDK_INT
As API review feedback, rename Build#VERSION#FIRST_SDK_INT to
Build#VERSION#DEVICE_INITIAL_SDK_INT. As well as update all usage
in frameworks and tests.

Bug: 184735771
Test: m
Merged-In: I72660959cb4e638a8e80fcf2f4e96ea172969f44
(cherry-pick with minor conflicts)

Change-Id: I72660959cb4e638a8e80fcf2f4e96ea172969f44
2021-07-05 14:10:16 +09:00
Aaron Huang
a5b9e6ed7d Rename *Iface* APIs to *Interface*
Address API review feedback, other APIs have been refering to
these as "interface" instead of "iface" so migrate the APIs named
*Iface* to *Interface*.

(cherry-picked from ag/14326779)
Bug: 183972554
Test: atest android.net.UnderlyingNetworkInfoTest
Merged-In: I38b476e762fb57fa88c4a789092d0af6f5330d80
Change-Id: I38b476e762fb57fa88c4a789092d0af6f5330d80
2021-05-14 11:05:22 +08:00
Treehugger Robot
2f83b6a72d Merge "Add getters to NetworkStateSnapshot" 2021-04-29 09:20:34 +00:00
Aaron Huang
a10cc3aa60 Rename *Iface* APIs to *Interface*
Address API review feedback, other APIs have been refering to
these as "interface" instead of "iface" so migrate the APIs named
*Iface* to *Interface*.

Bug: 183972554
Test: atest android.net.UnderlyingNetworkInfoTest
Change-Id: I38b476e762fb57fa88c4a789092d0af6f5330d80
2021-04-28 17:57:32 +08:00
Aaron Huang
7511be401e Add getters to UnderlyingNetworkInfo
Address API review feedback, add getters to UnderlyingNetworkInfo
instead of exposing fields.

Instead of wasting memory by converting this into an array, have
migrateTun take a List<String>. In turn, tunAdjustmentInit should
also take a List<String>.

(cherry picked from ag/14211075)
Bug: 183972554
Test: atest android.net.UnderlyingNetworkInfoTest
Merged-In: Id59744097208d91298a25ef110ade91a9cf291a1
Change-Id: Id59744097208d91298a25ef110ade91a9cf291a1
2021-04-22 22:30:42 +08:00
Aaron Huang
a3ae9b1c38 Add getters to NetworkStateSnapshot
Address API council feedback, add getters to NetworkStateSnapshot
instead of exposing the bare fields directly.

(cherry picked from ag/14233655)
Bug: 183972826
Test: FrameworksNetTests
Merged-In: Id1707753b42ae88d2b95e4bd00a792609434e4f5
Change-Id: Id1707753b42ae88d2b95e4bd00a792609434e4f5
2021-04-22 18:21:00 +08:00
Lorenzo Colitti
609f5cff0b Merge "Hide NetworkPolicyManager.blockedReasonsToString API." am: 0549ca0217 am: fe78ceab36 am: 8027b42fe6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1682220

Change-Id: If0d8f99d618173d707d2f473d4f6634c3461f0ca
2021-04-22 03:29:41 +00:00
Aaron Huang
0924e0d9d6 Merge "Add getters to UnderlyingNetworkInfo" into sc-dev 2021-04-22 03:09:41 +00:00
Aaron Huang
5d3144c977 Merge "Add getters to NetworkStateSnapshot" into sc-dev 2021-04-21 11:20:10 +00:00
Sudheer Shanka
00f344a18e Hide NetworkPolicyManager.blockedReasonsToString API.
BLOCKED_REASON_* constants have been moved to ConnectivityManager
and blockedReasonsToString() util method doesn't belong in
NetworkPolicyManager as an API. So, just removing it for now.

Bug: 185967486
Test: treehugger
Change-Id: Ie04044980fdfc7ec772444be13fc659880953bd1
2021-04-21 07:23:54 +00:00
Aaron Huang
d78c60c10a Add getters to NetworkStateSnapshot
Address API council feedback, add getters to NetworkStateSnapshot
instead of exposing the bare fields directly.

Bug: 183972826
Test: FrameworksNetTests
Change-Id: Id1707753b42ae88d2b95e4bd00a792609434e4f5
2021-04-20 21:55:56 +08:00
Aaron Huang
f6008978c4 Add getters to UnderlyingNetworkInfo
Address API review feedback, add getters to UnderlyingNetworkInfo
instead of exposing fields.

Instead of wasting memory by converting this into an array, have
migrateTun take a List<String>. In turn, tunAdjustmentInit should
also take a List<String>.

Bug: 183972554
Test: atest android.net.UnderlyingNetworkInfoTest
Change-Id: Id59744097208d91298a25ef110ade91a9cf291a1
2021-04-20 13:34:52 +08:00
Kyunglyul Hyun
b4e519caf4 Revert^2 "Change PlaybackState#isActiveState to isActive"
This reverts d077dbf43841f2143b8fcd1388087e1fcd25219c
because the issue was resolved.

Bug: 161331016
Test: m lint-check
Change-Id: Ic4a2025407caeb6d41db3b84a293dc249f77ad0b
2021-04-19 07:11:57 +00:00
Orion Hodson
56b6ff07c3 Merge "Revert "Change PlaybackState#isActiveState to isActive"" into sc-dev 2021-04-15 15:07:24 +00:00
Treehugger Robot
2d4f2324cf Merge "Make TYPE_VPN_LEGACY no longer deprecated." am: 590949fd61 am: 9d5240865f am: 0d3acacdd5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1675627

Change-Id: Ib6419d4d408c5f4859bac2e92b1811dffd513c9c
2021-04-15 05:50:32 +00:00
Lorenzo Colitti
fb7f36b3cb Make TYPE_VPN_LEGACY no longer deprecated.
Addresses API council feedback.

Test: m
Fix: 185311050
Change-Id: I93c8c46ceda7b08f9fc0ab8930f6a3c960f30930
2021-04-14 23:30:48 +09:00
Sahana Rao
d077dbf438 Revert "Change PlaybackState#isActiveState to isActive"
Revert "Change PlaybackState#isActiveState to isActive"

Revert submission 14124578-playbackstate_isactive

Reason for revert: b/185343312
Reverted Changes:
I4757038d6:Change PlaybackState#isActiveState to isActive
If7753e8e9:Change PlaybackState#isActiveState to isActive

Change-Id: I7c890c65ecb955860d31db6c926ad2d6ded514dc
2021-04-14 12:14:49 +00:00
Kyunglyul Hyun
90e33e72cb Merge "Change PlaybackState#isActiveState to isActive" into sc-dev 2021-04-14 03:18:06 +00:00
Corina Grigoras
5b4e1622b7 Merge "Rename createContentUriAsUser to createContentUriForUser" into sc-dev 2021-04-13 16:43:00 +00:00
Paul Hu
036d189a8d Merge "Rename FIRST_SDK_INT to DEVICE_INITIAL_SDK_INT" into sc-dev 2021-04-13 02:05:21 +00:00
Corina
7c368531a4 Rename createContentUriAsUser to createContentUriForUser
Bug: 183395239
Test: atest ContentProviderTest
Change-Id: I13c382e7ad4f291de28a52025a8ec4e59d815409
2021-04-12 21:57:06 +00:00
paulhu
016950a485 Rename FIRST_SDK_INT to DEVICE_INITIAL_SDK_INT
As API review feedback, rename Build#VERSION#FIRST_SDK_INT to
Build#VERSION#DEVICE_INITIAL_SDK_INT. As well as update all usage
in frameworks and tests.

Bug: 184735771
Test: m
Change-Id: I72660959cb4e638a8e80fcf2f4e96ea172969f44
2021-04-09 15:47:36 +08:00
Kyunglyul Hyun
4879480b99 Change PlaybackState#isActiveState to isActive
Rename PlaybackState#isActiveState() to #isActive()
and make it public.
This is according to API review.

This CL also includes STATE_SKIPPING_TO_QUEUE_ITEM
as an active playback state.

Bug: 184612506
Test: build successful && atest PlaybackStateTest

Change-Id: I4757038d63adc3478f19f177265ebd198fb5f424
2021-04-09 05:48:31 +00:00
TreeHugger Robot
0a0ddadab5 Merge "usb: Address some API review comments" into sc-dev 2021-04-09 05:14:47 +00:00
Remi NGUYEN VAN
6c9d7a5c75 Merge "Replace IS_DEBUGGABLE with isDebuggable module API" am: ba77876dbd am: 4290766ae7 am: 116bab20ab
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1667304

Change-Id: I3a64653b1a9cb283ba04d4c5a363d3b44fa7b987
2021-04-09 01:30:00 +00:00
Remi NGUYEN VAN
ba77876dbd Merge "Replace IS_DEBUGGABLE with isDebuggable module API" 2021-04-09 00:19:19 +00:00
Paul Hu
3347a6c3db Merge "Move ACTION_CLEAR_DNS_CACHE to ConnectivityManager" am: ed4117ff40 am: d40e17099f am: 52b8921820
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1667080

Change-Id: I5fd350d67065211b84dbea769d258daff9780276
2021-04-08 07:48:14 +00:00
Remi NGUYEN VAN
b5f095ebf0 Replace IS_DEBUGGABLE with isDebuggable module API
Introduce a Build.isDebuggable() getter instead of the IS_DEBUGGABLE
static member.

Also make it module API as APK modules now have access to module APIs in
S, but also TestApi so it can be tested.

Test: m
Fixes: 182345786
Change-Id: I25d0848aee758792bbaba8ab73b5dd997a7250b3
2021-04-08 13:50:31 +09:00
paulhu
b4e9b2b3d8 Move ACTION_CLEAR_DNS_CACHE to ConnectivityManager
- As API review feedback, move ACTION_CLEAR_DNS_CACHE form Intent
  to ConnectivityManager.

- Rename to "android.net.action.CLEAR_DNS_CACHE" because of lint
  suggestion.
frameworks/base/packages/Connectivity/framework/src/android/net/
ConnectivityManager.java:449: error: Inconsistent action value;
expected `android.net.action.CLEAR_DNS_CACHE`, was
`android.intent.action.CLEAR_DNS_CACHE` [ActionValue]

Bug: 183937999
Test: atest FrameworksNetTests
Test: atest ActivityTaskManagerServiceTests
Test: atest android.permission2.cts.PermissionPolicyTest
Test: atest CtsNetTestCases
Change-Id: Iae8aa0ba10dfc7581f0cfaab82643edbee789e2f
2021-04-07 19:40:47 +08:00
TreeHugger Robot
20d6212568 Merge "Remove a module-lib API" into sc-dev 2021-04-06 10:09:50 +00:00
Aaron Huang
46d99ea11f Expose Context#PAC_PROXY_SERVICE as module lib API
(cherry-picked from ag/14097767)
Bug: 183938000
Test: make update-api
Merged-In: I4341e177b61df0311f0a3234f8814a0ae2cf9a1b
Change-Id: I4341e177b61df0311f0a3234f8814a0ae2cf9a1b
2021-04-06 17:06:03 +08:00
Aaron Huang
62718c2bbf Expose Context#PAC_PROXY_SERVICE as module lib API
Bug: 183938000
Test: make update-api
Change-Id: I4341e177b61df0311f0a3234f8814a0ae2cf9a1b
2021-04-06 11:50:21 +08:00
JW Wang
9fcfccbcc0 Remove a module-lib API
Per b/150347230#comment18, remove the API since
RollbackManager will not be a module in S.

Bug: 150347230
Test: m
Change-Id: I1f356d0f5097da340986182314e47e3b6b6d9223
2021-03-31 18:17:05 +08:00
Sudheer Shanka
05f75c2553 Merge "Remove NetworkPolicyManager.isUidBlocked() API." am: 9cff99d059 am: 433c866186 am: 4b3348f115
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1652550

Change-Id: Ic5c9fb2603a010976bc93e5059e5548ee782005e
2021-03-29 17:45:42 +00:00
Sudheer Shanka
d3ba15beeb Remove NetworkPolicyManager.isUidBlocked() API.
It isn't used by ConnectivityService any more and even if
it needs such utility method in the future, we could create
one which is part of connectivity module and doesn't need
to be exposed as part of NetworkPolicyManager API surface.

Bug: 183696103
Test: atest ./tests/net/java/com/android/server/ConnectivityServiceTest.java
Change-Id: Ie3c681f88e4b2b9bb92d2224c5ea96b074f155d5
2021-03-29 12:39:12 +00:00
Zimuzo Ezeozue
3244637a97 Merge "Address onAnrDelayStarted API comments" into sc-dev 2021-03-25 19:35:47 +00:00