Commit Graph

6392 Commits

Author SHA1 Message Date
David Brazdil
7d69d3a855 Merge "Droidfood only: Move private APIs to dark greylist by default" 2018-02-01 11:07:39 +00:00
David Brazdil
b43351f84a Droidfood only: Move private APIs to dark greylist by default
In order to tune the API lists, we initialize the light greylist with
APIs we know are used by popular apps. All the other private APIs are
moved into dark greylist. Light greylist will be set to not warn at
all, while dark greylist will produce warnings. This will allow us to
collect logs and tune the lists without breaking all of our dogfooders.

Bug: 64382372
Bug: 72793280
Test: make
Change-Id: Ice6c487eeca8900e6a70abe1b87e8c211ef1066e
2018-02-01 09:47:59 +00:00
Patrick Baumann
159cd024d9 Marking used instant apps fields as System API
Change-Id: I4a907600b9fa75b1789843a9c2e7d2c33aaaff6b
Fixes: 71852699
Bug: 72450666
Bug: 72700831
Test: builds and AIA still functional
2018-01-31 14:00:18 -08:00
Patrick Baumann
43c97a0e90 Revert "Revert "Removes EphemrealResolverService and related""
This reverts commit 1e0c91968e.

Reason for revert: Original issue fixed

Fixes: 38137176
Fixes: 38121489
Test: manual; builds and instant apps launch
Change-Id: If320503381b21580ac1b127c49f754b39ffcc93b
2018-01-31 14:00:18 -08:00
Patrick Baumann
577d402d0d Revert "Revert "Adds generic intent Instant App resolution""
This reverts commit 860b8ba719.

The original change that was reverted contained a bug that allowed an
http view/browsable intent used to query for browsers to be considered
as a candidate for instant apps. This was resulting in an attempt to
bind to the instant app resolver while holding a lock on mPackages.

This change ensures that PMS doesn't bind while checking for the browser
status of a package in both the instant app filtering code and by adding
the FLAG_IGNORE_EPHEMERAL to the canonical browser intent.

Reason for revert: Applying fix

Change-Id: I4896b3a15416a11fdc3f6c191e552c4ce8963623
Fixes: 63117034
Fixes: 71916178
Test: Manual using test app at google_experimental/users/patb/InstantAppsInP
Test: atest android.appsecurity.cts.EphemeralTest passes after modification
2018-01-31 14:00:18 -08:00
TreeHugger Robot
dd020f6fb9 Merge "Add key rotation." 2018-01-31 15:55:10 +00:00
TreeHugger Robot
397c38d017 Merge "Revert "Adds generic intent Instant App resolution"" 2018-01-31 09:57:26 +00:00
Patrick Baumann
1e0c91968e Revert "Removes EphemrealResolverService and related"
This reverts commit 5564f880db.

Reason for revert: Resolve merge conflict for another revert (ag/3537193)
Bug: 72710855
Change-Id: Id7c3a3993a45c588ee4668d7486d67d764541b1e
2018-01-31 03:00:26 +00:00
Patrick Baumann
860b8ba719 Revert "Adds generic intent Instant App resolution"
This reverts commit 3e8bd0f3b5.

Reason for revert: b/72710855

Change-Id: I1378ccb5c5c16256e472e1ff7c3ad2460e091300
Fixes: 72710855
2018-01-31 01:35:13 +00:00
Dan Cashman
1dbe6d0284 Add key rotation.
Change certificate checks to also consider the possibility of
signing certificate rotation by checking the
SigningDetails#pastSigningCertificates field.  In particular, add a
SigningDetails#checkCapability method which reports whether or not
the older SigningDetails is an ancestor of the current one, and
queries whether or not the old one has been granted capabilities,
such as being a sharedUser.

Bug: 64686581
Test: Builds, boots, browser and camera work, all with v3 signing.

Change-Id: I4199ff3f2d9ae959325b117b28e666ae31889800
2018-01-30 16:59:31 -08:00
Patrick Baumann
5564f880db Removes EphemrealResolverService and related
This change removes deprecated classes and constants that were not
renamed from ephemeral to instant prior to O. There were no
consumers of these APIs as correctly named alternatives existed and were
referenced in docs. No known consumers of these APIs exist on user
builds.

Fixes: 38137176
Fixes: 38121489
Test: manual; builds and instant apps launch
Change-Id: I982f8a6edc5668dd42cea65e52a1433ec8d6f8ef
2018-01-30 22:48:03 +00:00
Paul Duffin
2a9cd14900 Merge "Conditionally remove android.test.base from bootclasspath" 2018-01-30 11:20:50 +00:00
Jon Dormody
66ad39313b Merge "Docs: Changed "the value of an item that previously added with putExtra()" to "the value of an item previously added with putExtra(),"" into oc-mr1-dev am: 0704571547
am: 43a77db029

Change-Id: I0372e97637de2416386ac45dc383b82ddb4a1991
2018-01-29 21:24:26 +00:00
Jon Dormody
43a77db029 Merge "Docs: Changed "the value of an item that previously added with putExtra()" to "the value of an item previously added with putExtra(),"" into oc-mr1-dev
am: 0704571547

Change-Id: Ib9702cb1707ba756ea3202e0fdde579f5c493866
2018-01-29 21:15:04 +00:00
Jon Dormody
0704571547 Merge "Docs: Changed "the value of an item that previously added with putExtra()" to "the value of an item previously added with putExtra(),"" into oc-mr1-dev 2018-01-29 21:04:50 +00:00
Patrick Baumann
3e8bd0f3b5 Adds generic intent Instant App resolution
Bug: 63117034
Change-Id: Ie3818e913e8e1077f60434a626bc606c0b5015ab
Test: Manual using test app at google_experimental/users/patb/InstantAppsInP
Test: atest android.appsecurity.cts.EphemeralTest passes after modification
2018-01-29 16:19:42 +00:00
Paul Duffin
a3b692113c Conditionally remove android.test.base from bootclasspath
This makes the runtime handling of the android.test.base library
conditional based on a build flag REMOVE_ATB_FROM_BCP.

When REMOVE_ATB_FROM_BCP=true:
* The framework-atb-backward-compatibility is added to the
  bootclasspath instead of android.test.base.
* Any APK that targets pre-P (or has a dependency on android.test.runner)
  has android.test.base added to their library list.

Otherwise:
* The android.test.base library is added to the bootclasspath.
* Any APK that explicitly specifies that it depends on the
  android.test.base library has the library removed as the classes
  are available at runtime.

Added android.test.base to platform libraries so it can be used when
not on the bootclasspath.

Tested both cases by building with or without the build flag, flashing,
setting up, adding an account, adding a trusted place.

Also, tested that all combinations of REMOVE_ATB_FROM_BCP and
REMOVE_OAHL_FROM_BCP work.

adb install -r -g out/target/product/marlin/testcases/FrameworksCoreTests/FrameworksCoreTests.apk
adb shell am instrument -w -e class android.content.pm.PackageBackwardCompatibilityTest,android.content.pm.AndroidTestRunnerSplitUpdaterTest,android.content.pm.OrgApacheHttpLegacyUpdaterTest,android.content.pm.RemoveUnnecessaryOrgApacheHttpLegacyLibraryTest,android.content.pm.RemoveUnnecessaryAndroidTestBaseLibraryTest,android.content.pm.AndroidTestBaseUpdaterTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

