Commit Graph

4103 Commits

Author SHA1 Message Date
Treehugger Robot
30ab518467 Merge "HDMICEC: Override hashCode in HdmiDeviceInfo" am: 1d59ab8486 am: 76f22955a6 am: 8bee663c01
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1460262

Change-Id: Ic457b69bdd32bc932aa1266c556ffe7ccdb5c21e
2020-12-02 01:44:41 +00:00
Treehugger Robot
8bee663c01 Merge "HDMICEC: Override hashCode in HdmiDeviceInfo" am: 1d59ab8486 am: 76f22955a6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1460262

Change-Id: I45b89565e6375c9231de0e36698fd025ab317d13
2020-12-02 01:35:34 +00:00
Eino-Ville Talvala
686d7aa0d8 Fix up some camera API javadocs am: 66a993beeb am: 804134ab87 am: bfa0ffbb9f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13061797

Change-Id: Ia7c1e4c1ba0a926681148cf6c5e10e769c5bb4a9
2020-12-01 22:53:16 +00:00
Eino-Ville Talvala
bfa0ffbb9f Fix up some camera API javadocs am: 66a993beeb am: 804134ab87
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13061797

Change-Id: I26aa22702b35761b2ec43e11369514aef80ce663
2020-12-01 22:37:40 +00:00
Eino-Ville Talvala
804134ab87 Fix up some camera API javadocs am: 66a993beeb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13061797

Change-Id: Iaa8732c416f259b2bcf12733bd7afd1f707e0639
2020-12-01 22:24:13 +00:00
TreeHugger Robot
a01f750588 Merge changes from topic "r3_flicker_master"
* changes:
  Allow DeviceConfig to change display settings for high zone
  Set fixed fps when ambient or display brightness is high
2020-12-01 03:32:49 +00:00
Michael Wright
579350903c Allow DeviceConfig to change display settings for high zone
Allow DeviceConfig to change the high zone behavior including
refresh rate and brightness thresholds.

Bug: 166581675
Test: atest DisplayModeDirectorTest
Test: adb shell device_config put display_manager refresh_rate_in_high_zone "90"
Test: adb shell device_config put display_manager fixed_refresh_rate_high_display_brightness_thresholds "200"
Test: adb shell device_config put display_manager fixed_refresh_rate_high_ambient_brightness_thresholds "8000"
Change-Id: I2ac8d95f976748d03f6dc2e60725e9ef1213ed6f
2020-11-30 18:39:21 +08:00
Lais Andrade
e320282bba Extract input device vibrators code from VibratorService
This code will also be migrated to VibratorManagerService, to give
preference to input devices over the devices vibrators when the user
setting enables it.

This need to remain a server-side code so permissions/setting will be
applied to system vibrations even when they are redirected to input
devices (including vibration scaling).

Bug: 167946816
Bug: 131311651
Test: atest FrameworksServiceTests:VibratorServiceTest
      atest FrameworksServiceTests:InputDeviceVibratorsTest
Change-Id: I6c61c3f20e4d82d44af136917d3755d9f6edd31f
2020-11-25 14:35:35 +00:00
Ady Abraham
d90ac7139c Merge "Handle DISPLAY_EVENT_FRAME_RATE_OVERRIDE" 2020-11-23 23:20:48 +00:00
Ady Abraham
15d23d83a7 Handle DISPLAY_EVENT_FRAME_RATE_OVERRIDE
When getting DISPLAY_EVENT_FRAME_RATE_OVERRIDE from SurfaceFlinger,
expose the overridden frame rate to the relevant application
if the current refresh rate allows that.

Bug: 169271059
Bug: 169271062
Bug: 170503758
Test: manual test using SF backdoor
adb shell service call SurfaceFlinger 1039 i32 <uid> f <refresh rate>

Change-Id: I6ae1a98e6ca13e9d3d095a5713a6b0ca99652256
2020-11-23 20:02:48 +00:00
Venkatarama NG. Avadhani
61e6793d24 HDMICEC: Override hashCode in HdmiDeviceInfo
Adds hashCode override and equals test for the class.

