359 Commits

Author SHA1 Message Date
TreeHugger Robot
826a36c19b Merge "Add a new Binder interface to allow IMS to directly talk to IMMS" 2018-09-07 02:11:07 +00:00
Sooraj Sasindran
d71ccc543e Merge "Introduce AlternativeNetworkAccess APIs" 2018-09-06 20:32:01 +00:00
Yohei Yukawa
c54c117164 Add a new Binder interface to allow IMS to directly talk to IMMS
Historically, InputMethodService (IMS) has relied on
InputMethodManager's hidden methods to communicate with
InputMethodManagerService (IMMS).  Because of this, InputMethodManager
(IMM) has ended up being a mixture of IPC endpoint for both IME
clients and IME itself.

There are multiple problems.

 * IMM is instantiated in almost all user mode processes.  This means
   that unnecessary IPC endpoints have been accessible to them via
   reflection.  Even though those endpoints refuses request without a
   valid IME window token, and even though we have tighten up use of
   private APIs in the runtime level, exposing unnecessary IPC
   endpoints is still questionable.
 * Mixing multiple responsibilities has been caused unnecessary
   complexity in IMM.  In Bug 70282603, we have moved some APIs from
   IMM to IMS to sort out this complexity that are surfaced in API
   boundary, but in the implementation level everything remained to be
   the same.

Now that Bug 70282603 is fixed, the natural next step is to start
implementing actual an IPC connection from IMS to IMMS without relying
on IMM.

Here is the new diagram that describes (most of) IPC interfaces around
IMEs.

   APP---(1)---IMMS
     \          |
      \         |
       \        |
        \       |
         \      |
         (2)   (3)
           \    |
            \   |
             \  |
              \ |
               \|
               IME

 (1): IInputMethodManager.aidl: send requests from APP to IMMS
      IInputMethodClient.aidl:  send requests from IMMS to APP
 (2): IInputMethodSession.aidl: send requests from APP to IME
      IInputContext.aidl:       send requests from IME to APP
       -> this is the actual interface behind InputConnection
 (3): IInputMethod.aidl:        send requests from IMMS to IME
      IInputMethodPrivilegedOperations.aidl:
                                send requests from IME to IMMS

IInputMethodPrivilegedOperations.aidl is what this CL is adding.

With that, this CL moves 5 IPC methods
  from IInputMethodManager.aidl (1)
  to IInputMethodPrivilegedOperations.aidl (3).

There remain some IPC methods that are intended to be used only from
IMEs in IInputMethodManager.aidl because those methods have been
unfortunately exposed via public APIs in InputMethodmanager.

Although all of those public APIs were deprecated in Android P as part
of Bug 70282603, we still need to keep maintaining those APIs until
(most of) IMEs migrate to APIs that are newly introduced in
InputMethodService.  It would take several years.

IInputMethodManager#getInputMethodWindowVisibleHeight() is another
method that we cannot migrate right now because some apps have already
relied on its corresponding hidden method in IMM, as discussed in Bug
113914148.

Fix: 113177698
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Change-Id: I2f3ec3c5de546fb3603275a4b64000ed3f863b65
2018-09-06 11:39:50 -07:00
Sooraj Sasindran
165c9e90fb Introduce AlternativeNetworkAccess APIs
Introduce AlternativeNetworkAccess APIs

Bug: 113106744
Test: Verified using test app to make api calls
Change-Id: I7f470cd6028a12cc66a660d58720f803271d38eb
2018-09-06 10:32:56 -07:00
Mathew Inwood
88924e0e24 Merge "Processor for @UnsupportedAppUsage annotations." am: e5440456ca am: 22ea0b7a52
am: d20588332d

Change-Id: I097550eeaf0307e3518aaf2d8e3f30338f9fa9dc
2018-09-05 10:01:21 -07:00
Mathew Inwood
d20588332d Merge "Processor for @UnsupportedAppUsage annotations." am: e5440456ca
am: 22ea0b7a52

