Commit Graph

27021 Commits

Author SHA1 Message Date
Mark Chien
c686fa828b Merge "TetheringManager API clean up" 2020-03-19 16:09:21 +00:00
Treehugger Robot
e215c5d047 Merge "Move NetworkCallback to last parameter for new exposed requestNetwork" 2020-03-19 15:51:32 +00:00
markchien
32726e00e2 Move NetworkCallback to last parameter for new exposed requestNetwork
Bug: 151243698
Test: atest TetheringTests
Change-Id: I87ef1d451eefa6998b9793c4eacabae978376d24
Merged-In: I87ef1d451eefa6998b9793c4eacabae978376d24
2020-03-19 11:36:07 +00:00
markchien
743236096e TetheringManager API clean up
Per API review:
- @IntDef defined on the type integer parameter
- have getters on each parameter that is set in the
  TetheringRequest.Builder
- new added API should not be deprecated
Below APIs is moved from system-current to module-lib-current that only
plafrom code(e.g. ConnectivityManager and Settings) can use them.
TetheringRequest.
onTetherableInterfaceRegexpsChanged, TetheringInterfaceRegexps:
Only platform code can use them because interfaces by regular
expressions are a mechanism which is planning to be deprecated.

Also rename some constants for easier to understand.

Bug: 149858697
Bug: 151243337
Test: m doc-comment-check-docs
      atest TetheringTests
Change-Id: I45cb21d5bc919f6d32c42650326597d5173ea028
Merged-In: Idd041f0fbeca411ea23e49786a50dd7feb77ef45
2020-03-19 19:32:50 +08:00
Lorenzo Colitti
e30d9267ef Merge "Make Ethernet interfaces more testable." 2020-03-19 11:12:09 +00:00
Zoey Chen
1859e648d6 Merge "[TelephonyMainline] @hide @SystemApi and revisit them in S. - CarrierColumns" 2020-03-19 06:21:35 +00:00
Treehugger Robot
0d56f6c047 Merge "Revert "Revert "Require user pass in a non-null BluetoothDevice ..."" 2020-03-19 01:36:09 +00:00
Lorenzo Colitti
da4fe152c4 Make Ethernet interfaces more testable.
This CL adds a setIncludeTestInterfaces method to EthernetManager
that, when called, causes the Ethernet service to recognize and
manage test interfaces created by TestNetworkManager.

Bug: 150644681
Test: Tested by EthernetTetheringTest in same topic
Change-Id: I86eef7a93267f800dbfc8eafd307effa76a344ca
2020-03-19 09:46:37 +09:00
Nathan Harold
2ea0b56cff Merge changes from topics "barring-cp", "nri-rplmn"
* changes:
  Allow Nullable Registered PLMN
  Return the RPLMN from NetworkRegistrationInfo
  Expose PreciseDataConnectionstate#getApnSetting()
  Skip sanitizing location info for Null Barring CID
  Remove BarringInfo#isServiceBarred()
  Introduce a new RIL request constant to support getBarringInfo.
  Update BarringInfo as Barring HAL date stuctures updated
  Add a BARRING_TYPE_UNKNOWN for Unreported Barring
  Add Callback to notify changes of barring status
2020-03-18 23:41:57 +00:00
Nathan Harold
4ad89fb955 Allow Nullable Registered PLMN
API Council has noted an inconsistency
between setRegisteredPlmn() and getRegisteredPlmn().

Because other methods such as CellIdentity#getMncStr()
are already nullable, it's reasonable to allow the
registered PLMN to be null in the event that the device
isn't registered.

Bug: 149476549
Test: make update-api && make && atest NetworkRegistrationInfoTest
Merged-In: Ib38e72a6bdbaf4e1fd439e92f835daa6f87ceb73
Change-Id: Ib38e72a6bdbaf4e1fd439e92f835daa6f87ceb73
(cherry picked from commit 2fb0bc50f9)
2020-03-18 23:41:32 +00:00
Nathan Harold
ad4d8569e7 Return the RPLMN from NetworkRegistrationInfo
Add an API to get the RPLMN in network registration info.

This PLMN-ID is the one chosen from the PLMN IDs broadcast
by the cell for registration purposes.

Bug: 135921133
Test: make update-api && make offline-sdk-docs && make
      && atest FrameworksTelephonyTests
Merged-In: I82f9150e185d9809572d246b57ea42f14ad64f15
Change-Id: I82f9150e185d9809572d246b57ea42f14ad64f15
(cherry picked from commit 2b14af22da)
2020-03-18 23:41:13 +00:00
Nathan Harold
ca2e76571e Expose PreciseDataConnectionstate#getApnSetting()
Expose an API that was accidentally left as package private.

This is was missed when exposing other methods for the same
class; however, other methods have been deprecated based on
the presumption that this method is available in the public
API.

This method deprecated:
PreciseDataConnectionState#getDataConnectionApnTypeBitMask()
PreciseDataConnectionState#getDataConnectionApn()

Bug: 148565164
Bug: 147600208
Test: make update-api && make offline-sdk-docs
Merged-In: I0207c18d853d0b83db2622ff3abcda98565eac30
Change-Id: I0207c18d853d0b83db2622ff3abcda98565eac30
(cherry picked from commit a61992b67a)
2020-03-18 23:40:51 +00:00
Rahul Sabnis
cd3bee95ed Revert "Revert "Require user pass in a non-null BluetoothDevice ..."
Revert "Revert "Pass in active device to all BluetoothA2dp APIs ..."

Revert "Revert "Pass in active device to all BluetoothA2dp APIs ..."

Revert submission 10303287-revert-10253996-bt-a2dp-no-null-FQRXACWPIA

Reason for revert: Fixing breakage
Reverted Changes:
I4d9f2f819:Revert "Make sure calls to BluetoothA2dp APIs pass...
I771ca0d57:Revert "Need to now pass in active device instead ...
I76529c7a1:Revert "Pass in active device to all BluetoothA2dp...
I297bda68d:Revert "Require user pass in a non-null BluetoothD...
I525327959:Revert "Pass in active device to all BluetoothA2dp...
I1d8660b11:Revert "Pass in active device to all BluetoothA2dp...

Bug: 147287141
Test: Manual
Merged-In: I91ee6878cac1b84bd289278a1b965658a26fe4db
Merged-In: I4d7d971af75bff8967fd807d34dad90c32e24eba
Change-Id: I4d7d971af75bff8967fd807d34dad90c32e24eba
2020-03-18 11:10:24 -07:00
Nathan Harold
e3adb3a0a6 Remove BarringInfo#isServiceBarred()
Address API Council comments:
-Remove convenience method isServiceBarred()
-Pre-construct default barring objects rather than
 construct new ones in case the struct is sparsely
 populated.

Bug: 148553656
Test: atest BarringInfoTest
Change-Id: Ib0cbdfb431e1fc57afe16595406e0a4d70af8945
(cherry picked from commit 40cd94dde0)
2020-03-18 10:18:28 -07:00
Nathan Harold
3c5e57cd07 Add a BARRING_TYPE_UNKNOWN for Unreported Barring
For vendors that do not support barring info reports,
add an additional BARRING_TYPE to express the difference
between unbarred and unknown barring status.

Bug: 143226991
Test: make update-api && make && atest BarringInfoTest
Merged-In: Ie9314c5612536bf181a3c0e52876b1804ed7cce2
Change-Id: Ie9314c5612536bf181a3c0e52876b1804ed7cce2
(cherry picked from commit d5b9cc737b)
2020-03-18 09:52:10 -07:00
Nathan Harold
61b5d6741b Add Callback to notify changes of barring status
-Create a BarringInfo class to pass Barring information
 from HAL to PhoneStateListener.
-Add a multi-callback registrant so that ServiceStateTracker
 and potentially DcTracker can also listen to barring info in
 the future.

Bug: 143226991
Test: make update-api && make && atest BarringInfoTest
Merged-In: I08240259f3142beeca991238bf705236f0303954
Change-Id: I08240259f3142beeca991238bf705236f0303954
2020-03-18 09:52:10 -07:00
Amit Mahajan
0aa828ab5d Merge "Revert "Expose ACTION_USER_SWITCHED as system API"" 2020-03-18 15:31:08 +00:00
zoey chen
c73028e9f2 [TelephonyMainline] @hide @SystemApi and revisit them in S. - CarrierColumns
Test: manual
Bug: 144455212
Change-Id: I719ee0a4d23dcb7786954fe2741f3830d3d3a5bc
Merged-In: I719ee0a4d23dcb7786954fe2741f3830d3d3a5bc
2020-03-18 11:55:54 +00:00
Zoey Chen
685fe6f443 Merge "[TelephonyMainline] @hide system api since we'll revisit in S. - IccLock" 2020-03-18 05:15:05 +00:00
Junyu Lai
2c7aa1f5ab Merge "[SP25] Rename functions that add Entry conditionally" 2020-03-18 03:16:41 +00:00
zoey chen
51670b219f [TelephonyMainline] @hide system api since we'll revisit in S. - IccLock
Test: make
Bug: 146983487
Change-Id: Iabc3300e883e2afad6145f9bb1410d0606a35c11
Merged-In: Iabc3300e883e2afad6145f9bb1410d0606a35c11
2020-03-18 10:51:38 +08:00
junyulai
5a1b9fce65 [SP25] Rename functions that add Entry conditionally
Currently, in NetworkStats, there are many methods to manipulate
the records. However, some methods are similar and ambiguous,
such as addEntry, addValues, setValues, addIfaceValues,
combineValues and combineAllValues.

