1 package com.android.systemui.unfold.updates.hinge 2 3 import androidx.core.util.Consumer 4 import com.android.systemui.statusbar.policy.CallbackController 5 6 /** 7 * Emits device hinge angle values (angle between two integral parts of the device). 8 * The hinge angle could be from 0 to 360 degrees inclusive. 9 * For foldable devices usually 0 corresponds to fully closed (folded) state and 10 * 180 degrees corresponds to fully open (flat) state 11 */ 12 interface HingeAngleProvider : CallbackController<Consumer<Float>> { 13 fun start() 14 fun stop() 15 } 16 17 const val FULLY_OPEN_DEGREES = 180f 18 const val FULLY_CLOSED_DEGREES = 0f 19