Commit Graph

3420 Commits

Author SHA1 Message Date
Galia Peycheva
a85b3d56a3 Merge "Add a TestApi to DM to get the last requested MPP" 2020-01-20 08:05:39 +00:00
Galia Peycheva
35f900a4d0 Add a TestApi to DM to get the last requested MPP
This CL exposes DisplayManager.getRequestedMinimalPostProcessing
for testing purposes. The call is propagated to
LogicalDisplay.getRequestedMinimalPostProcessingLocked().

Bug: 139369866

Test: m, flash, atest
CtsWindowManagerDeviceTestCases:MinimalPostProcessingTests

Change-Id: I7736d6e7a5c97d663111d10efa66d6d38a7e70bd
2020-01-17 20:23:01 +01:00
Andrii Kulian
2b3b20c388 Merge changes from topic "app_config_compat"
* changes:
  Update resource config for default display
  Override process config to match activity config
  Set parent for WindowProcessController
2020-01-17 04:56:41 +00:00
TreeHugger Robot
ba3882446c Merge "Camera: Add new UNDEFINED pose reference enum" 2020-01-16 21:49:19 +00:00
Ytai Ben-Tsvi
2e8f78b322 Improve exception handling in SoundTrigger
This unified the exception handling of SoundTrigger and
SoundTriggerModule and adds support for some ServiceSepcificExceptions
that may occur.

Change-Id: I018c7b249058758f0f3b5af34ee06a2396ecb6a7
Bug: 147435580
2020-01-15 13:10:33 -08:00
Andrii Kulian
946e8df660 Update resource config for default display
When a launched application doesn't occupy the entire screen space,
there is a mismatch between the configuration of the process and the
configuration of activities. This leads to compatibility issues with
apps that don't expect this, read display metrics from Application
resources and try to apply them in activities.

The platform may apply a compatibility mode, in which the process
configuration will match the config of the top running activity. This
means that the process configuration may change and runtime and
result in display adjustments that are different from the default
values. This CL propagates resource configuration updates even for
default display to make sure that the config changes are reflected
for non-activity contexts.

Test: CtsWindowManagerDeviceTestCases:AppConfigurationTests
Change-Id: I91cadc83a82a3be8c8dee810bbd1aa97cbe4e97f
2020-01-15 12:22:46 -08:00
TreeHugger Robot
d5dc1844bb Merge "fix parceling issue with KeyphraseSoundModel" 2020-01-15 05:36:57 +00:00
TreeHugger Robot
e2b62e4f12 Merge changes I8cfea8ab,I349611e3
* changes:
  Recover from HAL death in sound trigger
  Lint cleanup
2020-01-15 03:49:48 +00:00
Nicholas Ambur
43970b5124 fix parceling issue with KeyphraseSoundModel
Bug: 147646806
Test: Tested enrollment and unenrollment via bundled hotword enrollment
application.

Change-Id: I0a78d831e0949d4cf1ed97a1cd6cdaea70d8399a
2020-01-14 18:54:26 -08:00
Curtis Belmonte
e0e5852108 Merge "Add auth type to BiometricPrompt.AuthenticationResult" 2020-01-15 00:44:26 +00:00
Ytai Ben-Tsvi
c2327e78fd Recover from HAL death in sound trigger
Added some recovery code for the case of a dead driver.
Due to the sound trigger HAL process being tied to the audio server
via init.rc, this would also offer recovery from audio server death
as a by-product.

Bug: 146852437
Change-Id: I8cfea8ab108d482592c8094e8093066973f43288
2020-01-14 15:22:18 -08:00
Shuzhen Wang
2071f2e977 Camera: Add new UNDEFINED pose reference enum
The newly added UNDEFINED pose reference is used for a camera device
that cannot accurately measure its pose rotation and translation.
One such example is a camera on a foldable phone.

