54 Commits

Author SHA1 Message Date
Philip Junker
8f1a5c14ad Add low-power/thermal checks to highBrightnessMode
Adds an observer to HighBrightnessModeController to monitor the system's
thermal status and ensure HBM is off if the status is above the new
limit defined in the display-device-config file.

Also fixes a bug where AutomaticBrightnessController does not
automatically recalculate a value when HBM mode changes and the ambient
lux does not.

Bug: 179019497
Test: atest HighBrightnessModeControllerTest
Change-Id: I38a805671cee0f63e858b7ec0b6a45ca43df1737
2021-07-02 21:47:11 +01:00
Santos Cordon
816b80e883 High Brightness Mode (HBM) Refresh Rate Limiting.
Defines refresh-rate limits for high-brightness-mode in display-config
xml files. DisplayModeDirector listens to HBM status changes from
DisplayManager and applies the pre-defined refresh-rate limits when HBM
is enabled.

Test: Manual, verify a Refresh Rate vote when HBM is enabled, and a
      null-vote when disabled.
Test: atest com.android.server.display
Bug: 181955334
Change-Id: Id642cbff96fca9ce79a50d6cd97e75cd6061ac74
2021-06-18 20:23:56 +01:00
Santos Cordon
8a3115ba6e Specify refresh rate limits for sensors in config.
Some sensors can limit the range of supported refresh rate when
enabled. This change adds a way to specify that limit withing the
display device config file.

Bug: 175793106
Test: Verify that when sensor is enabled, there is an additional
      refresh rate vote for the rate specified in config file.
Test: atest DisplayModeDirectorTest, LocalDisplayAdapterTest
Change-Id: Id210c25fe56cd5353a2436b9b97f2ad01980e465
2021-06-17 21:34:05 +01:00
Fiona Campbell
255bb47310 Allow proximity sensor to be specified per display
This change affects the proximity sensor used for phonecalls, for example, but not for aod.

Bug: 178385123
Test: manual
Change-Id: Id5333e6110ddb8ddfbfd4f720d14f26288bb1594
2021-05-04 15:46:35 +01:00
Fiona Campbell
79ec034fdd Allow sensors to be specified per display
Add a field in display device configurations that allows sensors to be stored.
Read the sensor type and name through dpc.

Bug: 128782163
Test: manual
Change-Id: I4cd778fca085b398b21457104a6a58ad0dae46e2
2021-04-23 10:14:30 +01:00
Michal Olech
aa5bf3a326 [CEC Configuration] Remove cec-config XSD and the main cec_config.xml
Bug: 180316277
Bug: 166430550
Test: build; flash; run
Change-Id: I898324ee8c8339c95f72b7839bc68296830606e1
2021-03-11 13:58:11 +01:00
Santos Cordon
6c1dca2e25 Add static display layout XML files.
Adds the ability to specify an XML configuration file to determine
how displays are laid out for specific device states.

