summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorMarin Shalamanov <shalamanov@google.com>2020-10-14 17:57:53 +0200
committerMarin Shalamanov <shalamanov@google.com>2020-10-26 13:01:00 +0100
commita6d8306da946dd6727893a22ab9beb1bb9216295 (patch)
tree86960f9a6ebee83fa28c58b52f31cfca63f1108c /core/java/android
parentbfa53ec4ee144f3021c50512f586c70e55caa20e (diff)
Add mModeSwitchingType to DisplayModeDirector
Add mModeSwitchingType to DisplayModeDirector which describes the allow mode switching type for SurfaceFlinger. This value is piped to SurfaceFlinger via allowGroupSwitching in DesiredDisplayModeSpecs. The value for mModeSwitchingType defaults to SWITCHING_TYPE_WITHIN_GROUPS, which is the current beheviour in SurfaceFlinger and it'll be later updated from user settings. Bug: 161776333 Test: not yet Change-Id: I851eaee7f86083d97204cf3553e728350c942dfe
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/view/SurfaceControl.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/core/java/android/view/SurfaceControl.java b/core/java/android/view/SurfaceControl.java
index bbdd7d339507..fdccfd8e2dc8 100644
--- a/core/java/android/view/SurfaceControl.java
+++ b/core/java/android/view/SurfaceControl.java
@@ -1897,16 +1897,23 @@ public final class SurfaceControl implements Parcelable {
public float appRequestRefreshRateMin;
public float appRequestRefreshRateMax;
+ /**
+ * If true this will allow switching between modes in different display configuration
+ * groups. This way the user may see visual interruptions when the display mode changes.
+ */
+ public boolean allowGroupSwitching;
+
public DesiredDisplayConfigSpecs() {}
public DesiredDisplayConfigSpecs(DesiredDisplayConfigSpecs other) {
copyFrom(other);
}
- public DesiredDisplayConfigSpecs(int defaultConfig, float primaryRefreshRateMin,
- float primaryRefreshRateMax, float appRequestRefreshRateMin,
- float appRequestRefreshRateMax) {
+ public DesiredDisplayConfigSpecs(int defaultConfig, boolean allowGroupSwitching,
+ float primaryRefreshRateMin, float primaryRefreshRateMax,
+ float appRequestRefreshRateMin, float appRequestRefreshRateMax) {
this.defaultConfig = defaultConfig;
+ this.allowGroupSwitching = allowGroupSwitching;
this.primaryRefreshRateMin = primaryRefreshRateMin;
this.primaryRefreshRateMax = primaryRefreshRateMax;
this.appRequestRefreshRateMin = appRequestRefreshRateMin;