Bug: 119325027
Test: Camera CTS, and test_multi_camera_alignment
Change-Id: I0da7638e2bce31886f9dbf33dd2f74800d8768f7
2020-01-14 14:15:52 -08:00
Curtis Belmonte
6601bc3403 Add auth type to BiometricPrompt.AuthenticationResult
Now that BiometricPrompt supports primary auth via device credential,
we want the high-level type of authentication used to be available to a
developer via the AuthenticationResult in onAuthenticationSucceeded.
Rather than include information about the strength of the biometric
sensor by reusing the existing Authenticators.Types constants, this
commit adds new integer constants that provide similar information but
at a lower level of granularity (device credential vs. biometric).

Test: atest com.android.server.biometrics
Test: atest com.android.systemui.biometrics
Test: Manually inspect new AuthenticationResult object on Pixel 3/4

Bug: 80525177
Bug: 141025588

Change-Id: Ic09ffdff995afe374f11721e6e777632de9ae867
2020-01-14 12:33:19 -08:00
Nicholas Ambur
9e3ec9af07 Merge "add version entry to soundtrigger model database" 2020-01-14 00:47:20 +00:00
TreeHugger Robot
bea889368f Merge "Camera: Improve timestamping docs" 2020-01-14 00:33:23 +00:00
Nicholas Ambur
d3ec82fbc4 add version entry to soundtrigger model database
Bug:147159435
Test: manual hotword trigger with upgraded database
&& dumpsys voiceinteraction

Change-Id: I45497c1159fe879e1de119a18aac8f7ecc2b0686
2020-01-13 12:23:56 -08:00
Eino-Ville Talvala
4607917f5f Merge "Camera: Deprecate various older createCaptureSession variants" 2020-01-13 19:28:22 +00:00
Eino-Ville Talvala
e57616ff52 Camera: Deprecate various older createCaptureSession variants
Move all the documentation to the most flexible option, and deprecate
the older variants.

Test: m offline-sdk-docs, full build
Bug: 130304741
Change-Id: I9775e474657b87157ae49c22b2156f6cabe2088b
2020-01-10 19:26:44 -08:00
Nicholas Ambur
7092a56116 add audioCapabilities to SoundTrigger properties
Bug: 146363190
Test: atest SoundTriggerMiddlewareImplTest
&& GTS assist test suite

Change-Id: Ib8a3b809fa6738152d31499b5072a2e9d39ab0a0
2020-01-10 16:00:58 -08:00
Nicholas Ambur
bcc216f212 Merge "add supportedModelArch to SoundTrigger properties" 2020-01-10 17:09:00 +00:00
Nicholas Ambur
b2a5c29796 Merge "add parameter control to AlwaysOnHotwordDetector" 2020-01-10 17:08:00 +00:00
Nicholas Ambur
f94db1c822 add parameter control to AlwaysOnHotwordDetector
Per-model control to AlwaysOnHotwordDetector interface.
Models are selected by keyphrase and locale associated with the
AlwaysOnHotwordDetector instance.

Bug: 141929369
Test: tested manually with test app
Change-Id: Iffeb0954059fa030d8a4fefb934a3e665323be37
2020-01-09 18:18:47 -08:00
Eino-Ville Talvala
1ce3c167c5 Camera: Improve timestamping docs
Specifically, publicly commit to UNKNOWN being CLOCK_MONOTONIC, though
with loose accuracy guarantees.

Also document how to handle REALTIME timestamps for A/V sync purposes.

Test: Builds, docs-only change

Change-Id: I24b5a69bf95508fe1462ca363843c4bfccf14889
2020-01-09 15:11:31 -08:00
Arthur Hung
c9f383bbed Support dynamic input mapping
In addition to static input mapping with IDC or config files that
was added in Q, there is a need to be able to change the mapping
at runtime.

This's different from focus being present to handle lifecycle/app
switching/etc, the rest of the system will need to be adapted to
work with no focus

- Provide an API that could add/update the associations.
- Provide an API that could remove the runtime associations.

