The state is only kept up-to-date for staged sessions. Clients are in
charge of checking whether the session has the isStaged bit set, before
considering reading the StagedSessionState associated to that session.
Test: retrieved mock staged session from a small app and verified state
is correctly set.
Bug: 118865310
Bug: 112669193
Bug: 120487127
Change-Id: I03590476dc353fee6d6edffb7ae579a9f9664664
Add a new config value for recording the component name of secondary
launcher.
This secondary launcher with corresponding launch mode set in
AndroidManifest could be used on secondary displays that support system
decorations.
OEMs can easily replace their own secondary launcher by overlay it.
Bug: 118206886
Bug: 111363427
Test: atest RootActivityContainerTests
Test: atest ActivityManagerMultiDisplayTests
Change-Id: Iceab096fd369127231f2085313ee617c7cdea226
- Get rid of activity-level events.
- Renamed InteractionSessionId and InteractionContext to
ContentCaptureSessionId and ContentCaptureContext (and made them public)
- Create the explicit concept of ContentCaptureSesssion (and moved notification
APIs to it).
- Added APIs to let apps create new sessions (not implemented yet).
- Added APIs to remove user data based on some context properties (like URI).
The reasoning behind this change is to let app developers explicitly associate
the captured content with some app-level domain (and also let the app ask the
service to clear such data at user's request). For example, a browser app
(and WebView) can use these APIs to associate the content capture events with
the URL being rendered.
Bug: 117944706
Fixes: 121034139
Test: atest CtsContentCaptureServiceTestCases
Test: m update-api && m
Change-Id: I7841da303b6a39c825651b03a07e3081fbd0bdf5
Initial prototype disabling location/sensors and enabling airplane mode.
Camera/Mic will come in a followup.
Test: manual
Bug: 110842805
Change-Id: I26132fcc9ffea83e3e78a0e54882d23c99ee590c
Adds logic to enforce a minimum aspect ratio and a new manifest
attribute for requesting a minimum aspect ratio.
Bug: 120129697
Test: atest AspectRatioTests
Change-Id: Ie714541241dcdfae2bdf3bfd969a4e26829fbb4b
Bug: 115639644
Test: Fingerprint still works on older devices
Test: atest FingerprintFeatureCompatTest
Change-Id: I6c316e183f90c8c84179a0f0488f41c130bfd25f
Relax the requirement on 'idmap2 --scan' to exit normally (as defined by
WIFEXITED) when starting a process. This allows the process to continue
booting, but with the caveat that no static="true" overlays targeting
"android" will be loaded.
The booting process is usually Zygote but can be an app that uses a
wrap.sh script (see https://d.android.com/ndk/guides/wrap-script).
Because SELinux rules prevent most processes from executing
/system/bin/idmap2, 'idmap2 --scan' will fail for "wrapped" apps.
Bug: 120854885
Test: atest CtsWrapWrapDebugTestCases CtsWrapWrapDebugMallocDebugTestCases
Change-Id: I85225cbcdd945f0026879e89f481d733217825d5
A single provider may offer multiple authorities, so we now pass along
the authority being requested. However, we need to validate that the
authority is actually serviced by the provider, similar to what we do
in validateIncomingUri().
Bug: 120673301
Test: atest android.content.cts
Test: atest android.provider.cts
Change-Id: Ia9734a42558ee9d46dc54f7e12b596cf03a520f5
Implements the PackageManager's getModuleInfo and getInstalledModules
API. These APIs are now backed by XML metadata that's parsed from a
"module metadata" provider package. The package name for the module
metadata package is stored in the config_defaultModuleMetadataProvider
config value.
The module metadata provider must contain a <metadata> entry for its
<application> tag. The meta-data entry must contain a single key
android.content.pm.MODULE_METADATA whose value is a reference to an
XML resource that contains metadata about the list of modules on a
given device.
The XML document must consist of a single top level <module-metadata>
element with one or more children. Each of these children are <module>
elements. The <module> elements must contain each of the following
attributes :
name : A resource reference to a User visible package name, maps to
ModuleInfo#getName
packageName : The package name of the module, see ModuleInfo#getPackageName
isHidden : Whether the module is hidden, see ModuleInfo#isHidden
Example :
<module-metadata>
<module name="@string/resource" packageName="package_name" isHidden="false|true" />
<module .... />
</module-metadata>
The module metadata is parsed eagerly and cached during system server
startup.
Test: atest FrameworksServicesTests:com.android.server.pm.ModuleInfoProviderTest
Change-Id: I0251c3f7429c42e3cce863eeeea792579dffecfb
This change adds the system APIs to query intent components and
application info, which is required for the Default apps UI in
permission controller to work for work profile.
Bug: 110557011
Test: build
Change-Id: I7e2d92f9ccae2e764a1ce0040a7f84bc4f21dbb5
Previously a Device Owner or an affliated Profile Owner of the DO can silently
install APKs via PackageInstaller APIs. This CL additionally grants delegates
of DO the same access.
Bug: 112982695
Test: atest com.android.cts.devicepolicy.MixedProfileOwnerTest#testDelegation
Test: atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDelegation
Test: atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testDelegation
Change-Id: I777ee6aa1ecd036ee56270fc6b4e86b74d1042a6
If an app declares that is has flagile user data, all the user to choose
to keep the app-data on uninstall.
Test: Unistalled apps that set the new flag and app that did not.
Verified that the KEEP_DATA flag was set when checkbox was
clicked.
Change-Id: I032fb21854352bbc175934ae5eb68a1430b1d403
Fixes: 117578306
This is due to being compatible with other RCS related changes by breadley@
Reviwed in aosp/840289, CP'ed here due to merge conflict.
Test: Existing tests pass
Bug: 109759350
Change-Id: Id56df22e9c313c5e0700eda3b2c489d2f84ea0cd
The ModuleInfo class contains details about mainline modules. We're
not sure about what kind of information we'll need, so, creating
a placeholder structure and accessor methods that can be adjusted
later.
While the package manager does not know anything about what a "module"
is, we use the package manager as convenience to not creating a new
MainlineManager class.
Bug: 119220828
Test: Workspace still builds
Change-Id: I42cbc5e119652edd3eda155ddef861e3e0889479
This CL just adds the isStaged setting on SessionParams, and if it is
set the session info are cached in a local variable. This allows
getStagedSession() (new APIs) to return the session information.
This should unblock upstream development while we implement the feature.
Test: adb install --staged, adb install-multi-package --staged. Wrote
small app to verify getStagedSessions returns correct info.
Bug: 118865310
Bug: 112669193
Bug: 120487127
Change-Id: I822be9e1737fe5cde6a6dd63621631cdef4f6fff
Offer an explicit DELETE_CONTRIBUTED_MEDIA flag that can be used when
uninstalling an app to indicate that any contributed media should be
deleted.
Adjust APIs to accept a specific UserHandle so we can pre-flight
check for valid UserManager state.
Bug: 116344240
Test: atest android.provider.cts.MediaStoreTest
Change-Id: Ief0ba27c913791d60f86a5d7252525c9c4539fc6
Similar to what we've done for services like the installer, verifier,
and text classifier, we're creating a new permission protection level
for the "document manager" on the device, called the "documenter" in
this change.
There should be exactly one "documenter" on the device, since it
handles the sensitive MANAGE_DOCUMENTS permission.
Bug: 117745631
Test: atest CtsPermission2TestCases
Test: atest android.permission.cts.ProviderPermissionTest
Change-Id: I92c9fcfee24feae8dc3a7516cde093e8f3bf0e56
Changed PackageManager#getWellbeingPackage from System to Test API since
the related GTS using the API is now being built against the test sdk.
Bug: 119330345
Test: atest com.google.android.wellbeing.permissionpolicy.gts.WellbeingPermissionPolicyTest
Change-Id: Id80f52a327f3faa292e7c647cac2b1fa0e03275f
Bug: 120096113
Test: Build with built-in libraries that declares new depedency flag, no
more boot errors (tested with cheets_x86_64 and crosshatch_userdebug)
Change-Id: I6b3e2ab7626ed8f04c0bf1a5b3c32204a2f2c56b
* Expose getCache and putCache to @Public. Filed a bug
b/117636111 to implement the maximum bounds
* Expose getTypeDrawable to @SystemApi
Change-Id: I81ab2e2198d2da1a2fa1c327ed7f9f66cb999755
Fix: 117636111
Test: make
If a system component calls to a remote provider, and that provider
hangs, we end up burning that Binder thread until the remote process
is killed for some unrelated reason.
This change adds an API to detect these hangs, and kill the remote
process after a specific timeout, but only when the caller holds a
permission that lets them kill other apps.
Bug: 117635768
Test: atest android.content.cts.ContentResolverTest
Change-Id: I81b0d993d9d585cdeb5e2559c68052ba6cbbced9
Accepting only ContentResolver arguments was quite limiting, so use
the newly created super-interface ContentInterface, which lets
callers use a ContentResolver, and ContentProviderClient, or even a
specific ContentProvider.
This is a safe API change, since we're accepting a more-general
argument, and existing API users can continue passing ContentResolver
to these methods.
Bug: 117635768
Test: atest DocumentsUITests
Test: atest android.appsecurity.cts.DocumentsTest
Change-Id: I8f0cd1335c9b763dd81eeb237fb0517e9073b625
Existing APIs that accept a ContentResolver are too restrictive when
the caller has their own ContentProviderClient already bound and
configured, so we're in the market for a solution to open those
existing APIs to accept a wider range of inputs.
The solution we've come up with is to introduce a super-interface
which contains the common ContentProvider APIs, and then make
ContentProvider, ContentResolver, and ContentProviderClient all
implement that interface for consistency.
After this change lands, we can then safely relax existing APIs to
accept this new ContentInterface, offering a clean path to solving
the problem outlined above.
Bug: 117635768
Test: atest android.content.cts
Test: atest android.provider.cts
Change-Id: Ic5ae08107f7dd3dd23dcaec2df40c16543e0d86e
Exempted-From-Owner-Approval: keep tests working
Permissions that have the new wellbeing protection flag will be granted
to the wellbeing app, as defined by the OEM in the system resource.
The ACCESS_INSTANT_APPS permission is updated to use the wellbeing
flag. The SUSPEND_APPS permission will also follow the same model now.
Bug: 119330345
Test: atest CtsPermission2TestCases:PermissionPolicyTest
Test: atest com.android.server.pm.SuspendPackagesTest
Test: atest com.google.android.suspendapps.permissionpolicy.gts.SuspendAppsPermissionPolicyTest
Change-Id: Iffedc7704824292be48a4ef198fff97c1e5c39da
Introduced a new INTERACT_ACROSS_PROFILES privileged permission which
allows an application to start a managed profile activity from its personal
profile activity.
Added CrossProfileApps#startAnyActivity(ComponentName, UserHandle) which
requires the INTERACT_ACROSS_PROFILES permission and enables an app from
a personal profile to launch an activity within its managed profile app.
Bug: 118186373
Test: atest com.android.server.pm.CrossProfileAppsServiceImplTest
Test: atest cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/CrossProfileAppsHostSideTest.java
Change-Id: I28aa05c7e54f60eb6144275d31eaf8813e2f10ad