Commit Graph

88307 Commits

Author SHA1 Message Date
Chad Brubaker
9a4cf62c90 Merge "Add intent for permission usage info learn more" 2019-01-07 20:42:02 +00:00
Rob Carr
30e984ca78 Merge changes from topic "remove-scoped-connection"
* changes:
  Remove usage of scoped connections.
  Allow SurfaceControl to be passed over AIDL.
2019-01-07 20:08:58 +00:00
Chavi Weingarten
c0203f1268 Merge "Forward setVisibility call to SurfaceView for ActivityView." 2019-01-07 19:10:26 +00:00
TreeHugger Robot
42d3cf3647 Merge "Change the API for setting Notification Actions to be contextual." 2019-01-07 15:30:46 +00:00
Gustav Sennton
005d7a0d07 Change the API for setting Notification Actions to be contextual.
According to Android API council we shouldn't add a new semantic-action
flag to mark an action as contextual. Instead we should use a boolean
flag.
This CL adds that boolean flag.

Bug: 120842160
Test: build and run Notify app (in
vendor/google_experimental/users/cinek/), and ensure smart actions are
showing when the 'No Smart Actions' chooser is changed to
'Short Smart Actions'.
Change-Id: I5fc6dfa37ab28e3f29529cb6fda99c049783eb80
2019-01-07 10:59:45 +00:00
Martijn Coenen
01e719bebb Allocate isolated UID ranges for app zygote and its children.
Introduce a new range of app-zygote isolated UIDs, [90000..98999].
For each app that uses an application Zygote, allocate a range of
100 isolated UIDs. The application Zygote for an app will get a
UID out of that range, and all other children that are forked
from that zygote will get a UID from the same range.

Bug:  111434506
Test: app Zygote and its children run in the new range of
      isolated UIDs (with SELinux disabled). New set of
      tests for UID allocators pass.

Change-Id: I7a6883a5ddb95683932c93ea77f4e52d8f37fa4f
2019-01-07 09:10:31 +00:00
Martijn Coenen
7e6fa6727c Initial support for application Zygote.
When an application has requested isolated services to be spawned
from an app zygote, we need to spawn the app zygote itself, and then
ask it to fork an isolated service.

The application zygote currently only creates the class loader, and
doesn't do much else. We keep track of the isolated services that
use the app zygote, and when the last isolated service goes away,
we stop the app zygote itself (after a timeout).

The app zygote itself runs with the app's UID and under the app
seccomp filter. That last one is too restricted, so this currently
only works with SELinux disabled.

Future CLs will add an application callback for preloading.

Test: start multiple isolated services with useAppZygote="true",
      verify app_zygote starts, services start as a child of
      app_zygote. Stopping all services stops app_zygote as well.

Bug: 111434506

Change-Id: I10ee1d4bd148c9298974d434fbc5e5eccbec16cb
2019-01-07 09:10:31 +00:00
Manpreet
18ebaa979c Merge "Null locale causing the VTS fail." am: 179f30a443 am: 9568191633
am: e9fe937245

Change-Id: I715e3b8126e1506c9d02f0be278fb8baad396018
2019-01-06 20:53:29 -08:00
Manpreet
e9fe937245 Merge "Null locale causing the VTS fail." am: 179f30a443
am: 9568191633

Change-Id: Iab284dfc831a9079e339c8c23fba8f3e7e4ec04d
2019-01-06 20:44:13 -08:00
Manpreet
9568191633 Merge "Null locale causing the VTS fail."
am: 179f30a443

Change-Id: I8ae92392e70c046194df1c8ebee0bd32ed9513cf
2019-01-06 20:30:46 -08:00
Treehugger Robot
179f30a443 Merge "Null locale causing the VTS fail." 2019-01-07 04:19:22 +00:00
Sudheer Shanka
da74280f59 Merge "Add Downloads.Impl.COLUMN_MEDIASTORE_URI & DownloadColumns.Description." 2019-01-06 23:39:48 +00:00
Sudheer Shanka
fe7668ab4d Add Downloads.Impl.COLUMN_MEDIASTORE_URI & DownloadColumns.Description.
Entries from DownloadProvider are added to MediaStore Downloads
collection. COLUMN_MEDIASTORE_URI will be used to track corresponding
entries in MediaProvider. We can't re-use COLUMN_MEDIAPROVIDER_URI
for this purpose because it is updateable by apps.