Bug: 168713324
Test: atest HdmiDeviceInfoTest
Change-Id: I77f7a4da113785573718a16895a988de7fff6b0b
2020-11-23 09:49:52 +05:30
Kevin Chyn
fdf810a455 Update framework for fingerprint and multi-biometric CTS
Bug: 173453845
Test: atest CtsBiometricsTestCases

Change-Id: I9d43f362570a2b610af7bfb07c112e0904acc8f4
2020-11-20 17:53:36 -08:00
TreeHugger Robot
1c1acd45d0 Merge "Camera: Enhance camera atoms for system health" 2020-11-19 18:22:50 +00:00
TreeHugger Robot
8faa09f68f Merge "Source device to toggle and follow TV power" 2020-11-19 16:13:44 +00:00
Sean Stout
7790b73220 Implement Phase 5 of Separate Power States
DisplayPowerRequestManager listens for the addition, removal, and change
of Displays and will appropriately create DisplayPowerRequests to manage
their power states.

At this stage the DisplayPowerRequests are simply created; only the
DisplayPowerRequest associated with the default display is interacted
with.

Test: manual
Bug: 138328918
Change-Id: I03f0c95aa23fc711d8d66150f315eed52bc57b2c
2020-11-18 22:38:09 -08:00
Shuzhen Wang
b2443990e9 Camera: Enhance camera atoms for system health
Introduce camera system health atoms, including:
- Camera open, close, and session creation time
- Camera session and stream combination information,
- Stream statistics:
  - stream width, height, format, dataspace, usage flag,
  - max buffer count
  - buffer loss
  - first frame latency.

Test: ./out/host/linux-x86/bin/statsd_testdrive 227
Test: CTS PerformanceTest
Bug: 154159000
Change-Id: I858d64f3324bb9652a59e5857f2730c92c616a8e
2020-11-18 09:49:17 -08:00
Kevin Chyn
ed128abf43 Merge "Add sensorId to IFingerprintService#authenticate" 2020-11-17 19:26:11 +00:00
Nathalie Le Clair
6815a7ce80 Source device to toggle and follow TV power
For source devices, toggleAndFollowTvPower() will result in
1. Toggling of the HDMI-connected display (=TV) power state over CEC
2. The source device following the TV power state

Bug: 167962015
Test: atest HdmiCecLocalDevicePlaybackTest

Change-Id: I1881c279143075629e590501de82fadc3e1d56d6
2020-11-17 14:01:38 +01:00
Kevin Chyn
8fa1280e2d Add sensorId to IFingerprintService#authenticate
Adds permission-protected sensorId parameter for internal clients.

Fixes: 173046031
Test: atest KeyguardUpdateMonitorTest
Change-Id: I5ccea9f55ae0d541fc381a24549695b32b797ef6
2020-11-16 16:12:10 -08:00
Aurimas Liutikas
59d98a07a9 Merge "Remove legacy style metalava suppression" am: e1bb600fc7 am: 66574f225e am: 1c505e8cda
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1421698

Change-Id: Ib1b078a6e6c6e19391277d19c0f8d748eee6300b
2020-11-16 21:40:21 +00:00
Aurimas Liutikas
1c505e8cda Merge "Remove legacy style metalava suppression" am: e1bb600fc7 am: 66574f225e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1421698

Change-Id: Idd656e3803c247b03808259c582599898c064b27
2020-11-16 21:13:46 +00:00
Kevin Chyn
b55a8d49e9 Merge changes from topic "biometricservice-cts"
* changes:
  Initial implementation of BiometricManager TestApis
  Add BiometricManager#getUiPackage TestApi
2020-11-16 18:50:24 +00:00
Aurimas Liutikas
e1bb600fc7 Merge "Remove legacy style metalava suppression" 2020-11-16 17:40:07 +00:00
TreeHugger Robot
baf630d362 Merge changes from topic "USB-GADGET-HAL-v1.2"
* changes:
  Add methods for Usb Gadget Hal v1.2
  Support USB Gadget V1.2 HAL
2020-11-16 10:43:46 +00:00
Eino-Ville Talvala
66a993beeb Fix up some camera API javadocs
Test: m offline-sdk-docs
Bug: 173204437
Change-Id: If333d6fd5023d0bc5d778437d1745dcd209ccbd9
Merged-In: If333d6fd5023d0bc5d778437d1745dcd209ccbd9
2020-11-15 23:58:33 +00:00
TreeHugger Robot
886277e4d0 Merge "Fix up some camera API javadocs" 2020-11-14 06:37:43 +00:00
Kevin Chyn
3eb5c9c2d7 Initial implementation of BiometricManager TestApis
1) Finishes Face10 test implementation

