Commit Graph

2159 Commits

Author SHA1 Message Date
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
TreeHugger Robot
e25a2564e5 Merge "Add missing break statements in FingerprintManager" into oc-dev 2017-05-13 00:27:13 +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
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
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
Bryce Lee
456882b5ae Merge "Use application context getting secondary displays." into oc-dev 2017-05-10 16:27:14 +00: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
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
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
Chien-Yu Chen
6828bb92bd camera: Clarify TEMPLATE_ZERO_SHUTTER_LAG
Clarify that TEMPLATE_ZERO_SHUTTER_LAG is intended for application
operated ZSL.

Test: make
Bug: 34689167
Change-Id: Ice5fcb11ce43b411376d22976741720a5abbf322
2017-05-03 12:41:39 -07:00
Chien-Yu Chen
8102638c71 camera: Clarify ZSL supports
For application-operated ZSL, use CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG
template.

Test: make
Bug: 34689167
Change-Id: I39dba6f9a23a8c714c31cf5fb825a8bee3f01f2b
2017-05-03 12:41:07 -07:00
Dianne Hackborn
9cd47a8ff2 Merge "Fix issue #37714224: API Review: ACTION_NEW_VIDEO" into oc-dev 2017-04-28 18:10:39 +00:00
Mathias Agopian
910ab13e66 Plumb gralloc producer/consumer bits correctly
Bug: 33350696
Test: compile, boot device, its
Change-Id: I6129cedce0b35acfef1702afdd178ba043dd53cb
2017-04-28 00:13:29 +00:00
Dianne Hackborn
c154195d27 Fix issue #37714224: API Review: ACTION_NEW_VIDEO
Test: none, docs only.

