Commit Graph

4233 Commits

Author SHA1 Message Date
Jack Yu
f05919ab76 Stop exposing reasons through phone state listener
The data connection reasons are implementation details
of telephony and should not be exposed externally. The
data connection fail cause, which is different from
reasons, are still available.

Test: Telephony sanity tests + unit tests
Bug: 73659459

Merged-In: Ia005abf19664e6213118ee932495950af118456d
Change-Id: Ia005abf19664e6213118ee932495950af118456d
(cherry picked from commit 4d1c945000)
2019-01-07 06:39:38 +00:00
Sahin Caliskan
7ec9e6849e Merge "Implement RcsThread querying (base)" 2019-01-05 21:19:09 +00:00
Nathan Harold
3ada51469a Merge "Fix WCDMA Level Calculation for Default CC" 2019-01-05 01:25:14 +00:00
Sahin Caliskan
424945e010 Implement RcsThread querying (base)
This change does a first pass to introduce RcsThread querying. We can
now insert threads and query them back.

Test: Added unit test

Bug: 109759350
Change-Id: Ib116cd533a19ce4d099864a095f585ac47cdc9f6
2019-01-04 23:53:58 +00:00
Nathan Harold
549c3ba3b5 Fix WCDMA Level Calculation for Default CC
The default carrier config was setting the level
calculation method to an empty string, which caused
the level to be set forcibly to NONE/UNKNOWN due to
the logic failing to account for empty strings. This
patch sets the default to something sane "rssi" that
matches legacy behavior and also adds guards so that
an empty string will be considered default, and a non
empty but otherwise invalid string will also try to
use RSSI instead of simply failing to display signal
bars.

-Add protection against invalid array sizes
-Fix a bug where RSCP could use RSSI thresholds
-Add fallback for RSCP thresholds being null when the
 measurement type is set to RSCP.
-Define RSCP thresholds as constants.

Bug: 118800169
Test: atest CellSignalStrengthWcdmaTest
Change-Id: I8d6261bc5adab6bf9b0a88f7d59b259d338a49e9
2019-01-04 13:34:02 -08:00
Sahin Caliskan
94d92dc3cf Merge "Skeleton implementation of RCS APIs" 2019-01-04 00:04:43 +00:00
Sahin Caliskan
ec851b1f98 Skeleton implementation of RCS APIs
This change adds the classes for RCS Storage APIs. There
is no business logic implemented yet, and the parcelable boilerplate
code doesn't really do anything.

This was needed as these APIs are meant to be interconnected, i.e. to
use an RcsPart, the app developer will need an RcsMessage, and for
that they will need the RcsThread etc.

Test: Builds fine. Tests will be added as I add business logic.

Bug: 109759350
Change-Id: I20897946dc1d9218f60274c7e3242194c7e2ac32
2019-01-03 14:18:06 -08:00
Mathew Inwood
aeda49d185 Merge "Limit access to suspected false positives." 2019-01-02 12:30:32 +00:00
sqian
c18b326a5b Add Emergency Dial into RIL and Remove PhoneNumberUtils Ecclist check
Bug: 112657134
Test: Treehugger
Change-Id: I297334be370688fd9a9d46920a09152f57152039
Merged-In: I297334be370688fd9a9d46920a09152f57152039
(cherry picked from commit 6279e97c43)
2018-12-28 11:00:26 -08:00
Mathew Inwood
55418eada5 Limit access to suspected false positives.
Members modified herein are suspected to be false positives: i.e. things
that were added to the greylist in P, but subsequent data analysis
suggests that they are not, in fact, used after all.

Add a maxTargetSdk=P to these APIs. This is lower-risk that simply
removing these things from the greylist, as none of out data sources are
perfect nor complete.

For APIs that are not supported yet by annotations, move them to
hiddenapi-greylist-max-p.txt instead which has the same effect.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: Ia937d8c41512e7f1b6e7f67b9104c1878b5cc3a0
Merged-In: I020a9c09672ebcae64c5357abc4993e07e744687
2018-12-28 14:26:35 +00:00
sqian
46c0c303fa EmergencyNumber enhancement
1) Add Database source for EmergencyNumber
2) add mergeEmergencyNumber for merging two emergency numbers
3) enable Listener.EmergencyNumber enhancement
4) no need to pass any parameter to PhoneNotifier
5) modify API documentation
6) deprecate PhoneNumberUtils.isEmergencyNumber
7) modify API documentation for security exception and backward
compatibility
9) introduce some utils in EmergencyNumber for merging number purposes
10) add mnc into EmergencyNumber

