Commit Graph

5479 Commits

Author SHA1 Message Date
Neil Fuller
167b047385 Time zone update API classes
Time zone update API classes. Currently hidden but they
will go on to be unhidden in future.

This forms the basis of client and system server code to
support time zone updates.

Tests can be run with:

make -j30 FrameworksCoreTests
adb install out/target/product/angler/data/app/FrameworksCoreTests/FrameworksCoreTests.apk
adb shell am instrument -e package android.app.timezone \
    -w com.android.frameworks.coretests \
    "com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner"

This contains a cherry-pick / conflict resolution of
commit bede17c216 after an automerger skip.
(cherry picked from commit bede17c216)

Bug: 31008728
Test: See above.
Merged-In: I668bc8ac0cb78f3d4d9a4b7ad6ac1534b88af833
Change-Id: Icde574f8974152617a1f7ac9fa225bd5011dcce1
2017-05-04 15:58:40 +01:00
Bartosz Fabianowski
40a006285b Add more explicit documentation for install reason
This CL adds more explicit documentation of the install reason argument /
return value to PackageInstaller.SessionInfo.

Bug: 37324584
Test: None

Change-Id: I2450cc669b194e611c5dc07c6a0a5cd78a98c039
2017-05-03 15:17:36 +02:00
Calin Juravle
5f016f6705 Merge "Make PM#notifyDexLoad oneway" into oc-dev 2017-05-02 19:03:22 +00:00
TreeHugger Robot
b3e92234fa Merge "Fix NPE happens if no source was specified to font element." into oc-dev 2017-05-02 17:23:03 +00:00
TreeHugger Robot
22c1275c89 Merge "Don't send configuration that app doesn't support to it." into oc-dev 2017-05-02 13:58:59 +00:00
Seigo Nonaka
5e0aed49a8 Fix NPE happens if no source was specified to font element.
This also fixes unexpected fallback to the old implemntation by calling
allowUnsupportedFont() which is only for backward compatibility.

This CL also remove getResourceId() method. Nobody uses this method.

Bug: 37865521
Bug: 37844248
Test: am instrument -w -e class android.content.res.cts.ResourcesTest\
      android.content.cts/android.support.test.runner.AndroidJUnitRunner
Change-Id: I987448add728c53c916f24a2ea8f337be417248f
2017-05-01 23:23:50 -07:00
Calin Juravle
0a3693c21d Make PM#notifyDexLoad oneway
There's not need to wait for the PM to process the dex load
notification.

Make notifyPackageUse one way as well (for the same reason).

Bug: 37876265
Test: manual test to verify that notifications still work
Change-Id: I29d076348c2999a4441c2047a89a45b085bf3761
2017-05-01 19:49:21 -07:00
Rob Carr
e8d7c01e8a Merge "Fix rotation animation selection." into oc-dev 2017-05-02 01:01:34 +00:00
Wale Ogunwale
d4b1d1ee72 Don't send configuration that app doesn't support to it.
If an app doesn't support the current device orientation configuration,
then don't run the app in that configuration. Instead have the run in
the last configuration that it supports.
This mostly fixes transient cases where there is a short window that the
device is switching configuration and the app could be sent the single
incorrect configuration that is quickly corrected

Test: Will be added soon.
Fixes: 36897968
Change-Id: I030a04200fdf33c4c1938bda980ea8c14aa1c736
2017-05-01 17:48:58 -07:00
TreeHugger Robot
0d6c3a691e Merge "Rename to follow API council guidance." into oc-dev 2017-05-01 23:15:59 +00:00
Robert Carr
c0149bf0f6 Fix rotation animation selection.
The default activity specified value for rotation animation
should be unset, not ROTATE, so that it will not override
window specified versions.