2) Adds createTestSession and getSensorProperties to
   IBiometricAuthenticator. This way, BiometricService, which
   is the source of truth for all sensors is able to implement or
   forward TestApi requests as appropriate.

3) Removes a few unused parameters (callingUid, callingPid,
   callingUserId)

4) Moves proto def to a biometric proto. This is basically the
   common TestApi equivalent for getting states of _any_ sensor
   service (FingerprintService, FaceService, etc)

5) Moves AuthSession states to biometric.proto

6) Updates SysUI components to use separate positive buttons
   for better readability and testing

Bug: 171357779
Test: atest CtsBiometricsTestCases on fingerprint/face devices
Test: atest com.android.server.biometrics

Change-Id: I5d884d4a9f4afa3f947eb4587e869bacd6b2f805
2020-11-13 20:05:16 -08:00
Eino-Ville Talvala
5671dcdfb6 Fix up some camera API javadocs
Test: m offline-sdk-docs
Bug: 173204437
Change-Id: If333d6fd5023d0bc5d778437d1745dcd209ccbd9
2020-11-13 17:51:02 -08:00
Kevin Chyn
ef4cd62246 Add BiometricManager#getUiPackage TestApi
Bug: 171357779
Test: atest CtsBiometricsTestCases
Change-Id: I3847c7bf63260ebef8436704826af37e15f2da92
2020-11-13 17:50:12 -08:00
Kevin Chyn
1baf2aa687 Merge changes I77ed66b3,Iaedc26c5
* changes:
  Un-overload Biometric UI negative button
  Start UDFPS sensors only after BiometricPrompt UI is showing
2020-11-14 01:39:49 +00:00
Kevin Chyn
bf80ecae16 Start UDFPS sensors only after BiometricPrompt UI is showing
Since UDFPS sensors have a UI affordance, and the affordance is
controlled by FingerprintAuthenticationClient, start the prepared
sensor only after the BiometricPrompt dialog is done animating.

Plumbing-wise, adds:
1) Adds AuthSession.STATE_AUTH_STARTED_UI_SHOWING
2) Adds IBiometricSysuiReceiver#onDialogAnimatedIn

Since not all sensors are started immediately anymore, adds
logic in BiometricScheduler when attempting to cancel auth
for a sensor that's waiting for cookie (HAL still idle).

Fixes: 171931476
Test: atest com.android.server.biometrics
Test: atest com.android.systemui.biometrics

Change-Id: Iaedc26c51e274614ac2af6ebd98afe26263dad81
2020-11-13 14:39:03 -08:00
Aurimas Liutikas
ab35d18a7c Merge "Suppress all hidden abstract methods in constructable classes." am: bdd6c53abb am: c08c4d9b02 am: 65ed2cb534
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1495396

Change-Id: Icb989e4ac7190afbdb3b09552fa0055c2a742ceb
2020-11-13 03:49:22 +00:00
Aurimas Liutikas
65ed2cb534 Merge "Suppress all hidden abstract methods in constructable classes." am: bdd6c53abb am: c08c4d9b02
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1495396

Change-Id: I9f9bfc14b3cb56016da352949922e3084237228e
2020-11-13 03:35:12 +00:00
Aurimas Liutikas
d23189b998 Suppress all hidden abstract methods in constructable classes.
Having a hidden abstract method for a class that can be extended
means that public implementors cannot implement these hidden methods
posing a risk that custom implementations will not have required
abstract methods resulting in an exception.

Bug: 151134792
Test: make update-api
Change-Id: I758d12465fabc671be19bedeeceb16885de23c87
Merged-In: I758d12465fabc671be19bedeeceb16885de23c87
Exempt-From-Owner-Approval: large scale suppression of existing issues,
    no-op in terms of behavior
