Changing min sdk to 25

Change-Id: I0d28069967854357ca755bf25dec19d4979bdecf
This commit is contained in:
Sunny Goyal
2019-01-25 15:10:18 -08:00
parent 9752705e92
commit 8c48d8bea6
55 changed files with 283 additions and 753 deletions

View File

@@ -47,16 +47,15 @@ import com.android.launcher3.icons.BitmapInfo;
import com.android.launcher3.icons.BitmapRenderer;
import com.android.launcher3.icons.GraphicsUtils;
import com.android.launcher3.util.ComponentKey;
import com.android.launcher3.util.Provider;
import com.android.launcher3.util.SQLiteCacheHelper;
import java.util.AbstractMap;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.function.Supplier;
import androidx.annotation.NonNull;
@@ -231,13 +230,8 @@ public abstract class BaseIconCache {
* incorporates all the properties that can affect the cache like locale and system-version.
*/
private void updateSystemState() {
final String locale;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
locale = mContext.getResources().getConfiguration().getLocales().toLanguageTags();
} else {
locale = Locale.getDefault().toString();
}
final String locale =
mContext.getResources().getConfiguration().getLocales().toLanguageTags();
mSystemState = locale + "," + Build.VERSION.SDK_INT;
}
@@ -309,7 +303,7 @@ public abstract class BaseIconCache {
*/
protected <T> CacheEntry cacheLocked(
@NonNull ComponentName componentName, @NonNull UserHandle user,
@NonNull Provider<T> infoProvider, @NonNull CachingLogic<T> cachingLogic,
@NonNull Supplier<T> infoProvider, @NonNull CachingLogic<T> cachingLogic,
boolean usePackageIcon, boolean useLowResIcon) {
return cacheLocked(componentName, user, infoProvider, cachingLogic, usePackageIcon,
useLowResIcon, true);
@@ -317,7 +311,7 @@ public abstract class BaseIconCache {
protected <T> CacheEntry cacheLocked(
@NonNull ComponentName componentName, @NonNull UserHandle user,
@NonNull Provider<T> infoProvider, @NonNull CachingLogic<T> cachingLogic,
@NonNull Supplier<T> infoProvider, @NonNull CachingLogic<T> cachingLogic,
boolean usePackageIcon, boolean useLowResIcon, boolean addToMemCache) {
assertWorkerThread();
ComponentKey cacheKey = new ComponentKey(componentName, user);