Commit Graph

2950 Commits

Author SHA1 Message Date
Hall Liu
bb2ce1010e Merge "Fix MbmsDownloadSession documentation" 2018-05-31 21:16:05 +00:00
Hall Liu
7cdacd3c30 Fix MbmsDownloadSession documentation
Fix the TODO from forever ago and update the docs for the listener
registration methods.

Change-Id: I1276d0afe430e1b50c0af1fdfacb12a89ea5aa38
Fixes: 80493663
Test: None, comments only
2018-05-31 11:40:11 -07:00
Omkar Kolangade
275b1358eb IMS: Support for Implicit Call Rejection
Adding an API in MmTelFeature to allow IMS
Service to report the reasons for implicit
call rejections by lower layers. Corresponding
ImsReasonInfo codes are also being added.

The call rejections are not related to any
call session or a call that Framework is aware
of.

Change-Id: Ie47a239856db21e84d199a7620edf7b6ceeb81bc
2018-05-31 01:37:47 +00:00
Tyler Gunn
b1b864cee2 Merge "Require READ_CALL_LOG permission to see phone numbers in phone state." 2018-05-19 00:13:15 +00:00
Tyler Gunn
84dad9565f Require READ_CALL_LOG permission to see phone numbers in phone state.
Incoming and outgoing call phone numbers are visible in the phone state
broadcast and via the PhoneStateListener.  To enhance user privacy, change
to require the READ_CALL_LOG permission in order to receive the call
phone numbers.

This means to see phone numbers:
1. android.intent.action.PHONE_STATE - requires READ_PHONE_STATE and
READ_CALL_LOG permission.
2. PhoneStateListener#onCallStateChanged - now required READ_CALL_LOG
permission.

To support this new behavior, added sendBroadcastAsUserMultiplePermissions
method to context to allow sending the broadcast to all users while
requiring the two permissions.

Bug: 78650469
Test: Created PHONE_STATE broadcast receiver in test app and verified that
when no permissions are granted, the phone number is empty for incoming
and outgoing calls.
Test: Granted Phone state permission to test app and verified that phone
number is not populated.
Test: Granted test app read call log permission and verified that phone
number is populated.
Test: Created PhoneStateListener in test app and verified that when no
permissions are granted, phone number is empty for incoming and outgoing.
calls.
Test: Granted read call log permission to test app and verified that both
the incoming and outgoing numbers are populated.

Change-Id: I857ea00cc58a0abbb77960643f361dd6dd9c8b56
2018-05-18 14:37:43 -07:00
Xiangyu/Malcolm Chen
54bd56d6c5 Merge "Add carrier config for partial sms raw message expiration." 2018-05-18 21:05:55 +00:00
Xiangyu/Malcolm Chen
147dc32b0b Merge "Fix UiccSlotInfo equals method." 2018-05-18 21:05:43 +00:00
Malcolm Chen
b668535a69 Add carrier config for partial sms raw message expiration.
Everytime at boot-up, we check Sms raw table, and delete the rows
with any partial message that is too old. By default the expiration
age is 30 days, but we want to make it configurable.

Bug: 77910620
Test: sanity-test
Change-Id: Ibd2374324be5513cbd09c04889e7b96051c26fb4
Merged-In: Ibd2374324be5513cbd09c04889e7b96051c26fb4
2018-05-17 16:49:12 -07:00
Malcolm Chen
9fd71f8ec5 Fix UiccSlotInfo equals method.
In UiccSlotInfo#equals method, it's comparing Strings incorrectly.

Bug: 78033760
Test: GTS test
Change-Id: I4fed0a70ee0ef06bcf7a1af544e6aebced31d9c2
Merged-In: I4fed0a70ee0ef06bcf7a1af544e6aebced31d9c2
2018-05-17 16:30:32 -07:00
Nathan Harold
c50d40aa9f Add toString() method to PhysicalChannelConfig
We need to be able to print the PhysicalChannelConfig
for debugging/dumping, so adding a toString() method
to print in a format that we can easily digest and
is consistent with other Telephony log formatting.

Bug: 78791811
Test: manual / TelephonyDebugMenu
Merged-In: Ieb12f78a821369072ca9f03d28b28759836f84b4
Change-Id: Ieb12f78a821369072ca9f03d28b28759836f84b4
(cherry picked from commit 2636dd435a)
2018-05-17 11:48:53 -07:00
Xiangyu/Malcolm Chen
272769c41a Merge "Unhide constructors of DataService and NetworkService." 2018-05-15 18:54:50 +00:00
Malcolm Chen
1d7e446f6e Unhide constructors of DataService and NetworkService.
DataService and NetworkService are System level classes. We shouldn't
hide their constructors otherwise their System level sub-class
can't be instantiated properly.