2020-11-13 02:56:20 +00:00
Aurimas Liutikas
46a165215b Remove legacy style metalava suppression
@SuppressLint("Doclava125") is a legacy way of suppressing
RequiresPermission check. Updating to the new style of suppression
so metalava no longer has to support the legacy mode.

sed -i "s/@SuppressLint(\"Doclava125/@SuppressLint(\"RequiresPermission/" \
core/java/android/app/admin/DevicePolicyManager.java \
core/java/android/hardware/hdmi/HdmiControlManager.java \
core/java/android/hardware/location/ContextHubManager.java \
core/java/android/hardware/usb/UsbDeviceConnection.java \
core/java/android/net/TrafficStats.java \
core/java/android/os/RecoverySystem.java \
core/java/android/os/storage/StorageManager.java \
core/java/android/service/persistentdata/PersistentDataBlockManager.java \
location/java/android/location/LocationManager.java \
media/java/android/media/AudioManager.java \
telecomm/java/android/telecom/TelecomManager.java \
telephony/java/android/telephony/CarrierConfigManager.java \
telephony/java/android/telephony/TelephonyManager.java \
wifi/java/android/net/wifi/RttManager.java \
wifi/java/android/net/wifi/WifiScanner.java

Test: make
Exempt-From-Owner-Approval: No-op change
Merged-In: I6d5df95cfca2950ea86872d2f0afc1ba828841dc
Change-Id: I6d5df95cfca2950ea86872d2f0afc1ba828841dc
2020-11-12 18:30:12 -08:00
Aurimas Liutikas
1394a019e7 Remove legacy style metalava suppression
@SuppressLint("Doclava125") is a legacy way of suppressing
RequiresPermission check. Updating to the new style of suppression
so metalava no longer has to support the legacy mode.

sed -i "s/@SuppressLint(\"Doclava125/@SuppressLint(\"RequiresPermission/" \
core/java/android/app/admin/DevicePolicyManager.java \
core/java/android/hardware/hdmi/HdmiControlManager.java \
core/java/android/hardware/location/ContextHubManager.java \
core/java/android/hardware/usb/UsbDeviceConnection.java \
core/java/android/net/TrafficStats.java \
core/java/android/os/RecoverySystem.java \
core/java/android/os/storage/StorageManager.java \
core/java/android/service/persistentdata/PersistentDataBlockManager.java \
location/java/android/location/LocationManager.java \
media/java/android/media/AudioManager.java \
telecomm/java/android/telecom/TelecomManager.java \
telephony/java/android/telephony/CarrierConfigManager.java \
telephony/java/android/telephony/TelephonyManager.java \
wifi/java/android/net/wifi/RttManager.java \
wifi/java/android/net/wifi/WifiScanner.java

Test: make
Exempt-From-Owner-Approval: No-op change
Change-Id: I6d5df95cfca2950ea86872d2f0afc1ba828841dc
2020-11-12 18:27:15 -08:00
Aurimas Liutikas
8f8eaec801 Merge "Suppress all hidden abstract methods in constructable classes." 2020-11-12 23:37:21 +00:00
raychi
88254a2b56 Support USB Gadget V1.2 HAL
USB Gadget V1.2 HAL include:
1. support NCM function
2. add api to inquiry USB speed
3. add api to inquiry HAL version

Bug: 168282708
Test: build pass and functions are working normally
Change-Id: Idd07c55f4610740c0cf9023391125a86ba39ddee
2020-11-12 10:59:40 +08:00
TreeHugger Robot
5aa16fb5b9 Merge "Initialize AIDL biometric HALs after BiometricService is started" 2020-11-12 02:41:49 +00:00
Kevin Chyn
13161747db Initialize AIDL biometric HALs after BiometricService is started
Fixes: 172291793
Test: On device with default AIDL HAL, notice it's registered
      with BiometricService
Test: atest com.android.server.biometrics

Change-Id: Ia7283cf9473ef1d33237f2b4788d81b79ae26824
2020-11-11 16:37:57 -08:00
Aurimas Liutikas
796760c56e Suppress all hidden abstract methods in constructable classes.
Having a hidden abstract method for a class that can be extended
means that public implementors cannot implement these hidden methods
posing a risk that custom implementations will not have required
abstract methods resulting in an exception.