Bug: 168208162
Bug: 170498827
Test: atest com.android.server.display
Change-Id: I488367ecca7a36e667b10a3b70eca3647d40455c
2021-03-03 23:26:29 +00:00
Bob Badour
8a6a2bce6c [LSC] Add LOCAL_LICENSE_KINDS to frameworks/base
Added SPDX-license-identifier-Apache-2.0 to:
  apct-tests/perftests/autofill/Android.bp
  apct-tests/perftests/blobstore/Android.bp
  apct-tests/perftests/core/Android.bp
  apct-tests/perftests/core/apps/overlay/Android.bp
  apct-tests/perftests/core/apps/reources_manager/Android.bp
  apct-tests/perftests/core/jni/Android.bp
  apct-tests/perftests/multiuser/Android.bp
  apct-tests/perftests/multiuser/apps/dummyapp/Android.bp
  apct-tests/perftests/packagemanager/Android.bp
  apct-tests/perftests/packagemanager/apps/query-all/Android.bp
  apct-tests/perftests/textclassifier/Android.bp
  apct-tests/perftests/utils/Android.bp
  apct-tests/perftests/windowmanager/Android.bp
  apex/Android.bp
  apex/blobstore/framework/Android.bp
  apex/blobstore/service/Android.bp
  apex/jobscheduler/framework/Android.bp
  apex/jobscheduler/service/Android.bp
  apex/media/Android.bp
  apex/media/aidl/Android.bp
  apex/media/framework/Android.bp
  cmds/am/Android.bp
  cmds/app_process/Android.bp
  cmds/appops/Android.bp
  cmds/appwidget/Android.bp
  cmds/backup/Android.bp
  cmds/bmgr/Android.bp
  cmds/bootanimation/Android.bp
  cmds/bu/Android.bp
  cmds/content/Android.bp
  cmds/dpm/Android.bp
  cmds/hid/Android.bp
  cmds/hid/jni/Android.bp
  cmds/idmap2/Android.bp
  cmds/ime/Android.bp
  cmds/incident/Android.bp
  cmds/incident_helper/Android.bp
  cmds/incidentd/Android.bp
  cmds/input/Android.bp
  cmds/interrupter/Android.bp
  cmds/locksettings/Android.bp
  cmds/pm/Android.bp
  cmds/requestsync/Android.bp
  cmds/screencap/Android.bp
  cmds/sm/Android.bp
  cmds/svc/Android.bp
  cmds/telecom/Android.bp
  cmds/uiautomator/Android.bp
  cmds/uiautomator/cmds/uiautomator/Android.bp
  cmds/uiautomator/instrumentation/Android.bp
  cmds/uiautomator/library/Android.bp
  cmds/vr/Android.bp
  cmds/wm/Android.bp
  config/Android.bp
  core/java/android/service/wallpaper/Android.bp
  core/jni/Android.bp
  core/sysprop/Android.bp
  core/tests/BroadcastRadioTests/Android.bp
  core/tests/ConnectivityManagerTest/Android.bp
  core/tests/PackageInstallerSessions/Android.bp
  core/tests/PlatformCompatFramework/Android.bp
  core/tests/bandwidthtests/Android.bp
  core/tests/benchmarks/Android.bp
  core/tests/bluetoothtests/Android.bp
  core/tests/bugreports/Android.bp
  core/tests/coretests/Android.bp
  core/tests/coretests/BinderDeathRecipientHelperApp/Android.bp
  core/tests/coretests/BinderProxyCountingTestApp/Android.bp
  core/tests/coretests/BinderProxyCountingTestService/Android.bp
  core/tests/coretests/BstatsTestApp/Android.bp
  core/tests/coretests/DisabledTestApp/Android.bp
  core/tests/coretests/EnabledTestApp/Android.bp
  core/tests/coretests/aidl/Android.bp
  core/tests/coretests/apks/Android.bp
  core/tests/coretests/apks/install/Android.bp
  core/tests/coretests/apks/install_bad_dex/Android.bp
  core/tests/coretests/apks/install_complete_package_info/Android.bp
  core/tests/coretests/apks/install_decl_perm/Android.bp
  core/tests/coretests/apks/install_jni_lib/Android.bp
  core/tests/coretests/apks/install_jni_lib_open_from_apk/Android.bp
  core/tests/coretests/apks/install_loc_auto/Android.bp
  core/tests/coretests/apks/install_loc_internal/Android.bp
  core/tests/coretests/apks/install_loc_sdcard/Android.bp
  core/tests/coretests/apks/install_loc_unspecified/Android.bp
  core/tests/coretests/apks/install_use_perm_good/Android.bp
  core/tests/coretests/apks/install_uses_feature/Android.bp
  core/tests/coretests/apks/install_verifier_bad/Android.bp
  core/tests/coretests/apks/install_verifier_good/Android.bp
  core/tests/coretests/apks/keyset/Android.bp
  core/tests/coretests/apks/locales/Android.bp
  core/tests/coretests/apks/overlay_config/Android.bp
  core/tests/coretests/apks/version/Android.bp
  core/tests/coretests/apks/version_nosys/Android.bp
  core/tests/featureflagtests/Android.bp
  core/tests/hdmitests/Android.bp
  core/tests/hosttests/test-apps/AutoLocTestApp/Android.bp
  core/tests/hosttests/test-apps/AutoLocVersionedTestApp_v1/Android.bp
  core/tests/hosttests/test-apps/AutoLocVersionedTestApp_v2/Android.bp
  core/tests/hosttests/test-apps/ExternalLocAllPermsTestApp/Android.bp
  core/tests/hosttests/test-apps/ExternalLocPermsFLTestApp/Android.bp
  core/tests/hosttests/test-apps/ExternalLocTestApp/Android.bp
  core/tests/hosttests/test-apps/ExternalLocVersionedTestApp_v1/Android.bp
  core/tests/hosttests/test-apps/ExternalLocVersionedTestApp_v2/Android.bp
  core/tests/hosttests/test-apps/ExternalSharedPerms/Android.bp
  core/tests/hosttests/test-apps/ExternalSharedPermsBT/Android.bp
  core/tests/hosttests/test-apps/ExternalSharedPermsDiffKey/Android.bp
  core/tests/hosttests/test-apps/ExternalSharedPermsFL/Android.bp
  core/tests/hosttests/test-apps/InternalLocTestApp/Android.bp
  core/tests/hosttests/test-apps/MultiDexLegacyTestServicesTests/Android.bp
  core/tests/hosttests/test-apps/NoLocTestApp/Android.bp
  core/tests/hosttests/test-apps/NoLocVersionedTestApp_v1/Android.bp
  core/tests/hosttests/test-apps/NoLocVersionedTestApp_v2/Android.bp
  core/tests/hosttests/test-apps/SharedUid/32/Android.bp
  core/tests/hosttests/test-apps/SharedUid/32/jni/Android.bp
  core/tests/hosttests/test-apps/SharedUid/64/Android.bp
  core/tests/hosttests/test-apps/SharedUid/64/jni/Android.bp
  core/tests/hosttests/test-apps/SharedUid/dual/Android.bp
  core/tests/hosttests/test-apps/SharedUid/dual/jni/Android.bp
  core/tests/hosttests/test-apps/SharedUid/java_only/Android.bp
  core/tests/hosttests/test-apps/SimpleTestApp/Android.bp
  core/tests/hosttests/test-apps/UpdateExtToIntLocTestApp_v1_ext/Android.bp
  core/tests/hosttests/test-apps/UpdateExtToIntLocTestApp_v2_int/Android.bp
  core/tests/hosttests/test-apps/UpdateExternalLocTestApp_v1_ext/Android.bp
  core/tests/hosttests/test-apps/UpdateExternalLocTestApp_v2_none/Android.bp
  core/tests/hosttests/test-apps/VersatileTestApp_Auto/Android.bp
  core/tests/hosttests/test-apps/VersatileTestApp_External/Android.bp
  core/tests/hosttests/test-apps/VersatileTestApp_Internal/Android.bp
  core/tests/hosttests/test-apps/VersatileTestApp_None/Android.bp
  core/tests/mockingcoretests/Android.bp
  core/tests/notificationtests/Android.bp
  core/tests/overlaytests/device/Android.bp
  core/tests/overlaytests/device/test-apps/AppOverlayOne/Android.bp
  core/tests/overlaytests/device/test-apps/AppOverlayTwo/Android.bp
  core/tests/overlaytests/device/test-apps/FrameworkOverlay/Android.bp
  core/tests/overlaytests/host/Android.bp
  core/tests/overlaytests/remount/Android.bp
  core/tests/overlaytests/remount/test-apps/Overlay/Android.bp
  core/tests/overlaytests/remount/test-apps/SharedLibrary/Android.bp
  core/tests/overlaytests/remount/test-apps/SharedLibraryOverlay/Android.bp
  core/tests/overlaytests/remount/test-apps/Target/Android.bp
  core/tests/packagemanagertests/Android.bp
  core/tests/privacytests/Android.bp
  core/tests/screenshothelpertests/Android.bp
  core/tests/systemproperties/Android.bp
  core/tests/utillib/Android.bp
  core/tests/utiltests/Android.bp
  core/tests/utiltests/jni/Android.bp
  core/tests/uwbtests/Android.bp
  core/xsd/Android.bp
  core/xsd/vts/Android.bp
  data/etc/Android.bp
  data/etc/car/Android.bp
  data/fonts/Android.bp
  data/keyboards/Android.mk
  drm/jni/Android.bp
  errorprone/Android.bp
  graphics/proto/Android.bp
  keystore/Android.bp
  keystore/tests/Android.bp
  libs/WindowManager/Jetpack/Android.bp
  libs/WindowManager/Shell/Android.bp
  libs/WindowManager/Shell/tests/Android.bp
  libs/androidfw/Android.bp
  libs/androidfw/fuzz/resourcefile_fuzzer/Android.bp
  libs/hostgraphics/Android.bp
  libs/incident/Android.bp
  libs/input/Android.bp
  libs/input/tests/Android.bp
  libs/protoutil/Android.bp
  libs/services/Android.bp
  libs/storage/Android.bp
  libs/usb/tests/AccessoryChat/Android.bp
  libs/usb/tests/AccessoryChat/accessorychat/Android.bp
  location/lib/Android.bp
  location/tests/Android.bp
  location/tests/locationtests/Android.bp
  lowpan/tests/Android.bp
  media/Android.bp
  media/java/Android.bp
  media/java/android/media/tv/tunerresourcemanager/Android.bp
  media/jni/Android.bp
  media/jni/audioeffect/Android.bp
  media/jni/soundpool/Android.bp
  media/jni/soundpool/tests/Android.bp
  media/lib/remotedisplay/Android.bp
  media/lib/signer/Android.bp
  media/lib/tvremote/Android.bp
  media/lib/tvremote/tests/Android.bp
  media/mca/filterfw/Android.bp
  media/mca/filterfw/native/Android.bp
  media/mca/filterpacks/Android.bp
  media/mca/samples/CameraEffectsRecordingSample/Android.bp
  media/mca/tests/Android.bp
  media/native/midi/Android.bp
  media/packages/BluetoothMidiService/Android.bp
  media/packages/BluetoothMidiService/tests/unit/Android.bp
  media/tests/AudioPolicyTest/Android.bp
  media/tests/CameraBrowser/Android.bp
  media/tests/EffectsTest/Android.bp
  media/tests/MediaDump/Android.bp
  media/tests/MediaFrameworkTest/Android.bp
  media/tests/MediaRouter/Android.bp
  media/tests/MtpTests/Android.bp
  media/tests/ScoAudioTest/Android.bp
  media/tests/SoundPoolTest/Android.bp
  media/tests/TunerTest/Android.bp
  media/tests/audiotests/Android.bp
  media/tests/players/Android.bp
  mime/Android.bp
  native/android/Android.bp
  native/graphics/jni/Android.bp
  native/webview/loader/Android.bp
  nfc-extras/Android.bp
  nfc-extras/tests/Android.bp
  packages/AppPredictionLib/Android.bp
  packages/BackupEncryption/Android.bp
  packages/BackupEncryption/test/robolectric-integration/Android.bp
  packages/BackupEncryption/test/robolectric/Android.bp
  packages/BackupEncryption/test/unittest/Android.bp
  packages/BackupRestoreConfirmation/Android.bp
  packages/CarSystemUI/Android.bp
  packages/CarrierDefaultApp/Android.bp
  packages/CarrierDefaultApp/tests/unit/Android.bp
  packages/CompanionDeviceManager/Android.bp
  packages/Connectivity/framework/Android.bp
  packages/Connectivity/service/Android.bp
  packages/CtsShim/Android.bp
  packages/CtsShim/build/Android.bp
  packages/CtsShim/build/jni/Android.bp
  packages/DynamicSystemInstallationService/Android.bp
  packages/DynamicSystemInstallationService/tests/Android.bp
  packages/EasterEgg/Android.bp
  packages/EncryptedLocalTransport/Android.bp
  packages/ExtShared/Android.bp
  packages/ExternalStorageProvider/Android.bp
  packages/ExternalStorageProvider/tests/Android.bp
  packages/FakeOemFeatures/Android.bp
  packages/FusedLocation/Android.bp
  packages/InputDevices/Android.bp
  packages/LocalTransport/Android.bp
  packages/PackageInstaller/Android.bp
  packages/PrintRecommendationService/Android.bp
  packages/PrintSpooler/Android.bp
  packages/PrintSpooler/jni/Android.bp
  packages/PrintSpooler/tests/outofprocess/Android.bp
  packages/SettingsLib/ActionBarShadow/Android.bp
  packages/SettingsLib/ActionButtonsPreference/Android.bp
  packages/SettingsLib/AdaptiveIcon/Android.bp
  packages/SettingsLib/Android.bp
  packages/SettingsLib/AppPreference/Android.bp
  packages/SettingsLib/BarChartPreference/Android.bp
  packages/SettingsLib/DisplayDensityUtils/Android.bp
  packages/SettingsLib/EntityHeaderWidgets/Android.bp
  packages/SettingsLib/HelpUtils/Android.bp
  packages/SettingsLib/LayoutPreference/Android.bp
  packages/SettingsLib/ProgressBar/Android.bp
  packages/SettingsLib/RadioButtonPreference/Android.bp
  packages/SettingsLib/RestrictedLockUtils/Android.bp
  packages/SettingsLib/SchedulesProvider/Android.bp
  packages/SettingsLib/SearchProvider/Android.bp
  packages/SettingsLib/SearchWidget/Android.bp
  packages/SettingsLib/SettingsSpinner/Android.bp
  packages/SettingsLib/SettingsTheme/Android.bp
  packages/SettingsLib/Tile/Android.bp
  packages/SettingsLib/Utils/Android.bp
  packages/SettingsLib/search/Android.bp
  packages/SettingsLib/tests/integ/Android.bp
  packages/SettingsLib/tests/robotests/Android.bp
  packages/SettingsProvider/Android.bp
  packages/SharedStorageBackup/Android.bp
  packages/Shell/Android.bp
  packages/Shell/tests/Android.bp
  packages/SimAppDialog/Android.bp
  packages/SoundPicker/Android.bp
  packages/StatementService/Android.bp
  packages/SystemUI/Android.bp
  packages/SystemUI/plugin/Android.bp
  packages/SystemUI/plugin/ExamplePlugin/Android.bp
  packages/SystemUI/plugin_core/Android.bp
  packages/SystemUI/shared/Android.bp
  packages/VpnDialogs/Android.bp
  packages/WAPPushManager/Android.bp
  packages/WAPPushManager/tests/Android.bp
  packages/WallpaperBackup/Android.bp
  packages/WallpaperCropper/Android.bp
  packages/overlays/Android.mk
  packages/overlays/tests/Android.bp
  packages/services/PacProcessor/Android.bp
  packages/services/PacProcessor/jni/Android.bp
  packages/services/Proxy/Android.bp
  proto/Android.bp
  rs/jni/Android.mk
  samples/demo/haptic-assessment/Android.bp
  sax/tests/saxtests/Android.bp
  services/Android.bp
  services/accessibility/Android.bp
  services/appprediction/Android.bp
  services/appwidget/Android.bp
  services/autofill/Android.bp
  services/backup/Android.bp
  services/backup/backuplib/Android.bp
  services/companion/Android.bp
  services/contentcapture/Android.bp
  services/contentsuggestions/Android.bp
  services/core/Android.bp
  services/core/java/com/android/server/vcn/Android.bp
  services/core/jni/Android.bp
  services/core/xsd/Android.bp
  services/core/xsd/vts/Android.bp
  services/coverage/Android.bp
  services/devicepolicy/Android.bp
  services/incremental/Android.bp
  services/midi/Android.bp
  services/net/Android.bp
  services/people/Android.bp
  services/print/Android.bp
  services/profcollect/Android.bp
  services/restrictions/Android.bp
  services/robotests/Android.bp
  services/robotests/backup/Android.bp
  services/systemcaptions/Android.bp
  services/tests/PackageManagerComponentOverrideTests/Android.bp
  services/tests/PackageManagerServiceTests/host/Android.bp
  services/tests/PackageManagerServiceTests/host/test-apps/Android.bp
  services/tests/mockingservicestests/Android.bp
  services/tests/rescueparty/Android.bp
  services/tests/servicestests/Android.bp
  services/tests/servicestests/aidl/Android.bp
  services/tests/servicestests/apks/Android.bp
  services/tests/servicestests/apks/install-split-base/Android.bp
  services/tests/servicestests/apks/install-split-feature-a/Android.bp
  services/tests/servicestests/apks/install_intent_filters/Android.bp
  services/tests/servicestests/apks/install_uses_sdk/Android.bp
  services/tests/servicestests/test-apps/ConnTestApp/Android.bp
  services/tests/servicestests/test-apps/JobTestApp/Android.bp
  services/tests/servicestests/test-apps/PackageParserApp/Android.bp
  services/tests/servicestests/test-apps/PackageParsingTestManifests/Android.bp
  services/tests/servicestests/test-apps/SimpleServiceTestApp/Android.bp
  services/tests/servicestests/test-apps/SuspendTestApp/Android.bp
  services/tests/shortcutmanagerutils/Android.bp
  services/tests/uiservicestests/Android.bp
  services/tests/wmtests/Android.bp
  services/usage/Android.bp
  services/usb/Android.bp
  services/voiceinteraction/Android.bp
  services/wifi/Android.bp
  startop/apps/test/Android.bp
  startop/iorap/Android.bp
  startop/iorap/functional_tests/Android.bp
  startop/iorap/stress/Android.bp
  startop/iorap/tests/Android.bp
  startop/view_compiler/Android.bp
  startop/view_compiler/dex_builder_test/Android.bp
  test-base/hiddenapi/Android.bp
  test-mock/Android.bp
  test-runner/tests/Android.bp
  tests/AccessibilityEventsLogger/Android.bp
  tests/AccessoryDisplay/common/Android.bp
  tests/AccessoryDisplay/sink/Android.bp
  tests/AccessoryDisplay/source/Android.bp
  tests/ActivityManagerPerfTests/stub-app/Android.bp
  tests/ActivityManagerPerfTests/test-app/Android.bp
  tests/ActivityManagerPerfTests/tests/Android.bp
  tests/ActivityManagerPerfTests/utils/Android.bp
  tests/ActivityTests/Android.bp
  tests/ActivityViewTest/Android.bp
  tests/AmSlam/Android.bp
  tests/ApkVerityTest/Android.bp
  tests/ApkVerityTest/ApkVerityTestApp/Android.bp
  tests/ApkVerityTest/block_device_writer/Android.bp
  tests/AppLaunch/Android.bp
  tests/AppLaunchWear/Android.bp
  tests/AppResourcesLoaders/Android.bp
  tests/AppResourcesLoaders/Overlay/Android.bp
  tests/Assist/Android.bp
  tests/AutoVerify/app1/Android.bp
  tests/AutoVerify/app2/Android.bp
  tests/AutoVerify/app3/Android.bp
  tests/AutoVerify/app4/Android.bp
  tests/BackgroundDexOptServiceIntegrationTests/Android.bp
  tests/BandwidthTests/Android.bp
  tests/BatteryWaster/Android.bp
  tests/BiDiTests/Android.bp
  tests/BlobStoreTestUtils/Android.bp
  tests/BootImageProfileTest/Android.bp
  tests/BrowserPowerTest/Android.bp
  tests/Camera2Tests/SmartCamera/SimpleCamera/jni/Android.bp
  tests/CameraPrewarmTest/Android.bp
  tests/Codegen/Android.bp
  tests/Compatibility/Android.bp
  tests/CoreTests/android/Android.bp
  tests/DataIdleTest/Android.bp
  tests/DozeTest/Android.bp
  tests/DpiTest/Android.bp
  tests/DynamicCodeLoggerIntegrationTests/Android.mk
  tests/FeatureSplit/base/Android.bp
  tests/FeatureSplit/feature1/Android.bp
  tests/FeatureSplit/feature2/Android.bp
  tests/FixVibrateSetting/Android.bp
  tests/FlickerTests/Android.bp
  tests/FlickerTests/test-apps/Android.bp
  tests/FlickerTests/test-apps/flickerapp/Android.bp
  tests/FrameworkPerf/Android.bp
  tests/GamePerformance/Android.bp
  tests/GridLayoutTest/Android.bp
  tests/HierarchyViewerTest/Android.bp
  tests/HugeBackup/Android.bp
  tests/HwAccelerationTest/Android.bp
  tests/Internal/Android.bp
  tests/JankBench/Android.bp
  tests/JobSchedulerPerfTests/Android.bp
  tests/JobSchedulerTestApp/Android.bp
  tests/LargeAssetTest/Android.bp
  tests/LegacyAssistant/Android.bp
  tests/LocalizationTest/Android.bp
  tests/LocationTracker/Android.bp
  tests/LotsOfApps/Android.bp
  tests/LowStorageTest/Android.bp
  tests/ManagedProfileLifecycleStressTest/Android.bp
  tests/ManagedProfileLifecycleStressTest/app/DummyDPC/Android.bp
  tests/MemoryUsage/Android.bp
  tests/MirrorSurfaceTest/Android.bp
  tests/NativeProcessesMemoryTest/Android.bp
  tests/NetworkSecurityConfigTest/Android.bp
  tests/NullHomeTest/Android.bp
  tests/OdmApps/Android.bp
  tests/OdmApps/app/Android.bp
  tests/OdmApps/priv-app/Android.bp
  tests/OneMedia/Android.bp
  tests/PackageWatchdog/Android.bp
  tests/PlatformCompatGating/Android.bp
  tests/PlatformCompatGating/test-rules/Android.bp
  tests/ProtoInputStreamTests/Android.bp
  tests/RemoteDisplayProvider/Android.bp
  tests/RenderThreadTest/Android.bp
  tests/RollbackTest/Android.bp
  tests/SerialChat/Android.bp
  tests/ServiceCrashTest/Android.bp
  tests/SharedLibrary/client/Android.bp
  tests/SharedLibrary/lib/Android.bp
  tests/ShowWhenLockedApp/Android.bp
  tests/SmokeTest/Android.bp
  tests/SmokeTest/tests/Android.bp
  tests/SmokeTestApps/Android.bp
  tests/SoundTriggerTestApp/Android.bp
  tests/Split/Android.bp
  tests/StagedInstallTest/Android.bp
  tests/StatusBar/Android.bp
  tests/SurfaceComposition/Android.bp
  tests/SurfaceControlViewHostTest/Android.bp
  tests/SystemMemoryTest/device/Android.bp
  tests/SystemMemoryTest/host/Android.bp
  tests/SystemUIDemoModeController/Android.bp
  tests/TaskOrganizerTest/Android.bp
  tests/TelephonyCommonTests/Android.bp
  tests/TouchLatency/Android.bp
  tests/TransformTest/Android.bp
  tests/TtsTests/Android.bp
  tests/UiBench/Android.bp
  tests/UsageReportingTest/Android.bp
  tests/UsageStatsPerfTests/Android.bp
  tests/UsageStatsTest/Android.bp
  tests/UsbHostExternalManagmentTest/AoapTestDevice/Android.bp
  tests/UsbHostExternalManagmentTest/AoapTestHost/Android.bp
  tests/UsbHostExternalManagmentTest/UsbHostExternalManagmentTestApp/Android.bp
  tests/UsbManagerTests/Android.bp
  tests/UsbManagerTests/lib/Android.bp
  tests/UsbTests/Android.bp
  tests/UsesFeature2Test/Android.bp
  tests/VectorDrawableTest/Android.bp
  tests/VoiceEnrollment/Android.bp
  tests/VoiceInteraction/Android.bp
  tests/WallpaperTest/Android.bp
  tests/WindowAnimationJank/Android.bp
  tests/WindowInsetsTests/Android.bp
  tests/appwidgets/AppWidgetHostTest/Android.bp
  tests/appwidgets/AppWidgetProviderTest/Android.bp
  tests/backup/Android.mk
  tests/benchmarks/Android.bp
  tests/libs-permissions/Android.bp
  tests/net/Android.bp
  tests/net/common/Android.bp
  tests/net/deflake/Android.bp
  tests/net/integration/Android.bp
  tests/net/jni/Android.bp
  tests/net/smoketest/Android.bp
  tests/notification/Android.bp
  tests/permission/Android.bp
  tests/privapp-permissions/Android.bp
  tests/testables/Android.bp
  tests/testables/tests/Android.bp
  tests/utils/StubIME/Android.bp
  tests/utils/hostutils/Android.bp
  tests/utils/testutils/Android.bp
  tests/vcn/Android.bp
  tools/aapt/Android.bp
  tools/aapt2/Android.bp
  tools/aapt2/integration-tests/AutoVersionTest/Android.bp
  tools/aapt2/integration-tests/BasicTest/Android.bp
  tools/aapt2/integration-tests/MergeOnlyTest/LeafLib/Android.mk
  tools/aapt2/integration-tests/MergeOnlyTest/LocalLib/Android.mk
  tools/aapt2/integration-tests/NamespaceTest/LibOne/Android.mk
  tools/aapt2/integration-tests/NamespaceTest/LibTwo/Android.mk
  tools/aapt2/integration-tests/StaticLibTest/App/Android.bp
  tools/aapt2/integration-tests/StaticLibTest/LibOne/Android.bp
  tools/aapt2/integration-tests/StaticLibTest/LibTwo/Android.bp
  tools/aapt2/integration-tests/SymlinkTest/Android.bp
  tools/bit/Android.bp
  tools/codegen/Android.bp
  tools/dump-coverage/Android.bp
  tools/incident_report/Android.bp
  tools/incident_section_gen/Android.bp
  tools/lock_agent/Android.bp
  tools/locked_region_code_injection/Android.bp
  tools/obbtool/Android.bp
  tools/powermodel/Android.bp
  tools/preload-check/Android.bp
  tools/preload-check/device/Android.bp
  tools/preload/loadclass/Android.bp
  tools/processors/staledataclass/Android.bp
  tools/processors/view_inspector/Android.bp
  tools/protologtool/Android.bp
  tools/sdkparcelables/Android.bp
  tools/split-select/Android.bp
  tools/streaming_proto/Android.bp
  tools/validatekeymaps/Android.bp
  wifi/java/Android.bp
  wifi/tests/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to:
  libs/hwui/Android.bp
  native/webview/plat_support/Android.bp
  obex/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    SPDX-license-identifier-CC-BY SPDX-license-identifier-CPL-1.0
    SPDX-license-identifier-GPL SPDX-license-identifier-GPL-2.0
    SPDX-license-identifier-MIT SPDX-license-identifier-Unicode-DFS
    SPDX-license-identifier-W3C legacy_unencumbered
