Commit Graph

6324 Commits

Author SHA1 Message Date
TreeHugger Robot
4ec3efce54 Merge "Add proof-of-rotation information to PackageParser.SigningDetails" 2018-01-23 23:19:59 +00:00
Roberto Perez
c4788e1f04 Merge "Adding a new category to mark car-optimized launcher activity" 2018-01-23 18:21:59 +00:00
Amit Mahajan
6ba8bc8a47 Merge "Added new slot status related broadcast." 2018-01-23 16:28:16 +00:00
Adam Lesinski
7fb3831136 Revert "Replace AssetManager with AssetManager2 implementation"
This reverts commit b20a0ce59f.
2018-01-23 03:17:26 -08:00
Adam Lesinski
68d10d00a5 Revert "Make idiomatic use of ApkAssets and AssetManager"
This reverts commit c857766ca5.
2018-01-23 03:17:01 -08:00
Adam Lesinski
1f62f7c72e Merge changes from topic "assetmanager-refactor"
* changes:
  libandroidfw: Improve performance of AssetManager2
  libandroidfw: Add ApplyStyle and SetConfiguration benchmark
  Make idiomatic use of ApkAssets and AssetManager
  Replace AssetManager with AssetManager2 implementation
2018-01-23 05:28:11 +00:00
Calin Juravle
cd99c3a17a Merge "Perform a non strict matching of .dm files when computing the size" 2018-01-23 04:11:04 +00:00
Daniel Cashman
77029c5b16 Add proof-of-rotation information to PackageParser.SigningDetails
APK Signature Scheme v3 enables APK signing key rotation by allowing
an APK to embed a proof-of-rotation structure linking past signing
certificates to the current one.  This information needs to be exposed
to the system before it can be used to make authorization decisions.

Bug: 64686581
Test: Builds and boots.
Change-Id: I49961f92fcec141d73b36197147d5d8fa64c149e
2018-01-22 14:58:43 -08:00
Calin Juravle
10b27eb2cc Perform a non strict matching of .dm files when computing the size
'adb shell pm install' creates the PackageLite structure without
validating or renaming the input files to '.apk'.

Be more permissive in DexMetadataHeler when computing the size of the
package to allow for this scenario.

Test: atest
core/tests/coretests/src/android/content/pm/dex/DexMetadataHelperTest.java
Bug: 72267410

Change-Id: Ica446b0822be71826d02d01ada015a43d8133c68
2018-01-22 14:14:39 -08:00
TreeHugger Robot
c6f994207d Merge "Add pending system update info system APIs." 2018-01-22 20:12:43 +00:00
Amit Mahajan
3cefd86e7f Added new slot status related broadcast.
Test: none
Bug: 64131518
Change-Id: I0a5825a1d121dc22f042fd71598f58e064e9e2a2
2018-01-22 09:40:25 -08:00
Przemyslaw Szczepaniak
aef1221d25 Revert "Reject apks targeting deprecated sdk"
This reverts commit ab223112d1.

Reason for revert: Android P will only show a warning dialog for
deprecated apks.

Test: -
Change-Id: Iff792b9d371cffbb0ba0d2ba53a4758a9779b1c7
2018-01-22 11:09:44 +00:00
Jeff Sharkey
9252b34065 Use data plans for better job scheduling.
Now that we have data plan information from the carrier, we can start
using it to influence when we schedule jobs.  As a first pass
algorithm:

-- If the network is congested, and a job is less than 50% through
its runnable window, then we'll defer it for awhile.
-- If the network has a surplus of data, we'll consider using some
of it to improve the user experience by running prefetching jobs.

Provider APIs for carrier apps to override their connections to be
temporarily marked as either "unmetered" or "congested", along with
automatic timeouts if desired.

Flag for developers to indicate which jobs will have a material
positive impact on end users.  (We don't want to promote jobs that
are simply doing logs upload; for example.)  Glue code to quickly
return targetSdk of a specific package.

More tweaking to the exact algorithms will come in future CLs.

Test: bit FrameworksServicesTests:com.android.server.job.
Bug: 64133169
Change-Id: Iabb9f90a7a65958ad648b091edec378fc3bf785a
2018-01-19 15:50:12 +09:00
TreeHugger Robot
1ebcf6101d Merge "Added new SIM state related broadcasts." 2018-01-19 02:32:46 +00:00
Roberto Perez
7ee1a7acc4 Adding a new category to mark car-optimized launcher activity
Test: TBD
Bug: 70681347

