Commit Graph

2252 Commits

Author SHA1 Message Date
Jeff Sharkey
28f6dc9512 Merge "Give Doclava our manifest; more permission docs." into oc-dev am: 65d4cbba37
am: 67cb5f5210

Change-Id: Ic4c30cdb8bbfda5b3703eb3c7c36c1bf8ab3a216
2017-06-06 16:17:39 +00:00
Jeff Sharkey
ec68b46bc8 Merge "Annotate @SystemApi with required permissions." into oc-dev am: c1406978a4
am: 7a2e4a8486

Change-Id: Ib629e25dbf047c110feaf03e4ff744b5c6df9aeb
2017-06-06 15:48:24 +00:00
Jeff Sharkey
67cb5f5210 Merge "Give Doclava our manifest; more permission docs." into oc-dev
am: 65d4cbba37

Change-Id: I2ec50efb67debd15d354db69b84fb620eb74bc0e
2017-06-06 15:28:26 +00:00
Jeff Sharkey
bfc4fcde9f Give Doclava our manifest; more permission docs.
We've seen some @SystemApi methods protected with non-system
permissions, so give Doclava the platform AndroidManifest.xml so it
can parse the actual permission protection levels to look for APIs
that are letting in non-system apps.

Also document more @SystemApi permissions.

This is purely a docs change; no logic changes are being made.

Test: make -j32 update-api
Bug: 62263906
Change-Id: Ie0f0a5fb0033817bcc95060f2183a52ae4ae7b06
2017-06-05 17:38:19 -06:00
Jeff Sharkey
7a2e4a8486 Merge "Annotate @SystemApi with required permissions." into oc-dev
am: c1406978a4

Change-Id: I305967cad945a807c3f8234efabaad0ef8b591d1
2017-06-05 22:28:21 +00:00
Jeff Sharkey
d86b8fea43 Annotate @SystemApi with required permissions.
Most @SystemApi methods should be protected with system (or higher)
permissions, so annotate common methods with @RequiresPermission to
make automatic verification easier.

Verification is really only relevant when calling into system
services (where permissions checking can happen on the other side of
a Binder call), so annotate managers with the new @SystemService
annotation, which is now automatically documented.

This is purely a docs change; no logic changes are being made.

Test: make -j32 update-api && make -j32 offline-sdk-docs
Bug: 62263906
Change-Id: I2554227202d84465676aa4ab0dd336b5c45fc651
2017-06-05 13:27:11 -06:00
Alexey Polyudov
85c362700f Merge "sensors: pass sensor handle along with injected event" 2017-05-25 21:00:24 +00:00
Eino-Ville Talvala
ae7023c1cd Merge "Camera2: Fix broken onCaptureBufferLost callback" into oc-dev am: 906948e7e2
am: d939f92dd0

Change-Id: If83f2175a06961cbe30ab1dfe9b849752ba882f3
2017-05-25 17:42:41 +00:00
Eino-Ville Talvala
d939f92dd0 Merge "Camera2: Fix broken onCaptureBufferLost callback" into oc-dev
am: 906948e7e2

Change-Id: I0007db72b0ca923c0e42bbb6ddadf34e927b5612
2017-05-25 17:25:34 +00:00
Eino-Ville Talvala
906948e7e2 Merge "Camera2: Fix broken onCaptureBufferLost callback" into oc-dev 2017-05-25 17:11:06 +00:00
Kevin Chyn
093f1098de Merge "Revert fix for FingerprintManager leak" into oc-dev am: 807a8c6e7c
am: 23e33539cd

Change-Id: Iadbfa00e79d3607fe64186991f008a55ac5b05f3
2017-05-25 04:41:34 +00:00
Kevin Chyn
23e33539cd Merge "Revert fix for FingerprintManager leak" into oc-dev
am: 807a8c6e7c

Change-Id: I9f9132b1785c4e7c7d04dcc7decfbc4e447fbdd0
2017-05-25 04:33:07 +00:00
Kevin Chyn
5e797faaf4 Revert fix for FingerprintManager leak
Bug: 38509779
Bug: 32295793

Setting to null causes problem seen in b/38509779
Using weakreference will cause problems if the application
declares AuthenticationClient as a weak reference as well and would
very likely break a lot of existing apps.

Test: manual
Change-Id: Iedbdd76f3a402b766ce8a799bf76324d1164a0ec
2017-05-24 16:58:18 -07:00
Alexey Polyudov
5b5e11c483 sensors: pass sensor handle along with injected event
Change-Id: I5e8eacfa940c082a14a9876f455c55b84b975086
2017-05-24 15:00:17 -07:00
Eino-Ville Talvala
cad1bfe68b Camera2: Fix broken onCaptureBufferLost callback
Turns out this never worked. 😱

