1612 Commits

Author SHA1 Message Date
Alan Viverette
63394b7346 Move framework-specific portions of pathmap.mk into frameworks/base
Test: make docs && make
Change-Id: I983a17bed8b14b6d94f7c4d3e900f4bb8bb34b86
2017-03-03 16:18:32 +00:00
Svet Ganov
7ad1128137 Allow auto-fill services to disable themselves
1. Added a new API for a connected auto-fill service to
   disable itself

2. Added a new shell command to destroy all pending sessions
   which is used in CTS tests

3. Fixed a bug where the unbind timeout was in minutes
   instead of seconds

Test: wrote CTS tests, all auto-fill tests pass

bug:35848030

Change-Id: I681605aa0b8c004a0f14e30b57117c291d89a894
2017-03-03 02:56:32 +00:00
Jaewan Kim
158cd7b1f2 Merge "Add callback for AVRCP 1.6 support" 2017-02-28 06:19:49 +00:00
Jaewan Kim
bd16f457a1 Add callback for AVRCP 1.6 support
Bug: 33828042
Test: Build
Change-Id: Iaf5cecfa38065cfeed096929952559d7cb2e248b
2017-02-28 04:29:38 +00:00
Chong Zhang
c1e701d03f MediaCas: move *.aidl files from frameworks/base to frameworks/av
PDK builds can't reference frameworks/base from frameworks/av.

bug: 22804304
Change-Id: Ibcda0b6a56e36233ad37c2d5d2b03d5c58674010
2017-02-27 16:09:23 -08:00
Alan Viverette
38b5053209 Add "since" annotations for Support Lib in framework docs build
Bug: 35707648
Test: make docs
Change-Id: I74729254d0002c739ec23cb7473157fc2b8e92bb
2017-02-24 15:15:17 -05:00
Scott Main
05b9926a2c Add API 'since' tag for O dev preview (current.txt)
Change-Id: I10ffd161f9249794df7d263a11703fbca0d88451
2017-02-23 14:51:06 -08:00
Scott Main
13a80432a6 Merge "switch all droiddoc builds to use templates-sdk from doclava" 2017-02-23 22:42:10 +00:00
Chong Zhang
15d10517cf Merge "MediaCas: add framework APIs" 2017-02-23 22:36:22 +00:00
Scott Main
15b8517424 switch all droiddoc builds to use templates-sdk from doclava
Change-Id: I9007f4d49a3076e8b38a2c97e936cf6d6710e87a
2017-02-23 21:27:13 +00:00
Chong Zhang
d5927ae883 MediaCas: add framework APIs
Java API changes to support MediaCas framework.

Also add partial-frame related enums to MediaCodec,
MediaCodecInfo, and MediaExtractor as a way to indicate
a input frame contains partial data.

Test: basic test app and test plugin to execise the code path;
impelenting playback of CAS-secured MPEG2TS streams, including
a Widevine-based CAS plugin, locally modified ExoPlayer and
Android TV Tuner input.

bug: 22804304
Change-Id: Ia4ba1d4046f7588e42bfb21e726390457d2fc8e3
2017-02-22 17:27:01 -08:00
Hugo Benichi
95cb226c1a IP connectivity metrics: cleanup obsolete code
This patch cleans obsolete code related to IP connectivity metrics:
 - remove @SystemApi on android.net.metrics: now that metrics events
   are processed and serialized in the frameworks only, event classes
   should not appear in the system apis.
 - remove obsolete Logger classes: ConnectivityMetrics app was the
   unique user of ConnectivityMetricsLogger until nyc-mr1. From nyc-mr1
   the app started using dumpsys to get metrics for IpConnectivity and
   Telephony, which made ConnectivityMetricsLogger obsolete.
 - simplifications in MetricsTestUtil

Test: - runtest frameworks-net
      - manually verified $ adb shell dumpsys connmetrics