Bug: 112657134
Test: Treehugger
Change-Id: I0dcd01bdad7d9c37294cd8b87eda54b4ac9d0a0b
Merged-In: I0dcd01bdad7d9c37294cd8b87eda54b4ac9d0a0b
(cherry picked from commit 9f93a12e1f)
2018-12-27 22:16:25 +00:00
Shuo Qian
cfc6518c48 Merge "Add Emergency service categories in ImsCallProfile" 2018-12-27 22:03:45 +00:00
Shuo Qian
755f2a38ac Merge "Make some SubscriptionManager APIs system APIs" 2018-12-27 21:58:00 +00:00
Nathan Harold
b635fb8eb3 Fix BSIC Check in CellIdentityGsm
Because Java uses signed bytes, a comparison between
a byte and 0xFF will always fail after integer
promotion. Fix this by forcing 0xFF to be treated as
a byte for comparison.

Bug: 119224773
Test: fixes build breakage

Change-Id: I9615667a6b442060f1d43084d56bc9c3fdb3ba35
2018-12-27 01:40:40 +00:00
Nathan Harold
7ce5baf9a9 Refactor CellInfo Constructors
Bug: 119224773
Test: atest FrameworksTelephonyTests
Change-Id: Ibf56797b5be2508656409a3437ff79210334bfd6
2018-12-26 09:45:31 -08:00
Jordan Liu
8acece0441 Merge "Add UiccCardInfo APIs" 2018-12-26 16:16:02 +00:00
Nathan Harold
0f1bf44c99 Merge "Refactor SignalStrength" 2018-12-22 00:38:05 +00:00
Jordan Liu
97c9aba888 Merge "SubscriptionInfo contains int cardId" 2018-12-21 21:55:07 +00:00
Chen Xu
6eacd30e8f Merge "new SystemAPI for preciseCallState and DisconnectCause" 2018-12-21 03:52:16 +00:00
Calvin Pan
d839b0d384 Merge "Public SIM_APN_URI uri and deprecated mcc, mnc, mvno_type, mvno_data" 2018-12-21 01:31:44 +00:00
Xiangyu/Malcolm Chen
00baab3d29 Merge "Add APIs to indicate which subscriptions should be hidden from user" 2018-12-21 00:05:17 +00:00
Xiangyu/Malcolm Chen
90f496b14c Merge changes from topic "118349116"
* changes:
  Fix broken building offline-sdk-docs.
  Add APIs to remove sub from a group and get subs in the same gorup.
2018-12-21 00:04:57 +00:00
Nathan Harold
f23153f166 Refactor SignalStrength
Refactor SignalStrength as a container of
individual CellSignalStrength objects for each
radio technology.

-Change SignalStrength to contain CellSignalStrength
 rather than individual measurements.
-Change the constructors for SignalStrength to take
 CellSignalStrength objects.
-Consolidate all the logic for calculating the getLevel()
 function to CellSignalStrength.
-Store the level value in SignalStrengths rather than
 compute it on the fly when needed.
-Add a few missing functions needed by SignalStrength:
     -CellSignalStrengthCdma#getEvdoAsuLevel()
     -CellSignalStrengthTdscdma#getRscp()
-Convert CellSignalStrength classes to take actual values
 instead of ASU values.

Bug: 25984037
Test: atest SignalStrengthTest
Change-Id: I302e7a8c6f68559dc69a3138061eec739ee7561f
2018-12-20 13:53:43 -08:00
chen xu
970d77913b new SystemAPI for preciseCallState and DisconnectCause
1. decouple disconnectCause and preciseDisconnectCuase from
 preciseCallState.
 2. expose preciseCallState to SystemAPI and expose
onPreciseCallStateChanged to System API
3. remove/hide ImsReasonInfo from PreciseDisconnectCuase
4. expose DiconnectCuase and PreciseDisconnectCause to System API
5. new onDisconnectCauseChanged API on PhoneStateListener for CS call
 and use ImsCallSessionListener for IMS call(imsreasonInfo)
6. add read_precise_phone_state to shell apk to enable GTS test