Change-Id: I81ea7f9f3021e8a9d25fa980a8687d66765469c5
2018-01-18 14:43:27 -08:00
Tao Bao
07342dc175 Add pending system update info system APIs.
This CL adds system APIs in android.os.SystemUpdateManager. The APIs allow
system updater apps (RECOVERY permission required) to publish the pending
system update information, and allow other apps to query the info
accordingly (requiring RECOVERY or READ_SYSTEM_UPDATE_INFO permission).

Design doc in go/pi-ota-platform-api.

Bug: 67437079
Test: Use test apps to call the new APIs to query and set the update info
      respectively.
Change-Id: Id54b4a48d02922d2abd906dd7e2ec80a656fc9b1
2018-01-18 14:41:41 -08:00
Amit Mahajan
052e1e2941 Added new SIM state related broadcasts.
Test: Basic telephony sanity and unit tests
Bug: 64131518
Change-Id: Ie3d157e79a7040c161b9038c875a4a4f49d535ff
2018-01-18 14:38:21 -08:00
TreeHugger Robot
940ba0c8fe Merge "Rename CrossProfileApps API as per API council feedback" 2018-01-18 21:10:18 +00:00
Tony Mak
b0d22627e9 Rename CrossProfileApps API as per API council feedback
Three changes:
1. android.content.pm.crossprofile - > android.content.pm
2. getProfileSwitchingIcon -> getProfileSwitchingIconDrawable
3. startMainActivity “user” parameter should be named “targetUser”

Test: atest FrameworksServicesTests:com.android.server.pm.CrossProfileAppsServiceImplTest
Test: atest frameworks/base/core/tests/coretests/src/android/content/pm/CrossProfileAppsTest.java
Test: atest cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/CrossProfileAppsHostSideTest.java

FIXES: 71818128

Change-Id: Icf9a6d1f8b6808935ffd79b43185c7b12235f349
2018-01-18 21:07:50 +00:00
Calin Juravle
d5d154efcd Merge "Support installation of DexMetadata files (.dm)" 2018-01-18 19:53:54 +00:00
Adam Lesinski
c857766ca5 Make idiomatic use of ApkAssets and AssetManager
Move away from using deprecated addAssetPath methods
and cache the instances of ApkAssets created.

Test: CTS passes
Change-Id: I9e7048bcffd6471ed6a42e5175cc678dc4ac3b96
2018-01-18 10:39:58 -08:00
Craig Donner
022320cb57 Merge "Deprecate android.software.vr.mode" 2018-01-17 20:20:51 +00:00
Calin Juravle
3fc56c3000 Support installation of DexMetadata files (.dm)
Add support in the package installer to install dex metadata files
alongside the application apks (base or splits).

During installation or update the dex metadata files will need to have a
matching apk file. The matching is done by checking the file extension
(e.g. base.apk -> base.dm, split_a.apk -> split.dm).

On disk, the metadata files are placed next to the apks.

The .dm files will be used during install-time optimizations and passed
verbatim to dex2oat.

Test: adb shell am instrument -w \
1) adb shell am instrument -w \
  -e class android.content.pm.DexMetadataHelperTest

com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

2) adb install-multiple CtsClassloaderSplitApp.apk
CtsClassloaderSplitApp.dm CtsClassloaderSplitAppFeatureA.apk
CtsClassloaderSplitAppFeatureA.dm CtsClassloaderSplitAppFeatureB.apk

3) gts-tradefed -m GtsAndroidRuntimeManagerHostTestCases

Bug: 30934496

Change-Id: I86f0a8307705ff3d6a5a85c2fcaae085dd62d4af
2018-01-17 12:15:48 -08:00
Craig Donner
c6f9c85f74 Deprecate android.software.vr.mode
Bug: 71365436
Test: Build
Change-Id: I4e371dfea1823787e2e175206b34c25d872bd411
2018-01-16 16:00:42 -08:00
Todd Kennedy
f996b76623 Add debug logs
Logs are temporary and only used to try to catch problems with
the recent package manager refactoring. They will be reverted.

This reverts commit cdc2e6734e.
Bug: 63539144
Test: Manual. Builds, runs and shows debug output

Change-Id: I987e35a86253de04f809797d835bbf6a01dd8d03
2018-01-12 15:03:29 -08:00
Hyunyoung Song
69799885f3 Merge "Wrap StackOverflowError in NotFoundException. Bug: 67462465 Bug: 66498711 Test: builds and tested using faulty apk with recursive drawable. Change-Id: I47691343dae892beb5ed8c1c66c33edefade321e (cherry picked from commit dc92d925d8)" into oc-dev am: 48df033607 am: 69d240d584 am: 3aab9561b2
am: 7ca6bb95de