Bug: 30054585
Bug: 32648597
Change-Id: I85ef65f7f69eb9299e4636cc7af54067201d9daf
2017-02-22 12:56:38 +09:00
TreeHugger Robot
f9bd294469 Merge "Overhaul GraphicsStatsService" 2017-02-21 19:23:46 +00:00
John Reck
df1742ed47 Overhaul GraphicsStatsService
* LRU cache of recently-used is dead, replaced
  disk storage
* ASHMEM size is read from native by the system service,
  no longer requires keeping a sizeof() in sync with a
  constant in Java
* Supports dumping in proto format by passing --proto
* Rotates logs on a daily basis
* Keeps a history of the most recent 3 days

Bug: 33705836
Test: Manual. Verified log rotating works by setting it up to
rotate every minute instead of day. Confirmed /data/system/graphicsstats
only has the most recent 3 entries after several minutes

Change-Id: Ib84bafb26c58701cc86f123236de4fff01aaa4aa
2017-02-21 09:49:10 -08:00
Daniel Nishi
58229846d0 Merge "First pass at adding the cache quota suggestions." 2017-02-21 17:37:58 +00:00
Colin Cross
af736c9e99 resolve merge conflicts of e86b78a57404 to master
Test: none
Change-Id: I8bf02f8198d003c4453cc59b7a3bccdff688ca15
2017-02-17 15:05:37 -08:00
Colin Cross
3c2c2764d4 Merge changes I82aa8140,Ib62a5dd6,I2c4d64e2
am: 313e645801

Change-Id: Ia10d20ea4ebabc2cc84524950dec7570104b185f
2017-02-17 22:25:53 +00:00
Colin Cross
313e645801 Merge changes I82aa8140,Ib62a5dd6,I2c4d64e2
* changes:
  Enable multidex for SystemUITests
  Add missing transitive dependencies
  Revert "Remove support of disabling Jack."
2017-02-17 21:44:21 +00:00
Brad Ebinger
c9c8b590c5 Merge "Adds @hide ImsService APIs" am: 2b879016d3
am: f46aa6f9ee

Change-Id: I12e10d796a7b2d56cacf8e9b53bb5e228b79ecc3
2017-02-17 20:29:13 +00:00
Daniel Nishi
cf9d19e030 First pass at adding the cache quota suggestions.
This currently integrates with installd, but not with
any framework API to expose this information to apps.

The first pass, as per the design doc, adds a service
which polls for large changes in the file system free space.
If enough spaces changes, it begins a recalculation of the
cache quotas and pipes the information down to installd.
This calculation is done in the updateable ExtServices.

Further enhancements in later patches include integrating this
to listen to package install and removal events, caching the
last computed quota values into an XML file on disk to load
on boot, and exposing the information to apps.

Bug: 33965858
Test: ExtServices unit test

Change-Id: Ie39f228b73532cb6ce2f98529f7c5df0839202ae
2017-02-17 10:26:16 -08:00
Colin Cross
be2d3307e2 Revert "Remove support of disabling Jack."
This reverts commit ba068f48727dee2223b3be3b0359accb949e363d.

Test: builds
Change-Id: I2c4d64e26c2e4ceb710a39de2ee9749160d33a72
2017-02-16 11:41:42 -08:00
Brad Ebinger
1639c21be6 Adds @hide ImsService APIs
Adds @hide ImsService API implementations to be used for the new
dynamic ImsResolver.

1) ImsService - The main class that all vendor ImsServices will implement.
ImsServices that implement this method must return their implementations
of MMTelFeature when onCreateMMTelFeature is called. The base ImsService
class also relays all method calls through itself as a proxy. So, when
Telephony calls a method, the ImsService figures out which MMTelFeature
should be called (by slot) and then calls that feature's method
implementation.

2) MMTelFeature/RcsFeature - Implements the I*Feature interfaces, which
are used on both sides of the interface. The vendor implemented ImsService
must implement all methods provided in the I*Feature interface in their
implementation of *Feature that they return to the ImsService.

