diff --git a/src/com/android/settings/LicenseHtmlGeneratorFromXml.java b/src/com/android/settings/LicenseHtmlGeneratorFromXml.java
deleted file mode 100644
index 7025c5a..0000000
--- a/src/com/android/settings/LicenseHtmlGeneratorFromXml.java
+++ /dev/null
@@ -1,292 +0,0 @@
-/*
- * Copyright (C) 2017 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.settings;
-
-import android.support.annotation.VisibleForTesting;
-import android.text.TextUtils;
-import android.util.Log;
-import android.util.Xml;
-
-import org.xmlpull.v1.XmlPullParser;
-import org.xmlpull.v1.XmlPullParserException;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.zip.GZIPInputStream;
-
-/**
- * The utility class that generate a license html file from xml files.
- * All the HTML snippets and logic are copied from build/make/tools/generate-notice-files.py.
- *
- * TODO: Remove duplicate codes once backward support ends.
- */
-class LicenseHtmlGeneratorFromXml {
-    private static final String TAG = "LicenseHtmlGeneratorFromXml";
-
-    private static final String TAG_ROOT = "licenses";
-    private static final String TAG_FILE_NAME = "file-name";
-    private static final String TAG_FILE_CONTENT = "file-content";
-    private static final String ATTR_CONTENT_ID = "contentId";
-
-    private static final String HTML_HEAD_STRING =
-            "<html><head>\n" +
-            "<style type=\"text/css\">\n" +
-            "body { padding: 0; font-family: sans-serif; }\n" +
-            ".same-license { background-color: #eeeeee;\n" +
-            "                border-top: 20px solid white;\n" +
-            "                padding: 10px; }\n" +
-            ".label { font-weight: bold; }\n" +
-            ".file-list { margin-left: 1em; color: blue; }\n" +
-            "</style>\n" +
-            "</head>" +
-            "<body topmargin=\"0\" leftmargin=\"0\" rightmargin=\"0\" bottommargin=\"0\">\n" +
-            "<div class=\"toc\">\n" +
-            "<ul>";
-
-    private static final String HTML_MIDDLE_STRING =
-            "</ul>\n" +
-            "</div><!-- table of contents -->\n" +
-            "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">";
-
-    private static final String HTML_REAR_STRING =
-            "</table></body></html>";
-
-    private final List<File> mXmlFiles;
-
-    /*
-     * A map from a file name to a content id (MD5 sum of file content) for its license.
-     * For example, "/system/priv-app/TeleService/TeleService.apk" maps to
-     * "9645f39e9db895a4aa6e02cb57294595". Here "9645f39e9db895a4aa6e02cb57294595" is a MD5 sum
-     * of the content of packages/services/Telephony/MODULE_LICENSE_APACHE2.
-     */
-    private final Map<String, String> mFileNameToContentIdMap = new HashMap();
-
-    /*
-     * A map from a content id (MD5 sum of file content) to a license file content.
-     * For example, "9645f39e9db895a4aa6e02cb57294595" maps to the content string of
-     * packages/services/Telephony/MODULE_LICENSE_APACHE2. Here "9645f39e9db895a4aa6e02cb57294595"
-     * is a MD5 sum of the file content.
-     */
-    private final Map<String, String> mContentIdToFileContentMap = new HashMap();
-
-    static class ContentIdAndFileNames {
-        final String mContentId;
-        final List<String> mFileNameList = new ArrayList();
-
-        ContentIdAndFileNames(String contentId) {
-            mContentId = contentId;
-        }
-    }
-
-    private LicenseHtmlGeneratorFromXml(List<File> xmlFiles) {
-        mXmlFiles = xmlFiles;
-    }
-
-    public static boolean generateHtml(List<File> xmlFiles, File outputFile) {
-        LicenseHtmlGeneratorFromXml genertor = new LicenseHtmlGeneratorFromXml(xmlFiles);
-        return genertor.generateHtml(outputFile);
-    }
-
-    private boolean generateHtml(File outputFile) {
-        for (File xmlFile : mXmlFiles) {
-            parse(xmlFile);
-        }
-
-        if (mFileNameToContentIdMap.isEmpty() || mContentIdToFileContentMap.isEmpty()) {
-            return false;
-        }
-
-        PrintWriter writer = null;
-        try {
-            writer = new PrintWriter(outputFile);
-
-            generateHtml(mFileNameToContentIdMap, mContentIdToFileContentMap, writer);
-
-            writer.flush();
-            writer.close();
-            return true;
-        } catch (FileNotFoundException | SecurityException e) {
-            Log.e(TAG, "Failed to generate " + outputFile, e);
-
-            if (writer != null) {
-                writer.close();
-            }
-            return false;
-        }
-    }
-
-    private void parse(File xmlFile) {
-        if (xmlFile == null || !xmlFile.exists() || xmlFile.length() == 0) {
-            return;
-        }
-
-        InputStreamReader in = null;
-        try {
-            if (xmlFile.getName().endsWith(".gz")) {
-                in = new InputStreamReader(new GZIPInputStream(new FileInputStream(xmlFile)));
-            } else {
-                in = new FileReader(xmlFile);
-            }
-
-            parse(in, mFileNameToContentIdMap, mContentIdToFileContentMap);
-
-            in.close();
-        } catch (XmlPullParserException | IOException e) {
-            Log.e(TAG, "Failed to parse " + xmlFile, e);
-            if (in != null) {
-                try {
-                    in.close();
-                } catch (IOException ie) {
-                    Log.w(TAG, "Failed to close " + xmlFile);
-                }
-            }
-        }
-    }
-
-    /*
-     * Parses an input stream and fills a map from a file name to a content id for its license
-     * and a map from a content id to a license file content.
-     *
-     * Following xml format is expected from the input stream.
-     *
-     *     <licenses>
-     *     <file-name contentId="content_id_of_license1">file1</file-name>
-     *     <file-name contentId="content_id_of_license2">file2</file-name>
-     *     ...
-     *     <file-content contentId="content_id_of_license1">license1 file contents</file-content>
-     *     <file-content contentId="content_id_of_license2">license2 file contents</file-content>
-     *     ...
-     *     </licenses>
-     */
-    @VisibleForTesting
-    static void parse(InputStreamReader in, Map<String, String> outFileNameToContentIdMap,
-            Map<String, String> outContentIdToFileContentMap)
-                    throws XmlPullParserException, IOException {
-        Map<String, String> fileNameToContentIdMap = new HashMap<String, String>();
-        Map<String, String> contentIdToFileContentMap = new HashMap<String, String>();
-
-        XmlPullParser parser = Xml.newPullParser();
-        parser.setInput(in);
-        parser.nextTag();
-
-        parser.require(XmlPullParser.START_TAG, "", TAG_ROOT);
-
-        int state = parser.getEventType();
-        while (state != XmlPullParser.END_DOCUMENT) {
-            if (state == XmlPullParser.START_TAG) {
-                if (TAG_FILE_NAME.equals(parser.getName())) {
-                    String contentId = parser.getAttributeValue("", ATTR_CONTENT_ID);
-                        if (!TextUtils.isEmpty(contentId)) {
-                        String fileName = readText(parser).trim();
-                        if (!TextUtils.isEmpty(fileName)) {
-                            fileNameToContentIdMap.put(fileName, contentId);
-                        }
-                    }
-                } else if (TAG_FILE_CONTENT.equals(parser.getName())) {
-                    String contentId = parser.getAttributeValue("", ATTR_CONTENT_ID);
-                    if (!TextUtils.isEmpty(contentId) &&
-                            !outContentIdToFileContentMap.containsKey(contentId) &&
-                            !contentIdToFileContentMap.containsKey(contentId)) {
-                        String fileContent = readText(parser);
-                        if (!TextUtils.isEmpty(fileContent)) {
-                            contentIdToFileContentMap.put(contentId, fileContent);
-                        }
-                    }
-                }
-            }
-
-            state = parser.next();
-        }
-        outFileNameToContentIdMap.putAll(fileNameToContentIdMap);
-        outContentIdToFileContentMap.putAll(contentIdToFileContentMap);
-    }
-
-    private static String readText(XmlPullParser parser)
-            throws IOException, XmlPullParserException {
-        StringBuffer result = new StringBuffer();
-        int state = parser.next();
-        while (state == XmlPullParser.TEXT) {
-            result.append(parser.getText());
-            state = parser.next();
-        }
-        return result.toString();
-    }
-
-    @VisibleForTesting
-    static void generateHtml(Map<String, String> fileNameToContentIdMap,
-            Map<String, String> contentIdToFileContentMap, PrintWriter writer) {
-        List<String> fileNameList = new ArrayList();
-        fileNameList.addAll(fileNameToContentIdMap.keySet());
-        Collections.sort(fileNameList);
-
-        writer.println(HTML_HEAD_STRING);
-
-        int count = 0;
-        Map<String, Integer> contentIdToOrderMap = new HashMap();
-        List<ContentIdAndFileNames> contentIdAndFileNamesList = new ArrayList();
-
-        // Prints all the file list with a link to its license file content.
-        for (String fileName : fileNameList) {
-            String contentId = fileNameToContentIdMap.get(fileName);
-            // Assigns an id to a newly referred license file content.
-            if (!contentIdToOrderMap.containsKey(contentId)) {
-                contentIdToOrderMap.put(contentId, count);
-
-                // An index in contentIdAndFileNamesList is the order of each element.
-                contentIdAndFileNamesList.add(new ContentIdAndFileNames(contentId));
-                count++;
-            }
-
-            int id = contentIdToOrderMap.get(contentId);
-            contentIdAndFileNamesList.get(id).mFileNameList.add(fileName);
-            writer.format("<li><a href=\"#id%d\">%s</a></li>\n", id, fileName);
-        }
-
-        writer.println(HTML_MIDDLE_STRING);
-
-        count = 0;
-        // Prints all contents of the license files in order of id.
-        for (ContentIdAndFileNames contentIdAndFileNames : contentIdAndFileNamesList) {
-            writer.format("<tr id=\"id%d\"><td class=\"same-license\">\n", count);
-            writer.println("<div class=\"label\">Notices for file(s):</div>");
-            writer.println("<div class=\"file-list\">");
-            for (String fileName : contentIdAndFileNames.mFileNameList) {
-                writer.format("%s <br/>\n", fileName);
-            }
-            writer.println("</div><!-- file-list -->");
-            writer.println("<pre class=\"license-text\">");
-            writer.println(contentIdToFileContentMap.get(
-                    contentIdAndFileNames.mContentId));
-            writer.println("</pre><!-- license-text -->");
-            writer.println("</td></tr><!-- same-license -->");
-
-            count++;
-        }
-
-        writer.println(HTML_REAR_STRING);
-    }
-}
diff --git a/src/com/android/settings/LicenseHtmlLoader.java b/src/com/android/settings/LicenseHtmlLoader.java
deleted file mode 100644
index 9717926..0000000
--- a/src/com/android/settings/LicenseHtmlLoader.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (C) 2017 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.settings;
-
-import android.content.Context;
-import android.support.annotation.VisibleForTesting;
-import android.util.Log;
-
-import com.android.settings.utils.AsyncLoader;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * LicenseHtmlLoader is a loader which loads a license html file from default license xml files.
- */
-class LicenseHtmlLoader extends AsyncLoader<File> {
-    private static final String TAG = "LicenseHtmlLoader";
-
-    private static final String[] DEFAULT_LICENSE_XML_PATHS = {
-                "/system/etc/NOTICE.xml.gz",
-                "/vendor/etc/NOTICE.xml.gz",
-                "/odm/etc/NOTICE.xml.gz",
-                "/oem/etc/NOTICE.xml.gz"};
-    private static final String NOTICE_HTML_FILE_NAME = "NOTICE.html";
-
-    private Context mContext;
-
-    public LicenseHtmlLoader(Context context) {
-        super(context);
-        mContext = context;
-    }
-
-    @Override
-    public File loadInBackground() {
-        return generateHtmlFromDefaultXmlFiles();
-    }
-
-    @Override
-    protected void onDiscardResult(File f) {
-    }
-
-    private File generateHtmlFromDefaultXmlFiles() {
-        final List<File> xmlFiles = getVaildXmlFiles();
-        if (xmlFiles.isEmpty()) {
-            Log.e(TAG, "No notice file exists.");
-            return null;
-        }
-
-        File cachedHtmlFile = getCachedHtmlFile();
-        if(!isCachedHtmlFileOutdated(xmlFiles, cachedHtmlFile) ||
-                generateHtmlFile(xmlFiles, cachedHtmlFile)) {
-            return cachedHtmlFile;
-        }
-
-        return null;
-    }
-
-    @VisibleForTesting
-    List<File> getVaildXmlFiles() {
-        final List<File> xmlFiles = new ArrayList();
-        for (final String xmlPath : DEFAULT_LICENSE_XML_PATHS) {
-            File file = new File(xmlPath);
-            if (file.exists() && file.length() != 0) {
-                xmlFiles.add(file);
-            }
-        }
-        return xmlFiles;
-    }
-
-    @VisibleForTesting
-    File getCachedHtmlFile() {
-        return new File(mContext.getCacheDir(), NOTICE_HTML_FILE_NAME);
-    }
-
-    @VisibleForTesting
-    boolean isCachedHtmlFileOutdated(List<File> xmlFiles, File cachedHtmlFile) {
-        boolean outdated = true;
-        if (cachedHtmlFile.exists() && cachedHtmlFile.length() != 0) {
-            outdated = false;
-            for (File file : xmlFiles) {
-                if (cachedHtmlFile.lastModified() < file.lastModified()) {
-                    outdated = true;
-                    break;
-                }
-            }
-        }
-        return outdated;
-    }
-
-    @VisibleForTesting
-    boolean generateHtmlFile(List<File> xmlFiles, File htmlFile) {
-        return LicenseHtmlGeneratorFromXml.generateHtml(xmlFiles, htmlFile);
-    }
-}
diff --git a/src/com/android/settings/SettingsLicenseActivity.java b/src/com/android/settings/SettingsLicenseActivity.java
index 5b23a68..ebb1ae1 100644
--- a/src/com/android/settings/SettingsLicenseActivity.java
+++ b/src/com/android/settings/SettingsLicenseActivity.java
@@ -20,12 +20,10 @@
 import android.app.LoaderManager;
 import android.content.ActivityNotFoundException;
 import android.content.ContentResolver;
