Search in sources :

Example 26 with Tile

use of android.service.quicksettings.Tile in project NetGuard by M66B.

the class ServiceTileGraph method update.

private void update() {
    SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
    boolean stats = prefs.getBoolean("show_stats", false);
    Tile tile = getQsTile();
    if (tile != null) {
        tile.setState(stats ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE);
        tile.updateTile();
    }
}
Also used : SharedPreferences(android.content.SharedPreferences) Tile(android.service.quicksettings.Tile)

Aggregations

Tile (android.service.quicksettings.Tile)26 ComponentName (android.content.ComponentName)13 Intent (android.content.Intent)13 Handler (android.os.Handler)12 UserHandle (android.os.UserHandle)12 PendingIntent (android.app.PendingIntent)7 QSTile (com.android.systemui.qs.QSTile)7 CustomTile (com.android.systemui.qs.external.CustomTile)7 TileLifecycleManager (com.android.systemui.qs.external.TileLifecycleManager)7 AirplaneModeTile (com.android.systemui.qs.tiles.AirplaneModeTile)7 BatteryTile (com.android.systemui.qs.tiles.BatteryTile)7 BluetoothTile (com.android.systemui.qs.tiles.BluetoothTile)7 CastTile (com.android.systemui.qs.tiles.CastTile)7 CellularTile (com.android.systemui.qs.tiles.CellularTile)7 ColorInversionTile (com.android.systemui.qs.tiles.ColorInversionTile)7 DataSaverTile (com.android.systemui.qs.tiles.DataSaverTile)7 DndTile (com.android.systemui.qs.tiles.DndTile)7 FlashlightTile (com.android.systemui.qs.tiles.FlashlightTile)7 HotspotTile (com.android.systemui.qs.tiles.HotspotTile)7 IntentTile (com.android.systemui.qs.tiles.IntentTile)7