Bug: 30188076
Test: as above
Change-Id: I4b9d8a5bed6787cd334c2b13a458bbc0efc3f3b6
2018-01-29 11:48:44 +00:00
TreeHugger Robot
c6b7d7c4c4 Merge "Refactor the PackageBackwardCompatibilityTest" 2018-01-29 11:24:36 +00:00
TreeHugger Robot
4470d5eadb Merge "Clean up the procstats dump enums and change component to use message." 2018-01-27 02:33:21 +00:00
TreeHugger Robot
c7483a0e88 Merge "Document Vulkan 1.1 requirements for FEATURE_VULKAN_HARDWARE_VERSION" 2018-01-27 02:31:28 +00:00
Ruchi Kandoi
2b894394a5 Merge "Add UID and Service for Secure Element Application" am: b8b7589531
am: 8ee3204c58

Change-Id: I7c74f21e014fb7eb772e2d86cc278fd774ffb8c9
2018-01-27 01:59:46 +00:00
Ruchi Kandoi
6149b0fa49 Add UID and Service for Secure Element Application
Bug: 64994044
Test: Boot; Check Service loaded.
Change-Id: I2f48ff204acd29b1a9f6819910aba5f8f3762977
2018-01-27 00:45:49 +00:00
Paul Duffin
0692a566a9 Refactor the PackageBackwardCompatibilityTest
An upcoming change will add another library that needs to be
added for backwards compatibility. Merging the tests for those into the
existing test class makes it much harder to see and the tests start to
overlap, i.e. some tests will test more than one aspect which makes
maintenance more difficult and debugging more complex.

This splits the test methods in PackageBackwardCompatibilityTest out
into separate tests for the different PackageSharedLibraryUpdater
implementations into their own classes and simply tests that the
PackageBackwardCompatibility class uses the correct implementations.

This allows each PackageSharedLibraryUpdater to provide comprehensive
tests for their own behavior without affecting tests for the other
classes.

The OrgApacheHttpLegacyUpdaterTest only runs if the
OrgApacheHttpLegacyUpdater class is on the classpath. That is done
using OptionalClassRunner which is a custom JUnit Runner that runs the
tests in a class iff a specific class is present. Otherwise, it behaves
as if the class had a single test that made an invalid assumption.

Tested by building with and without REMOVE_OAHL_FROM_BCP=true and then
running the following:
adb install -r -g out/target/product/marlin/testcases/FrameworksCoreTests/FrameworksCoreTests.apk &&
adb shell am instrument -w -e class android.content.pm.PackageBackwardCompatibilityTest,android.content.pm.AndroidTestRunnerSplitUpdaterTest,android.content.pm.OrgApacheHttpLegacyUpdaterTest,android.content.pm.RemoveUnnecessaryOrgApacheHttpLegacyLibraryTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

Bug: 18027885
Test: as above
Change-Id: Idd1a343d234a57d518010c5a79030cbd7682e0c1
2018-01-26 22:18:30 +00:00
Jonathan Dormody
d07017e7a7 Docs: Changed "the value of an item that previously added with
putExtra()" to "the value of an item previously added with putExtra(),"

Test: make ds-docs

Bug: 1429953
Change-Id: Ided080aea7686e7a711376fa380c41027b71b1d3
2018-01-26 21:56:39 +00:00
Ruchi Kandoi
dcf4c6dc26 Add UID and Service for Secure Element Application
Bug: 64994044
Test: Boot; Check Service loaded.
Merged-In: I2f48ff204acd29b1a9f6819910aba5f8f3762977
Change-Id: I2f48ff204acd29b1a9f6819910aba5f8f3762977
(cherry picked from commit dfaf4bdd1e7e12caf9bb69c8facc38e879861baf)
2018-01-26 11:11:52 -08:00
Jesse Hall
239373f442 Document Vulkan 1.1 requirements for FEATURE_VULKAN_HARDWARE_VERSION
Test: make docs
Change-Id: I2bf65c2b7716268c815a07f40b1e6d87c14b3a29
2018-01-26 11:35:10 +08:00
Yi Jin
676d1ace1c Clean up the procstats dump enums and change component to use message.
Bug: 72415114
Test: manually flashed and run: dumpsys procstats --proto
Change-Id: Iea47fa41c04c3c6e8335e040086a0b5d65c22aaf
2018-01-25 17:56:06 -08:00
Adam Lesinski
f7d01dd7e1 Revert "Replace AssetManager with AssetManager2 implementation"
This reverts commit dcb3c6559b.

