Commit Graph

4114 Commits

Author SHA1 Message Date
Nathan Harold
0459eb7cdc Remove Support for Deprecated Location Updating
Remove support for location update control that impacts
the services state tracker. This functionality hasn't been
needed in many years, and it has the ability to:
-consume additional battery
-cause ServiceState to be reported incorrectly
-cause the phone to not know about changes to
 the service state (current cell, technology, etc).

Bug: 152648516
Test: compilation - code removal only
Change-Id: I1bf880c037b5c005bdd61a0ff6f5c4000ec2f9be
2020-07-06 13:54:20 -07:00
Nathan Harold
32deda2df3 Add Location Checks on CellLocation#requestLocationUpdate
Update CellLocation#requestLocationUpdate to pass the necessary
information to do soft location permission checks and bill
modem battery usage against the caller of the API.

Bug: 152648516
Test: atest CellLocationTest
Change-Id: Id9e354538953ef93193a937a834e5890e62ecebd
2020-07-06 13:54:15 -07:00
Brad Ebinger
3afcd20f6a Fix MmTelFeatureConnection Memory Leak
In FeatureConnection, we never cleaned up the ImsFeatureStatusCallback
after it was destroyed, leaving zombie FeatureConnections around.

Bug: 156893040
Fixes: 157948894
Test: atest FrameworksTelephonyTests
Merged-In: Idcf8b558c3807a3f9f5094afee532e76ea6f02cb
Change-Id: Idcf8b558c3807a3f9f5094afee532e76ea6f02cb
2020-06-19 10:57:04 -07:00
Amit Mahajan
62120dcc8c Merge "DUT fail to unlock SIM after selecting Home IMSI from STK When unlock SIM pin,SIM begin refresh, and the UiccCardApp was disposed." 2020-05-18 23:38:22 +00:00
Xiangyu/Malcolm Chen
414a71126e Merge "Rename max.active.modems to active_modems.max_count" 2020-05-09 01:30:12 +00:00
Malcolm Chen
b3c815b0e0 Rename max.active.modems to active_modems.max_count
Bug: 154072245
Test: build
Change-Id: Ie1ce63782994db8092128f81d10040e1a2d684ea
2020-05-06 17:50:28 -07:00
Sarah Chin
22b7b5e3d7 Remove constants for DisplayInfo logic from DcTracker
Deprecate carrier configs for connected->not connected timer
Replaced DCT events with displayinfo changed listener

Test: atest NetworkTypeControllerTest, DcTrackerTest
Test: manual verify timer and meteredness works as expected
Bug: 154186364
Change-Id: I22a459e79f509f20c6b38386655c4b49315e3be7
Merged-In: I22a459e79f509f20c6b38386655c4b49315e3be7
2020-04-28 13:53:15 -07:00
Malcolm Chen
edaa0b780f Add a @hide API to indicate 5G and DSDS conflict.
Bug: 152786064
Test: build and manual
Change-Id: I79a8fda5b70a31acc365ebcbb03b73b20d2443fd
Merged-In: I79a8fda5b70a31acc365ebcbb03b73b20d2443fd
2020-04-27 18:27:16 -07:00
Jack Yu
4584d589bd Only setup data when config and sim is ready
SIM needs to be fully loaded before we can setup
data connection because APN slection requires
MCC/MNC on the SIM. Also lots of data related configs
are stored in carrier config. Both needs to be ready
before we can setup a data connection (except for
emergency APN).

Bug: 152816633
Test: Manual + unit tests

Merged-In: I69c7838bdd9751bef4c15e9504519b55afb9fefb
Change-Id: I69c7838bdd9751bef4c15e9504519b55afb9fefb
(cherry picked from commit 38de77534a)
2020-04-24 20:48:41 -07:00
Jordan Liu
6f76a035be Merge "Implement equals and hashCode" 2020-04-24 19:31:51 +00:00
Jordan Liu
aaff63781a Implement equals and hashCode
This keeps SmsHeader in sync with cellbroadcastservice.SmsHeader.

Bug: 148482334
Test: builds
Change-Id: I2a3188a603595e4c97acf6413036dcddf35c0b87
Merged-In: : I2a3188a603595e4c97acf6413036dcddf35c0b87
2020-04-23 15:26:31 -07:00
Jack Yu
7d7adf75e0 Get rid of SIM record access in DcTracker
DcTracker uses several SIM related signals for different purposes.
Those signals include SIM record loaded/not-loaded, subscription
changed event, and carrier config changed event. Those signals
are slightly different but not that really important to DcTracker.
What DcTracker cares is
1. Whether SIM is inserted or not.
2. Whether configuration changes or not.

