NetworkStack.getService was introduced to avoid relying on
Context#getSystemService to obtain the NetworkStack binder token.
To allow it to be mocked in tests, a method is introduced to allow tests
to specify a mock NetworkStack token for their own process.
Test: atest NetworkStackTests, using the change
Bug: 151243982
(clean cherry-pick from internal branch)
Merged-In: I04058a007f2dfe1044cabeb3ac508404873665ad
Change-Id: I0e626d871176112a8575d629a05cb7a935b577a6
Instead, have a dedicated method in android.net.NetworkStack allowing to
fetch the stable AIDL token for the service.
This avoids returning IBinder from getSystemService, as getSystemService
should generally return manager classes.
Test: atest FrameworksNetTests NetworkStackTests
Fixes: 151243982
Merged-In: I58a6e1f27aff052050197d1901f43a98d7aa1167
(clean cherry-pick from internal branch)
Change-Id: I75aba269595f3e315dd5e0693c878b2026e8e299
Hide some APIs that were previously marked as @UnsupportedAppUsage and re-add annotation as changing the permissions for these SystemApis would break the unsupported app contract that was previously there. Therefore, we're choosing to hide them until we have a good story on how to deal with them next release.
Bug: 148689314
Test: Manual
Merged-In: I33ee2c7ccd3827db3d23d6447cf82d9ffc36836a
Change-Id: I33ee2c7ccd3827db3d23d6447cf82d9ffc36836a
1) If the vendor does not specify an ImsReasonInfo, create an
unspecified ImsReasonInfo instead of passing null back.
2) Move onUnregistered to @NonNull
Fixes: 150008589
Test: atest CtsTelephonyTestCases:ImsServiceTest
Merged-In: Idd0f2216bdd55011cb16d268b61cb652ca11bd41
Change-Id: Idd0f2216bdd55011cb16d268b61cb652ca11bd41
To conform with API council guidelines, convert the
getBands() function to store and return an array of
int[] rather than a List<Integer> to avoid autoboxing.
Also:
-Add bands to hashCode() and equals() for CellIdentityLte
-Add EARFCN to hashCode() for CellIdentityLte
Bug: 150399894
Test: atest FrameworksTelephonyTests
Merged-In: I7edd5896b48794cd9c291788c28420ce40898f77
Change-Id: I7edd5896b48794cd9c291788c28420ce40898f77
(cherry picked from commit 9d722a0c7f1c1975ddb1a1f229eb5c2b08167d17)
This reverts commit dd066606452043c2f70288ac489d94334c7ca45b.
Reason for revert: Remove mainline API for R
Test: build
Bug: 148174114
Change-Id: I8a8cddfd1d824c908c49f818f2671941b4bb5dca
Merged-In: I712958984254ca6f16a9604d2aab532500dc1ca9
These APIs were exposed for mainline since they were used in SysUI code,
but the logic that was using them was moved to Telephony. Unexposing the
APIs since they no longer need to be exposed.
Test: atest FrameworksTelephonyTests
Bug: 147447171
Bug: 111498835
Bug: 149874525
Change-Id: I1930977c5345c075773d18db4eb05913038d7e7f
Merged-In: I1930977c5345c075773d18db4eb05913038d7e7f
Hide API that is only used by telephony registry.
Test: Telephony sanity tests
Bug: 149850449
Merged-In: Ie4c46de336097fb7231291f15048329aea0b639c
Change-Id: Ie4c46de336097fb7231291f15048329aea0b639c
(cherry picked from commit f0df0ba2ba735b6c484d3e752c20650d3c222bf1)
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
Set support is a little weird in Java and Android.
Java doesn't support ArraySet, but Android does; Parcel
has both read/write for ArraySet, but they are @hide. Thus,
my options were limited to:
-use the hidden parcel methods
-convert between list and set in the constructor and parcel code
-convert between list and set in the getter
-maintain parallel data structures.
Using the hidden methods seemed cleanest. Since they are
@UnsupportedAppUsage they can't be credibly removed.
In addition, the HAL code doesn't understand Set<> only List<> so
I was faced with the choice of having 2 constructors or using
Collection<>, which actually works just fine and avoids changing
a hundred or so unit tests with no ill effect.
Bug: 149476549
Test: atest FrameworksTelephonyTests
Test: (cts) atest CellInfoTest
Merged-In: I9dfa5f59512f3d1305187cc383c4069ceaaf27fd
Change-Id: I9dfa5f59512f3d1305187cc383c4069ceaaf27fd
(cherry picked from commit 5522de1af3bd875cfb4aa584e275ff148e95eb1f)
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
* 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
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 2fb0bc50f93a728c52dd729ba28005ba1061b2b3)
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 2b14af22daf38449c29ed0bfe2e619e991737581)
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 a61992b67adf0180a073da5820826c27fd8d5e88)
NetworkCapabilities#mAdministratorUids is used to track the UIDs that
are administrators of the given Network. This value was previously
stored as List<Integer>. However, general Android API Council guidelines
recommend using Arrays for primitive values. In order to be consistent
with the guidelines, updating the field to use an Array.
Bug: 147903575
Test: atest FrameworksNetTests
Change-Id: I2652a5b0f276b8944454af5cb4b1383a3e054cfa
Merged-In: I2652a5b0f276b8944454af5cb4b1383a3e054cfa
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
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 40cd94dde08cc2d9184baf75422534dd9003a6b9)
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 d5b9cc737b8b89de303a1ce90f2a1e398658773f)
-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