Commit Graph

2966 Commits

Author SHA1 Message Date
TreeHugger Robot
11d70db8d5 Merge "Update Active Group before creating AuthClient" 2019-01-12 05:13:44 +00:00
Kevin Chyn
747e29ba94 Update Active Group before creating AuthClient
Change-Id: Ic41c97ca2735eb03629610ef725e0dd5691cfd4e
Fixes: 122582871
Test: follow comment #11 in bug linked above
2019-01-11 17:26:23 -08:00
Christine Franks
cf42497af1 Merge "Move global grayscale to ColorDisplayService" 2019-01-11 20:35:09 +00:00
Christine Franks
09c229e6bb Move global grayscale to ColorDisplayService
Bug: 111215474
Test: atest FrameworksServicesTests:ColorDisplayServiceTest
Change-Id: I9b72d53b2614f225422f15f3b4018383d75071cd
2019-01-11 09:36:48 -08:00
Kevin Chyn
1bafe67c78 Merge changes from topic "face-small"
* changes:
  2/n: Add BiometricPrompt implicit UI
  1/n: Add BiometricPrompt#setRequireConfirmation(bool) API
2019-01-10 22:50:08 +00:00
Dan Gittik
a5a2d6390e Fixed application info null pointer exception.
Test: manual.
      Set up work profile and open an app that's only installed
      there. This should change the user ID without triggering a
      system-wide global switch, in which case the application info
      would be null and cause the system service to crash.
      In the current implementation, this shouldn't happen, and in
      fact the foreground app should be properly inferred regardless
      of the user. This can be visible by enabled and checking the
      AutomaticBrightnessController logs with:

      adb shell cmd display ab-logging-enable
      adb logcat | grep AutomaticBrightnessController

Fixes: 122107873

Change-Id: I8161414a766c494ab0efadaa20fe6fcdf5067948
2019-01-09 16:26:34 +00:00
Kevin Chyn
158fefb72d 1/n: Add BiometricPrompt#setRequireConfirmation(bool) API
Test: BiometricPrompt behaves as expected

Bug: 111461540
Change-Id: I84a298dedba368a9dade2835b71e641e524f45f4
2019-01-08 12:34:54 -08:00
TreeHugger Robot
97e54a0113 Merge "Forward volume keys when system audio mode off and property set" 2019-01-05 02:56:24 +00:00
Sudheer Shanka
2cf41e4fbf Merge "Revert "Added app context to smart screen brightness."" 2019-01-05 00:22:14 +00:00
Shubang Lu
00b976a7df Forward volume keys when system audio mode off and property set
cherry-pick ag/4968405

Bug: 80296335
Test: make; local tests
Change-Id: I04b7cd0958c9300a76f6337ee891b5f4947484ad
2019-01-04 22:11:05 +00:00
Sudheer Shanka
b3f60657a3 Revert "Added app context to smart screen brightness."
This reverts commit 54478d9cab.