Change-Id: I0fd41ccc78872eae55e8341a8a38d6c6b39e0114
2018-09-05 09:43:35 -07:00
Mathew Inwood
bad89e5e5b Processor for @UnsupportedAppUsage annotations.
The processor outputs unsupportedappusage_index.csv, containing source
position info for every@UnsupportedAppUsage annotation processed. It is a
mapping of dex signature to the source postion of the annotation on that
signature. It is used as input for scripts which update the annotations.

We include a META-INF file which causes the compiler to automatically
pick up the annotation processor. Otherwise we would need to explicitly
specify the processor with a -processor flag to javac.

We create a new build target for just the @UnsupportedAppUsage annotation
and the @IntDef annotation (which it depends on) so that the processor can
also depend on that directly.

The processor only runs on a new build target framework-annotation-proc
so that it is not invoked as part of a regular build. This is done so
that we don't slow down peoples builds: Soong does not support annotation
processors when javac sharding is in use. This workaround can be removed
once b/77284273 is fixed.

Test: m framework-annotation-proc
Bug: 113853502

Change-Id: Ie9cd5a90ddf7a51f6035e849703fc39ad9127557
2018-09-05 15:01:21 +01:00
TreeHugger Robot
0df9368b0f Merge "Build android.test.* with java_sdk_library" into pi-dev-plus-aosp 2018-09-03 01:06:33 +00:00
TreeHugger Robot
f75320d841 Merge "Add an enum file for stats event" 2018-09-01 04:21:20 +00:00
sqian
1b4f1de0a7 Merge "Call Redirection Surface in Telecom out going call flow" am: 11486bfab2
am: 54016bdbca

Change-Id: I30adaf5566a55aa867f859b42a49bbbfb0b8d651
2018-08-31 18:04:17 -07:00
Howard Ro
0546d54fb4 Add an enum file for stats event
The list of events in this file is meant to be used with Generic Atom
defined in atoms.proto in statsd. Instead of unique int, we would like
to log it with an enum that shows semantic meaning of events. Also, this
change re-sorts imports and removes unused imports and remove the
previous logging line to test GenericAtom.

Test: statsd_test
Change-Id: Ia9335e48ada68bee6d716ad4d7ac50238932da95
2018-08-31 16:21:28 -07:00
sqian
cae1f264b9 Call Redirection Surface in Telecom out going call flow
- Provide a Call Redirection API Surface
- Provide a key "KEY_CALL_REDIRECTION_SERVICE_COMPONENT_NAME_STRING"
  in the CarrierConfigManager
- Create .aidl interfaces for Call Redirection
(CallRedirectionService.aidl, CallRedirectionAdapter.aidl)

Bug: 64959558
Test: Compile
Change-Id: Ic119fa445e66f1275eabf944c77fdc981bc9a2a7
Merged-In: Ic119fa445e66f1275eabf944c77fdc981bc9a2a7
(cherry picked from commit ea8970cd55fa561dbad9579925fee4db469a539b)
2018-08-31 12:59:40 -07:00
Nan Zhang
8971d804ee Merge "[Vendor] Add filegrouop for NonNull.java" into pi-dev-plus-aosp
am: 5124226629

Change-Id: I639c521a1d659a3c0f83e16b248b37d68ac15567
2018-08-31 11:24:02 -07:00
Nan Zhang
af2513048e [Vendor] Add filegrouop for NonNull.java
This is needed by google.camera.experimental docs.

Test: m -j docs
Bug: b/70351683

Change-Id: I79b3f0946a1d606cda770eabe7c287f4cc207bfc
2018-08-30 14:53:06 -07:00
Kevin Chyn
a24e9fd9ac Add BiometricPromptService
The change introduces the following:
  - BiometricPrompt communicatates with BiometricPromptService (new)
    system service. The service does the decision making for which
    biometric modality to use.
  - As a result, a lot of logic is moved from <Biometric>Manager
    to BiometricPrompt. FingerprintManager now does not care about
    BiometricPrompt logic anymore (reverts several P changes).