Thus, properly grouping and renaming methods are necessary.
In this change, for methods that add one record conditionally,
name them addEntry.
  addValues -> addEntry

Test: atest FrameworksNetTests ImsPhoneCallTrackerTest TetheringTests
Fix: 148895143
Change-Id: I9495a198cf247e6c79100f7ac1edcea370b071de
Merged-In: I9495a198cf247e6c79100f7ac1edcea370b071de
(cherry picked from ag/10700816)
2020-03-18 00:29:15 +00:00
Amit Mahajan
5a29b0447b Revert "Expose ACTION_USER_SWITCHED as system API"
This reverts commit ffe0cbe5ca.

Reason for revert: Not needed for now; will be redone in S.

Bug: 148180958
Change-Id: I426e00e1eb79af5b520fc8c59439614459720fa6
2020-03-18 00:19:53 +00:00
Alex Lin
b375f0bd4a Merge changes from topic "add-error-code"
* changes:
  Update EuiccService encodeSmdxSubjectAndReasonCode
  Rename ErrorCode
  Add public error codes to Euicc public API
2020-03-17 23:01:43 +00:00
Cody Kesting
35cba128cb Merge "Update ConnectivityDiagnosticsCallback function name." 2020-03-17 19:00:39 +00:00
Cody Kesting
40f23ffb38 Update ConnectivityDiagnosticsCallback function name.
API Council feedback suggests renaming ConnectivityDiagnosticsCallback
'onConnectivityReport' function to be 'onConnectivityReportAvailable'.

Bug: 150598997
Test: atest FrameworksNetTests
Change-Id: Ieea727ecee6cf358a53a215fd4b06233dfe967ea
Merged-In: Ieea727ecee6cf358a53a215fd4b06233dfe967ea
2020-03-17 17:10:38 +00:00
Mark Chien
81ab487105 Merge "Support static address configuration" 2020-03-17 13:26:09 +00:00
Treehugger Robot
66a82eecd2 Merge "Removing some of the API don't have to be @SystemApi" 2020-03-17 12:51:25 +00:00
Remi NGUYEN VAN
ab5fdfa7cd Merge "Move sensitive field parceling bool to constructor" 2020-03-17 07:49:38 +00:00
Jack Yu
d5848b795d Merge "Removed permission check" 2020-03-17 03:15:32 +00:00
Zoey Chen
1724914c9f Merge "[TelephonyMainline] @hide system api since we'll revisit in S. - DataAllowed" 2020-03-17 02:45:25 +00:00
Remi NGUYEN VAN
ad7ddfd7f8 Move sensitive field parceling bool to constructor
This addresses API review comments recommending to use a copy
constructor with additional parameters instead of a dedicated method.
makeSensitiveFieldsParcelingCopy becomes LinkProperties(base, true).

Bug: 150877475
Test: atest FrameworksNetTests NetworkStackTests NetworkStackNextTests
Change-Id: Ib145ca7f36dcbee6ef47d09862a181fc04a28f03
2020-03-17 11:42:33 +09:00
markchien
b69c39ad83 Support static address configuration
Application can specify static ipv4 server and client address to setup
tethering and this is one shot configuration. Tethering service would
not save the configuration and the configuration would be reset when
tethering stop or start failure.

When startTethering callback fired, it just mean tethering is requested
successful. Therefore, callers may call startTethering again if
startTethering successful but do not receive following tethering active
notification for a while. Tethering service never actually does anything
synchronously when startTethering is called:
  -startProvisioningIfNeeded just posts a message to the handler thread.
  -enableTetheringInternal doesn't do anything synchronously, it just
  asks the downstreams to get their interfaces ready and waits for
  callbacks.
If tethering is already enabled with a different request,
tethering would be disabled and re-enabled.

Bug: 141256482
Test: -build, flash, boot
      -atest TetheringTests
      -atest CtsTetheringTest

Change-Id: I0399917e7cefa1547d617e688225544c4fc1a231
2020-03-17 00:11:16 +08:00
Treehugger Robot
ba350f4652 Merge changes I801ddc49,Id1b8f41b
* changes:
  [SP24] Rename functions that add Entry unconditionally
  [SP23] Address misc API review comment about NetworkStats
2020-03-16 11:38:00 +00:00
Zoey Chen
eff8e993c7 Merge "[TelephonyMainline] @hide system api since we'll revisit in S - Cdma" 2020-03-16 11:27:42 +00:00
Aaron Huang
8173b63126 Removing some of the API don't have to be @SystemApi
Some of the API we made @SystemApi won't be used by mainline
module. Removing these from the surface.