to:
  Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    legacy_unencumbered
to:
  core/java/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-CPL-1.0
to:
  test-base/Android.bp
  test-runner/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-GPL
to:
  core/res/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-GPL-2.0
to:
  libs/usb/Android.bp
  libs/usb/tests/accessorytest/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT
to:
  tools/preload/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT
    SPDX-license-identifier-Unicode-DFS
to:
  api/Android.bp
  boot/Android.bp
  cmds/device_config/Android.bp
  cmds/settings/Android.bp
  core/api/Android.bp
  core/tests/coretests/certs/Android.bp
  core/tests/overlaytests/remount/test-apps/certs/Android.bp
  core/tests/overlaytests/remount/test-apps/overlaid_apex/Android.bp
  core/tests/overlaytests/remount/test-apps/overlay_apex/Android.bp
  libs/tracingproxy/Android.bp
  services/startop/Android.bp
  test-legacy/Android.mk
  tests/ApkVerityTest/testdata/Android.bp
  tests/TransitionTests/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: Ib9737d8fb5ef5b90a2c14fe71f1a571079edcf02
Merged-In: Ib9737d8fb5ef5b90a2c14fe71f1a571079edcf02
2021-02-21 20:12:24 +00:00
Benjamin Franz
4c5134f3da Merge "Add versioning to app compat framework" am: 80bbdfd100 am: 4fb9af6ced am: 8964ef6743
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1585009

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8d349a5f76f496503e328a4fc70e051a2ccca2b6
2021-02-16 13:26:45 +00:00
Benjamin Franz
360d60d523 Add versioning to app compat framework
With this change, callers can set overrides for specific versions of an
app. The framework falls back to default version when the given version
doesn't have an override set.

Bug: 174043039
Test: atest FrameworksServicesTests:CompatConfigTest
Test: atest FrameworksServicesTests:PlatformCompatTest
Test: atest PlatformCompatGating
Change-Id: Ib5ff67e752a9c5ee94b6e1dd664d324ab5bf4542
2021-02-11 18:33:45 +00:00
Andrei-Valentin Onea
001dd27a02 Merge "Persist compat framework overrides across reboot" am: 51164692d0 am: e153c16320 am: 40071fa8e8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1535144

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I75d7d427263d1c9c486b407de6102916b57d563c
2021-01-27 22:17:17 +00:00
Andrei Onea
38df6113de Persist compat framework overrides across reboot
Save the compat overrides in /data/misc/appcompat/compat_framework_overrides.xml

Test: atest CompatConfigTest
Bug: 145509340

Change-Id: I0673087c1b78addb20b03ba6299490c2d40e39ca
2021-01-25 17:04:16 +00:00
Fiona Campbell
fb2f95b830 Merge "Make Brightness Ramp Speeds Configurable" 2021-01-22 16:14:57 +00:00
Fiona Campbell
078547afda Make Brightness Ramp Speeds Configurable
Allow brightness ramp speeds to differ based on whether the brightness is increasing or decreasing.
They already allow fast / slow ramp rates.