Bug:72511998
Change-Id: I665966ca109f66f85d8665db388c71ea2303c3b8
2018-01-25 17:39:40 -08:00
TreeHugger Robot
ce6b2d6bb9 Merge changes from topic "product_partition"
* changes:
  Read media files from /product/media/audio
  Support /product partition
2018-01-26 01:10:16 +00:00
TreeHugger Robot
5815664d4b Merge "Add AbstractThreadedSyncAdapter#onUnsyncableAccount API" 2018-01-25 22:47:54 +00:00
Calin Juravle
172814085b Merge "Extend the ArtManager profiling API to cover boot image profiling" 2018-01-25 19:10:23 +00:00
Calin Juravle
2b6e24c7e5 Merge "[framework] Extend profile operations to take the profile name" 2018-01-25 18:58:09 +00:00
Artem Iglikov
0edd645492 Merge "Revert "Make idiomatic use of ApkAssets and AssetManager"" 2018-01-25 18:06:49 +00:00
TreeHugger Robot
f1b720c488 Merge "Skip priv app full apk verification if has verify" 2018-01-25 17:52:25 +00:00
TreeHugger Robot
7f1e49f2ff Merge "Generating StrongBox backed keys" 2018-01-25 17:24:17 +00:00
Selim Cinek
d41477f494 Merge changes from topic "notification_launch"
* changes:
  Added the reply draft as an extra to the content intent
  Launching notification settings correctly inline
  Launching Notification animations inline
2018-01-25 16:05:15 +00:00
Artem Iglikov
16b3dff2d5 Revert "Make idiomatic use of ApkAssets and AssetManager"
This reverts commit e70b57a659.

Reason for revert: b/72482083

Bug: 72482083
Change-Id: I36b0aff6d533d7fb59d367a1cd4e96e03df5f462
2018-01-25 13:59:13 +00:00
TreeHugger Robot
18dae16dcd Merge "PackageManager: Add FEATURE_CAMERA_AR" 2018-01-25 07:34:33 +00:00
TreeHugger Robot
73a331f524 Merge "Statsd broadcast subscriber" 2018-01-25 06:23:36 +00:00
Jaekyun Seok
1713d9e97a Support /product partition
This CL will support the followings.
- installing a RRO package for framework from /product/overlay
- installing apps from /product/app
- installing priv-apps from /product/priv-app
- installing permissions from
  /product/etc/[default-permissions|permissions|sysconfig]

Bug: 64195575
Test: `mm` under frameworks/base/tests/[libs|privapp]-permissions
adb sync && adb reboot
adb shell cmd package list libraries
  => confirmed com.android.test.libs.product library
adb shell cmd package dump \
  com.android.framework.permission.privapp.tests.product
  => confirmed that the package is a priv-app

And I moved vendor/overlay/framework-res__auto_generated_rro.apk into
system/product/overlay/ on sailfish, and I confirmed that the RRO was
installed properly.

Change-Id: I16175933cebd9ec665d190cc5d564b5414a91827
2018-01-25 12:44:45 +09:00
TreeHugger Robot
1ccf72543d 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-25 02:05:30 +00:00
TreeHugger Robot
0271ef9895 Merge changes I8d43f5bc,I5ca4b0ca
* changes:
  OMS: Enable uninstallation of overlays
  PackageManager: allow overlays to be installed when signature matches platform cert
2018-01-25 01:31:34 +00:00
Philip P. Moltmann
486b24179f Add AbstractThreadedSyncAdapter#onUnsyncableAccount API
This allows for an SyncAdapter to defer all onPerformSync calls (and the
admission check for those) until the adapter is ready to accept those
calls.

