Bug 1290014 - Move decoders from the favicons to the icons package. r=ahunt,Grisha
authorSebastian Kaspari <s.kaspari@gmail.com>
Wed, 17 Aug 2016 17:36:42 +0200
changeset 312470 c588732a368ebce977fd6730bcb73672529807cd
parent 312469 a73dcd57f417301ee649a6777c3ccdc027d7eb01
child 312471 9b852e0472ff46f4e8a4c0888fd7d2925c001efd
push id20447
push userkwierso@gmail.com
push dateFri, 02 Sep 2016 20:36:44 +0000
treeherderfx-team@969397f22187 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahunt, Grisha
bugs1290014
milestone51.0a1
Bug 1290014 - Move decoders from the favicons to the icons package. r=ahunt,Grisha The decoders are used by the code in the icons package exclusively. Let's move it to the new package now. MozReview-Commit-ID: AAybHpeA71V
mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
mobile/android/base/java/org/mozilla/gecko/db/BrowserDB.java
mobile/android/base/java/org/mozilla/gecko/db/LocalBrowserDB.java
mobile/android/base/java/org/mozilla/gecko/db/LocalURLMetadata.java
mobile/android/base/java/org/mozilla/gecko/db/StubBrowserDB.java
mobile/android/base/java/org/mozilla/gecko/favicons/decoders/FaviconDecoder.java
mobile/android/base/java/org/mozilla/gecko/favicons/decoders/ICODecoder.java
mobile/android/base/java/org/mozilla/gecko/favicons/decoders/IconDirectoryEntry.java
mobile/android/base/java/org/mozilla/gecko/favicons/decoders/LoadFaviconResult.java
mobile/android/base/java/org/mozilla/gecko/icons/decoders/FaviconDecoder.java
mobile/android/base/java/org/mozilla/gecko/icons/decoders/ICODecoder.java
mobile/android/base/java/org/mozilla/gecko/icons/decoders/IconDirectoryEntry.java
mobile/android/base/java/org/mozilla/gecko/icons/decoders/LoadFaviconResult.java
mobile/android/base/java/org/mozilla/gecko/icons/loader/ContentProviderLoader.java
mobile/android/base/java/org/mozilla/gecko/icons/loader/DataUriLoader.java
mobile/android/base/java/org/mozilla/gecko/icons/loader/IconDownloader.java
mobile/android/base/java/org/mozilla/gecko/icons/loader/LegacyLoader.java
--- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
+++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
@@ -29,17 +29,17 @@ import org.mozilla.gecko.db.BrowserDB;
 import org.mozilla.gecko.db.SuggestedSites;
 import org.mozilla.gecko.delegates.BrowserAppDelegate;
 import org.mozilla.gecko.delegates.OfflineTabStatusDelegate;
 import org.mozilla.gecko.delegates.ScreenshotDelegate;
 import org.mozilla.gecko.distribution.Distribution;
 import org.mozilla.gecko.distribution.DistributionStoreCallback;
 import org.mozilla.gecko.distribution.PartnerBrowserCustomizationsClient;
 import org.mozilla.gecko.dlc.DownloadContentService;
-import org.mozilla.gecko.favicons.decoders.IconDirectoryEntry;
+import org.mozilla.gecko.icons.decoders.IconDirectoryEntry;
 import org.mozilla.gecko.feeds.ContentNotificationsDelegate;
 import org.mozilla.gecko.feeds.FeedService;
 import org.mozilla.gecko.firstrun.FirstrunAnimationContainer;
 import org.mozilla.gecko.gfx.DynamicToolbarAnimator;
 import org.mozilla.gecko.gfx.DynamicToolbarAnimator.PinReason;
 import org.mozilla.gecko.gfx.ImmutableViewportMetrics;
 import org.mozilla.gecko.gfx.LayerView;
 import org.mozilla.gecko.home.BrowserSearch;
@@ -98,17 +98,16 @@ import org.mozilla.gecko.updater.PostUpd
 import org.mozilla.gecko.updater.UpdateServiceHelper;
 import org.mozilla.gecko.util.ActivityUtils;
 import org.mozilla.gecko.util.Clipboard;
 import org.mozilla.gecko.util.EventCallback;
 import org.mozilla.gecko.util.FloatUtils;
 import org.mozilla.gecko.util.GamepadUtils;
 import org.mozilla.gecko.util.GeckoEventListener;
 import org.mozilla.gecko.util.HardwareUtils;
