Browse Source

Improving packaging structure

master
anthony restaino 7 years ago
parent
commit
a6c401624c
  1. 10
      app/src/main/AndroidManifest.xml
  2. 8
      app/src/main/java/acr/browser/lightning/BrowserApp.java
  3. 4
      app/src/main/java/acr/browser/lightning/IncognitoActivity.java
  4. 4
      app/src/main/java/acr/browser/lightning/MainActivity.java
  5. 4
      app/src/main/java/acr/browser/lightning/activity/AppCompatPreferenceActivity.java
  6. 4
      app/src/main/java/acr/browser/lightning/adblock/AdBlock.java
  7. 3
      app/src/main/java/acr/browser/lightning/browser/BrowserPresenter.java
  8. 2
      app/src/main/java/acr/browser/lightning/browser/SearchBoxModel.java
  9. 4
      app/src/main/java/acr/browser/lightning/browser/TabsManager.java
  10. 28
      app/src/main/java/acr/browser/lightning/browser/activity/BrowserActivity.java
  11. 7
      app/src/main/java/acr/browser/lightning/browser/activity/ThemableBrowserActivity.java
  12. 2
      app/src/main/java/acr/browser/lightning/browser/bookmark/BookmarkUiModel.java
  13. 10
      app/src/main/java/acr/browser/lightning/browser/fragment/BookmarksFragment.java
  14. 10
      app/src/main/java/acr/browser/lightning/browser/fragment/TabsFragment.java
  15. 2
      app/src/main/java/acr/browser/lightning/browser/fragment/anim/HorizontalItemAnimator.java
  16. 2
      app/src/main/java/acr/browser/lightning/browser/fragment/anim/VerticalItemAnimator.java
  17. 2
      app/src/main/java/acr/browser/lightning/constant/BookmarkPage.java
  18. 2
      app/src/main/java/acr/browser/lightning/constant/DownloadsPage.java
  19. 2
      app/src/main/java/acr/browser/lightning/constant/HistoryPage.java
  20. 2
      app/src/main/java/acr/browser/lightning/constant/StartPage.java
  21. 2
      app/src/main/java/acr/browser/lightning/controller/UIController.java
  22. 27
      app/src/main/java/acr/browser/lightning/di/AppComponent.java
  23. 3
      app/src/main/java/acr/browser/lightning/di/AppModule.java
  24. 4
      app/src/main/java/acr/browser/lightning/dialog/LightningDialogBuilder.java
  25. 4
      app/src/main/java/acr/browser/lightning/download/DownloadHandler.java
  26. 2
      app/src/main/java/acr/browser/lightning/download/LightningDownloadListener.java
  27. 4
      app/src/main/java/acr/browser/lightning/reading/activity/ReadingActivity.java
  28. 2
      app/src/main/java/acr/browser/lightning/search/SearchEngineProvider.java
  29. 2
      app/src/main/java/acr/browser/lightning/search/SuggestionsAdapter.java
  30. 4
      app/src/main/java/acr/browser/lightning/settings/activity/SettingsActivity.java
  31. 5
      app/src/main/java/acr/browser/lightning/settings/activity/ThemableSettingsActivity.java
  32. 2
      app/src/main/java/acr/browser/lightning/settings/fragment/AboutSettingsFragment.java
  33. 2
      app/src/main/java/acr/browser/lightning/settings/fragment/AdvancedSettingsFragment.java
  34. 10
      app/src/main/java/acr/browser/lightning/settings/fragment/BookmarkSettingsFragment.java
  35. 4
      app/src/main/java/acr/browser/lightning/settings/fragment/DebugSettingsFragment.java
  36. 2
      app/src/main/java/acr/browser/lightning/settings/fragment/DisplaySettingsFragment.java
  37. 4
      app/src/main/java/acr/browser/lightning/settings/fragment/GeneralSettingsFragment.java
  38. 4
      app/src/main/java/acr/browser/lightning/settings/fragment/LightningPreferenceFragment.java
  39. 4
      app/src/main/java/acr/browser/lightning/settings/fragment/PrivacySettingsFragment.java
  40. 2
      app/src/main/java/acr/browser/lightning/utils/ProxyUtils.java
  41. 4
      app/src/main/java/acr/browser/lightning/utils/StringBuilderUtils.java
  42. 2
      app/src/main/java/acr/browser/lightning/utils/Utils.java
  43. 2
      app/src/main/java/acr/browser/lightning/view/LightningChromeClient.java
  44. 2
      app/src/main/java/acr/browser/lightning/view/LightningView.java
  45. 4
      app/src/main/java/acr/browser/lightning/view/LightningWebClient.java
  46. 2
      app/src/main/res/layout/activity_main.xml
  47. 14
      app/src/main/res/xml/preferences_headers.xml

