Commit Graph

5247 Commits

Author SHA1 Message Date
Eugene Susla
9f29617d58 Merge "Add system feature for Companion Device Manager" 2017-03-21 23:58:35 +00:00
TreeHugger Robot
11f5cf937a Merge "Send launch token to activity manager" 2017-03-21 22:55:09 +00:00
Jeff Sharkey
6f4b2a3039 Shame developers that are calling hidden APIs.
Test: builds, boots
Change-Id: Id3edf1a7890f7dbc4cff2a2699bbeabc247c6e90
2017-03-21 14:13:47 -06:00
TreeHugger Robot
5dd59219e3 Merge "[Resources] preloaded drawables few" 2017-03-21 16:17:04 +00:00
Adam Lesinski
60b4af5d65 Merge "AssetManager: Guard against null in array retrieval" 2017-03-21 01:03:18 +00:00
Todd Kennedy
b3b43130db Send launch token to activity manager
When an instant app is installed, control passes from the platform
to the instant app installer. However, when the instant app is
launched, the original launch token needs to be associated with that
launch. Do this by sending the launch token along with the original
launch intent

Change-Id: I5741be343862d4e5c8bfb6b4a81d0bac8e53ea9c
Fixes: 35445667
Test: Build and manully inspect the event logs to ensure the launch token is sent on instant app launch
2017-03-20 16:05:48 -07:00
Kevin Hufnagle
652438cb19 2-way cherry-pick from oc-preview-docs-release: docs: Updated ShortcutManager Javadoc for Android O Developer Preview.
Test: make ds-docs -j12

Bug: 34685739
Change-Id: Ie70977f9b7b5b08de8bdd583a1e21b8a00eb5970
Original-Change-Id: I3cfa360ebd025a7eb198d7fe54f96059f42cd7f5
Original-Change-Id: I45ef30010f696604c06ce2cd7e2eca1db012e68b
2017-03-20 15:01:39 -07:00
Kevin Hufnagle
3e1be91dce docs: Edited ShortcutManager reference docs for Android O.
Added descriptions of features that have been added or have changed
within the ShortcutManager class.

Bug: 34685739
Change-Id: I45ef30010f696604c06ce2cd7e2eca1db012e68b
2017-03-20 14:24:39 -07:00
Alan Viverette
a8a66ccf1c [Resources] preloaded drawables few
Symptom: preloaded drawables few
Root Cause: all Java-side usages of config flags Must use Java flags
Solution: all Java-side usages of config flags Must use Java flags
Project: N70
Note:
Test: No

Fixes: 36448068
Change-Id: Iba4ac0067405bf1605cb1a98aa4dfc6263bbe5f8
2017-03-20 15:00:51 -04:00
Jeff Sharkey
683bcd30ef Use allocatable space when measuring for install.
The system is often willing to clear cached data to make room for
incoming installs, so use StorageManager.getAllocatableBytes() when
making "does it fit?" style decisions.

