Commit Graph

7117 Commits

Author SHA1 Message Date
TreeHugger Robot
8dac427f33 Merge "Add new intent to signal that device customization is ready" 2018-11-29 15:05:22 +00:00
Martijn Coenen
ce871128cd Merge "Add useAppZygote attibute to <service>." 2018-11-28 08:25:20 +00:00
TreeHugger Robot
bf8d834647 Merge "Switch to idmap2" 2018-11-28 03:42:44 +00:00
Mårten Kongstad
fd20b8387d Add new intent to signal that device customization is ready
Add a new intent to be broadcast when a new configuration has been
installed to signal that it is time to reboot the modem, refresh caches,
etc. To receive the intent, recipients must hold the new permission
"android.permission.RECEIVE_DEVICE_CUSTOMIZATION_READY".

This CL registers the intent, but does not send it: that is the
responsibility of the customization client, e.g. Phonesky. The sender is
expected to call PackageManager.sendDeviceCustomizationReadyBroadcast
and hold the new permission "android.permission.SEND_DEVICE_CUSTOMIZATION_READY".

Bug: 118462251
Test: manual (custom apps)
Change-Id: I9a723ca9ade16e8c5d316efbc7effd01e13ff2e7
2018-11-27 15:00:27 -08:00
TreeHugger Robot
dbbcf07ec5 Merge "Removes ASEC-related logic from the framework" 2018-11-27 22:32:35 +00:00
TreeHugger Robot
e3a6d9450a Merge "Add "dictionary" entity type" 2018-11-27 21:51:45 +00:00
Mårten Kongstad
b87b507248 Switch to idmap2
Switch from idmap to idmap2.

This CL is the safety pin for idmap2. If idmap2 causes issues during
dogfooding it is easy go back to idmap by reverting this CL.

Once idmap2 has proven itself during a suitable period of time, the
FEATURE_FLAG_IDMAP2 flag and the obsolete idmap code will be removed.

Also add an .rc file to tell init to launch idmap2d.

Bug: 78815803
Test: atest OverlayDeviceTests OverlayHostTests
Change-Id: I5ca1388ac2f8a9379fed0c257247d351a5c7a3c4
2018-11-27 13:37:34 -08:00
Patrick Baumann
fc2851e4d5 Removes ASEC-related logic from the framework
This change removes remaining ASEC-related logic from the framework in
preparation for install refactoring.

Bug: 109941548
Test: install still works
Change-Id: Ic7322038e45c026bcc59800a5a9fafdbb461021f
2018-11-27 12:56:14 -08:00
Tony Mak
e1f3ac064c Add "dictionary" entity type
We will classify the word as "dictionary" if we think user may want to look
it up. A "Dictionary" option will be shown in the floating toolbar
if users select words of this entity type.

A new Intent action is introduced to bring up the dictionary app.

The model that supports this entity type is not checked-in yet.
So no behavior change can be seen for now.

Test: Check-in the WIP model and try to select a "dictionary word".
Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/IntentFactoryTest.java

BUG: 68238822

Change-Id: Ib318d5b2abf79d61e55b33e397065a0714573121
2018-11-27 18:20:10 +00:00
Martijn Coenen
e066c5c1d4 Add useAppZygote attibute to <service>.
To allow isolated services to indicate that they want to spawn
from an application zygote instead of the regular zygote.

Bug: 111434506
Test: builds
Change-Id: I181cb1111169e195879a5f481b675956e383251e
2018-11-27 19:09:19 +01:00
TreeHugger Robot
9ba4a5ceea Merge "Remove unneeded API." 2018-11-27 15:55:11 +00:00
Jeff Sharkey
a789183401 Merge "Iterate on storage permissions model." 2018-11-27 15:51:14 +00:00
Abodunrinwa Toki
8df4152469 Merge "Introduce Translate intent." 2018-11-27 12:09:26 +00:00
Joel Galenson
df0a90befd Remove unneeded API.
jsharkey pointed out that this functionality can be replicated through
Context.createPackageContextAsUser().getPackageManager().getPackageInfo(),
so this isn't needed anymore.