Reason for revert: Broke work profile apps (http://b/122107873)

Bug: 111425369
Bug: 122107873
Change-Id: I7e3bf97725d542eb92a04bc75662ca6680287ba2
2019-01-04 21:34:58 +00:00
Christine Franks
83ddf8e8be Merge "Add ColorDisplayServiceInternal local service" 2019-01-03 16:25:28 +00:00
Christine Franks
245ffd4bc6 Add ColorDisplayServiceInternal local service
For display white balance and grayscale

Bug: 111215474
Test: atest FrameworksServicesTest:ColorDisplayServiceTest
Change-Id: I5c7b6543665e520b4e167ac8e6719f337018f172
2019-01-02 10:30:54 -08:00
Kevin Chyn
ffef714cfb Move null check
Bug: 111548033
Test: messages are received
Change-Id: I16d0c9eff4824c0c72e20cf06ce1a4eb5eeb5ba2
2018-12-27 16:28:48 -08:00
Philip P. Moltmann
bee3e3347c Merge "Expose UsbPort and UsbPortStatus as system API" 2018-12-19 19:10:06 +00:00
Philip P. Moltmann
0ee6ee0a92 Expose UsbPort and UsbPortStatus as system API
This is needed by making the setup wizard use only system-api.

Test: Built, switched USB port state
Change-Id: I8e56859a5b36e7de91691522a34f7d6f62dcbb20
Fixes: 115301401
2018-12-18 08:50:46 -08:00
Dan Gittik
54478d9cab Added app context to smart screen brightness.
Smart screen brightness learns the user brightness preferences from
user interactions with the brightness slider, but doesn't take into
account the foreground app's package name or category.
This CL adds:
- A BrightnessCorrection class,
- A mapping of package names and categories to brightness corrections
  in the BrightnessConfiguration,
- Tracking of the foreground app's package name and category in the
  AutomaticBrightnessController,
- Brightness correction depending on the foreground app's package
  name and category in the BrightnessMappingStrategy.

Test: manual - force turbo app to learn brightness preferences for
      specific packages/categories and see that they are applied.

      To make sure package/category switches are handled correctly,
      you can actually hardcode corrections and simulate edge cases
      such as rapid switches, multiple windows, etc.

Fixes: 111425369

Change-Id: Ic9516c75dbf63ea21f0ae780f9c35e8c85dbbe5b
2018-12-18 16:21:43 +00:00
Michael Groover
f1a5b6e0bf Merge changes from topic "SensorPrivacyMode"
* changes:
  Add SensorPrivacy constants to SettingsBackupTest
  Prototype Spaceship mode qstile
2018-12-15 18:07:26 +00:00
Chad Brubaker
90f391fe87 Prototype Spaceship mode qstile
Initial prototype disabling location/sensors and enabling airplane mode.
Camera/Mic will come in a followup.

Test: manual
Bug: 110842805
Change-Id: I26132fcc9ffea83e3e78a0e54882d23c99ee590c
2018-12-14 20:46:04 +00:00
Emilian Peev
3be63a3f65 Camera: Implement legacy device stream combination query
Use the legacy stream configuration logic to check for
support of a given session configuration.

Bug: 111593096
Test:
runtest -x
cts/tests/camera/src/android/hardware/camera2/cts/MultiViewTest.java
runtest -x
cts/tests/camera/src/android/hardware/camera2/cts/RobustnessTest.java -m
testMandatoryOutputCombinations
runtest -x
cts/tests/camera/src/android/hardware/camera2/cts/RobustnessTest.java -m
testBadSurfaceDimensions
runtest -x
cts/tests/camera/src/android/hardware/camera2/cts/RobustnessTest.java -m
testMandatoryReprocessConfigurations
runtest -x
cts/tests/camera/src/android/hardware/camera2/cts/SurfaceViewPreviewTest.java
-m testDeferredSurfaces

Change-Id: I921f94be8212a55fa90150cb35ea06e488dc0b29
2018-12-13 15:05:38 +00:00
Emilian Peev
275da0ba0d Camera: Add reprocessable mandatory stream combinations
Mandatory reprocessable stream combinations must include
at least one input stream and one ZSL output with the same
format and size.

Bug: 111593096
Test: Camera CTS
Change-Id: I4bdfb8b540ccce583b01ea200d8c7e252dd72b12
2018-12-13 15:05:38 +00:00
Emilian Peev
423cbd7107 Camera: Add support for mandatory stream combinations
Generate static mandatory stream combinations according
to the camera device capabilities.

Bug: 111593096
Test: Camera CTS
Change-Id: I18014575090baa61785f213afded46a857928bc8
2018-12-13 15:05:27 +00:00
TreeHugger Robot
c4b8527dcd Merge "Update framework together with HIDL for accessibility" 2018-12-12 20:07:40 +00:00
Kevin DuBois
3ec307b262 Merge "DisplayManager: Add color sampling hardware query" 2018-12-12 15:27:01 +00:00
Kevin Chyn
1f16c2db3c Update framework together with HIDL for accessibility
Bug: 120578823

Test: Builds
Change-Id: Idbd097bbf9d5c08dbab614d5f30ec66631b6b0f5
2018-12-11 19:48:15 -08:00
Kevin DuBois
bf76b11bd2 DisplayManager: Add color sampling hardware query
Add calls to SurfaceControl JNI interface that allow
the DisplayManager to drive color histogram functionality.

Fixes: 112756444

Test: Boot
Test: additional test in 'atest FrameworksServicesTests:DisplayManagerServiceTest'
Change-Id: Ifa46dab53b09db62da79ad82e9687d9155ddc6da
2018-12-10 16:52:26 -08:00
TreeHugger Robot
b78f929508 Merge "Reset lockout using BiometricManager" 2018-12-07 06:00:57 +00:00
Kevin Chyn
6adb3a1d24 Reset lockout using BiometricManager
Bug: 120572933

Test: lockout count is reset when pin/pattern/pass is confirmed

Change-Id: I64389dea38636cc6d4e3f4946a8098d625b489df
2018-12-06 19:46:42 -08:00
TreeHugger Robot
3a6306d4e4 Merge "Camera: Add support for SessionConfiguration queries" 2018-12-06 12:33:31 +00:00
Denis Hsu
ec3c656cd6 Merge "Catch egl errors when drawIntoSurfaces" am: 7604961e1d am: 3bfa2ca8ea
am: 8721af8b15

Change-Id: I5c37f68e07bdd9bd9a9febf99b18893fde4ab8ac
2018-12-06 00:42:18 -08:00
Denis Hsu
8721af8b15 Merge "Catch egl errors when drawIntoSurfaces" am: 7604961e1d
am: 3bfa2ca8ea

Change-Id: Ia44f88a6924aaf3f58661783b797f1d64da2f5ad
2018-12-06 00:26:51 -08:00
Christine Franks
ca1fd658ed Merge "Add IColorDisplayManager" 2018-12-05 16:29:51 +00:00
TreeHugger Robot
d2bc0b875e Merge "Camera: Extend recommended stream configurations annotations" 2018-12-05 10:10:27 +00:00
Kevin Chyn
3d9b0fc963 Merge changes from topic "biometric-refactor"
* changes:
  3/n: For passive modalities, add plumbing for "try again"
  2/n: Multi-modal support for BiometricPrompt
  1/n: Move BiometricDialog management to BiometricService
2018-12-01 05:04:02 +00:00
Kevin Chyn
23289ef7b6 3/n: For passive modalities, add plumbing for "try again"
When "try again" is showing, authentication is canceled internally.
BiometricService caches the client's info so that authentication can
be restarted when "try again" is pressed. Because authentication
is not running when "try again" is showing, BiometricService also needs
to have a TaskStackListener so that BP can be dismissed and an error can
be sent to the client when the app loses focus.

IBiometricServiceReceiver has been split into two. One for BiometricPrompt
to receive messages from BiometricService, and another for BiometricService
to receive messages from SystemUI/<Biometric>Services.

When we get locked out, don't send the last onAuthenticationFailed
to the client, since "Authentication failed" will be shown briefly
and be replaced by "Device locked out" which is janky

Bug: 111461540

Test: Tested with requireConfirmation enabled/disabled
Test: Tested onConfigurationChange corner cases, e.g. when "try again"
      or "confirm" buttons are showing, rotate the device. Buttons
      persist correctly and don't appear when unexpected
Test: Tested task stack corner cases, e.g. when "try again" is showing,
      press home button. BP dismisses and client receives ERROR_CANCELED
Test: BiometricPromptDemo receives all callbacks

Change-Id: I62126708ce8db8b358c666a07aa7c39607642c9d
2018-11-30 11:34:35 -08:00
TreeHugger Robot
c4a8c6d7c2 Merge "Add physical port to DisplayViewport" 2018-11-30 01:49:43 +00:00
Siarhei Vishniakou
15a412d2c2 Add physical port to DisplayViewport
DisplayViewport now contains the information about the physical port
that the corresponding display is connected to (for example, HDMI1,
HDMI2, etc).
This information is needed in order to determine which input device is
associated with which display.

Add a new config file to vendor directory that will contain the actual
associations.

Bug: 116239493
Test: atest ConfigurationProcessorTest
Change-Id: I679203747753803e9635a4eaf74287ce7e69dc3f
2018-11-29 15:34:48 +08:00
Christine Franks
39b0311db8 Add IColorDisplayManager
- Add IColorDisplayManager
- Add CONTROL_DISPLAY_COLOR_TRANSFORMS permission

Bug: 111215474
Test: atest FrameworksServicesTest:ColorDisplayServiceTest
Change-Id: Ia8182ccc80c1733f00c62b136e7950e2d2092d75
2018-11-28 17:21:30 -08:00
Vishnu Nair
e86bd98a8b WM: Removes setSize from buffer-less surfaces
- Make a better distinction between surface bounds and buffer size by renaming setSize to
  setBufferSize and removing setSize for all buffer-less surfaces.
- Adds an error check in SurfaceControl to ensure buffer size is only set for buffer-less surfaces.
- Updates color fade surface to use passed in transaction object.

Bug:114413815
Test: go/wm-smoke
Test: atest FrameworksServicesTests:DimmerTests
Test: atest FrameworksServicesTests:SurfaceAnimatorTest
Change-Id: I88bd1452d6b3b3009e73e26986027d6a5a9efebc
2018-11-28 14:24:03 -08:00
Kevin Chyn
87f257a9e5 2/n: Multi-modal support for BiometricPrompt
Part 2 of decoupling BiometricDialog lifecycle from AuthenticationClient
lifecycle. This change introduces cookies which are used to keep track
of clients within BiometricService and <Biometric>Services. This allows

1) Much easier support for BiometricPrompt to authenticate using more than
   one modality