3) ImsServiceProxy[Compat] - The Proxy interface in telephony that will be
called in ImsManager. When a method in this class is called, it will call
the respective AIDL function: Telephony -> IImsServiceController AIDL ->
vendor ImsService -> vendor ImsFeature implementation.
ImsServiceProxyCompat is there to provide backwards compatibility with
older ImsServices that do not use the new ImsService implementations.
It implements all of the methods that are defined in the new I*Feature
interfaces and translates them to the old ImsService AIDL calls.

Test: Adds Unit Tests (see frameworks/opt/telephony)
Merged-In: Id3466c178384158c788ab1d708ab108bb95866fc
Change-Id: Id3466c178384158c788ab1d708ab108bb95866fc
2017-02-16 11:14:26 -08:00
Brad Ebinger
15708a316b Adds @hide ImsService APIs
Adds @hide ImsService API implementations to be used for the new
dynamic ImsResolver.

1) ImsService - The main class that all vendor ImsServices will implement.
ImsServices that implement this method must return their implementations
of MMTelFeature when onCreateMMTelFeature is called. The base ImsService
class also relays all method calls through itself as a proxy. So, when
Telephony calls a method, the ImsService figures out which MMTelFeature
should be called (by slot) and then calls that feature's method
implementation.

2) MMTelFeature/RcsFeature - Implements the I*Feature interfaces, which
are used on both sides of the interface. The vendor implemented ImsService
must implement all methods provided in the I*Feature interface in their
implementation of *Feature that they return to the ImsService.

3) ImsServiceProxy[Compat] - The Proxy interface in telephony that will be
called in ImsManager. When a method in this class is called, it will call
the respective AIDL function: Telephony -> IImsServiceController AIDL ->
vendor ImsService -> vendor ImsFeature implementation.
ImsServiceProxyCompat is there to provide backwards compatibility with
older ImsServices that do not use the new ImsService implementations.
It implements all of the methods that are defined in the new I*Feature
interfaces and translates them to the old ImsService AIDL calls.

Test: Adds Unit Tests (see frameworks/opt/telephony)
Change-Id: Id3466c178384158c788ab1d708ab108bb95866fc
2017-02-16 11:03:31 -08:00
Svet Ganov
da0acdf938 Auto-grant background execution and data access
Companion apps can declare they want background access and
background execution exceptions via dedicated permissions
in their manifest. If such a permission is requested we
auto-grant the corresponding exception after the user has
chosen a device from the companion UI. These permissions
are appop ones allowing us to use the app ops for gauging
whether the user has made a change after we auto-granted
the permission since we would like to revoke these special
privileges when the app disassociates itself from the
companion device if the user did not make an excplicit
choice otherwise.

While at this auto-grant fixed location permission to the
companion device discovery service.

Test: manual

Change-Id: I46ee4291e5e5a8f7613f0dd75eb61d6b9341f306
2017-02-15 20:32:41 -08:00
Svet Ganov
782043caf8 Refactor auto-fill
* Fix a layering issue where auto-fill manager which is in view
  depended on activity which is in app

* Moved auto-fill classes to view or service based on their
  purpose and removed dependecy on the classes in view to the
  classes in service

* Push state to local auto-fill manager whether auto-fill is
  enabled to avoid making IPC for every focus transition if
  the user did not enable the feature

* Remove unnecessary offload to messages when handling calls
  to auto-fill manager service as these are made over a oneway
  interface and in general they do almost no work and typically
  we do these on the binder thread

* Removed id from data set and fill response as the provider
  can embed everything it needs to id them in the auth pending
  intent

* Enforce the auth UI to be only an activity as this will work
  with multi-window, recents, and back and also does not require
  draw on top of other app special permission

* Authentication also no longer requires passing a remotable
  callback to the auth activity but the activity handles the
  request as if called for a result

* Handling stopping of a user to clean up in-memory state as
  well as handling when a user gets unlocked as a provider may
  be non-direct boot aware

* User the correct context when creating an auto-fill manager

* Move the receiver that listens for requests to hide system
  windows to the manager service as the UI is a singleton and
  no need every per-user state to register its own

* Removed extras from dataset as the only case a provider needs
  to associate state with a dataset is for auth and the provider
  can embed this data in the auth pending intent

