Commit Graph

2532 Commits

Author SHA1 Message Date
Peeyush Agarwal
8c2006d502 Follow up to ambient brightness stats change
- Add docs to public methods of the API
- Use single variable for scheduling write from brightness tracker

Test: atest com.android.server.display.AmbientBrightnessStatsTrackerTest
&& atest android.hardware.display.AmbientBrightnessDayStatsTest
Bug: 69406079
Change-Id: I828e3bde4691240a2c0e0443e60b30665b65b8de
2018-02-09 16:20:18 +00:00
TreeHugger Robot
c437b8ecde Merge "Camera2: Add API to expose all physical camera metadata" 2018-02-06 02:47:40 +00:00
TreeHugger Robot
62d8fc2594 Merge "camera: Extend the multiple capture request requirements" 2018-02-05 21:13:21 +00:00
TreeHugger Robot
39d080503e Merge "Dump usb as DualDump" 2018-02-03 02:56:30 +00:00
Jeff Sharkey
ad357d1839 Pass in the user defined by Context.
The majority of Manager-style classes already use Context.getUserId()
when making calls into the OS, so clean up the remaining callers to
unify behind this strategy.

This gives @SystemApi developers a nice clean interface to interact
across user boundaries, instead of manually adding "AsUser" or
"ForUser" method variants, which would quickly become unsustainable.

Test: builds, boots
Bug: 72863821
Exempt-From-Owner-Approval: trivial changes
Change-Id: Ib772ec4438e57a2ad4950821b9432f9842998451
2018-02-03 02:11:45 +00:00
Philip P. Moltmann
371a3b879b Dump usb as DualDump
This allows to dump the USB state as proto-buf. This in turn allows to
automatically process this data.

Test: adb shell dumpsys usb
      incident_report usb
      No automated test possible as no field is guaranteed to be set
Change-Id: Ifdf22bfaf9c78226c420b11c43278013ce69f849
2018-02-02 16:40:26 -08:00
TreeHugger Robot
703ab4dfc0 Merge "Implement front-end API to retrieve DAB frequency table." 2018-02-02 19:59:22 +00:00
Shuzhen Wang
2d5bbe4b6f Camera2: Add API to expose all physical camera metadata
Give the app ability to query all the physical camera's physical
metadata within TotalCaptureResult.

With this new API, getPhysicalCameraKey becomes redundant.

Test: Camera ITS for logical multi-camera
Bug: 66697407
Change-Id: I4a0cbc81bef705e870f7e4ec79dc3481f9e87ae6
2018-02-02 11:21:03 -08:00
TreeHugger Robot
940384bf41 Merge changes from topic "biometric-fingerprint"
* changes:
  Deprecate FingerprintManager APIs
  Remove FingerprintManager dependencies from FingerprintDialog
2018-02-02 08:26:09 +00:00
Kevin Chyn
ff548a614b Deprecate FingerprintManager APIs
Bug: 72519498

Test: builds
Change-Id: I61363b68fc048529e17bffb49e9bf345d3ba4dcf
2018-02-01 19:32:55 -08:00
Kevin Chyn
6668256128 Remove FingerprintManager dependencies from FingerprintDialog
This change also adds the BiometricAuthenticator interface for the future
BiometricManager

Fixes: 72529467

Test: FingerprintDialog, FingerprintSystemDialog apks
Test: CTS Verifier apk

Change-Id: I703d004a3aebcbc473329d531505ffb647b91950
2018-02-01 18:28:35 -08:00
Peeyush Agarwal
e3a08ab5e1 Make ambient brightness day stats a system API
Test: atest android.hardware.display.AmbientBrightnessDayStatsTest
Bug: 69406079
Change-Id: I83f476f22a2100d324862cbea2a139eababa9d4e
2018-02-01 17:48:42 +00:00
TreeHugger Robot
9d3986bdc3 Merge "Add Ambient Brightness tracker API" 2018-02-01 12:15:15 +00:00
TreeHugger Robot
3d67f4a039 Merge "Add information about brightness config to slider events." 2018-02-01 10:37:30 +00:00
Jerry Zhang
327b809ad1 Refactor and clean up USB, add tests
Change UsbManager apis to use long instead of string, to match
usb hal. Change UsbDeviceManager internals to match as well.