Bug: 119811056
Test: Replace callers of this API.
Change-Id: I72b54b9dbe6b66f360bd5105a8628c28d92f9ed2
2018-11-26 13:36:06 -08:00
Jeff Sharkey
9787a9459d Iterate on storage permissions model.
This change updates the permissions design to use app-ops for
controlling write access, which is only extended to the default app
for a particular collection type.

Bug: 119713234
Test: atest android.appsecurity.cts.PermissionsHostTest
Test: atest android.appsecurity.cts.ExternalStorageHostTest
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I40811ff175b3b8410b58ed901948a23a56f8a8c2
2018-11-26 12:00:35 -07:00
Jeff Sharkey
0430c3ceef Merge "Use ALLOCATOR_SOFTWARE with ImageDecoder" 2018-11-26 16:54:52 +00:00
TreeHugger Robot
457333a54a Merge "Add a new getPackageInfoAsUser as a SystemApi." 2018-11-23 15:05:59 +00:00
Nicolas Geoffray
850f109ec8 Merge "Start using shared libraries class loader." 2018-11-22 10:24:38 +00:00
Nicolas Geoffray
8d144eb8bd Start using shared libraries class loader.
Change 1/2. Change 2/2 will setup the class loader namespace for
shared libraries.

This change sets up shared libraries class loaders for applications
and for dexopt.

bug: 111174995
Test: DexoptUtilsTest, device boots

Change-Id: Ie9a2b4eaa85cda59951703433f7a2d03bc12095d
2018-11-22 10:06:41 +00:00
Joel Galenson
ad219787cc Add a new getPackageInfoAsUser as a SystemApi.
This is needed so the PermissionController can differentiate between
multiple versions of the same app.

Bug: 119811056
Test: Call API.
Change-Id: I19150e1c8e5f204a846500cfe0021da742235213
2018-11-21 15:25:17 -08:00
Abodunrinwa Toki
4bad09cd1d Introduce Translate intent.
Action: ACTION_TRANSLATE
Text: EXTRA_TEXT

TODO: Consider introducing a "translate" schema to pass the text to
translate instead of using a string extra to define this.

Bug: 116020587
Test: manually tested by selecting foreign language text and watching
      for a "Translate" action.
Change-Id: I046157f4b3e1aa60afaf3f123fdeecf406f712dc
2018-11-21 21:01:17 +00:00
Dianne Hackborn
a631d56cf3 Add new API to performing grouping and ordering of bindings.
This will allow apps to better manage many isolated processes,
telling the system how they are grouped together (so should be
managed as one related entity within the LRU cache) and fine-tune
the ordering within that group.

The API is not yet tested...  though in theory it is implemented.
But the implementation done for that also fixes a *lot* of problems
with activity LRU management that, even without groups, should
make the ordering of processes in the LRU list much more consistently
match how recently the user has interacted with it.

Also clean up some of the new dumpsys output in the activity manager:
move the new sections to before the process output (so it is still
easy to see the process state at the end of the output), and add and
document the command line options for controlling them.  And add a
new "lru" section that gives a clear view of what is going on with
the raw LRU list.

An upcoming change will add tests for the new grouping functionality,
and probably some fixes resulting from that.

Test: atest CtsAppTestCases:ServiceTest
Bug: 111434506
Change-Id: I1f6b6b9de66ccde1573e1a0e9615e8c5f8e6c0d7
2018-11-21 09:13:21 -08:00
TreeHugger Robot
5a31e0e77d Merge "Add Intent#EXTRA_CONTENT_QUERY." 2018-11-19 22:52:11 +00:00
Leon Scroggins III
19ff0c57d5 Use ALLOCATOR_SOFTWARE with ImageDecoder
Bug: 119510493
Test: atest FrameworksCoreTests:android.content.ContentResolverTest

An app may want to draw this thumbnail to a software canvas, so use the
software allocator to support that.

Change-Id: Ib789e0bf98c3638c61c43fe6cd7d504cdfe02ced
2018-11-19 14:08:52 -05:00
Dario Freni
cb7a68d29a Add MATCH_APEX flag to getInstalledPackages.
If set, PackageManager will query apexservice and ask for activated
packages.