Change-Id: I449dd9403f7f9eeb92def3ce7162be07971399e2
2018-01-12 06:11:43 +00:00
Hyunyoung Song
7ca6bb95de Merge "Wrap StackOverflowError in NotFoundException. Bug: 67462465 Bug: 66498711 Test: builds and tested using faulty apk with recursive drawable. Change-Id: I47691343dae892beb5ed8c1c66c33edefade321e (cherry picked from commit dc92d925d8)" into oc-dev am: 48df033607 am: 69d240d584
am: 3aab9561b2

Change-Id: I554c6f320ec32b0151097701a5ff3a8d48161d7f
2018-01-12 05:55:42 +00:00
Hyunyoung Song
3aab9561b2 Merge "Wrap StackOverflowError in NotFoundException. Bug: 67462465 Bug: 66498711 Test: builds and tested using faulty apk with recursive drawable. Change-Id: I47691343dae892beb5ed8c1c66c33edefade321e (cherry picked from commit dc92d925d8)" into oc-dev am: 48df033607
am: 69d240d584

Change-Id: I02bf540b41fd9fd026fbe0fad4069526664cd56f
2018-01-12 05:44:25 +00:00
Hyunyoung Song
69d240d584 Merge "Wrap StackOverflowError in NotFoundException. Bug: 67462465 Bug: 66498711 Test: builds and tested using faulty apk with recursive drawable. Change-Id: I47691343dae892beb5ed8c1c66c33edefade321e (cherry picked from commit dc92d925d8)" into oc-dev
am: 48df033607

Change-Id: Id2510b388bf4ed9cdd8853bc5594349df358f465
2018-01-12 05:31:38 +00:00
TreeHugger Robot
48df033607 Merge "Wrap StackOverflowError in NotFoundException. Bug: 67462465 Bug: 66498711 Test: builds and tested using faulty apk with recursive drawable. Change-Id: I47691343dae892beb5ed8c1c66c33edefade321e (cherry picked from commit dc92d925d8)" into oc-dev 2018-01-12 05:23:45 +00:00
TreeHugger Robot
5cb82fd329 Merge "Moves instant app install checks to install time" 2018-01-11 23:22:30 +00:00
TreeHugger Robot
e8df5cd9d8 Merge changes I0b5152d7,I00a6f1cd
* changes:
  Temporary debugging
  Remove scanPackageInternal()
2018-01-11 23:11:29 +00:00
Holly Jiuyu Sun
613e01227b Merge "Add EuiccCardManager and EuiccCardController." am: ec25ea1520
am: edc14bd3c4

Change-Id: I5ac16981ac7ca4d492387a340f10a34b8ab1d804
2018-01-11 23:11:05 +00:00
Ben Gruver
c4a5b5010f Merge "Implement harmful app warning at activity launch" 2018-01-11 22:20:38 +00:00
Todd Kennedy
30a23a5a7b Remove scanPackageInternal()
The final, major refactoring for this release. Replace
scanPackageInternal() with addForInit(). This new method delegates
all modifications of the package setting object to the existing
scanPackageOnly() method.

There is one block of code where we modify the ApplicationInfo
object in the PackageParser.Package. It could be argued [and I would
agree] that the ApplicationInfo doesn't belong in the Pacakge
object at all. But, regardless, updating this info is being done
in addForInit(). It would be ideal if we could push this down to
scanPackageOnly(). Unfortunately, we expect the ApplicationInfo
to be updated correctly prior to scanPackageOnly().

Bug: 63539144
Test: Manual.
Test: w/ base image
Test: 1] upgrade OTA
Test: 2] clean flash
Test: w/ image containing additional applications
Test: 1] add a system application
Test: 2] add a system application w/ version installed on /data. version on /data has greater version code
Test: 3] add a system application w/ version installed on /data. version on /data has lower version code
Test: 4] add a system application w/ version installed on /data. version on /data has signature mis-match
Test: 5] remove a system application
Test: 6] remove a system application w/ upgrade installed on /data
Test: 7] update a system application
Test: 8] update a system application w/ upgrade installed on /data. version on /data has greater version code
Test: 9] update a system application w/ upgrade installed on /data. version on /data has lower version code
Change-Id: I00a6f1cd056d9e5ee81154a522b7d50ea9174273
2018-01-11 13:16:55 -08:00
Ben Gruver
1ab3d6e56b Implement harmful app warning at activity launch
Bug: 63909431
Test: manual

Change-Id: I8a5497421cb8130af8cdd5129b0f6e1707a01e36
2018-01-11 12:13:29 -08:00
Patrick Baumann
2aede854ff Moves instant app install checks to install time
This is the final change needed to remove the PARSE_IS_EPHEMERAL
flag and do instant app validation at install time instead of at
parse time.