Test: gts
Bug: 77531655
Change-Id: I1a58b4857dbcf939ac124e20eb0a801ad5a9b597
Merged-In: I1a58b4857dbcf939ac124e20eb0a801ad5a9b597
2018-05-14 23:27:42 +00:00
Jordan Liu
cdb29f97db Merge "Add Carriers.APN_SET_ID and NO_SET_SET" 2018-05-11 15:57:16 +00:00
Jordan Liu
b11cbb9e2e Merge "Update getIccAuthentication documentation" 2018-05-10 22:56:27 +00:00
Jordan Liu
09e4dc0464 Add Carriers.APN_SET_ID and NO_SET_SET
Add them as hidden for now.

Bug: 70172263
Test: TelephonyProviderTest#testApnSetId
Change-Id: Id16dd5631d327f403a7347b72ecfb27a5e298541
Merged-In: Id16dd5631d327f403a7347b72ecfb27a5e298541
2018-05-10 14:36:38 -07:00
Jordan Liu
b65284004f Update getIccAuthentication documentation
Explain what it means if the function returns null. This is based on the
spec at TS 31.102 section 7.3.1.

Bug: 74392381
Test: manual
Change-Id: Ic84d94589431109079a866027953ab9dbef103b8
Merged-In: Ic84d94589431109079a866027953ab9dbef103b8
2018-05-10 14:19:09 -07:00
sqian
c6aadb6e31 Enhance adding subscription logs
Bug: 79428110
Test: Manual
Change-Id: Ie77128f447ad0628336b2af38344d2d7a07f1eab
Merged-In: Ie77128f447ad0628336b2af38344d2d7a07f1eab
(cherry picked from commit a77d9d7f2a)
2018-05-10 11:58:15 -07:00
Shuo Qian
093ade312d Merge "Restore the OEM hook implementation and usage" 2018-04-27 18:39:20 +00:00
Shuo Qian
1c11e207af Restore the OEM hook implementation and usage
The current plan is to keep the OEM hook implementation in the framework
, this is for legacy device and old device upgrading (per b/78098059).

For P launching device, the OEM hook service is removed in hal, so the 
OEM hook api in framework should return something dummy, and prevent 
infinite loop to get service, but these parts should be done in seperate
CLs after this restore CL is merged.

This reverts commit f09bde2809.

Bug: 34344851
Change-Id: I2aea9be9aa7cecd4f7a1f1783391f0af173bfc59
Test: pass Treehugger tests; pass cuttlefish test RilE2eTests

Merged-In: I1f2117331a7f846b192c5f956f3841d58cb8154b
2018-04-27 01:27:54 +00:00
Shuo Qian
b686b9cf6d Merge "Revert "Revert "Remove the OEM hook implementation and usage""" 2018-04-25 19:31:54 +00:00
Shuo Qian
f09bde2809 Revert "Revert "Remove the OEM hook implementation and usage""
This reverts commit 00b89515a5.

Change-Id: I61c5d47fabf760bfefe843fb7a31f0a481c94c50

Merged-In: Icb06aea5eb42fd156a967c4d4e39aefc51d91cf4
2018-04-25 01:59:53 +00:00
Treehugger Robot
8252157aca Merge "Fixed the document of getNetworkCountryIso" 2018-04-24 23:02:38 +00:00
Treehugger Robot
238eaf5183 Merge "Further Clarify Scope of KEY_CARRIER_NAME_OVERRIDE" 2018-04-24 03:56:40 +00:00
Jack Yu
78e352f1e2 Fixed the document of getNetworkCountryIso
Test: Build
Bug: 64335394
Change-Id: Ic8fc41380e15a40f9498c990b0074571cdffd018
2018-04-23 13:41:25 -07:00
Jack Yu
d33f8a1e91 Set country code even when device is not registered on network
Extends the functionality of getNetworkCountryIso to support
no SIM/no service case. When no SIM/no service, it returns
the country code of nearby network (unregistered but cell info
is available to the device).