Add new INSTALL_ALLOCATE_AGGRESSIVE flag, which will flow through
to use StorageManager.FLAG_ALLOCATE_AGGRESSIVE when making allocation
related requests.  (This can be used by installers to indicate
packages that are critical to system health or security.

Test: runtest -x frameworks/base/core/tests/coretests/src/android/content/pm/PackageHelperTests.java
Bug: 36131437
Change-Id: If8118762fd1ca1f497d2cdd1787bdb3c9759dcc0
2017-03-18 17:54:54 -06:00
TreeHugger Robot
cf2c279a23 Merge "Add TRON logs" 2017-03-18 17:37:02 +00:00
fionaxu
fcd1493a6a Merge "remove deprecated SIM_ACTIVATION_REQUEST intent" am: 7f8d27f84b am: 4aadda1902
am: 606f1ae931

Change-Id: I345b2853acca9e0165c2bf26d885ff794b734d69
2017-03-17 23:50:47 +00:00
fionaxu
4aadda1902 Merge "remove deprecated SIM_ACTIVATION_REQUEST intent"
am: 7f8d27f84b

Change-Id: Ia1216368a2a2a4959283d95bbc4be26789f151f6
2017-03-17 23:34:49 +00:00
Adam Lesinski
10eb1455b9 Merge changes from topic 'configForSplit'
* changes:
  libandroidfw: Search all packages for an identifier
  AAPT2: Finish support for feature splits
  Add support for configForSplit
2017-03-17 23:19:13 +00:00
fionaxu
77a744c75e remove deprecated SIM_ACTIVATION_REQUEST intent
This deprecated intent voilates intent naming conventions as defined in CDD.

Bug:35271104
Test: Manual
Change-Id: Ic7f251a6471de31e17960d612e108203983ce32d
2017-03-17 14:47:18 -07:00
Todd Kennedy
50d946c13a Add TRON logs
Add logs for instant app resolution [both phase 1 & 2]
as well as new logs for all activity starts.

Change-Id: I0d25daa383854eacd3bc406ce1360d819a8ec4ba
Fixes: 35442251
Fixes: 35441725
Test: Manual; install/run instant app and inspect the event logs for appropriate tags
2017-03-17 13:55:38 -07:00
Chad Brubaker
06ca1e0873 Allow Instant Apps access PackageInfo of exposed apps
Instant Apps can only see apps that explicitly expose a component via
android:visibleToInstantApp.

Bug: 34087569
Test: cts-tradefed run commandAndExit cts-dev -m
CtsAppSecurityHostTestCases -t android.appsecurity.cts.EphemeralTest
Change-Id: Ibcba43597f545966abc883e90008369fb20d61ae
2017-03-16 18:42:00 -07:00
Adam Lesinski
ba9576d977 AssetManager: Guard against null in array retrieval
Resources does the right thing and throws NotFoundException
if the result from AssetManager.getResourceTextArray() is null,
but AssetManager itself doesn't guard from the native implementation
returning null.

This lets callers always protect against missing resources via
catching NotFoundException.

Change-Id: I4f7ad32819bc9598efb28dbb10a59ff5201ecfca
Test: manual
2017-03-16 17:42:04 -07:00
Adam Lesinski
1665d0f028 Add support for configForSplit
Applications with the android:isolatedSplits="true" attribute in
their AndroidManifest.xml would have their Split APKs loaded in
isolation of each other, based on a set of dependencies.

Configuration Splits generated for a Feature split would not be properly
loaded before, so this change, along with a tools change, fixes this
issue and completes support for isolatedSplits.

Bug: 30999713
Test: CTS test coming (depends on some tool changes)
Change-Id: Ia4e7b0e69168a9d6637867558e306f7031720fb3
2017-03-16 15:45:10 -07:00
TreeHugger Robot
2bd3c49eb4 Merge "Add feature tag android.hardware.vr.headtracking." 2017-03-16 20:28:03 +00:00
Craig Donner
279dd66dfd Add feature tag android.hardware.vr.headtracking.
Different versions of this feature specify different levels of
headtracking capability.

Bug: 36294374
Test: build
Change-Id: I00273c9093321661b5ca519d7cd065ae0105c3b2
2017-03-16 11:48:27 -07:00
Jeff Sharkey
b30ee8d025 Merge "Create new BroadcastBehavior annotation." 2017-03-16 17:06:39 +00:00
TreeHugger Robot
c2d761a445 Merge "Adapt unpaged cursors to paged requests." 2017-03-15 23:59:26 +00:00
Steve McKay
e5f868fd31 Adapt unpaged cursors to paged requests.
Allow all client targeting Android O to assume paging
    support for any provider.
Adds a new PageViewCursor that adapts an unpaged cursor
    to a paged request.
Updates ContentProviderNative to perform wrapping on
    unpaged results.

Bug: 30927484
Change-Id: I4e225dc16761793c85ef8a195bf049113c79cd20
Test: Added for new class. Run info @ frameworks/base/core/tests/coretests/README
2017-03-15 15:29:52 -07:00
TreeHugger Robot
5fff20cac1 Merge "Clean up public FontConfig APIs" 2017-03-15 18:52:04 +00:00
Seigo Nonaka
ac873c9f25 Clean up public FontConfig APIs
This CL contains following clean up:

- Hide unnecessary constructors.
- Change List<XX> to XX[] since actually all fields are immutable.
- Change font's variant type from String to int.
- Decouple resource related members to FontResourcesParser.
- Add NonNull/Nullable to all fields.

Test: ran android.content.res.FontResourcesParserTest

Change-Id: If456266ffff86d41342572a19662cc8f3cd13181
2017-03-15 10:16:55 -07:00
TreeHugger Robot
be4cf58436 Merge "Add API to mark apps that have an update available" 2017-03-15 17:04:22 +00:00
Todd Kennedy
ab53289c59 Add API to mark apps that have an update available
Ostensibly for instant apps, we allow play to mark an app as having
an update available. This will trigger instant app resolution even
if the instant app is already installed on device.

Bug: 35143464
Test: Manual; launch URI of installed instant app, see it runs w/o resolution. set bit. launch URI of installed instant app, see it runs resolution
Change-Id: I511df2b2a3eab39377167c770255ccbe02d5dad2
2017-03-15 07:31:09 -07:00
Eugene Susla
7c3eef2f3d Add system feature for Companion Device Manager
Bug: 30932767
Test: Add just the feature gating first, ensure Context#getSystemSetrvice now
returns null.
Add feature in the configuration files, ensure companion device feature works again.
Change-Id: I4ad2d52f7877eae0e951f43ddbb23881d5de8d8b
2017-03-14 19:50:49 -07:00
Jaekyun Seok
0434289c45 Apply static RRO
Static RRO package is designed to support resource overlay for system
server and they shouldn't be disabled or changed by a user.
The design details are in go/treble-static-rro.

Selection method for static RROs will be applied later when its design
is determined.

Test: building succeeded and tested on sailfish.
Bug: 35742444
Change-Id: I8cbf2fd37a73a24bf6ad291e2c5cf75a0fc757fc
2017-03-15 00:07:34 +09:00
Jeff Sharkey
3fcba6afde Merge "Move PackageInstaller over to AppFuse." 2017-03-13 21:44:40 +00:00
Chad Brubaker
ebf3a0d57f Merge changes from topic 'receiver_IA'
* changes:
  Enforce visibleToInstantApps for receivers
  Only send exposed broadcasts to Instant Apps
2017-03-13 20:52:18 +00:00
Jeff Sharkey
02d4e3441b Move PackageInstaller over to AppFuse.
When PackageInstaller was originally written, we needed a way to
ensure that untrusted apps were fully hands-off of any opened
FileDescriptors before we could proceed with certificate checks.

The best way to satisfy this security constraint was to build
a utility called FileBridge which was a (terribly slow) RPC
mechanism that could be cut off when needed.

However, a new feature called "AppFuse" offers to create a "proxy"
FileDescriptor which relays file operations back into userspace, and
it's much more performant than FileBridge.  (Local benchmark tests
that deliver a 64MB APK show that AppFuse is about 45% faster than
FileBridge.)  Because userspace is still involved in every operation,
we can still "revoke" access at any time to deliver on our security
requirements.

