Loading core/java/android/service/controls/templates/ControlTemplate.java +6 −3 Original line number Diff line number Diff line Loading @@ -214,10 +214,13 @@ public abstract class ControlTemplate { } /** * Get a singleton {@link ControlTemplate} that has no features. * Get a singleton {@link ControlTemplate}, which supports no direct user input. * * This template has no distinctive field, not even an identifier. Used for a {@link Control} * that accepts no type of input, or when there is no known state. * Used by {@link Control.StatelessBuilder} when there is no known state. Can also be used * in {@link Control.StatefulBuilder} for conveying information to a user about the * {@link Control} but direct user interaction is not desired. Since this template has no * corresponding {@link ControlAction}, any user interaction will launch the * {@link Control#getAppIntent()}. * * @return a singleton {@link ControlTemplate} to indicate no specific template is used by * this {@link Control} Loading packages/SystemUI/src/com/android/systemui/controls/ui/ControlViewHolder.kt +5 −1 Original line number Diff line number Diff line Loading @@ -89,6 +89,7 @@ class ControlViewHolder( return when { status != Control.STATUS_OK -> StatusBehavior::class deviceType == DeviceTypes.TYPE_CAMERA -> TouchBehavior::class template == ControlTemplate.NO_TEMPLATE -> TouchBehavior::class template is ToggleTemplate -> ToggleBehavior::class template is StatelessTemplate -> TouchBehavior::class template is ToggleRangeTemplate -> ToggleRangeBehavior::class Loading Loading @@ -235,7 +236,10 @@ class ControlViewHolder( controlsController.action(cws.componentName, cws.ci, action) } fun usePanel(): Boolean = deviceType in ControlViewHolder.FORCE_PANEL_DEVICES fun usePanel(): Boolean { return deviceType in ControlViewHolder.FORCE_PANEL_DEVICES || controlTemplate == ControlTemplate.NO_TEMPLATE } fun bindBehavior( existingBehavior: Behavior?, Loading Loading
core/java/android/service/controls/templates/ControlTemplate.java +6 −3 Original line number Diff line number Diff line Loading @@ -214,10 +214,13 @@ public abstract class ControlTemplate { } /** * Get a singleton {@link ControlTemplate} that has no features. * Get a singleton {@link ControlTemplate}, which supports no direct user input. * * This template has no distinctive field, not even an identifier. Used for a {@link Control} * that accepts no type of input, or when there is no known state. * Used by {@link Control.StatelessBuilder} when there is no known state. Can also be used * in {@link Control.StatefulBuilder} for conveying information to a user about the * {@link Control} but direct user interaction is not desired. Since this template has no * corresponding {@link ControlAction}, any user interaction will launch the * {@link Control#getAppIntent()}. * * @return a singleton {@link ControlTemplate} to indicate no specific template is used by * this {@link Control} Loading
packages/SystemUI/src/com/android/systemui/controls/ui/ControlViewHolder.kt +5 −1 Original line number Diff line number Diff line Loading @@ -89,6 +89,7 @@ class ControlViewHolder( return when { status != Control.STATUS_OK -> StatusBehavior::class deviceType == DeviceTypes.TYPE_CAMERA -> TouchBehavior::class template == ControlTemplate.NO_TEMPLATE -> TouchBehavior::class template is ToggleTemplate -> ToggleBehavior::class template is StatelessTemplate -> TouchBehavior::class template is ToggleRangeTemplate -> ToggleRangeBehavior::class Loading Loading @@ -235,7 +236,10 @@ class ControlViewHolder( controlsController.action(cws.componentName, cws.ci, action) } fun usePanel(): Boolean = deviceType in ControlViewHolder.FORCE_PANEL_DEVICES fun usePanel(): Boolean { return deviceType in ControlViewHolder.FORCE_PANEL_DEVICES || controlTemplate == ControlTemplate.NO_TEMPLATE } fun bindBehavior( existingBehavior: Behavior?, Loading