Commit Graph

7887 Commits

Author SHA1 Message Date
Hai Zhang
8ef5712f8a Merge "Add FLAG_PERMISSION_GRANTED_BY_ROLE." into qt-dev
am: 9ab1a0daf3

Change-Id: I56007c9fa5c27bc6429e98891da3ab04b830b26e
2019-04-30 09:12:45 -07:00
Robert Sesek
bf7098c77c Merge "Restrict bindIsolatedService instanceName to just letters, digits, '_', and '.'" into qt-dev
am: da64a2a49f

Change-Id: I314e1b3a4c41d042b95642fafe93aa07b361ae5e
2019-04-30 03:42:02 -07:00
Hai Zhang
9ab1a0daf3 Merge "Add FLAG_PERMISSION_GRANTED_BY_ROLE." into qt-dev 2019-04-28 14:41:09 +00:00
Hai Zhang
e617076fb5 Add FLAG_PERMISSION_GRANTED_BY_ROLE.
We need a flag to track permissions granted by role, otherwise upon
revocation we might revoke permission that was already granted before
the role is granted.

Bug: 124452117
Bug: 130231314
Bug: 131252995
Test: presubmit
Change-Id: I0abd89756e8dc943c19d18315a8dcc6890f6fd2d
2019-04-26 23:56:58 +08:00
Mårten Kongstad
802013d73b Merge "Fix broken test case 'testOverlayInfoStateTransitions'" into qt-dev
am: 22f79f250c

Change-Id: Id44dbec56c7355a3e67a95d452606c11da247546
2019-04-24 13:37:07 -07:00
Robert Sesek
e3a5bc6e0d Restrict bindIsolatedService instanceName to just letters, digits, '_', and '.'
Test: CtsAppTestCases:android.app.cts.ServiceTest
Bug: 130164289
Change-Id: I7d720fcf845631e300d8f1e8cc74d4efff182fda
2019-04-24 16:37:02 -04:00
Neil Fuller
01e95772de Merge "Switch to HexEncoding from ByteStringUtils" am: 6badf7c7da
am: 78ccbc3bec

Change-Id: Id4ca66a608a9df9fb357d5fd5e7179dc73cc8475
2019-04-24 06:19:51 -07:00
Neil Fuller
78ccbc3bec Merge "Switch to HexEncoding from ByteStringUtils"
am: 6badf7c7da

Change-Id: I0af52cb2289e1df89ac65fa01334d4e9de69e010
2019-04-24 06:08:15 -07:00
Mårten Kongstad
c49d524b0c Fix broken test case 'testOverlayInfoStateTransitions'
Commit e0b984e805 "Diff overlays between PackageManagerService and
OverlayManagerService" removed the OverlayInfo.STATE_TARGET_UPGRADING
state. Update the OverlayManagerServiceImplTests tests accordingly.

Bug: 130257545
Test: atest 'com.android.server.om.OverlayManagerServiceImplTests#testOverlayInfoStateTransitions'
Change-Id: I06fed8cfe4daf0206843d140ae7ab594cc89ab09
2019-04-24 02:24:31 -07:00
Svet Ganov
2224cb827f Address API council feedback
Test: manual

bug:130643623

Change-Id: I489f32858abfa4fe8eeda96cbb103d75e2a87551
2019-04-24 02:14:48 +00:00
Dianne Hackborn
3f5447d8ae Merge "Finish up Intent identifier implementation." into qt-dev 2019-04-23 22:43:34 +00:00
TreeHugger Robot
606f1c9ffb Merge "Vulkan Doc: update descriptions for Vulkan feature flags" into qt-dev 2019-04-23 02:04:05 +00:00
TreeHugger Robot
845d5ee587 Merge "Fixed content capture whitelist for specific activities." into qt-dev 2019-04-22 22:34:09 +00:00
Yiwei Zhang
c8231cb32d Vulkan Doc: update descriptions for Vulkan feature flags
Bug: 111695747
Test: build
Change-Id: I9ac897ef31cdf46c75a369866601062ba8033874
2019-04-22 13:18:14 -07:00
Dianne Hackborn
100838dc7f Finish up Intent identifier implementation.
- Add protobuf field.
- Fix documentation.

