Add channels support for the Android TV (Oreo)

This commit is contained in:
GinVavilon
2019-07-07 22:07:35 +03:00
parent cf98ec2c41
commit df7333b8d0
11 changed files with 481 additions and 3 deletions

View File

@@ -65,7 +65,7 @@ public class DiskAssetLoader {
}
public Bitmap loadBitmapFromCache(CachedAppAssetLoader.LoaderTuple tuple, int sampleSize) {
File file = CacheHelper.openPath(false, cacheDir, "boxart", tuple.computer.uuid, tuple.app.getAppId() + ".png");
File file = getFile(tuple.computer.uuid, tuple.app.getAppId());
// Don't bother with anything if it doesn't exist
if (!file.exists()) {
@@ -133,6 +133,10 @@ public class DiskAssetLoader {
return bmp;
}
public File getFile(String computerUuid, int appId) {
return CacheHelper.openPath(false, cacheDir, "boxart", computerUuid, appId + ".png");
}
public void populateCacheWithStream(CachedAppAssetLoader.LoaderTuple tuple, InputStream input) {
OutputStream out = null;
boolean success = false;