Bug: 119890559
Test: atest GtsGmscoreHostTestCases:TelephonyHostTest#testPhoneStateListener
Change-Id: If9256feff16b6bcaef1dfe194c2b0df2a48436b0
(cherry picked from commit 6a942d488a)
Merged-in: If9256feff16b6bcaef1dfe194c2b0df2a48436b0
2018-12-20 18:41:11 +00:00
calvinpan
5e27237f59 Public SIM_APN_URI uri and deprecated mcc, mnc, mvno_type, mvno_data
Deprecated legacy mno and mvno columns to support carrier id and public
the SIM_APN_URI to provide app more simplier query current SIM's APN.

Bug: 120031619
Test: Build pass.
Change-Id: Ie06dfc55248b871c45ff3274de17d6eafd82d846
2018-12-20 15:16:23 +08:00
chen xu
5e499effba refactor dataFailCause
1. add comments for each data fail cause.
2. refactor dataFailCause from enum to int

Bug: 119891533
Test: Build & unit test
Change-Id: Ic453f80a3d0ccd22c6c4c1f4b2c90e2bf40cfbe1
(cherry picked from commit 3016167192)
Merged-in: Ic453f80a3d0ccd22c6c4c1f4b2c90e2bf40cfbe1
2018-12-19 21:59:50 -08:00
Malcolm Chen
0db9aa1693 Add APIs to indicate which subscriptions should be hidden from user
Bug: 120573892
Test: manual
Change-Id: I46b20241b71fef2938d7340fcf0b02173d83ed87
Merged-In: I46b20241b71fef2938d7340fcf0b02173d83ed87
2018-12-19 19:18:55 -08:00
Malcolm Chen
18350e409e Fix broken building offline-sdk-docs.
TelephonyManager#hasCarrierPrivileges(int) is hidden API so it
shouldn't be referenced in public API descriptions.

Bug: 120622105
Test: none
Change-Id: Ia6b6ec2c16b824b8eb092920089cb77cdc54bfb7
Merged-In: Ia6b6ec2c16b824b8eb092920089cb77cdc54bfb7
2018-12-19 19:17:30 -08:00
Malcolm Chen
be9240bcf0 Add APIs to remove sub from a group and get subs in the same gorup.
Add APIs in SubscriptionController so that caller with permissions
can remove subscriptions from a group or get all subscriptions with
the same group.

Bug: 118349116
Test: unittest
Change-Id: Iba4d31b437b372b3f41a6ed23f03b96a685a324c
Merged-In: Iba4d31b437b372b3f41a6ed23f03b96a685a324c
2018-12-19 19:02:12 -08:00
Jordan Liu
bd00ed6978 SubscriptionInfo contains int cardId
We rename the old "String cardId" field to "String cardString". The new
int cardId refers to the publically exposed cardId.

Also deprecate the few-arg constructor. Its okay to use in existing
cases which don't care about the extra arguments (certain tests and
transient SubscriptionInfo objects which aren't really used) but should
not be used in general.

Bug: 80097562
Test: manual
Change-Id: I92264b95da64be77367e869f774bc65f8934fd32
Merged-In: I92264b95da64be77367e869f774bc65f8934fd32
2018-12-19 15:27:06 -08:00
Jordan Liu
11374f4fb1 Add UiccCardInfo APIs
UiccCardInfo is available through a system API and gives information
about a currently inserted UICC or eUICC.

Bug: 80097562
Test: manual and UiccControllerTest.java
Change-Id: Ica8bd9e1703f5d974f959ea91ca47b832a017143
2018-12-19 15:12:00 -08:00
Nathan Harold
795641f25e Merge "Annotate getMobileNetworkOperator() as Nullable" 2018-12-19 18:49:56 +00:00
Nathan Harold
ff9932a7aa Merge "Annotate CallbackExecutor in requestCellInfoUpdate" 2018-12-19 18:26:37 +00:00
chen xu
64e81db02f add carrierid in subscriptionInfo
add carrierid in subscritionInfo so that apps can get
subId, carrierid and other sim related info from a single call

Bug: 119676543
Test: gts SubscriptionInfoTest
Change-Id: Ia2d01ad6bd59565adbf989b4d95e7f64f3ee6d45
(cherry picked from commit 0034bb393c)
Merged-in: Ia2d01ad6bd59565adbf989b4d95e7f64f3ee6d45
2018-12-18 23:21:57 -08:00
Josh Hou
843e387bb6 Merge "Print carrier Id information in toString()" 2018-12-19 01:22:25 +00:00
Nathan Harold
6655dddcd5 Annotate CallbackExecutor in requestCellInfoUpdate
Add a missing annotation for CallbackExecutor in
requestCellInfoUpdate().