If all 4 values (fast up; fast down; slow up; slow down) are put in the DDC, these are used.
Otherwise, config.xml provides one value for fast and one for slow ramp rates, these are used for both increasing and decreasing values.

Bug: 156247142
Test: manual
Change-Id: If0920328e2bf16e3f8ebe6ea1b07a467e5c4e939
2021-01-22 14:16:20 +00:00
Benjamin Franz
a633741730 Merge "Add new overridable annotation to platform compat" am: 458515e464 am: 899cd8920b am: 9f7867cee2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1540124

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If74ec1464e1a52a14ab1aeb81ca676622a52a72d
2021-01-12 16:48:26 +00:00
Santos Cordon
ef47c4f317 Add basic High Brightness Mode implementation.
1) Loads configuration values from the display device config file
2) Passes those values through to AutomaticBrightnessController
3) Uses configuration in new HighBrightnessModeController class
   to drive High Brightness mode via AutomaticBrightnessController.

Test: manual.  Set HBM to enabled in display-config file.
Bug: 168210138
Change-Id: I4824bbc9d97cb668efc3bcaddb036d508a40fa87
2021-01-08 08:35:27 +00:00
Benjamin Franz
1cd6acee87 Add new overridable annotation to platform compat
With this CL the annotation is only digested, but has no behaviour
change yet. Eventually this annotation allows the annotated change id to
be overriden on non-debug builds

