Changing min sdk to 25

Change-Id: I0d28069967854357ca755bf25dec19d4979bdecf
diff --git a/iconloaderlib/build.gradle b/iconloaderlib/build.gradle
index f6a820a..4fd3189 100644
--- a/iconloaderlib/build.gradle
+++ b/iconloaderlib/build.gradle
@@ -16,7 +16,7 @@
     publishNonDefault true
 
     defaultConfig {
-        minSdkVersion 21
+        minSdkVersion 25
         targetSdkVersion 28
         versionCode 1
         versionName "1.0"
diff --git a/iconloaderlib/src/com/android/launcher3/icons/FixedScaleDrawable.java b/iconloaderlib/src/com/android/launcher3/icons/FixedScaleDrawable.java
index e594f47..516965e 100644
--- a/iconloaderlib/src/com/android/launcher3/icons/FixedScaleDrawable.java
+++ b/iconloaderlib/src/com/android/launcher3/icons/FixedScaleDrawable.java
@@ -1,12 +1,10 @@
 package com.android.launcher3.icons;
 
-import android.annotation.TargetApi;
 import android.content.res.Resources;
 import android.content.res.Resources.Theme;
 import android.graphics.Canvas;
 import android.graphics.drawable.ColorDrawable;
 import android.graphics.drawable.DrawableWrapper;
-import android.os.Build;
 import android.util.AttributeSet;
 
 import org.xmlpull.v1.XmlPullParser;
@@ -14,7 +12,6 @@
 /**
  * Extension of {@link DrawableWrapper} which scales the child drawables by a fixed amount.
  */
-@TargetApi(Build.VERSION_CODES.N)
 public class FixedScaleDrawable extends DrawableWrapper {
 
     // TODO b/33553066 use the constant defined in MaskableIconDrawable
diff --git a/iconloaderlib/src/com/android/launcher3/icons/cache/BaseIconCache.java b/iconloaderlib/src/com/android/launcher3/icons/cache/BaseIconCache.java
index ce66448..2966cb1 100644
--- a/iconloaderlib/src/com/android/launcher3/icons/cache/BaseIconCache.java
+++ b/iconloaderlib/src/com/android/launcher3/icons/cache/BaseIconCache.java
@@ -47,16 +47,15 @@
 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 @@
      * 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 @@
      */
     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 @@
 
     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);
diff --git a/iconloaderlib/src/com/android/launcher3/util/Provider.java b/iconloaderlib/src/com/android/launcher3/util/Provider.java
deleted file mode 100644
index 4a54c0f..0000000
--- a/iconloaderlib/src/com/android/launcher3/util/Provider.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.launcher3.util;
-
-/**
- * Utility class to allow lazy initialization of objects.
- */
-public interface Provider<T> {
-
-    /**
-     * Initializes and returns the object. This may contain expensive operations not suitable
-     * to UI thread.
-     */
-    T get();
-
-    static <T> Provider<T> of (T value) {
-        return() -> value;
-    }
-}