Commit Graph

20178 Commits

Author SHA1 Message Date
Jordan Liu
50f29d8ecf Merge "Type Allocation Code & Manufacturer Code"
am: ff801e5fd7

Change-Id: I95b5fd3d2fb977db3f37dcf23c2125c521c1ccd1
2018-07-06 12:06:39 -07:00
David Kelly
db6a391957 Type Allocation Code & Manufacturer Code
- Addition of getTypeAllocationCode & getManufacturerCode to
android.telephony.TelephonyManager.

- The Type Allocation Code is the first eight characters of the IMEI.
The Type Allocation Code identifies a particular GSM device model.

- The Manufacturer Code is the first eight characters of the MEID.
The Manufacturer Code identifies the manufacturer of a CDMA device.

- The reasoning behind adding getTypeAllocationCode is to be
able to obtain the Type Allocation Code without requiring the
READ_PHONE_STATE permission. Currently in order to obtain the
Type Allocation Code a substring operation must be performed on
getImei which is protected by the READ_PHONE_STATE permission.

- The reasoning behind adding getManufacturerCode is to be
able to obtain the Manufacturer Code without requiring the
READ_PHONE_STATE permission. Currently in order to obtain the
Manufacturer Code a substring operation must be performed on
getMeid which is protected by the READ_PHONE_STATE permission.

- The reasoning that these additional methods do not require the
READ_PHONE_STATE permission is that neither the Type Allocation
Code nor the Manufacturer Code can identify a unique device.
The Type Allocation Code and the Manufacturer Code are analogous
to other device information such as device model or device
screen dimensions.

Test: run cts -m CtsTelephonyTestCases
Bug: 74613795
Change-Id: I5a586b5a362b39aae13357329efb19eb93f0434c
Signed-off-by: David Kelly <dkelly@afilias.info>
2018-07-04 08:23:09 +00:00
Brad Ebinger
86ec65e59c Merge "Emergency SMS carrier config flag"
am: 36a9fa62be

Change-Id: If6a2b0316ee0fdac29eedcf77686694f538d5017
2018-06-28 17:26:39 -07:00
Brad Ebinger
36a9fa62be Merge "Emergency SMS carrier config flag" 2018-06-28 22:16:10 +00:00
Tobias Thierer
16de9c5a8a Merge "Track dropping of throws clause in Pattern.java."
am: 251a0cfb78

Change-Id: Icb30c1ffaba63d9f633bf45c9af2a949ddbf1fcd
2018-06-27 11:21:42 -07:00
Avinash Nalluri
ceaf7226cf Emergency SMS carrier config flag
Allow send sms over ims to emergency number when the device is in
lte/limited lte mode without normal ims registration.
Modem will use emergency ims pdn to submit sms to network.

Change-Id: I5762102c695fe309a4a5b318abccded5c50154e0
Bug: 110462046
2018-06-27 08:46:54 -07:00
Tobias Thierer
a287bfead0 Track dropping of throws clause in Pattern.java.
This is not really an API change because PatternSyntaxException
is unchecked (extends RuntimeException). The behavior has not
changed (PatternSyntaxException can still be thrown).

Bug: 109659282
Test: Treehugger
Change-Id: I5759eee10b27307b68f15fdd6f6f1a258ee01529
2018-06-26 14:48:48 +01:00
Pengquan Meng
fdad4c89fb Merge changes from topic "clean"
am: 9f2362bb82

Change-Id: I9a0554d7cacd8c02d78ad08b7d05b074720dfe2a
2018-06-13 15:33:08 -07:00
yuemingw
457c62801b Remove internal ApnSetting.
Bug: 77511388
Test: atest FrameworksTelephonyTests
Change-Id: I0da354c7d55ac49f90ca1376e8f2034e65e4e274
Merged-In: I9757ef4aae269d828c98a7363c98629c9be74846
2018-06-13 12:52:25 +01:00
Xin Li
401c4b1d00 Merge pi-dev-plus-aosp-without-vendor into stage-aosp-master
Bug: 79597307
Change-Id: I2ec319e9fc92e959580a4a3cfe955ae91996dc96
2018-06-08 14:36:39 -07:00
Treehugger Robot
c2791389a5 Merge "API updated for ICU4J 61.1" 2018-06-08 17:19:55 +00:00
nharold
b2749539c0 Merge changes from topic "ipsec-sync-with-pi"
* changes:
  Disable the AppOp Restriction for IpSec Tunnels
  Rework Exception Handling for IpSecManager
  Update IpSecManager to use InetAddress and prefixLen
  Add AppOps Checks for MANAGE_IPSEC_TUNNELS
  Add MANAGE_IPSEC_TUNNELS Permission
2018-06-08 17:07:11 +00:00
Fredrik Roubert
267f1ca774 API updated for ICU4J 61.1
Bug: 77634530
Bug: 109837373
Test: make
Test: cts-tradefed run cts-dev -m CtsIcuTestCases -t android.icu.dev.test.format.MeasureUnitTest
for CTS coverage
Change-Id: I721fbef5c79df1310e144a48ab2f18929b10bdfa
2018-06-08 13:39:46 +00:00
Benedict Wong
fdda5697d7 Update IpSecManager to use InetAddress and prefixLen
LinkAddress constructors are currently @hide; this change updates
IpSecManager to use InetAddress and prefixLen, and then construct a
LinkAddress internally. LinkAddress is used over the binder interface to
IpSecService to ensure validity.

Bug: 77528639
Test: CTS, Java unit tests ran on walleye
Merged-In: I19e124adef6d9f4992d8293db3190bcf74c95848
Change-Id: I19e124adef6d9f4992d8293db3190bcf74c95848
(cherry picked from commit 3f2c54b782)
2018-06-07 18:42:52 -07:00
Nathan Harold
01b61dbd53 Add MANAGE_IPSEC_TUNNELS Permission
Add a new MANAGE_IPSEC_TUNNELS permission and
protect all IPsec Tunnel mode APIs with it.
This permission is only granted to the system or
through an AppOp.

Bug: 66955045
Test: compilation
Merged-In: I0f618373b500c493ef2211bece681f74652a1833
Change-Id: I0f618373b500c493ef2211bece681f74652a1833
(cherry picked from commit 159788455c)
2018-06-07 18:42:52 -07:00
Brad Ebinger
4ae252f80f Unhide @SystemApi Constructor
There are a few small classes that never got properly
exposed as @SystemApi. These classes were not caught
because vendors currently build against the source
directly and have access to hidden APIs. We can not
change the vendor code at this point (different vendor
code for each year for all supported devices), but
we can start pulling back the API for new devices.

1) Keep all public mutable fields @hide and put
todo (and file bug b/74402619) to make fields
private or final.

2) Add public constructor that populates all fields
so that @hide public mutable fields can be set to
private/final in the future.

3) Provide getters for fields that will not be
public in the future.

In this way, we can make minimal API changes for P,
support new vendor/3rd party ImsServices, and phase
out old ImsService implementations that still build
against the source instead of using the correct
@SystemApi.

Bug: 77278031
Bug: 74402619
Test: Manual
Merged-In: Idbf2a71018f1bd06f8445b07fc52bc65cb6776f6
Change-Id: Ifa3b6d0cbdb12e92efc699b760ca874768a89a7c
2018-06-06 15:55:04 -07:00
Jeff Sharkey
b04a511ac4 Let tests enumerate all transports/capabilities.
This gives them a way to collect all included values without
resorting to manual probing of each newly added value.

Cherry-pick of ag/4052941 with minor conflicts in the imports.

Bug: 16207332
Test: atest com.android.cts.net.HostsideVpnTests
Change-Id: Ia764b3412bf834890612378e0c3846913f4e0a06
Merged-In: Ie5cd22cfa2b6a60510fd1e31d7ebcd8f6cc890a0
Merged-In: If07e77c92046807235229a4f67ee087bdd7bccf1
2018-06-06 08:25:36 +00:00
Jeff Sharkey
55707d98f9 API council requested tweaks to NetworkRequest.
If you put values into the Builder, you should be able to observe
those values on the built object.

Clean cherry-pick of ag/3813257

Test: atest android.net.cts.NetworkRequestTest
Bug: 74945408
Change-Id: Ib28de279efb8b33ab46aa64f580e10fe5f8720e3
Merged-In: I0d090ebb7d57689a061badcf593ae9a37d88f7ce
Merged-In: I539184f7385c1f288cfb77be8307e4463e07e9e6
2018-06-06 08:23:00 +00:00
Pavel Maltsev
e19b33e046 Add OEM_PAID capability to system api
Some system apps should be able to request OEM_PAID networks.  This
makes a lot of sense when Android is used as in-vehicle infotainment
systems.

Clean cherry-pick of ag/3782591

Bug: 68762530
Test: runtest -x frameworks/base/tests/net/ -c android.net.NetworkCapabilitiesTest
Change-Id: I306f060c5a386ff4b82cd99a03dc037ce60ded6a
Merged-In: Ic164c4a29cd449a31b2f1c12c8c345bcc5dc77fa
Merged-In: I6e9c4130db23a4f1c89ce7e9071ae519a2b0b7ec
2018-06-06 08:22:51 +00:00
Hongming Jin
e2304c2ed4 Merge "Enforce permission check before returning application info Test: atest CtsAppSecurityHostTestCases:ApplicationVisibilityTest Bug: 77821568" into pi-dev
am: dbc6052022