Bug: 174043039
Test: atest FrameworksServicesTests:PlatformCompatTest
Change-Id: Ibc1fce37085213b5a02155010189949e193f0882
2021-01-07 14:54:48 +00:00
Fiona Campbell
48df7d1850 Add config.xml fallback in DisplayDeviceConfig
This change adds the default brightness to the ddc, and a fallback to
config.xml when the ddc doesn't exist.

It adds the minimum and maximum brightness constrtaints to the display
device config - which are currently sourced from config.xml.

Bug: 147415200
Test: manual

Change-Id: Ibbfbbbd495048114befb3f867bd5f4e26916ca9e
2021-01-05 14:31:20 +00:00
Santos Cordon
0f42b0bb30 Add notion of Quirks the Device Display Config files.
On some devices, the system may not operate as expected and
specialized code may be necessary to work around these limitations
or "quirks".  Add the notion of quirks to the config files so that
devices can be easily configured to operate around their
unexpected behavior.

As a first "quirk" to add, we specify if a display supports setting
brightness via the SourceControl.setBrighntess API.

Bug: 170954431
Test: manually check that brightness works
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/display
Change-Id: Ia3cedf9ec7a2457e27763e0c58020c1edfbae408
2020-12-16 16:40:12 +00:00
Darryl Johnson
a3c423c3fd Merge "Add nullability annotations to device state XSD file." 2020-12-15 01:35:00 +00:00
Darryl L Johnson
9456572641 Add nullability annotations to device state XSD file.
This adds nullable annotations to tags that can be null at runtime.

