Commit Graph

7392 Commits

Author SHA1 Message Date
Dario Freni
5cccc2bd8e Merge "Add an error message to staged install session." 2019-01-25 14:21:56 +00:00
Dario Freni
275b4aba77 Add an error message to staged install session.
The enum itself might be a bit opaque when trying to debug what failed
during the staged session flow. Add an error message field so that the
caller can learn more about the failure, and also log this message on
logcat.

Bug: 118865310
Bug: 123360647
Test: atest PackageInstallerSessionTest; verified that error message is
written to install_sessions.xml and in logcat.

Change-Id: I45c8633f36d490c17c751a9037b90d3fd413c506
2019-01-25 10:02:44 +00:00
Mehdi Alizadeh
c8dfe98014 Merge "Use old API only if no share targets are published" 2019-01-25 00:37:26 +00:00
Mehdi Alizadeh
85fd3d5c8b Use old API only if no share targets are published
In ShareSheet, when querying Direct Share Targets using both old and new
APIs, only query via old API if the app is not publishing any share
targets in its resources (publishing via ShrotcutManager)

Bug: 111698461
Test: Manual test using test app
Change-Id: I4be46110ac4ae6de64a9675a19df5994c4fa65c8
2019-01-24 13:49:31 -08:00
Jeff Sharkey
f1a4991dcc Merge "Migrate CTS to separate broadcast to scan volume." 2019-01-24 16:25:57 +00:00
TreeHugger Robot
ce236a3a4a Merge "Add packageName to ApplicationInfo for APEX." 2019-01-24 14:30:41 +00:00
Varun Shah
52792d160a Merge "Added APIs for App Usage Limits." 2019-01-24 13:35:28 +00:00
Paul Duffin
9e06322720 Merge "Include OrgApacheHttpLegacyUpdater unconditionally" am: 87c1081c42 am: 34269e4b74
am: 455d2a92da

Change-Id: Id265410009bce1d9b2210aab39d84abe0eda9067
2019-01-24 04:12:06 -08:00
TreeHugger Robot
bf45956217 Merge "Expose an API to mark a session as APEX." 2019-01-24 12:01:41 +00:00
Dario Freni
50a21480d7 Add packageName to ApplicationInfo for APEX.
Bug: 123311165
Change-Id: I6bab5d06c7fd0b2d7e49c60cb793a4b621dfeff2
Fix: 123311165
Test: m; tested with custom app; atest PackageParserTest
2019-01-24 11:53:59 +00:00
Paul Duffin
455d2a92da Merge "Include OrgApacheHttpLegacyUpdater unconditionally" am: 87c1081c42
am: 34269e4b74

Change-Id: I19a0c5d9d9a2c2c0e5cf482a5a574f304a8ce765
2019-01-24 03:46:43 -08:00
Paul Duffin
87c1081c42 Merge "Include OrgApacheHttpLegacyUpdater unconditionally" 2019-01-24 11:12:47 +00:00
TreeHugger Robot
5b5f28b272 Merge "Skip dexopt if app has preferCodeIntegrity=true" 2019-01-24 10:19:23 +00:00
TreeHugger Robot
a800bfe9be Merge "Revert "Do not load xml metadata for unchanged packages in RegisteredServicesCache"" 2019-01-24 07:19:47 +00:00
Jeff Sharkey
50e74f1efd Migrate CTS to separate broadcast to scan volume.
It can't sent MEDIA_MOUNTED via the shell, so let's use a separate
broadcast.  Also improve robustness of several tests.

Bug: 123251175
Test: atest cts/tests/tests/media/src/android/media/cts/MediaScanner*
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I5b0f07c817b18175c6e427729a9fa0545f6bcd8e
2019-01-24 07:01:26 +00:00
Brad Ebinger
d1619e86c6 Merge "Add FEATURE_TELEPHONY_IMS definition" am: ad075a3837 am: 86999554ea
am: 93dd117ee6

Change-Id: Icb40054aaeab8921bc371129528b851e1af78e29
2019-01-23 21:42:08 -08:00
Brad Ebinger
93dd117ee6 Merge "Add FEATURE_TELEPHONY_IMS definition" am: ad075a3837
am: 86999554ea