Change-Id: I137f5df296a05d7ec128427d8aafd5ae66b519f7
2018-06-01 10:36:14 -07:00
Hongming Jin
83e162615f Enforce permission check before returning application info
Test: atest CtsAppSecurityHostTestCases:ApplicationVisibilityTest
Bug: 77821568

Change-Id: I7554805c36c0c2552163dad7b07cfc5f552b624e
2018-05-31 17:20:14 -07:00
Todd Kennedy
87fbe89e5d Merge "Ensure permission held for MATCH_KNOWN_PACKAGES" into pi-dev
am: 2f898c4df5

Change-Id: I3c987d0d74f9f60fe23ab7d1cc815b4343503194
2018-05-31 14:56:10 -07:00
Brad Ebinger
f122c22c50 Merge "IMS: Support for Implicit Call Rejection" am: 19d032b695
am: 982ceb81a9

Change-Id: Icc22c412ab47c5a4ca895dfc6c3389a3a6202200
2018-05-31 14:02:10 -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
Todd Kennedy
ef9acb6ed9 Ensure permission held for MATCH_KNOWN_PACKAGES
There's an escape clause that passes the cross user permissions
if the caller UID is identical to the target user ID [eg. we're not
operating across users]. However, the method getInstalledPackagesList()
uses android.permission.INTERACT_ACROSS_USERS to filter the results and
a calling UID check is not sufficient. Ensuure the permission is
actually held, regardless of the calling UID or target user.

Change-Id: Iebf88668766d387a15246d6eea6420610665105a
Fixes: 80435086
Test: atest CtsAppSecurityHostTestCases:ApplicationVisibilityTest
2018-05-30 13:56:17 -07:00
Hall Liu
39ac9ffe27 Merge "Add CallAudioState ctor as TestApi" 2018-05-30 20:24:34 +00:00
Tobias Thierer
b0a4b71b34 Merge "Track: Revert some needless differences vs upstream in Matcher.java" am: adb8532394
am: ca97e3a29b

Change-Id: Ibf3e7fab17af69b2d7225661d29e022a933650a2
2018-05-29 06:47:56 -07:00
Tobias Thierer
028d1b5f5a Track: Revert some needless differences vs upstream in Matcher.java
Android Matcher.start(int) declared "throws IllegalStateException",
which is correct but redundant. Upstream OpenJDK8u121-b13 does not
have this declaration. Another CL in this topic drops the declaration,
without changing behavior.

Bug: 35910877
Test: Treehugger

Change-Id: I59778f13f0df8bd4112af4edc25ee5a93084ae35
2018-05-26 16:20:22 +01:00
Hall Liu
378f1f4972 Add CallAudioState ctor as TestApi
Needed for CTS testing

Bug: 79528185
Test: CTS
Change-Id: Iad154257a93cc776d5800527e46e777fd6c88220
Merged-In: Iad154257a93cc776d5800527e46e777fd6c88220
2018-05-25 15:22:16 -07:00
Wale Ogunwale
30eab1f430 Added TestApi to ActivityInfo.isTranslucentOrFloating
This would be use to determine the right activity state during CTS
test for products that have windowSwipeToDismiss set.

Also, dump ActivityRecord.fullscreen to proto for the same reason.

Bug: 76207986
Bug: 79167358
Test: atest CtsActivityManagerDeviceTestCases:ActivityLifecycleTests
Test: atest CtsActivityManagerDeviceTestCases:ActivityManagerAssistantStackTests
Change-Id: Iadc088e9129be088b8a083ebbafd8d20fe26b673
2018-05-25 10:24:14 -07:00
David Chen
f94b4936b4 Marks deprecated StatsManager APIs.
Marking some API's as deprecated, so users avoid getting confused.

Test: Test that build works.
Bug: 80099023
Change-Id: I4b3d4e4fa1ee3d706e49b8180aa4d0ad0e7d6eeb
2018-05-21 17:40:56 -07:00
Svet Ganov
6b03aa76e9 Make RemoteCallback test API
Test: manual

bug:79782915

Change-Id: I61343573428333c0d4a9ee2523c444753280186c
2018-05-21 15:55:28 +00:00
Xiangyu/Malcolm Chen
272769c41a Merge "Unhide constructors of DataService and NetworkService." 2018-05-15 18:54:50 +00:00
Jeff Sharkey
8e6445a1a5 Merge "Let tests enumerate all transports/capabilities." into pi-dev 2018-05-15 15:17:30 +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
Jeff Sharkey
a5ee62f356 Let tests enumerate all transports/capabilities.
This gives them a way to collect all included values without
resorting to manual probing of each newly added value.

