Commit Graph

5276 Commits

Author SHA1 Message Date
Makoto Onuki
03169cddf6 Mention <intent> can't have string resources.
Test: build
Bug 34046756

Change-Id: I761b246d6aba5df4a836af3d0b3bef8f977be5ec
2017-03-29 21:07:15 +00:00
TreeHugger Robot
61ae34afe3 Merge "Intercept direct launch of instant app installer" into oc-dev 2017-03-28 20:47:09 +00:00
TreeHugger Robot
1b782bffdf Merge "make MATCH_FACTORY_ONLY @SystemAPI" into oc-dev 2017-03-28 20:46:44 +00:00
TreeHugger Robot
01d69aae3a Merge "Add extra flag to ApplicationInfoFlags" into oc-dev 2017-03-28 20:46:21 +00:00
Todd Kennedy
b21be12d9d Intercept direct launch of instant app installer
The instant app installer is not designed to be launched directly
by 3p apps. Instead, intercept the launch and make it look like
a "normal" instant app launch.
cherry-picked from I89c9b8c56865e260a2b92f8c2312a305a74f9cf5

Bug: 33073524
Test: Built and notice poorly behaving apps [*cough* keep *cough*] now launch instant apps
Change-Id: I5401aa8423042f54f1478409065b0d6b25cebe89
2017-03-28 13:43:21 -07:00
Todd Kennedy
ea2529df19 make MATCH_FACTORY_ONLY @SystemAPI
cherry-picked from I9e2046b62cb20c5b6651e91f833aff04d45d9800

Bug: 35946061
Test: None; just added an annotation
Change-Id: I604f962b9826700c335eeda9682d3354f6260c40
2017-03-28 13:42:00 -07:00
Todd Kennedy
b65c36a034 Add extra flag to ApplicationInfoFlags
MATCH_DISABLED_COMPONENTS should be part of ApplicationInfoFlags.
cherry-picked from If6a925c156192ee4663f0cb66d82fc03a86940d6

Change-Id: I048635ff0938f2772d5702de7eb4bc4812ece605
Fixes: 34969805
Test: None; updating annotation
2017-03-28 13:40:02 -07:00
Chad Brubaker
336ae5b616 Add ACTION_EPHEMERAL_RESOLVER_SETTINGS
This Intent will be used in Settings to show the settings UI for the
Ephemeral resolver. Settings can get the correct component to send the
Intent to by calling
PackageManager.getInstantAppResolverSettingsComponent

Bug: 35918998
Test: Boots
Change-Id: I0edcf85704f2c19e0ee27f91b6ef057d52e32778
(cherry picked from commit aa49cb86e6)
2017-03-28 20:34:55 +00:00
Amith Yamasani
2cbfa1ec74 Catch IllegalArgumentException to avoid SyncManager crash
When SyncManager's scheduling races with an app with a sync
adapter being uninstalled, it can get an IAE from PackageManager.

Catch this exception and skip over the job.

Bug: 36658118
Test: Manual
Change-Id: I0a63a3e0aa19cb5685aa18c7c6c9d6dd6ccfd60a
2017-03-28 10:34:01 -07:00
Wale Ogunwale
0cb70ac40f Fixed logic error with setting maxAspectRatio
Ignore maxAspectRatio values less than 1.0 and set it to 0 which
means use device aspect ratio.

Change-Id: Ib2c76f6232e3f7521a1a4565d7c0c9e1de9c9eac
Fixes: 36606641
Test: cts/.../run-test CtsAppTestCases android.app.cts.AspectRatioTests
2017-03-27 17:27:59 +00:00
TreeHugger Robot
bfc4d59bf8 Merge "Replace possibly-expensive size() == 0 with isEmpty()" 2017-03-27 17:15:25 +00:00
Mike Tsao
c74ee2f8d3 Replace possibly-expensive size() == 0 with isEmpty()
Bug: 36596458
Change-Id: Ieb0ea65be056bb8ce0613280e6213c330fbf783c
Test: added ContentValuesTest
2017-03-24 15:10:41 -07:00
Wale Ogunwale
55ddf8f9e5 Added support for maxAspectRatio manifest attribute.
- Allows an app to specify the maximum aspect ratio it supports.
- Support for overriding configuration and bounds at the activity
record and app window token level.