Bug: 37671120
Test: Rotate camera 180 degrees...expect crossfade or jumpcut depending on APK version but never rotate animation.
Change-Id: I6acbf32b3de0e2848565cc6cb6fb62f625053634
2017-05-01 15:22:22 -07:00
Jeff Sharkey
f29d19610d Rename to follow API council guidance.
Test: builds, boots
Bug: 37422404
Change-Id: Idcec897e775f2613805a86209615e389b63bd78d
2017-05-01 15:09:46 -06:00
Svetoslav Ganov
e6b4614d88 Addess API council comments
Test: manual

bug:37322491

Change-Id: I2017e667c5452c7ef7c56ec19c594e685700b33a
2017-05-01 13:42:04 -07:00
Jeff Sharkey
a5e8bfe999 Merge "Rename restartOnConfigChanges to recreateOnConfigChanges." into oc-dev 2017-05-01 18:22:37 +00:00
Matthew Snider
ef08871d6b Merge "Removing ACTION_CLEAR_PACKAGE intent" into oc-dev 2017-05-01 16:42:24 +00:00
Jeff Sharkey
080e16575a Merge "Move intents ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED, ACTION_DEFAULT_SUBSCRIPTION_CHANGED and EXTRA_SUBSCRIPTION_INDEX from Intent class to SubscriptionManager class." into oc-dev 2017-05-01 16:05:35 +00:00
Holly Jiuyu Sun
c93c3b9cf3 Rename restartOnConfigChanges to recreateOnConfigChanges.
Bug: 37738136
Test: unit test
Change-Id: Icea9faf1d7f55b875d6ff9e4cc9aed4868637895
2017-05-01 08:27:39 -07:00
Dianne Hackborn
f1a4b50739 Merge "Work on issue #36891897: Need to ensure foreground services can't..." into oc-dev 2017-04-30 17:19:34 +00:00
Martijn Coenen
35312fd4c6 Merge "Rename persistentFeature to persistentWhenFeatureAvailable." into oc-dev 2017-04-30 13:47:12 +00:00
TreeHugger Robot
4c60abc9ae Merge "Address API council comments" into oc-dev 2017-04-30 06:43:15 +00:00
Dianne Hackborn
83b40f69be Work on issue #36891897: Need to ensure foreground services can't...
...hide themselves

The activity manager now keeps track of all apps that are running
foreground services and builds a notification showing them to the
user.  We ensure they are shown to the user for at least 30 seconds
(configurable).  If foreground services are executed while the
screen is off, their apps will be shown to the user for at least
30 seconds after the screen turns back on.

While doing this I am also adding a new process state to distinguish
between "important background" stuff that should bypass bg check vs.
ones that don't.  By default, these now no longer bypass bg check,
which is really the expected (and documented) behavior.  There is a
new bind flag to allow them to bypass bg check, which is currently
only used by the IME.

Also add some new job scheduler commands that will be used to
write new tests cases for jobs timing out.

Bug: 36891897

Test: manual

Change-Id: Ied3f7b56444254513fd776f06b88bc0e54704958
2017-04-29 19:41:12 -07:00
Jeff Sharkey
e14159d2c5 Merge "Revert "Treat Telephony as legacy app for now."" into oc-dev 2017-04-29 17:38:59 +00:00
Jeff Sharkey
d9f6946c42 Merge "Experimental features only on debuggable builds." into oc-dev 2017-04-29 17:33:58 +00:00
Svet Ganov
f965b87a78 Address API council comments
bug:37769694
bug:37322491

Change-Id: I931cfb5ea5fef1505a97b169125ed2cdaaa3d6ff
2017-04-28 23:45:17 +00:00
Jeff Sharkey
d275dc83be Merge "Respond to API council feedback." into oc-dev 2017-04-28 22:54:39 +00:00
Dianne Hackborn
1be5354aba Fix issue #37324532: API Review: android.content.pm.InstrumentationInfo
targetProcess -> targetProcesses

Test: bit CtsAppTestCases:InstrumentationTest