- Add missing oncaptureBufferLost proxy method
- To avoid this issue in the future, change CameraDeviceImpl.CaptureCallback to be
  an interface instead of an abstract class; now all implementers _must_ implement
  all the methods
- For the short-circuit local callback when no callback is provided by the user,
  implement all no-ops explicitly.

Test: Camera CTS continues to pass; manual testing with injected buffer drops
Bug: 62004599
Change-Id: I7732903dbc00e80084162e067de66b5db6cee74c
2017-05-23 14:29:31 -07:00
Tomasz Wasilczyk
39ac214838 Implement isAntennaConnected interface of ITuner.
Test: instrumentation
Bug: b/36863239
Change-Id: I325cc29a696a6163fd3db1f2a75e64a2b1ddf514
2017-05-17 14:55:17 -07:00
Charles He
c8b8bc949b Merge "Fingerprint: call onRemovalSucceeded with # of remaining templates." into oc-dev am: 50be382341
am: 16a2759492

Change-Id: I0caf8f5367fe611ddacb6132ea5f0baac8ad75e6
2017-05-17 13:20:42 +00:00
Charles He
16a2759492 Merge "Fingerprint: call onRemovalSucceeded with # of remaining templates." into oc-dev
am: 50be382341

Change-Id: I5c6f8dfed5777de8098fa6a02d5a3124addedf22
2017-05-17 13:15:42 +00:00
Tomasz Wasilczyk
d3d53f6692 Implement program list and forced analog features of ITuner.
Test: instrumentation
Bug: b/36863239
Change-Id: Ib900a444f36d33dc9d55a99e699f9b6ce0c943ad
2017-05-16 15:37:07 -07:00
Charles He
ee17d352d6 Fingerprint: call onRemovalSucceeded with # of remaining templates.
The onRemoved() callback from fingerprint daemon provides a "remaining"
parameter which contains the number of fingerprint templates yet to be
removed in the current removal operation. This is especially useful when
a group is removed, as remaining == 0 indicates the end of the group
removal.

In this CL, we wire up FingerprintManager so that the "remaining"
parameter gets passed to RemovalCallback#onRemovalSucceeded(). This
would allow clients like Settings to make use of the information.

Bug: 37938345
Test: manual, both with and without work profile
Change-Id: Idf46ef42e1d178cd3dc267aaf4219f03e27be766
2017-05-16 16:34:21 +01:00
Kevin Chyn
88c76aef23 Merge "Add missing break statements in FingerprintManager" into oc-dev am: e25a2564e5
am: c7a3cf5850

Change-Id: I5d509bdb15a645ae002b0f9862644da3aac8b456
2017-05-13 00:42:52 +00:00
Kevin Chyn
c7a3cf5850 Merge "Add missing break statements in FingerprintManager" into oc-dev
am: e25a2564e5

Change-Id: Iae1ded28be8ea7df2c466ce2592a5574b1cee994
2017-05-13 00:32:46 +00:00
TreeHugger Robot
e25a2564e5 Merge "Add missing break statements in FingerprintManager" into oc-dev 2017-05-13 00:27:13 +00:00
Kevin Chyn
f8567234e0 Merge "strong fp lockout after 20 failed attempts" into oc-dev am: 310818ff82
am: 3ed8955aa3

Change-Id: Id8de8c421f31faa6ec30a8bd1e8d5d2585642363
2017-05-13 00:03:18 +00:00
Kevin Chyn
3ed8955aa3 Merge "strong fp lockout after 20 failed attempts" into oc-dev
am: 310818ff82

Change-Id: I52787e3db92ae9795932156335ee5c55f5c920a9
2017-05-12 23:49:48 +00:00
Kevin Chyn
e64399649a Add missing break statements in FingerprintManager
Fixes: 38268065

Test: manual

Change-Id: I64ac92b2c5682bcaa494f43ff5defdf9915c5a65
2017-05-12 14:57:32 -07:00
Kevin Chyn
df9d33e903 strong fp lockout after 20 failed attempts
Fingerprint currently locks out for 30s after every 5 failed attempts.

This change makes it so that in addition to the above,
PIN/pattern/password will be required after 20 failed attempts.

Fixes: 35954316