Fixes: 130365291
Fixes: 130802990
Test: manual
Change-Id: I851c220ec85e73f5bba55390a43304ee4805d0f9
2019-04-22 12:39:54 -07:00
Winson Chiu
a99ff5fa9a Merge changes I689ec523,Id249a185 into qt-dev
* changes:
  Delayed install completion
  Defer post-install resource clean up for 5 seconds
2019-04-22 14:35:50 +00:00
Felipe Leme
cbf7f26baa Fixed content capture whitelist for specific activities.
Test: manual verification (it cannot be fully verified using the current CTS setup)
Test: atest CtsContentCaptureServiceTestCases:android.contentcaptureservice.cts.WhitelistTest
Test: atest FrameworksCoreTests:android.content.ContentCaptureOptionsTest
Test: atest CtsContentCaptureServiceTestCases # sanity check
Test: m update-api

Fixes: 130573023
Merged-In: I2c76a01bd98c4154c4c59099f1368232d2dba80d
Change-Id: I2c76a01bd98c4154c4c59099f1368232d2dba80d
2019-04-19 20:25:45 -07:00
TreeHugger Robot
2cccdd6b84 Merge "DO NOT MERGE - Updated some javadocs." into qt-dev 2019-04-20 00:57:06 +00:00
TreeHugger Robot
50ac5dd435 Merge "Maintain legacy signatures" into qt-dev 2019-04-19 23:41:32 +00:00
Felipe Leme
8c2360b123 DO NOT MERGE - Updated some javadocs.
Test: make ds-docs

Bug: 130726495
Fixes: 130737893

Change-Id: Idaf50cb17b0668f3052d86f256d5428ba4e06a3c
2019-04-19 16:08:48 -07:00
Winson
23863be910 Delayed install completion
This change is an attempt at delaying the install complete callback
to the installer on a DONT_KILL install until the package indicates
that it as completed updating its classpath with the new APKs.

Bug: 80269951
Bug: 109751013

Test: manual test of dynamic delivery/instant apps

Merged-In: I689ec523522da37987cff9b1a67eaae9e5633ffb
Change-Id: I689ec523522da37987cff9b1a67eaae9e5633ffb
(cherry picked from commit abfc054c90)
2019-04-19 22:52:41 +00:00
Todd Kennedy
9c37cd2924 Maintain legacy signatures
The signature field is deprecated, but must still be populated. The
thought was that for APEX files [which is a new concept and thus
could use the new way to handle signatures] we could remove this
capability, but, it turns out Play relies on it.

Change-Id: I7096567082d4f798be1d3e6007122750453665ae
Fixes: 130827182
Test: Manual.
Test: Create sample app that dumped the signatures of an APEX
Test: Note that the signatures before this change were 'null' and set to something after this change
2019-04-19 20:19:40 +00:00
TreeHugger Robot
f96a3cbaa3 Merge "Add @TestApi to StatusBarManager @SystemApi methods" into qt-dev 2019-04-18 19:58:25 +00:00
Jeff Sharkey
6378402da1 Canonicalize default ringtones.
Bug: 130445562
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: Ia4dee2f5596147ac50b2393fccb8516cc43b0102
2019-04-17 23:49:57 +00:00
Evan Laird
418ba8f03e Add @TestApi to StatusBarManager @SystemApi methods
Enables CTS testing

Test: APIs are in api/test-current
Bug: 130178313
Change-Id: Ie408bc4399cf64018903ef122b8db1e6a9fa9fb1
2019-04-17 16:43:39 -04:00
Svetoslav Ganov
d21ce79b30 Merge "Make storage a restricted permission - framework" into qt-dev 2019-04-17 18:27:06 +00:00
Felipe Leme
17203cd88b Merge "Fixed AutofillOptions.isAugmentedAutofillEnabled to use the right client." into qt-dev 2019-04-17 03:43:59 +00:00
Felipe Leme
e5aa5ebd60 Fixed AutofillOptions.isAugmentedAutofillEnabled to use the right client.
Also removed ContentCaptureClient, which is not used anymore (it probably became obsolete with the
ContentCaptureOptions optimization).