2) Much easier to support "continue" button on BiometricPrompt for passive
   modalities, which should be pressed before authentication continues

Bug: 111461540

Test: BiometricPromptDemo works, error messages are propagated to clients
Test: Keyguard/Settings smoke test
Test: ConfirmDeviceCredentials works

Change-Id: Iaa246488fb027c3397a3191841524b389145b281
2018-11-28 13:01:29 -08:00
Kevin Chyn
e92cdae277 1/n: Move BiometricDialog management to BiometricService
The BiometricDialog management was done in AuthenticationClient, but
this is not great for the following reasons
1) The dialog lifecycle should not be 1:1 tied to the client monitor,
   since this restricts flexibility
2) Devices with multiple biometrics implemented on BiometricDialog
   will require extra work. Moving the dialog management up one layer
   should solve this limitation

BiometricService now sends both its own receiver and the client's receiver
to the appropriate <Biometric>Service. When the client is actually started
by the <Biometric>Service, it will forward the client's (BiometricPrompt's)
receiver to BiometricService. Lifecycle management is currently still in
<Biometric>Service since the platform still uses <Biometric>Service
directly. AuthenticationClient for BP is now started with the wrapper
receiver, which allows BiometricService to handle messages before deciding
if it should forward the message to the client.

Moving lifecycle management to BiometricService is currently not a great
idea since framework doesn't always go through BiometricService.