Bug: 120876251
Test: atest DownloadProviderTests
Test: atest cts/tests/app/src/android/app/cts/DownloadManagerTest.java
Test: atest MediaProviderTests
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: Ifd252c54f4ee739a31be2866896efac6696a088e
2019-01-05 19:01:40 -08:00
Jeff Sharkey
a1767a290a Grant/revoke legacy "Storage" permissions.
The new isolated storage model we're building in Q introduces new
strongly-typed media permissions which replace the broad "Storage"
runtime permission.

That legacy "Storage" permission is marked as being "removed", and
it also splits into the new media permissions, but apps are confused
when they request the "Storage" permission, which no longer appears
as granted when the user accepts the new split media permissions.

After discussing with the permissions team, the best short-term
solution is to add special-case logic that grants the legacy
permissions when *any* of the new media permissions have also been
granted.  Only when the user revokes *all* of the new media
permissions is the legacy permission then revoked.  (MediaProvider
is already internally filtering the relevant content based on what
new media permissions the caller holds.)

Bug: 121227859
Test: manual
Change-Id: Ic87f7f93a816e91f7189509386255a260378c255
2019-01-05 12:59:06 -07:00
TreeHugger Robot
97e54a0113 Merge "Forward volume keys when system audio mode off and property set" 2019-01-05 02:56:24 +00:00
Jeff Sharkey
8f70cac068 Merge changes from topics "trashz", "bucketz"
* changes:
  Public APIs for "trashing" media.
  Define secondary media item bucketing.
2019-01-05 02:33:26 +00:00
Eric Holk
7751e68a1b Merge "Add tryCreateView to LayoutInflater" am: aa8f1b7033 am: 07b293f8af
am: 9b9c255b88

Change-Id: I26f0e3d18e8a27bd9fb7745f3a7af4ca347237fe
2019-01-04 17:40:54 -08:00
Eric Holk
9b9c255b88 Merge "Add tryCreateView to LayoutInflater" am: aa8f1b7033
am: 07b293f8af

Change-Id: Ia835f7a7488a084c72fd5722c91d01ddb427ea19
2019-01-04 17:27:45 -08:00
Eric Holk
07b293f8af Merge "Add tryCreateView to LayoutInflater"
am: aa8f1b7033

Change-Id: Ib89a1d1b292aca7404d646ff61974558422fc959
2019-01-04 17:17:28 -08:00
Treehugger Robot
aa8f1b7033 Merge "Add tryCreateView to LayoutInflater" 2019-01-05 01:02:28 +00:00
Sudheer Shanka
2cf41e4fbf Merge "Revert "Added app context to smart screen brightness."" 2019-01-05 00:22:14 +00:00
Jorim Jaggi
bc93e0f537 Merge "A brave new world for window insets (7/n)" 2019-01-04 23:21:24 +00:00
Jeff Sharkey
5cc407f702 Public APIs for "trashing" media.
The "delete" operation is immediate and permanent, and users may wish
to instead mark content as being "trashed", so they can recover
accidentally trashed items before they're permanently deleted.

The default trash timeout is 48 hours, which should be enough time
to recover items the user cares about.  Apps can also use a custom
timeout if desired.

This is implemented by recording an "expiration" time for trashed
items, and deleting expired items during the next idle maintenance
pass.  Also use this expiration time to clean up pending items that
haven't been published; by default apps have a day to publish
pending items.

Bug: 121227045
Test: atest MediaProviderTests
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I2e371b308dc135ad5363709a6f5385e4456bcb96
2019-01-04 16:17:03 -07:00
Chad Brubaker
1bfef2cade Add intent for permission usage info learn more
The manifest permission usage info declarations are limited in what they
allow the applications to specify. Applications can have an activity for
that handles this intent in order to provide free form application
specific details such as privacy policies, specific examples, etc.

Test: API definition, usage will follow
Bug: 111207567
Change-Id: I90b292e4c1cb8847a9a9d7b8071aaff2ee7d11fb
2019-01-04 14:40:33 -08:00
Ruchi Kandoi
d98f84b0d9 Merge "Deprecate Android beam APIs and create a feature flag to gate them" am: 6a3d45c4b2 am: d0c8a165d8
am: a33da54c8d