-import org.mozilla.gecko.util.IOUtils;
 import org.mozilla.gecko.util.IntentUtils;
 import org.mozilla.gecko.util.MenuUtils;
 import org.mozilla.gecko.util.NativeEventListener;
 import org.mozilla.gecko.util.NativeJSObject;
 import org.mozilla.gecko.util.PrefUtils;
 import org.mozilla.gecko.util.StringUtils;
 import org.mozilla.gecko.util.ThreadUtils;
 import org.mozilla.gecko.widget.AnchoredPopup;
--- a/mobile/android/base/java/org/mozilla/gecko/db/BrowserDB.java
+++ b/mobile/android/base/java/org/mozilla/gecko/db/BrowserDB.java
@@ -8,17 +8,17 @@ import java.io.File;
 import java.util.Collection;
 import java.util.EnumSet;
 import java.util.List;
 
 import org.mozilla.gecko.GeckoProfile;
 import org.mozilla.gecko.annotation.RobocopTarget;
 import org.mozilla.gecko.db.BrowserContract.ExpirePriority;
 import org.mozilla.gecko.distribution.Distribution;
-import org.mozilla.gecko.favicons.decoders.LoadFaviconResult;
+import org.mozilla.gecko.icons.decoders.LoadFaviconResult;
 
 import android.content.ContentProviderOperation;
 import android.content.ContentResolver;
 import android.content.Context;
 import android.database.ContentObserver;
 import android.database.Cursor;
 import android.graphics.drawable.BitmapDrawable;
 import android.support.v4.content.CursorLoader;
--- a/mobile/android/base/java/org/mozilla/gecko/db/LocalBrowserDB.java
+++ b/mobile/android/base/java/org/mozilla/gecko/db/LocalBrowserDB.java
@@ -31,18 +31,18 @@ import org.mozilla.gecko.db.BrowserContr
 import org.mozilla.gecko.db.BrowserContract.Combined;
 import org.mozilla.gecko.db.BrowserContract.ExpirePriority;
 import org.mozilla.gecko.db.BrowserContract.Favicons;
 import org.mozilla.gecko.db.BrowserContract.History;
 import org.mozilla.gecko.db.BrowserContract.SyncColumns;
 import org.mozilla.gecko.db.BrowserContract.Thumbnails;
 import org.mozilla.gecko.db.BrowserContract.TopSites;
 import org.mozilla.gecko.distribution.Distribution;
-import org.mozilla.gecko.favicons.decoders.FaviconDecoder;
-import org.mozilla.gecko.favicons.decoders.LoadFaviconResult;
+import org.mozilla.gecko.icons.decoders.FaviconDecoder;
+import org.mozilla.gecko.icons.decoders.LoadFaviconResult;
 import org.mozilla.gecko.gfx.BitmapUtils;
 import org.mozilla.gecko.restrictions.Restrictions;
 import org.mozilla.gecko.sync.Utils;
 import org.mozilla.gecko.util.GeckoJarReader;
 import org.mozilla.gecko.util.StringUtils;
 
 import android.content.ContentProviderOperation;
 import android.content.ContentResolver;
--- a/mobile/android/base/java/org/mozilla/gecko/db/LocalURLMetadata.java
+++ b/mobile/android/base/java/org/mozilla/gecko/db/LocalURLMetadata.java
@@ -13,17 +13,17 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
 import org.json.JSONException;
 import org.json.JSONObject;
 import org.mozilla.gecko.GeckoAppShell;
-import org.mozilla.gecko.favicons.decoders.LoadFaviconResult;
+import org.mozilla.gecko.icons.decoders.LoadFaviconResult;
 import org.mozilla.gecko.util.ThreadUtils;
 
 import android.content.ContentResolver;
 import android.content.ContentValues;
 import android.database.Cursor;
 import android.net.Uri;
 import android.util.Log;
 import android.util.LruCache;