Test: manual and CTS

Change-Id: I4bc54c13cf779d7f6fdb3ab894637f9fac73f603
2017-02-13 21:31:37 -08:00
Stefanot
b1f573dca3 Add monitoring to backup in BackupManager.
This is the first CL of many that will add instumentation to
backup/restore operation in the BackupManager. For more details please
point to:
https://docs.google.com/document/d/1sUboR28LjkT1wRXOwVOV3tLo0qisiCvzxIGmzCVEjbI/edit#
This first Cl introduces 3 events that we sent to the monitor.

Test: ag/1858962 (same topic)

BUG: 34873525

Change-Id: I6c338b6fd9f4d7c8670dac201897250b6b170677
2017-02-10 11:03:08 +00:00
Yohei Yukawa
a0e468ac33 Merge "Avoid sync IPCs from TSMS to SpellCheckerService" 2017-02-09 05:11:04 +00:00
Yohei Yukawa
7fa65eef20 Avoid sync IPCs from TSMS to SpellCheckerService
Currently, TextServicesManagerServices uses an AIDL interface called
ISpellCheckerService when binding to a spell-checking service.
However, this interface uses synchronous (blocking) binder calls
rather than asynchronous (oneway) calls.  As a result, there are
situations where the system process has made a blocking binder call
into untrusted application code from its main looper thread.

As general policy, the system process must never allow its looper
threads to block on application code.

This CL addresses the above issue by converting ISpellCheckerService
into oneway interface, which instead takes a result receiver
ISpellCheckerServiceCallback so that spell-checking services can
return results asynchronously.

Note that the above protocol issue was also the root cause of
Bug 5471520.  Hence we can also logically revert the previous CL [1]
for Bug 5471520.

 [1]: Iedf2c2cdd8d4834545d06d72ade3ce211b104b1d
      4e713f14419a37f385cf1509b011982bdcf67edc

Test: Ran `adb shell dumpsys textservices` to check the
      "Spell Checker Bind Groups:" section in the following three
      steps.
      1. Before apps start requesting spell checker sessions.
      2. While apps are owning active spell checker sessions.
      3. After all the apps that owned spell checker sessions are
         gone.
      Made sure that spell checker service is not running when
      there is not spell checker bind group.
Bug: 7254002
Change-Id: I92e7aa40dc9ea14f67d355f0bfa15325b775d27b
2017-02-08 11:54:05 -08:00
Wyatt Riley
e5d975cdff Merge "GNSS Batching - Default Implementation" 2017-02-08 02:08:06 +00:00
Wyatt Riley
cf879db366 GNSS Batching - Default Implementation
Connections from .hal layer, through to
Location Manager System APIs

Bug: 31974439
Test: builds, boots, ordinary GNSS & new GNSS batching
      basic functional checks on Marlin
Change-Id: If75118c27b5ed34cfc16c9f817b60a3be5485095
2017-02-07 14:55:21 -08:00
Eugene Susla
6ed45d8cd3 CompanionDeviceManager
This introduces an API for apps that support companion devices to provide a
more streamlined flow for pairing and setting up the device

Bug: 30932767
Test: Using a toy app, invoke the newly introduced API (CompanionDeviceManager),
 and go through the flow. Ensure filtering works, and device is returned to
 the calling app. Ensure the calling app can pair to the selected device.
Change-Id: I0aeb653afd65e4adead13ea9c7248ec20971b04a
2017-02-06 12:50:55 -08:00
Svet Ganov
0f4928f1f7 Refactoring of auto fill - lifecycle, auth, improvements
1. Move management of the remote fill service in a dedicated
   class that abstracts away the async and ephemeral nature
   of the binding.

2. Update auth to move fingerprint out of the platform and
   allow response and dataset auth.

3. Cleaned up the fill and save callback classes.

4. The UI is now shared among all sessions and cleaned up.

5. Reshuffled the remote callbacks to have cleaner separation.

6. Cleaned up and tightened the reponse and dataset classes.