Change-Id: I1eda6b7d5879045e6bd35821ee5368ef72855942
2019-01-04 14:18:15 -08:00
Shubang Lu
00b976a7df Forward volume keys when system audio mode off and property set
cherry-pick ag/4968405

Bug: 80296335
Test: make; local tests
Change-Id: I04b7cd0958c9300a76f6337ee891b5f4947484ad
2019-01-04 22:11:05 +00:00
Ruchi Kandoi
a33da54c8d Merge "Deprecate Android beam APIs and create a feature flag to gate them" am: 6a3d45c4b2
am: d0c8a165d8

Change-Id: I886941a5011fdf204fe62c1162dd2ad69d466f62
2019-01-04 14:06:55 -08:00
Ruchi Kandoi
d0c8a165d8 Merge "Deprecate Android beam APIs and create a feature flag to gate them"
am: 6a3d45c4b2

Change-Id: I6305379f787de122e35a9a2a12eb9f99385da4df
2019-01-04 13:57:48 -08:00
Ruchi Kandoi
96fe50bc1b Deprecate Android beam APIs and create a feature flag to gate them
Test: Test application trying to invoke the API
Bug: 117519147
Change-Id: Icd3187e4f3e0f180cb42d36011f60895fb395002
2019-01-04 21:49:00 +00:00
Sudheer Shanka
b3f60657a3 Revert "Added app context to smart screen brightness."
This reverts commit 54478d9cab.

