Loading core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -660,6 +660,9 @@ <!-- Indicates whether to enable an animation when unfolding a device or not --> <bool name="config_unfoldTransitionEnabled">false</bool> <!-- Indicates whether to enable hinge angle sensor when using unfold animation --> <bool name="config_unfoldTransitionHingeAngle">false</bool> <!-- Indicates that the device supports having more than one internal display on at the same time. Only applicable to devices with more than one internal display. If this option is set to false, DisplayManager will make additional effort to ensure no more than 1 internal Loading core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -3842,6 +3842,7 @@ <java-symbol type="string" name="config_foldedArea" /> <java-symbol type="bool" name="config_supportsConcurrentInternalDisplays" /> <java-symbol type="bool" name="config_unfoldTransitionEnabled" /> <java-symbol type="bool" name="config_unfoldTransitionHingeAngle" /> <java-symbol type="array" name="config_perDeviceStateRotationLockDefaults" /> Loading packages/SystemUI/shared/src/com/android/systemui/unfold/UnfoldTransitionFactory.kt +8 −1 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import com.android.systemui.unfold.progress.FixedTimingTransitionProgressProvide import com.android.systemui.unfold.progress.PhysicsBasedUnfoldTransitionProgressProvider import com.android.systemui.unfold.updates.DeviceFoldStateProvider import com.android.systemui.unfold.updates.hinge.EmptyHingeAngleProvider import com.android.systemui.unfold.updates.hinge.HingeSensorAngleProvider import com.android.systemui.unfold.updates.hinge.RotationSensorHingeAngleProvider import java.lang.IllegalStateException import java.util.concurrent.Executor Loading @@ -50,7 +51,13 @@ fun createUnfoldTransitionProgressProvider( val hingeAngleProvider = if (config.mode == ANIMATION_MODE_HINGE_ANGLE) { // TODO: after removing temporary "config.mode" we should just // switch between fixed timing and hinge sensor based on this flag if (config.isHingeAngleEnabled) { HingeSensorAngleProvider(sensorManager) } else { RotationSensorHingeAngleProvider(sensorManager) } } else { EmptyHingeAngleProvider() } Loading packages/SystemUI/shared/src/com/android/systemui/unfold/config/ResourceUnfoldTransitionConfig.kt +6 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,9 @@ internal class ResourceUnfoldTransitionConfig( override val isEnabled: Boolean get() = readIsEnabled() && mode != ANIMATION_MODE_DISABLED override val isHingeAngleEnabled: Boolean get() = readIsHingeAngleEnabled() @AnimationMode override val mode: Int get() = SystemProperties.getInt(UNFOLD_TRANSITION_MODE_PROPERTY_NAME, Loading @@ -32,6 +35,9 @@ internal class ResourceUnfoldTransitionConfig( private fun readIsEnabled(): Boolean = context.resources .getBoolean(com.android.internal.R.bool.config_unfoldTransitionEnabled) private fun readIsHingeAngleEnabled(): Boolean = context.resources .getBoolean(com.android.internal.R.bool.config_unfoldTransitionHingeAngle) } /** Loading packages/SystemUI/shared/src/com/android/systemui/unfold/config/UnfoldTransitionConfig.kt +1 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ import android.annotation.IntDef interface UnfoldTransitionConfig { val isEnabled: Boolean val isHingeAngleEnabled: Boolean @AnimationMode val mode: Int Loading Loading
core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -660,6 +660,9 @@ <!-- Indicates whether to enable an animation when unfolding a device or not --> <bool name="config_unfoldTransitionEnabled">false</bool> <!-- Indicates whether to enable hinge angle sensor when using unfold animation --> <bool name="config_unfoldTransitionHingeAngle">false</bool> <!-- Indicates that the device supports having more than one internal display on at the same time. Only applicable to devices with more than one internal display. If this option is set to false, DisplayManager will make additional effort to ensure no more than 1 internal Loading
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -3842,6 +3842,7 @@ <java-symbol type="string" name="config_foldedArea" /> <java-symbol type="bool" name="config_supportsConcurrentInternalDisplays" /> <java-symbol type="bool" name="config_unfoldTransitionEnabled" /> <java-symbol type="bool" name="config_unfoldTransitionHingeAngle" /> <java-symbol type="array" name="config_perDeviceStateRotationLockDefaults" /> Loading
packages/SystemUI/shared/src/com/android/systemui/unfold/UnfoldTransitionFactory.kt +8 −1 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import com.android.systemui.unfold.progress.FixedTimingTransitionProgressProvide import com.android.systemui.unfold.progress.PhysicsBasedUnfoldTransitionProgressProvider import com.android.systemui.unfold.updates.DeviceFoldStateProvider import com.android.systemui.unfold.updates.hinge.EmptyHingeAngleProvider import com.android.systemui.unfold.updates.hinge.HingeSensorAngleProvider import com.android.systemui.unfold.updates.hinge.RotationSensorHingeAngleProvider import java.lang.IllegalStateException import java.util.concurrent.Executor Loading @@ -50,7 +51,13 @@ fun createUnfoldTransitionProgressProvider( val hingeAngleProvider = if (config.mode == ANIMATION_MODE_HINGE_ANGLE) { // TODO: after removing temporary "config.mode" we should just // switch between fixed timing and hinge sensor based on this flag if (config.isHingeAngleEnabled) { HingeSensorAngleProvider(sensorManager) } else { RotationSensorHingeAngleProvider(sensorManager) } } else { EmptyHingeAngleProvider() } Loading
packages/SystemUI/shared/src/com/android/systemui/unfold/config/ResourceUnfoldTransitionConfig.kt +6 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,9 @@ internal class ResourceUnfoldTransitionConfig( override val isEnabled: Boolean get() = readIsEnabled() && mode != ANIMATION_MODE_DISABLED override val isHingeAngleEnabled: Boolean get() = readIsHingeAngleEnabled() @AnimationMode override val mode: Int get() = SystemProperties.getInt(UNFOLD_TRANSITION_MODE_PROPERTY_NAME, Loading @@ -32,6 +35,9 @@ internal class ResourceUnfoldTransitionConfig( private fun readIsEnabled(): Boolean = context.resources .getBoolean(com.android.internal.R.bool.config_unfoldTransitionEnabled) private fun readIsHingeAngleEnabled(): Boolean = context.resources .getBoolean(com.android.internal.R.bool.config_unfoldTransitionHingeAngle) } /** Loading
packages/SystemUI/shared/src/com/android/systemui/unfold/config/UnfoldTransitionConfig.kt +1 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ import android.annotation.IntDef interface UnfoldTransitionConfig { val isEnabled: Boolean val isHingeAngleEnabled: Boolean @AnimationMode val mode: Int Loading