Fixes: 175130179
Test: Manual - view generated java API
Change-Id: If9d032a5eff452ddbaa28050b474051fd66db424
2020-12-14 15:30:06 -08:00
TreeHugger Robot
83352bf4e1 Merge "Add OWNERS file for display-device-config dirs." 2020-12-14 20:22:29 +00:00
Santos Cordon
1aeb886e88 Add OWNERS file for display-device-config dirs.
Test: No test, just owners change
Change-Id: I5acd0994f4337bff27af2af5d4ca09ea80e5e6ea
2020-12-14 18:43:21 +00:00
Darryl L Johnson
a11a21fd12 Add OWNERS file to device state XSD directory.
Bug: 159401801
Test: None
Change-Id: I7470dd3a25aff77e07b0cf6742bbe16d8daf8c0a
2020-12-14 09:31:12 -08:00
Jeff Sharkey
0ab7007631 resolve merge conflicts of 358f0d4fc8c248498cf113c41e043877a14e89a1 to master
Bug: 174932174
Test: I solemnly swear I tested this conflict resolution.
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Change-Id: I9262a08ffc1ccede8e519d0eed90ed2bfcf0232c
2020-12-08 11:01:05 -07:00
Jeff Sharkey
52b9862f87 Improve OWNERS coverage across frameworks/base/.
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.

Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas.  Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:

-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage

Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance.  With this extensive
effort, we've now improved our coverage as follows:

-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage

This specific change is automatically generated by a script that
identifies relevant "include" directives.

Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
Change-Id: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
2020-12-08 08:36:28 -07:00
Darryl L Johnson
ad0b38bdbd Convert device state sensor type from int to String.
This converts the sensor type within the device state config file from
a raw int type to its fully qualified Sensor string type. For ex, a hinge
sensor that was previously identified with "36" would now be identified
with "android.sensor.hinge_angle".

Bug: 159401801
Test: atest DeviceStateProviderImplTest
Change-Id: I32ff9db11f68d602f7084d5308f0435bf418e522
2020-12-04 10:20:35 -08:00
Darryl L Johnson
6a6ec1122e Add support for sensor conditions in device state configuration file.
This change adds support for toggling device states based on sensor
values. For ex, a device with a hinge angle sensor can specify device
states based on the current hinge angle.

Test: atest DeviceStateProviderImplTest
Test: manual - place config on device and verify device state changes
with hinge angle sensor

Bug: 159401800
Change-Id: I41372c252fdc4c9d4f0306283cf260f793271195
2020-11-19 11:24:27 -08:00
Darryl L Johnson
1ddaa9f63f Update DeviceStateProviderImpl to read from device state config file.
This change introduces the device_state_configuration.xml file schema
and updates DeviceStateProviderImpl to read the set of supported states
from the configuration file. The file schema and provider only support
the lid switch condition, support for hinge angle will be added in a
follow-up change.

Test: atest DeviceStateProviderImplTest
Test: manual - place config on device and verify device state changes
with lid switch

Bug: 159401800

Change-Id: I4472e23a5c8dbdacfe56aa2570eafa84033a7bfd
2020-11-16 21:04:45 -08:00
Michal Olech
fcfdd08bdc [CEC Configuration] Use 'int-value' field instead of 'hex-value'
Bug: 166426337
Test: atest HdmiCecConfigTest
Change-Id: Ibb9f1aa87c7af505d1802057266a4c558f6e82af
2020-11-06 15:08:16 +01:00
Michal Olech
31be5dc8fc [CEC Configuration] Support hex values in the config XML
Bug: 166426337
Test: atest HdmiCecConfigTest
Change-Id: I9774e52ce988550b58514253bf14fccdcb562db1
2020-11-05 14:33:25 +01:00
Michal Olech
2c7804034b [CEC Configuration] Introduce 'int' type to the API
Change type of 'hdmi_cec_enabled' and 'system_audio_mode_muting' to integer.

Bug: 168020131
Test: atest HdmiCecConfig
Change-Id: Idc7056fbb7ff01459106bd292553f1ad2f0c4154
2020-11-04 14:15:42 +01:00
Michal Olech
64651134f6 [CEC Configuration] Add XML schema parser API
The schema will be used for system and OEM level configuration of CEC.

Bug: 166430550
Test: Ran 'make update-api' and inspected the current.txt
Change-Id: I2359a4957e2d8f99818b8c53c3914794a0b4fa85
2020-10-21 14:22:50 +02:00
Andrei-Valentin Onea
c90a797b8e Merge "Add enabledSince support for compat changes" 2020-10-19 14:19:31 +00:00
Andrei Onea
876c40f5b0 Add enabledSince support for compat changes
Keep supporting enabledAfter as well.