Remove isFunctionEnabled and add getEnabledFunctions. Callers
would often call isFunctionEnabled for every possible function
to get the list of functions, so getEnabledFunctions reduces the
number of aidl calls.

Separate out dependencies between UsbHandler and UsbDeviceManager
and staticize the UsbHandler classes. Add unit tests with
mocked out dependencies to test state transitions for UsbHandler.

Bug: 62876645
Test: atest UsbTests
Change-Id: I785c4c24121a70e725de9742c6af50a6bf1baea0
2018-01-31 11:40:48 -08:00
TreeHugger Robot
f6659f9613 Merge "Camera: "getMaxSharedSurfaceCount" should be non-static" 2018-01-31 16:00:47 +00:00
Peeyush Agarwal
cc155ddc69 Add Ambient Brightness tracker API
Test: atest com.android.server.display.AmbientBrightnessStatsTrackerTest
&& atest android.hardware.display.AmbientBrightnessDayStatsTest
Bug: 69406079
Change-Id: I4b13c6bdd3e9fdded8086371f46dba0fd3102b98
2018-01-31 11:01:56 +00:00
Emilian Peev
09a02c3094 camera: Extend the multiple capture request requirements
Additional requirements need to be met before submitting
individual physical camera capture requests. Describe the
specific details in the java docs.

Bug: 72524603
Test: Successful build
Change-Id: Ic8d37ab05a3ccd3b4b07a34824f421a71ca69ba0
2018-01-31 10:57:00 +00:00
Kenny Guy
53d0661f38 Add information about brightness config to slider events.
Whether the config is using the default curve.
Whether the config has a user data point.
Whether the config has a power save offset.

Bug: 72482479
Test: atest BrightnessTrackerTest
Change-Id: I137a919ae2604244b0b2f78e00e31b7a72df4967
2018-01-30 18:38:40 +00:00
Jon Dormody
93c4aca119 Merge "Docs: Added a link to the Motion Sensor docs for information on gravity values and calculating alpha. Test: make ds-docs Bug: 6442659" into oc-mr1-dev am: 04d261f309
am: 0762440a7a

Change-Id: I70244cbf5790189959373d1e71ac18a988a399be
2018-01-29 19:48:52 +00:00
Jon Dormody
0762440a7a Merge "Docs: Added a link to the Motion Sensor docs for information on gravity values and calculating alpha. Test: make ds-docs Bug: 6442659" into oc-mr1-dev
am: 04d261f309

Change-Id: I15d0773c820591f153c67382b8826131eb88f98a
2018-01-29 19:34:59 +00:00
Emilian Peev
31c11a05a4 Camera: "getMaxSharedSurfaceCount" should be non-static
Allow for more flexiblity in case the maximum shared
supported shared surface count changes in the future.

Bug: 72562887
Test: Camera CTS
Change-Id: If3be8659c05997502368f51a14152a4516a9f159
2018-01-29 17:02:56 +00:00
Jonathan Dormody
69151702b4 Docs: Added a link to the Motion Sensor docs for information on gravity
values and calculating alpha.
Test: make ds-docs
Bug: 6442659

