19d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkey/*
29d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkey * Copyright (C) 2013 The Android Open Source Project
39d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkey *
49d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkey * Licensed under the Apache License, Version 2.0 (the "License");
59d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkey * you may not use this file except in compliance with the License.
69d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkey * You may obtain a copy of the License at
79d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkey *
89d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkey *      http://www.apache.org/licenses/LICENSE-2.0
99d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkey *
109d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkey * Unless required by applicable law or agreed to in writing, software
119d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkey * distributed under the License is distributed on an "AS IS" BASIS,
129d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkey * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
139d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkey * See the License for the specific language governing permissions and
149d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkey * limitations under the License.
159d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkey */
169d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkey
179d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkeypackage com.android.documentsui;
189d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkey
199d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkeyimport android.graphics.Bitmap;
209d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkeyimport android.net.Uri;
219d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkeyimport android.util.LruCache;
229d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkey
239d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkeypublic class ThumbnailCache extends LruCache<Uri, Bitmap> {
249d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkey    public ThumbnailCache(int maxSizeBytes) {
259d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkey        super(maxSizeBytes);
269d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkey    }
279d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkey
289d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkey    @Override
299d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkey    protected int sizeOf(Uri key, Bitmap value) {
309d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkey        return value.getByteCount();
319d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkey    }
329d0843df7e3984293dc4ab6ee2f9502e898b63aaJeff Sharkey}
33