Change-Id: I859985c689cc588c585cd0ec6e0a20411493a7c0
2017-04-28 13:38:34 -07:00
Jeff Sharkey
1a74942fbf Respond to API council feedback.
Test: builds
Bug: 37752002
Change-Id: I7ae1699c4c5e1a098d16465c41fb41510478b678
2017-04-28 14:24:03 -06:00
Malcolm Chen
598d24c558 Move intents ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED,
ACTION_DEFAULT_SUBSCRIPTION_CHANGED and EXTRA_SUBSCRIPTION_INDEX
from Intent class to SubscriptionManager class.

Bug: 37497166
Test: Manual
Change-Id: Ifeedf974328cd3d839d7f66bf41a91c479d66316
2017-04-28 11:27:10 -07:00
Jeff Sharkey
5b26dac2c3 Merge "Change ClipData.addItem signature" into oc-dev 2017-04-28 17:53:14 +00:00
TreeHugger Robot
77cc43e0d2 Merge "Respond to API council feedback." into oc-dev 2017-04-28 17:10:16 +00:00
Martijn Coenen
8d74ca4ee4 Rename persistentFeature to persistentWhenFeatureAvailable.
Addresses API review comments.

Bug: 37742058
Test: builds
Change-Id: If7ddeefa4f1ccbdf087c837d1584f255585886c1
2017-04-28 09:41:48 -07:00
TreeHugger Robot
dc326a883e Merge "Apply static RRO when parsing Android manifest of a target package" into oc-dev 2017-04-28 09:48:48 +00:00
Jaekyun Seok
30dc2a0866 Apply static RRO when parsing Android manifest of a target package
This CL creates idmaps for static RROs right before parsing a target
package. Those idmaps will be used to parse correctly the Android
manifest of the target package.