7. Added API to support communicationn with intent based auth.

Test: CTS + manually

bug:31001899

Change-Id: Idc924a01d1aea82807e0397ff7293d2b8470d4d6
2017-02-06 04:02:35 +00:00
Phil Weaver
27fcd9c97a Accessibility can capture fingerprint gestures
Bug: 27148522
Test: Unit tests for two new classes in this CL, CTS in
linked CL.
Change-Id: Icb5113e00b1f8724814263b3cc7f72fe4a6f0b41
2017-01-31 14:27:09 -08:00
Abodunrinwa Toki
67024f1b8f Merge "Implement TextClassification system service." 2017-01-30 19:12:50 +00:00
TreeHugger Robot
7d670b4f73 Merge "OMS: introduce the OverlayManagerService" 2017-01-27 19:42:59 +00:00
Chih-Hung Hsieh
fca7aac5ec Work around clang-tidy segmentation fault.
This should affect only builds that call clang-tidy.
Without this change, clang-tidy has segmentation fault
when compiling several files in the incident_* directories.

Bug: 34740546
Test: build with WITH_TIDY=1 and
DEFAULT_GLOBAL_TIDY_CHECKS="*,-readability-*,-google-readability-*,-google-runtime-references"

Change-Id: Idfd46f36c01ccdd401eb54b750bc9d962c29ddeb
2017-01-26 18:47:14 -08:00
Mårten Kongstad
eabc9e9576 OMS: introduce the OverlayManagerService
Add a new system service to manage Runtime Resource Overlays. This will
offload the PackageManagerService and allow administration of overlay
packages while affected packages continue to execute.

Overlays can be enabled or disabled during runtime. Running applications
will re-create their ResourcesImpl objects and restart their activities
via the usual activity life cycle.

The order in which a set of overlays is loaded may also be changed
during runtime. The underlying mechanics are the same as for when an
overlay is enabled or disabled.

When an overlay changes state, e.g. becomes enabled, the
OverlayManagerService will broadcast one of the new intents
android.intent.action.OVERLAY_ADDED, *_CHANGED, *_REMOVED or
*.OVERLAYS_REORDERED.

Clients that wish to read information about overlays for users other
than themselves are required to hold the
android.permission.INTERACT_ACROSS_USERS_FULL permission. This mirrors
the protection level of PackageManager.getPackageInfo.

Clients that wish to change the information are required to
hold the permission android.permission.CHANGE_OVERLAY_PACKAGES.

Each pair of overlay package and corresponding target package is
respresented by a new OverlayInfo class. This class mirrors the
existing PackageInfo class.

Overlay packages are handled per Android user. The data is persisted in
/data/system/overlays.xml.

Co-authored-by: Martin Wallgren <martin.wallgren@sonymobile.com>
Signed-off-by: Zoran Jovanovic <zoran.jovanovic@sonymobile.com>
Bug: 31052947
Test: run tests from 'OMS: tests for OverlayManagerService'
Change-Id: I15325e173193df3240b8dc0a58c852fd7a3d5916
2017-01-26 17:04:53 -08:00
Brad Ebinger
0f4a8ba209 Merge "Adding Dynamic ImsService Binding (1/3)" am: 8e6b13a1c0 am: 64057ab972 am: 2741442324
am: ded1df24e0

Change-Id: Ifd95efa076b7f5c8c8b02be7688aab1008bbc63c
2017-01-26 01:56:25 +00:00
Brad Ebinger
ded1df24e0 Merge "Adding Dynamic ImsService Binding (1/3)" am: 8e6b13a1c0 am: 64057ab972
am: 2741442324

Change-Id: Ibd5c988226e7994c332a7e7f8b40a9338cf84e0f
2017-01-26 01:49:53 +00:00
Brad Ebinger
2741442324 Merge "Adding Dynamic ImsService Binding (1/3)" am: 8e6b13a1c0
am: 64057ab972

Change-Id: I901c72a38b522c190e849de55078036adc80d8b6
2017-01-26 01:46:06 +00:00
Brad Ebinger
64057ab972 Merge "Adding Dynamic ImsService Binding (1/3)"
am: 8e6b13a1c0

Change-Id: I8534273da5579b7662e66f80a60348a4665dd65b
2017-01-26 01:41:38 +00:00
Brad Ebinger
024aaf2388 Adding Dynamic ImsService Binding (1/3)
Adds support for dynamic ImsService Binding (change 1/3). Included
in this change:
- AIDLs for ImsServiceController
- ImsFeature/ImsServiceBase definitions
- KEY_CONFIG_IMS_PACKAGE_OVERRIDE CarrierConfig option

Test: Unit Tests in opt/telephony
Bug: 30290416
Change-Id: Ic4cb1d85a29681b08a6a525c588a72209862dcc3
2017-01-25 15:12:28 -08:00
TreeHugger Robot
b7cab6a190 Merge changes from topic 'bisto-request'
* changes:
  Allow privileged app to set media key event listener
  Allow privileged app to set volume key long-press listener
2017-01-25 01:16:32 +00:00
Badhri Jagan Sridharan
d979398983 Merge "Refactor UsbPortManager to use the binderised USB HAL" 2017-01-24 23:46:25 +00:00
Shreyas Basarge
a393ff7dc7 Merge "API to select backup transport" 2017-01-24 22:02:28 +00:00
Jaewan Kim
6e2b01ce75 Allow privileged app to set media key event listener
If the media key listener is set, the listener will receive the media key
events before any other sessions, but after the global priority session.
If the event is handled by the listener, other sessions cannot get the event.

Privileged app needs permission android.permission.SET_MEDIA_KEY_LISTENER
to set the listener.

Bug: 30125811
Change-Id: I2b2cf4ac7873b70899194701c6921990dcb9de02
2017-01-24 09:41:54 -08:00
Jaewan Kim
5026936e49 Allow privileged app to set volume key long-press listener
If the volume long-press listener is set, the listener will receive
the volume key long-presses instead of chaging the volume.

Privileged app needs permission
android.permission.SET_VOLUME_KEY_LONG_PRESS_LISTENER to set the listener.

Bug: 30125811
Change-Id: I5e8fafbb950e5e11522da0f14004648d0877bf3e
2017-01-24 09:41:43 -08:00
Shreyas Basarge
865303fce5 API to select backup transport
This cl adds an API to select a backup
transport by its component name and
receive a callback when BackupManager
is bound to the transport. Calling this API
will make BackupManager bind to the transport
if it isn't already bound to it.

Also fixes the issue where BackupManager would
detect only one transport per package.

Ref: go/backup-transport-switching

Bug: 33616220
Test: Manually tested. GTS tests will be put up shortly.

Change-Id: I8c23bdbb84ceb05eb1fad9b3a8b9c4441cb06c74
2017-01-24 17:28:48 +00:00
Badhri Jagan Sridharan
823287d28e Refactor UsbPortManager to use the binderised USB HAL
Move to a USB HAL to handle type-c ports as upstream is
considering in merging a generic type-c interface to mainline
kernel. However, the new sysfs interface can see minor changes
in the future as the sysfs interface is sitll going to land
in testing and it is still under review.

Bug: 31015010
Test: Manually tested on Angler and sailfish for type-c role switches.
Change-Id: I26771074c4b4f79a133e519bc6d35a4864a696d8
2017-01-23 17:13:15 -08:00
Clara Bayarri
04d72abde1 Expose fonts.xml via public API with a service
This change creates a new FontManagerService, in charge of providing
font management data. It exposes a public API to retrieve the
information in fonts.xml without accessing it directly. To do this,
it also refactors FontListParser's internal classes into a new public
FontConfig class holding all the font data.

getSystemFonts() returns all the available information in fonts.xml
as well as file descriptors for all the fonts. This allows us to
share the memory consumed by these files between all clients.

Bug: 34190490
Test: See attached CTS change in topic
Change-Id: I0e922f8bcc9a197a1988d04071eb485328d66fb7
2017-01-23 15:02:23 +00:00