Commit Graph

7243 Commits

Author SHA1 Message Date
Richard Uhler
474dffd225 Merge "Add RollbackManagerService" 2018-12-31 18:43:21 +00:00
Richard Uhler
b29f145505 Add RollbackManagerService
This change adds RollbackManagerService as a new system service for
managing apk level rollbacks.

To work properly this requires additional selinux policy changes. Fails
gracefully in case of selinux denials, until we have a chance to sort
out the proper selinux policy.

Bug: 112431924
Bug: 116512606
Test: atest RollbackTest, with selinux enforcement off.
Test: atest CtsPermission2TestCases:PermissionPolicyTest
Change-Id: Id72aae9c4d8da9aaab3922ec9233ba335bc0198f
2018-12-31 12:38:07 +00:00
Mathew Inwood
31755f94e1 Limit access to suspected false positives.
Members modified herein are suspected to be false positives: i.e. things
that were added to the greylist in P, but subsequent data analysis
suggests that they are not, in fact, used after all.

Add a maxTargetSdk=P to these APIs. This is lower-risk that simply
removing these things from the greylist, as none of out data sources are
perfect nor complete.

For APIs that are not supported yet by annotations, move them to
hiddenapi-greylist-max-p.txt instead which has the same effect.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: I020a9c09672ebcae64c5357abc4993e07e744687
2018-12-28 11:50:04 +00:00
Remi NGUYEN VAN
708c409598 Merge "Add NetworkStack app" am: d01eaecbd2 am: e1922923fc
am: 5673820f9b

Change-Id: Idcd7b9b6eb50a98bcee67f89b0112b91cd1b40fb
2018-12-25 17:21:18 -08:00
Remi NGUYEN VAN
5673820f9b Merge "Add NetworkStack app" am: d01eaecbd2
am: e1922923fc

Change-Id: Iebe5aa5ea7cd235b8a6e734bde0f9a14dce5acdc
2018-12-25 17:09:42 -08:00
Remi NGUYEN VAN
c094a5402c Add NetworkStack app
The app is not started yet, and does not contain any service for now.

Test: built, booted
Bug: b/112869080
Change-Id: Id5a0fd02c891100e85d86b1040e53beec3581950
2018-12-25 11:42:42 +09:00
TreeHugger Robot
317288d513 Merge "Add nullability to obtainStyledAttributes methods." 2018-12-21 20:19:34 +00:00
Dario Freni
ce3083dcb4 Merge "Send a broadcast for staged session state changes." 2018-12-21 16:17:41 +00:00
TreeHugger Robot
90a78ef003 Merge "Break shared library adds into populate and modify" 2018-12-21 14:00:54 +00:00
Patrick Baumann
34cf12c02c Break shared library adds into populate and modify
This change breaks current modification of shared lib state in the
system into object creation and a commit step so that multiple packages
may be interrogated before committing anything to the system.

Change-Id: I466d588be3e9690cffc8a04e025145d747fcbb2f
Bug: 109941548
Test: atest StaticSharedLibsHostTests
2018-12-20 11:46:01 -08:00
Dario Freni
e487ea2e0f Send a broadcast for staged session state changes.
Bug: 118865310
Bug: 112669193
Bug: 120487127
Test: wrote small app to receive broadcast, ran adb install --staged
some.apk and verified that the broadcast is received successfully.
Change-Id: Ib8672a03a0e7033bcdc0ffbbbb5c65b8929e8e08
2018-12-20 19:37:20 +00:00
TreeHugger Robot
b444a8b822 Merge "Add a state for Staged Sessions." 2018-12-20 13:19:54 +00:00
Aurimas Liutikas
77acf4bec1 Add nullability to obtainStyledAttributes methods.
Test: Manual inspection of the code and javadocs to make nullability
      annotations reflect the state of these methods.
Change-Id: I0baac0549c274213d99c7169033052c996eab122
2018-12-19 17:31:33 -08:00
Dario Freni
71eee5ef91 Add a state for Staged Sessions.
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
2018-12-19 20:36:51 +00:00
Chilun
2ef71f753c Add secondary launcher mechanism (1/3)
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
2018-12-18 11:20:26 +08:00
Kevin Chyn
2ae0e21c34 Merge "Move biometrics into biometric namespace" 2018-12-18 02:01:45 +00:00
Dario Freni
8aeec22e28 Merge "Implement ModuleInfoProvider" 2018-12-17 21:45:29 +00:00
TreeHugger Robot
56208f49dc Merge "Another round of changes on Content Capture." 2018-12-17 17:59:40 +00:00
Michael Groover
f1a5b6e0bf Merge changes from topic "SensorPrivacyMode"
* changes:
  Add SensorPrivacy constants to SettingsBackupTest
  Prototype Spaceship mode qstile
2018-12-15 18:07:26 +00:00
Felipe Leme
aa5088ede6 Another round of changes on Content Capture.
- 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
2018-12-14 18:02:24 -08:00
Chad Brubaker
90f391fe87 Prototype Spaceship mode qstile
Initial prototype disabling location/sensors and enabling airplane mode.
Camera/Mic will come in a followup.

Test: manual
Bug: 110842805
Change-Id: I26132fcc9ffea83e3e78a0e54882d23c99ee590c
2018-12-14 20:46:04 +00:00
Andrew Solovay
ad7477b192 docs: Fixing malformed javadoc
am: 6eaf48ea57

