org.robolectric.shadows.ShadowTileService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of shadows-framework Show documentation
Show all versions of shadows-framework Show documentation
An alternative Android testing framework.
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