By listening to a single carrier config change event can handle
the cases above.

Removed all SIM record related places in DcTracker. SIM record should
not be accessed by anyone outside of UICC controller.

Test: Manual test + unit tests
Bug: 146168348
Merged-In: Iad45933ea77eb460625a891071535cbeaf8ac3b0
Change-Id: Iad45933ea77eb460625a891071535cbeaf8ac3b0
(cherry picked from commit df3001b935)
2020-04-19 00:25:09 -07:00
vivi.li
cabb1d4761 DUT fail to unlock SIM after selecting Home IMSI from STK When unlock SIM pin,SIM begin refresh,
and the UiccCardApp was disposed.

But the unlock process was canceled. Therefore,
the previous unlocking process was interrupted without returning,
and the keyguard PIN lock View was always displayed.
If UiccCardApp was disposed,send the CommandException.Error.ABORTED as result for the previous Message.

Test: manual
Bug:140907125

Change-Id: I61f63136cb8638566f612a0a459adb398294527f
2020-04-07 11:47:12 +08:00
Treehugger Robot
d72172d5de Merge "Use an original text for next force 7bit encoding" 2020-04-07 02:32:15 +00:00
Taesu Lee
6568f8f20a Use an original text for next force 7bit encoding
If config_sms_force_7bit_encoding is true, an original text will be
translated based on 7-bit ASCII table for CDMA. But if the translated
text can not be encoded as single-part SMS, the original text should be
used for next try instead and it will be translated based on GSM 7-bit
alphabet for ENCODING_GSM_7BIT_ALPHABET.

Bug: 151061215
Test: Manual

Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
Change-Id: I679786b96d19c6f3f30ec3e2037221110f5d3f84
2020-04-03 10:35:55 +09:00
Nazish Tabassum
a87844ab87 SIM De-personalization
Added constant support to framework for sim deperso

Test: make
Bug: 69389695
Merged-In: Ia7b9ca82570c1c9a9fed945d687e4bec4e87b3a1
Change-Id: I4b11e63b9d2bb9c59c79462c2a74706a572e7d35
(cherry picked from commit 64056e1262)
2020-04-02 13:52:55 -07:00
Sarah Chin
e55ef62c83 Add constants for NR_NSA, NR_NSA_MMWAVE
Used for LCE estimates

Test: build
Bug: 149864873
Change-Id: I0faed300c3a2640ef6675ed7497575fe4f364b2c
Merged-In: I0faed300c3a2640ef6675ed7497575fe4f364b2c
2020-03-31 12:27:09 -07:00
Brad Ebinger
ee30a546d6 Merge "API fix: Rename and clarify ProvisioningManager constants" 2020-03-23 16:19:36 +00:00
Philip P. Moltmann
b36bcc882a Pipe through attributeTag for one SMS permission check
Bug: 136595429
Test: TH
Change-Id: I99635efd0da5e72c3df9c6383779a059bbe3c1d1
Merged-In: I346ac2d3acad0e0d18b298f89f0b96324fc52333
2020-03-20 00:28:09 +00:00
Philip P. Moltmann
9ed7e7f1b1 Merge "Pipe through attributeTag for one self-permission check" 2020-03-19 19:41:17 +00:00
Philip P. Moltmann
a345428817 Pipe through attributeTag for one self-permission check
... Also remove unused aidl methods.

Bug: 136595429
Test: TH
Change-Id: I37bf62a83c1043acdc878f747ef85d719766f991
2020-03-18 18:16:22 -07:00
Rambo Wang
ca33ed2d7e Introduce a new RIL request constant to support getBarringInfo.
Bug: 148981484
Test: make
Merged-In: I05e0abe29f6d8c5796c777fd83d76e398e35b6b1
Change-Id: I05e0abe29f6d8c5796c777fd83d76e398e35b6b1
(cherry picked from commit 284118f9e0)
2020-03-18 09:52:24 -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
Brad Ebinger
f0fc4b5ab0 API fix: Rename and clarify ProvisioningManager constants
Fixes: 148515237
Fixes: 151173009
Test: atest CtsTelephonyTestCases; atest FrameworksTelephonyTests
Merged-In: I633ad3270f8b7d047c3522a420746b668000d078
Change-Id: I633ad3270f8b7d047c3522a420746b668000d078
2020-03-12 17:04:49 -07:00
Jack Yu
0ce205791c Removed permission check
Removed permission check for getNetworkCountryIso and made it public.
This API was added since the first version of Android. Removed the
permission check for backward compatibility reason.