Face, and all future <Biometric>Service interfaces must be protected by
the signature-only MANAGE_BIOMETRIC permission. Settings, SystemUI, and
BiometricPromptService are their only clients.

Bug: 72825012

Test: BiometricPromptDemo works
Test: Keyguard works
Test: Settings works

Change-Id: I2b7d6eff81bc07950202c50e592d733032523bf0
2018-08-30 14:49:32 -07:00
Sundong Ahn
63a6a00f44 Build android.test.* with java_sdk_library
android.test.* are built with java_sdk_library and api files are added
by running "make update-api".

android.test.base_static is created for allowing to use
android.test.base as a static library.

Bug:77577799
Test: make -j
Test: make checkapi
Test: make checkapi fails with a random change in the txt file
Test: adb shell cmd package list libraries |\
      grep android.test.*
      And check the android.test.* libraries

Merged-In: Ia27612657532e50b077a9c55dbef59ee3ec04b8a
Change-Id: Ia27612657532e50b077a9c55dbef59ee3ec04b8a
(cherry picked from commit f24779c8c7a3f647f65944e02425b751e580b393)
2018-08-29 16:22:00 +09:00
Nan Zhang
a17beeb779 [java9] Convert hiddenapi-list target to Metalava
This blocks how we try java9 for droiddoc since "hiddenapi-lists-docs"
targets depends on libcore sources. So migrate this target to Metalava.

Test: m -j hiddenapi-lists-docs
Bug: b/78245848
Change-Id: Iae47d351d974e33490c3a1e9bb9f0f5d15eedfaf
Merged-In: Iae47d351d974e33490c3a1e9bb9f0f5d15eedfaf
2018-08-23 15:35:33 -07:00
Nan Zhang
d25ad462bc [java9] Convert hiddenapi-list target to Metalava
This blocks how we try java9 for droiddoc since "hiddenapi-lists-docs"
targets depends on libcore sources. So migrate this target to Metalava.

Test: m -j hiddenapi-lists-docs
Bug: b/78245848
Change-Id: Iae47d351d974e33490c3a1e9bb9f0f5d15eedfaf
2018-08-23 15:27:14 -07:00
Nan Zhang
5c31884fdb Merge "Add compatibility check for (system|test_)api-stubs-docs" am: c9b01b87b1 am: 27892305d6
am: 7d11372923

Change-Id: I613d0f35687005f4e2ef1ff26c5d673b44cd5a8a
2018-08-23 02:58:43 -07:00
Treehugger Robot
c9b01b87b1 Merge "Add compatibility check for (system|test_)api-stubs-docs" 2018-08-23 07:33:31 +00:00
Jack Yu
69c8dbb9eb Merge "Added qualified networks services" am: 63de9eabec am: f02b6d6679
am: 507bdec1ab

Change-Id: If60c3165dab5316c17cfe7ba0e5e7d8dab782636
2018-08-22 15:44:55 -07:00
Jack Yu
63de9eabec Merge "Added qualified networks services" 2018-08-22 20:18:11 +00:00
Jack Yu
a3ab5750a4 Added qualified networks services
Added the qualified networks service, which is a base
class for vendor's qualified network service to extend.
The service is to update frameworks the available
networks for data setup for each APN type.

Test: Manual
Bug: 73659459
Change-Id: I7238aeac8e48be2a17245de77239b242703bcb7e
2018-08-21 17:57:57 -07:00
Nan Zhang
cd060d9808 Add compatibility check for (system|test_)api-stubs-docs
Test: m -j api-stubs-docs
Bug: b/78245848
Change-Id: Ia4a337ac464232ac8a5bd054b940a7d7f1f4e213
2018-08-21 10:39:42 -07:00
Pete Gillin
a8ba4c1a5a Merge "Stop reading the generated ojluni sources in droiddoc." am: 8ab61fb0dd am: 493a6bddf1
am: 1d44a65df9