Also merged IBiometricPromptReceiver with IBiometricServiceReceiver

Bug: 111461540

Test: Negative button works (error received by demo app)
Test: Cancelling via back or tapping gray area works (error received
      by demo app), and hardware is no longer authenticating
Test: Dismissing BP via negative button or gray area returns only a single
      error and is not followed by ERROR_CANCELED (as expected)
Test: Error messages are delayed when BP is showing, not delayed
      when BP is not showing (pre-auth check errors e.g. no hardware)
Test: Lockout works
Test: Lockout counter resets upon successful auth
Test: Keys are unlocked properly for both implicit and explicit modes

TODO: Figure out multi-modal BiometricService / <Biometric>Service
      synchronization. Likely we keep the bundle in BiometricService
      and send random numbers (identifier) to <Biometric>Service. When
      each <Biometric>Service is ready, it should return the number. Once
      BiometricService receives all identifiers, it can then notify
      all <Biometric>Service to start authenticating.

Change-Id: I2b6fa57ed3c3cbccc7b0be30279f80fa46a8e917
2018-11-27 16:26:19 -08:00
Arthur Ishiguro
edf1e0fc13 Expose Context Hub Service PendingIntent APIs
Exposes APIs related to new PendingIntent-based APIs of
ContextHubManager, allowing the creation of persistent
ContextHubClients.

