Commit Graph

20636 Commits

Author SHA1 Message Date
TreeHugger Robot
b5ec0b8053 Merge "Add SHOW_SOURCE_PUSH_TO_TALK to indicate that the interaction service was invoked by a hardware button." 2018-07-02 23:42:54 +00:00
TreeHugger Robot
ce77407144 Merge "StrictMode to catch storage while locked." 2018-06-30 22:04:26 +00:00
Jeff Sharkey
c609116a1b Get android.os tests running against real APIs.
Combination of moving to existing public API, tagging things as
@TestApi, and bringing utility methods into tests.

Bug: 13282254
Test: atest cts/tests/tests/os/
Change-Id: Ifd24c0d048d200e8595e194890cc1dc53ddc2b3e
2018-06-29 17:15:44 -06:00
Jeff Sharkey
dd02e33417 StrictMode to catch storage while locked.
When an app starts becoming Direct Boot aware, it can be difficult
to track down all the places they're reading data from credential
protected storage.

When a user is locked, credential protected storage is unavailable,
and files stored in these locations appear to not exist, which can
result in subtle app bugs if they assume default behaviors or
empty states. Instead, apps should store data needed while a user
is locked under device protected storage areas.

Bug: 110413274
Test: atest cts/tests/tests/os/src/android/os/cts/StrictModeTest.java
Change-Id: Ia390318efa6fefda8f10ac684d0206e67aa1d3dc
2018-06-29 11:41:00 -06:00
Winson Chung
1241652d8a Merge "Ensure PiP test apis are marked as TestApi" 2018-06-29 03:13:25 +00:00
Brad Ebinger
b599d73b8c Merge "Emergency SMS carrier config flag" am: 36a9fa62be am: 86ec65e59c
am: 0bb18995dc

Change-Id: I4bc7ca9080af8f0bd06c4ab0fe547640314819e1
2018-06-28 17:43:48 -07:00
Brad Ebinger
86ec65e59c Merge "Emergency SMS carrier config flag"
am: 36a9fa62be

Change-Id: If6a2b0316ee0fdac29eedcf77686694f538d5017
2018-06-28 17:26:39 -07:00
Winson Chung
37b99ba2e4 Ensure PiP test apis are marked as TestApi
Bug: 77533294
Test: atest CtsAndroidAppTestCases:PictureInPictureParamsBuilderTest
Change-Id: Icbcea8cf9d7e49db7ebcc1ce676b43722f75b7f4
2018-06-28 15:42:06 -07:00
Brad Ebinger
36a9fa62be Merge "Emergency SMS carrier config flag" 2018-06-28 22:16:10 +00:00
Jeff Sharkey
ed71f10907 Merge "Give StrictMode more bits to work with." 2018-06-27 22:33:07 +00:00
Tobias Thierer
73c35f846f Merge "Track dropping of throws clause in Pattern.java." am: 251a0cfb78 am: 16de9c5a8a
am: af95708645

Change-Id: I21d9c90f43d9b985443f270043b8c1df77377377
2018-06-27 11:44:11 -07: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
Jeff Sharkey
3ac2a43455 Give StrictMode more bits to work with.
We're almost out of bits, and we don't really need to smash both
thread and VM policy into the same 32-bit value, so use the lower
16-bits for each policy type and the upper 16-bits for penalty.

ActivityManager is only consulting the penalty bits, so we can
remove getViolationBit() and switch CTS over to doing instanceof
checks.

Bug: 110413274
Test: atest cts/tests/tests/os/src/android/os/cts/StrictModeTest.java
Change-Id: I760e6a28f56da66dc75b7df9daf2167ff5bdff50
2018-06-26 14:12:14 -06:00
Jeff Sharkey
c59a5e7e0b StrictMode to catch implicit Direct Boot matching.
When an app starts becoming Direct Boot aware, it can be difficult
to track down all the places they're implicitly relying on
PackageManager filtering behavior.

For example, if the current Launcher isn't Direct Boot aware, we
hide it until the user is unlocked, which could confuse other Direct
Boot aware apps into thinking it had been uninstalled, which could
cause data loss.

This change helps apps track down places where they're implicitly
relying on the automatic filtering; they should instead carefully
choose a combination of MATCH_DIRECT_BOOT flags to decide on the
explicit matching behavior they want.

To implement this, we partially migrate the updateFlags() methods
out into ApplicationPackageManager, since the checking needs to
happen on the client side to correctly report StrictMode
violations.  We don't currently mutate the flags, but we retain
the naming to keep that door open in the future.

Test: manual
Bug: 110413274
Change-Id: Iff6feba19da81ea1b4eeb3af821c3bdfbd9bf17c
2018-06-26 13:20:37 -06: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
TreeHugger Robot
849c351337 Merge "Make setPrivacy not a hidden api" 2018-06-22 23:49:02 +00:00
Yi Jin
5afde76fbe Make setPrivacy not a hidden api
Bug: 110710413
Test: N/A
Change-Id: Iae8dda7f2295e3080c042398516838d84bd5d5be
2018-06-22 21:07:41 +00:00
Nicholas Sauer
78b8917eae Add SHOW_SOURCE_PUSH_TO_TALK to indicate that the interaction service
was invoked by a hardware button.