--- a/mobile/android/base/java/org/mozilla/gecko/db/StubBrowserDB.java
+++ b/mobile/android/base/java/org/mozilla/gecko/db/StubBrowserDB.java
@@ -10,23 +10,22 @@ import java.util.Collection;
 import java.util.EnumSet;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
 import org.json.JSONObject;
 import org.mozilla.gecko.annotation.RobocopTarget;
 import org.mozilla.gecko.distribution.Distribution;
-import org.mozilla.gecko.favicons.decoders.LoadFaviconResult;
+import org.mozilla.gecko.icons.decoders.LoadFaviconResult;
 import org.mozilla.gecko.Tab;
 import org.mozilla.gecko.feeds.subscriptions.FeedSubscription;
 
 import android.content.ContentProviderOperation;
 import android.content.ContentResolver;
-import android.content.ContentValues;
 import android.content.Context;
 import android.database.ContentObserver;
 import android.database.Cursor;
 import android.graphics.drawable.BitmapDrawable;
 import android.support.v4.content.CursorLoader;
 
 class StubSearches implements Searches {
     public StubSearches() {
rename from mobile/android/base/java/org/mozilla/gecko/favicons/decoders/FaviconDecoder.java
rename to mobile/android/base/java/org/mozilla/gecko/icons/decoders/FaviconDecoder.java
--- a/mobile/android/base/java/org/mozilla/gecko/favicons/decoders/FaviconDecoder.java
+++ b/mobile/android/base/java/org/mozilla/gecko/icons/decoders/FaviconDecoder.java
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-package org.mozilla.gecko.favicons.decoders;
+package org.mozilla.gecko.icons.decoders;
 
 import android.content.Context;
 import android.graphics.Bitmap;
 import android.util.Base64;
 import android.util.Log;
 
 import org.mozilla.gecko.gfx.BitmapUtils;
 
rename from mobile/android/base/java/org/mozilla/gecko/favicons/decoders/ICODecoder.java
rename to mobile/android/base/java/org/mozilla/gecko/icons/decoders/ICODecoder.java
--- a/mobile/android/base/java/org/mozilla/gecko/favicons/decoders/ICODecoder.java
+++ b/mobile/android/base/java/org/mozilla/gecko/icons/decoders/ICODecoder.java
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-package org.mozilla.gecko.favicons.decoders;
+package org.mozilla.gecko.icons.decoders;
 
 import android.content.Context;
 import android.graphics.Bitmap;
 import android.util.SparseArray;
 
 import java.util.Iterator;
 import java.util.NoSuchElementException;
 
rename from mobile/android/base/java/org/mozilla/gecko/favicons/decoders/IconDirectoryEntry.java
rename to mobile/android/base/java/org/mozilla/gecko/icons/decoders/IconDirectoryEntry.java
--- a/mobile/android/base/java/org/mozilla/gecko/favicons/decoders/IconDirectoryEntry.java
+++ b/mobile/android/base/java/org/mozilla/gecko/icons/decoders/IconDirectoryEntry.java
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-package org.mozilla.gecko.favicons.decoders;
+package org.mozilla.gecko.icons.decoders;
 
 /**
  * Representation of an ICO file ICONDIRENTRY structure.
  */
 public class IconDirectoryEntry implements Comparable<IconDirectoryEntry> {
 
     public static int maxBPP;
 
rename from mobile/android/base/java/org/mozilla/gecko/favicons/decoders/LoadFaviconResult.java
rename to mobile/android/base/java/org/mozilla/gecko/icons/decoders/LoadFaviconResult.java
--- a/mobile/android/base/java/org/mozilla/gecko/favicons/decoders/LoadFaviconResult.java
+++ b/mobile/android/base/java/org/mozilla/gecko/icons/decoders/LoadFaviconResult.java
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-package org.mozilla.gecko.favicons.decoders;
+package org.mozilla.gecko.icons.decoders;
 
 import android.graphics.Bitmap;
 import android.util.Log;
 import android.util.SparseArray;
 
 import java.io.ByteArrayOutputStream;
 import java.util.ArrayList;
 import java.util.Collections;
--- a/mobile/android/base/java/org/mozilla/gecko/icons/loader/ContentProviderLoader.java
+++ b/mobile/android/base/java/org/mozilla/gecko/icons/loader/ContentProviderLoader.java
@@ -7,18 +7,18 @@ package org.mozilla.gecko.icons.loader;
 
 import android.content.Context;
 import android.database.Cursor;
 import android.graphics.Bitmap;
 import android.net.Uri;
 import android.text.TextUtils;
 
 import org.mozilla.gecko.distribution.PartnerBookmarksProviderProxy;
-import org.mozilla.gecko.favicons.decoders.FaviconDecoder;
-import org.mozilla.gecko.favicons.decoders.LoadFaviconResult;
+import org.mozilla.gecko.icons.decoders.FaviconDecoder;
+import org.mozilla.gecko.icons.decoders.LoadFaviconResult;
 import org.mozilla.gecko.icons.IconRequest;
 import org.mozilla.gecko.icons.IconResponse;
 
 /**
  * Loader for loading icons from a content provider. This loader was primarily written to load icons
  * from the partner bookmarks provider. However it can load icons from arbitrary content providers
  * as long as they return a cursor with a "favicon" or "touchicon" column (blob).
  */
--- a/mobile/android/base/java/org/mozilla/gecko/icons/loader/DataUriLoader.java
+++ b/mobile/android/base/java/org/mozilla/gecko/icons/loader/DataUriLoader.java
@@ -1,17 +1,17 @@
 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko.icons.loader;
 
-import org.mozilla.gecko.favicons.decoders.FaviconDecoder;
-import org.mozilla.gecko.favicons.decoders.LoadFaviconResult;
+import org.mozilla.gecko.icons.decoders.FaviconDecoder;
+import org.mozilla.gecko.icons.decoders.LoadFaviconResult;
 import org.mozilla.gecko.icons.IconRequest;
 import org.mozilla.gecko.icons.IconResponse;
 
 /**
  * Loader for loading icons from a data URI. This loader will try to decode any data with an
  * "image/*" MIME type.
  *
  * https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs
--- a/mobile/android/base/java/org/mozilla/gecko/icons/loader/IconDownloader.java
+++ b/mobile/android/base/java/org/mozilla/gecko/icons/loader/IconDownloader.java
@@ -5,18 +5,18 @@
 
 package org.mozilla.gecko.icons.loader;
 
 import android.content.Context;
 import android.support.annotation.VisibleForTesting;
 import android.util.Log;
 
 import org.mozilla.gecko.GeckoAppShell;
-import org.mozilla.gecko.favicons.decoders.FaviconDecoder;
-import org.mozilla.gecko.favicons.decoders.LoadFaviconResult;
+import org.mozilla.gecko.icons.decoders.FaviconDecoder;
+import org.mozilla.gecko.icons.decoders.LoadFaviconResult;
 import org.mozilla.gecko.icons.IconRequest;
 import org.mozilla.gecko.icons.IconResponse;
 import org.mozilla.gecko.icons.storage.FailureCache;
 import org.mozilla.gecko.util.IOUtils;
 import org.mozilla.gecko.util.ProxySelector;
 import org.mozilla.gecko.util.StringUtils;
 
 import java.io.IOException;
--- a/mobile/android/base/java/org/mozilla/gecko/icons/loader/LegacyLoader.java
+++ b/mobile/android/base/java/org/mozilla/gecko/icons/loader/LegacyLoader.java
@@ -6,17 +6,17 @@
 package org.mozilla.gecko.icons.loader;
 
 import android.content.ContentResolver;
 import android.content.Context;
 import android.graphics.Bitmap;
 
 import org.mozilla.gecko.GeckoProfile;
 import org.mozilla.gecko.db.BrowserDB;
-import org.mozilla.gecko.favicons.decoders.LoadFaviconResult;
+import org.mozilla.gecko.icons.decoders.LoadFaviconResult;
 import org.mozilla.gecko.icons.IconRequest;
 import org.mozilla.gecko.icons.IconResponse;
 
 /**
  * This legacy loader loads icons from the abandoned database storage. This loader should only exist
  * for a couple of releases and be removed afterwards.
  *
  * When updating to an app version with the new loaders our initial storage won't have any data so