Test: Manual
Bug: 64335394
Merged-In: Ia32cbc9df9b9adf5d7c24c8b90be20063a94a514
Change-Id: Ia32cbc9df9b9adf5d7c24c8b90be20063a94a514
(cherry picked from commit ac36896f1a)
2018-04-22 14:19:59 -07:00
Cassie Han
122a7b33ad Merge "Cherry-pick 'Fix a tiny bug in NetworkScanRequest'" 2018-04-19 19:23:58 +00:00
Cassie
91c5dc9a6a Cherry-pick 'Fix a tiny bug in NetworkScanRequest'
Bug: 77487847
Test: cts-tradefed run cts -m CtsCarrierApiTestCases --test android.carrierapi.cts.NetworkScanApiTest
Change-Id: Ic4b167cf4929a1bb86fa7e6768672a9288b96911
Merged-In: Ic4b167cf4929a1bb86fa7e6768672a9288b96911
2018-04-18 21:02:02 +00:00
sqian
00b89515a5 Revert "Remove the OEM hook implementation and usage"
This reverts commit 2635a89c8c.

Bug: 34344851
Change-Id: I96697165fd75054de42f007c16ca294ed6725708
2018-04-17 11:55:30 -07:00
Nathan Harold
fb6daf7cf7 Further Clarify Scope of KEY_CARRIER_NAME_OVERRIDE
There is still confusion about the scope of the
KEY_CARRIER_NAME_OVERRIDE. This CL further clarifies
that the carrier, for purposes of this string, is the
service provider. Thus, the CARRIER_NAME_OVERRIDE will
still be subject to SPN display rules.

Note: to use this override in scenarios such as roaming
where the display rules may not choose the name of the
home operator (and thus not choose this override), a
service provider may choose to use other flags such as
KEY_FORCE_HOME_NETWORK_BOOL and
KEY_SPN_DISPLAY_RULE_USE_ROAMING_FROM_SERVICE_STATE_BOOL
to achieve the desired display behavior.

Bug: 77461054
Test: none (docstring-only change)
Merged-In: Id866df7ef9ce593de1f9d31d2556af4bfc766a8e
Change-Id: Id866df7ef9ce593de1f9d31d2556af4bfc766a8e
(cherry picked from commit 178020a2f8)
2018-04-16 13:53:50 -07:00
fionaxu
780b62b3b5 A test api to override carrier information
This API should only be used for testing purpose e.g., CTS/GTS/SL4A
By overriding carrier information, we could force a particular carrier id,
carrier's config, but also any country or carrier overlays to be loaded
when using a test SIM with a call box.

Bug: 72332597
Test: atest CtsTelephonyTestCases:CarrierIdentificationTest

Change-Id: Icd5804375ef9334c9f6c382cc6a774b9c9c15213
(cherry picked from commit 5b509b81a0)
Merged-in: 5b509b81a0
2018-04-12 22:19:15 +00:00
Hall Liu
bd6bf7cbe8 Merge "Make setServiceId a TestApi" 2018-04-12 20:41:44 +00:00
Hall Liu
beb880f724 Make setServiceId a TestApi
Bug: 77152869
Test: CTS
Change-Id: I26f60b48865953971de02c50db48e0ff66f4e2a0
Merged-In: I26f60b48865953971de02c50db48e0ff66f4e2a0
2018-04-11 18:23:30 -07:00
fionaxu
4801a078cd Change getGroupIdLevel1() to use subId from TelephonyManager Instance
Bug: 77905912
Test: Build
Change-Id: I720971ce115147b994e27611a0dcf052989180ec
(cherry picked from commit 272e8cf87e)
Merged-in: 272e8cf87e
2018-04-11 18:10:12 -07:00
Jayachandran C
7957147bbe Correct the value of RESOURCES_UNAVAILABLE_OR_UNSPECIFIED
Test: Build
Bug: 77657541
Change-Id: Ia6b576c222776cbc7e54e15cb54e39775e76ea56
2018-04-06 01:10:38 -07:00
fionaxu
b877688ca2 throw runtimeException for applicable TM APIs
1. This CL revert some API change from ag/3710629.
2. throw runtime exception when running in a non-1000 UID.
3. throw for methods that persist some sort of state and readers could continue to
return placeholder values.
4. for rest of TelephonyManager API cleanup b/74401420.

