359 Commits

Author SHA1 Message Date
Brad Ebinger
5b1883b5f1 Integrate new MMTel APIs into the framework
Performs the bulk of the work of:
1) Moving the old MMTel APIs to a hidden
.compat namespace to support older vendor
versions of the code.

2) Replace the compat MMTel APIs with the
new ImsService APIs and integrate them
into existing code.

This is one of two CLs, this CL
integrates the new APIs, the next CL
creates the compat layer in telephony
to translate the .compat APIs to the new
APIs to allow Telephony to work with
older versions of the API.

Before commit, the corresponding vendor
changes will have to be submitted as well.

Bug: 63987047
Test: Telephony Unit tests
Merged-In: Icc9ecfdad000f42399beeac142083e62962c12d3
Change-Id: Icc9ecfdad000f42399beeac142083e62962c12d3
2018-02-01 15:45:29 -08:00
Brad Ebinger
6ed4ee6847 Integrate ImsCallSessionListener API changes
Integrates the ImsCallSessionListener API changes.
This involves:

1) Moving the ImsCallSessionListener to the
android.telephony.ims namespace.
2) Creating a compat layer between the old
IImsCallSessionListener AIDL and the new one
for vendors using the old implementation.
3) Modify ImsCallSession to only use
setListener to set ImsCallSessionListener
(other method was never used in our code).

Test: Telephony Unit Tests, Manual IMS Tests
Bug: 63987047
Merged-In: I4378c0b1d68ff4f5f21815c81af52c03a66f81c5
Change-Id: Id0cc43e9c97abb6f2776d8ad1cf599353b71e4b7
2018-02-01 15:45:28 -08:00
Mohamed Abdalkader
7073c075fb Remove internal version of SMS apis
Test: manual
BUG=69846044
Merged-In: Ie084ea67c460c686bd587e4b36f8c1579517ea7f
Change-Id: Ie084ea67c460c686bd587e4b36f8c1579517ea7f
2018-01-31 11:55:39 -08:00
Jerry Zhang
327b809ad1 Refactor and clean up USB, add tests
Change UsbManager apis to use long instead of string, to match
usb hal. Change UsbDeviceManager internals to match as well.

Remove isFunctionEnabled and add getEnabledFunctions. Callers
would often call isFunctionEnabled for every possible function
to get the list of functions, so getEnabledFunctions reduces the
number of aidl calls.

Separate out dependencies between UsbHandler and UsbDeviceManager
and staticize the UsbHandler classes. Add unit tests with
mocked out dependencies to test state transitions for UsbHandler.

Bug: 62876645
Test: atest UsbTests
Change-Id: I785c4c24121a70e725de9742c6af50a6bf1baea0
2018-01-31 11:40:48 -08:00
Mohamed Abdalkader
6e545d5892 Move Sms API to proper MMTelFeature class
- while here remove unnecessary call to ackSms from
  SmsImplBase as this is handled by ImsSmsDispatcher

Test: None, APIs not exercised yet.
BUG=69846044
Merged-In: Iec4bbd07a67502dbbfb2142a7bc95f51be0cb377
Change-Id: Iec4bbd07a67502dbbfb2142a7bc95f51be0cb377
2018-01-31 11:24:31 -08:00
TreeHugger Robot
8420d5e596 Merge "Introduce a TextClassifierManagerService." 2018-01-31 05:26:27 +00:00
Brad Ebinger
98e3150570 Merge changes from topic "ims_imsservice_apis"
* changes:
  Modify ImsService API to accomodate compat
  Make ImsService API @SystemApi
  Integrate new MMTel APIs into the framework
  Integrate ImsCallSessionListener API changes
2018-01-30 16:19:42 +00:00
Paul Duffin
2a9cd14900 Merge "Conditionally remove android.test.base from bootclasspath" 2018-01-30 11:20:50 +00:00
Abodunrinwa Toki
d32906c202 Introduce a TextClassifierManagerService.
Apps wanting to use a TextClassifier service (instead of an
in-app-process TextClassifier) bind to this service. The service
binds to and reroutes calls to a configured system TextClassifierService.

TextClassifierManagerService manages the lifecycle of the configured
TextClassifierService and binds/unbinds to preserve system health.

A configurable TextClassifierService extends TextClassifierService,
declares an android.textclassifier.TextClassifierService intent, and
requires a permission that is only granted to the system so only the
system may bind to it.