Change-Id: Ie28a6a11a97dcff35f26dd003d495c14ceb67242
2019-01-23 21:17:22 -08:00
Varun Shah
2546cef56c Added APIs for App Usage Limits.
Added a new AppUsageLimit group observer which follows the same pattern as
other UsageGroups. This specific observer allows the launcher to query
for the AppUsageLimit, available via the new LauncherApps API below. The
observer can be registered and unregistered via the respective new APIs in
UsageStats.

LauncherApps has a new API which allows it to get the AppUsageLimit for
a specified package and user, initally set via the API in UsageStats.
This new API allows the launcher to query specifics about the limit such
as how much usage time the limit has, and how much total usage time is
remaining.

Bug: 117409586
Test: atest FrameworksServicesTests:AppTimeLimitControllerTests
Test: atest android.app.usage.cts.UsageStatsTest#testObserveUsagePermissionForRegisterObserver
Test: atest android.app.usage.cts.UsageStatsTest#testObserveUsagePermissionForUnregisterObserver
Test: manual (mmma frameworks/base/tests/UsageStatsTest/)
Change-Id: Ifaffab629409e9191e40404a949c8df70bd3f7cb
2019-01-23 20:30:25 -08:00
TreeHugger Robot
ea9ae25528 Merge "Fix attr inheritShowWhenLocked cannot read from manifest." 2019-01-24 03:01:56 +00:00
Zhi An Ng
c955e6f3da Revert "Do not load xml metadata for unchanged packages in RegisteredServicesCache"
This reverts commit 36de60dc32.

Reason for revert: broke account syncing b/122912184

Change-Id: I32940a4425f9e644843f6acf65b8f67d3629c24b
2019-01-24 02:59:07 +00:00
Brad Ebinger
4e65f803a3 Add FEATURE_TELEPHONY_IMS definition
Bug: 118823723
Test: manual
Change-Id: Ic1e65cfba8ecb117199db6ebd636e0d39007b6c6
2019-01-23 23:52:26 +00:00
TreeHugger Robot
c78f97002e Merge "Set ApplicationInfo (long)versionCode for APEX." 2019-01-23 21:54:33 +00:00
Dario Freni
3fa46d8679 Expose an API to mark a session as APEX.
Bug: 123255260
Test: m
Change-Id: I485e948fb7abf6d24db13225aa326100daa0efb5
2019-01-23 19:39:53 +00:00
Dario Freni
788ecb19e4 Set ApplicationInfo (long)versionCode for APEX.
PackageManagerShellCommand defaults to the versionCode contained in
PackageInfo.ApplicationInfo if ApplicationInfo is present. Set
longVersionCode to both PackageInfo and ApplicationInfo, and also change
PackageManagerShellCommand to use longVersionCode instead of the
deprecated versionCode.

Test: atest android.content.pm.PackageParserTest#testApexPackageInfoGeneration
Test: atest apex_e2e_tests
Bug: 123228186
Bug: 123086053
Change-Id: Ief32f708ba2fa997ac4175134db5bfac2e5eb1d2
2019-01-23 18:55:41 +00:00
Mathieu Chartier
43986e38b3 Merge "[view compilation] Add --compile-layouts flag to pm compile" am: 52cf4adf70
am: 581c43404a

Change-Id: Ie02b1129ee81a1346a775d1873531e3f714b5fea
2019-01-23 09:46:34 -08:00
Mathieu Chartier
52cf4adf70 Merge "[view compilation] Add --compile-layouts flag to pm compile" 2019-01-23 17:02:31 +00:00
TreeHugger Robot
3a02bebb34 Merge changes Ic8db00b6,I68a91e07,I860ad443
* changes:
  Remove package name from ROLLBACK_EXECUTED broadcast.
  Use VersionedPackage in PackageRollbackInfo.
  Assign a rollbackId to all rollbacks.
2019-01-23 15:49:41 +00:00
Adrian Roos
38c8934b67 Merge "API: Fix missing @NonNull annotations" 2019-01-23 14:02:15 +00:00
Richard Uhler
f8f1b38fd1 Remove package name from ROLLBACK_EXECUTED broadcast.
The receiver of the broadcast would likely want to query the rolled back
packages via RollbackManager regardless, and it's not clear which
package to put when an atomic set of packages is rolled back.