Test: Telephony sanity tests
Bug: 149872821
Merged-In: I68833fdf6f078d69bc8c2e5f01cf4e058d6d7093
Change-Id: I68833fdf6f078d69bc8c2e5f01cf4e058d6d7093
(cherry picked from commit 0b9a12c2c4)
2020-03-11 20:59:31 -07:00
Shuo Qian
c3e4dd3799 Merge "API Council Feedback - Override EmergencyNumberDB File API" 2020-03-11 19:24:51 +00:00
sqian
a1c74497cd API Council Feedback - Override EmergencyNumberDB File API
Use ParcelFileDescriptor; Introduce Reset API

Test: atest TelephonyHostTest#testEmergencyNumberDb
Bug: 147805285
Change-Id: I7a7733c02874c0f17fef8c91b9e543c8e803f504
Merged-In: I7a7733c02874c0f17fef8c91b9e543c8e803f504
(cherry picked from commit 75c49ab334)
2020-03-10 22:13:46 +00:00
Shuo Qian
7618c552e6 Remove hidden setRadioIndicationUpdateMode in TelephonyManager
We need to remove the previous hacky hidden API
 setRadioIndicationUpdateMode and its implementation in Telephony.
 This is an hidden API that affects power cost. We should remove it
 to prevent potential users to use it unexpectedly (e.g. in reflection)

Test: Manual by making a call
Bug: 148544396
Change-Id: I0bce99b5363392bbaf9cf76dad8c1b47a138fd19
Merged-In: I0bce99b5363392bbaf9cf76dad8c1b47a138fd19
(cherry picked from commit 4b779449d7)
2020-03-10 21:43:00 +00:00
Hall Liu
57948adee3 Merge changes from topic "sys-selection-chan"
* changes:
  Split setSystemSelectionChannels
  Add setSystemSelectionChannels API
2020-03-09 20:00:40 +00:00
Hall Liu
1276af44e9 Add setSystemSelectionChannels API
Add setSystemSelectionChannels as a SystemApi, connecting to the
identically-named HAL method.

Fixes: 144595103
Test: manual through the testapp, atest TelephonyManagerTest
Change-Id: I52ff09258af772e272937dd137813d0d63c50cb5
Merged-In: I52ff09258af772e272937dd137813d0d63c50cb5
2020-03-06 14:19:07 -08:00
Sarah Chin
f5d9be9323 Carrier config for 5G up/down bandwidth and LTE for NSA
Add default values for 5g upstream/downstream bandwidth
Update default values on NR frequency changed
Config to use LTE values for upstream and 5G for downstream on NSA
Resource overlay for modem predictive/instantaneous bandwidth estimates

Test: atest FrameworksTelephonyTests
Bug: 149032132
Bug: 149032474
Bug: 149032786
Change-Id: I70e95e98c871ba3fdc2e94de9504eafe247619c9
Merged-In: I70e95e98c871ba3fdc2e94de9504eafe247619c9
2020-03-03 11:53:11 -08:00
Treehugger Robot
967a468a78 Merge "Change createFromNativeSmsSubmitPdu for API review" 2020-03-03 18:06:12 +00:00
Daniel Bright
03c3d36ce8 Merge "Rewriting phone constants for mainline" 2020-03-02 20:31:24 +00:00
Daniel Bright
941ff72b3b Merge "Make string version of APN_TYPEs a @SystemApi" 2020-03-02 19:13:48 +00:00
Zongheng Wang
5b0e5bbffc Change createFromNativeSmsSubmitPdu for API review
* Change it into a public API
* Rename method to createSmsSubmitPdu
* Add maxTargetSdk to createFromEfRecord()’s UnsupportedAppUsage

Bug: 149697039
Test: compile
Change-Id: I067deb1063891e81bee96281d87a6319d6f72bf1
2020-03-02 19:02:16 +00:00
Daniel Bright
71206ec925 Make string version of APN_TYPEs a @SystemApi
The string version of Apn Types are used in the carrier config table.
Modules besides Telephony uses this table directly and so it made sense to expose
this as a @SystemApi

Test: ApnSettingsTest
Bug: 147465477
Merged-In: I1c344b3ff482d973b8bf51a33956a7f90f291634
Change-Id: I1c344b3ff482d973b8bf51a33956a7f90f291634
2020-02-27 14:27:14 -08:00
Daniel Bright
0b5d2852b3 Rewriting phone constants for mainline
* Exposing Emergency extra constants through TelephonyManager
* Always reading or writing PhoneConstants.SubscriptionKey
with SubscriptionManager.EXTRA_SUBSCRIPTION_KEY