Bug: 149103556
Test: atest CompatConfigTest
Test: atest PlatformCompatTest
Test: atest OverrideValidatorImplTest
Change-Id: I7f0d6671430a3548b4a0f297d1db3fca7a49731e
2020-10-13 23:28:16 +01:00
Dan Shi
9eeeaf5cc8 Remove vts10 related configs
Bug: 169581727
Test: build
Change-Id: I3ffbad3d70662aaca948943c9dfaa47b37597922
2020-10-05 11:04:45 -07:00
Dan Shi
a1d69738ef Rename vts-core to vts
Bug: 151896491
Test: presubmit check
Exempt-From-Owner-Approval: This CL renames suite name vts-core to vts.
It won't change test logic or behavior.

Change-Id: I79cddf5e4a65486b8f1286ea430360479ad2b93d
2020-04-06 16:23:37 -07:00
Santos Cordon
d0e4e3d037 Remove HBM addition to display config.
Code was previously a no-op, no changes to behavior.

Bug: 152319241
Test: Manual, make sure brightness still works.
Change-Id: I0c9ee872a0c07ffe7a407f21c419f468faae1003
2020-03-30 17:23:25 +01:00
Santos Cordon
bd4544cc75 Adding final/nonnull annotations to display device config XSD.
Bug: 152319241
Test: Verify nits maps still gets read.
Change-Id: I6af2632b7e2186d305ed3c6b745b3e7756c7b26f
2020-03-30 17:09:28 +01:00
atrost
fd87a60be8 Add support for LoggingOnly changes
Throw an exception if someone tries to add an
override for a logging only change. Incorporate the restriction in the
OverrideValidator.

Test: change one change to be logging only, flash device, adb shell
dumpsys platform_compat
Test: atest com.android.server.compat.CompatConfigTest
Test: atest com.android.server.compat.OverrideValidatorImplTest
Bug: 148009004

Change-Id: I379c63f8b5c54500d9066be9363a186efd55d200
2020-03-03 15:20:06 +00:00
Treehugger Robot
f7c6809cdc Merge "[vts-core] add vts_defaultPermissions_validate_test to vts-core" am: 65be777fab am: 551116b921 am: 12239b0a6c
Change-Id: I2e43d9f7e7b8c2947dbdc8a1b3e6c29584a25b6e
2020-02-14 20:16:21 +00:00
nelsonli
4928e77869 [vts-core] add vts_defaultPermissions_validate_test to vts-core
VtsValidateDefaultPermissions is just the GTest of
vts_defaultPermissions_validate_test.

Bug: 142397658
Test: $atest vts_defaultPermissions_validate_test
Change-Id: I88de9b3b01957f3d76591f33b362bdedbf36acd2
2020-02-13 10:59:32 +08:00
Santos Cordon
6e8de44e86 Add high-brightness-mode range specifier to brightness mapping.
Within the device-configuration file, a device can specify a
point along the brightness mapping as the beginning of high-brightness
mode.  All points in the mapping beyond that range will be treated
as high-brightness-mode points.  Normal brightness range will end
at the specified point.

Bug: 131813802
Test: Verify brightness works through the entire pre-HBM range, with and
without new specifier.
Change-Id: I4d9c6fab1c1f11e550ee33643673b004ee54dbfe
2020-01-22 21:15:59 +00:00
Santos Cordon
4505e5e6e8 Add display configuration files.
Adds a static display configuration file for specifying static display
configurations as a sustainable API.

Bug: 131813802
Test: Verify brightness changes work as expected.  Verify changes going
through system to HAL conversion.
Exempt-From-Owner-Approval: I am new owner of lights, but OWNERS rights hasnt yet propogated.
Change-Id: I17922267f4695bc042d7c0687d4dcc10554e1b85
2020-01-22 18:34:39 +00:00
atrost
23886e7b2c Add descriptions to compat changes.
Capture the comment above a definition of a compat change and make it
the description.
Next: make sure existing changes use supported format (only /**
comments, only above the annotations), and use in developer UI.

Bug: 144927670
Test: atest com.android.server.compat.CompatConfigTest
Change-Id: Ib23f341baa171599654c351693e4b0ddf4b2515c
2019-12-04 17:17:16 +00:00
Anna Trostanetski
4565dd5de3 Merge "Add a platform compat config schema API."
am: 64e01268ce

Change-Id: Ida126bab43b5b68608440f750462ed6904d898b6
2019-07-25 08:57:16 -07:00
atrost
5769c403f4 Add a platform compat config schema API.
As decribed in go/xsdc-for-partners.
This defines the schema of the XML file generated by @ChangeId
annotation processor.
The schema requires unique ids.

Test: Used https://www.freeformatter.com/xml-validator-xsd.html to
      validate an example config.
Bug: 138222363

Change-Id: Iaf37e049ddd483c4fd7d512475614476ac6606a5
2019-07-25 11:09:01 +01:00
Sundong Ahn
28403928b3 Fix the vts error
On some devices, default-permissions.xml file is on the product
partition. Modify the test case so that VTS passes even if
default-permissions.xml doesn't exist.
According to the parser code, the xml file can exist in an odm
partition. So add the odm partition to the location.

Bug: 132048214
Test: m -j vts
Test: vts-tradefed run vts -m VtsValidateDefaultPermissions
Change-Id: Ia518a51129b8acb2de68ee2cd537b57ef6378b32
2019-05-08 10:21:44 +09:00
Sundong Ahn
75dec5cd75 Add Vts test for xsd_config
The vts_permission_validate_test and
vts_defaultPermissions_validate_test are added for checking xsd schema
validation.

Bug: 127435354
Test: vts-tradefed run vts -m VtsValidatePermission
Test: vts-tradefed run vts -m VtsValidateDefaultPermissions

Merged-In: Ib73dcbe4f9c20e0a957be4325d5cfc2b27c64b67
Change-Id: Ib73dcbe4f9c20e0a957be4325d5cfc2b27c64b67
(cherry picked from commit dc15dc8cc0bbaa10f31b3b8118594a559edd0296)
2019-04-10 11:00:41 +09:00
Treehugger Robot
fd7bbebeaa Merge "Add Vts test for xsd_config" 2019-04-05 06:50:43 +00:00