Commit Graph

6402 Commits

Author SHA1 Message Date
TreeHugger Robot
1bb9f29909 Merge "Autofill compatibility mode." 2018-02-05 09:55:29 +00:00
TreeHugger Robot
76be79a7c9 Merge "Exempt sync requests by FG app from app-standby" 2018-02-05 05:11:18 +00:00
Svetoslav Ganov
24c90450fe Autofill compatibility mode.
Autofill helps users fill credentials, addresses, payment methods,
emails, etc without manually typing. When focus lands on a fillable
element the platform captures a snapshot of the screen content and
sends it to an autofill service for analysis and suggestions. The
screen snapshot is a structured representation of the screen content.
If this content is composed of standard widgets, autofill works
out-of-the-box. However, some apps do their own rendering and
the content in this case looks like a single view to the platform
while it may have semantic structure. For example, a view may render
a login page with two input test fields.

The platform exposes APIs for apps to report virtual view structure
allowing autofill services to handle apps that have virtual content.
As opposed to apps using standard widgets, this case requires the app
developer to implement the new APIs which may require a fair amount
of code and could be seen as a processes that could take some time.
The most prominent typs of apps that fall into this category are
browsers.

Until most apps rendering virtual content and specifically browsers
don't implement the virutal APIs, autofill providers need to fall-
back to using the accessibliity APIs to provide autofill support
for these apps. This requires developers to work against two sets
of APIs - autofill and accessibility - which is incovenient and error
prone. Also, users need to enable two plugins - autofill and
accessibility which is confusing. Additionally, the privacy and
perfomance impact of using the accessibility APIs cannot be addressed
while autofill providers need to use thes APis.

This change adds an autofill compatibility mode that would allow
autofill services to work with apps that don't implement the
virtual structure autofill APIs. The key idea is to locally enable
accessibility for the target package and remap accessibility to
autofill APIs and vise versa. This way an autofill provider codes
against a single set of APIs, the users enable a single plugin,
the privacy/performance implications of using the accessibility
APIs are addressed, the target app only takes a performance hit
since accessibility is enabled locally which is still more efficient
compared to the performance hit it would incur if accessibility is
enabled globally.

To enable compatibility mode an autofill service declares in its
metadata which packages it is interested in and also what is
the max version code of the package for which to enable compat
mode. Targeted versioning allows targeting only older versions of
the package that are known to not support autofill while newer
versions that are known to support autofill would work in normal
mode.

Since compatibility mode should be used only as a fallback we
have a white list setting with the packages for which this mode
can be requested. This allows applying policy to target only
apps that are known to not support autofill.

Test:
     cts-tradefed run cts-dev -m CtsAutoFillServiceTestCases
     cts-tradefed run cts-dev -m CtsAccessibilityServiceTestCases

bug:72811034

Change-Id: I11f1580ced0f8b4300a10b3a5174a1758a5702a0
2018-02-02 19:34:26 -08:00
Jeff Sharkey
5491881d77 Merge "Pass in the user defined by Context." 2018-02-03 02:12:22 +00:00
Jeff Sharkey
ad357d1839 Pass in the user defined by Context.
The majority of Manager-style classes already use Context.getUserId()
when making calls into the OS, so clean up the remaining callers to
unify behind this strategy.

This gives @SystemApi developers a nice clean interface to interact
across user boundaries, instead of manually adding "AsUser" or
"ForUser" method variants, which would quickly become unsustainable.

Test: builds, boots
Bug: 72863821
Exempt-From-Owner-Approval: trivial changes
Change-Id: Ib772ec4438e57a2ad4950821b9432f9842998451
2018-02-03 02:11:45 +00:00
Makoto Onuki
61283ecc7f Exempt sync requests by FG app from app-standby
Test: manual test with request sync, etc
Bug: 72443754
Change-Id: Iecf2d3a8c54451324a02ca2762bda72aa219bd92
2018-02-02 16:40:25 -08:00
TreeHugger Robot
fa5f30a07d Merge "Marks Context.createPackageContextAsUser as System" 2018-02-03 00:37:24 +00:00
Patrick Baumann
ef4c407123 Marks Context.createPackageContextAsUser as System
Test: Builds
Bugs: 72450666
Fixes: 72863821
Change-Id: Id36730533524af4786898afadc5f11c9be83da26
2018-02-02 13:49:48 -08:00
Jeff Sharkey
e55e721647 Merge "Put PackageInstaller in the drivers seat." 2018-02-02 20:21:25 +00:00
Jeff Sharkey
0451de6254 Put PackageInstaller in the drivers seat.
openWrite() and openRead() are very flexible APIs, but their design
means they can't take advantage of the recent FileUtils.copy()
optimizations that leverage in-kernel copying.

So add new write() and read() methods where the untrusted caller
hands an FD into the OS, and then PackageInstaller drives the actual
copying process, allowing it to use FileUtils.copy() to speed
up the copying process.  (Local benchmarks are showing a 24% speed
improvement.)

We still create a FileBridge to protect the session while an active
copy is happening.

Test: bit FrameworksCoreTests:android.os.FileUtilsTest
Test: vogar --mode app_process --benchmark frameworks/base/core/tests/benchmarks/src/android/os/FileUtilsBenchmark.java
Bug: 71932978, 25510838
Change-Id: Icc237b4c0f80d5d24b74a30f238b7fe505b856ce
2018-02-02 11:32:56 -07:00
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