Reason for revert: Broke work profile apps (http://b/122107873)

Bug: 111425369
Bug: 122107873
Change-Id: I7e3bf97725d542eb92a04bc75662ca6680287ba2
2019-01-04 21:34:58 +00:00
Jeff Sharkey
7b148d7ae7 Define secondary media item bucketing.
The existing buckets work well for first-level clustering of related
media, but it's common for multiple media items within a directory
to form a conceptual unit.  To support this, we're creating a
second-level of bucketing which is formed using the first part of
the file name.

This supports common industry-standard patterns like:

    IMG1024.JPG
    IMG1024.CR2

While also opening the door to further flexibility in the future:

    IMG1024.JPG
    IMG1024.HDR.JPG
    IMG1024.BURST001.JPG
    IMG1024.BURST002.JPG
    IMG1024.BURST003.JPG
    IMG1024.DNG
    IMG1024.DEBUG.BIN

We're currently advocating that the default representation of one of
these secondary clusters is the shortest .JPG filename contained
inside, with length ties broken alphabetically.

Clean up database management so that upgraded schema always matches
pristine schema, with tests to verify.  Generate views using the
actual projection mappings used at runtime.

Bug: 115377970
Test: atest MediaProviderTests
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: Ic679055ab6c884d2048626f51670a5dd370281c0
2019-01-04 14:33:49 -07:00
Eric Holk
29d0cd6fa1 Add tryCreateView to LayoutInflater
This method is needed so that precompiled layouts can reuse the factory logic
from the LayoutInflater.

Bug: 111895153
Test: atest android.view.cts.LayoutInflaterTest
Change-Id: Ifd1028906b655af2bd14247d586dc16b35550c82
2019-01-04 12:57:14 -08:00
Ruchi Kandoi
0e1c39bf55 Merge changes from topic "multi-se-support" am: 54502d68ea am: 9c0ec9be9f
am: 650ff88a4c

Change-Id: I562af1c9c1b0c254d8b23466caceb94ef767aa1f
2019-01-04 12:38:53 -08:00
Ruchi Kandoi
650ff88a4c Merge changes from topic "multi-se-support" am: 54502d68ea
am: 9c0ec9be9f

Change-Id: Ieca9b142094c8c568409290fdf690fad529ef604
2019-01-04 12:25:13 -08:00
Ruchi Kandoi
9c0ec9be9f Merge changes from topic "multi-se-support"
am: 54502d68ea

Change-Id: I10dad203c4e46b28546f1bb3c721e5d4e7fb0aec
2019-01-04 12:10:50 -08:00
Ruchi Kandoi
54502d68ea Merge changes from topic "multi-se-support"
* changes:
  Add a mechanism to register AIDs to specific off-host SE
  Add Off-Host Card Emulation Features
2019-01-04 19:56:41 +00:00
chaviw
d44449df80 Forward setVisibility call to SurfaceView for ActivityView.
SurfaceView setVisibility handles removing the surface already. By
forwarding the visiblity call from AV to the SV, SV will destroy the
surface. It will callback into AV through SurfaceCallback.surfaceDestroyed.
In the callback, AV removes the surface for the display, causing the
virtual display to turn off. When the virtual display is turned off, the
activities on that display will get stopped.

Test: ActivityViewVisibilityActivity
Change-Id: Iea8b57d7871b8c87457f2ae19485a610d0d74c38
2019-01-04 10:36:40 -08:00
Robert Carr
5fea55b2d2 Remove usage of scoped connections.
Tracking SurfaceFlinger changes. Now to construct a child surface
we need the SurfaceControl as opposed to just the surface, and so
we parcel the SurfaceControl across relayout.

Test: Manual
Bug: 62536731
Bug: 111373437
Bug: 111297488
Change-Id: I0a034767e92becec63071d7b1e3e71b95d505b77
2019-01-04 10:08:56 -08:00
Matt Pape
d6c1bdfe6d Merge "Update DeviceConfigService to pass Settings.AUTHORITY to IContentProvider.call invocations." 2019-01-04 17:46:09 +00:00
Philip P. Moltmann
72401d4f77 Merge "Rename RuntimePermissionPresenter to PermissionController" 2019-01-04 17:32:44 +00:00
TreeHugger Robot
7e59a7d421 Merge "Cosmetic ContentCapture fixes." 2019-01-04 17:16:34 +00:00
Junyu Lai
864ead76b1 Merge "Ignore ipv6 tx traffic on clat uid." am: bd73798585 am: cb53e78f56
am: 3c6bc9b14d

Change-Id: I1ac85ac863026ea99117c5b0115bcc0c9144fb7b
2019-01-04 08:47:41 -08:00
TreeHugger Robot
968285a043 Merge "Support fs-verity signature in installer session" 2019-01-04 16:38:47 +00:00
Junyu Lai
3c6bc9b14d Merge "Ignore ipv6 tx traffic on clat uid." am: bd73798585
am: cb53e78f56

Change-Id: I0f289ce46462f494adb99628bd504cafb584eeeb
2019-01-04 08:30:44 -08:00
Jorim Jaggi
cfd6f3b407 A brave new world for window insets (7/n)
Ensure that the client visibility state affects other subsystems,
like accessibility as well as input.

Test: WindowStateTest
Bug: 118118435
Change-Id: I8a50a0b82dc76e578861967197350eaa3867f837
2019-01-04 17:30:23 +01:00
Junyu Lai
cb53e78f56 Merge "Ignore ipv6 tx traffic on clat uid."
am: bd73798585

Change-Id: I181c3c812caa9bcd359fbddf74d14adeb7e83419
2019-01-04 08:13:29 -08:00
Antoan Angelov
e9da9aa821 Merge "Update provisioning checksum javadoc with SHA-1 hash deprecation." 2019-01-04 16:11:29 +00:00
Matt Pape
7b1c6cda12 Update DeviceConfigService to pass Settings.AUTHORITY to IContentProvider.call invocations.
Also update SettingsProvider to resolve calling packages based on uids
when receiving calls to put or reset values in the config table. This
was necessary because the command line tool calls the DeviceConfig API,
which calls through to SettingsProvider. That was resulting in a
shell uid with an android package prior to this change.

Test: atest SettingsProviderTest:DeviceConfigServiceTest
Bug: 122304633

Change-Id: Ic80c734eb75dcaac688507c241b0995b7488a84f
2019-01-04 08:10:41 -08:00
arangelov
c2f4c1dbbf Update provisioning checksum javadoc with SHA-1 hash deprecation.
Test: none
Bug: 122346210
Change-Id: I0240be35240be685c5f40309c1b20efcd1255617
2019-01-04 14:45:10 +00:00
Michal Karpinski
4ea8d6188c Merge "Block activity starts from background when realCallingUid is a persistent system process and the start wasn't explicitly whitelisted by the sender" 2019-01-04 12:57:45 +00:00