Test: cts/.../run-test CtsAppTestCases android.app.cts.AspectRatioTests
Test: bit FrameworksServicesTests:com.android.server.wm.WindowContainerTests
Test: bit FrameworksServicesTests:com.android.server.wm.WindowFrameTests
Bug: 36505427
Bug: 33205955
Bug: 35810513
Change-Id: Ib2d46ed0c546dd903d09d6bb7162a98bd390ba81
2017-03-24 13:48:40 -07:00
TreeHugger Robot
e219aaae85 Merge "Delete preloadsFileCache when the cache has expired" 2017-03-23 21:19:48 +00:00
Fyodor Kupolov
935618a2c5 Delete preloadsFileCache when the cache has expired
Added deletePreloadsFileCache that can be called from settings app.

Modified freeStorageAndNotify to call deletePreloadsFileCache if the
cache has expired, or aggressive flag is set.

Bug: 34690396
Test: Manual
Change-Id: Ia097cd2f62ad501644be1c2cc573c249d8cfbf55
2017-03-23 10:12:55 -07:00
Todd Kennedy
fe7f38c376 update comment with a bug number
Change-Id: Iff12dfd90d5b67da9f32b1f7b2410ac59ef07018
Test: None. Comment-only change
2017-03-23 09:52:03 -07:00
TreeHugger Robot
0466e4a837 Merge "Allow exposing components via <meta-data>" 2017-03-23 16:29:02 +00:00
TreeHugger Robot
a9d2e5e798 Merge "Preload fonts from an array" 2017-03-23 16:17:51 +00:00
Clara Bayarri
2821eeae97 Preload fonts from an array
Until now we were reusing the font tags, but it is not needed,
we can declare the list of fonts to preload with a simple
resources array.

Test: manual
Bug: 36119246
Change-Id: I39819018012c322aff62e13aa69ab35467be57ac
2017-03-23 13:48:22 +00:00
TreeHugger Robot
ab2bc07e5f Merge "Prevent downgrade of targetSandboxVersion" 2017-03-22 21:14:05 +00:00
Clara Bayarri
fb483cc90c XML Support for non system font providers
The certs needed to identify non preinstalled providers
can now be declared in XML, using a resources array.

Test: runtest --path frameworks/base/core/tests/coretests/src/android/provider/FontsContractTest.java
runtest --path frameworks/base/core/tests/coretests/src/android/content/res/FontResourcesParserTest.java
Bug: 35025705
Change-Id: Ibf12ad409aa5a873ddb32b1383c147728e664c23
2017-03-22 11:47:51 +00:00
TreeHugger Robot
a6906adf59 Merge "Explicitly call out email in "social" category." 2017-03-22 04:22:19 +00:00
TreeHugger Robot
e2fa7c36c3 Merge "Deprecate EXTRA_STREAM." 2017-03-22 03:52:00 +00:00
TreeHugger Robot
8a29aecb73 Merge "Better ContentProvider error messages." 2017-03-22 03:17:01 +00:00
Jeff Sharkey
a0ba51c2ab Deprecate EXTRA_STREAM.
ClipData is much more flexible, and it should be used instead of
EXTRA_STREAM moving forward.  To ensure that legacy apps continue
working, the OS will offer to promote/demote the ClipData value
from/to EXTRA_STREAM.  (We already had the promotion logic, but we
were missing the demotion logic.)

Test: builds, boots
Bug: 35293781
Change-Id: I82cd0b95cf021292282649290ab046cc310fe160
2017-03-21 20:23:40 -06:00
Jeff Sharkey
d2b69100f4 Explicitly call out email in "social" category.
Test: builds, boots
Bug: 35294569
Change-Id: I08b2c1b1b95b6c2fc6fd7be417cd0f9547c8237b
2017-03-21 19:41:29 -06:00
Jeff Sharkey
c0cc220e63 Better ContentProvider error messages.
Help guide developers towards ACTION_OPEN_DOCUMENT and related
APIs when a Uri is backed by a DocumentProvider.

Also help developer understand that we expected a valid
ContentProvider for Uri notifications.

Test: builds, boots
Bug: 32642790, 36075317
Change-Id: I8e0e3cb25b183c4a9a094a53018822a4212bdaf9
2017-03-21 19:25:37 -06:00
Eugene Susla
9f29617d58 Merge "Add system feature for Companion Device Manager" 2017-03-21 23:58:35 +00:00
Todd Kennedy
752fb70b51 Allow exposing components via <meta-data>
Change-Id: I3d5f7f086c4da8d383f18f45e9510eea1db88c03
Fixes: 36479185
Test: Locally modify ephemeral cts tests to use <meta-data> and run 'cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.EphemeralTest'
2017-03-21 16:28:10 -07: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