Bug: 74016743
Test: Build
Change-Id: I2846efc11eebce4a923762f56f09daaf37c44763
(cherry picked from commit f20f0d916f)
Merged-in: I2846efc11eebce4a923762f56f09daaf37c44763
2018-04-04 01:38:55 +00:00
Pankaj Kanwar
644d5ea61c Merge "Address IMSI privacy issues." 2018-04-03 16:05:51 +00:00
pkanwar
26509cda7e Address IMSI privacy issues.
Added method resetCarrierKeysForImsiEncryption
to allow for keys to be reset.

Bug: 35606429
Test: manual
Change-Id: Id2e92917b50fa2163b2bab112df6e80b5e9c5795
Merged-In: Id2e92917b50fa2163b2bab112df6e80b5e9c5795
2018-04-03 00:26:27 +00:00
Xiangyu/Malcolm Chen
9bbfe5c14c Merge "Adding debug message inside NetworkServiceCallback." 2018-04-02 18:43:01 +00:00
Hall Liu
feb60e0864 Merge "Make changes to MBMS API following recs" 2018-03-31 00:28:06 +00:00
Malcolm Chen
4514425612 Adding debug message inside NetworkServiceCallback.
Adding debug message inside NetworkServiceCallback when mCallback
is null.

Bug: 76392715
Test: existing test
Change-Id: Icd27d4082e1e4b60efe65abfff99c4165717fd4a
Merged-In: Icd27d4082e1e4b60efe65abfff99c4165717fd4a
2018-03-31 00:06:14 +00:00
Hall Liu
17449f95dd Make changes to MBMS API following recs
* Change all error handling logic to return an error code via the async
callback
* Add an UNKNOWN code for errors for future backwards compatibility, and
prohibit the middleware from sending this code.
* Add IntDef for errors through the async callback
* Amend documentation for download()
* Implement support for arranging downloaded files into a hierarchy
following that of the server.

Change-Id: I4d5c8f6229b216d9aa84397e628e62279033cc74
Fixes: 76449215
Test: CTS
2018-03-30 14:42:24 -07:00
Treehugger Robot
b57de56276 Merge "Move alpha long/short to the base CellIdentity according API Review." 2018-03-29 16:45:52 +00:00
Cassie
ae2b65a95a Move alpha long/short to the base CellIdentity according API Review.
Bug: 74831568
Test: Telephony sanity
Change-Id: I0ef69e3f18fca111191e1c6329ae13c0860869ba
Merged-In: I0ef69e3f18fca111191e1c6329ae13c0860869ba
2018-03-28 22:28:33 +00:00
Hall Liu
de57d0d024 Merge "Add additional logging for EMBMS edge cases" 2018-03-28 22:25:44 +00:00
Holly Jiuyu Sun
18e47b6108 Merge "Address comments from API Review." 2018-03-28 21:56:40 +00:00
Treehugger Robot
8d8921d7fc Merge "Clean new TelephonyManager API." 2018-03-28 18:40:17 +00:00
Brad Ebinger
7a5653599c Merge "Parse SMS locally upon error to get message ref" 2018-03-28 16:59:41 +00:00
Holly Jiuyu Sun
84dca72d92 Address comments from API Review.
Bug: 74975825
Bug: 74976716
Bug: 74976875
Test: test on phone
Merged-In: I5417e5dd95c75fd3fd9fa98d7559511bd0fcd8a0
Change-Id: I5417e5dd95c75fd3fd9fa98d7559511bd0fcd8a0
2018-03-27 21:38:47 -07:00
Malcolm Chen
233126ddc3 Clean new TelephonyManager API.
This is to apply API council's review opinion on a previous commit.

We are reverting previous change, which renamed isDataEnabled and
setDataEnabled to isUserMobileDataEnabled and setUserMobileDataEnabled.
So this commit will remove the new APIs isUserMobileDataEnabled and
setUserMobileDataEnabled, and also rename hidden API isMobileDataEnabled
to isDataCapable.

Bug: 71584593
Test: unittest
Change-Id: I84d65776874e7a7f6e3a9af9ff7ec7dcbd715c2c
2018-03-27 15:50:11 -07:00
Brad Ebinger
576e04053f Parse SMS locally upon error to get message ref
Parse the SMS locally to get the message ref when
onSmsReceived fails due to the platform being
unavailable. This allows the correct message ref
to be sent back via acknowledgeSms, instead of
the incorrect "0" value.

Bug: 74551838
Test: Manual
Merged-In: I3b75da909f1f07125c5696f7f9e525736732f3c1
Change-Id: I2f8128d8ff4e07bb3720a344cee70fa5fd5d7535
2018-03-27 21:19:43 +00:00