-import android.content.Context;
 import android.content.Intent;
 import android.content.Loader;
 import android.net.Uri;
 import android.os.Bundle;
-import android.os.StrictMode;
 import android.os.SystemProperties;
 import android.support.annotation.VisibleForTesting;
 import android.support.v4.content.FileProvider;
@@ -34,10 +32,9 @@
 import android.widget.Toast;
 
 import com.android.settings.users.RestrictedProfileSettings;
+import com.android.settingslib.license.LicenseHtmlLoader;
 
 import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
 
 /**
  * The "dialog" that shows from "License" in the Settings app.
@@ -111,9 +108,9 @@
             return;
         }
         showHtmlFromUri(Uri.fromFile(file));
-     }
+    }
 
-     private void showHtmlFromUri(Uri uri) {
+    private void showHtmlFromUri(Uri uri) {
         // Kick off external viewer due to WebView security restrictions; we
         // carefully point it at HTMLViewer, since it offers to decompress
         // before viewing.
diff --git a/src/com/android/settings/applications/FetchPackageStorageAsyncLoader.java b/src/com/android/settings/applications/FetchPackageStorageAsyncLoader.java
index b39ec3b..9ff96c1 100644
--- a/src/com/android/settings/applications/FetchPackageStorageAsyncLoader.java
+++ b/src/com/android/settings/applications/FetchPackageStorageAsyncLoader.java
@@ -24,9 +24,9 @@
 import android.util.Log;
 
 import com.android.internal.util.Preconditions;
-import com.android.settings.utils.AsyncLoader;
 import com.android.settingslib.applications.StorageStatsSource;
 import com.android.settingslib.applications.StorageStatsSource.AppStorageStats;
+import com.android.settingslib.utils.AsyncLoader;
 
 import java.io.IOException;
 
diff --git a/src/com/android/settings/dashboard/suggestions/SuggestionLoader.java b/src/com/android/settings/dashboard/suggestions/SuggestionLoader.java
index b9d51ce..8c5b46d 100644
--- a/src/com/android/settings/dashboard/suggestions/SuggestionLoader.java
+++ b/src/com/android/settings/dashboard/suggestions/SuggestionLoader.java
@@ -20,7 +20,7 @@
 import android.service.settings.suggestions.Suggestion;
 import android.util.Log;
 
-import com.android.settings.utils.AsyncLoader;
+import com.android.settingslib.utils.AsyncLoader;
 
 import java.util.List;
 
diff --git a/src/com/android/settings/datausage/AppPrefLoader.java b/src/com/android/settings/datausage/AppPrefLoader.java
index 30e30eb..b684813 100644
--- a/src/com/android/settings/datausage/AppPrefLoader.java
+++ b/src/com/android/settings/datausage/AppPrefLoader.java
@@ -21,7 +21,7 @@
 import android.content.pm.PackageManager;
 import android.support.v7.preference.Preference;
 import android.util.ArraySet;
-import com.android.settings.utils.AsyncLoader;
+import com.android.settingslib.utils.AsyncLoader;
 
 public class AppPrefLoader extends AsyncLoader<ArraySet<Preference>> {
     private ArraySet<String> mPackages;
diff --git a/src/com/android/settings/deviceinfo/storage/StorageAsyncLoader.java b/src/com/android/settings/deviceinfo/storage/StorageAsyncLoader.java
index 2ce53f6..0b9b697 100644
--- a/src/com/android/settings/deviceinfo/storage/StorageAsyncLoader.java
+++ b/src/com/android/settings/deviceinfo/storage/StorageAsyncLoader.java
@@ -30,9 +30,9 @@
 import android.util.Log;
 import android.util.SparseArray;
 
-import com.android.settings.utils.AsyncLoader;
 import com.android.settings.wrapper.UserManagerWrapper;
 import com.android.settingslib.applications.StorageStatsSource;
+import com.android.settingslib.utils.AsyncLoader;
 import com.android.settingslib.wrapper.PackageManagerWrapper;
 
 import java.io.IOException;
diff --git a/src/com/android/settings/deviceinfo/storage/UserIconLoader.java b/src/com/android/settings/deviceinfo/storage/UserIconLoader.java
index 4f00c3c..d1c29df 100644
--- a/src/com/android/settings/deviceinfo/storage/UserIconLoader.java
+++ b/src/com/android/settings/deviceinfo/storage/UserIconLoader.java
@@ -25,7 +25,7 @@
 
 import com.android.internal.util.Preconditions;
 import com.android.settings.Utils;
-import com.android.settings.utils.AsyncLoader;
+import com.android.settingslib.utils.AsyncLoader;
 
 /**
  * Fetches a user icon as a loader using a given icon loading lambda.
diff --git a/src/com/android/settings/deviceinfo/storage/VolumeSizesLoader.java b/src/com/android/settings/deviceinfo/storage/VolumeSizesLoader.java
index 720f151..236f55f 100644
--- a/src/com/android/settings/deviceinfo/storage/VolumeSizesLoader.java
+++ b/src/com/android/settings/deviceinfo/storage/VolumeSizesLoader.java
@@ -21,9 +21,9 @@
 import android.os.storage.VolumeInfo;
 import android.support.annotation.VisibleForTesting;
 
-import com.android.settings.utils.AsyncLoader;
 import com.android.settingslib.deviceinfo.PrivateStorageInfo;
 import com.android.settingslib.deviceinfo.StorageVolumeProvider;
+import com.android.settingslib.utils.AsyncLoader;
 
 import java.io.IOException;
 
diff --git a/src/com/android/settings/fuelgauge/BatteryInfoLoader.java b/src/com/android/settings/fuelgauge/BatteryInfoLoader.java
index ce22a8c..614eb80 100644
--- a/src/com/android/settings/fuelgauge/BatteryInfoLoader.java
+++ b/src/com/android/settings/fuelgauge/BatteryInfoLoader.java
@@ -25,7 +25,7 @@
 import android.os.SystemClock;
 import com.android.internal.os.BatteryStatsHelper;
 import com.android.settings.overlay.FeatureFactory;
-import com.android.settings.utils.AsyncLoader;
+import com.android.settingslib.utils.AsyncLoader;
 
 /**
  * Loader that can be used by classes to load BatteryInfo in a background thread. This loader will
diff --git a/src/com/android/settings/fuelgauge/BatteryStatsHelperLoader.java b/src/com/android/settings/fuelgauge/BatteryStatsHelperLoader.java
index b81f282..28585ae 100644
--- a/src/com/android/settings/fuelgauge/BatteryStatsHelperLoader.java
+++ b/src/com/android/settings/fuelgauge/BatteryStatsHelperLoader.java
@@ -23,7 +23,7 @@
 import android.support.annotation.VisibleForTesting;
 
 import com.android.internal.os.BatteryStatsHelper;
-import com.android.settings.utils.AsyncLoader;
+import com.android.settingslib.utils.AsyncLoader;
 
 /**
  * Loader to get new {@link BatteryStatsHelper} in the background
diff --git a/src/com/android/settings/fuelgauge/DebugEstimatesLoader.java b/src/com/android/settings/fuelgauge/DebugEstimatesLoader.java
index 5f4758a..19aa639 100644
--- a/src/com/android/settings/fuelgauge/DebugEstimatesLoader.java
+++ b/src/com/android/settings/fuelgauge/DebugEstimatesLoader.java
@@ -22,7 +22,7 @@
 import android.os.SystemClock;
 import com.android.internal.os.BatteryStatsHelper;
 import com.android.settings.overlay.FeatureFactory;
-import com.android.settings.utils.AsyncLoader;
+import com.android.settingslib.utils.AsyncLoader;
 import java.util.ArrayList;
 import java.util.List;
 
diff --git a/src/com/android/settings/fuelgauge/PowerUsageBase.java b/src/com/android/settings/fuelgauge/PowerUsageBase.java
index 5f46b07..b811f20 100644
--- a/src/com/android/settings/fuelgauge/PowerUsageBase.java
+++ b/src/com/android/settings/fuelgauge/PowerUsageBase.java
@@ -26,7 +26,7 @@
 
 import com.android.internal.os.BatteryStatsHelper;
 import com.android.settings.dashboard.DashboardFragment;
-import com.android.settings.utils.AsyncLoader;
+import com.android.settingslib.utils.AsyncLoader;
 
 /**
  * Common base class for things that need to show the battery usage graph.
diff --git a/src/com/android/settings/fuelgauge/anomaly/AnomalyLoader.java b/src/com/android/settings/fuelgauge/anomaly/AnomalyLoader.java
index 596eaf5..f26b742 100644
--- a/src/com/android/settings/fuelgauge/anomaly/AnomalyLoader.java
+++ b/src/com/android/settings/fuelgauge/anomaly/AnomalyLoader.java
@@ -26,7 +26,7 @@
 
 import com.android.internal.os.BatteryStatsHelper;
 import com.android.internal.util.ArrayUtils;
-import com.android.settings.utils.AsyncLoader;
+import com.android.settingslib.utils.AsyncLoader;
 
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
diff --git a/src/com/android/settings/search/SavedQueryLoader.java b/src/com/android/settings/search/SavedQueryLoader.java
index e8efe85..5df3610 100644
--- a/src/com/android/settings/search/SavedQueryLoader.java
+++ b/src/com/android/settings/search/SavedQueryLoader.java
@@ -23,7 +23,7 @@
 import android.support.annotation.VisibleForTesting;
 
 import com.android.settings.search.IndexDatabaseHelper.SavedQueriesColumns;
-import com.android.settings.utils.AsyncLoader;
+import com.android.settingslib.utils.AsyncLoader;
 
 import java.util.ArrayList;
 import java.util.List;
diff --git a/src/com/android/settings/search/SavedQueryRecorder.java b/src/com/android/settings/search/SavedQueryRecorder.java
index 466af0b..b3b0bb8 100644
--- a/src/com/android/settings/search/SavedQueryRecorder.java
+++ b/src/com/android/settings/search/SavedQueryRecorder.java
@@ -24,7 +24,7 @@
 import android.util.Log;
 
 import com.android.settings.search.IndexDatabaseHelper;
-import com.android.settings.utils.AsyncLoader;
+import com.android.settingslib.utils.AsyncLoader;
 
 import static com.android.settings.search.IndexDatabaseHelper.Tables.TABLE_SAVED_QUERIES;
 
diff --git a/src/com/android/settings/search/SavedQueryRemover.java b/src/com/android/settings/search/SavedQueryRemover.java
index 77334a5..c6abe97 100644
--- a/src/com/android/settings/search/SavedQueryRemover.java
+++ b/src/com/android/settings/search/SavedQueryRemover.java
@@ -24,7 +24,7 @@
 import android.database.sqlite.SQLiteException;
 import android.util.Log;
 
-import com.android.settings.utils.AsyncLoader;
+import com.android.settingslib.utils.AsyncLoader;
 
 public class SavedQueryRemover extends AsyncLoader<Void> {
 
diff --git a/src/com/android/settings/search/SearchResultLoader.java b/src/com/android/settings/search/SearchResultLoader.java
index 7ec3146..f4abd8e 100644
--- a/src/com/android/settings/search/SearchResultLoader.java
+++ b/src/com/android/settings/search/SearchResultLoader.java
@@ -1,6 +1,6 @@
 package com.android.settings.search;
 
-import com.android.settings.utils.AsyncLoader;
+import com.android.settingslib.utils.AsyncLoader;
 
 import android.content.Context;
 
diff --git a/src/com/android/settings/utils/AsyncLoader.java b/src/com/android/settings/utils/AsyncLoader.java
deleted file mode 100644
index 76c99fa..0000000
--- a/src/com/android/settings/utils/AsyncLoader.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (C) 2016 Google Inc.
- * Licensed to 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.settings.utils;
-
-import android.content.AsyncTaskLoader;
-import android.content.Context;
-
-/**
- * This class fills in some boilerplate for AsyncTaskLoader to actually load things.
- *
- * Subclasses need to implement {@link AsyncLoader#loadInBackground()} to perform the actual
- * background task, and {@link AsyncLoader#onDiscardResult(T)} to clean up previously loaded
- * results.
- *
- * This loader is based on the MailAsyncTaskLoader from the AOSP EmailUnified repo.
- */
-public abstract class AsyncLoader<T> extends AsyncTaskLoader<T> {
-    private T mResult;
-
-    public AsyncLoader(final Context context) {
-        super(context);
-    }
-
-    @Override
-    protected void onStartLoading() {
-        if (mResult != null) {
-            deliverResult(mResult);
-        }
-
-        if (takeContentChanged() || mResult == null) {
-            forceLoad();
-        }
-    }
-
-    @Override
-    protected void onStopLoading() {
-        cancelLoad();
-    }
-
-    @Override
-    public void deliverResult(final T data) {
-        if (isReset()) {
-            if (data != null) {
-                onDiscardResult(data);
-            }
-            return;
-        }
-
-        final T oldResult = mResult;
-        mResult = data;
-
-        if (isStarted()) {
-            super.deliverResult(data);
-        }
-
-        if (oldResult != null && oldResult != mResult) {
-            onDiscardResult(oldResult);
-        }
-    }
-
-    @Override
-    protected void onReset() {
-        super.onReset();
-
-        onStopLoading();
-
-        if (mResult != null) {
-            onDiscardResult(mResult);
-        }
-        mResult = null;
-    }
-
-    @Override
-    public void onCanceled(final T data) {
-        super.onCanceled(data);
-
-        if (data != null) {
-            onDiscardResult(data);
-        }
-    }
-
-    /**
-     * Called when discarding the load results so subclasses can take care of clean-up or
-     * recycling tasks. This is not called if the same result (by way of pointer equality) is
-     * returned again by a subsequent call to loadInBackground, or if result is null.
-     *
-     * Note that this may be called concurrently with loadInBackground(), and in some circumstances
-     * may be called more than once for a given object.
-     *
-     * @param result The value returned from {@link AsyncLoader#loadInBackground()} which
-     *               is to be discarded.
-     */
-    protected abstract void onDiscardResult(final T result);
-}