Change-Id: Ifbb58526d01894c4c7570596348a8bd3e5c9eb4f
2018-01-26 15:21:23 -07:00
TreeHugger Robot
0193e5651f Merge "Add setting to control vibration intensity." 2018-01-26 00:09:09 +00:00
TreeHugger Robot
c86a420c6e Merge "Finish broadcast radio HAL 2.0 radio service." 2018-01-25 17:49:26 +00:00
Tomasz Wasilczyk
58f34065c5 Implement front-end API to retrieve DAB frequency table.
Bug: 69958423
Test: instrumentation (none added)
Change-Id: I7e648f988baf3b14d814588d44b18fd57c108906
2018-01-25 09:07:26 -08:00
Shuzhen Wang
68dcd18392 Merge "camera2: Add physical camera id in CaptureResult" 2018-01-25 15:52:45 +00:00
Michael Wright
35a0c676ee Add setting to control vibration intensity.
This patch adds two distinct vibration control settings: one for
notifications and ringtones, and one for haptic feedback. Since we don't
always have the exact intent of a given vibration, VibratorService will
do its best to classify each VibrationEffect into one of these two
categories and then scale the vibration accordingly based on the
intensity setting.

Bug: 64185329
Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.cts.VibratorTest
      cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.cts.VibrationEffectTest
Change-Id: If16237f4782281aaab33e4a0f55c29f1a30ac493
2018-01-24 23:39:57 +00:00
TreeHugger Robot
8b4e2ddc41 Merge "Slider always represents absolute brightness" 2018-01-24 21:45:07 +00:00
TreeHugger Robot
ff73b83831 Merge changes Ia3065eb5,I602e8bb0
* changes:
  Update ProgramInfo to match HAL 2.0 changes.
  Implement front-end APIs for announcements.
2018-01-24 19:00:39 +00:00
Michael Wright
d846023804 Slider always represents absolute brightness
Currently the slider represents a gamma adjustment to the brightness
curve when auto brightness is enabled and the absolute screen brightness
when it's not. This is a fairly confusing behavior to most people, so
this consolidates them to a single behavior: the slider always
represents the current brightness and auto-brightness will automatically
adjust it.

This also moves a bunch of the brightness methods from PowerManager over
to DisplayManager, since it's really the DisplayPowerController that's
responsible for determining and setting the display brightness.

Test: atest com.android.server.display.BrightnessMappingStrategyTest
Bug: 69406898
Change-Id: I73b5982809a94cd50d563426a72d7965e923c994
2018-01-24 15:55:05 +00:00
Kevin Chyn
e8f3e1bf29 Minor cleanup for FingerprintDialog
Bug: 67497360

Test: Manual test with test app
Change-Id: I72b4502da411ee92491d6884d6deb72e027a8e9e
2018-01-23 18:10:12 -08:00
Kevin Chyn
aae4a15a22 Add FingerprintDialog API and related plumbing
This commit adds the plumbing which sends the signals from the API
to the component in SysUI. The dialog will be implemented in another
CL in this topic.

Bug: 67497360

Test: Modify Settings to use the new API
Test: FingerprintDialogImpl is able to notify FingerprintDialog clients
      of user events
Test: System dialog is dismissed when client application is killed
      unexpectedly
Test: Open FP settings, lock device, authenticate, authenticate. Repeat

Change-Id: Id28ec9691646bed765dc069cceb4678d9f6db92e
2018-01-23 14:54:48 -08:00
Shuzhen Wang
0960fb462b camera2: Add physical camera id in CaptureResult
- Add physical camera id in capture result.
- Add ability for app to get metadata key/value for physical camera.
- Batch physical and logical camera result within one processCaptureResult call.

Test: testLogicalCamera CTS test
Bug: 64691172
Change-Id: Ic67275aa5b44cbcad7ef98409e4365ee08989736
2018-01-23 08:10:10 -08:00
TreeHugger Robot
3bc6f794e6 Merge "camera: Modify AF scene change" 2018-01-23 03:03:31 +00:00
Yin-Chia Yeh
2d3cae80d9 Merge "Camera: remove NOT_PRESENT cameras" am: 174df238ac am: 0e32a62cd4
am: 75774be569