Bug: 16207332
Test: atest com.android.cts.net.HostsideVpnTests
Change-Id: I35ca412512dc8515b44d5518e1ca4caa5bdc678f
2018-05-14 17:17:33 -06:00
Hall Liu
c1d95aad1a Add CallAudioState ctor as TestApi
Needed for CTS testing

Bug: 79528185
Test: CTS
Change-Id: Iad154257a93cc776d5800527e46e777fd6c88220
2018-05-11 17:14:58 -07:00
Treehugger Robot
87a7c657bd Merge "add install action for carrier id to system API" 2018-05-11 17:36:24 +00:00
fionaxu
4ff8de609b add install action for carrier id to system API
Bug: 79426800
Test: Manual
Change-Id: Icd3e9ae527dc17ab5762aa57df596f058de08d5b
(cherry picked from commit 2776ed56b8)
Merged-in: Icd3e9ae527dc17ab5762aa57df596f058de08d5b
2018-05-11 15:54:45 +00:00
TreeHugger Robot
689866352b Merge "add install action for carrier id to system API" into pi-dev 2018-05-09 22:47:40 +00:00
fionaxu
2776ed56b8 add install action for carrier id to system API
Bug: 79426800
Test: Manual
Change-Id: Icd3e9ae527dc17ab5762aa57df596f058de08d5b
2018-05-08 15:25:40 -07:00
Tyler Gunn
f858a0e8d2 Make TelecomManager#endCall a public API.
A broad category of apps such as wearable companion apps and call blocking
apps rely on the ability to reject a ringing call.
Previously this was achieved using a broken TelephonyManager API which
lacked permission checks.
To support these applications, removing the @hide attribute on the existing
TelecomManager#endCall API so that apps with the existing
ANSWER_PHONE_CALLS permission can reject ringing calls and end ongoing
calls.  Logically if an app has permission to answer a call, it should be
able to end it.

Test: Created test app to verify API permission checks.
Test: Added new CTS tests to cover this API.
Bug: 78290258
Merged-In: Ic6527969793ebe05eb9c5fa8205558ae788ea572
Change-Id: Ic6527969793ebe05eb9c5fa8205558ae788ea572
2018-05-08 11:19:18 -07:00
Dianne Hackborn
330dd0b244 Merge "Make android:cantSaveState an optional feature." into pi-dev 2018-05-08 17:59:32 +00:00
Tyler Gunn
872a039ab3 Merge "Make TelecomManager#endCall a public API." into pi-dev 2018-05-08 04:01:35 +00:00
Dianne Hackborn
c8e4fad862 Make android:cantSaveState an optional feature.
This doesn't make sense on things like watches and appliances,
so make this an optional feature that the device must enable.
If the feature is not set, then the system will ignore
the app's request.

Bug: 76213401
Test: atest CtsAppTestCases:ActivityManagerProcessStateTest
Change-Id: I91abf9d86ec14fa632e3bcc83c4a3febade5d2e4
2018-05-07 15:01:57 -07:00
Tyler Gunn
e1aa26c744 Make TelecomManager#endCall a public API.
A broad category of apps such as wearable companion apps and call blocking
apps rely on the ability to reject a ringing call.
Previously this was achieved using a broken TelephonyManager API which
lacked permission checks.
To support these applications, removing the @hide attribute on the existing
TelecomManager#endCall API so that apps with the existing
ANSWER_PHONE_CALLS permission can reject ringing calls and end ongoing
calls.  Logically if an app has permission to answer a call, it should be
able to end it.

Test: Created test app to verify API permission checks.
Test: Added new CTS tests to cover this API.
Bug: 78290258
Change-Id: Ic6527969793ebe05eb9c5fa8205558ae788ea572
2018-05-02 13:23:48 -07:00
Dianne Hackborn
ed23b9b12c Fix issue #78230210: Strobe: Need separate runtime permission group for READ_CALL_LOG and WRITE_CALL_LOG
Bug: 78230210
Test: manual
Change-Id: Ie5a0ab3dffd40dc44f7aa5deb81b42fbc2dbd406
2018-05-01 14:00:34 -07:00
goneil
f6c6e8efa7 Added test API to refresh the UICC Profile
Bug: 74016670
Test: GTS tests - vendor/xts/gts-tests/hostsidetests/simappdialog
Change-Id: I8f8ffdad8666d523172b035d24b96278d4d1a1ee
2018-04-25 18:19:42 -07:00
Lorenzo Colitti
a09c06a6c1 Merge "Actually @hide unwanted capability methods." into pi-dev 2018-04-24 21:20:25 +00:00
Lorenzo Colitti
19c0ccaa8c Actually @hide unwanted capability methods.
Bug: 77601789
Test: builds, boots
Test: make doc-comment-check-docs
Change-Id: I7a913b83ab5110047d187564b3a1b0bbe1631942
2018-04-24 13:12:56 +09:00