The TextClassifierManagerService implements a similar interface to
TextClassifierService (i.e. ITextClassifierService) but doesn't have to.
This is done for simplicity sake and things may change in the future.

The configuration of the default service is in config.xml.
OEMs may change this with a config overlay.
If no TextClassifierService is specified, the default in app process
TextClassifierImpl is used.

Bug: 67609167
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: tbd
Change-Id: I8e7bd6d12aa1a772897529c3b12f47f48757cfe6
2018-01-29 17:16:21 -08:00
Jaewan Kim
c599ba36e3 MediaSession2: Move binder interfaces into the updatable
Test: Run all MediaComponents tests once
Change-Id: I29a7aa9d649ea212ad4728ebabff40ec0d47ecb1
2018-01-29 22:43:06 +09:00
Paul Duffin
a3b692113c Conditionally remove android.test.base from bootclasspath
This makes the runtime handling of the android.test.base library
conditional based on a build flag REMOVE_ATB_FROM_BCP.

When REMOVE_ATB_FROM_BCP=true:
* The framework-atb-backward-compatibility is added to the
  bootclasspath instead of android.test.base.
* Any APK that targets pre-P (or has a dependency on android.test.runner)
  has android.test.base added to their library list.

Otherwise:
* The android.test.base library is added to the bootclasspath.
* Any APK that explicitly specifies that it depends on the
  android.test.base library has the library removed as the classes
  are available at runtime.

Added android.test.base to platform libraries so it can be used when
not on the bootclasspath.

Tested both cases by building with or without the build flag, flashing,
setting up, adding an account, adding a trusted place.

Also, tested that all combinations of REMOVE_ATB_FROM_BCP and
REMOVE_OAHL_FROM_BCP work.

adb install -r -g out/target/product/marlin/testcases/FrameworksCoreTests/FrameworksCoreTests.apk
adb shell am instrument -w -e class android.content.pm.PackageBackwardCompatibilityTest,android.content.pm.AndroidTestRunnerSplitUpdaterTest,android.content.pm.OrgApacheHttpLegacyUpdaterTest,android.content.pm.RemoveUnnecessaryOrgApacheHttpLegacyLibraryTest,android.content.pm.RemoveUnnecessaryAndroidTestBaseLibraryTest,android.content.pm.AndroidTestBaseUpdaterTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

Bug: 30188076
Test: as above
Change-Id: I4b9d8a5bed6787cd334c2b13a458bbc0efc3f3b6
2018-01-29 11:48:44 +00:00
Jaewan Kim
379e30d90d MediaSession2: Add listeners for change in session token
Test: Run all MediaComponents tests once
Change-Id: Ic46ad9e4e4c9e1ce43b3dbad904eae7fc30d52a0
2018-01-29 11:57:04 +09:00
Ben Gruver
fbf5892f15 Merge "Implement UI for warn-on-launch" 2018-01-26 18:44:11 +00:00
Ruchi Kandoi
05d7bebe23 Merge "Open Mobile API for frameworks/base" am: 183865f3e1 am: ab8328c047
am: 2729909ab6

Change-Id: Iee488feed404819e487f3ae87b3e71f531fe69a4
2018-01-26 01:43:05 +00:00
Winson Chung
66f0026f3f Merge changes from topics "reland_recents_animation", " reland_recents_animation"
* changes:
  Fix issue with reparenting stacks on displays.
  Revert "Revert "4/ Update SysUI shared lib for Recents transition""
  Revert "Revert "3/ Add input consumer to capture touches during a Recents transition""
  Revert "Revert "2/ Add support for remote Recents animation""
  Revert "Revert "1/ Create display content window controller to position stacks in the display""
2018-01-26 00:46:34 +00:00
TreeHugger Robot
5815664d4b Merge "Add AbstractThreadedSyncAdapter#onUnsyncableAccount API" 2018-01-25 22:47:54 +00:00
Winson Chung
e2d721781f Revert "Revert "2/ Add support for remote Recents animation""
This reverts commit 9f8518e532e41ba57916afc49bba72bc23ad3eda.

Reason for revert: Testing relanding changes with ag/3515280