Bug: 151266974
Test: atest FrameworksNetTests
      atest FrameworksTelephonyTests
      atest FrameworksWifiTests

Change-Id: Ie30efa172f93a7557fb6ef56f4daf80e958c3787
Merged-In: Ie30efa172f93a7557fb6ef56f4daf80e958c3787
2020-03-16 17:39:41 +08:00
junyulai
c7e614d0f3 [SP23] Address misc API review comment about NetworkStats
This change add several javadoc for NetworkStats and its Entry
class. Also remove IFACE_ALL constant accordlingly.

Test: atest FrameworkNetTests
Test: m doc-comment-check-docs
Bug: 148895143
Change-Id: Id1b8f41be79f847ad73197ff0e18258b6ee8a730
2020-03-16 14:27:45 +08:00
zoey chen
b81b4e5cd8 [TelephonyMainline] @hide system api since we'll revisit in S - Cdma
Test: make
Bug: 148404061
Change-Id: I83dbaa24f94f5cca846d6ca71c7e6814ecd832b8
Merged-In: I83dbaa24f94f5cca846d6ca71c7e6814ecd832b8
2020-03-16 05:48:10 +00:00
Mark Chien
2f92c8d46c Merge "Change TetheringConstants class to final" 2020-03-16 05:25:40 +00:00
zoey chen
4fdc013e04 [TelephonyMainline] @hide system api since we'll revisit in S. - DataAllowed
Test: make
Bug: 146107006
Change-Id: I62a0249a1462c9e8d71552e2304642eb6bde3eb5
Merged-In: I62a0249a1462c9e8d71552e2304642eb6bde3eb5
2020-03-16 13:14:27 +08:00
Junyu Lai
240f5bb4e9 Merge "[SP21] Address comments for API council review about aosp/1172143" 2020-03-16 02:41:19 +00:00
markchien
070c260a65 Change TetheringConstants class to final
Bug: 151322331
Test: m doc-comment-check-docs
Change-Id: Ia02be3d1d91a08ae4a56b25560ed448c96a693db
2020-03-15 22:54:57 +08:00
Alex Lin
2c3cc82819 Update EuiccService encodeSmdxSubjectAndReasonCode
Update the method signature of encoding subject code and reasoncode
Bug: 149216056
Test: atest EuiccService

Change-Id: Ifb9c1a11f48e191f7d49384946f9fd78d81b84dc
Merged-In: Ifb9c1a11f48e191f7d49384946f9fd78d81b84dc
2020-03-13 18:32:52 -07:00
Alex Lin
4888d9aca2 Rename ErrorCode
Renamed ErrorCode from ERROR_EUICC_GSMA_INSTALL_ERROR to
ERROR_INSTALL_PROFILE, and updated javadocs
Bug: 143107744
Test: atest EuiccManagerTest

Change-Id: I3c2dcd2ff4d3d037997c6fee6278ffd706671d3f
Merged-In: I3c2dcd2ff4d3d037997c6fee6278ffd706671d3f
2020-03-13 18:25:14 -07:00
Alex Lin
e61b636a61 Add public error codes to Euicc public API
Adding public error codes to euicc public API, this will allows the user
to get an general idea of what went wrong when calling the Euicc APIs
Bug: 143107744
Test: atest EuiccService, atest EuiccManager

Change-Id: I427f17e8f28fa4a646a63299a1f63c4c5970a5a0
Merged-In: I427f17e8f28fa4a646a63299a1f63c4c5970a5a0
2020-03-13 18:25:14 -07:00
Daniel Bright
127fd8d6e8 Merge "Rollback SystemApis for Mainline" 2020-03-13 21:36:43 +00:00
Treehugger Robot
f36f5590ac Merge "Rollback @SystemApi on ApnSetting" 2020-03-13 20:58:11 +00:00
Malcolm Chen
de9182c01f Make createLocationInfoSanitizedCopy as @hide.
As we are not shipping Telephony mainline and it's TBD whether
TelephonyRegistry will be part of mainline or not, we change
createLocationInfoSanitizedCopy from @SystemApi back to @hide.

Bug: 148179832
Test: build
Change-Id: I65dea196ab80aec96b6b35edcc0059cefc2f1b43
Merged-In: I65dea196ab80aec96b6b35edcc0059cefc2f1b43
2020-03-13 20:38:16 +00:00
Xiangyu/Malcolm Chen
deb27cc388 Merge "Re-order parameters of setUiccApplicationsEnabled." 2020-03-13 20:38:06 +00:00
Tobias Thierer
9357875fcc Merge "Remove clone() and "implements Cloneable" from android.icu.number.Precision and ScientificNotation" 2020-03-13 19:45:23 +00:00