Bug: 112431924
Test: atest RollbackTest
Change-Id: Ic8db00b62d8993e00a0dd2cb79ae68c430b45bb8
2019-01-23 13:22:44 +00:00
TreeHugger Robot
de3aea6904 Merge "Add an intent extra that contains a number of milliseconds." 2019-01-23 13:13:47 +00:00
Richard Uhler
a7e9b2db4b Use VersionedPackage in PackageRollbackInfo.
Rather than defining a new custom PackageRollbackInfo.PackageVersion
type.

Also clean up PackageRollbackInfo API by replacing public fields with
methods and picking better names.

Bug: 112431924
Test: atest RollbackTest
Change-Id: I68a91e07b8745df9c5ecb22fdccbfcd76385814a
2019-01-23 11:02:56 +00:00
Richard Uhler
b9d54474ad Assign a rollbackId to all rollbacks.
To make it easier to specify what rollback to perform when a rollback is
executed.

Bug: 112431924
Test: atest RollbackTest
Change-Id: I860ad443848341fbb99169a05b084fa797c5e08c
2019-01-23 11:02:42 +00:00
TreeHugger Robot
eea1710cda Merge "Add a feature flag for secure lock screen." 2019-01-23 10:55:33 +00:00
Narayan Kamath
1addc53a77 Merge "RollbackManager: Support userdata snapshot / restore." 2019-01-23 09:03:17 +00:00
wilsonshih
d9841fb68f Fix attr inheritShowWhenLocked cannot read from manifest.
Move the declaration to correct location.

Fix: 123247611
Test: atest KeyguardTests

Change-Id: Ic7ae88a2aad982d3e75b398d6e0d8a46970ac8c0
2019-01-23 08:49:04 +00:00
TreeHugger Robot
4edd7eacbd Merge "add OverlayManager.setEnabled to system-current.txt" 2019-01-23 00:07:31 +00:00
Joel Galenson
c857f02a5b Add an intent extra that contains a number of milliseconds.
The Permissions Hub will use this to control the default time filter.

Bug: 63532550
Test: Pass argument to intent.
Change-Id: Iac607853f7020acdb50a20d82c7b8b9e1a0bd32e
2019-01-22 15:07:21 -08:00
Tyler Gunn
18ab52512b Merge "Mark NEW_OUTGOING_CALL broadcast as deprecated." am: 1e08a90339 am: 8aa49b57f3
am: 38f42a6f8e

Change-Id: Ie330dd01fb1b82b87267bb0dc4be7c7ba5e10dee
2019-01-22 13:26:46 -08:00
Tyler Gunn
38f42a6f8e Merge "Mark NEW_OUTGOING_CALL broadcast as deprecated." am: 1e08a90339
am: 8aa49b57f3

Change-Id: Ie60bbc11e0bd5ca434be609dd596ea1a33ba8812
2019-01-22 12:52:26 -08:00
Adrian Roos
918c4f1043 API: Fix missing @NonNull annotations
In pi-dev, those annotations were added out of band in
tools/metalava/manual/master.txt. The annotations were also
supposed to be added to master, but for some this did not happen.

Bug: 123221743
Test: m api-stubs-docs-check-last-released-api
Change-Id: Ia7589dfcc7f63923890e609dbf03175d2b035d29
2019-01-22 20:23:02 +00:00
Hyunyoung Song
4b95d69eef add OverlayManager.setEnabled to system-current.txt
Test: builds and tested in local theme picker

Bug: 121328713

Change-Id: I61ca5189b35005ee13dab797ec2187cd4a88b785
2019-01-22 10:52:24 -08:00
Eric Holk
b1a736d49c [view compilation] Add --compile-layouts flag to pm compile
This allows us to generate precompiled layouts for installed applications.

If the system property view.precompiled_layout_enabled is set, then
PackageMannager will also automatically generate precompiled layouts for apps at
install or upgrade time.

