Browse Source

Improving packaging structure

master
anthony restaino 8 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 @@
android:required="false"/> android:required="false"/>
<application <application
android:name=".app.BrowserApp" android:name=".BrowserApp"
android:allowBackup="true" android:allowBackup="true"
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
@ -38,7 +38,7 @@
android:value="2.1"/> android:value="2.1"/>
<activity <activity
android:name=".activity.MainActivity" android:name=".MainActivity"
android:alwaysRetainTaskState="true" android:alwaysRetainTaskState="true"
android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|keyboardHidden|keyboard" android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|keyboardHidden|keyboard"
android:label="@string/app_name" android:label="@string/app_name"
@ -122,7 +122,7 @@
</intent-filter> </intent-filter>
</activity> </activity>
<activity <activity
android:name=".activity.SettingsActivity" android:name=".settings.activity.SettingsActivity"
android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|keyboardHidden|keyboard" android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|keyboardHidden|keyboard"
android:label="@string/settings" android:label="@string/settings"
android:theme="@style/Theme.SettingsTheme"> android:theme="@style/Theme.SettingsTheme">
@ -133,7 +133,7 @@
</intent-filter> </intent-filter>
</activity> </activity>
<activity <activity
android:name=".activity.IncognitoActivity" android:name=".IncognitoActivity"
android:alwaysRetainTaskState="true" android:alwaysRetainTaskState="true"
android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|keyboardHidden|keyboard" android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|keyboardHidden|keyboard"
android:label="@string/app_name" android:label="@string/app_name"
@ -147,7 +147,7 @@
</intent-filter> </intent-filter>
</activity> </activity>
<activity <activity
android:name=".activity.ReadingActivity" android:name=".reading.activity.ReadingActivity"
android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|keyboardHidden|keyboard" android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|keyboardHidden|keyboard"
android:label="@string/reading_mode" android:label="@string/reading_mode"
android:theme="@style/Theme.SettingsTheme"> 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 @@
package acr.browser.lightning.app; package acr.browser.lightning;
import android.app.Activity; import android.app.Activity;
import android.app.Application; import android.app.Application;
@ -20,11 +20,13 @@ import java.util.List;
import javax.inject.Inject; import javax.inject.Inject;
import acr.browser.lightning.BuildConfig;
import acr.browser.lightning.database.HistoryItem; import acr.browser.lightning.database.HistoryItem;
import acr.browser.lightning.database.bookmark.BookmarkExporter; 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.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.preference.PreferenceManager;
import acr.browser.lightning.utils.FileUtils; import acr.browser.lightning.utils.FileUtils;
import acr.browser.lightning.utils.MemoryLeakUtils; 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 @@
package acr.browser.lightning.activity; package acr.browser.lightning;
import android.content.Intent; import android.content.Intent;
import android.os.Build; import android.os.Build;
@ -12,7 +12,7 @@ import com.anthonycr.bonsai.Completable;
import com.anthonycr.bonsai.CompletableAction; import com.anthonycr.bonsai.CompletableAction;
import com.anthonycr.bonsai.CompletableSubscriber; import com.anthonycr.bonsai.CompletableSubscriber;
import acr.browser.lightning.R; import acr.browser.lightning.browser.activity.BrowserActivity;
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public class IncognitoActivity extends BrowserActivity { 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 @@
package acr.browser.lightning.activity; package acr.browser.lightning;
import android.content.Intent; import android.content.Intent;
import android.os.Build; import android.os.Build;
@ -13,7 +13,7 @@ import com.anthonycr.bonsai.Completable;
import com.anthonycr.bonsai.CompletableAction; import com.anthonycr.bonsai.CompletableAction;
import com.anthonycr.bonsai.CompletableSubscriber; import com.anthonycr.bonsai.CompletableSubscriber;
import acr.browser.lightning.R; import acr.browser.lightning.browser.activity.BrowserActivity;
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public class MainActivity extends BrowserActivity { 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 {
getDelegate().onPostCreate(savedInstanceState); getDelegate().onPostCreate(savedInstanceState);
} }
ActionBar getSupportActionBar() { protected final ActionBar getSupportActionBar() {
return getDelegate().getSupportActionBar(); return getDelegate().getSupportActionBar();
} }
void setSupportActionBar(@Nullable Toolbar toolbar) { protected final void setSupportActionBar(@Nullable Toolbar toolbar) {
getDelegate().setSupportActionBar(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 @@
package acr.browser.lightning.utils; package acr.browser.lightning.adblock;
import android.app.Application; import android.app.Application;
import android.content.res.AssetManager; import android.content.res.AssetManager;
@ -24,6 +24,8 @@ import javax.inject.Singleton;
import acr.browser.lightning.BuildConfig; import acr.browser.lightning.BuildConfig;
import acr.browser.lightning.preference.PreferenceManager; import acr.browser.lightning.preference.PreferenceManager;
import acr.browser.lightning.utils.StringBuilderUtils;
import acr.browser.lightning.utils.Utils;
@Singleton @Singleton
public class AdBlock { public class AdBlock {

3
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.BuildConfig;
import acr.browser.lightning.R; import acr.browser.lightning.R;
import acr.browser.lightning.activity.TabsManager; import acr.browser.lightning.BrowserApp;
import acr.browser.lightning.app.BrowserApp;
import acr.browser.lightning.constant.BookmarkPage; import acr.browser.lightning.constant.BookmarkPage;
import acr.browser.lightning.constant.Constants; import acr.browser.lightning.constant.Constants;
import acr.browser.lightning.constant.StartPage; 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;
import javax.inject.Inject; import javax.inject.Inject;
import acr.browser.lightning.R; 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.preference.PreferenceManager;
import acr.browser.lightning.utils.UrlUtils; import acr.browser.lightning.utils.UrlUtils;
import acr.browser.lightning.utils.Utils; 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 @@
package acr.browser.lightning.activity; package acr.browser.lightning.browser;
import android.app.Activity; import android.app.Activity;
import android.app.Application; import android.app.Application;
@ -31,7 +31,7 @@ import java.util.List;
import javax.inject.Inject; import javax.inject.Inject;
import acr.browser.lightning.R; 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.BookmarkPage;
import acr.browser.lightning.constant.DownloadsPage; import acr.browser.lightning.constant.DownloadsPage;
import acr.browser.lightning.constant.HistoryPage; 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 @@
* Copyright 2015 Anthony Restaino * Copyright 2015 Anthony Restaino
*/ */
package acr.browser.lightning.activity; package acr.browser.lightning.browser.activity;
import android.app.Activity; import android.app.Activity;
import android.app.Dialog; import android.app.Dialog;
@ -90,12 +90,15 @@ import java.io.IOException;
import javax.inject.Inject; import javax.inject.Inject;
import acr.browser.lightning.R; 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.BookmarksView;
import acr.browser.lightning.browser.BrowserPresenter; import acr.browser.lightning.browser.BrowserPresenter;
import acr.browser.lightning.browser.BrowserView; import acr.browser.lightning.browser.BrowserView;
import acr.browser.lightning.IncognitoActivity;
import acr.browser.lightning.browser.SearchBoxModel; import acr.browser.lightning.browser.SearchBoxModel;
import acr.browser.lightning.browser.TabsManager;
import acr.browser.lightning.browser.TabsView; import acr.browser.lightning.browser.TabsView;
import acr.browser.lightning.BrowserApp;
import acr.browser.lightning.constant.Constants; import acr.browser.lightning.constant.Constants;
import acr.browser.lightning.constant.DownloadsPage; import acr.browser.lightning.constant.DownloadsPage;
import acr.browser.lightning.constant.HistoryPage; 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.database.history.HistoryModel;
import acr.browser.lightning.dialog.BrowserDialog; import acr.browser.lightning.dialog.BrowserDialog;
import acr.browser.lightning.dialog.LightningDialogBuilder; import acr.browser.lightning.dialog.LightningDialogBuilder;
import acr.browser.lightning.fragment.BookmarksFragment; import acr.browser.lightning.browser.fragment.BookmarksFragment;
import acr.browser.lightning.fragment.TabsFragment; import acr.browser.lightning.browser.fragment.TabsFragment;
import acr.browser.lightning.interpolator.BezierDecelerateInterpolator; import acr.browser.lightning.interpolator.BezierDecelerateInterpolator;
import acr.browser.lightning.receiver.NetworkReceiver; import acr.browser.lightning.receiver.NetworkReceiver;
import acr.browser.lightning.search.SearchEngineProvider; import acr.browser.lightning.search.SearchEngineProvider;
import acr.browser.lightning.search.SuggestionsAdapter; import acr.browser.lightning.search.SuggestionsAdapter;
import acr.browser.lightning.search.engine.BaseSearchEngine; 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.DrawableUtils;
import acr.browser.lightning.utils.IntentUtils; import acr.browser.lightning.utils.IntentUtils;
import acr.browser.lightning.utils.Preconditions; 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); public abstract void updateHistory(@Nullable final String title, @NonNull final String url);
@NonNull @NonNull
abstract Completable updateCookiePreference(); protected abstract Completable updateCookiePreference();
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
@ -451,11 +455,11 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
* @return true if the panic trigger sent * @return true if the panic trigger sent
* the intent, false otherwise. * 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()); return intent != null && INTENT_PANIC_TRIGGER.equals(intent.getAction());
} }
void panicClean() { protected void panicClean() {
Log.d(TAG, "Closing browser"); Log.d(TAG, "Closing browser");
mTabsManager.newTab(this, "", false); mTabsManager.newTab(this, "", false);
mTabsManager.switchToTab(0); 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); mPresenter.onNewIntent(intent);
} }
@ -1232,7 +1236,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
return mPresenter.newTab(url, show); return mPresenter.newTab(url, show);
} }
void performExitCleanUp() { protected void performExitCleanUp() {
final LightningView currentTab = mTabsManager.getCurrentTab(); final LightningView currentTab = mTabsManager.getCurrentTab();
if (mPreferences.getClearCacheExit() && currentTab != null && !isIncognito()) { if (mPreferences.getClearCacheExit() && currentTab != null && !isIncognito()) {
WebUtils.clearCache(currentTab.getWebView()); WebUtils.clearCache(currentTab.getWebView());
@ -1358,7 +1362,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
} }
} }
void saveOpenTabs() { protected void saveOpenTabs() {
if (mPreferences.getRestoreLostTabsEnabled()) { if (mPreferences.getRestoreLostTabsEnabled()) {
mTabsManager.saveState(); mTabsManager.saveState();
} }
@ -1548,7 +1552,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
mProgressBar.setProgress(n); 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)) { if (UrlUtils.isSpecialUrl(url)) {
return; return;
} }
@ -1665,7 +1669,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
* @param runnable an optional runnable to run after * @param runnable an optional runnable to run after
* the drawers are closed. * 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 (!mDrawerLayout.isDrawerOpen(mDrawerLeft) && !mDrawerLayout.isDrawerOpen(mDrawerRight)) {
if (runnable != null) { if (runnable != null) {
runnable.run(); 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 @@
package acr.browser.lightning.activity; package acr.browser.lightning.browser.activity;
import android.content.Intent; import android.content.Intent;
import android.content.res.Configuration; import android.content.res.Configuration;
@ -10,13 +10,14 @@ import android.support.v7.app.AppCompatActivity;
import javax.inject.Inject; import javax.inject.Inject;
import acr.browser.lightning.R; 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.preference.PreferenceManager;
import acr.browser.lightning.utils.ThemeUtils; import acr.browser.lightning.utils.ThemeUtils;
public abstract class ThemableBrowserActivity extends AppCompatActivity { 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 int mTheme;
private boolean mShowTabsInDrawer; 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 @@
package acr.browser.lightning.activity; package acr.browser.lightning.browser.bookmark;
import android.support.annotation.Nullable; 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 @@
package acr.browser.lightning.fragment; package acr.browser.lightning.browser.fragment;
import android.app.Activity; import android.app.Activity;
import android.content.Context; import android.content.Context;
@ -34,11 +34,11 @@ import java.util.concurrent.ConcurrentHashMap;
import javax.inject.Inject; import javax.inject.Inject;
import acr.browser.lightning.R; import acr.browser.lightning.R;
import acr.browser.lightning.activity.BookmarkUiModel; import acr.browser.lightning.browser.bookmark.BookmarkUiModel;
import acr.browser.lightning.activity.ReadingActivity; import acr.browser.lightning.reading.activity.ReadingActivity;
import acr.browser.lightning.activity.TabsManager; import acr.browser.lightning.browser.TabsManager;
import acr.browser.lightning.animation.AnimationUtils; 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.browser.BookmarksView;
import acr.browser.lightning.constant.Constants; import acr.browser.lightning.constant.Constants;
import acr.browser.lightning.controller.UIController; 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 @@
package acr.browser.lightning.fragment; package acr.browser.lightning.browser.fragment;
import android.app.Activity; import android.app.Activity;
import android.content.Context; import android.content.Context;
@ -34,12 +34,12 @@ import android.widget.TextView;
import javax.inject.Inject; import javax.inject.Inject;
import acr.browser.lightning.R; import acr.browser.lightning.R;
import acr.browser.lightning.activity.TabsManager; import acr.browser.lightning.browser.TabsManager;
import acr.browser.lightning.app.BrowserApp; import acr.browser.lightning.BrowserApp;
import acr.browser.lightning.browser.TabsView; import acr.browser.lightning.browser.TabsView;
import acr.browser.lightning.controller.UIController; import acr.browser.lightning.controller.UIController;
import acr.browser.lightning.fragment.anim.HorizontalItemAnimator; import acr.browser.lightning.browser.fragment.anim.HorizontalItemAnimator;
import acr.browser.lightning.fragment.anim.VerticalItemAnimator; import acr.browser.lightning.browser.fragment.anim.VerticalItemAnimator;
import acr.browser.lightning.preference.PreferenceManager; import acr.browser.lightning.preference.PreferenceManager;
import acr.browser.lightning.utils.DrawableUtils; import acr.browser.lightning.utils.DrawableUtils;
import acr.browser.lightning.utils.ThemeUtils; 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 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package acr.browser.lightning.fragment.anim; package acr.browser.lightning.browser.fragment.anim;
import android.animation.TimeInterpolator; import android.animation.TimeInterpolator;
import android.animation.ValueAnimator; 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 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package acr.browser.lightning.fragment.anim; package acr.browser.lightning.browser.fragment.anim;
import android.animation.TimeInterpolator; import android.animation.TimeInterpolator;
import android.animation.ValueAnimator; import android.animation.ValueAnimator;

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

@ -26,7 +26,7 @@ import java.util.List;
import javax.inject.Inject; import javax.inject.Inject;
import acr.browser.lightning.R; 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.HistoryItem;
import acr.browser.lightning.database.bookmark.BookmarkModel; import acr.browser.lightning.database.bookmark.BookmarkModel;
import acr.browser.lightning.favicon.FaviconModel; 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;
import javax.inject.Inject; import javax.inject.Inject;
import acr.browser.lightning.R; 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.DownloadItem;
import acr.browser.lightning.database.downloads.DownloadsModel; import acr.browser.lightning.database.downloads.DownloadsModel;
import acr.browser.lightning.preference.PreferenceManager; 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;
import javax.inject.Inject; import javax.inject.Inject;
import acr.browser.lightning.R; 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.HistoryItem;
import acr.browser.lightning.database.history.HistoryModel; import acr.browser.lightning.database.history.HistoryModel;
import acr.browser.lightning.utils.Preconditions; 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;
import javax.inject.Inject; import javax.inject.Inject;
import acr.browser.lightning.R; 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.SearchEngineProvider;
import acr.browser.lightning.search.engine.BaseSearchEngine; import acr.browser.lightning.search.engine.BaseSearchEngine;
import acr.browser.lightning.utils.Utils; 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;
import android.webkit.ValueCallback; import android.webkit.ValueCallback;
import android.webkit.WebChromeClient.CustomViewCallback; 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.database.HistoryItem;
import acr.browser.lightning.dialog.LightningDialogBuilder; import acr.browser.lightning.dialog.LightningDialogBuilder;
import acr.browser.lightning.view.LightningView; 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 @@
package acr.browser.lightning.app; package acr.browser.lightning.di;
import javax.inject.Singleton; import javax.inject.Singleton;
import acr.browser.lightning.activity.BrowserActivity; import acr.browser.lightning.browser.activity.BrowserActivity;
import acr.browser.lightning.activity.ReadingActivity; import acr.browser.lightning.reading.activity.ReadingActivity;
import acr.browser.lightning.activity.TabsManager; import acr.browser.lightning.browser.TabsManager;
import acr.browser.lightning.activity.ThemableBrowserActivity; import acr.browser.lightning.browser.activity.ThemableBrowserActivity;
import acr.browser.lightning.activity.ThemableSettingsActivity; import acr.browser.lightning.settings.activity.ThemableSettingsActivity;
import acr.browser.lightning.BrowserApp;
import acr.browser.lightning.browser.BrowserPresenter; import acr.browser.lightning.browser.BrowserPresenter;
import acr.browser.lightning.browser.SearchBoxModel; import acr.browser.lightning.browser.SearchBoxModel;
import acr.browser.lightning.constant.BookmarkPage; 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.dialog.LightningDialogBuilder;
import acr.browser.lightning.download.DownloadHandler; import acr.browser.lightning.download.DownloadHandler;
import acr.browser.lightning.download.LightningDownloadListener; import acr.browser.lightning.download.LightningDownloadListener;
import acr.browser.lightning.fragment.BookmarkSettingsFragment; import acr.browser.lightning.settings.fragment.BookmarkSettingsFragment;
import acr.browser.lightning.fragment.BookmarksFragment; import acr.browser.lightning.browser.fragment.BookmarksFragment;
import acr.browser.lightning.fragment.DebugSettingsFragment; import acr.browser.lightning.settings.fragment.DebugSettingsFragment;
import acr.browser.lightning.fragment.GeneralSettingsFragment; import acr.browser.lightning.settings.fragment.GeneralSettingsFragment;
import acr.browser.lightning.fragment.LightningPreferenceFragment; import acr.browser.lightning.settings.fragment.LightningPreferenceFragment;
import acr.browser.lightning.fragment.PrivacySettingsFragment; import acr.browser.lightning.settings.fragment.PrivacySettingsFragment;
import acr.browser.lightning.fragment.TabsFragment; import acr.browser.lightning.browser.fragment.TabsFragment;
import acr.browser.lightning.search.SearchEngineProvider; import acr.browser.lightning.search.SearchEngineProvider;
import acr.browser.lightning.search.SuggestionsAdapter; import acr.browser.lightning.search.SuggestionsAdapter;
import acr.browser.lightning.utils.ProxyUtils; 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 @@
package acr.browser.lightning.app; package acr.browser.lightning.di;
import android.app.Application; import android.app.Application;
import android.content.Context; import android.content.Context;
@ -8,6 +8,7 @@ import net.i2p.android.ui.I2PAndroidHelper;
import javax.inject.Singleton; import javax.inject.Singleton;
import acr.browser.lightning.BrowserApp;
import acr.browser.lightning.database.bookmark.BookmarkDatabase; import acr.browser.lightning.database.bookmark.BookmarkDatabase;
import acr.browser.lightning.database.bookmark.BookmarkModel; import acr.browser.lightning.database.bookmark.BookmarkModel;
import acr.browser.lightning.database.downloads.DownloadsDatabase; 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;
import javax.inject.Inject; import javax.inject.Inject;
import acr.browser.lightning.R; import acr.browser.lightning.R;
import acr.browser.lightning.activity.MainActivity; import acr.browser.lightning.MainActivity;
import acr.browser.lightning.app.BrowserApp; import acr.browser.lightning.BrowserApp;
import acr.browser.lightning.constant.BookmarkPage; import acr.browser.lightning.constant.BookmarkPage;
import acr.browser.lightning.constant.Constants; import acr.browser.lightning.constant.Constants;
import acr.browser.lightning.controller.UIController; 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;
import acr.browser.lightning.BuildConfig; import acr.browser.lightning.BuildConfig;
import acr.browser.lightning.R; import acr.browser.lightning.R;
import acr.browser.lightning.activity.MainActivity; import acr.browser.lightning.MainActivity;
import acr.browser.lightning.app.BrowserApp; import acr.browser.lightning.BrowserApp;
import acr.browser.lightning.constant.Constants; import acr.browser.lightning.constant.Constants;
import acr.browser.lightning.controller.UIController; import acr.browser.lightning.controller.UIController;
import acr.browser.lightning.database.downloads.DownloadItem; 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;
import android.webkit.URLUtil; import android.webkit.URLUtil;
import acr.browser.lightning.R; 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.database.downloads.DownloadsModel;
import acr.browser.lightning.dialog.BrowserDialog; import acr.browser.lightning.dialog.BrowserDialog;
import acr.browser.lightning.preference.PreferenceManager; 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 @@
package acr.browser.lightning.activity; package acr.browser.lightning.reading.activity;
import android.animation.ObjectAnimator; import android.animation.ObjectAnimator;
import android.app.Dialog; import android.app.Dialog;
@ -26,7 +26,7 @@ import android.widget.TextView;
import javax.inject.Inject; import javax.inject.Inject;
import acr.browser.lightning.R; 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.constant.Constants;
import acr.browser.lightning.dialog.BrowserDialog; import acr.browser.lightning.dialog.BrowserDialog;
import acr.browser.lightning.preference.PreferenceManager; 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;
import javax.inject.Inject; 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.preference.PreferenceManager;
import acr.browser.lightning.search.engine.AskSearch; import acr.browser.lightning.search.engine.AskSearch;
import acr.browser.lightning.search.engine.BaiduSearch; 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;
import javax.inject.Inject; import javax.inject.Inject;
import acr.browser.lightning.R; 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.HistoryItem;
import acr.browser.lightning.database.bookmark.BookmarkModel; import acr.browser.lightning.database.bookmark.BookmarkModel;
import acr.browser.lightning.database.history.HistoryModel; 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 @@
/* /*
* Copyright 2014 A.C.R. Development * Copyright 2014 A.C.R. Development
*/ */
package acr.browser.lightning.activity; package acr.browser.lightning.settings.activity;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
@ -19,7 +19,7 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import acr.browser.lightning.R; import acr.browser.lightning.R;
import acr.browser.lightning.app.BrowserApp; import acr.browser.lightning.BrowserApp;
public class SettingsActivity extends ThemableSettingsActivity { 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 @@
package acr.browser.lightning.activity; package acr.browser.lightning.settings.activity;
import android.graphics.Color; import android.graphics.Color;
import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.ColorDrawable;
@ -8,7 +8,8 @@ import android.os.Bundle;
import javax.inject.Inject; import javax.inject.Inject;
import acr.browser.lightning.R; 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.preference.PreferenceManager;
import acr.browser.lightning.utils.ThemeUtils; 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 @@
/* /*
* Copyright 2014 A.C.R. Development * Copyright 2014 A.C.R. Development
*/ */
package acr.browser.lightning.fragment; package acr.browser.lightning.settings.fragment;
import android.app.Activity; import android.app.Activity;
import android.content.pm.PackageInfo; 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 @@
/* /*
* Copyright 2014 A.C.R. Development * Copyright 2014 A.C.R. Development
*/ */
package acr.browser.lightning.fragment; package acr.browser.lightning.settings.fragment;
import android.app.Activity; import android.app.Activity;
import android.app.Dialog; 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 @@
/* /*
* Copyright 2014 A.C.R. Development * Copyright 2014 A.C.R. Development
*/ */
package acr.browser.lightning.fragment; package acr.browser.lightning.settings.fragment;
import android.Manifest; import android.Manifest;
import android.app.Activity; import android.app.Activity;
@ -23,6 +23,7 @@ import android.util.Log;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
import com.anthonycr.bonsai.CompletableOnSubscribe; import com.anthonycr.bonsai.CompletableOnSubscribe;
import com.anthonycr.bonsai.Schedulers;
import com.anthonycr.bonsai.SingleOnSubscribe; import com.anthonycr.bonsai.SingleOnSubscribe;
import com.anthonycr.bonsai.Subscription; import com.anthonycr.bonsai.Subscription;
import com.anthonycr.grant.PermissionsManager; import com.anthonycr.grant.PermissionsManager;
@ -38,14 +39,11 @@ import java.util.List;
import javax.inject.Inject; import javax.inject.Inject;
import acr.browser.lightning.R; 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.BookmarkExporter;
import acr.browser.lightning.database.bookmark.BookmarkLocalSync; import acr.browser.lightning.database.bookmark.BookmarkLocalSync;
import acr.browser.lightning.database.bookmark.BookmarkLocalSync.Source; 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.database.bookmark.BookmarkModel;
import acr.browser.lightning.dialog.BrowserDialog; import acr.browser.lightning.dialog.BrowserDialog;
import acr.browser.lightning.utils.Preconditions; 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 @@
package acr.browser.lightning.fragment; package acr.browser.lightning.settings.fragment;
import android.app.Activity; import android.app.Activity;
import android.os.Bundle; import android.os.Bundle;
@ -10,7 +10,7 @@ import android.support.annotation.NonNull;
import javax.inject.Inject; import javax.inject.Inject;
import acr.browser.lightning.R; 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.preference.PreferenceManager;
import acr.browser.lightning.utils.Utils; 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 @@
/* /*
* Copyright 2014 A.C.R. Development * Copyright 2014 A.C.R. Development
*/ */
package acr.browser.lightning.fragment; package acr.browser.lightning.settings.fragment;
import android.app.Activity; import android.app.Activity;
import android.app.Dialog; 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 @@
/* /*
* Copyright 2014 A.C.R. Development * Copyright 2014 A.C.R. Development
*/ */
package acr.browser.lightning.fragment; package acr.browser.lightning.settings.fragment;
import android.app.Activity; import android.app.Activity;
import android.app.Dialog; import android.app.Dialog;
@ -28,7 +28,7 @@ import javax.inject.Inject;
import acr.browser.lightning.BuildConfig; import acr.browser.lightning.BuildConfig;
import acr.browser.lightning.R; 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.constant.Constants;
import acr.browser.lightning.dialog.BrowserDialog; import acr.browser.lightning.dialog.BrowserDialog;
import acr.browser.lightning.search.SearchEngineProvider; 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 @@
package acr.browser.lightning.fragment; package acr.browser.lightning.settings.fragment;
import android.os.Bundle; import android.os.Bundle;
import android.preference.PreferenceFragment; import android.preference.PreferenceFragment;
import javax.inject.Inject; 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.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 @@
/* /*
* Copyright 2014 A.C.R. Development * Copyright 2014 A.C.R. Development
*/ */
package acr.browser.lightning.fragment; package acr.browser.lightning.settings.fragment;
import android.app.Activity; import android.app.Activity;
import android.app.Dialog; import android.app.Dialog;
@ -23,7 +23,7 @@ import com.anthonycr.bonsai.Schedulers;
import javax.inject.Inject; import javax.inject.Inject;
import acr.browser.lightning.R; 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.database.history.HistoryModel;
import acr.browser.lightning.dialog.BrowserDialog; import acr.browser.lightning.dialog.BrowserDialog;
import acr.browser.lightning.utils.Utils; 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;
import javax.inject.Singleton; import javax.inject.Singleton;
import acr.browser.lightning.R; 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.constant.Constants;
import acr.browser.lightning.dialog.BrowserDialog; import acr.browser.lightning.dialog.BrowserDialog;
import acr.browser.lightning.preference.PreferenceManager; 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;
* API equality with the {@link String} * API equality with the {@link String}
* API. * API.
*/ */
class StringBuilderUtils { public class StringBuilderUtils {
private static final String SPACE = " "; private static final String SPACE = " ";
private static final String EMPTY = ""; private static final String EMPTY = "";
@ -21,7 +21,7 @@ class StringBuilderUtils {
* @param toReplace the string to replace. * @param toReplace the string to replace.
* @param replacement the replacement string. * @param replacement the replacement string.
*/ */
static void replace(@NonNull StringBuilder stringBuilder, public static void replace(@NonNull StringBuilder stringBuilder,
@NonNull String toReplace, @NonNull String toReplace,
@NonNull String replacement) { @NonNull String replacement) {
int index = stringBuilder.indexOf(toReplace); int index = stringBuilder.indexOf(toReplace);

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

@ -44,7 +44,7 @@ import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import acr.browser.lightning.R; 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.constant.Constants;
import acr.browser.lightning.database.HistoryItem; import acr.browser.lightning.database.HistoryItem;
import acr.browser.lightning.dialog.BrowserDialog; 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;
import javax.inject.Inject; import javax.inject.Inject;
import acr.browser.lightning.R; 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.controller.UIController;
import acr.browser.lightning.dialog.BrowserDialog; import acr.browser.lightning.dialog.BrowserDialog;
import acr.browser.lightning.favicon.FaviconModel; 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;
import javax.inject.Inject; 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.BookmarkPage;
import acr.browser.lightning.constant.Constants; import acr.browser.lightning.constant.Constants;
import acr.browser.lightning.constant.DownloadsPage; 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;
import acr.browser.lightning.BuildConfig; import acr.browser.lightning.BuildConfig;
import acr.browser.lightning.R; 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.constant.Constants;
import acr.browser.lightning.controller.UIController; import acr.browser.lightning.controller.UIController;
import acr.browser.lightning.dialog.BrowserDialog; 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.IntentUtils;
import acr.browser.lightning.utils.Preconditions; import acr.browser.lightning.utils.Preconditions;
import acr.browser.lightning.utils.ProxyUtils; import acr.browser.lightning.utils.ProxyUtils;

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

@ -5,7 +5,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".activity.BrowserActivity"> tools:context=".browser.activity.BrowserActivity">
<android.support.v4.widget.DrawerLayout <android.support.v4.widget.DrawerLayout
android:id="@+id/drawer_layout" android:id="@+id/drawer_layout"

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

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