Bug: 151134792
Test: make update-api
Change-Id: I758d12465fabc671be19bedeeceb16885de23c87
Exempt-From-Owner-Approval: large scale suppression of existing issues,
    no-op in terms of behavior
2020-11-11 23:16:32 +00:00
Marvin Ramin
456042754f Migrate CEC version Setting to use HdmiCecConfig
Expose getter/setter for CEC version including new constants and change
internal usages to rely on HdmiCecConfig.

Bug: 170297951
Test: atest HdmiControlServiceTest

Change-Id: I6237d83078874f266e12bdd43f77ed644569180b
2020-11-11 00:29:14 +01:00
Mathew Inwood
5a448e27ed Merge "Add maxTargetSdk restriction to unused APIs." am: f8abe13db4 am: eb80316624
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1468245

Change-Id: I60222cb1879651cf283e385519b5c4d156ab68a1
2020-11-09 15:24:20 +00:00
Kevin Chyn
cd0710b086 Merge "Add AuthBiometricUdfpsView for portrait" 2020-11-07 06:12:54 +00:00
Kevin Chyn
90e442a741 Add AuthBiometricUdfpsView for portrait
Adds AuthDialog.LayoutParams which should be used to hold any
layout or measurement related information.

Adds onMeasureInternal which returns AuthDialog.LayoutParams
so that subclasses can return custom layout parameters while
keeping common things like setMeasuredDimension in the
base class.

The AuthBiometricUdfpsView in portrait mode includes a
spacer whose height is calculated based on the sizes of
everything that's below the physical sensor, including
1) Text indicator area (for error messages)
2) Footer button bar
3) BiometricPrompt distance to navigation bar
4) Height of navigation bar

The indicator text is the only non-static element below the
icon. Changes it to marquee on a single line for now.

AuthBiometricView animates the icon's holder instead of the
icon itself. Otherwise, the holder would need to allow drawing
outside of its bounds.

Test: No effect on existing devices
Test: atest com.android.systemui.biometrics

Fixes: 171071087

Change-Id: I3b62f02a44f4d3cf6925d7782451596fbf8db0e1
2020-11-06 19:55:17 -08:00
Darryl Johnson
e4cbd03782 Merge changes I9ccdbd8c,Ifc24ba37
* changes:
  Add onDeviceStateChanged() callback to DeviceStateManager.
  Fix DeviceStateManagerServiceTests and add to presubmit.
2020-11-06 20:38:27 +00:00
Kevin Chyn
54c1598b59 Merge "Add sensorId to IBiometricAuthenticator methods" 2020-11-05 00:55:57 +00:00
Eugene Susla
3f1e82b12c Merge "Disregard annotation params for stale dataclass detection" 2020-11-04 23:57:15 +00:00
Kevin Chyn
d781e2066a Add sensorId to IBiometricAuthenticator methods
IBiometricAuthenticator is the interface that BiometricService
uses to do BiometricManager/BiometricPrompt-related stuff. This
change updates the implementations to pass sensorId as a parameter,
since the current design allows for FingerprintService, FaceService
etc to host multiple HALs and/or sensors.

Maintains functionality of deprecated FingerprintManager APIs.
Since getSensorProperties() requires internal or test permission,
use different binder calls for FingerprintManager invocations
vs BiometricService invocations of methods such as
isHardwareDetected and hasEnrolledFingerprints.

Moves HIDL HAL registration out of *Authenticator class and up
one layer (into AuthService), since *Authenticator code is to
be shared with AIDL HALs, which provide sensorId, strength,
and other configuration via the HAL interface.

Bug: 172291793
Test: Enroll, auth (BiometricPrompt and Lockscreen) on face and
      fingerprint devices

Change-Id: Ib2d8b792f0afde49550f320c4041ff1b1b3d5a50
2020-11-04 14:33:32 -08:00
Darryl L Johnson
73676b48be Add onDeviceStateChanged() callback to DeviceStateManager.
This change introduces the DeviceStateCallback API to DeviceStateManager
which allows processes outside system_server (as well as system_server)
to receive notifications about changes in the system's device state.

Test: atest DeviceStateManagerServiceTest
Bug: 159401801

Change-Id: I9ccdbd8c4a51858a13b0152ed39a8bf20e41e64f
2020-11-04 13:24:44 -08:00