From a6c401624c9b9e706c351b8a9db35d108bb6253c Mon Sep 17 00:00:00 2001 From: anthony restaino Date: Mon, 26 Jun 2017 22:40:41 -0400 Subject: [PATCH] Improving packaging structure --- app/src/main/AndroidManifest.xml | 10 +++---- .../lightning/{app => }/BrowserApp.java | 8 ++++-- .../{activity => }/IncognitoActivity.java | 4 +-- .../{activity => }/MainActivity.java | 4 +-- .../activity/AppCompatPreferenceActivity.java | 4 +-- .../lightning/{utils => adblock}/AdBlock.java | 4 ++- .../lightning/browser/BrowserPresenter.java | 3 +- .../lightning/browser/SearchBoxModel.java | 2 +- .../{activity => browser}/TabsManager.java | 4 +-- .../activity/BrowserActivity.java | 28 +++++++++++-------- .../activity/ThemableBrowserActivity.java | 7 +++-- .../bookmark}/BookmarkUiModel.java | 2 +- .../fragment/BookmarksFragment.java | 10 +++---- .../{ => browser}/fragment/TabsFragment.java | 10 +++---- .../fragment/anim/HorizontalItemAnimator.java | 2 +- .../fragment/anim/VerticalItemAnimator.java | 2 +- .../lightning/constant/BookmarkPage.java | 2 +- .../lightning/constant/DownloadsPage.java | 2 +- .../lightning/constant/HistoryPage.java | 2 +- .../browser/lightning/constant/StartPage.java | 2 +- .../lightning/controller/UIController.java | 2 +- .../lightning/{app => di}/AppComponent.java | 27 +++++++++--------- .../lightning/{app => di}/AppModule.java | 3 +- .../dialog/LightningDialogBuilder.java | 4 +-- .../lightning/download/DownloadHandler.java | 4 +-- .../download/LightningDownloadListener.java | 2 +- .../activity/ReadingActivity.java | 4 +-- .../search/SearchEngineProvider.java | 2 +- .../lightning/search/SuggestionsAdapter.java | 2 +- .../activity/SettingsActivity.java | 4 +-- .../activity/ThemableSettingsActivity.java | 5 ++-- .../fragment/AboutSettingsFragment.java | 2 +- .../fragment/AdvancedSettingsFragment.java | 2 +- .../fragment/BookmarkSettingsFragment.java | 10 +++---- .../fragment/DebugSettingsFragment.java | 4 +-- .../fragment/DisplaySettingsFragment.java | 2 +- .../fragment/GeneralSettingsFragment.java | 4 +-- .../fragment/LightningPreferenceFragment.java | 4 +-- .../fragment/PrivacySettingsFragment.java | 4 +-- .../browser/lightning/utils/ProxyUtils.java | 2 +- .../lightning/utils/StringBuilderUtils.java | 4 +-- .../acr/browser/lightning/utils/Utils.java | 2 +- .../lightning/view/LightningChromeClient.java | 2 +- .../browser/lightning/view/LightningView.java | 2 +- .../lightning/view/LightningWebClient.java | 4 +-- app/src/main/res/layout/activity_main.xml | 2 +- app/src/main/res/xml/preferences_headers.xml | 14 +++++----- 47 files changed, 122 insertions(+), 113 deletions(-) rename app/src/main/java/acr/browser/lightning/{app => }/BrowserApp.java (96%) rename app/src/main/java/acr/browser/lightning/{activity => }/IncognitoActivity.java (95%) rename app/src/main/java/acr/browser/lightning/{activity => }/MainActivity.java (96%) rename app/src/main/java/acr/browser/lightning/{utils => adblock}/AdBlock.java (98%) rename app/src/main/java/acr/browser/lightning/{activity => browser}/TabsManager.java (99%) rename app/src/main/java/acr/browser/lightning/{ => browser}/activity/BrowserActivity.java (98%) rename app/src/main/java/acr/browser/lightning/{ => browser}/activity/ThemableBrowserActivity.java (93%) rename app/src/main/java/acr/browser/lightning/{activity => browser/bookmark}/BookmarkUiModel.java (95%) rename app/src/main/java/acr/browser/lightning/{ => browser}/fragment/BookmarksFragment.java (98%) rename app/src/main/java/acr/browser/lightning/{ => browser}/fragment/TabsFragment.java (98%) rename app/src/main/java/acr/browser/lightning/{ => browser}/fragment/anim/HorizontalItemAnimator.java (99%) rename app/src/main/java/acr/browser/lightning/{ => browser}/fragment/anim/VerticalItemAnimator.java (99%) rename app/src/main/java/acr/browser/lightning/{app => di}/AppComponent.java (72%) rename app/src/main/java/acr/browser/lightning/{app => di}/AppModule.java (95%) rename app/src/main/java/acr/browser/lightning/{ => reading}/activity/ReadingActivity.java (99%) rename app/src/main/java/acr/browser/lightning/{ => settings}/activity/SettingsActivity.java (96%) rename app/src/main/java/acr/browser/lightning/{ => settings}/activity/ThemableSettingsActivity.java (92%) rename app/src/main/java/acr/browser/lightning/{ => settings}/fragment/AboutSettingsFragment.java (95%) rename app/src/main/java/acr/browser/lightning/{ => settings}/fragment/AdvancedSettingsFragment.java (99%) rename app/src/main/java/acr/browser/lightning/{ => settings}/fragment/BookmarkSettingsFragment.java (99%) rename app/src/main/java/acr/browser/lightning/{ => settings}/fragment/DebugSettingsFragment.java (95%) rename app/src/main/java/acr/browser/lightning/{ => settings}/fragment/DisplaySettingsFragment.java (99%) rename app/src/main/java/acr/browser/lightning/{ => settings}/fragment/GeneralSettingsFragment.java (99%) rename app/src/main/java/acr/browser/lightning/{ => settings}/fragment/LightningPreferenceFragment.java (86%) rename app/src/main/java/acr/browser/lightning/{ => settings}/fragment/PrivacySettingsFragment.java (99%) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index f1a249f..ea99c1e 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -25,7 +25,7 @@ android:required="false"/> @@ -133,7 +133,7 @@ diff --git a/app/src/main/java/acr/browser/lightning/app/BrowserApp.java b/app/src/main/java/acr/browser/lightning/BrowserApp.java similarity index 96% rename from app/src/main/java/acr/browser/lightning/app/BrowserApp.java rename to app/src/main/java/acr/browser/lightning/BrowserApp.java index 1bbc19a..7d5fdf9 100644 --- a/app/src/main/java/acr/browser/lightning/app/BrowserApp.java +++ b/app/src/main/java/acr/browser/lightning/BrowserApp.java @@ -1,4 +1,4 @@ -package acr.browser.lightning.app; +package acr.browser.lightning; import android.app.Activity; import android.app.Application; @@ -20,11 +20,13 @@ import java.util.List; import javax.inject.Inject; -import acr.browser.lightning.BuildConfig; import acr.browser.lightning.database.HistoryItem; import acr.browser.lightning.database.bookmark.BookmarkExporter; -import acr.browser.lightning.database.bookmark.legacy.LegacyBookmarkManager; import acr.browser.lightning.database.bookmark.BookmarkModel; +import acr.browser.lightning.database.bookmark.legacy.LegacyBookmarkManager; +import acr.browser.lightning.di.AppComponent; +import acr.browser.lightning.di.AppModule; +import acr.browser.lightning.di.DaggerAppComponent; import acr.browser.lightning.preference.PreferenceManager; import acr.browser.lightning.utils.FileUtils; import acr.browser.lightning.utils.MemoryLeakUtils; diff --git a/app/src/main/java/acr/browser/lightning/activity/IncognitoActivity.java b/app/src/main/java/acr/browser/lightning/IncognitoActivity.java similarity index 95% rename from app/src/main/java/acr/browser/lightning/activity/IncognitoActivity.java rename to app/src/main/java/acr/browser/lightning/IncognitoActivity.java index 9f085b5..ecdb908 100644 --- a/app/src/main/java/acr/browser/lightning/activity/IncognitoActivity.java +++ b/app/src/main/java/acr/browser/lightning/IncognitoActivity.java @@ -1,4 +1,4 @@ -package acr.browser.lightning.activity; +package acr.browser.lightning; import android.content.Intent; import android.os.Build; @@ -12,7 +12,7 @@ import com.anthonycr.bonsai.Completable; import com.anthonycr.bonsai.CompletableAction; import com.anthonycr.bonsai.CompletableSubscriber; -import acr.browser.lightning.R; +import acr.browser.lightning.browser.activity.BrowserActivity; @SuppressWarnings("deprecation") public class IncognitoActivity extends BrowserActivity { diff --git a/app/src/main/java/acr/browser/lightning/activity/MainActivity.java b/app/src/main/java/acr/browser/lightning/MainActivity.java similarity index 96% rename from app/src/main/java/acr/browser/lightning/activity/MainActivity.java rename to app/src/main/java/acr/browser/lightning/MainActivity.java index 30782b0..298c362 100644 --- a/app/src/main/java/acr/browser/lightning/activity/MainActivity.java +++ b/app/src/main/java/acr/browser/lightning/MainActivity.java @@ -1,4 +1,4 @@ -package acr.browser.lightning.activity; +package acr.browser.lightning; import android.content.Intent; import android.os.Build; @@ -13,7 +13,7 @@ import com.anthonycr.bonsai.Completable; import com.anthonycr.bonsai.CompletableAction; import com.anthonycr.bonsai.CompletableSubscriber; -import acr.browser.lightning.R; +import acr.browser.lightning.browser.activity.BrowserActivity; @SuppressWarnings("deprecation") public class MainActivity extends BrowserActivity { diff --git a/app/src/main/java/acr/browser/lightning/activity/AppCompatPreferenceActivity.java b/app/src/main/java/acr/browser/lightning/activity/AppCompatPreferenceActivity.java index 14f70b1..9110e6e 100644 --- a/app/src/main/java/acr/browser/lightning/activity/AppCompatPreferenceActivity.java +++ b/app/src/main/java/acr/browser/lightning/activity/AppCompatPreferenceActivity.java @@ -40,11 +40,11 @@ public abstract class AppCompatPreferenceActivity extends PreferenceActivity { getDelegate().onPostCreate(savedInstanceState); } - ActionBar getSupportActionBar() { + protected final ActionBar getSupportActionBar() { return getDelegate().getSupportActionBar(); } - void setSupportActionBar(@Nullable Toolbar toolbar) { + protected final void setSupportActionBar(@Nullable Toolbar toolbar) { getDelegate().setSupportActionBar(toolbar); } diff --git a/app/src/main/java/acr/browser/lightning/utils/AdBlock.java b/app/src/main/java/acr/browser/lightning/adblock/AdBlock.java similarity index 98% rename from app/src/main/java/acr/browser/lightning/utils/AdBlock.java rename to app/src/main/java/acr/browser/lightning/adblock/AdBlock.java index 0fd6fc0..6cd948f 100644 --- a/app/src/main/java/acr/browser/lightning/utils/AdBlock.java +++ b/app/src/main/java/acr/browser/lightning/adblock/AdBlock.java @@ -1,4 +1,4 @@ -package acr.browser.lightning.utils; +package acr.browser.lightning.adblock; import android.app.Application; import android.content.res.AssetManager; @@ -24,6 +24,8 @@ import javax.inject.Singleton; import acr.browser.lightning.BuildConfig; import acr.browser.lightning.preference.PreferenceManager; +import acr.browser.lightning.utils.StringBuilderUtils; +import acr.browser.lightning.utils.Utils; @Singleton public class AdBlock { diff --git a/app/src/main/java/acr/browser/lightning/browser/BrowserPresenter.java b/app/src/main/java/acr/browser/lightning/browser/BrowserPresenter.java index c53258c..a92b6a4 100644 --- a/app/src/main/java/acr/browser/lightning/browser/BrowserPresenter.java +++ b/app/src/main/java/acr/browser/lightning/browser/BrowserPresenter.java @@ -16,8 +16,7 @@ import javax.inject.Inject; import acr.browser.lightning.BuildConfig; import acr.browser.lightning.R; -import acr.browser.lightning.activity.TabsManager; -import acr.browser.lightning.app.BrowserApp; +import acr.browser.lightning.BrowserApp; import acr.browser.lightning.constant.BookmarkPage; import acr.browser.lightning.constant.Constants; import acr.browser.lightning.constant.StartPage; diff --git a/app/src/main/java/acr/browser/lightning/browser/SearchBoxModel.java b/app/src/main/java/acr/browser/lightning/browser/SearchBoxModel.java index 8d5a179..4e3e073 100644 --- a/app/src/main/java/acr/browser/lightning/browser/SearchBoxModel.java +++ b/app/src/main/java/acr/browser/lightning/browser/SearchBoxModel.java @@ -8,7 +8,7 @@ import android.text.TextUtils; import javax.inject.Inject; import acr.browser.lightning.R; -import acr.browser.lightning.app.BrowserApp; +import acr.browser.lightning.BrowserApp; import acr.browser.lightning.preference.PreferenceManager; import acr.browser.lightning.utils.UrlUtils; import acr.browser.lightning.utils.Utils; diff --git a/app/src/main/java/acr/browser/lightning/activity/TabsManager.java b/app/src/main/java/acr/browser/lightning/browser/TabsManager.java similarity index 99% rename from app/src/main/java/acr/browser/lightning/activity/TabsManager.java rename to app/src/main/java/acr/browser/lightning/browser/TabsManager.java index 6e3559d..a7098a4 100644 --- a/app/src/main/java/acr/browser/lightning/activity/TabsManager.java +++ b/app/src/main/java/acr/browser/lightning/browser/TabsManager.java @@ -1,4 +1,4 @@ -package acr.browser.lightning.activity; +package acr.browser.lightning.browser; import android.app.Activity; import android.app.Application; @@ -31,7 +31,7 @@ import java.util.List; import javax.inject.Inject; import acr.browser.lightning.R; -import acr.browser.lightning.app.BrowserApp; +import acr.browser.lightning.BrowserApp; import acr.browser.lightning.constant.BookmarkPage; import acr.browser.lightning.constant.DownloadsPage; import acr.browser.lightning.constant.HistoryPage; diff --git a/app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java b/app/src/main/java/acr/browser/lightning/browser/activity/BrowserActivity.java similarity index 98% rename from app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java rename to app/src/main/java/acr/browser/lightning/browser/activity/BrowserActivity.java index 454478d..81b7a1f 100644 --- a/app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java +++ b/app/src/main/java/acr/browser/lightning/browser/activity/BrowserActivity.java @@ -2,7 +2,7 @@ * Copyright 2015 Anthony Restaino */ -package acr.browser.lightning.activity; +package acr.browser.lightning.browser.activity; import android.app.Activity; import android.app.Dialog; @@ -90,12 +90,15 @@ import java.io.IOException; import javax.inject.Inject; import acr.browser.lightning.R; -import acr.browser.lightning.app.BrowserApp; +import acr.browser.lightning.reading.activity.ReadingActivity; import acr.browser.lightning.browser.BookmarksView; import acr.browser.lightning.browser.BrowserPresenter; import acr.browser.lightning.browser.BrowserView; +import acr.browser.lightning.IncognitoActivity; import acr.browser.lightning.browser.SearchBoxModel; +import acr.browser.lightning.browser.TabsManager; import acr.browser.lightning.browser.TabsView; +import acr.browser.lightning.BrowserApp; import acr.browser.lightning.constant.Constants; import acr.browser.lightning.constant.DownloadsPage; import acr.browser.lightning.constant.HistoryPage; @@ -105,13 +108,14 @@ import acr.browser.lightning.database.bookmark.BookmarkModel; import acr.browser.lightning.database.history.HistoryModel; import acr.browser.lightning.dialog.BrowserDialog; import acr.browser.lightning.dialog.LightningDialogBuilder; -import acr.browser.lightning.fragment.BookmarksFragment; -import acr.browser.lightning.fragment.TabsFragment; +import acr.browser.lightning.browser.fragment.BookmarksFragment; +import acr.browser.lightning.browser.fragment.TabsFragment; import acr.browser.lightning.interpolator.BezierDecelerateInterpolator; import acr.browser.lightning.receiver.NetworkReceiver; import acr.browser.lightning.search.SearchEngineProvider; import acr.browser.lightning.search.SuggestionsAdapter; import acr.browser.lightning.search.engine.BaseSearchEngine; +import acr.browser.lightning.settings.activity.SettingsActivity; import acr.browser.lightning.utils.DrawableUtils; import acr.browser.lightning.utils.IntentUtils; import acr.browser.lightning.utils.Preconditions; @@ -224,7 +228,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements public abstract void updateHistory(@Nullable final String title, @NonNull final String url); @NonNull - abstract Completable updateCookiePreference(); + protected abstract Completable updateCookiePreference(); @Override protected void onCreate(Bundle savedInstanceState) { @@ -451,11 +455,11 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements * @return true if the panic trigger sent * the intent, false otherwise. */ - static boolean isPanicTrigger(@Nullable Intent intent) { + protected static boolean isPanicTrigger(@Nullable Intent intent) { return intent != null && INTENT_PANIC_TRIGGER.equals(intent.getAction()); } - void panicClean() { + protected void panicClean() { Log.d(TAG, "Closing browser"); mTabsManager.newTab(this, "", false); mTabsManager.switchToTab(0); @@ -1208,7 +1212,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements } } - void handleNewIntent(Intent intent) { + protected void handleNewIntent(Intent intent) { mPresenter.onNewIntent(intent); } @@ -1232,7 +1236,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements return mPresenter.newTab(url, show); } - void performExitCleanUp() { + protected void performExitCleanUp() { final LightningView currentTab = mTabsManager.getCurrentTab(); if (mPreferences.getClearCacheExit() && currentTab != null && !isIncognito()) { WebUtils.clearCache(currentTab.getWebView()); @@ -1358,7 +1362,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements } } - void saveOpenTabs() { + protected void saveOpenTabs() { if (mPreferences.getRestoreLostTabsEnabled()) { mTabsManager.saveState(); } @@ -1548,7 +1552,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements mProgressBar.setProgress(n); } - void addItemToHistory(@Nullable final String title, @NonNull final String url) { + protected void addItemToHistory(@Nullable final String title, @NonNull final String url) { if (UrlUtils.isSpecialUrl(url)) { return; } @@ -1665,7 +1669,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements * @param runnable an optional runnable to run after * the drawers are closed. */ - void closeDrawers(@Nullable final Runnable runnable) { + protected final void closeDrawers(@Nullable final Runnable runnable) { if (!mDrawerLayout.isDrawerOpen(mDrawerLeft) && !mDrawerLayout.isDrawerOpen(mDrawerRight)) { if (runnable != null) { runnable.run(); diff --git a/app/src/main/java/acr/browser/lightning/activity/ThemableBrowserActivity.java b/app/src/main/java/acr/browser/lightning/browser/activity/ThemableBrowserActivity.java similarity index 93% rename from app/src/main/java/acr/browser/lightning/activity/ThemableBrowserActivity.java rename to app/src/main/java/acr/browser/lightning/browser/activity/ThemableBrowserActivity.java index 3a29986..0084882 100644 --- a/app/src/main/java/acr/browser/lightning/activity/ThemableBrowserActivity.java +++ b/app/src/main/java/acr/browser/lightning/browser/activity/ThemableBrowserActivity.java @@ -1,4 +1,4 @@ -package acr.browser.lightning.activity; +package acr.browser.lightning.browser.activity; import android.content.Intent; import android.content.res.Configuration; @@ -10,13 +10,14 @@ import android.support.v7.app.AppCompatActivity; import javax.inject.Inject; import acr.browser.lightning.R; -import acr.browser.lightning.app.BrowserApp; +import acr.browser.lightning.BrowserApp; import acr.browser.lightning.preference.PreferenceManager; import acr.browser.lightning.utils.ThemeUtils; public abstract class ThemableBrowserActivity extends AppCompatActivity { - @Inject PreferenceManager mPreferences; + // TODO: 6/26/17 get rid fo protected reference + @Inject protected PreferenceManager mPreferences; private int mTheme; private boolean mShowTabsInDrawer; diff --git a/app/src/main/java/acr/browser/lightning/activity/BookmarkUiModel.java b/app/src/main/java/acr/browser/lightning/browser/bookmark/BookmarkUiModel.java similarity index 95% rename from app/src/main/java/acr/browser/lightning/activity/BookmarkUiModel.java rename to app/src/main/java/acr/browser/lightning/browser/bookmark/BookmarkUiModel.java index 457a984..0d42c0b 100644 --- a/app/src/main/java/acr/browser/lightning/activity/BookmarkUiModel.java +++ b/app/src/main/java/acr/browser/lightning/browser/bookmark/BookmarkUiModel.java @@ -1,4 +1,4 @@ -package acr.browser.lightning.activity; +package acr.browser.lightning.browser.bookmark; import android.support.annotation.Nullable; diff --git a/app/src/main/java/acr/browser/lightning/fragment/BookmarksFragment.java b/app/src/main/java/acr/browser/lightning/browser/fragment/BookmarksFragment.java similarity index 98% rename from app/src/main/java/acr/browser/lightning/fragment/BookmarksFragment.java rename to app/src/main/java/acr/browser/lightning/browser/fragment/BookmarksFragment.java index f998eaa..ebe0c34 100644 --- a/app/src/main/java/acr/browser/lightning/fragment/BookmarksFragment.java +++ b/app/src/main/java/acr/browser/lightning/browser/fragment/BookmarksFragment.java @@ -1,4 +1,4 @@ -package acr.browser.lightning.fragment; +package acr.browser.lightning.browser.fragment; import android.app.Activity; import android.content.Context; @@ -34,11 +34,11 @@ import java.util.concurrent.ConcurrentHashMap; import javax.inject.Inject; import acr.browser.lightning.R; -import acr.browser.lightning.activity.BookmarkUiModel; -import acr.browser.lightning.activity.ReadingActivity; -import acr.browser.lightning.activity.TabsManager; +import acr.browser.lightning.browser.bookmark.BookmarkUiModel; +import acr.browser.lightning.reading.activity.ReadingActivity; +import acr.browser.lightning.browser.TabsManager; import acr.browser.lightning.animation.AnimationUtils; -import acr.browser.lightning.app.BrowserApp; +import acr.browser.lightning.BrowserApp; import acr.browser.lightning.browser.BookmarksView; import acr.browser.lightning.constant.Constants; import acr.browser.lightning.controller.UIController; diff --git a/app/src/main/java/acr/browser/lightning/fragment/TabsFragment.java b/app/src/main/java/acr/browser/lightning/browser/fragment/TabsFragment.java similarity index 98% rename from app/src/main/java/acr/browser/lightning/fragment/TabsFragment.java rename to app/src/main/java/acr/browser/lightning/browser/fragment/TabsFragment.java index 0fed33a..beed6ca 100644 --- a/app/src/main/java/acr/browser/lightning/fragment/TabsFragment.java +++ b/app/src/main/java/acr/browser/lightning/browser/fragment/TabsFragment.java @@ -1,4 +1,4 @@ -package acr.browser.lightning.fragment; +package acr.browser.lightning.browser.fragment; import android.app.Activity; import android.content.Context; @@ -34,12 +34,12 @@ import android.widget.TextView; import javax.inject.Inject; import acr.browser.lightning.R; -import acr.browser.lightning.activity.TabsManager; -import acr.browser.lightning.app.BrowserApp; +import acr.browser.lightning.browser.TabsManager; +import acr.browser.lightning.BrowserApp; import acr.browser.lightning.browser.TabsView; import acr.browser.lightning.controller.UIController; -import acr.browser.lightning.fragment.anim.HorizontalItemAnimator; -import acr.browser.lightning.fragment.anim.VerticalItemAnimator; +import acr.browser.lightning.browser.fragment.anim.HorizontalItemAnimator; +import acr.browser.lightning.browser.fragment.anim.VerticalItemAnimator; import acr.browser.lightning.preference.PreferenceManager; import acr.browser.lightning.utils.DrawableUtils; import acr.browser.lightning.utils.ThemeUtils; diff --git a/app/src/main/java/acr/browser/lightning/fragment/anim/HorizontalItemAnimator.java b/app/src/main/java/acr/browser/lightning/browser/fragment/anim/HorizontalItemAnimator.java similarity index 99% rename from app/src/main/java/acr/browser/lightning/fragment/anim/HorizontalItemAnimator.java rename to app/src/main/java/acr/browser/lightning/browser/fragment/anim/HorizontalItemAnimator.java index 732cf96..dce2886 100644 --- a/app/src/main/java/acr/browser/lightning/fragment/anim/HorizontalItemAnimator.java +++ b/app/src/main/java/acr/browser/lightning/browser/fragment/anim/HorizontalItemAnimator.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package acr.browser.lightning.fragment.anim; +package acr.browser.lightning.browser.fragment.anim; import android.animation.TimeInterpolator; import android.animation.ValueAnimator; diff --git a/app/src/main/java/acr/browser/lightning/fragment/anim/VerticalItemAnimator.java b/app/src/main/java/acr/browser/lightning/browser/fragment/anim/VerticalItemAnimator.java similarity index 99% rename from app/src/main/java/acr/browser/lightning/fragment/anim/VerticalItemAnimator.java rename to app/src/main/java/acr/browser/lightning/browser/fragment/anim/VerticalItemAnimator.java index 4a2f5ee..ea18b33 100644 --- a/app/src/main/java/acr/browser/lightning/fragment/anim/VerticalItemAnimator.java +++ b/app/src/main/java/acr/browser/lightning/browser/fragment/anim/VerticalItemAnimator.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package acr.browser.lightning.fragment.anim; +package acr.browser.lightning.browser.fragment.anim; import android.animation.TimeInterpolator; import android.animation.ValueAnimator; diff --git a/app/src/main/java/acr/browser/lightning/constant/BookmarkPage.java b/app/src/main/java/acr/browser/lightning/constant/BookmarkPage.java index 4742801..0f1707f 100644 --- a/app/src/main/java/acr/browser/lightning/constant/BookmarkPage.java +++ b/app/src/main/java/acr/browser/lightning/constant/BookmarkPage.java @@ -26,7 +26,7 @@ import java.util.List; import javax.inject.Inject; import acr.browser.lightning.R; -import acr.browser.lightning.app.BrowserApp; +import acr.browser.lightning.BrowserApp; import acr.browser.lightning.database.HistoryItem; import acr.browser.lightning.database.bookmark.BookmarkModel; import acr.browser.lightning.favicon.FaviconModel; diff --git a/app/src/main/java/acr/browser/lightning/constant/DownloadsPage.java b/app/src/main/java/acr/browser/lightning/constant/DownloadsPage.java index 119c676..4b621bb 100644 --- a/app/src/main/java/acr/browser/lightning/constant/DownloadsPage.java +++ b/app/src/main/java/acr/browser/lightning/constant/DownloadsPage.java @@ -21,7 +21,7 @@ import java.util.List; import javax.inject.Inject; import acr.browser.lightning.R; -import acr.browser.lightning.app.BrowserApp; +import acr.browser.lightning.BrowserApp; import acr.browser.lightning.database.downloads.DownloadItem; import acr.browser.lightning.database.downloads.DownloadsModel; import acr.browser.lightning.preference.PreferenceManager; diff --git a/app/src/main/java/acr/browser/lightning/constant/HistoryPage.java b/app/src/main/java/acr/browser/lightning/constant/HistoryPage.java index e42d83a..cd2cd3e 100644 --- a/app/src/main/java/acr/browser/lightning/constant/HistoryPage.java +++ b/app/src/main/java/acr/browser/lightning/constant/HistoryPage.java @@ -25,7 +25,7 @@ import java.util.List; import javax.inject.Inject; import acr.browser.lightning.R; -import acr.browser.lightning.app.BrowserApp; +import acr.browser.lightning.BrowserApp; import acr.browser.lightning.database.HistoryItem; import acr.browser.lightning.database.history.HistoryModel; import acr.browser.lightning.utils.Preconditions; diff --git a/app/src/main/java/acr/browser/lightning/constant/StartPage.java b/app/src/main/java/acr/browser/lightning/constant/StartPage.java index 873481e..1ea3d26 100644 --- a/app/src/main/java/acr/browser/lightning/constant/StartPage.java +++ b/app/src/main/java/acr/browser/lightning/constant/StartPage.java @@ -17,7 +17,7 @@ import java.io.IOException; import javax.inject.Inject; import acr.browser.lightning.R; -import acr.browser.lightning.app.BrowserApp; +import acr.browser.lightning.BrowserApp; import acr.browser.lightning.search.SearchEngineProvider; import acr.browser.lightning.search.engine.BaseSearchEngine; import acr.browser.lightning.utils.Utils; diff --git a/app/src/main/java/acr/browser/lightning/controller/UIController.java b/app/src/main/java/acr/browser/lightning/controller/UIController.java index c708585..93acd6e 100644 --- a/app/src/main/java/acr/browser/lightning/controller/UIController.java +++ b/app/src/main/java/acr/browser/lightning/controller/UIController.java @@ -14,7 +14,7 @@ import android.view.View; import android.webkit.ValueCallback; import android.webkit.WebChromeClient.CustomViewCallback; -import acr.browser.lightning.activity.TabsManager; +import acr.browser.lightning.browser.TabsManager; import acr.browser.lightning.database.HistoryItem; import acr.browser.lightning.dialog.LightningDialogBuilder; import acr.browser.lightning.view.LightningView; diff --git a/app/src/main/java/acr/browser/lightning/app/AppComponent.java b/app/src/main/java/acr/browser/lightning/di/AppComponent.java similarity index 72% rename from app/src/main/java/acr/browser/lightning/app/AppComponent.java rename to app/src/main/java/acr/browser/lightning/di/AppComponent.java index 17f7c12..635b3f9 100644 --- a/app/src/main/java/acr/browser/lightning/app/AppComponent.java +++ b/app/src/main/java/acr/browser/lightning/di/AppComponent.java @@ -1,12 +1,13 @@ -package acr.browser.lightning.app; +package acr.browser.lightning.di; import javax.inject.Singleton; -import acr.browser.lightning.activity.BrowserActivity; -import acr.browser.lightning.activity.ReadingActivity; -import acr.browser.lightning.activity.TabsManager; -import acr.browser.lightning.activity.ThemableBrowserActivity; -import acr.browser.lightning.activity.ThemableSettingsActivity; +import acr.browser.lightning.browser.activity.BrowserActivity; +import acr.browser.lightning.reading.activity.ReadingActivity; +import acr.browser.lightning.browser.TabsManager; +import acr.browser.lightning.browser.activity.ThemableBrowserActivity; +import acr.browser.lightning.settings.activity.ThemableSettingsActivity; +import acr.browser.lightning.BrowserApp; import acr.browser.lightning.browser.BrowserPresenter; import acr.browser.lightning.browser.SearchBoxModel; import acr.browser.lightning.constant.BookmarkPage; @@ -16,13 +17,13 @@ import acr.browser.lightning.constant.StartPage; import acr.browser.lightning.dialog.LightningDialogBuilder; import acr.browser.lightning.download.DownloadHandler; import acr.browser.lightning.download.LightningDownloadListener; -import acr.browser.lightning.fragment.BookmarkSettingsFragment; -import acr.browser.lightning.fragment.BookmarksFragment; -import acr.browser.lightning.fragment.DebugSettingsFragment; -import acr.browser.lightning.fragment.GeneralSettingsFragment; -import acr.browser.lightning.fragment.LightningPreferenceFragment; -import acr.browser.lightning.fragment.PrivacySettingsFragment; -import acr.browser.lightning.fragment.TabsFragment; +import acr.browser.lightning.settings.fragment.BookmarkSettingsFragment; +import acr.browser.lightning.browser.fragment.BookmarksFragment; +import acr.browser.lightning.settings.fragment.DebugSettingsFragment; +import acr.browser.lightning.settings.fragment.GeneralSettingsFragment; +import acr.browser.lightning.settings.fragment.LightningPreferenceFragment; +import acr.browser.lightning.settings.fragment.PrivacySettingsFragment; +import acr.browser.lightning.browser.fragment.TabsFragment; import acr.browser.lightning.search.SearchEngineProvider; import acr.browser.lightning.search.SuggestionsAdapter; import acr.browser.lightning.utils.ProxyUtils; diff --git a/app/src/main/java/acr/browser/lightning/app/AppModule.java b/app/src/main/java/acr/browser/lightning/di/AppModule.java similarity index 95% rename from app/src/main/java/acr/browser/lightning/app/AppModule.java rename to app/src/main/java/acr/browser/lightning/di/AppModule.java index 32fbf0c..f0ec050 100644 --- a/app/src/main/java/acr/browser/lightning/app/AppModule.java +++ b/app/src/main/java/acr/browser/lightning/di/AppModule.java @@ -1,4 +1,4 @@ -package acr.browser.lightning.app; +package acr.browser.lightning.di; import android.app.Application; import android.content.Context; @@ -8,6 +8,7 @@ import net.i2p.android.ui.I2PAndroidHelper; import javax.inject.Singleton; +import acr.browser.lightning.BrowserApp; import acr.browser.lightning.database.bookmark.BookmarkDatabase; import acr.browser.lightning.database.bookmark.BookmarkModel; import acr.browser.lightning.database.downloads.DownloadsDatabase; diff --git a/app/src/main/java/acr/browser/lightning/dialog/LightningDialogBuilder.java b/app/src/main/java/acr/browser/lightning/dialog/LightningDialogBuilder.java index 600d65a..d925a6f 100644 --- a/app/src/main/java/acr/browser/lightning/dialog/LightningDialogBuilder.java +++ b/app/src/main/java/acr/browser/lightning/dialog/LightningDialogBuilder.java @@ -22,8 +22,8 @@ import java.util.List; import javax.inject.Inject; import acr.browser.lightning.R; -import acr.browser.lightning.activity.MainActivity; -import acr.browser.lightning.app.BrowserApp; +import acr.browser.lightning.MainActivity; +import acr.browser.lightning.BrowserApp; import acr.browser.lightning.constant.BookmarkPage; import acr.browser.lightning.constant.Constants; import acr.browser.lightning.controller.UIController; diff --git a/app/src/main/java/acr/browser/lightning/download/DownloadHandler.java b/app/src/main/java/acr/browser/lightning/download/DownloadHandler.java index fc53bc6..dd315ae 100644 --- a/app/src/main/java/acr/browser/lightning/download/DownloadHandler.java +++ b/app/src/main/java/acr/browser/lightning/download/DownloadHandler.java @@ -32,8 +32,8 @@ import javax.inject.Inject; import acr.browser.lightning.BuildConfig; import acr.browser.lightning.R; -import acr.browser.lightning.activity.MainActivity; -import acr.browser.lightning.app.BrowserApp; +import acr.browser.lightning.MainActivity; +import acr.browser.lightning.BrowserApp; import acr.browser.lightning.constant.Constants; import acr.browser.lightning.controller.UIController; import acr.browser.lightning.database.downloads.DownloadItem; diff --git a/app/src/main/java/acr/browser/lightning/download/LightningDownloadListener.java b/app/src/main/java/acr/browser/lightning/download/LightningDownloadListener.java index eda4ddd..227da44 100644 --- a/app/src/main/java/acr/browser/lightning/download/LightningDownloadListener.java +++ b/app/src/main/java/acr/browser/lightning/download/LightningDownloadListener.java @@ -14,7 +14,7 @@ import android.webkit.DownloadListener; import android.webkit.URLUtil; import acr.browser.lightning.R; -import acr.browser.lightning.app.BrowserApp; +import acr.browser.lightning.BrowserApp; import acr.browser.lightning.database.downloads.DownloadsModel; import acr.browser.lightning.dialog.BrowserDialog; import acr.browser.lightning.preference.PreferenceManager; diff --git a/app/src/main/java/acr/browser/lightning/activity/ReadingActivity.java b/app/src/main/java/acr/browser/lightning/reading/activity/ReadingActivity.java similarity index 99% rename from app/src/main/java/acr/browser/lightning/activity/ReadingActivity.java rename to app/src/main/java/acr/browser/lightning/reading/activity/ReadingActivity.java index 705597d..fd351ac 100644 --- a/app/src/main/java/acr/browser/lightning/activity/ReadingActivity.java +++ b/app/src/main/java/acr/browser/lightning/reading/activity/ReadingActivity.java @@ -1,4 +1,4 @@ -package acr.browser.lightning.activity; +package acr.browser.lightning.reading.activity; import android.animation.ObjectAnimator; import android.app.Dialog; @@ -26,7 +26,7 @@ import android.widget.TextView; import javax.inject.Inject; import acr.browser.lightning.R; -import acr.browser.lightning.app.BrowserApp; +import acr.browser.lightning.BrowserApp; import acr.browser.lightning.constant.Constants; import acr.browser.lightning.dialog.BrowserDialog; import acr.browser.lightning.preference.PreferenceManager; diff --git a/app/src/main/java/acr/browser/lightning/search/SearchEngineProvider.java b/app/src/main/java/acr/browser/lightning/search/SearchEngineProvider.java index bf9dd39..8889d62 100644 --- a/app/src/main/java/acr/browser/lightning/search/SearchEngineProvider.java +++ b/app/src/main/java/acr/browser/lightning/search/SearchEngineProvider.java @@ -7,7 +7,7 @@ import java.util.List; import javax.inject.Inject; -import acr.browser.lightning.app.BrowserApp; +import acr.browser.lightning.BrowserApp; import acr.browser.lightning.preference.PreferenceManager; import acr.browser.lightning.search.engine.AskSearch; import acr.browser.lightning.search.engine.BaiduSearch; diff --git a/app/src/main/java/acr/browser/lightning/search/SuggestionsAdapter.java b/app/src/main/java/acr/browser/lightning/search/SuggestionsAdapter.java index ccb4281..314639c 100644 --- a/app/src/main/java/acr/browser/lightning/search/SuggestionsAdapter.java +++ b/app/src/main/java/acr/browser/lightning/search/SuggestionsAdapter.java @@ -37,7 +37,7 @@ import java.util.Locale; import javax.inject.Inject; import acr.browser.lightning.R; -import acr.browser.lightning.app.BrowserApp; +import acr.browser.lightning.BrowserApp; import acr.browser.lightning.database.HistoryItem; import acr.browser.lightning.database.bookmark.BookmarkModel; import acr.browser.lightning.database.history.HistoryModel; diff --git a/app/src/main/java/acr/browser/lightning/activity/SettingsActivity.java b/app/src/main/java/acr/browser/lightning/settings/activity/SettingsActivity.java similarity index 96% rename from app/src/main/java/acr/browser/lightning/activity/SettingsActivity.java rename to app/src/main/java/acr/browser/lightning/settings/activity/SettingsActivity.java index 9299cc2..8671c5b 100644 --- a/app/src/main/java/acr/browser/lightning/activity/SettingsActivity.java +++ b/app/src/main/java/acr/browser/lightning/settings/activity/SettingsActivity.java @@ -1,7 +1,7 @@ /* * Copyright 2014 A.C.R. Development */ -package acr.browser.lightning.activity; +package acr.browser.lightning.settings.activity; import android.os.Build; import android.os.Bundle; @@ -19,7 +19,7 @@ import java.util.Iterator; import java.util.List; import acr.browser.lightning.R; -import acr.browser.lightning.app.BrowserApp; +import acr.browser.lightning.BrowserApp; public class SettingsActivity extends ThemableSettingsActivity { diff --git a/app/src/main/java/acr/browser/lightning/activity/ThemableSettingsActivity.java b/app/src/main/java/acr/browser/lightning/settings/activity/ThemableSettingsActivity.java similarity index 92% rename from app/src/main/java/acr/browser/lightning/activity/ThemableSettingsActivity.java rename to app/src/main/java/acr/browser/lightning/settings/activity/ThemableSettingsActivity.java index ebc2c1e..008ce7f 100644 --- a/app/src/main/java/acr/browser/lightning/activity/ThemableSettingsActivity.java +++ b/app/src/main/java/acr/browser/lightning/settings/activity/ThemableSettingsActivity.java @@ -1,4 +1,4 @@ -package acr.browser.lightning.activity; +package acr.browser.lightning.settings.activity; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; @@ -8,7 +8,8 @@ import android.os.Bundle; import javax.inject.Inject; import acr.browser.lightning.R; -import acr.browser.lightning.app.BrowserApp; +import acr.browser.lightning.activity.AppCompatPreferenceActivity; +import acr.browser.lightning.BrowserApp; import acr.browser.lightning.preference.PreferenceManager; import acr.browser.lightning.utils.ThemeUtils; diff --git a/app/src/main/java/acr/browser/lightning/fragment/AboutSettingsFragment.java b/app/src/main/java/acr/browser/lightning/settings/fragment/AboutSettingsFragment.java similarity index 95% rename from app/src/main/java/acr/browser/lightning/fragment/AboutSettingsFragment.java rename to app/src/main/java/acr/browser/lightning/settings/fragment/AboutSettingsFragment.java index ce4c4be..2cf9bf1 100644 --- a/app/src/main/java/acr/browser/lightning/fragment/AboutSettingsFragment.java +++ b/app/src/main/java/acr/browser/lightning/settings/fragment/AboutSettingsFragment.java @@ -1,7 +1,7 @@ /* * Copyright 2014 A.C.R. Development */ -package acr.browser.lightning.fragment; +package acr.browser.lightning.settings.fragment; import android.app.Activity; import android.content.pm.PackageInfo; diff --git a/app/src/main/java/acr/browser/lightning/fragment/AdvancedSettingsFragment.java b/app/src/main/java/acr/browser/lightning/settings/fragment/AdvancedSettingsFragment.java similarity index 99% rename from app/src/main/java/acr/browser/lightning/fragment/AdvancedSettingsFragment.java rename to app/src/main/java/acr/browser/lightning/settings/fragment/AdvancedSettingsFragment.java index ba5d7da..ca89161 100644 --- a/app/src/main/java/acr/browser/lightning/fragment/AdvancedSettingsFragment.java +++ b/app/src/main/java/acr/browser/lightning/settings/fragment/AdvancedSettingsFragment.java @@ -1,7 +1,7 @@ /* * Copyright 2014 A.C.R. Development */ -package acr.browser.lightning.fragment; +package acr.browser.lightning.settings.fragment; import android.app.Activity; import android.app.Dialog; diff --git a/app/src/main/java/acr/browser/lightning/fragment/BookmarkSettingsFragment.java b/app/src/main/java/acr/browser/lightning/settings/fragment/BookmarkSettingsFragment.java similarity index 99% rename from app/src/main/java/acr/browser/lightning/fragment/BookmarkSettingsFragment.java rename to app/src/main/java/acr/browser/lightning/settings/fragment/BookmarkSettingsFragment.java index 28e755e..9a2de5a 100644 --- a/app/src/main/java/acr/browser/lightning/fragment/BookmarkSettingsFragment.java +++ b/app/src/main/java/acr/browser/lightning/settings/fragment/BookmarkSettingsFragment.java @@ -1,7 +1,7 @@ /* * Copyright 2014 A.C.R. Development */ -package acr.browser.lightning.fragment; +package acr.browser.lightning.settings.fragment; import android.Manifest; import android.app.Activity; @@ -23,6 +23,7 @@ import android.util.Log; import android.widget.ArrayAdapter; import com.anthonycr.bonsai.CompletableOnSubscribe; +import com.anthonycr.bonsai.Schedulers; import com.anthonycr.bonsai.SingleOnSubscribe; import com.anthonycr.bonsai.Subscription; import com.anthonycr.grant.PermissionsManager; @@ -38,14 +39,11 @@ import java.util.List; import javax.inject.Inject; import acr.browser.lightning.R; -import acr.browser.lightning.app.BrowserApp; +import acr.browser.lightning.BrowserApp; +import acr.browser.lightning.database.HistoryItem; import acr.browser.lightning.database.bookmark.BookmarkExporter; import acr.browser.lightning.database.bookmark.BookmarkLocalSync; import acr.browser.lightning.database.bookmark.BookmarkLocalSync.Source; -import acr.browser.lightning.database.HistoryItem; - -import com.anthonycr.bonsai.Schedulers; - import acr.browser.lightning.database.bookmark.BookmarkModel; import acr.browser.lightning.dialog.BrowserDialog; import acr.browser.lightning.utils.Preconditions; diff --git a/app/src/main/java/acr/browser/lightning/fragment/DebugSettingsFragment.java b/app/src/main/java/acr/browser/lightning/settings/fragment/DebugSettingsFragment.java similarity index 95% rename from app/src/main/java/acr/browser/lightning/fragment/DebugSettingsFragment.java rename to app/src/main/java/acr/browser/lightning/settings/fragment/DebugSettingsFragment.java index dba40b7..be6109a 100644 --- a/app/src/main/java/acr/browser/lightning/fragment/DebugSettingsFragment.java +++ b/app/src/main/java/acr/browser/lightning/settings/fragment/DebugSettingsFragment.java @@ -1,4 +1,4 @@ -package acr.browser.lightning.fragment; +package acr.browser.lightning.settings.fragment; import android.app.Activity; import android.os.Bundle; @@ -10,7 +10,7 @@ import android.support.annotation.NonNull; import javax.inject.Inject; import acr.browser.lightning.R; -import acr.browser.lightning.app.BrowserApp; +import acr.browser.lightning.BrowserApp; import acr.browser.lightning.preference.PreferenceManager; import acr.browser.lightning.utils.Utils; diff --git a/app/src/main/java/acr/browser/lightning/fragment/DisplaySettingsFragment.java b/app/src/main/java/acr/browser/lightning/settings/fragment/DisplaySettingsFragment.java similarity index 99% rename from app/src/main/java/acr/browser/lightning/fragment/DisplaySettingsFragment.java rename to app/src/main/java/acr/browser/lightning/settings/fragment/DisplaySettingsFragment.java index 0cdf6d1..575c203 100644 --- a/app/src/main/java/acr/browser/lightning/fragment/DisplaySettingsFragment.java +++ b/app/src/main/java/acr/browser/lightning/settings/fragment/DisplaySettingsFragment.java @@ -1,7 +1,7 @@ /* * Copyright 2014 A.C.R. Development */ -package acr.browser.lightning.fragment; +package acr.browser.lightning.settings.fragment; import android.app.Activity; import android.app.Dialog; diff --git a/app/src/main/java/acr/browser/lightning/fragment/GeneralSettingsFragment.java b/app/src/main/java/acr/browser/lightning/settings/fragment/GeneralSettingsFragment.java similarity index 99% rename from app/src/main/java/acr/browser/lightning/fragment/GeneralSettingsFragment.java rename to app/src/main/java/acr/browser/lightning/settings/fragment/GeneralSettingsFragment.java index 77446c0..7fdaef7 100644 --- a/app/src/main/java/acr/browser/lightning/fragment/GeneralSettingsFragment.java +++ b/app/src/main/java/acr/browser/lightning/settings/fragment/GeneralSettingsFragment.java @@ -1,7 +1,7 @@ /* * Copyright 2014 A.C.R. Development */ -package acr.browser.lightning.fragment; +package acr.browser.lightning.settings.fragment; import android.app.Activity; import android.app.Dialog; @@ -28,7 +28,7 @@ import javax.inject.Inject; import acr.browser.lightning.BuildConfig; import acr.browser.lightning.R; -import acr.browser.lightning.app.BrowserApp; +import acr.browser.lightning.BrowserApp; import acr.browser.lightning.constant.Constants; import acr.browser.lightning.dialog.BrowserDialog; import acr.browser.lightning.search.SearchEngineProvider; diff --git a/app/src/main/java/acr/browser/lightning/fragment/LightningPreferenceFragment.java b/app/src/main/java/acr/browser/lightning/settings/fragment/LightningPreferenceFragment.java similarity index 86% rename from app/src/main/java/acr/browser/lightning/fragment/LightningPreferenceFragment.java rename to app/src/main/java/acr/browser/lightning/settings/fragment/LightningPreferenceFragment.java index ab7c48d..0219267 100644 --- a/app/src/main/java/acr/browser/lightning/fragment/LightningPreferenceFragment.java +++ b/app/src/main/java/acr/browser/lightning/settings/fragment/LightningPreferenceFragment.java @@ -1,11 +1,11 @@ -package acr.browser.lightning.fragment; +package acr.browser.lightning.settings.fragment; import android.os.Bundle; import android.preference.PreferenceFragment; import javax.inject.Inject; -import acr.browser.lightning.app.BrowserApp; +import acr.browser.lightning.BrowserApp; import acr.browser.lightning.preference.PreferenceManager; /** diff --git a/app/src/main/java/acr/browser/lightning/fragment/PrivacySettingsFragment.java b/app/src/main/java/acr/browser/lightning/settings/fragment/PrivacySettingsFragment.java similarity index 99% rename from app/src/main/java/acr/browser/lightning/fragment/PrivacySettingsFragment.java rename to app/src/main/java/acr/browser/lightning/settings/fragment/PrivacySettingsFragment.java index d386d07..5a35eda 100644 --- a/app/src/main/java/acr/browser/lightning/fragment/PrivacySettingsFragment.java +++ b/app/src/main/java/acr/browser/lightning/settings/fragment/PrivacySettingsFragment.java @@ -1,7 +1,7 @@ /* * Copyright 2014 A.C.R. Development */ -package acr.browser.lightning.fragment; +package acr.browser.lightning.settings.fragment; import android.app.Activity; import android.app.Dialog; @@ -23,7 +23,7 @@ import com.anthonycr.bonsai.Schedulers; import javax.inject.Inject; import acr.browser.lightning.R; -import acr.browser.lightning.app.BrowserApp; +import acr.browser.lightning.BrowserApp; import acr.browser.lightning.database.history.HistoryModel; import acr.browser.lightning.dialog.BrowserDialog; import acr.browser.lightning.utils.Utils; diff --git a/app/src/main/java/acr/browser/lightning/utils/ProxyUtils.java b/app/src/main/java/acr/browser/lightning/utils/ProxyUtils.java index 9c7e8da..dada378 100644 --- a/app/src/main/java/acr/browser/lightning/utils/ProxyUtils.java +++ b/app/src/main/java/acr/browser/lightning/utils/ProxyUtils.java @@ -13,7 +13,7 @@ import javax.inject.Inject; import javax.inject.Singleton; import acr.browser.lightning.R; -import acr.browser.lightning.app.BrowserApp; +import acr.browser.lightning.BrowserApp; import acr.browser.lightning.constant.Constants; import acr.browser.lightning.dialog.BrowserDialog; import acr.browser.lightning.preference.PreferenceManager; diff --git a/app/src/main/java/acr/browser/lightning/utils/StringBuilderUtils.java b/app/src/main/java/acr/browser/lightning/utils/StringBuilderUtils.java index 77c5bb7..09ef24f 100644 --- a/app/src/main/java/acr/browser/lightning/utils/StringBuilderUtils.java +++ b/app/src/main/java/acr/browser/lightning/utils/StringBuilderUtils.java @@ -8,7 +8,7 @@ import android.support.annotation.NonNull; * API equality with the {@link String} * API. */ -class StringBuilderUtils { +public class StringBuilderUtils { private static final String SPACE = " "; private static final String EMPTY = ""; @@ -21,7 +21,7 @@ class StringBuilderUtils { * @param toReplace the string to replace. * @param replacement the replacement string. */ - static void replace(@NonNull StringBuilder stringBuilder, + public static void replace(@NonNull StringBuilder stringBuilder, @NonNull String toReplace, @NonNull String replacement) { int index = stringBuilder.indexOf(toReplace); diff --git a/app/src/main/java/acr/browser/lightning/utils/Utils.java b/app/src/main/java/acr/browser/lightning/utils/Utils.java index e780848..7086640 100644 --- a/app/src/main/java/acr/browser/lightning/utils/Utils.java +++ b/app/src/main/java/acr/browser/lightning/utils/Utils.java @@ -44,7 +44,7 @@ import java.text.SimpleDateFormat; import java.util.Date; import acr.browser.lightning.R; -import acr.browser.lightning.activity.MainActivity; +import acr.browser.lightning.MainActivity; import acr.browser.lightning.constant.Constants; import acr.browser.lightning.database.HistoryItem; import acr.browser.lightning.dialog.BrowserDialog; diff --git a/app/src/main/java/acr/browser/lightning/view/LightningChromeClient.java b/app/src/main/java/acr/browser/lightning/view/LightningChromeClient.java index 020813a..a17803c 100644 --- a/app/src/main/java/acr/browser/lightning/view/LightningChromeClient.java +++ b/app/src/main/java/acr/browser/lightning/view/LightningChromeClient.java @@ -25,7 +25,7 @@ import com.anthonycr.grant.PermissionsResultAction; import javax.inject.Inject; import acr.browser.lightning.R; -import acr.browser.lightning.app.BrowserApp; +import acr.browser.lightning.BrowserApp; import acr.browser.lightning.controller.UIController; import acr.browser.lightning.dialog.BrowserDialog; import acr.browser.lightning.favicon.FaviconModel; diff --git a/app/src/main/java/acr/browser/lightning/view/LightningView.java b/app/src/main/java/acr/browser/lightning/view/LightningView.java index 69b57b5..bbc4439 100644 --- a/app/src/main/java/acr/browser/lightning/view/LightningView.java +++ b/app/src/main/java/acr/browser/lightning/view/LightningView.java @@ -44,7 +44,7 @@ import java.util.Map; import javax.inject.Inject; -import acr.browser.lightning.app.BrowserApp; +import acr.browser.lightning.BrowserApp; import acr.browser.lightning.constant.BookmarkPage; import acr.browser.lightning.constant.Constants; import acr.browser.lightning.constant.DownloadsPage; diff --git a/app/src/main/java/acr/browser/lightning/view/LightningWebClient.java b/app/src/main/java/acr/browser/lightning/view/LightningWebClient.java index 5378019..db5e401 100644 --- a/app/src/main/java/acr/browser/lightning/view/LightningWebClient.java +++ b/app/src/main/java/acr/browser/lightning/view/LightningWebClient.java @@ -42,11 +42,11 @@ import javax.inject.Inject; import acr.browser.lightning.BuildConfig; import acr.browser.lightning.R; -import acr.browser.lightning.app.BrowserApp; +import acr.browser.lightning.BrowserApp; import acr.browser.lightning.constant.Constants; import acr.browser.lightning.controller.UIController; import acr.browser.lightning.dialog.BrowserDialog; -import acr.browser.lightning.utils.AdBlock; +import acr.browser.lightning.adblock.AdBlock; import acr.browser.lightning.utils.IntentUtils; import acr.browser.lightning.utils.Preconditions; import acr.browser.lightning.utils.ProxyUtils; diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 2fa0d62..be7042f 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -5,7 +5,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - tools:context=".activity.BrowserActivity"> + tools:context=".browser.activity.BrowserActivity">
\ No newline at end of file