diff --git a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java index dd7d12500cbb..1c064218634d 100644 --- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java +++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java @@ -7,8 +7,6 @@ package org.mozilla.gecko; import android.Manifest; import android.app.DownloadManager; -import android.graphics.Color; -import android.graphics.drawable.Drawable; import android.os.Environment; import android.support.annotation.NonNull; import android.support.annotation.WorkerThread; @@ -24,6 +22,8 @@ import org.mozilla.gecko.cleanup.FileCleanupController; import org.mozilla.gecko.db.BrowserContract; import org.mozilla.gecko.db.BrowserDB; import org.mozilla.gecko.db.SuggestedSites; +import org.mozilla.gecko.delegates.BrowserAppDelegate; +import org.mozilla.gecko.delegates.ScreenshotDelegate; import org.mozilla.gecko.distribution.Distribution; import org.mozilla.gecko.distribution.DistributionStoreCallback; import org.mozilla.gecko.dlc.DownloadContentService; @@ -59,10 +59,9 @@ import org.mozilla.gecko.permissions.Permissions; import org.mozilla.gecko.preferences.ClearOnShutdownPref; import org.mozilla.gecko.preferences.GeckoPreferences; import org.mozilla.gecko.promotion.AddToHomeScreenPromotion; -import org.mozilla.gecko.promotion.BookmarkStateChangeDelegate; +import org.mozilla.gecko.delegates.BookmarkStateChangeDelegate; import org.mozilla.gecko.promotion.ReaderViewBookmarkPromotion; import org.mozilla.gecko.prompts.Prompt; -import org.mozilla.gecko.prompts.PromptListItem; import org.mozilla.gecko.reader.SavedReaderViewHelper; import org.mozilla.gecko.reader.ReaderModeUtils; import org.mozilla.gecko.reader.ReadingListHelper; @@ -88,7 +87,6 @@ import org.mozilla.gecko.trackingprotection.TrackingProtectionPrompt; import org.mozilla.gecko.updater.UpdateServiceHelper; import org.mozilla.gecko.util.ActivityUtils; import org.mozilla.gecko.util.Clipboard; -import org.mozilla.gecko.util.DrawableUtil; import org.mozilla.gecko.util.EventCallback; import org.mozilla.gecko.util.Experiments; import org.mozilla.gecko.util.FloatUtils; diff --git a/mobile/android/base/java/org/mozilla/gecko/promotion/BookmarkStateChangeDelegate.java b/mobile/android/base/java/org/mozilla/gecko/delegates/BookmarkStateChangeDelegate.java similarity index 99% rename from mobile/android/base/java/org/mozilla/gecko/promotion/BookmarkStateChangeDelegate.java rename to mobile/android/base/java/org/mozilla/gecko/delegates/BookmarkStateChangeDelegate.java index 01b3e316a025..2de59e47c78d 100644 --- a/mobile/android/base/java/org/mozilla/gecko/promotion/BookmarkStateChangeDelegate.java +++ b/mobile/android/base/java/org/mozilla/gecko/delegates/BookmarkStateChangeDelegate.java @@ -3,7 +3,7 @@ * 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.promotion; +package org.mozilla.gecko.delegates; import android.content.Intent; import android.content.SharedPreferences; @@ -21,7 +21,6 @@ import org.json.JSONException; import org.json.JSONObject; import org.mozilla.gecko.AboutPages; import org.mozilla.gecko.BrowserApp; -import org.mozilla.gecko.BrowserAppDelegate; import org.mozilla.gecko.EditBookmarkDialog; import org.mozilla.gecko.GeckoAppShell; import org.mozilla.gecko.GeckoSharedPrefs; @@ -32,6 +31,7 @@ import org.mozilla.gecko.Tabs; import org.mozilla.gecko.Telemetry; import org.mozilla.gecko.TelemetryContract; import org.mozilla.gecko.home.HomeConfig; +import org.mozilla.gecko.promotion.SimpleHelperUI; import org.mozilla.gecko.prompts.Prompt; import org.mozilla.gecko.prompts.PromptListItem; import org.mozilla.gecko.util.DrawableUtil; diff --git a/mobile/android/base/java/org/mozilla/gecko/BrowserAppDelegate.java b/mobile/android/base/java/org/mozilla/gecko/delegates/BrowserAppDelegate.java similarity index 97% rename from mobile/android/base/java/org/mozilla/gecko/BrowserAppDelegate.java rename to mobile/android/base/java/org/mozilla/gecko/delegates/BrowserAppDelegate.java index c94c460bea20..de424d45efbd 100644 --- a/mobile/android/base/java/org/mozilla/gecko/BrowserAppDelegate.java +++ b/mobile/android/base/java/org/mozilla/gecko/delegates/BrowserAppDelegate.java @@ -3,11 +3,12 @@ * 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; +package org.mozilla.gecko.delegates; import android.content.Intent; import android.os.Bundle; +import org.mozilla.gecko.BrowserApp; import org.mozilla.gecko.tabs.TabsPanel; /** diff --git a/mobile/android/base/java/org/mozilla/gecko/ScreenshotDelegate.java b/mobile/android/base/java/org/mozilla/gecko/delegates/ScreenshotDelegate.java similarity index 83% rename from mobile/android/base/java/org/mozilla/gecko/ScreenshotDelegate.java rename to mobile/android/base/java/org/mozilla/gecko/delegates/ScreenshotDelegate.java index 070cace0d7ab..76b2d19ddd2e 100644 --- a/mobile/android/base/java/org/mozilla/gecko/ScreenshotDelegate.java +++ b/mobile/android/base/java/org/mozilla/gecko/delegates/ScreenshotDelegate.java @@ -3,13 +3,25 @@ * 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; +package org.mozilla.gecko.delegates; import android.app.Activity; import android.os.Bundle; import android.support.design.widget.Snackbar; import android.util.Log; +import org.mozilla.gecko.AppConstants; +import org.mozilla.gecko.BrowserApp; +import org.mozilla.gecko.GeckoProfile; +import org.mozilla.gecko.R; +import org.mozilla.gecko.ScreenshotObserver; +import org.mozilla.gecko.SnackbarHelper; +import org.mozilla.gecko.Tab; +import org.mozilla.gecko.Tabs; +import org.mozilla.gecko.Telemetry; +import org.mozilla.gecko.TelemetryContract; +import org.mozilla.gecko.delegates.BrowserAppDelegate; + import java.lang.ref.WeakReference; /** diff --git a/mobile/android/base/java/org/mozilla/gecko/feeds/ContentNotificationsDelegate.java b/mobile/android/base/java/org/mozilla/gecko/feeds/ContentNotificationsDelegate.java index a687bda55392..7fb38a835902 100644 --- a/mobile/android/base/java/org/mozilla/gecko/feeds/ContentNotificationsDelegate.java +++ b/mobile/android/base/java/org/mozilla/gecko/feeds/ContentNotificationsDelegate.java @@ -11,10 +11,10 @@ import android.support.v4.app.NotificationManagerCompat; import org.mozilla.gecko.AppConstants; import org.mozilla.gecko.BrowserApp; -import org.mozilla.gecko.BrowserAppDelegate; import org.mozilla.gecko.R; import org.mozilla.gecko.Telemetry; import org.mozilla.gecko.TelemetryContract; +import org.mozilla.gecko.delegates.BrowserAppDelegate; import java.util.List; diff --git a/mobile/android/base/java/org/mozilla/gecko/promotion/AddToHomeScreenPromotion.java b/mobile/android/base/java/org/mozilla/gecko/promotion/AddToHomeScreenPromotion.java index 3863442b8c9c..96caa9bdfd8a 100644 --- a/mobile/android/base/java/org/mozilla/gecko/promotion/AddToHomeScreenPromotion.java +++ b/mobile/android/base/java/org/mozilla/gecko/promotion/AddToHomeScreenPromotion.java @@ -17,7 +17,7 @@ import org.json.JSONException; import org.json.JSONObject; import org.mozilla.gecko.AboutPages; import org.mozilla.gecko.BrowserApp; -import org.mozilla.gecko.BrowserAppDelegate; +import org.mozilla.gecko.delegates.BrowserAppDelegate; import org.mozilla.gecko.GeckoProfile; import org.mozilla.gecko.Tab; import org.mozilla.gecko.Tabs; diff --git a/mobile/android/base/java/org/mozilla/gecko/promotion/ReaderViewBookmarkPromotion.java b/mobile/android/base/java/org/mozilla/gecko/promotion/ReaderViewBookmarkPromotion.java index b4ff7d247871..2b3f567d9764 100644 --- a/mobile/android/base/java/org/mozilla/gecko/promotion/ReaderViewBookmarkPromotion.java +++ b/mobile/android/base/java/org/mozilla/gecko/promotion/ReaderViewBookmarkPromotion.java @@ -12,7 +12,7 @@ import android.os.Bundle; import com.keepsafe.switchboard.SwitchBoard; import org.mozilla.gecko.BrowserApp; -import org.mozilla.gecko.BrowserAppDelegate; +import org.mozilla.gecko.delegates.BrowserAppDelegate; import org.mozilla.gecko.GeckoSharedPrefs; import org.mozilla.gecko.R; import org.mozilla.gecko.Tab; diff --git a/mobile/android/base/moz.build b/mobile/android/base/moz.build index a91f4d7a54d1..24e2392146e4 100644 --- a/mobile/android/base/moz.build +++ b/mobile/android/base/moz.build @@ -206,7 +206,6 @@ gbjar.sources += ['java/org/mozilla/gecko/' + x for x in [ 'BaseGeckoInterface.java', 'BootReceiver.java', 'BrowserApp.java', - 'BrowserAppDelegate.java', 'BrowserLocaleManager.java', 'cleanup/FileCleanupController.java', 'cleanup/FileCleanupService.java', @@ -247,6 +246,9 @@ gbjar.sources += ['java/org/mozilla/gecko/' + x for x in [ 'db/UrlAnnotations.java', 'db/URLMetadata.java', 'db/URLMetadataTable.java', + 'delegates/BookmarkStateChangeDelegate.java', + 'delegates/BrowserAppDelegate.java', + 'delegates/ScreenshotDelegate.java', 'DevToolsAuthHelper.java', 'distribution/Distribution.java', 'distribution/DistributionStoreCallback.java', @@ -509,7 +511,6 @@ gbjar.sources += ['java/org/mozilla/gecko/' + x for x in [ 'PrintHelper.java', 'PrivateTab.java', 'promotion/AddToHomeScreenPromotion.java', - 'promotion/BookmarkStateChangeDelegate.java', 'promotion/HomeScreenPrompt.java', 'promotion/ReaderViewBookmarkPromotion.java', 'promotion/SimpleHelperUI.java', @@ -536,7 +537,6 @@ gbjar.sources += ['java/org/mozilla/gecko/' + x for x in [ 'restrictions/RestrictionConfiguration.java', 'restrictions/RestrictionProvider.java', 'restrictions/Restrictions.java', - 'ScreenshotDelegate.java', 'ScreenshotObserver.java', 'search/SearchEngine.java', 'search/SearchEngineManager.java',