This change adds support for AppFuse, while keeping around FileBridge
as the default for now.  An upcoming flag-flip CL can be used to
easily switch between the two modes.

Test: builds, boots, benchmarking, stress tests
Bug: 35728404, 31332379, 25510838
Change-Id: I2a70c0ca922a5ba468ffdef7b2fd8ab79f7cfefd
2017-03-13 13:59:12 -06:00
Ben Lin
3e57595674 Merge "Stop DocumentsContract from consuming Exceptions if app is targetting O or above." 2017-03-13 17:27:22 +00:00
Jeff Sharkey
179d6b3f0c Deprecate storage "low" and "ok" broadcasts.
These broadcasts resulted in a terrible user experience where dozens
of apps would wake up and try deleting everything they possibly can,
meaning that we'd thrash between showing/hiding the low space
notification to users.

Instead, if apps have data that they're okay being purged when the
system is chronically low on space, we want to strongly encourage
them to rely on the much-improved getCacheDir() behaviors in OC.

Test: builds, boots
Bug: 35406598
Change-Id: I74abfba1b8d3948363b79f8b66ca0ad60faac756
2017-03-12 17:31:20 -06:00
Ben Lin
8ea8200fed Stop DocumentsContract from consuming Exceptions if app is targetting O
or above.

Test: Builds properly.
Bug: 36023174
Change-Id: I455d358672f35fbeb5678c965b25268229ed4882
2017-03-10 10:48:31 -08:00
TreeHugger Robot
642028fccd Merge "Replaced auto-fill by autofill to keep it consistent with API style." 2017-03-10 07:05:41 +00:00
Felipe Leme
640f30a776 Replaced auto-fill by autofill to keep it consistent with API style.
This change will affects 2 types of apps: autofill service implementations
and apps that use autofill APIs.