Fixes: 130585342
Test: atest CtsAutoFillServiceTestCases:android.autofillservice.cts.augmented.AugmentedLoginNotImportantForAutofillActivityTest
Test: manual verification with Dialer app

Change-Id: I041922874fac749f1f5d49793f1ad3e26cc345d6
2019-04-16 13:14:41 -07:00
Svet Ganov
d563e937f2 Make storage a restricted permission - framework
This change makes storage a soft restricted permission. When the
permission is whitelisted for an app then hodlding it allows the
app to access the full SD card as on a P device. If howerver, the
permisison is not whitelisted for an app then holding it allows
accessing the visual/aural collections in media store while the
app would run in its own isolated storage sandbox.

This change also connects the opt in/out application attribute
to how external storage is mounted remocing temporary code. The
attribute was renamed to convey that opting in legacy mode is
not somethung that is desirable or would be available in the long
run.

White at this also fix the default state of app ops for restricted
permissions to avoid allowing ops for non requested restricted
permissions to every UID as component access could skip permission
checks by cannot skip app op checks.

bug:130327036

atest CtsPermission2TestCases
atest CtsPermissionTestCases
atest CtsAppOpsTestCases
atest atest CtsAppSecurityHostTestCases:android.appsecurity.cts.ExternalStorageHostTest
atest CtsAppSecurityHostTestCases:android.appsecurity.cts.PermissionsHostTest

Change-Id: Ibb23cbb6a5c66d9c3823cc13562a1b903b391ffd
2019-04-16 12:34:49 -07:00
Jeff Sharkey
fcec9952fc Handle any exception when allowing failures.
Bug: 113518608
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: I2f67b8016e6057cfd022899bbfba32c3db3a12aa
2019-04-16 13:34:41 -06:00
Jeff Sharkey
295ddbae78 Allow failures of applyBatch() operations.
In some cases, the supplier of ContentProviderOperation is okay
if certain operations fail, and they'd like ContentProviderResult
to tell them about the failures instead of aborting the remainder
of the transaction.

Start using this for ModernMediaScanner, where we probably raced
with someone when building an UPSERT-style operation.  We'll
pick up any changes to those files during the next scan.

Bug: 128494336
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: Ida8230ff2bbb3bab56eb83928e49e7097bfbc9fd
2019-04-15 18:55:00 -06:00
Dianne Hackborn
91ada88e84 Merge "Add "identifier" concept to Intent." into qt-dev 2019-04-14 21:17:58 +00:00
TreeHugger Robot
9b948e0ba3 Merge "Cleans up PackageInstaller.Session docs" into qt-dev 2019-04-13 01:54:23 +00:00
Dianne Hackborn
3c2758d99d Add "identifier" concept to Intent.
Still need to add protobuf part.

Test: atest CtsContentTestCases:IntentTest
Bug:  130365291
Change-Id: Icfead9b50475471eb25fc49713b080d2a150e9c4
2019-04-12 09:55:45 -07:00
Nandana Dutt
8a69e0b393 Merge "Expose bugreporting service name" into qt-dev 2019-04-12 10:48:44 +00:00
TreeHugger Robot
116ca5db5b Merge "Adds sanity checks to session commit and abandon" into qt-dev 2019-04-12 00:07:21 +00:00
TreeHugger Robot
e54aa32b9c Merge "[RTT] Clean up doc" into qt-dev 2019-04-11 22:36:39 +00:00
Patrick Baumann
2e887a1b5c Cleans up PackageInstaller.Session docs
This change addresses API council feedback by making the
PackageInstaller#Session reference to setMultiPackage() consistent with
the implementation and the method doc.

Fixes: 124326154
Test: atest AtomicInstallTest
Change-Id: I5ef1ebb715ea33a6070ac431c18a9c661b5df00a
2019-04-11 21:25:57 +00:00
Patrick Baumann
00321b7026 Adds sanity checks to session commit and abandon
This change ensures we cannot commit or abandon a child session that has
been added to a parent session. It also ensures that a child session
being added to a parent has not already been added to another parent and
that it has not yet been committed or destroyed.