Test: atest android.content.cts.AccountAccessSameCertTest
      atest android.content.cts.ContentResolverSyncTestCase
      atest android.content.cts.DeferSyncTest
      atest com.android.cts.content.CtsSyncAccountAccessOtherCertTestCases
      Set up a user and work account and waited until their gmail
      synced.

Bug: 72459220
Change-Id: I8f9ab735d64189578ccdd1c3e1d7b7c5383b8ee9
2018-01-25 00:37:48 +00:00
Victor Hsieh
5f76124551 Skip priv app full apk verification if has verify
When ro.apk_verity.mode is on, full apk verification is only skipped if
the apk already has verity enabled in the file system, and if the apk
contains the Merkle tree root hash we need.

Since the configuration in the file system is duplicated from the apk
(including the offset and size of Signing Block and the Merkle tree),
in order to prevent offline attacker from changing it, we need to
measure the observed configuration and make sure it matches the kernel's
view.

Test: observed package manager's requeset to installd (only) for updated
      priv apps.
Bug: 30972906

Change-Id: I33531a3f6148232b777ea8bfd02f13700649e317
2018-01-24 16:30:55 -08:00
Frank Salim
ea5e038bc1 Generating StrongBox backed keys
•Add FLAG_STRONGBOX when the generator spec requires it.
•Throw StrongBoxUnavailableException when the request
fails due to HARDWARE_UNAVAILABLE.
•Add PackageManager.FEATURE_STRONGBOX_KEYSTORE

Test: KeyStore CTS tests under development on an emulator
Bug: 63931634
Change-Id: I42d32b22981e43e504d30e5657d21ac555c71ebe
2018-01-24 23:45:54 +00:00
Selim Cinek
7fa385abd8 Launching notification settings correctly inline
Previously, the panel would still collapse when launching
the notification settings. We're now looking at the
newly returned result of the activity launch instead to
determine if we should collapse.

Bug: 69168591
Test: launch settings activity from notification guts, observe no collapsing
Change-Id: I414e7f4a9fd22d4f0b46437bfdb94e5c0f6cce58
2018-01-24 23:30:01 +00:00
Adam Lesinski
e70b57a659 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: I257c72261a97e4aa802abb46dc1f44d80e1d42ad
2018-01-24 15:19:09 -08:00
Adam Lesinski
dcb3c6559b Replace AssetManager with AssetManager2 implementation
Test: atest CtsContentTestCases:android.content.res.cts
Test: make libandroidfw_tests
Change-Id: I572eb13c6a4372c7f656f5912821cececd5bf3d4
2018-01-24 15:19:04 -08:00
Calin Juravle
fcbb74a429 Extend the ArtManager profiling API to cover boot image profiling
The boot image profile is available only on userdebug and eng builds and
combines the boot classpath and system server classpath.

Also, update ArtManager API to use Executors instead of Handlers.

Test: gts GtsAndroidRuntimeManagerHostTestCases
Bug: 30934496
Change-Id: Ie501947a659d644acbde04fb46157dd0c7944e81
2018-01-24 14:56:38 -08:00
Calin Juravle
6ae39fc2e5 [framework] Extend profile operations to take the profile name
Extend the installd profile interface to take the profile name as
argument. This shifts the responsibility for choosing the names of
profiles for primary apks completely to PackageManager. Each of the
application code paths will get an unique profile name based on their
split name.

All the profile operations will now work on a specific profile name rather
than assuming a default global name.

Also, move dumpProfiles and clearProfiles functionality to the
ArtManagerService so that we can re-use profileName computations easier.

Test: manual (dexopt apps, merge profiles, clear profiles)
      gts GtsAndroidRuntimeManagerHostTestCases
Bug: 30934496

Change-Id: Ie65d45eed7de0844edf4b7af918d7eaa74ec1f2c
2018-01-24 14:56:38 -08:00