Bug: 136080860
Test: manual
Change-Id: Ib80eea9a9c4b4326b0d48a9f496fa550dab2230e
2020-01-09 18:01:22 +08:00
Automerger Merge Worker
6da6e4f73f Merge "USB: [Tethering mainline] Expose @hide APIs to @SystemApi" am: d997a3571b am: 62a34ebc11 am: 658a0373a2
Change-Id: Ibc6e61e774c21e2e5c9bc1e7cb0e7fb46ae972fd
2020-01-09 04:39:32 +00:00
Automerger Merge Worker
658a0373a2 Merge "USB: [Tethering mainline] Expose @hide APIs to @SystemApi" am: d997a3571b am: 62a34ebc11
Change-Id: I9578c3d1b30c1c747b88a146a691f3280f448039
2020-01-09 04:33:30 +00:00
James Wei
7d66bd9b54 USB: [Tethering mainline] Expose @hide APIs to @SystemApi
Bug: 142372304
Test: Manual test: Enable USB tethering
Test: atest UsbTests
Test: atest UsbManagerTests
Change-Id: Ib284b0a72b06ff45b4d3b55a8d48c20f51284a20
2020-01-09 10:21:34 +08:00
Nicholas Ambur
38027cd860 add supportedModelArch to SoundTrigger properties
Bug: 142414689
Test: atest SoundTriggerMiddlewareImplTest
&& GTS assist test suite

Change-Id: I201a8ab919b0a27fa1ed2fd7804c78edccefc647
2020-01-08 14:49:49 -08:00
Automerger Merge Worker
59d58f5cae Merge "Use new UnsupportedAppUsage annotation." am: 9395887931 am: 8081ee1b35
Change-Id: I330594303664e66571a460fdb1a5ab6cb8e5e273
2020-01-08 17:14:42 +00:00
Artur Satayev
33f9217695 Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I0c336de56bc4a041dc97ff9b7927f62f0b44b457
Merged-In: I0c336de56bc4a041dc97ff9b7927f62f0b44b457
2020-01-08 14:04:40 +00:00
Ytai Ben-tsvi
d63953379b Merge "Doc fix" 2020-01-07 22:17:44 +00:00
Ytai Ben-Tsvi
c59b280c81 Doc fix
The previous doc goes into implementation detail (bad idea anyway),
which is no longer true.

Change-Id: I6923c55f9505cfc3d59e4dc76fe76c95d1bae74d
2020-01-07 14:08:16 -08:00
TreeHugger Robot
fab33b6bf5 Merge "Use new UnsupportedAppUsage annotation." 2020-01-07 07:58:18 +00:00
Eino-Ville Talvala
d2d749afd2 Camera: Add visual samples for android.scaler.cropRegion docs
To better document the cropping specification for camera2, add diagrams
from source.android.com into the reference docs as well.

Test: Docs build, look correct

Change-Id: I18a9c3801e19f39164f0d8c19c0cc001f142024f
2020-01-06 16:10:29 -08:00
Artur Satayev
269580069b Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I0c336de56bc4a041dc97ff9b7927f62f0b44b457
2020-01-06 16:47:35 +00:00
TreeHugger Robot
c4a819f5f5 Merge "Replace com.android.internal.util.Preconditions.checkNotNull with java.util.Objects.requireNonNull" 2020-01-06 13:46:54 +00:00
Daulet Zhanguzin
0eb0a776a7 Replace com.android.internal.util.Preconditions.checkNotNull with
java.util.Objects.requireNonNull

Bug: 126528330

Test: Treehugger
Exempt-From-Owner-Approval: Global refactoring.
Change-Id: I9ca95bd74a32d913bd6bd06d0194c8f4d8da2142
2020-01-03 18:10:19 +00:00
TreeHugger Robot
046f1d8502 Merge "Camera: Cache tag id to avoid repeatative lookup" 2020-01-02 22:35:12 +00:00
Curtis Belmonte
3833bdcb0a Merge "Reformat biometric auth constants to 4 hex digits" 2020-01-02 18:10:53 +00:00
Shuzhen Wang
fe33a3aa32 Camera: Cache tag id to avoid repeatative lookup
Looking up tag id based on tag name for each key is potentially time
consuming. Instead, cache the id in the Key object so that only when the
first getTag() triggers a look-up. All subsequent calls doesn't do
look-up.