Since just the former is known to be used at the moment, we're not trying
to keep backward compatibility with the latter.

Bug: 35956626
Test: CtsAutoFillServiceTestCases pass
Test: android.provider.SettingsBackupTest pass

Change-Id: Ia720083508716deae9e887f9faa7ae7c5a82f471
2017-03-09 08:14:49 -08:00
TreeHugger Robot
6e2026c348 Merge "Fix stale data due to stopped loader." 2017-03-09 15:13:09 +00:00
Jeff Sharkey
32ee8eefd7 Create new BroadcastBehavior annotation.
This will be used to help document the expected behavior of various
broadcast actions defined by the OS.

Also add logic to PackageParser that will then yell at developers
whose manifests are making bad assumptions about which broadcasts
they'll receive.

Test: builds, boots
Bug: 35925551
Change-Id: I059c2bf8aa3ce53d9ff18dcc263db7620cd14bd6
2017-03-08 20:19:31 -07:00
TreeHugger Robot
c66b2d2313 Merge "Add OverlayManagerService#setEnableExclusive" 2017-03-09 03:14:57 +00:00
George Mount
899ca3236d Fix stale data due to stopped loader.
Bug 33185424

When stopping an CursorLoader while data is being loaded,
the load task will be canceled. This CL marks the data as
changed if the cancel is called while the loader is stopped.

Test: I63b48210a25be72d13a2a6182eb1757cbe6a1949
Change-Id: Ibf9c5facdcc5160f6ed146c5fdd063549ac2a7a8
2017-03-08 15:29:27 -08:00
Jeff Sharkey
60f95aa00a Move lagging users over to new storage API.
Over the last month we've been moving everyone over to the new
StorageStatsManager public APIs, but we missed these users.

The ApplicationsState changes are straightforward, but we had to
completely rewrite StorageMeasurement to use the new fast-path
quota APIs.

Test: builds, boots, UI using StorageMeasurement works.
Bug: 36056120
Change-Id: If02177c95bf8c96ae4eceac4d631a168f99bef84
2017-03-08 13:57:29 -07:00
Chad Brubaker
816c83bf03 Enforce visibleToInstantApps for receivers
Instant apps can only send broadcasts to receivers that are declared in
the manifest with android:visibleToInstantApps=true or if the app
registers a receiver at runtime using the new methods that take
visibleToInstantApps.

Bug:33350280
Test: Manually sending broadcasts from Instant Apps only goes to
receivers with visibleToInstantApps set to true.
Test: Receiving a broadcast from within the same app does not require
visibleToInstantApps to be set.

Change-Id: I54d79a502ba9c5fd03ede3c09e08afc88fe2775f
2017-03-07 15:28:03 -08:00
TreeHugger Robot
aae1cc597d Merge "Expose Instant App API defined in MR1" 2017-03-07 23:20:53 +00:00
Daniel Nishi
8603ad42df Merge "Use the fast track for the AppCollector." 2017-03-07 22:55:20 +00:00
Jason Monk
929ed8d2f4 Add OverlayManagerService#setEnableExclusive
This lets settings use one call to set the current theme overlay
for the "android" package.

Test: Change theme in Settings -> Display
Change-Id: Ia566e58c5479dedb7184f4218151f8080f8ebc0f
2017-03-07 16:01:20 -05:00
Todd Kennedy
9c9fdf27ff Expose Instant App API defined in MR1
These were created in MR1 but couldn't be submitted because
they were defined too late [after API freeze].

Change-Id: Ie6884236776bd26e9d0b557fd125b8c77b0ad93b
Fixes: 34890162
Fixes: 35193180
Fixes: 35193418
Test: manual
2017-03-07 11:40:59 -08:00
TreeHugger Robot
a61627935e Merge "Support non-system Font Providers" 2017-03-07 18:17:15 +00:00
TreeHugger Robot
c7eefdbda7 Merge "Framework: Avoid string allocations" 2017-03-07 16:02:54 +00:00