cmsdk: add method for checking dynamic tiles
Change-Id: I946c15a531a5985b51924cbf3a1eb191b2833e51 Signed-off-by: Roman Birg <roman@cyngn.com>
This commit is contained in:
parent
d1129cc9f0
commit
be1678b867
@ -61,6 +61,7 @@ public class QSConstants {
|
||||
public static final String DYNAMIC_TILE_ADB = "adb";
|
||||
|
||||
protected static final ArrayList<String> STATIC_TILES_AVAILABLE = new ArrayList<String>();
|
||||
protected static final ArrayList<String> DYNAMIC_TILES_AVAILBLE = new ArrayList<String>();
|
||||
protected static final ArrayList<String> TILES_AVAILABLE = new ArrayList<String>();
|
||||
|
||||
static {
|
||||
@ -99,5 +100,10 @@ public class QSConstants {
|
||||
// STATIC_TILES_AVAILABLE.add(TILE_BATTERY_SAVER);
|
||||
|
||||
TILES_AVAILABLE.addAll(STATIC_TILES_AVAILABLE);
|
||||
|
||||
DYNAMIC_TILES_AVAILBLE.add(DYNAMIC_TILE_ADB);
|
||||
DYNAMIC_TILES_AVAILBLE.add(DYNAMIC_TILE_IME_SELECTOR);
|
||||
DYNAMIC_TILES_AVAILBLE.add(DYNAMIC_TILE_NEXT_ALARM);
|
||||
DYNAMIC_TILES_AVAILBLE.add(DYNAMIC_TILE_SU);
|
||||
}
|
||||
}
|
@ -62,6 +62,10 @@ public class QSUtils {
|
||||
return QSConstants.STATIC_TILES_AVAILABLE.contains(tileSpec);
|
||||
}
|
||||
|
||||
public static boolean isDynamicQsTile(String tileSpec) {
|
||||
return QSConstants.DYNAMIC_TILES_AVAILBLE.contains(tileSpec);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static List<String> getAvailableTiles(Context context) {
|
||||
filterTiles(context);
|
||||
|
Loading…
Reference in New Issue
Block a user