Change-Id: I00155038e50cbe3704f34085f79721d19bdbf534
2018-08-21 09:10:07 -07:00
Pete Gillin
8ab61fb0dd Merge "Stop reading the generated ojluni sources in droiddoc." 2018-08-21 15:14:55 +00:00
Colin Cross
2e68867129 Merge "Convert platformprotosnano and platformprotoslite to Android.bp" am: c465fef277 am: 2f9f6b009d
am: e3eb78dd92

Change-Id: I4f0ea8c51aa0dfadcbd93fa9e553aba536594cf3
2018-08-21 03:42:49 -07:00
Colin Cross
432141676a Convert platformprotosnano and platformprotoslite to Android.bp
See build/soong/README.md for more information.

Test: m checkbuild
Change-Id: Icfb0001df2e35b5ed799511ff4f2f563d626134b
2018-08-20 13:57:24 -07:00
Pete Gillin
d41686cea5 Stop reading the generated ojluni sources in droiddoc.
These sources contain the result of applying the annotations from
ojluni.jaif to the ojluni sources. Now that ojluni.jaif is empty, this
is a noop, so this change switches back to reading the original
sources.

Bug: 111639530
Test: `make docs` is not affected
Change-Id: Idb98aa4f054a11bfcbcb8a84dd6f357a0a025c49
2018-08-20 17:33:46 +01:00
Nan Zhang
99f168a59a Merge "Add update-api for Metalava based api-stubs-docs" am: 93429e6188 am: cdd38fd98e
am: d116310a14

Change-Id: I7e67f7c0e9581589ffe6d957f2fa791d733ddb2b
2018-08-17 17:15:10 -07:00
Nan Zhang
e561260e59 Add update-api for Metalava based api-stubs-docs
Use check_api section to put the target files which need to be updated.
But check_api doesn't do actually checking work.

Bug: b/112668343
Test: m -j api-stubs-docs-update-current-api
Change-Id: I0f28e6e480413e0ac5cdff51bc4b2df478a867f6
2018-08-17 13:32:14 -07:00
Nan Zhang
dc72ad5218 Merge "Remove api-stubs-docs targets." 2018-08-17 16:53:11 +00:00
TreeHugger Robot
f4aea74d87 Merge "Build android.test.* with java_sdk_library" 2018-08-17 11:14:08 +00:00
Nan Zhang
94763e192f Merge "Use 28.txt as API file for migrating NULLs in Metalava" am: 2495ca3c29 am: 7aa98ce2b0
am: 559898ef33

Change-Id: Id51b64c8afea2a19e3fe2ad2363fd6b234c35825
2018-08-17 02:23:37 -07:00
Nan Zhang
7aa98ce2b0 Merge "Use 28.txt as API file for migrating NULLs in Metalava"
am: 2495ca3c29

Change-Id: I9e1343b1878e73ebb6a83ac4c8a4436d6846baf1
2018-08-17 01:52:21 -07:00
Nan Zhang
1c8219bcdd Use 28.txt as API file for migrating NULLs in Metalava
Use last released API file for annotations reference in master branch
(non-releasing branch).

Test: manual
Bug: b/78245848
Change-Id: I0520231619001032c00d98fdc8cd86aa41f4fa14
2018-08-16 17:10:22 -07:00
Sundong Ahn
f24779c8c7 Build android.test.* with java_sdk_library
android.test.* are built with java_sdk_library and api files are added
by running "make update-api".

android.test.base_static is created for allowing to use
android.test.base as a static library.

Bug:77577799
Test: make -j
Test: make checkapi
Test: make checkapi fails with a random change in the txt file
Test: adb shell cmd package list libraries |\
      grep android.test.*
      And check the android.test.* libraries

Change-Id: Ia27612657532e50b077a9c55dbef59ee3ec04b8a
2018-08-16 12:16:28 +09:00
Nan Zhang
c28a0ac77c Remove api-stubs-docs targets.
Since api-stubs-docs will be replaced by Metalava.

