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
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
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
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
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
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
Clarify that TEMPLATE_ZERO_SHUTTER_LAG is intended for application
operated ZSL.
Test: make
Bug: 34689167
Change-Id: Ice5fcb11ce43b411376d22976741720a5abbf322
For application-operated ZSL, use CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG
template.
Test: make
Bug: 34689167
Change-Id: I39dba6f9a23a8c714c31cf5fb825a8bee3f01f2b
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>
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
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
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>
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
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
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
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
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
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
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