bug: 110378156
Test: lunch bat_land-userdbyg && m; deploy and use the input activity in kitchen sink to verify voice.
Change-Id: I0f3ac2783b2ea0ce6298123b67e75911d168d876
2018-06-21 08:27:35 -07:00
Philip P. Moltmann
4a6dff0911 Allow permissions to have background permissions
Some permissions are getting split into foreground and background
variants. If an app only has the foreground version it can only access
the protected resource while the user is using it. Once the background
permission is added to the foreground permission the app can always
access the resource protected by the permission.

- Only having the background permission does grant anything.
- Mutliple foreground permission can share a single background permission,
  but a foreground permission can not have multiple background
  permissions.
- As the implementation of background permissions is based on AppOps
  only the system can declare such foreground/background permissions
- A CTS test enforce that the background is in the same group as the
  matching foreground permission.

Bug: 78788390
Test: Checked declared permission after boot and found new attributes
Change-Id: Ica7ba77b24345607c7467c41c982a58c39199024
2018-06-19 12:23:55 -07:00
Dianne Hackborn
1c4cc2d182 Merge "Expose new AppOps API that we had to leave hidden in P." 2018-06-14 23:42:46 +00:00
Dianne Hackborn
f0c322a9db Expose new AppOps API that we had to leave hidden in P.
Now's the time!

Test: manual
Bug: 109754053
Change-Id: I06c9428b5a133be574061410b4bb7d9c589c1b7c
2018-06-14 11:44:38 -07: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
Pengquan Meng
0885b2d337 Merge "Remove internal ApnSetting." into pi-dev-plus-aosp
am: 1969c54ae2

Change-Id: Ifaa873daa4bf60e5ddc9b8acef8b826ac787582a
2018-06-12 15:55:11 -07:00
TreeHugger Robot
6006f76ad7 Merge "Split interfaces and service for activities from current AM interfaces (1/n)" 2018-06-12 18:18:48 +00:00
yuemingw
9bf808cce1 Remove internal ApnSetting.
Bug: 77511388
Test: atest FrameworksTelephonyTests
Change-Id: I9757ef4aae269d828c98a7363c98629c9be74846
2018-06-12 13:56:28 +00:00
TreeHugger Robot
b1e8a6f64e Merge "Fix a typo on MediaTimestamp.getAnchorSytemNanoTime()" 2018-06-09 02:01:40 +00:00
Fredrik Roubert
3c00affc21 Merge "API updated for ICU4J 61.1" am: c2791389a5 am: 18d7cd7106
am: a3a202e990

Change-Id: Ic40a55b1a745fd76793ef052587e8f7805d12394
2018-06-08 18:48:05 -07:00
Fredrik Roubert
a3a202e990 Merge "API updated for ICU4J 61.1" am: c2791389a5
am: 18d7cd7106

Change-Id: I501f6f8c5654777241c02c02a4cbb5e939c60cf1
2018-06-08 18:36:33 -07: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
Wale Ogunwale
65ebd955e1 Split interfaces and service for activities from current AM interfaces (1/n)
First step in unifying the window hierarchy that is currently split
within AM and WM packages. We separate the interfaces and service dealing
with activities and their containers (tasks, stack, display) from the
rest of AM interfaces and services. This will allow us to move the new
interfaces and services to WM when the internal states are cleaned-up.

Test: Existing tests pass
Test: go/wm-smoke-auto
Bug: 80414790
Change-Id: Ide9b3f89123b768cdbd3e3878113c7a8021187f3
2018-06-06 18:26:21 -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
Dongwon Kang
ec3b696398 Fix a typo on MediaTimestamp.getAnchorSytemNanoTime()
Test: build
Bug: 109732775
Change-Id: I977edc128c14618241ea50fc6f91bc9672b6c059
2018-06-05 16:16:18 -07:00
Hongming Jin
6bbc61e725 Merge "Enforce permission check before returning application info Test: atest CtsAppSecurityHostTestCases:ApplicationVisibilityTest Bug: 77821568" into pi-dev am: dbc6052022
am: e2304c2ed4

Change-Id: I4a9f0c4fae6dc286fd671c007e3ff39ac357282f
2018-06-01 10:48:38 -07: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
TreeHugger Robot
427ae7d48e Merge "DisplayCutout: make cutout info available on Display object" 2018-06-01 09:39:35 +00: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
efb4b1b509 Merge "Ensure permission held for MATCH_KNOWN_PACKAGES" into pi-dev am: 2f898c4df5
am: 87fbe89e5d

Change-Id: Id80937d84f4e1b28673b1e6b6ee6c4741b01efb0
2018-05-31 17:04:34 -07:00
Brad Ebinger
ba6b7c4d75 Merge "IMS: Support for Implicit Call Rejection" am: 19d032b695 am: 982ceb81a9
am: f122c22c50

Change-Id: Ia98671f03e7ba6eac03c0d2cdbac949ecb76cca4
2018-05-31 16:18:39 -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