Later, OverlayManagerService will update each idmap with the correct
gid from the target package app id.
Note that the idmaps generated here will be used by OverlayManagerService
as well until they are outdated (http://ag/2127839).

Additionally a target package should be parsed again if its overlays are
updated to apply the changes.

Test: building succeeded and tested with sailfish-userdebug.
Bug: 37179531

Change-Id: Ie0d5e92ae6e06b2d377ebd4cfdb0a8519b49a944
2017-04-28 15:51:20 +09:00
Vladislav Kaznacheev
c35c02f1ea Change ClipData.addItem signature
Make ContentResolver the first parameter.

Bug: 37419379
Test: android.content.cts.ClipboardManagerTest
Change-Id: I3f7772e8ddc93eec0e930b62c722a145f9e6f0fa
2017-04-27 15:29:11 -07:00
Sujith Ramakrishnan
48e19c8cc9 Updated intent action name to comply with CTS.
- Updated "android.intent.action.GLOBAL_BUTTON" to
	  @SystemApi

Test: manual - Bottom button on Fugu brings up pairing screen
Test: manual - GUIDE button on Fugu brings up TV channels app

Bug: 37499047
Change-Id: I3b92ed99aeb53674fbaac91126e8c5e7fcffa715
2017-04-27 13:26:43 -07:00
Makoto Onuki
301663a61b Merge "Change IMPORTANCE_PERCEPTIBLE_DEPRECATED to IMPORTANCE_PERCEPTIBLE_PRE_26" into oc-dev 2017-04-27 20:03:22 +00:00
Chad Brubaker
a9d0e6b205 Merge "Allow apps to provide the Instant App installer extra information" into oc-dev 2017-04-27 19:30:57 +00:00
Jeff Sharkey
a4d34d971c Respond to API council feedback.
Move aggressive allocation to @SystemApi, which means we can hide
the "flags" API variants.

Remove UUID APIs, since we should use existing Serializable APIs.

Relax permission checks to allow apps to ask for their own stats.

Improve docs.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Bug: 37534687, 37534941, 37718184, 37738770
Change-Id: I6a763fb3ab3169c8d3329765bb31e1ee08d9ced7
2017-04-27 11:33:39 -06:00
Stefan Ramsauer
ba9ab17434 Merge "Fix parameter name mismatch in getResourceIdentifier." into oc-dev 2017-04-27 15:09:26 +00:00
TreeHugger Robot
6b36aeb491 Merge "Adds a comment to EXTRA_CONTENT_ANNOTATIONS to prevent developers from using colons in their customized annotations." into oc-dev 2017-04-27 07:26:14 +00:00
TreeHugger Robot
f147688149 Merge "Address API Council feedback." into oc-dev 2017-04-27 06:26:04 +00:00
Makoto Onuki
e92f79450a Change IMPORTANCE_PERCEPTIBLE_DEPRECATED to IMPORTANCE_PERCEPTIBLE_PRE_26
Also make sure to return the legacy value from
RunningAppProcessInfo.importance.

Bug: 37636026

Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsAppTestCases -t 'android.app.cts.ActivityManagerTest#testGetRunningAppProcesses'
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsAppTestCases -t 'android.app.cts.ActivityManagerTest#testGetMyMemoryState'
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsAppTestCases -t 'android.app.cts.AlertWindowsTests'
Change-Id: Ie04e4dfa40c28ea391ae5ce3c769c6f8ee70a43d
2017-04-26 16:12:43 -07:00
Chad Brubaker
0606861de5 Allow apps to provide the Instant App installer extra information
Apps may want to provide additional context information to the instant
app installer in order to allow the installer to make smarter choices
about the context of the launch. This CL adds a bundle to
ActivityOptions that is sent to the Installer (if an Instant App is
launched) but not to any other application if something else on the
device handles the Intent instead.

Bug: 35180854
Test: manual
Change-Id: Ifc69a420a9c68041b39acd8a4b83db8a789822a6
2017-04-26 14:01:48 -07:00
Nathan Harold
35eb324bf1 Merge "Hide IpSecManager, IpSecTransform, and IpSecAlgorithm" into oc-dev 2017-04-26 18:03:00 +00:00
Kang Li
2f85e8a317 Adds a comment to EXTRA_CONTENT_ANNOTATIONS to prevent developers from
using colons in their customized annotations.

bug: 37496130
Test: skipped, because all changes are in comments.
Change-Id: Ifd7592c50f5079bb6035b051bf63f986c7cbae84
2017-04-26 16:38:14 +00:00
Jeff Sharkey
3f1790dec8 Experimental features only on debuggable builds.
Test: builds, boots
Bug: 36107077
Change-Id: I97b82d1d358fd1676362a3360a70116890e52085
2017-04-25 18:56:20 -06:00
Jeff Sharkey
4b2e87f928 Revert "Treat Telephony as legacy app for now."
This reverts commit 2afae796de.

Reason for revert: b/35792675 now fixed

Change-Id: Ie559fc7ebe209c45bb598daba781ef5e6e1f839e
2017-04-26 00:37:15 +00:00
Nathan Harold
bd62d6aff2 Hide IpSecManager, IpSecTransform, and IpSecAlgorithm
These classes, originally planned to be part of the
public API, are not ready for public consumption.
They are planned to be un-hidden in a future release.

Bug: 37681043
Test: make update-api and make
Merged-In: I8caccd3f8455341cb56a2256354eacbadedff047
Change-Id: I8caccd3f8455341cb56a2256354eacbadedff047
(cherry picked from commit e38565fc74ee19e27175782be3cf2f0dffefd3a6)
2017-04-25 16:53:50 -07:00
TreeHugger Robot
0a4b7f5a86 Merge "Add concept of implicitly exposed components" into oc-dev 2017-04-25 23:50:21 +00:00
Jeff Sharkey
a00c7c0a99 Merge "Fix some issues found by new doclava linter." into oc-dev 2017-04-25 22:11:01 +00:00