Bug: 144028609
Test: Run GCA and observe CameraMetadata CPU consumption
Change-Id: Iadd92e7e3b6cb4d610a6c9704ca2066291291f43
2020-01-02 08:55:29 -08:00
Daulet Zhanguzin
fcc8d868be Replace com.android.internal.util.Preconditions.checkNotNull with
java.util.Objects.requireNonNull

Bug: 126528330

Test: Treehugger
Change-Id: I2afb61144af7bdd058df1311062ed8f4859ad861
2019-12-31 14:21:51 +00:00
TreeHugger Robot
c3a20c3b2c Merge "Make the short term brightness model configurable." 2019-12-31 13:06:29 +00:00
Kenny Guy
b29fdf1d71 Make the short term brightness model configurable.
Bug: 146141793
Test: atest BrightnessConfigurationTest
Test: atest AutomaticBrightnessControllerTest
Test: manual - use reflection to configure the new parameters from turbo app and check dumpsys

Change-Id: I78af8009f15400f2f91e55363066d97f008a7922
2019-12-30 16:19:59 +00:00
Robin Lee
9fa43dad06 Make getCameraIdListNoLazy handle no service case
If we have sCameraServiceDisabled, we know for sure that calling
addListener on the mCameraService is going to fail with NPE, so the best
option is to just return an empty list.

Fix: 146994502
Test: atest android.camera.cts.HeifWriterTest
Change-Id: Ie3a1457fbace0879a5d66600acd83541a9d78182
2019-12-30 13:05:46 +01:00
TreeHugger Robot
7512419419 Merge "Reject messages larger than MTU size" 2019-12-27 02:19:14 +00:00
Arthur Ishiguro
3009e50fe8 Reject messages larger than MTU size
Bug: 143360045
Test: Compile only
Change-Id: I2b8c226a5b8dffd3b9e9f7d533588592f6a1ec9b
2019-12-26 14:38:13 -08:00
Automerger Merge Worker
162fb37428 Merge "Camera: Fix typo when comparing display size height" into qt-qpr1-dev am: 870f67cc63
Change-Id: I74bd4ba4084d10f5e8ea866cc06799c52372e10e
2019-12-26 17:33:22 +00:00
Galia Peycheva
056b3ee745 Add minimal post processing API to framework
This API allows applications to instruct the connected display to do minimal
post processing on the produced image or video frames. This will switch the
display to a low latency mode (ALLM, Game mode or some other custom
implementation thereof), reducing lag in the final images. Thus, minimal post
processing would greatly enhance performance for gaming and video
conferencing applications. It would not, however, suit applications that
prioritise image quality over performance.

This CL adds 2 public method:
 - Window.setPreferMinimalPostProcessing()
(this can also be set in WindowManager.LayoutParams.preferMinimalPostProcessing)
If minimal post processing is preferred, the connected display will be requested
to go into low latency mode, which reduces image processing, resulting in better
performance for gaming applications. If the Display sink is connected via HDMI,
the device will begin to send infoframes with Auto Low Latency Mode enabled and
Game Content Type. This will switch the connected display to a lower latency
mode (if available).
For more information, see HDMI 2.1 specification.

If the Display sink has an internal connection or uses some other protocol than
HDMI, effects may be similar but implementation-defined.

 - Display.isMinimalPostProcessingPreferred()
Returns true if the connected display supports either Low Latency Mode (ALLM or
some other custom low latency implementation) or Game content type.

Bug: 135116095

Test: make -> flash on ATV OTT device -> open an activity which requests minimal
post processing -> check SurfaceControl logs -> verify correct signals are
passed to native

Change-Id: I5508bb9e5c138b0f2b42d8f8fab10e1915ba3cb6
2019-12-23 17:27:55 +01:00
Joshua Mccloskey
0cf243eafd Merge "Add builder method to check DevicePolicyManager" 2019-12-19 18:21:44 +00:00
Shuzhen Wang
f8aca7b463 Merge "Camera: Add support for CONTROL_ZOOM_RATIO" 2019-12-19 03:32:59 +00:00