Change-Id: I410bd752c815a5b998a719453def01e00a9d47c8
2018-01-25 13:44:44 -08:00
Brad Ebinger
112c36d39f Integrate new MMTel APIs into the framework
Performs the bulk of the work of:
1) Moving the old MMTel APIs to a hidden
.compat namespace to support older vendor
versions of the code.

2) Replace the compat MMTel APIs with the
new ImsService APIs and integrate them
into existing code.

This is one of two CLs, this CL
integrates the new APIs, the next CL
creates the compat layer in telephony
to translate the .compat APIs to the new
APIs to allow Telephony to work with
older versions of the API.

Before commit, the corresponding vendor
changes will have to be submitted as well.

Bug: 63987047
Test: Telephony Unit tests
Change-Id: Icc9ecfdad000f42399beeac142083e62962c12d3
2018-01-25 10:51:27 -08:00
Brad Ebinger
264625486b Integrate ImsCallSessionListener API changes
Integrates the ImsCallSessionListener API changes.
This involves:

1) Moving the ImsCallSessionListener to the
android.telephony.ims namespace.
2) Creating a compat layer between the old
IImsCallSessionListener AIDL and the new one
for vendors using the old implementation.
3) Modify ImsCallSession to only use
setListener to set ImsCallSessionListener
(other method was never used in our code).

Test: Telephony Unit Tests, Manual IMS Tests
Bug: 63987047

Change-Id: I4378c0b1d68ff4f5f21815c81af52c03a66f81c5
2018-01-25 10:50:43 -08:00
Ruchi Kandoi
a1f9401a22 Open Mobile API for frameworks/base
This contribution is an implementation of the GlobalPlatform
Open Mobile API for Android with some modifications to
namespaces and packages to make it suitable as a core
Android component.

This contribution is based on
0001-Open-Source-Contribution-of-Smartcard-Service-for-fr.patch
which can be found in
https://portland.source.codeaurora.org/patches/quic/la/PATCH_217881_OpenMobileAPI_20171206.tar.gz

The submitted patch was derived from
https://source.codeaurora.org/quic/la/platform/packages/apps/SmartCardService/commit/?h=LA.BF64.1.2.1&id=06ecea9abb8264049f52c7e31c0bc13330a425d5.

Test: Sample Application; open Channels and transmit APDUs

Change-Id: Iac5206bd84798ca0fcdb504c89e1da5383012a5a
Signed-off-by: Jeremy O'Donoghue <jodonogh@codeaurora.org>
2018-01-25 18:04:17 +00:00
Philip P. Moltmann
486b24179f Add AbstractThreadedSyncAdapter#onUnsyncableAccount API
This allows for an SyncAdapter to defer all onPerformSync calls (and the
admission check for those) until the adapter is ready to accept those
calls.

Test: atest android.content.cts.AccountAccessSameCertTest
      atest android.content.cts.ContentResolverSyncTestCase
      atest android.content.cts.DeferSyncTest
      atest com.android.cts.content.CtsSyncAccountAccessOtherCertTestCases
      Set up a user and work account and waited until their gmail
      synced.

Bug: 72459220
Change-Id: I8f9ab735d64189578ccdd1c3e1d7b7c5383b8ee9
2018-01-25 00:37:48 +00:00
Janis Danisevskis
7dacad8dc8 Add confirmation UI protocol to Keystore AIDL definition
Test: Manually tested
Bug: 63928580
Change-Id: Ief1cdb9a64737d5aac08aa1c48ff60c34218d5ba
2018-01-24 15:45:08 -08:00
Steven Moreland
cb15919569 Merge "Allow HIDL to be used in priv-apps." 2018-01-24 23:32:38 +00:00
Ben Gruver
c7ffbe636a Implement UI for warn-on-launch
Bug: 63909431
Test: atest CtsHarmfulAppWarningHostTestCases
Change-Id: Icabe31f3fb04692bac0313cbeb1cafb64388d5f1
2018-01-24 14:49:16 -08:00
Wei Jia
8069cd9861 Merge "add MediaPlayer2" 2018-01-24 22:35:43 +00:00
Android Build Merger (Role)
71df9bf176 Merge "Merge "Added network service interface" am: 71793be6bb am: 2b06789511 am: 3748d15321" 2018-01-24 22:33:21 +00:00
Xiangyu/Malcolm Chen
7783ecd755 Merge "Added network service interface" am: 71793be6bb am: 2b06789511
am: 3748d15321