Bug: 120489428
Test: compilation (no functional change)
Change-Id: I33bba9eb59f81aaefa0194b58936d4f809a8d51f
2018-12-18 15:09:28 -08:00
Nathan Harold
13d6b11987 Annotate getMobileNetworkOperator() as Nullable
Add Nullable annotations for the classes that support
getMobileNetworkOperator().

Bug: 118675404
Test: compilation (no functional change)
Change-Id: I914ec8242aff2f578dfe1f97f2e7cfe2d109c7dc
2018-12-18 13:41:25 -08:00
Chen Xu
18b925a7af Merge "expose Carrier Id related APIs" 2018-12-17 20:56:54 +00:00
Pengquan Meng
d0c404cb21 Merge "Add FrequencyRange comparator to ServiceState" 2018-12-17 19:07:27 +00:00
Josh Hou
619ac4fbab Print carrier Id information in toString()
Bug: 115709816
Test: Build pass
Change-Id: Idd3336c472860ad21121029abecb91aa9b8325ec
Merged-In: Idd3336c472860ad21121029abecb91aa9b8325ec
2018-12-17 07:14:26 +00:00
Pengquan Meng
424acc7f57 Add FrequencyRange comparator to ServiceState
The FrequencyRange is not comparable beucase it's an enum. This change
add a comparator to ServiceState to make the enum comparable.

Bug: 111453000
Test: atest FrameworksTelephonyTests
Merged-In: I59a595bdaf5451d2c4d95b1b5bdfefcba123fea7
Change-Id: I59a595bdaf5451d2c4d95b1b5bdfefcba123fea7
2018-12-14 14:49:18 -08:00
Jack Yu
cd67c02f1c Renamed data/net service provider onDestroy to close
Renamed them to avoid confusion with Android services'
onDestroy().

Test: Telephony sanity tests
Bug: 73659459
Change-Id: I05f68ced65498d6bfeb9e3c9ed3fb6164643bbaa
2018-12-14 00:22:02 -08:00
Chen Xu
d2a163ad38 Merge "move and rename DcFailCause to DataFailCause" 2018-12-14 02:44:20 +00:00
Youming Ye
97ee6295e9 Merge "Propagation of additional Ims Call Fail Causes" 2018-12-13 23:47:49 +00:00
sqian
db49641108 Make some SubscriptionManager APIs system APIs
method public void setDefaultDataSubId(int);
method public void setDefaultSmsSubId(int);

Bug: 119232325
Test: Treehugger
Change-Id: I2775ef7a6f7f9585fe451f94da5eba541eea62af
Merged-In: I2775ef7a6f7f9585fe451f94da5eba541eea62af
(cherry picked from commit 876bb7a065)
2018-12-13 14:42:43 -08:00
chen xu
1afc47b154 move and rename DcFailCause to DataFailCause
Bug: 119891533
Test: Build
Change-Id: I6f0e474a9ee3f8befc8b0a221713a2080b59844c
Merged-in: I6f0e474a9ee3f8befc8b0a221713a2080b59844c
2018-12-13 12:54:38 -08:00
Sahin Caliskan
4929a0d782 Merge "Move RCS APIs to android.telephony.ims" 2018-12-13 20:48:34 +00:00
Sahin Caliskan
7719db2b16 Move RCS APIs to android.telephony.ims
This is due to being compatible with other RCS related changes by by other engineers.
Test: Existing tests pass

Bug: 109759350
Change-Id: Id56df22e9c313c5e0700eda3b2c489d2f84ea0cd
Merged-In: Id56df22e9c313c5e0700eda3b2c489d2f84ea0cd
2018-12-13 16:50:28 +00:00
Youming Ye
da9de2d7fa Merge "Fix property setting with failure" 2018-12-13 06:55:25 +00:00
Jesse Fuentes
b9c35c1c0c Propagation of additional Ims Call Fail Causes
-Added new ImsReasonInfo error codes
-Add the new error codes in system-current.txt

Test:Manual
Bug:115925183

Change-Id: Id10651d08de2b77f0562e3c8733be76032a9611e
2018-12-12 17:49:50 -08:00