Change-Id: I71a313e35f20c51403227523060914495e67c3bc
2018-01-23 02:52:15 +00:00
Yin-Chia Yeh
75774be569 Merge "Camera: remove NOT_PRESENT cameras" am: 174df238ac
am: 0e32a62cd4

Change-Id: I5b2d1d756daf1fabd8d42b9161de6a63d8989302
2018-01-23 02:35:28 +00:00
Yin-Chia Yeh
0e32a62cd4 Merge "Camera: remove NOT_PRESENT cameras"
am: 174df238ac

Change-Id: I2c0dd5ccd8c8a165b568563051ad42dba6082792
2018-01-23 02:12:57 +00:00
Shuzhen Wang
98da482eca Merge "camera: Add support for multiple camera capture requests" 2018-01-23 00:36:16 +00:00
TreeHugger Robot
58d241ce54 Merge "camera: Add OIS data keys" 2018-01-22 23:22:30 +00:00
Tomasz Wasilczyk
3b4465e656 Finish broadcast radio HAL 2.0 radio service.
Instrumentation tests are now passing.

Bug: 69958777
Test: instrumentation
Change-Id: I0cabd6bf4565fc51208fddd18fb6f42337755382
2018-01-22 13:43:13 -08:00
Tomasz Wasilczyk
eab3e55096 Update ProgramInfo to match HAL 2.0 changes.
Bug: 70939328
Bug: 69958777
Test: instrumentation (none added)
Change-Id: Ia3065eb5f9fdd881d0eac603dd0c79b23b712be5
2018-01-22 13:43:13 -08:00
Tomasz Wasilczyk
f151a7b337 Implement front-end APIs for announcements.
Bug: 68045105
Test: instrumentation (none added)
Change-Id: I602e8bb0c40516a732d606f745c8f7721583155f
2018-01-22 13:36:44 -08:00
Shuzhen Wang
e322374217 Merge "camera2: Add support for logical camera" 2018-01-22 20:30:15 +00:00
Yin-Chia Yeh
0c9f1e5ff5 Merge "Camera: codegen spec update" 2018-01-22 19:55:20 +00:00
Emilian Peev
2100ae7d2b camera: Add support for multiple camera capture requests
Camera capture requests need an extension to support multiple
physical cameras. Clients should be able to include the list
of additional physical camera ids as part of the request builder
call and then be able to modify them individually.

Test: Manual using camera application,
Camera CTS
Bug: 64691172

Change-Id: I280cb24b41076a2fb5603e91db30f060f7b53456
2018-01-21 16:27:59 -08:00
Shuzhen Wang
23d2938f22 camera2: Add support for logical camera
- Add physicalCameraId in OutputConfiguration
- Add static metadata for logical camera

Test: LogicalCameraDeviceTest CTS test
Bug: 64691172
Change-Id: I1b3ea005796d07e361cc3d1b04aa6e5ca26643f4
2018-01-21 16:26:11 -08:00
Svet Ganov
82f09bcf93 No camera for idle uids - framework
If a UID is idle (being in the background for more than
cartain amount of time) it should not be able to use the
camera. If the UID becomes idle we generate an eror and
close the cameras for this UID. If an app in an idle UID
tries to use the camera we immediately generate an error.
Since apps already should handle these errors it is safe
to apply this policy to all apps to protect user privacy.

Test: Pass - cts-tradefed run cts -m CtsCameraTestCases
      Added - CameraTest#testCameraAccessForIdleUid

Change-Id: If6ad1662f2af6592b6aca1aeee4bd481389b5e00
2018-01-21 02:55:49 -08:00
TreeHugger Robot
d931b34944 Merge "Add new HardwareBuffer usages and formats." 2018-01-20 16:42:51 +00:00
Chien-Yu Chen
5f9da396ac camera: Modify AF scene change
Allow DETECT in all AF modes.

Test: CTS
Bug: 64847201
Change-Id: I278016b502d17d3b9c6fd91cf2baadb405dd2dff
2018-01-19 18:55:36 -08:00