Bug: 117612105
Test: Compile only
Change-Id: Iaddbc4685285ffa8186b867def21fbbff370756c
2018-11-27 13:11:00 -08:00
Emilian Peev
ae4a341fd6 Camera: Extend recommended stream configurations annotations
Add any missing annotations to the public interface
as per API guidelines.

Bug: 120072446
Test: Camera CTS
Change-Id: I802635d9caafb0f76377ee094cf605f24288a566
2018-11-27 17:05:40 +00:00
Denis Hsu
87433cd1a0 Catch egl errors when drawIntoSurfaces
Cts test case: testAbandonRepeatingRequestSurface is
used to test the GPU for the ability of detecting the
interrupt release of surface. It may have a dequeue buffer
action in eglMakeCurrent, so it would return error
"EGL_BAD_NATIVE_WINDOW" after surfaceflinger has been
disconnected. In this case, the test can be passed
only when we catch the errors thrown from GPU when calling
eglMakeCurrent, or the test would be interrupted by
the error exception.

Bug: 72750260
Test: manual, ran the cts test case
android.hardware.camera2.cts.RobustnessTest#testAbandonRepeatingRequestSurface
Change-Id: I79bacdd3c0382a79786f8eb689eb4f89c830ddcc
2018-11-22 12:05:43 +08:00
Emilian Peev
277de1733b Camera: Add support for SessionConfiguration queries
Camera clients must be able to query and ensure that
a specific "SessionConfiguration" is supported at
camera runtime. The queries must run significantly
faster than creating a capture session and should
be without any SW or HW side effects.

Bug: 111593096
Test: Camera CTS
Change-Id: I49149519164f1e74f2c0539872cc5065cc606ef6
2018-11-20 10:34:08 +00:00
TreeHugger Robot
4c9e89671b Merge "Reorders arguments in Context Hub Service methods" 2018-11-19 19:12:36 +00:00
Arthur Ishiguro
793d3d1801 Reorders arguments in Context Hub Service methods
No functional change, just reordering things in internal methods to be
consistent with the API definition. Also fixes stale javadoc.

Bug: 117612105
Test: Compile only
Change-Id: I455d3d5c8f1d5077dbacfa96ad1c71da27559b8e
2018-11-19 09:31:14 -08:00
Arthur Ishiguro
1c37adbb8e Updates ContextHubIntentEvent documentation
Updates the javadocs to the recent changes in the API.

Bug: 117612105
Test: None
Change-Id: I50c673353ef3c636d1cf17aad65b00ba44267472
2018-11-16 14:43:15 -08:00
TreeHugger Robot
9bab49758a Merge "Implements equals methods in Context Hub classes" 2018-11-16 22:08:41 +00:00
Arthur Ishiguro
1eef69f9cc Implements equals methods in Context Hub classes
Bug: 117612105
Test: Compile, sanity check
Change-Id: Icea345dc194c72eabc1c27b23fa6235544eeaca4
2018-11-16 10:31:11 -08:00