Bug: 111895153
Test: manual
Merged-In: If6455e1b9b0542a36882af9f3e29d0185a53393c
Change-Id: Iea40f5bc90bca0d2605c3c5221159cef13e1e447
2019-01-22 17:40:47 +00:00
Narayan Kamath
869f706d86 RollbackManager: Support userdata snapshot / restore.
The only significant missing piece of functionality is the
handling of credential encrypted data in the case where one
or more users haven't unlocked their device. This will be handled
in a follow-up change.

Bug: 112431924
Test: atest RollbackTest
Change-Id: I4582018337ce0344379f6f73d6fd6c9ce31c58a0
2019-01-22 17:00:13 +00:00
Lenka Trochtova
66c492a87e Add a feature flag for secure lock screen.
Disable certain APIs which require secure lock screen if the device
doesn't have the feature.
Make sure one cannot set the password/PIN if there is no secure lock
screen, because the password/PIN wouldn't be really used afterwards
while the password strength checks would succeed, creating a false
sense of security.
Allow setting password strength requirements in DPM - test if the
current password is sufficient will fail automatically if there is
no secure lock screen.

Bug: 111072170
Bug: 111071972
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases
Test: cts-tradefed run cts -m CtsAdminTestCases
Test: frameworks/base/core/tests/utiltests/runtests.sh
Test: adb shell am instrument -w -e class com.android.internal.widget.LockPatternUtilsTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Test: atest SyntheticPasswordTests
Test: atest LockSettingsServiceTests
Test: atest LockSettingsShellCommandTest
Test: atest DevicePolicyManagerTest (for servicestests)

Change-Id: Ie46b0de6cb03c26dd05c05711c5c3b5e36a872df
2019-01-22 17:51:56 +01:00
Tyler Gunn
d8f76c857b Mark NEW_OUTGOING_CALL broadcast as deprecated.
Mark NEW_OUTGOING_CALL broadcast as deprecated and document that callers
should use the CallRedirectionService API.

Test: Build APIs.
Bug: 64959558
Change-Id: I9192b50b16be2ff0cdc0f864ee99b42b83e261e9
2019-01-22 08:09:24 -08:00
Adrian Roos
fe6aeaf2a3 API Compatibility: Fix incompatible abstract methods on Context
Bug: 123221743
Test: m api-stubs-docs-check-last-released-api
Change-Id: I6d34c86582633d696464c8207a7d631be6d31693
2019-01-22 16:58:56 +01:00
Paul Duffin
025bfab929 Include OrgApacheHttpLegacyUpdater unconditionally
Previously, OrgApacheHttpLegacyUpdater was added to the bootclasspath
(in the framework-oahl-backward-compatibility library) if and only if
the org.apache.http.legacy.jar was not on the bootclasspath. Its
presence caused the runtime to maintain backwards compatibility by
adding org.apache.http.legacy.jar to the app's classpath for apps that
target < P.

The org.apache.http.legacy.jar was permanently removed from the
bootclasspath in P and so the framework-oahl-backward-compatibility
library, and hence OrgApacheHttpLegacyUpdater, are always on the
bootclasspath and so there is no need to treat it as optional. To that
end this change:
1) Includes it in the main framework target, previously it was
   explicitly excluded.
2) Removes the code for handling the case when it is not present.
3) Removes tests for when it is not present.
4) Removes documentation describing what happens when it is not
   present.

Bug: 18027885
Test: cts/tests/signature/runSignatureTest.sh
Change-Id: I3892ead8cd2a8bf17e57bf08e3bf6ee65afac0a1
2019-01-22 14:16:14 +00:00
Ricky Wai
7106cc314e Merge "Suppress injected launcher activity for apps that are vouched" 2019-01-22 10:37:03 +00:00
Narayan Kamath
24c15d2331 Merge "Fake out ApplicationInfo for APEXs." 2019-01-22 08:57:20 +00:00
Remi NGUYEN VAN
42079df1cc Merge "Add startActivityAsUser to SystemApi" am: 3f4873baef
am: 54ec5162de

Change-Id: I665295721ff7b2eb41f29c96ce2a64844a08705e
2019-01-21 18:25:57 -08:00