Test: wrote a small app to test the new query.
Bug: 117589375
Change-Id: I498bd97896f3eab65c88e9684874a30713be585e
2018-11-19 18:51:21 +00:00
Amin Shaikh
710d123010 Add Intent#EXTRA_CONTENT_QUERY.
Fixes: 119269845
Test: make
Change-Id: I849d0ca62a222b8cabb8cb0e71eb6b016026cc0c
2018-11-19 12:51:13 -05:00
Jeff Sharkey
b4f51b5d81 Only use ALLOCATOR_DEFAULT when apps target Q.
Bug: 119510493
Test: manual
Change-Id: Icd7acfd9f899dce46b24db2156acbb3a98b409c8
2018-11-18 16:10:17 -07:00
TreeHugger Robot
e2dc21e1a3 Merge "Exposing canSuspendPackage as SystemApi" 2018-11-16 21:05:46 +00:00
TreeHugger Robot
db54beb98c Merge "Prepare for switch to idmap2" 2018-11-15 23:37:04 +00:00
Ivan Chiang
9d2ae77ce7 Merge "Extend DocumentsContract search to accept mime types" 2018-11-15 11:07:38 +00:00
TreeHugger Robot
8d130a1e3b Merge "Nullability for Intent get/put extra methods" 2018-11-15 07:26:13 +00:00
Suprabh Shukla
1f1de70fad Exposing canSuspendPackage as SystemApi
Exposing canSuspendPackage so apps with SUSPEND_APPS can query whether a
package is considered too critical to suspend by the system.

Test: atest GtsSuspendAppsTestCases

Fixes: 117968270
Change-Id: I9c316dae7e7a7259d28e271c3901465244d6c93d
2018-11-14 17:15:39 -08:00
Ivan Chiang
a972d0449a Extend DocumentsContract search to accept mime types
1. Add the key of query arguments and match method
   in DocumentsContract.
2. Implement new querySearchDocuments method in
   DocumentsProvider, ExternalStoragProvider and
   FileSystemProvider.

Bug: 111786939
Test: Manual Test
Change-Id: I04e9f2be971f10ac1e9584a3486c948aaddea0a4
2018-11-14 15:06:35 +08:00
Dianne Hackborn
27b4d94a07 Implement naming of isolated service bindings.
This allows clients to run multiple instances of the same
manifest service declaration.  It only works for isolated
services, to avoid too much abuse temptation.  This is part
of the "Chrome site isolation" work, to allow chrome to have
many more render processes running and help it manage them.

Bug: 111434506
Test: atest CtsAppTestCases:ServiceTest
Change-Id: I22e65758678a07075ed32ed6463082ddf846d3a4
2018-11-13 16:03:02 -08:00
Andrey Kulikov
641c15cb11 Nullability for Intent get/put extra methods
There are annotations for Bundle.get*() and Bundle.put*() but appropriate methods in android.content.Intent are not marked as Nullable.
Covering this methods with an annotations will help developers using Kotlin to avoid runtime nullability bugs.

Bug: 119486972
Test: n/a
Change-Id: I7f1db84d732a3106473ece0f521c48769b2baf2f
2018-11-13 19:07:48 +00:00
Sahin Caliskan
4c070fa443 Merge "Fix RcsManager and add empty RcsThread class" 2018-11-13 16:17:06 +00:00
David Brazdil
0215bc8af3 Merge "Simplify HIDDEN_API_ENFORCEMENT_ flags" 2018-11-13 15:50:41 +00:00
Sahin Caliskan
9458ebccfc Fix RcsManager and add empty RcsThread class
This change fixes the RcsManager setup and adds an empty RcsThread class. Please see go/rcs-in-telephony-doc for details.

Test: Builds fine
Bug: 109759350
Change-Id: Ie3fe476ab11d515ffab6dcc6ccf5ec801a4c9057
2018-11-12 15:52:54 -08:00
Mårten Kongstad
06a1ac8229 Prepare for switch to idmap2
Prepare the idmap and asset managers for interfacing with idmap2 instead
of today's installd + idmap pipeline, but don't make the switch just
yet.