Test: m -j checkbuild
Bug: b/70351683 b/78245848
Change-Id: I3d2091afb0b5d93250573076d4dc95b47c634f2d
Merged-In: I3d2091afb0b5d93250573076d4dc95b47c634f2d
2018-08-14 13:46:01 -07:00
Nan Zhang
08070ebd6a Merge "Remove api-stubs-docs targets." 2018-08-14 18:18:16 +00:00
Steven Moreland
bc600d3282 Merge "Implementing support for HIDL native handles in Java" am: 1e1d8d2485 am: 6580802918
am: 4a6566440f

Change-Id: I649a10172d93beae9063ec2170e60aa4967ba0be
2018-08-14 10:16:06 -07:00
Steven Moreland
6580802918 Merge "Implementing support for HIDL native handles in Java"
am: 1e1d8d2485

Change-Id: I5f2f709bcb87174850140e5ca7d4296338c1f56f
2018-08-14 09:54:46 -07:00
Nirav Atre
9850dd9751 Implementing support for HIDL native handles in Java
This change implements the equivalent of the C++ native_handle_t type in
Java. Similar to the C++ type, the NativeHandle class wraps an arraylist
of FileDescriptor objects, along with a raw data stream (integer array).

Bug: 35098567
Test: Ran m, hidl_test (C++ and Java). Functionality tests are included
in a separate CL.

Change-Id: Ic53f9a49ae17ce5708577a586230126ab0e222c7
2018-08-13 14:31:17 -07:00
Pete Gillin
6f85c2f657 Merge "Add libcore/ojluni/annotations as a source for metalava." am: c12090200d am: 31090fa0b3 am: c7f3c56a29
am: 228ee3501f

Change-Id: I24453ca20ab54f1b0327b6a1af60b814c008ed16
2018-08-13 07:59:18 -07:00
Pete Gillin
c7f3c56a29 Merge "Add libcore/ojluni/annotations as a source for metalava." am: c12090200d
am: 31090fa0b3

Change-Id: Ifdc2ab0e8c5e393149c1f3f9860037565f0cf2d6
2018-08-13 07:37:07 -07:00
Treehugger Robot
c12090200d Merge "Add libcore/ojluni/annotations as a source for metalava." 2018-08-13 12:22:29 +00:00
Alex Light
5e11d609c6 Merge "Work around b/70221552" am: f06d3a9857 am: b2432b2ab3 am: 9cd6280f6b
am: 2810a9b852

Change-Id: Ib1d3ba042fba799f9061b74c0f78d77e830be1fd
2018-08-08 20:28:08 -07:00
Alex Light
9cd6280f6b Merge "Work around b/70221552" am: f06d3a9857
am: b2432b2ab3

Change-Id: I07faa9adfd5e6589b9989be6056d994c5909408a
2018-08-08 14:57:25 -07:00
Alex Light
159799d7c9 Work around b/70221552
If one sets a sufficiently long OUT_DIR to build into the
//frameworks/base:framework-javastream-protos generate target will
fail due to trying to run a too-long command. This works around that
problem by making the command being run much smaller.

Test: Build
Bug: 70221552
Change-Id: I0134ccfc83469826d3ea8679e1c52b9b52c6d2e0
2018-08-08 09:52:51 -07:00
Nan Zhang
4d3f501485 Remove api-stubs-docs targets.
Since api-stubs-docs will be replaced by Metalava.

Test: m -j checkbuild
Bug: b/70351683 b/78245848
Change-Id: I3d2091afb0b5d93250573076d4dc95b47c634f2d
2018-08-07 16:16:50 -07:00
Pete Gillin
c8cbb36673 Add libcore/ojluni/annotations as a source for metalava.
This adds the new annotations (in Java stub format) to the list that
metalava will merge when building stubs.

Bug: 111639530
Test: `make metalava-api-stubs-docs`
Change-Id: I5e73d1276f0602bd14a41f7a64659b1a7b1347cf
2018-08-07 16:49:08 +01:00