Lines Matching refs:to

1 # Quick Settings Tiles (almost all there is to know about them)
7 …ettings tiles. It provides descriptions about the lifecycle of a tile, how to create new tiles and…
11 Quick Settings (from now on, QS) is the expanded panel that contains shortcuts for the user to togg…
13 …or tiles for short). They allow the user to enable or disable settings quickly and sometimes provi…
25 …ckControllerImpl.java). This controller for the `RotationLockTile` listens to changes in all users.
35 …* `State`: Encapsulates the state of the Tile in order to communicate between the backend and the …
37 …d here by a class that extends `QSTileImpl`. These implementations connect to corresponding contro…
38 …evice and notify the tile when a change has occurred (for example, bluetooth connected to a device)
39 …* accept actions from the tiles to modify the state of the phone (for example, enablind and disabl…
40 …al/CustomTile.java): Equivalent to the tiles in the previous item, but used for 3rd party tiles. I…
44 … well as other interfaces described in this document can be used to implement plugins to add addit…
48 Each tile has an associated `State` object that is used to communicate information to the correspon…
51 * **`icon`**; icon to display. It may depend on the current state.
53 * **`secondaryLabel`**: text to display in a second line. Usually extra state information.
55 … the tile as well as the new state when it's toggled. For this, the Tile has to use `BooleanState`.
56 * **`handlesLongClick`**: whether the Tile will handle long click. If it won't, it should be set to
60 Additionally. `BooleanState` has a `value` boolean field that usually would be set to `state == Til…
64 …some common functions and leaves others to be implemented by each tile, in particular those that d…
66 For more information on how to implement a tile in SystemUI, see [Implementing a SystemUI tile](#im…
72 …t provides basic Tile functionality. These allows external [Factories](#qsfactory) to create Tiles.
84 `QSIconView` is an interface that define the basic actions that icons have to respond to. Its base …
86 This `ViewGroup` is a container for the icon used in each tile. It has methods to apply the current…
92 …`State`. The backend populates the state, and then the view maps the state to a visual representat…
94 It's important to notice that the state of the tile (internal or visual) is not directly modified b…
96 When a container for tiles (`QuickQSPanel` or `QSPanel`) has to display tiles, they create a [`Tile…
98 * Create the corresponding `QSTileView` to display in that container.
99 * Create a callback for `QSTile` to call when its state changes. Note that a single tile will norma…
113 …dateState` is called to update the state with the new information. This information can be obtaine…
114 …ment), `QSTileImpl#handleStateChanged` is called. This will trigger a call to all the associated `…
116 * The tile colors change to match the new state.
117 …* `QSIconView.setIcon` is called to apply the correct state to the icon and the correct icon to th…
118 * The tile labels change to match the new state.
130 Parcelable class used to communicate information about the state between the external app and Syste…
138 Additionally, it provides a method to notify SystemUI that the information may have changed and the…
142to be implemented by the developer. The Service manifest must have the permission `android.permiss…
144 The implementer is responsible for creating the methods that will respond to the following calls fr…
146 * **`onTileAdded`**: called when the tile is added to QS.
166 …Provide information about the secure state of the device. This can be used by the tile to accept o…
172 …May prompt the user to unlock the device if locked. Once the device is unlocked, it runs the given…
182 …oken (`Binder`). This token is used in the callbacks to identify this `TileService` and match it t…
184 …nd the tile is set to stop listening, it will be unbound after a delay of `TileServiceManager#UNBI…
188to its manifest (see [TileService#META_DATA_ACTIVE_TILE](https://developer.android.com/reference/a…
194 The following sections describe the classes that live in SystemUI to support third party tiles. The…
198 This class is an subclass of `QSTileImpl` to be used with third party tiles. It provides similar be…
202 …ceives all calls from current `TileService` components and dispatches them to SystemUI or the corr…
204to this class, it matches the corresponding token assigned to the `TileService` with the `Componen…
206 …leService` that's currently bound, it is also in charge of requesting some to be unbound whenever …
210to a particular `TileService` when necessary, as well as sending the corresponding binder calls. I…
212 The class has a queue that stores requests while the service is not bound, to be processed as soon …
214 …er` when its corresponding tile is added to the set of current ones and kept as long as the tile i…
218 …n the `TileServices` controller and a `TileLifecycleManager` corresponding to a particular `TileSe…
222 * Deciding when to bind and unbind, requesting it to the `TileLifecycleManager`.
223 * Relaying messages to the `TileService` through the `TileLifecycleManager`.
224 * Determining the service's bind priority (to deal with OOM situations).
225 …cting when the package/component has been removed in order to remove the tile and references to it.
233 …lected by the current user (backed in the Secure Setting `sysui_qs_tiles`) to be displayed in Quic…
235 …n the tiles and the StatusBar, for example to open it and collapse it. And a way for the StatusBar…
245 This interface provides a way of creating tiles and views from a spec. It can be used in plugins to
259to create a `CustomTile` for the component in the spec. This could fail (the component is not a va…
269 …e that are common to SystemUI tiles and third party tiles. Following that, there will be a section…
271 …tomizer by the user. This will immediately save the new list of tile specs to the Secure Setting `…
273 … registered in order to find the first one that will be able to create a tile with that spec. Assu…
275 5. For each tile in this list, a `QSTileView` is created (collapsed or expanded) and attached to a …
276 … * a callback is attached to the tile to communicate between the backend and the view or the panel.
277 * the click listeners in the tile are attached to those of the view.
278 6. The tile view is added to the corresponding layout.
280 …ks and making sure that the backends remove themselves from the controllers they were listening to.
284 …, when a `CustomTile` is created, additional steps are taken to ensure the proper binding to the s…
286 …CustomTile` contains the `ComponentName` of the associated service, this can be used to bind to it.
287 2. The `TileServiceManager` creates its own `TileLifecycleManager` to take care of binding to the s…
298 …abstract-methods-in-qstileimpl). Look at other tiles for help. Some considerations to have in mind:
299 …pport long click (like the `FlashlightTile`), set `state.handlesLongClick` to `false` (maybe in `n…
300 * Changes to the tile state (either from controllers or from clicks) should call `refreshState`.
301 …* Use only `handleUpdateState` to modify the values of the state to the new ones. This can be done…
302 …* If the controller is not a `CallbackController`, respond to `handleSetListening` by attaching/de…
308 @StringKey(YourNewTile.TILE_SPEC) // A unique word that will map to YourNewTile
311 … add it also to `quick_settings_tiles_default`. The first one contains a list of all the tiles tha…
312 …xml), add a new array for your tile. The name has to be `tile_states_<spec>`. Use a good descripti…
313 …qs/tileimpl/QSTileViewImpl.kt), add a new element to the map in `SubtitleArrayMapping` correspondi…
317 Following are methods that need to be implemented when creating a new SystemUI tile. `TState` is a …
323 …Creates a new `State` for this tile to use. Each time the state changes, it is copied into a new o…
331 …Initiates or terminates listening behavior, like listening to Callbacks from controllers. This get…
337 …Allows a Tile to use a `QSIconView` different from `QSIconViewImpl` (see [Tile views](#tile-views)…
353to do when the Tile is clicked. In general, a Tile will make calls to its controller here and mayb…
355 …By default long click redirects to click and long click launches the intent defined in `getLongCli…
368 …to/src/metrics_constants/metrics_constants.proto). This is used to log events related to this Tile…
375 …Determines if a Tile is available to be used (for example, disable `WifiTile` in devices with no W…
381 …Provides a default label for this Tile. Used by the QS Panel customizer to show a name next to eac…