Test: manual
Change-Id: I3aeb0e5b5b4d5011555f60fbe6cc2c1ce702a670
2017-05-12 13:01:01 -07:00
Kevin Chyn
fe822a101e Merge "AuthenticationCallback should not be cleared onAuthenticationFailed" into oc-dev am: 6fddc2472e
am: 7096712148

Change-Id: I5f392cb23da265eecfdb07456066ba1b3c376d2d
2017-05-11 06:43:14 +00:00
TreeHugger Robot
424e328bba Merge "Add uniqueId to Virtual Display and pass through to inputflinger (1/2)" into oc-dev 2017-05-11 03:55:40 +00:00
Santos Cordon
b0608636a2 Add uniqueId to Virtual Display and pass through to inputflinger (1/2)
This CL adds:
1) Adds uniqueId (protected via system/sig permission) to virtual
displays.
2) Add support for N virtual display viewports into inputflinger.
3) Set the virtual display's viewports in inputflinger if it has the
uniqueId value set to non-null. (a) Moving the new viewport from java to
native inputflinger and (b) adding "uniqueId" value to viewports makes
up the great majority of this change.
4) From the inputflinger side, we also read in a new value from the
input device configuration files called 'touch.displayId'.
5) When touch.displayId and the virtual display's uniqueId match,
inputflinger links the two.

Test: Start VR and ensure that the virtual viewport shows up when running
'adb shell dump input".  Run a VR app, and ensure that the virtual input
device is associated with the new virtual viewport.
Test: com.android.server.display.DisplayManagerServiceTest

Bug: 36051620
Change-Id: Ic2117eb8e19f7f3c59687160591f8bc6692c1f12
Merged-In: Ic2117eb8e19f7f3c59687160591f8bc6692c1f12
2017-05-11 01:52:53 +00:00
Santos Cordon
527b92c8d8 Merge "Add uniqueId to Virtual Display and pass through to inputflinger (1/2)" 2017-05-11 01:48:26 +00:00
Kevin Chyn
7096712148 Merge "AuthenticationCallback should not be cleared onAuthenticationFailed" into oc-dev
am: 6fddc2472e

Change-Id: I3493866a4e594a186f897b02dca0773e4a7a0d49
2017-05-11 01:13:10 +00:00
Bryce Lee
5cfde635e3 Merge "Use application context getting secondary displays." into oc-dev am: 456882b5ae
am: 356cccd67c

Change-Id: I291e1249e9e0b5a975faade4ee105b3e6711db67
2017-05-10 23:04:38 +00:00
Kevin Chyn
7a6b44bcee AuthenticationCallback should not be cleared onAuthenticationFailed
Fixes: 38197608

Test: 1) enroll a finger
2) enter keyguard, touch sensor with an unenrolled finger
3) touch sensor with enrolled finger
4) phone should enter keyguard
5) do this test from screen off as well

Change-Id: I1c7b060888128b4a6b492fd6a7a8ebc85d2b3353
2017-05-10 14:39:55 -07:00
TreeHugger Robot
baed8c1321 Merge "Add uniqueId to Virtual Display and pass through to inputflinger (1/2)" into oc-dev-plus-aosp 2017-05-10 21:18:51 +00:00
Santos Cordon
023b6b9d23 Add uniqueId to Virtual Display and pass through to inputflinger (1/2)
This CL adds :
1) Adds uniqueId (protected via system/sig permission) to virtual
displays.
2) Add support for N virtual display viewports into inputflinger.
3) Set the virtual display's viewports in inputflinger if it has the
uniqueId value set to non-null. (a) Moving the new viewport from java to
native inputflinger and (b) adding "uniqueId" value to viewports makes
up the great majority of this change.
4) From the inputflinger side, we also read in a new value from the
input device configuration files called 'touch.displayId'.
5) When touch.displayId and the virtual display's uniqueId match,
inputflinger links the two.

Test: Start VR and ensure that the virtual viewport shows up when running
'adb shell dump input".  Run a VR app, and ensure that the virtual input
device is associated with the new virtual viewport.
Test: com.android.server.display.DisplayManagerServiceTest

Bug: 36051620
Change-Id: Id728d6e7292feaa1d8de7660bc6a2ec90fa1ff3c
2017-05-10 13:03:32 -07:00
Bryce Lee
356cccd67c Merge "Use application context getting secondary displays." into oc-dev
am: 456882b5ae

Change-Id: Ib45a340b34f11f0112c91893893f32e0a849cf93
2017-05-10 19:22:15 +00:00
Bryce Lee
456882b5ae Merge "Use application context getting secondary displays." into oc-dev 2017-05-10 16:27:14 +00:00
Tomasz Wasilczyk
b61b618aed Merge "Implement tune, cancel and getProgramInformation calls of ITuner." 2017-05-10 15:15:20 +00:00
Santos Cordon
ee8931e258 Add uniqueId to Virtual Display and pass through to inputflinger (1/2)
This CL adds:
1) Adds uniqueId (protected via system/sig permission) to virtual
displays.
2) Add support for N virtual display viewports into inputflinger.
3) Set the virtual display's viewports in inputflinger if it has the
uniqueId value set to non-null. (a) Moving the new viewport from java to
native inputflinger and (b) adding "uniqueId" value to viewports makes
up the great majority of this change.
4) From the inputflinger side, we also read in a new value from the
input device configuration files called 'touch.displayId'.
5) When touch.displayId and the virtual display's uniqueId match,
inputflinger links the two.

Test: Start VR and ensure that the virtual viewport shows up when running
'adb shell dump input".  Run a VR app, and ensure that the virtual input
device is associated with the new virtual viewport.
Test: com.android.server.display.DisplayManagerServiceTest

Bug: 36051620
Change-Id: Ic2117eb8e19f7f3c59687160591f8bc6692c1f12
2017-05-09 18:17:39 -07:00
Tomasz Wasilczyk
37d986d17d Implement tune, cancel and getProgramInformation calls of ITuner.
Test: instrumentation
Bug: b/36863239
Change-Id: I7c0faacec7beccddc29f3f207ba6a166cb53e60c
2017-05-09 10:43:13 -07:00
Bryce Lee
c406152f5f Use application context getting secondary displays.
Activity contexts include override configurations in their resources
associated with the primary display. There currently is no way to
specify overrides for another display from the same context. As a
result, getting metrics for other displays will reflect the metrics
of the context's display.

This change provides the application context when we create a display
if the display id does not match the display associated with the
context.

Change-Id: I68a7b609ead6d7cc652d36e7e8af432700af8efa
Fixes:37923030
Test: cts-tradefed run cts-dev --module CtsDisplayTestCases --test android.display.cts.DisplayTest#testActivityContextGetMetrics
2017-05-09 10:40:23 -07:00
TreeHugger Robot
764b7370ad Merge "Add API for querying if a given keyphrase/locale is supported for AOHD." 2017-05-09 03:41:15 +00:00
Chien-Yu Chen
b8cc2c2179 Merge changes from topic 'enableZslApi' into oc-dev am: 9414a25592
am: fe04ad53de

Change-Id: Ia0f9272d92b90abf660e2515785fb519c9e87153
2017-05-08 22:50:52 +00:00
Chien-Yu Chen
fe04ad53de Merge changes from topic 'enableZslApi' into oc-dev
am: 9414a25592

Change-Id: I9d4fb74e37782f269966dda855f716e24ed42000
2017-05-08 22:33:56 +00:00
Chris Thornton
bf8288ce34 Add API for querying if a given keyphrase/locale is supported for AOHD.
Test: Use test VoiceInteraction app to verify function behaves as
expected, and no longer crashes in the framework if you try to use a
AOHD with a null KeyphraseEnrollmentMetaData object.

Change-Id: I12923b8ebf37e6de9be336b4397c24679c86fff8
2017-05-08 15:31:58 -07:00
TreeHugger Robot
9414a25592 Merge changes from topic 'enableZslApi' into oc-dev
* changes:
  camera: Clarify TEMPLATE_ZERO_SHUTTER_LAG
  camera: Clarify ZSL supports
2017-05-08 22:28:38 +00:00
Kevin Chyn
22612c7297 Merge "Fix AuthenticationCallback leak in FingerprintManager" into oc-dev am: a0cd8eb55d
am: 6935c33abd

Change-Id: Ib417427684e6e916fd517f6648eb74c573a0945b
2017-05-08 21:11:14 +00:00
Kevin Chyn
6935c33abd Merge "Fix AuthenticationCallback leak in FingerprintManager" into oc-dev
am: a0cd8eb55d

Change-Id: If67639ed1f93f76a1ed225209869545572571484
2017-05-08 20:58:17 +00:00
Kevin Chyn
d717808bd0 Fix AuthenticationCallback leak in FingerprintManager
Fixes: 32295793

Test: 1) modify/build/run apk attached in BR
2) run garbage collection after FingerprintActivity is done
3) use HPROF, FingerprintActivity should have "0 total count"
4) do this test for auth success, auth fail, auth cancel

Change-Id: I5fe7937a26d4673226b87c9c95a136dd9510e21f
2017-05-07 22:42:22 +00:00