10
app/src/main/AndroidManifest.xml

@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
android:required="false"/>
<application
android:name=".app.BrowserApp"
android:name=".BrowserApp"
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher"
@ -38,7 +38,7 @@ @@ -38,7 +38,7 @@
android:value="2.1"/>
<activity
android:name=".activity.MainActivity"
android:name=".MainActivity"
android:alwaysRetainTaskState="true"
android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|keyboardHidden|keyboard"
android:label="@string/app_name"
@ -122,7 +122,7 @@ @@ -122,7 +122,7 @@
</intent-filter>
</activity>
<activity
android:name=".activity.SettingsActivity"
android:name=".settings.activity.SettingsActivity"
android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|keyboardHidden|keyboard"
android:label="@string/settings"
android:theme="@style/Theme.SettingsTheme">
@ -133,7 +133,7 @@ @@ -133,7 +133,7 @@
</intent-filter>
</activity>
<activity
android:name=".activity.IncognitoActivity"
android:name=".IncognitoActivity"
android:alwaysRetainTaskState="true"
android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|keyboardHidden|keyboard"
android:label="@string/app_name"
@ -147,7 +147,7 @@ @@ -147,7 +147,7 @@
</intent-filter>
</activity>
<activity
android:name=".activity.ReadingActivity"
android:name=".reading.activity.ReadingActivity"
android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|keyboardHidden|keyboard"
android:label="@string/reading_mode"
android:theme="@style/Theme.SettingsTheme">

8
app/src/main/java/acr/browser/lightning/app/BrowserApp.java → app/src/main/java/acr/browser/lightning/BrowserApp.java

@ -1,4 +1,4 @@ @@ -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; @@ -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;

4
app/src/main/java/acr/browser/lightning/activity/IncognitoActivity.java → app/src/main/java/acr/browser/lightning/IncognitoActivity.java