Change-Id: Idf8415ee4fb85e52d74e1f8bec8d0e2f8d1f58f1
2018-12-14 10:50:44 -08:00
Adrian Roos
917791e1d0 Add minAspectRatio
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
2018-12-14 16:13:27 +01:00
Todd Kennedy
bb28a036c3 Merge "Continue process boot even if 'idmap2 --scan' fails" 2018-12-14 14:41:57 +00:00
Kevin Chyn
5c5603d1e0 Move biometrics into biometric namespace
Bug: 115639644

Test: Fingerprint still works on older devices
Test: atest FingerprintFeatureCompatTest
Change-Id: I6c316e183f90c8c84179a0f0488f41c130bfd25f
2018-12-13 18:06:10 -08:00
Jeff Sharkey
1a842c20d8 Merge "Validate incoming authority values." 2018-12-14 01:00:10 +00:00
Andrew Solovay
6eaf48ea57 docs: Fixing malformed javadoc
Several @link & @see javadoc directives were malformed, resulting in the
Javadoc code being output to the HTML.

Staged to:

http://go/dac-stage/reference/android/app/slice/Slice.Builder
http://go/dac-stage/reference/android/app/slice/SliceProvider
http://go/dac-stage/reference/android/text/style/ImageSpan
http://go/dac-stage/reference/android/content/ContentProvider

Bug: 120743732
Test: make ds-docs
Change-Id: I589644f8d266a116441409fbdaf7a0c533e0e356
Merged-In: I589644f8d266a116441409fbdaf7a0c533e0e356
Exempt-From-Owner-Approval: Doc-only change
2018-12-14 00:11:19 +00:00
Sahin Caliskan
02278c9c53 Merge "Move RCS APIs to android.telephony.ims" am: 4929a0d782
am: 7c7dc29e8d

Change-Id: I2301681cd38c2d364c9e3a5bf94adb400065418c
2018-12-13 15:29:00 -08:00
Mårten Kongstad
f361123c87 Continue process boot even if 'idmap2 --scan' fails
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
2018-12-13 14:54:39 -08:00
Jeff Sharkey
2de00bf3d8 Validate incoming authority values.
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
2018-12-13 15:06:15 -07:00
Sahin Caliskan
4929a0d782 Merge "Move RCS APIs to android.telephony.ims" 2018-12-13 20:48:34 +00:00
Andrew Solovay
27e4346490 cherry-pick from pi-dev docs: Fixing malformed javadoc
Several @link & @see javadoc directives were malformed, resulting in the
Javadoc code being output to the HTML.

Staged to:

http://go/dac-stage/reference/android/app/slice/Slice.Builder
http://go/dac-stage/reference/android/app/slice/SliceProvider
http://go/dac-stage/reference/android/text/style/ImageSpan
http://go/dac-stage/reference/android/content/ContentProvider

Bug: 120743732
Test: make ds-docs
Change-Id: I589644f8d266a116441409fbdaf7a0c533e0e356
Exempt-From-Owner-Approval: Doc-only change
2018-12-13 11:45:21 -08:00
Narayan Kamath
2c828c1d98 Implement ModuleInfoProvider
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
2018-12-13 17:38:53 +00:00
Narayan Kamath
2c07da7945 Merge "Add ModuleInfo class" 2018-12-13 17:34:24 +00:00
Sahin Caliskan
7719db2b16 Move RCS APIs to android.telephony.ims
This is due to being compatible with other RCS related changes by by other engineers.
Test: Existing tests pass

Bug: 109759350
Change-Id: Id56df22e9c313c5e0700eda3b2c489d2f84ea0cd
Merged-In: Id56df22e9c313c5e0700eda3b2c489d2f84ea0cd
2018-12-13 16:50:28 +00:00
Sahin Caliskan
a37ca569b0 Merge "Move RCS APIs to android.telephony.ims" 2018-12-13 16:30:20 +00:00
TreeHugger Robot
e64ba8b491 Merge "fragileUserData-apps might keep data on uninstall" 2018-12-13 06:24:34 +00:00
TreeHugger Robot
6d2b0fd462 Merge "Implement DELEGATION_PACKAGE_INSTALLATION" 2018-12-13 01:20:15 +00:00
TreeHugger Robot
4510b4444f Merge "Add system APIs to query intent components and application info." 2018-12-12 23:53:49 +00:00
Hai Zhang
8c7e93b1d0 Add system APIs to query intent components and application info.
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
2018-12-12 23:49:35 +00:00
Rubin Xu
fd4a3b441b Implement DELEGATION_PACKAGE_INSTALLATION
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
2018-12-12 23:22:59 +00:00
Philip P. Moltmann
ae4a4b987b fragileUserData-apps might keep data on uninstall
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
2018-12-12 13:37:44 -08:00
Varun Shah
fcfb51fa4e Merge "Moved getWellbeingPackage() from SystemApi to TestApi." 2018-12-12 21:34:53 +00:00
Sahin Caliskan
84dd3061d9 Move RCS APIs to android.telephony.ims
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
2018-12-12 16:05:06 +00:00
Dario Freni
ec06c25360 Merge "Add Mock APIs for staged installs." 2018-12-12 11:55:01 +00:00
Todd Kennedy
3dbf83a23d Add ModuleInfo class
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
2018-12-12 10:19:03 +00:00
Dario Freni
aac4ba4b24 Add Mock APIs for staged installs.
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
2018-12-12 01:20:04 +00:00
Xin Li
15b123ef45 DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master
Bug: 120502534
Change-Id: Idc8bfb6d97a869b76cfb87ca1a494201baf9e8bd
2018-12-11 14:13:44 -08:00
Jeff Sharkey
05ab573f4a Merge "Define protection level for document manager." 2018-12-11 20:53:47 +00:00
Jeff Sharkey
b867b4c49e Merge "Iteration on contributed media APIs." 2018-12-11 18:49:20 +00:00