Fixes: 68860689
Test: manual - Installed valid and invalid instant apps
Change-Id: I4d2de8e09d53e2fc3397e60700e7fa4d31b7bb29
2018-01-11 19:25:22 +00:00
TreeHugger Robot
422a67987f Merge "Allow forcing target SDK to current dev" 2018-01-11 19:14:10 +00:00
TreeHugger Robot
a665af32cb Merge "Move signing data into SigningDetails container" 2018-01-11 19:01:13 +00:00
Holly Jiuyu Sun
3d6b53c075 Add EuiccCardManager and EuiccCardController.
EuiccCardManager is in the same path with EuiccManager.
EuiccCardController is in the same path with EuiccController.
Use getAllProfiles() as an example interface.
The implementation of EuiccCard and its content will be added in a
follow up CL.
The new API is marked as @hide and TODO for @SystemApi.

Bug: 38206971
Test: test on phone
Change-Id: I153937c0f79bdd1a00b06b234a6e254a3f43072c
Merged-In: I153937c0f79bdd1a00b06b234a6e254a3f43072c
2018-01-11 10:30:43 -08:00
Holly Jiuyu Sun
5c11024d13 Add EuiccCardManager and EuiccCardController.
EuiccCardManager is in the same path with EuiccManager.
EuiccCardController is in the same path with EuiccController.
Use getAllProfiles() as an example interface.
The implementation of EuiccCard and its content will be added in a
follow up CL.
The new API is marked as @hide and TODO for @SystemApi.

Bug: 38206971
Test: test on phone
Change-Id: I153937c0f79bdd1a00b06b234a6e254a3f43072c
2018-01-10 18:59:50 -08:00
Zhi An Ng
2e01b1d6bc Merge "Fix links in SERVICE string constants javadoc" 2018-01-10 23:01:35 +00:00
Ng Zhi An
f7c1e2b7b4 Fix links in SERVICE string constants javadoc
Bug: 68820728
Test: make docs, view docs
Change-Id: I51f89e1ca348cb54165a863dce2b21b332108e19
2018-01-10 10:45:43 -08:00
TreeHugger Robot
d5a6d9b8dd Merge "[API review] Add ShortcutInfo.DISABLED_REASON_UNKNOWN" 2018-01-10 07:07:37 +00:00
Adam Lesinski
b20a0ce59f Replace AssetManager with AssetManager2 implementation
Test: Existing CTS tests pass
Test: make libandroidfw_tests
Change-Id: I858f7e1d909c08273b096601136e3f28e15eb5d4
2018-01-09 16:28:58 -08:00
Kevin Hufnagle
14f71757c2 Merged-In: I0906de76abf4124d74f7f4f80ac0eab3cbf94f7e docs: Revised descriptions of binding and connecting to services. am: d195a9972b am: 800e061359
am: 0630348fa5

Change-Id: I0ccaa18cf5a9e84c5f015cf4b97b74a249348c93
2018-01-09 23:59:29 +00:00
Kevin Hufnagle
0630348fa5 Merged-In: I0906de76abf4124d74f7f4f80ac0eab3cbf94f7e docs: Revised descriptions of binding and connecting to services. am: d195a9972b
am: 800e061359

Change-Id: I3854641ab4f80f4bbeae9acd67522fcd8b8484c0
2018-01-09 23:51:10 +00:00
Kevin Hufnagle
800e061359 Merged-In: I0906de76abf4124d74f7f4f80ac0eab3cbf94f7e docs: Revised descriptions of binding and connecting to services.
am: d195a9972b

Change-Id: I7a59a3b8c18492961aea7f480276a401ab8bb6ae
2018-01-09 23:44:04 +00:00
TreeHugger Robot
6b7bf94740 Merge "incidentd: dumping jobscheduler to proto" 2018-01-09 23:15:19 +00:00
Patrick Baumann
420d58a9d8 Move signing data into SigningDetails container
This change replaces fields from Package that relate to signing
with a single SigningDetails container. It does the same with
InstallArgs and InstallParams. This simplifies much of the code
that would have otherwise relied on synchronizing many fields and
will enable PackageManagerService to make install-time descisions
based on package data instead of forcing it to be part of package
parsing.

This is a retake of ag/3382280

Test: android.appsecurity.cts.PkgInstallSignatureVerificationTest passes.
Test: atest google/perf/boottime/boottime-test to ensure no startup regression.
Bug: 68860689
Change-Id: I0df45ce537df5552a7e60e4d727a4dcef23c2252
2018-01-09 15:12:48 -08:00