Fixes: 129534286
Test: atest CtsAtomicInstallTestCases:AtomicInstallTest
Change-Id: Id1b3524acb5bf546f7239ae644fb3080c0d3128b
2019-04-11 11:07:13 -07:00
Nandana Dutt
d7e8d5a108 Expose bugreporting service name
Also add @TestApi so GTS tests can be written.

BUG: 123578274
Test: builds
Change-Id: Ia43edb8aecbdd7138468a92692a2e0bd72379bdf
2019-04-11 16:57:39 +00:00
Etan Cohen
f4062a93c5 [RTT] Clean up doc
Bug: 130329871
Test: N/A
Change-Id: Ia8c95cdaf98e121f01fc4409cd557735168171ec
2019-04-11 07:00:42 -07:00
Neil Fuller
2c7cc6e5a7 Switch to HexEncoding from ByteStringUtils
Migration in preparation for deletion of ByteStringUtils.

Bug: 124232146
Test: build only
Change-Id: I738cd82a6472c5fadfc0f11ed87559cb905b30ba
2019-04-11 11:04:06 +01:00
TreeHugger Robot
b73580d2fa Merge "Revert "Remove overlay logic from package manager and parser"" into qt-dev 2019-04-11 04:12:23 +00:00
Nikita Ioffe
7d7583e421 Merge "Improve documentation for getActiveStagedSession API" into qt-dev 2019-04-10 23:04:15 +00:00
Jack He
61034792b4 Revert "Remove overlay logic from package manager and parser"
This reverts commit c6778e5435.

Reason for revert: This CL causes Bluetooth fail to start

Bluetooth Java services cannot turn on.

Change-Id: I4a9649d61de7781d3a00074da780c3a5a1dfbd56
Fixes: 130260055
Test: compile, BluetoothInstrumentationTests
2019-04-10 23:01:45 +00:00
Winson
7a3d82a581 Close ApkAssets in PackageParser
Immediately closes ApkAssets to free up some memory during package
parsing/install process.

This is used instead of implementing AutoCloseable because of
complexities with AssetManager and tracking assets opened
outside of the ApkAssets.java class.

Explained more in b/72056911.

Test: manually booted emulator; closing ApkAssets is used at
boot in PackageParser#parseApkLiteInner
Test: adb install test.apk && sleep 5 && adb uninstall test.package
&& sleep 1 && (adb shell lsof | grep "test.package") prints no
system_server references

Bug: 130182148

Change-Id: Ia471d7065e65bd39b535309de6c6da7ec35bdf12
2019-04-10 19:00:35 +00:00
Nikita Ioffe
05305027e1 Improve documentation for getActiveStagedSession API
Addressing API review in b/130224237.

Test: n/a
Bug: 130224237
Fixes: 130224237
Change-Id: Ic543412acdadfd08a0929ebff4b8e36567481e48
2019-04-10 17:26:35 +01:00
Jeff Sharkey
191114330a Merge "Refactor s/TypeInfo/MimeTypeInfo/ per feedback." into qt-dev 2019-04-10 15:09:33 +00:00
Jeff Sharkey
0185ea0802 Refactor s/TypeInfo/MimeTypeInfo/ per feedback.
Bug: 128903949
Test: atest android.content.cts.ContentResolverTest
Change-Id: Idb9e63a68dc9ffe0c35ad3e6bff55aaa10320e81
2019-04-10 00:04:27 -06:00
Mårten Kongstad
c6778e5435 Remove overlay logic from package manager and parser
Consolidate all knowledge about overlays to the overlay manager (except
static RROs that target "android": these are handled from native code in
order to be loaded as part of Zygote boot).

This removes the ability to overlay AndroidManifest.xml. There are some
use-cases where overlaying a manifest makes sense [e.g. changing an
app's label or icon or what components should be enabled by default] but
the opposite is also true [e.g. permissions]. Support for manifests can
be introduced again gradually with these goals in mind:

  - should not happen during parsing [which represents the immutable
    truth as read from disk]

  - should happen during scanning [which applies mutable settings to a
    parsed package]

  - be limited in what can be modified

Bug: 78808368
Test: builds, boots
Change-Id: I12c16fce65b1e68876f0c9acd7e2a61405e64435
(cherry picked from commit 588784dc25)
2019-04-09 22:18:17 +00:00