Instead, idmap2 runs as its own native daemon with an AIDL interface.
This removes the need for installd to fork and exec on each idmap call,
saving about 50 ms per call.

Bug: 78815803
Test: atest OverlayDeviceTests OverlayHostTests
Change-Id: I60852e15d99329896ff9de6559d1e7cd1c67e33d
2018-11-12 13:24:33 -08:00
TreeHugger Robot
c79ca1476b Merge "Q Upstream: Use ParcelFileDescriptor for storing large clip data." 2018-11-12 02:19:55 +00:00
Varun Shah
25eb63ac4a Merge "Exposes Intent.METADATA_SETUP_VERSION as SystemApi for SUW." 2018-11-10 00:23:56 +00:00
TreeHugger Robot
2f6bfcbd6f Merge "Calling opChanged on package suspend / unsuspend" 2018-11-09 23:02:59 +00:00
Alan Stokes
07317d001c Merge "DexLoadReporter needs to handle arbitrary class loaders." am: f2d5ace011 am: 1e29264790
am: 0a0559c0ce

Change-Id: I3a89a9da435cf557fd296066df7b9c5b316e87c2
2018-11-09 14:23:00 -08:00
Philip P. Moltmann
cb35c807ea Merge "Allow location provider to deep link into permissions UI" 2018-11-09 17:29:35 +00:00
Alan Stokes
0a0559c0ce Merge "DexLoadReporter needs to handle arbitrary class loaders." am: f2d5ace011
am: 1e29264790

Change-Id: I41caab25c48d496722ac4d044908dd781df1705d
2018-11-09 03:20:40 -08:00
Satoshi Niwa
472371c6ad Q Upstream: Use ParcelFileDescriptor for storing large clip data.
This patch enables copy&paste-ing large data for Q and below.
Using content URI is the idiomatic way to transfer large data,
but none of the major editor apps (Docs, Evernote, Word, Gmail, etc.)
support content URI in clipboard as of today.
We will ask app developers to use content: URI and remove this function
in API 30 (R).

Bug: 111577843
Test: ClipboardManagerTest
Test: Manualy tested copying a large HTML text
Change-Id: If1798c5abcec691f4b17a45e583ed314b1c16ac2
2018-11-09 14:35:50 +09:00
Suprabh Shukla
3017fe4f51 Calling opChanged on package suspend / unsuspend
checkAudioOperation returned MODE_IGNORED when a package was suspended,
but any AppOpsWatcher registered for audio operation did not callback
when a package got suspended. This lead to inconsistent state for
services that were watching for app op changes.

Test: atest FrameworksServicesTests:SuspendPackagesTest

Bug: 112486945
Bug: 110077884
Change-Id: Ibfc378dd4ea8dd38ef002c1ac668c479afa8fd47
2018-11-08 19:40:13 -08:00
Philip P. Moltmann
64da5e6e44 Merge changes from topic "TestSplitRuntimePermissions"
* changes:
  Apply fg/bg state in default grant policy
  Do not inherit grant of background location
  Split permissions inherit state from their parents
  Have a map of background -> foreground permssions
  Give 'restorePermissionState' a better name
2018-11-08 22:57:43 +00:00
Philip P. Moltmann
17f65afe3b Split permissions inherit state from their parents
The old hack to grant permissions on upgrade was removed. The new code
applies to
- platfrom upgrade
- initial package installation
- package update

Inheriting the grant state is the default behavior for split permissions.
Special cases will be added later.

Also make sure to revoke the permission once the app declares that it is
aware of the permission.

Test: atest CtsPermissionTestCases:SplitPermissionTest
Change-Id: Ie51971530607f0b585cf7a3e11b01b11a28e1de9
2018-11-08 09:32:01 -08:00
Philip P. Moltmann
ed98828335 Allow location provider to deep link into permissions UI
Test: Built
Bug: 118437704
Change-Id: I566acaf09bad27a47ec3822816c136c01b18bfc9
2018-11-08 09:11:05 -08:00