All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.robolectric.shadows.ShadowTileService Maven / Gradle / Ivy

There is a newer version: 4.14.1
Show newest version
package org.robolectric.shadows;

import android.os.Build;
import android.service.quicksettings.Tile;
import android.service.quicksettings.TileService;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
import org.robolectric.shadow.api.Shadow;

@Implements(value = TileService.class, minSdk = Build.VERSION_CODES.N)
public final class ShadowTileService {

  private Tile tile;

  @Implementation
  protected final Tile getQsTile() {
    if (tile == null) {
      tile = createTile();
    }
    return tile;
  }

  private static Tile createTile() {
    return Shadow.newInstanceOf(Tile.class);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy