16664 Commits

Author SHA1 Message Date
Tyler Gunn
346892ff9f DO NOT MERGE Expose phone account register/unregister intents.
These were previously @SystemApi.  Retaining the existing SystemAPI
behavior which sends the intents to those with a private permission.
Extending to ALSO send these intents to the default dialer app as well
using an explicit intent.
Cherry-pick from aosp-master to resolve merge conflicts.

Test: Manual
Bug: 37106957
Merged-In: Ifb72870105be5ba024af196a8c3165a9afb397ab
Change-Id: Ifb72870105be5ba024af196a8c3165a9afb397ab
(cherry picked from commit d9da6ce9938b4222cfb409f172cacfe4cf1593e6)
2017-04-17 17:39:22 +00:00
Hangyu Kuang
ab312729ce Merge "media: Address API review comments" into oc-dev 2017-04-17 17:04:28 +00:00
Aurimas Liutikas
ba590a694b Enhance Chronometer to better support Swedish countdowns.
Adds a method isTheFinalCountDown that allows to correctly
determine whether it is the final countdown.

Test: None
Change-Id: I786ae3455479bac25ccf25efba1c3dce18185117
2017-04-17 09:27:09 -07:00
TreeHugger Robot
bbcf5fba1c Merge "Remove @removed method" into oc-dev 2017-04-17 15:01:54 +00:00
TreeHugger Robot
676590d060 Merge "expose the instant app installer component" into oc-dev 2017-04-17 14:17:27 +00:00
Todd Lee
ea2f3be7aa OEM single-build/multi-SKU via dynamic RRO support
The purpose here is to provide support for selectively
enabling Runtime Resource Overlays (RROs) (specifically
those pertaining to a specific SKU, within a OEM's "single
build" covering multiple SKUs) at boot based on the value
of a pre-defined system property.

This mechanism is designed to be compatible with other,
recent changes to Runtime Resource Overlays - specifically:

- has no effect on 'isStatic'. Resource overlays must be
  attributed as static in order to qualify for loading into
  the system_server. The 'requiredSystemPropertyName/
  requiredSystemPropertyValue' mechanism operates
  independent of this and can be used on both static and
  non static overlays. The effect of specifying a conditional
  property on any overlay is that it will ONLY be enabled
  in the event that the system reflects both the property
  and the specified value (Note that in the ABSENCE of a
  conditional property, overlays are assumed to be enabled).

- has no effect on OverlayManagerService (OMS) API. The
  OMS provides the system with an interface through which
  overlays can be enabled/disabled and even rearranged at
  runtime. This provides the basis of support for various
  user-level features (e.g. dynamic theme selection).
  The 'requiredSystemPropertyName/requiredSystemPropertyValue'
  mechanism operates independent of this -
  with enablement being completely coupled to the available
  system properties on the device and NOT subject to change
  at runtime.

Note: as part of this change, original overlay tests have been
updated (fixed) and expanded to include tests to cover the
conditional property implementation.

Issue: http://b/35100249
Test: frameworks/base/core/tests/overlaytests/testrunner.py

Change-Id: I1990ce21a27a385db1e2f53294b69dd03988351e
(cherry picked from commit d5566c6c47faa6b9dda282741e25ac78c9487d58)
2017-04-17 14:12:00 +00:00
Julia Reynolds
f27d6b2b82 Add user to channel/group modification callbacks.
Because listeners can see notifications on managed profiles.

Test: runtest systemui-notification and testing with a sample app
(reading and updating channels and getting change
callbacks on a managed profile)
Change-Id: I5d7af3c417e3a3d18f992cc9ad01fbd7959de398
Fixes: 36783632
2017-04-17 08:44:35 -04:00
Philip P. Moltmann
494c3f5da2 Allow to finish session when all views are gone
An service can option to finish the session once all views that it
declared as important. Views that are important are all autofillable
views of any partition and the saveable fields of the last partition.

Test: CtsAutoFillServiceTestCases
Fixes: 35708237
Change-Id: I0ccade8ebb427e5d8928697ef0007c75d3f83df0
2017-04-16 21:36:25 -07:00
Hassan Shojania
f9d3bb7735 MediaPlayer/ModularDrm API review
Bug:  36790516
Bug:  36790220
Bug:  36788024
Bug:  36790117
Test: GTS tests
Change-Id: Id813459ae6b94e25a31736a5dec6a4c0744c4696
2017-04-15 14:26:44 -07:00
TreeHugger Robot
abbea1df6b Merge "Rework getMetrics() api per API council" into oc-dev 2017-04-15 18:52:06 +00:00
TreeHugger Robot
e587591c5a Merge "Remove ScoredNetwork.BADGING constants." into oc-dev 2017-04-15 09:04:35 +00:00
Jorim Jaggi
6acf7a7b45 Merge "Wallpaper color extraction API stub" into oc-dev 2017-04-15 04:52:24 +00:00
TreeHugger Robot
0d88904744 Merge "API for notification listener for Companioon apps" into oc-dev 2017-04-15 04:15:38 +00:00
Svetoslav Ganov
41200eac71 Merge "Add support for multiple fill contexts" into oc-dev 2017-04-15 03:29:13 +00:00
TreeHugger Robot
d98f26e4f3 Merge changes from topics 'network_specifier', 'networkspecifier' into oc-dev
* changes:
  [CM] Unhide the NetworkSpecifier as object API
  Make the NetworkSpecifier a class instead of a string.
  Add test coverage for NetworkSpecifiers.
2017-04-15 02:16:14 +00:00
Eugene Susla
cf00adebec API for notification listener for Companioon apps
Test: 1. Trigger the confitrmation dialog.
Ensure it looks exactly like the one from settings.
2. Call an API without associating the appa first
Ensure exception is thrown with a message mentioning the need to associate 1st
Change-Id: I94d4116e1988db869ed445ae3fd018c50590e3f4
2017-04-14 19:01:53 -07:00
TreeHugger Robot
7859022e8e Merge "BLE scan API using PendingIntent" into oc-dev 2017-04-15 01:34:08 +00:00
Lucas Dupin
c40608c041 Wallpaper color extraction API stub
Now it's possible to listen to changes on wallpaper colors by
registering a listener on WallpaperManager. It's also possible
to get the current wallpaper text color hints.

Bug: 36856508
Test: compilation
Change-Id: I5102cb7be9a4af60b85fc8913154a79dfe5c21a0
2017-04-14 18:33:08 -07:00
Dianne Hackborn
aaeb512331 Merge "Introduce a new JobServiceEngine class." into oc-dev 2017-04-15 00:55:55 +00:00
TreeHugger Robot
a05f1fdd93 Merge "Remove autofillMode attribute" into oc-dev 2017-04-15 00:50:51 +00:00
Stephen Chen
d831be95fb Remove ScoredNetwork.BADGING constants.
Bug: 35323372
Bug: 35114358
Test: make,  runtest --path
frameworks/base/core/tests/coretests/src/android/net/ScoredNetworkTest.java

Change-Id: I9640e374abe428235d94e0407d9d21f390550d2f
2017-04-15 00:40:58 +00:00
Joe LaPenna
509352d475 Make NETWORK_RECOMMENDATIONS_ENABLED hidden.
This value is necessary to easily look up the availability of a
recommendation (nee, scoring) provider; however it is only used by
bundled apps to monitor its availability, so hide the setting itself.                               


Test: make update-api; make; flashall
Bug: 34715823

Change-Id: Idf4591fd03d90207ef525f584793db65a1f6597c
2017-04-15 00:39:33 +00:00
Svet Ganov
013efe173e Add support for multiple fill contexts
When saving data filled by the user the platform provides to
an autofill provider the state of the UI allowing the provider
to interpret this state and store relevant information.

A limitation of the current design is that the fill provider
needs to interpret the screen content twice, once handling a
fill request and once handling a save request. To address this
we are introducing a id for each fill request allowing the
autofill provider to associate arbitrary state with each fill
request and store it in the client data bundle later passed
to save.

Another limitation of the current design is that if the screen
changes dynamically while the user interacts with the app the
UI state passed on save represents a static snapshot, therefore
it is not possible to the autofill provider to determine the
context in which the data in the UI was filled. We could
keep the views and have deltas for views being removed/added
/moved/changed but this is not enough as the fill provider
needs to know not only what changed but what changed for every
fill request and in one session there could be multiple fill
requests. To address this we provide a list of fill contexts
on save each of which has the id of the corresponding fill
request. This allows the fill provider to know the exact context
in which the data was popuplated and also use its custom client
state for this fill request if desired.

This change deprecates the old APIs and the new ones delegate
to the old ones. Once the clients migrate to the new APIs we
will remove the old ones.

Test: all autofill CTS tests pass

Change-Id: Idcebcc671aa3c078a305d8c358e225274fccc588
2017-04-14 17:37:31 -07:00
Ray Essick
10353e3601 Rework getMetrics() api per API council
Reworking the media metrics getMetrics() calls (currently in MediaCodec,
MediaExtractor, MediaPlayer, and MediaRecorder) to fit new direction
from the API Council.

Drop the MediaMetricsSet that we had in the first round; go back
to a PersistableBundle as the return type. Moves the key definitions
from MediaMetricsSet.MediaCodec to MediaCodec.MetricsConstants

Bug: 37083862
Test: ran the corresponding CTS tests
Change-Id: I7905959ad2109887dd8fd16f0eb2831247abab2a
2017-04-14 17:24:42 -07:00
Sudheer Shanka
2359f016e2 Merge "Add new api Activity.getStartInitiatedTime." into oc-dev 2017-04-15 00:09:32 +00:00
TreeHugger Robot
baf1d7036e Merge "MASTER_CLEAR action should not be public" into oc-dev 2017-04-14 23:50:26 +00:00
Makoto Onuki
5f085792f6 Merge "Fix the wrong IMPORTANCE_ values." into oc-dev 2017-04-14 23:29:11 +00:00
Makoto Onuki
7c7fbf6f45 getApplicationInfo() should throw NameNotFoundException
... instead of returning null.

Bug: 37324177

Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest2 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest3 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest4 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest5 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest6 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest7 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest8 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest9 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest10 -w com.android.frameworks.servicestests

Change-Id: I7f9f3729ee0eef6b342e4711379e02516559472c
2017-04-14 23:24:35 +00:00
Eugene Susla
75fb821029 [DO NOT MERGE] Add an opnion to use advertised name for renaming
Test: Use new API, make sure renaming works
Change-Id: I9251c5db24495b8594fadce2beab3347a1aec884
2017-04-14 23:19:42 +00:00
Amith Yamasani
461111bc3d BLE scan API using PendingIntent
This allows apps to listen for beacons, etc., without having to
run a foreground service and register a callback. They can instead
register a PendingIntent which will be fired when scan results
are available or when an error occurs.

Bug: 37254611
Test: WIP
Change-Id: I1793eee67ff0211370ed6fc38be4d95a4c5853f5
2017-04-14 16:16:42 -07:00
Dianne Hackborn
579f75c8a4 Introduce a new JobServiceEngine class.
This allows any service to interact with JobScheduler, which
should give us a lot more opportunity to do interesting stuff
in the support lib.

Test: bit CtsJobSchedulerTestCases
Change-Id: I0843e8b212a0a63a17558b837b899b90cac22805
2017-04-14 15:56:47 -07:00
Amith Yamasani
e99757e4b1 MASTER_CLEAR action should not be public
Limit it to SystemApi, for passing intent tests

Bug: 36977779
Test: cts test
Change-Id: I716b94fc3cef43db1fafbfdad8dba0d850bec474
2017-04-14 14:41:45 -07:00
Philip P. Moltmann
44a4336027 Remove autofillMode attribute
Bug: 36171235
Test: CtsAutoFillServiceTestCases
Change-Id: I69f0e1c4fa3c68f73049726e7ae8f10d9d81bf5e
2017-04-14 14:35:14 -07:00
Sudheer Shanka
bc308988bd Add new api Activity.getStartInitiatedTime.
This api will return the timestamp at which this activity start was last
initiated by the system. Implementation is wip.

Bug: 9058261
Test: cts-tradefed run singleCommand cts-dev -m CtsAppTestCases -t \
      android.app.cts.ActivityStartTimeTest

Change-Id: I396458ecefbb09108f414b95f9c0beb6d609a4e1
2017-04-14 14:19:25 -07:00
Romain Guy
c99bcc69f7 Merge "Add BitmapFactory.Options.inColorSpace" into oc-dev 2017-04-14 21:08:42 +00:00
Hangyu Kuang
5ba5e9182c media: Address API review comments
Change setNextOutputFile to accept File instead of String. Also add new version
of setOutputFile to accept File.

Bug: 36791064
Test: CTS test.
Change-Id: I1a3d574e7cf36acbf181407131bc9dbf114d30de
2017-04-14 13:41:01 -07:00
Nathan Harold
9361283073 Merge changes from topic 'ipsec-api-tweaks-merge' into oc-dev
* changes:
  Add FileDescriptor Versions of applyTransportModeTransform()
  IpSecManager and IpSecAlgorithm API Tweaks
2017-04-14 20:21:17 +00:00
TreeHugger Robot
28dab313ee Merge "Introduce NETWORK_TYPE_METERED job constraint" into oc-dev 2017-04-14 19:04:35 +00:00
Vikas Marwaha
e768104f9b Merge "Make android.intent.action.MASTER_CLEAR depreciation explicit" into oc-dev 2017-04-14 18:06:24 +00:00
Romain Guy
95648b8a59 Add BitmapFactory.Options.inColorSpace
This allows applications to load bitmap in a preferred
target color space, similar to inPreferredConfig for
configurations.

This change also applies recent changes made to BitmapFactory
to BitmapRegionDecoder: support for outColorSpace, inColorSpace
and outConfig.

Bug: 32984164, 36905374
Test: CtsGraphicsTestCase (BitmapColorSpaceTest/BitmapRegionDecoderTest)
Change-Id: I4eded9190d1aa9c7f3033f9bb78a6854cc48a3ef
2017-04-14 10:14:27 -07:00
Dongwon Kang
0cdc7c8874 Merge "TIF: add ASPECT_RATIO_4_3 for Preview/WatchNextPrograms" into oc-dev 2017-04-14 17:05:31 +00:00
Julia Reynolds
ad1e9c9825 Remove @removed method
Change-Id: I0b92edcc0440674003694ace9b53cad6124948dc
Fixes: 37340967
Test: make
2017-04-14 12:59:47 -04:00
Todd Kennedy
801e65905b expose the instant app installer component
Bug: 35873804
Test: TreeHugger
Change-Id: I4d962927587bb10833bfe3c3db27fdceab668fc3
2017-04-14 09:49:13 -07:00
Makoto Onuki
d7e405851f Fix the wrong IMPORTANCE_ values.
Bug: 36697597
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: I3327d4668470400e8b30faeebb77534eeb2583ed
2017-04-14 09:47:54 -07:00
TreeHugger Robot
b7f0db8d89 Merge "Update more implementations of findViewById()" into oc-dev 2017-04-14 16:26:27 +00:00
TreeHugger Robot
46ae660bf2 Merge "Implement new splash screen API" into oc-dev 2017-04-14 11:54:47 +00:00
Andrew Scull
e52a1bfede Merge "Service for OEM lock management." into oc-dev 2017-04-14 11:31:06 +00:00
Etan Cohen
c1b654a09e [CM] Unhide the NetworkSpecifier as object API
API visibility change: unhide allowing NetworkSpecifier
to be an arbitrary object.

Bug: 27533960
Bug: 36053921
Bug: 36275276
Test: builds and runs
Change-Id: I1d1705cca7ece077ef8d7c674c62d5369fedbb03
Merged-In: I7535495681da8f168c46d6d95e13925cffecc99b
Merged-In: I6500639ae839ee9ad5af34d1292d1539c943e2ad
2017-04-14 18:23:45 +09:00
Jakub Pawlowski
a51513747a Bluetooth 5 PHY simplification
Having PHY_LE_* constants defined in four different places, with one
value being different than others is misleading. Leave just PHY_LE_*
definitions in BluetoothDevice, and add PHY_LE*_MASK for the mask used
in PHY update API.

This patch also removes need to translate PHY value between PHY update
request and event, as mask is used for request, and the value is
returned in event.

Bug: 30622771
Test: manual
Change-Id: I897effa1204a024465d55501c83c542566c4d37c
(cherry picked from commit 9e377194e35c0fb9ac5771f5658c095ed97e0838)
2017-04-14 07:33:55 +00:00
Andrii Kulian
c66b6ff997 Merge "Hide flag SHOW_WITH_INSECURE_KEYGUARD" into oc-dev 2017-04-14 05:05:25 +00:00