CMSDK : Ensure getAvailableTiles clones object

Not doing so results in unwanted modifications
to the underlying array.

Change-Id: I344cb556aea5c7b1ac8b199f496eec0d50dae28c
This commit is contained in:
Danesh M 2015-12-10 14:52:29 -08:00
parent 55eb818adc
commit ed0f0cec77
1 changed files with 2 additions and 1 deletions

View File

@ -66,9 +66,10 @@ public class QSUtils {
return QSConstants.DYNAMIC_TILES_AVAILABLE.contains(tileSpec);
}
@SuppressWarnings("unchecked")
public static List<String> getAvailableTiles(Context context) {
filterTiles(context);
return QSConstants.TILES_AVAILABLE;
return (List<String>) QSConstants.TILES_AVAILABLE.clone();
}
public static List<String> getDefaultTiles(Context context) {