Change-Id: Id6e3667884a5907c0877aabb3760fac88863ff7a
2017-04-27 10:56:12 -07:00
songjinshi
b5322b2be5 [Stability]: fix system_server crash issue caused by fd leak.
If an app incorrect use of registerListener, it will cause
system_server socket fd leak, for example:
    protected void onResume() {
        super.onResume();
        mSensorManager.registerListener(new MySensorEventListener(),
                mSensor, SensorManager.SENSOR_DELAY_UI);
Each time a new SensorEventQueue, then in the system_server
will open a new socket fd, as time increases system_server's
fd will be more than 1024 and crash, so we needed add count limit
for sensor listener to improve the system stability.

Test: use the apk attached in the issue
      https://code.google.com/p/android/issues/detail?id=258634
Bug: 37543280

Change-Id: I35006966a1638c25bb0f54611e117e16a764e12b
Signed-off-by: songjinshi <songjinshi@xiaomi.com>
2017-04-27 02:40:45 +00:00
TreeHugger Robot
1c5b71ec1f Merge "Return correct value at initDataInjection and avoid crash" into oc-dev 2017-04-25 23:18:24 +00:00
TreeHugger Robot
f879357cae Merge "Camera: Update docs for new auto-generation features" into oc-dev 2017-04-25 22:11:47 +00:00
Jeff Sharkey
a00c7c0a99 Merge "Fix some issues found by new doclava linter." into oc-dev 2017-04-25 22:11:01 +00:00
Jeff Sharkey
0f3f60b576 Fix some issues found by new doclava linter.
Add missing API annotations for permissions and SdkConstants, and
invoke doclava with new "-android" flag.

Test: make -j32 offline-sdk-docs
Bug: 37526420
Change-Id: I970bb2655eb568fd25004636f134c794663a6c33
2017-04-25 13:12:45 -06:00
Peng Xu
9098a0260f Merge "sensors: fix concurrent modification exception" into oc-dev 2017-04-25 17:51:26 +00:00
TreeHugger Robot
06d84c3a86 Merge "camera: Update for enableZsl values in template" into oc-dev 2017-04-24 22:36:54 +00:00
Eino-Ville Talvala
16ffbc65c0 Camera: Update docs for new auto-generation features
Annotate @IntDef with prefixes where possible.

Test: Look at doc output
Bug: 37635513
Change-Id: Iff3a9ecf83f348b56b3186e4dfe94a1e7697cfaf
2017-04-24 13:10:21 -07:00
Peng Xu
d9d4e1bc3b Return correct value at initDataInjection and avoid crash
When data inject channel cannot be initialized return false, instead
of causing crash.

Bug: 37549731
Test: run GTS SensorHostTest, test succeed with no failures observed.
Change-Id: Ia7a078b9e7d4f61927da8d76a0206e588fd6686c
2017-04-23 15:23:07 -07:00
TreeHugger Robot
649040c7f6 Merge "Update HardwareBuffer API." into oc-dev 2017-04-21 19:28:32 +00:00
Craig Donner
fd5d331efb Update HardwareBuffer API.
Bug: 37514517
Test: cts-tradefed run cts -t CtsHardwareTestCases -t android.hardware.cts.HardwareBufferTest
Change-Id: I5e381964b780472081ef9a65c3c37f63dbaf1e51
2017-04-20 15:47:49 -07:00
Daniel Moore
1ff9e7ae00 sensors: fix concurrent modification exception
The sensor listener can be removed in unregisterListener
inside of the for loop.  This change makes a copy of the
listeners and iterates over the copy.

Test: builds
Bug: 37543280
Change-Id: Ie9b7b9afb6994d9627f67c4b3bfbdfb305f5583e
Signed-off-by: Daniel Moore <dtmoore916@gmail.com>
2017-04-20 15:01:12 -07:00
Ashutosh Joshi
a105c7b1a8 Ensure that LLOB sensor is names similr to other android sensors.
Ensuring that the LLOB sensos naming style is consistent with other
sensor naming styles.

Bug: 36554362
Test: Verify that the sensor shows up with the appropriate name
      string.

Change-Id: I904bd067e8a427ef32a45f19c6bff29afb69bec3
2017-04-18 21:30:44 -07:00
Chien-Yu Chen
1d72ee3b85 camera: Update for enableZsl values in template
For apps targeting SDK versions O and newer, the value of enableZsl
may be true in still capture template. the value of enableZsl is
always false for other templates.

For apps targeting SDK versions older than O, the value of enableZsl
is always flase.

Test: make
Bug: 34983527
Change-Id: I23702ec49a460fc6877114384f85748c7c2ef6ba
2017-04-18 16:14:15 -07:00
Chien-Yu Chen
3d2b5fe3e0 Camera: Override enableZsl based on SDK version
Override enableZsl based on app target SDK version so that for apps
targeting N and older, enableZsl is false for all template. For
apps targeting O and newer, enableZsl is false for all templates
except STILL_CAPTURE.

Test: CTS
Bug: 34983527
Change-Id: I2057e2351e81c269d322dffc199c58481ac3e78f
2017-04-14 17:35:43 -07:00
Andrii Kulian
c66b6ff997 Merge "Hide flag SHOW_WITH_INSECURE_KEYGUARD" into oc-dev 2017-04-14 05:05:25 +00:00
TreeHugger Robot
5ebb159a92 Merge "Address review suggestions for sensor direct report related APIs" into oc-dev 2017-04-13 23:24:42 +00:00
Peng Xu
3c8c6a4cc9 Address review suggestions for sensor direct report related APIs
Changes inline with bug number

Some improvements about SensorDirectChannel class.
  * Complete the doc about creation of SensorDirectChannel object.
  * Make SensorDirectChannel implements java.nio.channels.Channel.
  * Change isValid() to isOpen().
  * Make close() thread safe.
Bug: 36550285

  * Throw exception on failure of SensorManager.createDirectChannel.
  * Change to use NullPointerException when unexpected null pointer
    is passed in.
Bug: 36555061

  * Move SensorManager.configureDirectChannel() to
    SensorDirectChannel.configure().
  * Format SensorDirectChannel.configure() function doc with
    <pre></pre> to maintain the table structure.
  * Reworded Sensor.isDirectChannelTypeSupported java doc.
Bug: 36555604

Test: pass updated cts SensorDirectReportTest
Change-Id: I447121eaf414cbc94292a109a9d93d2e3c89f8f4
2017-04-13 14:17:11 -07:00
Andrii Kulian
22512e8a22 Hide flag SHOW_WITH_INSECURE_KEYGUARD
Bug: 36555156
Test: android.server.cts.ActivityManagerDisplayTests
Change-Id: I831ada0ffd35ab96af8ae821588c9f6e0ff30e5a
2017-04-13 11:35:40 -07:00
Dave Friedman
b97cdeb7ac Docs: Fixes broken link in Javadoc. am: df0fd34d50 am: 506a8b39fb am: 4eff74f8cb am: 2d642f9e2d
am: f125662db1

Change-Id: Ic69e95f68255e5e0bea646cdce2c56881586d24d
2017-04-13 17:28:18 +00:00
Dave Friedman
f125662db1 Docs: Fixes broken link in Javadoc. am: df0fd34d50 am: 506a8b39fb am: 4eff74f8cb
am: 2d642f9e2d

Change-Id: I5257f51a37e6e45a928befea94b2ecdb0cf01f45
2017-04-13 17:19:36 +00:00
Dave Friedman
4eff74f8cb Docs: Fixes broken link in Javadoc. am: df0fd34d50
am: 506a8b39fb

Change-Id: If60b7db71fe92508daaec1255c637927432d7b55
2017-04-13 17:00:44 +00:00
Dave Friedman
506a8b39fb Docs: Fixes broken link in Javadoc.
am: df0fd34d50

Change-Id: I76ed5361426065d5e532c5a11c2d11f28ba8c2d7
2017-04-13 16:48:41 +00:00
Dave Friedman
df0fd34d50 Docs: Fixes broken link in Javadoc.
Bug: 37198106
Change-Id: If005bf563f7bd97f794261e03d46c7b092955a89
2017-04-10 14:50:24 -07:00
Philip P. Moltmann
9b6dd2b2c1 Change requestWait API according to request
Test: USB Device CTSVerifier test
Change-Id: Ib55bed248d7b37c6f5f4a7be7ec2d90a7ac396c7
Fixes: 36555805
2017-04-06 18:13:53 -07:00
TreeHugger Robot
a441da153e Merge "Camera: Initial support for vendor tag caches" into oc-dev 2017-04-06 14:02:11 +00:00
Emilian Peev
de62d84eb9 Camera: Initial support for vendor tag caches
Vendor tag cache will be used alternatively to the regular
Vendor tag descriptor. The caches can support multiple vendor
tag providers at the same time. The native metadata along with
the requests/results/characteristics will store vendor specific
information that will be used to indentify the respective
descriptor.

Bug: 34275821
Test: Complete Camera/Camera2 CTS tests
Change-Id: I50b7cf9aa5575944fde7673a1728869690b2ce0d
2017-04-05 20:50:10 +01:00
Peng Xu
1cfde25e40 Local geomagnetic field update to sensor
Local geomagnetic field strength, declination, inclination information
is useful for magnetometer calibration. It also benefits rotation
vector sensor implementation as it gives a baseline that aids detecting
magnetic field disturbance.

Bug: 30958130
Test: Tested with marlin. Modified hal implementation can get local
      geomagnetic field.

Change-Id: I373fe74d5a091a3adb80ff3c61e441edcf5a253b
2017-04-04 12:35:49 -07:00
TreeHugger Robot
c56defe9c0 Merge "Rename UsbRequest.enqueue to UsbRequest.queue" into oc-dev 2017-04-04 01:57:23 +00:00
Andrii Kulian
cd09799339 Update display contents when metrics change
There are two separate overrides for display metrics in DisplayManager
and WindowManager:
- In DM - LogicalDisplay#mOverrideDisplayInfo, in most cases not null.
- In WM - DisplayContent#mBaseDisplayWidth/Height/Density, different
from #mInitialDisplayWidth/Height/Density values when some metrics are
forced.

When display was resized its windows weren't updated because of
two problems: old LogicaDisplay#mOverrideDisplayInfo was preventing
WM from detecting the change and override (base) display metrics were
never updated by resize.

When display size changes:
- Before this CL:
DM receives DISPLAY_CHANGED event, it updates internal values and
WM is notified about them with a message. In most cases there is an
override obtained from WM and WM doesn't get new values from
LogicalDisplay#getDisplayInfoLocked().

- With this CL:
WM will requests real updated values from DM without any overrides
and will decide whether to apply them or not: if there is no override
in WM - it will apply values from WM, otherwise it will keep the
override. Also it will always update initial display metrics if there
is a real change detected.

Bug: 35258051
Bug: 34164473
Bug: 36518752
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testDisplayResize
Test: #testForceDisplayMetrics
Change-Id: I2495c27797f11f9aaee4ea06648a8ccd29ac5b62
2017-04-03 19:45:14 +00:00
Philip P. Moltmann
91ed33b032 Rename UsbRequest.enqueue to UsbRequest.queue
Fixes: 36850572
Test: CtsVerifier USB device tests on angler
Change-Id: If2a376a8615bf2aa24a6d3a30c7d0a29365f52ea
2017-04-03 11:25:07 -07:00
TreeHugger Robot
8ad4a429da Merge "Camera: Send onPrepared callback to all shared surfaces" 2017-03-28 02:10:51 +00:00
TreeHugger Robot
bf4d8d1238 Merge "Prevent inclusion of null KeyphraseMetadata in info map." 2017-03-25 02:50:36 +00:00
Dianne Hackborn
d81542cef4 Merge "Partially return NEW_PICTURE and NEW_VIDEO." 2017-03-24 17:28:59 +00:00