Change-Id: Ia08a840e47d3372772a105ef7b65bb259d07e7f8
2018-01-24 22:32:56 +00:00
Mohamed Abdalkader
41db489a43 Merge "Remove internal version of SMS apis" 2018-01-24 22:32:39 +00:00
Jack Yu
d5f1de19f4 Added network service interface
The interface for mobile network service. This is the base class
for vendor or first party data service provider to implement
the network service for cellular or IWLAN network support.

Test: Manual
bug: 64132030
Change-Id: Ia358cbb18fc6d15dcc45c75f14b7c952f899e101
2018-01-24 19:13:45 +00:00
Wei Jia
0a8a8f0b26 add MediaPlayer2
Forked from 9070e295864b83deca9020ca8bdd9ff790e631a9
Test: plays local files, callback source and streaming.
Bug: 63934228
Change-Id: I692007c07eb2819f8ad1d843e4e2b1fc96fbecca
2018-01-24 11:03:37 -08:00
TreeHugger Robot
ff73b83831 Merge changes Ia3065eb5,I602e8bb0
* changes:
  Update ProgramInfo to match HAL 2.0 changes.
  Implement front-end APIs for announcements.
2018-01-24 19:00:39 +00:00
Mohamed Abdalkader
48e18c5b4f Remove internal version of SMS apis
Test: manual
BUG=69846044
Change-Id: Ie084ea67c460c686bd587e4b36f8c1579517ea7f
2018-01-24 17:57:26 +00:00
TreeHugger Robot
19630d165e Merge "Support conditional removal of oahl from bootclasspath" 2018-01-24 09:04:39 +00:00
Kevin Chyn
179e117cbe Merge changes from topic "fingerprint-dialog"
* changes:
  Add Fingerprint Dialog to SysUI
  Add FingerprintDialog API and related plumbing
2018-01-24 02:07:54 +00:00
Kevin Chyn
aae4a15a22 Add FingerprintDialog API and related plumbing
This commit adds the plumbing which sends the signals from the API
to the component in SysUI. The dialog will be implemented in another
CL in this topic.

Bug: 67497360

Test: Modify Settings to use the new API
Test: FingerprintDialogImpl is able to notify FingerprintDialog clients
      of user events
Test: System dialog is dismissed when client application is killed
      unexpectedly
Test: Open FP settings, lock device, authenticate, authenticate. Repeat

Change-Id: Id28ec9691646bed765dc069cceb4678d9f6db92e
2018-01-23 14:54:48 -08:00
Paul Duffin
beee5dcdfa Support conditional removal of oahl from bootclasspath
This makes the runtime handling of the org.apache.http.legacy library
conditional based on a build flag REMOVE_OAHL_FROM_BCP.

When REMOVE_OAHL_FROM_BCP=true:
* The framework-oahl-backward-compatibility is added to the
  bootclasspath instead of org.apache.http.legacy.
* Any APK that targets pre-P has org.apache.http.legacy added to their
  library list.

Otherwise:
* The org.apache.http.legacy library is added to the bootclasspath.
* Any APK that explicitly specifies that it depends on the
  org.apache.http.legacy library has the library removed as the classes
  are available at runtime.

Tested both cases by building with or without the build flag, flashing,
setting up, adding an account, adding a trusted place. Adding an account
failed when REMOVE_OAHL_FROM_BCP=true.

adb install -r -g out/target/product/marlin/testcases/FrameworksCoreTests/FrameworksCoreTests.apk
adb shell am instrument -w -e class android.content.pm.PackageBackwardCompatibilityTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

Bug: 18027885
Bug: 72375096
Test: as above
Change-Id: Ie88fb79da76d3cbbd27eaf820c872191ecba2b17
2018-01-23 17:09:32 +00:00
Jaewan Kim
727e3d2872 Merge "MediaSession2: Move MediaSession2/MediaController2 from experimental" 2018-01-23 09:46:10 +00:00
Jaewan Kim
ceb6b6e131 MediaSession2: Move MediaSession2/MediaController2 from experimental
APIs will be unhidden later

Test: Run MediaComponentsTest
Change-Id: I2d9fcd98232016281fad128e9e674885b41e20d9
2018-01-23 14:02:08 +09:00
Steven Moreland
e8e63aae6f Allow HIDL to be used in priv-apps.
Marking HIDL as SystemApi to allow vendor apps to talk to their own
native HIDL services. This includes implementing HIDL callback objects.