@ -1,4 +1,4 @@ @@ -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; @@ -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 {

4
app/src/main/java/acr/browser/lightning/activity/MainActivity.java → app/src/main/java/acr/browser/lightning/MainActivity.java

@ -1,4 +1,4 @@ @@ -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; @@ -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 {

4
app/src/main/java/acr/browser/lightning/activity/AppCompatPreferenceActivity.java

@ -40,11 +40,11 @@ public abstract class AppCompatPreferenceActivity extends PreferenceActivity { @@ -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);
}

4
app/src/main/java/acr/browser/lightning/utils/AdBlock.java → app/src/main/java/acr/browser/lightning/adblock/AdBlock.java

@ -1,4 +1,4 @@ @@ -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; @@ -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 {

3
app/src/main/java/acr/browser/lightning/browser/BrowserPresenter.java

@ -16,8 +16,7 @@ import javax.inject.Inject; @@ -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;

2
app/src/main/java/acr/browser/lightning/browser/SearchBoxModel.java

@ -8,7 +8,7 @@ import android.text.TextUtils; @@ -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;

4
app/src/main/java/acr/browser/lightning/activity/TabsManager.java → app/src/main/java/acr/browser/lightning/browser/TabsManager.java

@ -1,4 +1,4 @@ @@ -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; @@ -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;

28
app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java → app/src/main/java/acr/browser/lightning/browser/activity/BrowserActivity.java

@ -2,7 +2,7 @@ @@ -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; @@ -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; @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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();

7
app/src/main/java/acr/browser/lightning/activity/ThemableBrowserActivity.java → app/src/main/java/acr/browser/lightning/browser/activity/ThemableBrowserActivity.java

@ -1,4 +1,4 @@ @@ -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; @@ -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;

2
app/src/main/java/acr/browser/lightning/activity/BookmarkUiModel.java → app/src/main/java/acr/browser/lightning/browser/bookmark/BookmarkUiModel.java

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
package acr.browser.lightning.activity;
package acr.browser.lightning.browser.bookmark;
import android.support.annotation.Nullable;

10
app/src/main/java/acr/browser/lightning/fragment/BookmarksFragment.java → app/src/main/java/acr/browser/lightning/browser/fragment/BookmarksFragment.java

@ -1,4 +1,4 @@ @@ -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; @@ -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;

10
app/src/main/java/acr/browser/lightning/fragment/TabsFragment.java → app/src/main/java/acr/browser/lightning/browser/fragment/TabsFragment.java

@ -1,4 +1,4 @@ @@ -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; @@ -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;

2
app/src/main/java/acr/browser/lightning/fragment/anim/HorizontalItemAnimator.java → app/src/main/java/acr/browser/lightning/browser/fragment/anim/HorizontalItemAnimator.java

@ -13,7 +13,7 @@ @@ -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;

2
app/src/main/java/acr/browser/lightning/fragment/anim/VerticalItemAnimator.java → app/src/main/java/acr/browser/lightning/browser/fragment/anim/VerticalItemAnimator.java

@ -13,7 +13,7 @@ @@ -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;

2
app/src/main/java/acr/browser/lightning/constant/BookmarkPage.java

@ -26,7 +26,7 @@ import java.util.List; @@ -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;

2
app/src/main/java/acr/browser/lightning/constant/DownloadsPage.java

@ -21,7 +21,7 @@ import java.util.List; @@ -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;

2
app/src/main/java/acr/browser/lightning/constant/HistoryPage.java

@ -25,7 +25,7 @@ import java.util.List; @@ -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;

2
app/src/main/java/acr/browser/lightning/constant/StartPage.java

@ -17,7 +17,7 @@ import java.io.IOException; @@ -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;

2
app/src/main/java/acr/browser/lightning/controller/UIController.java

@ -14,7 +14,7 @@ import android.view.View; @@ -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;

27
app/src/main/java/acr/browser/lightning/app/AppComponent.java → app/src/main/java/acr/browser/lightning/di/AppComponent.java

@ -1,12 +1,13 @@ @@ -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; @@ -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;

3
app/src/main/java/acr/browser/lightning/app/AppModule.java → app/src/main/java/acr/browser/lightning/di/AppModule.java

@ -1,4 +1,4 @@ @@ -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; @@ -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;

4
app/src/main/java/acr/browser/lightning/dialog/LightningDialogBuilder.java

@ -22,8 +22,8 @@ import java.util.List; @@ -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;

4
app/src/main/java/acr/browser/lightning/download/DownloadHandler.java

@ -32,8 +32,8 @@ import javax.inject.Inject; @@ -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;

2
app/src/main/java/acr/browser/lightning/download/LightningDownloadListener.java

@ -14,7 +14,7 @@ import android.webkit.DownloadListener; @@ -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;

4
app/src/main/java/acr/browser/lightning/activity/ReadingActivity.java → app/src/main/java/acr/browser/lightning/reading/activity/ReadingActivity.java

@ -1,4 +1,4 @@ @@ -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; @@ -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;

2
app/src/main/java/acr/browser/lightning/search/SearchEngineProvider.java

@ -7,7 +7,7 @@ import java.util.List; @@ -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;

2
app/src/main/java/acr/browser/lightning/search/SuggestionsAdapter.java

@ -37,7 +37,7 @@ import java.util.Locale; @@ -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;

4
app/src/main/java/acr/browser/lightning/activity/SettingsActivity.java → app/src/main/java/acr/browser/lightning/settings/activity/SettingsActivity.java

@ -1,7 +1,7 @@ @@ -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; @@ -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 {

5
app/src/main/java/acr/browser/lightning/activity/ThemableSettingsActivity.java → app/src/main/java/acr/browser/lightning/settings/activity/ThemableSettingsActivity.java

@ -1,4 +1,4 @@ @@ -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; @@ -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;

2
app/src/main/java/acr/browser/lightning/fragment/AboutSettingsFragment.java → app/src/main/java/acr/browser/lightning/settings/fragment/AboutSettingsFragment.java

@ -1,7 +1,7 @@ @@ -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;

2
app/src/main/java/acr/browser/lightning/fragment/AdvancedSettingsFragment.java → app/src/main/java/acr/browser/lightning/settings/fragment/AdvancedSettingsFragment.java

@ -1,7 +1,7 @@ @@ -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;

10
app/src/main/java/acr/browser/lightning/fragment/BookmarkSettingsFragment.java → app/src/main/java/acr/browser/lightning/settings/fragment/BookmarkSettingsFragment.java

@ -1,7 +1,7 @@ @@ -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; @@ -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; @@ -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;

4
app/src/main/java/acr/browser/lightning/fragment/DebugSettingsFragment.java → app/src/main/java/acr/browser/lightning/settings/fragment/DebugSettingsFragment.java

@ -1,4 +1,4 @@ @@ -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; @@ -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;

2
app/src/main/java/acr/browser/lightning/fragment/DisplaySettingsFragment.java → app/src/main/java/acr/browser/lightning/settings/fragment/DisplaySettingsFragment.java

@ -1,7 +1,7 @@ @@ -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;

4
app/src/main/java/acr/browser/lightning/fragment/GeneralSettingsFragment.java → app/src/main/java/acr/browser/lightning/settings/fragment/GeneralSettingsFragment.java

@ -1,7 +1,7 @@ @@ -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; @@ -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;

4
app/src/main/java/acr/browser/lightning/fragment/LightningPreferenceFragment.java → app/src/main/java/acr/browser/lightning/settings/fragment/LightningPreferenceFragment.java

@ -1,11 +1,11 @@ @@ -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;
/**

4
app/src/main/java/acr/browser/lightning/fragment/PrivacySettingsFragment.java → app/src/main/java/acr/browser/lightning/settings/fragment/PrivacySettingsFragment.java

@ -1,7 +1,7 @@ @@ -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; @@ -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;

2
app/src/main/java/acr/browser/lightning/utils/ProxyUtils.java

@ -13,7 +13,7 @@ import javax.inject.Inject; @@ -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;

4
app/src/main/java/acr/browser/lightning/utils/StringBuilderUtils.java

@ -8,7 +8,7 @@ import android.support.annotation.NonNull; @@ -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 { @@ -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);

2
app/src/main/java/acr/browser/lightning/utils/Utils.java

@ -44,7 +44,7 @@ import java.text.SimpleDateFormat; @@ -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;

2
app/src/main/java/acr/browser/lightning/view/LightningChromeClient.java

@ -25,7 +25,7 @@ import com.anthonycr.grant.PermissionsResultAction; @@ -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;

2
app/src/main/java/acr/browser/lightning/view/LightningView.java

@ -44,7 +44,7 @@ import java.util.Map; @@ -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;

4
app/src/main/java/acr/browser/lightning/view/LightningWebClient.java

@ -42,11 +42,11 @@ import javax.inject.Inject; @@ -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;

2
app/src/main/res/layout/activity_main.xml

@ -5,7 +5,7 @@ @@ -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">
<android.support.v4.widget.DrawerLayout
android:id="@+id/drawer_layout"

14
app/src/main/res/xml/preferences_headers.xml

@ -1,22 +1,22 @@ @@ -1,22 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<preference-headers xmlns:android="http://schemas.android.com/apk/res/android">
<header
android:fragment="acr.browser.lightning.fragment.GeneralSettingsFragment"
android:fragment="acr.browser.lightning.settings.fragment.GeneralSettingsFragment"
android:title="@string/settings_general"/>
<header
android:fragment="acr.browser.lightning.fragment.BookmarkSettingsFragment"
android:fragment="acr.browser.lightning.settings.fragment.BookmarkSettingsFragment"
android:title="@string/bookmark_settings"/>
<header
android:fragment="acr.browser.lightning.fragment.DisplaySettingsFragment"
android:fragment="acr.browser.lightning.settings.fragment.DisplaySettingsFragment"
android:title="@string/settings_display"/>
<header
android:fragment="acr.browser.lightning.fragment.PrivacySettingsFragment"
android:fragment="acr.browser.lightning.settings.fragment.PrivacySettingsFragment"
android:title="@string/settings_privacy"/>
<header
android:fragment="acr.browser.lightning.fragment.AdvancedSettingsFragment"
android:fragment="acr.browser.lightning.settings.fragment.AdvancedSettingsFragment"
android:title="@string/settings_advanced"/>
<header
android:fragment="acr.browser.lightning.fragment.AboutSettingsFragment"
android:fragment="acr.browser.lightning.settings.fragment.AboutSettingsFragment"
android:summary="@string/settings_about_explain"
android:title="@string/settings_about"/>
<header
@ -31,6 +31,6 @@ @@ -31,6 +31,6 @@
</intent>
</header>
<header
android:fragment="acr.browser.lightning.fragment.DebugSettingsFragment"
android:fragment="acr.browser.lightning.settings.fragment.DebugSettingsFragment"
android:title="@string/debug_title"/>
</preference-headers>
Loading…
Cancel
Save