From 32eaab94ec67c85603826ef62e798b9f5f63ae7a Mon Sep 17 00:00:00 2001 From: Mariia Sandrikova Date: Sat, 3 Dec 2022 03:00:51 +0000 Subject: [PATCH 1/2] [1/n][Pro] Change natural device orientation to portrait. This change is needed to ensure compatibility of Camera apps that rely on natural orientation being aligned with portrait camera orientation. 0 degrees is selected over 180 to have the back camera at the top of the device when portrait-only apps are force rotated into specific orientation for compatibility. Also, temporary override ro.surface_flinger.primary_display_orientation to use it instead the value from HWC API to avoid breaking the build even for a short period of time since there is no direct way to synchronize landing of this CLs chain with pa/2342172 Bug: 246793311 Test: manual QA for top apps and manual exploratory testing for overall device experience Change-Id: I67f9cb522f4478c83ac6bbc18da2eaf4ee0dd686 --- NVTCapacitivePen.idc | 2 +- NVTCapacitiveTouchScreen.idc | 2 +- device-tangorpro.mk | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/NVTCapacitivePen.idc b/NVTCapacitivePen.idc index 39f5158..698d0db 100644 --- a/NVTCapacitivePen.idc +++ b/NVTCapacitivePen.idc @@ -1,2 +1,2 @@ touch.orientationAware = 1 -touch.orientation = ORIENTATION_270 +touch.orientation = ORIENTATION_0 diff --git a/NVTCapacitiveTouchScreen.idc b/NVTCapacitiveTouchScreen.idc index bcfcb54..5c2afd6 100644 --- a/NVTCapacitiveTouchScreen.idc +++ b/NVTCapacitiveTouchScreen.idc @@ -1 +1 @@ -touch.orientation = ORIENTATION_270 +touch.orientation = ORIENTATION_0 diff --git a/device-tangorpro.mk b/device-tangorpro.mk index 5896ff8..13aa7e6 100644 --- a/device-tangorpro.mk +++ b/device-tangorpro.mk @@ -146,6 +146,10 @@ PRODUCT_PROPERTY_OVERRIDES += \ # Set ro.crypto.metadata_init_delete_all_keys.enabled to false to unblock boot PRODUCT_PROPERTY_OVERRIDES += ro.crypto.metadata_init_delete_all_keys.enabled=false +# Temporary override to synchronise changes in pa/ and ag/. See b/246793311 for context. +PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.primary_display_orientation=ORIENTATION_0 +PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.ignore_hwc_physical_display_orientation=true + # Display white balance PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ ro.surface_flinger.display_primary_red=0.5128,0.2413,0.0000 \ From e28a4937ec9f608ced6008a9789ab190c5c09913 Mon Sep 17 00:00:00 2001 From: Mariia Sandrikova Date: Sat, 10 Dec 2022 02:37:22 +0000 Subject: [PATCH 2/2] [2/2][Pro] Set orientation for boot animation and default display rotation. Change the default display rotation value and boot animation orientation to 270. This is needed to preserve primary landscape UX after device natural orientation changes to portrait. Context: go/tangor-natural-orientation Bug: 260627934 Test: manual test with all 4 values Change-Id: I1ff42f7df21ec8231ff19fd7e209cfbb84537f93 --- device-tangorpro.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/device-tangorpro.mk b/device-tangorpro.mk index 13aa7e6..db59603 100644 --- a/device-tangorpro.mk +++ b/device-tangorpro.mk @@ -150,6 +150,11 @@ PRODUCT_PROPERTY_OVERRIDES += ro.crypto.metadata_init_delete_all_keys.enabled=fa PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.primary_display_orientation=ORIENTATION_0 PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.ignore_hwc_physical_display_orientation=true +# Set boot animation orientation and default display rotation to be landscape since Tangor +# natural orientation is portrait. Id at the end corresponds to the display id on the device. +# See b/246793311 for context. +PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.bootanim.set_orientation_4619827677550801152=ORIENTATION_270 + # Display white balance PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ ro.surface_flinger.display_primary_red=0.5128,0.2413,0.0000 \