HIDL (HAL interface design language) is a language that is used to
facilitate vendor<->system communication which provides guarantees
of ABI stability. For system and vendor services alike, this can also
be used for internal communication.

Bug: 67725182
Test: boot device, hidl_test_java
Change-Id: I9d028cc43ce6f81ea619f01e18f1cd772e17cbfa
2018-01-22 18:48:54 -08:00
Tomasz Wasilczyk
f151a7b337 Implement front-end APIs for announcements.
Bug: 68045105
Test: instrumentation (none added)
Change-Id: I602e8bb0c40516a732d606f745c8f7721583155f
2018-01-22 13:36:44 -08:00
TreeHugger Robot
c6f994207d Merge "Add pending system update info system APIs." 2018-01-22 20:12:43 +00:00
Yi Jin
437aa6e8ad Add more information to incident header. Especially add config keys
to check if the report is uploadable.

Move incidentheader.proto to libincident so statds is able to include a lite
proto class for incident header.

Change IncidentReportArgs to add the proto object instead of serialized
bytes to prevent caller gives meaningless data.

Bug: 70241842
Test: push config to statsd and verify incidentd generate the report
with correct header.

Change-Id: If95b655be71047b019b229e5903a08f3c21a1f29
2018-01-21 22:36:01 -08:00
Felipe Leme
db6b0fecb4 Merge "Moved Field Classification score logic to ExtServices." 2018-01-18 23:33:44 +00:00
Mehdi Alizadeh
4604c41114 Merge changes from topic "surface_num_clients_soft_ap"
* changes:
  Adds unregisterSoftApCallback API
  Unit tests for registerSoftApCallback API
  Adds API to register callback for soft AP event
2018-01-18 23:00:03 +00:00
Mohamed Abdalkader
c5cc226f9e Merge "Move Sms API to proper MMTelFeature class" 2018-01-18 22:51:27 +00:00
Tao Bao
07342dc175 Add pending system update info system APIs.
This CL adds system APIs in android.os.SystemUpdateManager. The APIs allow
system updater apps (RECOVERY permission required) to publish the pending
system update information, and allow other apps to query the info
accordingly (requiring RECOVERY or READ_SYSTEM_UPDATE_INFO permission).

Design doc in go/pi-ota-platform-api.

Bug: 67437079
Test: Use test apps to call the new APIs to query and set the update info
      respectively.
Change-Id: Id54b4a48d02922d2abd906dd7e2ec80a656fc9b1
2018-01-18 14:41:41 -08:00
Tony Mak
b0d22627e9 Rename CrossProfileApps API as per API council feedback
Three changes:
1. android.content.pm.crossprofile - > android.content.pm
2. getProfileSwitchingIcon -> getProfileSwitchingIconDrawable
3. startMainActivity “user” parameter should be named “targetUser”

Test: atest FrameworksServicesTests:com.android.server.pm.CrossProfileAppsServiceImplTest
Test: atest frameworks/base/core/tests/coretests/src/android/content/pm/CrossProfileAppsTest.java
Test: atest cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/CrossProfileAppsHostSideTest.java

FIXES: 71818128

Change-Id: Icf9a6d1f8b6808935ffd79b43185c7b12235f349
2018-01-18 21:07:50 +00:00
Mehdi Alizadeh
0037dde2fd Adds API to register callback for soft AP event
Bug: 68712383
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I270366494500251858fe2ddf6209c7b4bfb5f546
2018-01-18 11:15:23 -08:00
Felipe Leme
bc055b0ef1 Moved Field Classification score logic to ExtServices.
Bug: 70939974
Test: atest CtsAutoFillServiceTestCases:FieldsClassificationTest \
            CtsAutoFillServiceTestCases:UserDataTest
Test: atest CtsAutoFillServiceTestCases

Change-Id: I75fd59b5d7530fcd7095b26f6e592d7459c7d235
2018-01-18 10:40:30 -08:00
Holly Jiuyu Sun
5736685560 Merge "Add APIs to EuiccCardManager." am: a5bc474e2c am: f07319a6df
am: beacd5e4fa

Change-Id: I7aa42d89c69911137a86b86ee59463efe46a81c3
2018-01-18 04:28:28 +00:00