Bug: 147465477
Test: FrameworksCoreTests, FrameworksServicesTest, CarrierTests
Merged-In: I84d6687ca6cab86c8c68dc2dd2679cfee0919c1e
Change-Id: Ic02e02a4b1ac989a974938dc87118a6f7c926e9e
2020-02-27 11:26:11 -08:00
Sarah Chin
64050ff818 Revert "Modify PhoneCapabilities for device capabilities"
This reverts commit e8b7635634.

Reason for revert: Change not supported by vendor

Bug: 149522248
Bug: 143238237
Change-Id: Iaf9eb6493b937545ba5f046912fc023887e7b566
Merged-In: I17315f5b99ad7c5a5a6d88ed21a825301fa8e5e5
2020-02-25 11:09:02 -08:00
Tyler Gunn
12f7f43ec8 Merge "IMS: Add support for IMS Explicit call transfer" 2020-02-19 18:55:20 +00:00
Junyu Lai
7e0dbc53e3 Merge "[SP15] Remove unused getVtDataUsage in TelephonyMananger" 2020-02-19 01:10:38 +00:00
Taesu Lee
c8ec731663 Use month in the range 1-12 for 3GPP2 SMS Time Stamp instead
Zero-based month is not needed anymore since android.text.format.Time is
replaced with LocalDateTime. For the safety, just rename "month" to
"monthOrdinal" in the range 1-12.

Bug: 146021623
Test: atest CdmaSmsTest

Change-Id: I0eb5bad9b3701217a6e4f44bfcd76013576d79d5
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2020-02-17 17:55:25 +09:00
junyulai
9cd0ea1767 [SP15] Remove unused getVtDataUsage in TelephonyMananger
Test: atest FrameworkTelephonyTests
Bug: 143923500
Change-Id: I31b7041dc2591b354200da5637496f071fc4aa9f
2020-02-14 16:31:41 +08:00
Ravi Paluri
f4b38e7ff1 IMS: Add support for IMS Explicit call transfer
Test: Manual
Bug: 62170207
Change-Id: I06a256adb0e1910d40809c91bcdd42c56a142842
2020-02-14 11:02:09 +05:30
zoey chen
183d505f90 [Settings] To avoid use APIs in IccCard directly, moving APIs into TelephonyManager.
IccCard#changeIccLockPassword
IccCard#setIccLockEnabled
IccCard#getIccLockEnabled
Bug: 146983487
Test: manual

Change-Id: I1a3c3b15063ea00d0ca59bd5395f2bca8cdfe391
Merged-In: I1a3c3b15063ea00d0ca59bd5395f2bca8cdfe391
2020-02-06 20:32:10 +08:00
Xiangyu/Malcolm Chen
53ae130d31 Merge "Move ACTION_CARRIER_* intent and extras from TelephonyIntents to TelephonyManager." 2020-02-05 23:31:51 +00:00
Jiashen Wang
e37c8d26c2 Merge "Add isEuiccSupportedCountry system API to EuiccManager" 2020-02-05 22:14:06 +00:00
Malcolm Chen
d1a3b37bb9 Move ACTION_CARRIER_* intent and extras from TelephonyIntents to
TelephonyManager.

The purpose is to expose them as @SystemApi as they are used externally.

Bug: 140908357
Test: unittest
Change-Id: I3dabcb853ebbd648b20d97b446db11476780be25
Merged-In: I3dabcb853ebbd648b20d97b446db11476780be25
2020-02-04 23:28:22 +00:00
Jack Yu
de1fa3078c Merge "Move GsmSmsCbMessage to CBReceiver test app" 2020-02-04 17:04:11 +00:00
Jordan Liu
4583717145 Move GsmSmsCbMessage to CBReceiver test app
After removing platform handling of cell broadcasts (in favor of
CellBroadcastService module) the GsmSmsCbMessage class is only used by
CellBroadcastReceiver test app, so move the class there.

Bug: 135956699
Test: manual
Merged-In: Ia1d19356c34f9a13638c10d1c1b9e53c6b69fddd
Change-Id: Ia1d19356c34f9a13638c10d1c1b9e53c6b69fddd
(cherry picked from commit 803c885513)
2020-02-03 22:45:46 -08:00
changbetty
0ae6355421 [Mainline] Move the setAlwaysAllowMmsData from SubscriptionManager to TelephonyManager
Bug: 146309719
Test: make
Change-Id: Ibb68cd4e6a6ba49c56b313380ddf16734813459b
Merged-In: Ibb68cd4e6a6ba49c56b313380ddf16734813459b
2020-02-03 19:47:22 +08:00