diff --git a/.travis.yml b/.travis.yml
index df31125..20fd203 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,7 +3,7 @@ sudo: false
android:
components:
- build-tools-22.0.1
- - android-22
+ - android-23
- extra-android-support
- extra-android-m2repository
licenses:
diff --git a/app/app.iml b/app/app.iml
index 225524d..718026c 100644
--- a/app/app.iml
+++ b/app/app.iml
@@ -36,7 +36,7 @@
-
+
@@ -49,7 +49,7 @@
-
+
@@ -92,10 +92,10 @@
-
-
-
-
+
+
+
+
@@ -113,16 +113,16 @@
-
+
-
-
+
-
-
+
+
-
+
+
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
index 12f3d3d..2412fa4 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,7 +1,7 @@
apply plugin: 'com.android.application'
android {
- compileSdkVersion 22
+ compileSdkVersion 23
buildToolsVersion "22.0.1"
defaultConfig {
minSdkVersion 14
@@ -43,9 +43,9 @@ android {
}
dependencies {
- compile 'com.android.support:palette-v7:22.2.1'
- compile 'com.android.support:appcompat-v7:22.2.1'
- compile 'com.android.support:design:22.2.1'
+ compile 'com.android.support:palette-v7:23.0.0'
+ compile 'com.android.support:appcompat-v7:23.0.0'
+ compile 'com.android.support:design:23.0.0'
compile 'org.jsoup:jsoup:1.8.1'
compile 'org.lucasr.twowayview:twowayview:0.1.4'
// Only Lightning Plus needs the proxy libraries
diff --git a/app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java b/app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java
index 982e86c..f0483a0 100644
--- a/app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java
+++ b/app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java
@@ -15,7 +15,6 @@ import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
-import android.database.Cursor;
import android.database.sqlite.SQLiteException;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
@@ -35,7 +34,6 @@ import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
-import android.provider.Browser;
import android.provider.MediaStore;
import android.support.annotation.IdRes;
import android.support.annotation.NonNull;
@@ -48,9 +46,7 @@ import android.support.v7.app.ActionBar;
import android.support.v7.app.AlertDialog;
import android.support.v7.graphics.Palette;
import android.support.v7.widget.Toolbar;
-import android.text.TextUtils;
import android.util.Log;
-import android.util.Patterns;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.Menu;
@@ -101,12 +97,10 @@ import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
-import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -172,7 +166,6 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
// Primatives
private boolean mFullScreen, mColorMode, mDarkTheme,
- mSystemBrowser = false,
mIsNewIntent = false,
mIsFullScreen = false,
mIsImmersive = false,
@@ -188,7 +181,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
// Image
private Bitmap mDefaultVideoPoster, mWebpageBitmap, mFolderBitmap;
private final ColorDrawable mBackground = new ColorDrawable();
- private Drawable mDeleteIcon, mRefreshIcon, mCopyIcon, mIcon;
+ private Drawable mDeleteIcon, mRefreshIcon, mSearchIcon, mIcon;
private DrawerArrowDrawable mArrowDrawable;
// Proxy
@@ -335,21 +328,20 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
mBackgroundColor = getResources().getColor(R.color.primary_color);
mDeleteIcon = ThemeUtils.getLightThemedDrawable(this, R.drawable.ic_action_delete);
mRefreshIcon = ThemeUtils.getLightThemedDrawable(this, R.drawable.ic_action_refresh);
- mCopyIcon = ThemeUtils.getLightThemedDrawable(this, R.drawable.ic_action_copy);
+ mSearchIcon = ThemeUtils.getLightThemedDrawable(this, R.drawable.ic_action_forward);
int iconBounds = Utils.dpToPx(30);
mDeleteIcon.setBounds(0, 0, iconBounds, iconBounds);
mRefreshIcon.setBounds(0, 0, iconBounds, iconBounds);
- mCopyIcon.setBounds(0, 0, iconBounds, iconBounds);
+ mSearchIcon.setBounds(0, 0, iconBounds, iconBounds);
mIcon = mRefreshIcon;
- SearchClass search = new SearchClass();
+ SearchListenerClass search = new SearchListenerClass();
mSearch.setCompoundDrawables(null, null, mRefreshIcon, null);
- mSearch.setOnKeyListener(search.new KeyListener());
- mSearch.setOnFocusChangeListener(search.new FocusChangeListener());
- mSearch.setOnEditorActionListener(search.new EditorActionListener());
- mSearch.setOnTouchListener(search.new TouchListener());
+ mSearch.setOnKeyListener(search);
+ mSearch.setOnFocusChangeListener(search);
+ mSearch.setOnEditorActionListener(search);
+ mSearch.setOnTouchListener(search);
- mSystemBrowser = getSystemBrowser();
new Thread(new Runnable() {
@Override
@@ -398,40 +390,13 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
mProxyUtils.checkForProxy(this);
}
- private class SearchClass {
+ private class SearchListenerClass implements OnKeyListener, OnEditorActionListener, OnFocusChangeListener, OnTouchListener {
- public class KeyListener implements OnKeyListener {
-
- @Override
- public boolean onKey(View arg0, int arg1, KeyEvent arg2) {
-
- switch (arg1) {
- case KeyEvent.KEYCODE_ENTER:
- InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
- imm.hideSoftInputFromWindow(mSearch.getWindowToken(), 0);
- searchTheWeb(mSearch.getText().toString());
- if (mCurrentView != null) {
- mCurrentView.requestFocus();
- }
- return true;
- default:
- break;
- }
- return false;
- }
-
- }
+ @Override
+ public boolean onKey(View arg0, int arg1, KeyEvent arg2) {
- public class EditorActionListener implements OnEditorActionListener {
- @Override
- public boolean onEditorAction(TextView arg0, int actionId, KeyEvent arg2) {
- // hide the keyboard and search the web when the enter key
- // button is pressed
- if (actionId == EditorInfo.IME_ACTION_GO || actionId == EditorInfo.IME_ACTION_DONE
- || actionId == EditorInfo.IME_ACTION_NEXT
- || actionId == EditorInfo.IME_ACTION_SEND
- || actionId == EditorInfo.IME_ACTION_SEARCH
- || (arg2.getAction() == KeyEvent.KEYCODE_ENTER)) {
+ switch (arg1) {
+ case KeyEvent.KEYCODE_ENTER:
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(mSearch.getWindowToken(), 0);
searchTheWeb(mSearch.getText().toString());
@@ -439,116 +404,132 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
mCurrentView.requestFocus();
}
return true;
+ default:
+ break;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean onEditorAction(TextView arg0, int actionId, KeyEvent arg2) {
+ // hide the keyboard and search the web when the enter key
+ // button is pressed
+ if (actionId == EditorInfo.IME_ACTION_GO || actionId == EditorInfo.IME_ACTION_DONE
+ || actionId == EditorInfo.IME_ACTION_NEXT
+ || actionId == EditorInfo.IME_ACTION_SEND
+ || actionId == EditorInfo.IME_ACTION_SEARCH
+ || (arg2.getAction() == KeyEvent.KEYCODE_ENTER)) {
+ InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
+ imm.hideSoftInputFromWindow(mSearch.getWindowToken(), 0);
+ searchTheWeb(mSearch.getText().toString());
+ if (mCurrentView != null) {
+ mCurrentView.requestFocus();
}
- return false;
+ return true;
}
+ return false;
}
- public class FocusChangeListener implements OnFocusChangeListener {
- @Override
- public void onFocusChange(View v, final boolean hasFocus) {
- if (!hasFocus && mCurrentView != null) {
- if (mCurrentView.getProgress() < 100) {
- setIsLoading();
- } else {
- setIsFinishedLoading();
- }
- updateUrl(mCurrentView.getUrl(), true);
- } else if (hasFocus) {
- String url = mCurrentView.getUrl();
- if (url.startsWith(Constants.FILE)) {
- mSearch.setText("");
+ @Override
+ public void onFocusChange(View v, final boolean hasFocus) {
+ if (!hasFocus && mCurrentView != null) {
+ if (mCurrentView.getProgress() < 100) {
+ setIsLoading();
+ } else {
+ setIsFinishedLoading();
+ }
+ updateUrl(mCurrentView.getUrl(), true);
+ } else if (hasFocus) {
+ String url = mCurrentView.getUrl();
+ if (url.startsWith(Constants.FILE)) {
+ mSearch.setText("");
+ } else {
+ mSearch.setText(url);
+ }
+ ((AutoCompleteTextView) v).selectAll(); // Hack to make sure
+ // the text gets
+ // selected
+ mIcon = mSearchIcon;
+ mSearch.setCompoundDrawables(null, null, mSearchIcon, null);
+ }
+ final Animation anim = new Animation() {
+
+ @Override
+ protected void applyTransformation(float interpolatedTime, Transformation t) {
+ if (!hasFocus) {
+ mArrowDrawable.setProgress(1.0f - interpolatedTime);
} else {
- mSearch.setText(url);
+ mArrowDrawable.setProgress(interpolatedTime);
}
- ((AutoCompleteTextView) v).selectAll(); // Hack to make sure
- // the text gets
- // selected
- mIcon = mCopyIcon;
- mSearch.setCompoundDrawables(null, null, mCopyIcon, null);
}
- final Animation anim = new Animation() {
- @Override
- protected void applyTransformation(float interpolatedTime, Transformation t) {
- if (!hasFocus) {
- mArrowDrawable.setProgress(1.0f - interpolatedTime);
- } else {
- mArrowDrawable.setProgress(interpolatedTime);
- }
- }
+ @Override
+ public boolean willChangeBounds() {
+ return true;
+ }
- @Override
- public boolean willChangeBounds() {
- return true;
- }
+ };
+ anim.setDuration(300);
+ anim.setInterpolator(new DecelerateInterpolator());
+ anim.setAnimationListener(new AnimationListener() {
- };
- anim.setDuration(300);
- anim.setInterpolator(new DecelerateInterpolator());
- anim.setAnimationListener(new AnimationListener() {
-
- @Override
- public void onAnimationStart(Animation animation) {
- }
+ @Override
+ public void onAnimationStart(Animation animation) {
+ }
- @Override
- public void onAnimationEnd(Animation animation) {
- if (!hasFocus) {
- mArrowDrawable.setProgress(0.0f);
- } else {
- mArrowDrawable.setProgress(1.0f);
- }
+ @Override
+ public void onAnimationEnd(Animation animation) {
+ if (!hasFocus) {
+ mArrowDrawable.setProgress(0.0f);
+ } else {
+ mArrowDrawable.setProgress(1.0f);
}
+ }
- @Override
- public void onAnimationRepeat(Animation animation) {
- }
+ @Override
+ public void onAnimationRepeat(Animation animation) {
+ }
- });
- new Handler().postDelayed(new Runnable() {
+ });
+ new Handler().postDelayed(new Runnable() {
- @Override
- public void run() {
- if (mArrowDrawable != null) {
- mArrowImage.startAnimation(anim);
- }
+ @Override
+ public void run() {
+ if (mArrowDrawable != null) {
+ mArrowImage.startAnimation(anim);
}
+ }
- }, 100);
+ }, 100);
- if (!hasFocus) {
- InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
- imm.hideSoftInputFromWindow(mSearch.getWindowToken(), 0);
- }
+ if (!hasFocus) {
+ InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
+ imm.hideSoftInputFromWindow(mSearch.getWindowToken(), 0);
}
}
- public class TouchListener implements OnTouchListener {
-
- @Override
- public boolean onTouch(View v, MotionEvent event) {
- if (mSearch.getCompoundDrawables()[2] != null) {
- boolean tappedX = event.getX() > (mSearch.getWidth()
- - mSearch.getPaddingRight() - mIcon.getIntrinsicWidth());
- if (tappedX) {
- if (event.getAction() == MotionEvent.ACTION_UP) {
- if (mSearch.hasFocus()) {
- ClipboardManager clipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
- ClipData clip = ClipData.newPlainText("label", mSearch.getText()
- .toString());
- clipboard.setPrimaryClip(clip);
- Utils.showSnackbar(mActivity, R.string.message_text_copied);
- } else {
- refreshOrStop();
+ @Override
+ public boolean onTouch(View v, MotionEvent event) {
+ if (mSearch.getCompoundDrawables()[2] != null) {
+ boolean tappedX = event.getX() > (mSearch.getWidth()
+ - mSearch.getPaddingRight() - mIcon.getIntrinsicWidth());
+ if (tappedX) {
+ if (event.getAction() == MotionEvent.ACTION_UP) {
+ if (mSearch.hasFocus()) {
+ InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
+ imm.hideSoftInputFromWindow(mSearch.getWindowToken(), 0);
+ searchTheWeb(mSearch.getText().toString());
+ if (mCurrentView != null) {
+ mCurrentView.requestFocus();
}
+ } else {
+ refreshOrStop();
}
- return true;
}
+ return true;
}
- return false;
}
-
+ return false;
}
}
@@ -1362,7 +1343,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
}
if (mPreferences.getClearHistoryExitEnabled() && !isIncognito()) {
- WebUtils.clearHistory(this, mSystemBrowser);
+ WebUtils.clearHistory(this);
Log.d(Constants.TAG, "History Cleared");
}
@@ -1916,13 +1897,6 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
Runnable update = new Runnable() {
@Override
public void run() {
- if (isSystemBrowserAvailable() && mPreferences.getSyncHistoryEnabled()) {
- try {
- Browser.updateVisitedHistory(getContentResolver(), url, true);
- } catch (Exception ignored) {
- // ignored
- }
- }
try {
if (mHistoryDatabase == null) {
mHistoryDatabase = HistoryDatabase.getInstance(mActivity.getApplicationContext());
@@ -1942,35 +1916,6 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
}
}
- private boolean isSystemBrowserAvailable() {
- return mSystemBrowser;
- }
-
- private boolean getSystemBrowser() {
- Cursor c = null;
- String[] columns = new String[]{"url", "title"};
- boolean browserFlag;
- try {
- Uri bookmarks = Browser.BOOKMARKS_URI;
- c = getContentResolver().query(bookmarks, columns, null, null, null);
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- if (c != null) {
- Log.d("Browser", "System Browser Available");
- browserFlag = true;
- } else {
- Log.e("Browser", "System Browser Unavailable");
- browserFlag = false;
- }
- if (c != null) {
- c.close();
- }
- mPreferences.setSystemBrowserPresent(browserFlag);
- return browserFlag;
- }
-
/**
* method to generate search suggestions for the AutoCompleteTextView from
* previously searched URLs
diff --git a/app/src/main/java/acr/browser/lightning/database/BookmarkManager.java b/app/src/main/java/acr/browser/lightning/database/BookmarkManager.java
index d819223..87f4be4 100644
--- a/app/src/main/java/acr/browser/lightning/database/BookmarkManager.java
+++ b/app/src/main/java/acr/browser/lightning/database/BookmarkManager.java
@@ -395,44 +395,6 @@ public class BookmarkManager {
return folders;
}
- /**
- * This method imports all bookmarks that are included in the device's
- * permanent bookmark storage
- */
- public synchronized void importBookmarksFromBrowser(Activity activity) throws Exception{
- if (PreferenceManager.getInstance().getSystemBrowserPresent()) {
-
- List bookmarkList = new ArrayList<>();
- String[] columns = new String[]{Browser.BookmarkColumns.TITLE,
- Browser.BookmarkColumns.URL};
- String selection = Browser.BookmarkColumns.BOOKMARK + " = 1";
- Cursor cursor = mContext.getContentResolver().query(Browser.BOOKMARKS_URI, columns,
- selection, null, null);
- if (cursor == null)
- return;
- String title, url;
- int number = 0;
- if (cursor.moveToFirst()) {
- do {
- title = cursor.getString(0);
- url = cursor.getString(1);
- if (title.isEmpty()) {
- title = Utils.getDomainName(url);
- }
- number++;
- bookmarkList.add(new HistoryItem(url, title));
- } while (cursor.moveToNext());
- }
-
- cursor.close();
- addBookmarkList(bookmarkList);
-
- Utils.showSnackbar(activity, number + " " + mContext.getResources().getString(R.string.message_import));
- } else {
- Utils.createInformativeDialog(activity, R.string.title_error, R.string.dialog_import_error);
- }
- }
-
/**
* This method imports the bookmarks from a backup file that is located on
* external storage
diff --git a/app/src/main/java/acr/browser/lightning/fragment/BookmarkSettingsFragment.java b/app/src/main/java/acr/browser/lightning/fragment/BookmarkSettingsFragment.java
index 64de7a3..56e43a1 100644
--- a/app/src/main/java/acr/browser/lightning/fragment/BookmarkSettingsFragment.java
+++ b/app/src/main/java/acr/browser/lightning/fragment/BookmarkSettingsFragment.java
@@ -23,7 +23,6 @@ public class BookmarkSettingsFragment extends PreferenceFragment implements Pref
private static final String SETTINGS_EXPORT = "export_bookmark";
private static final String SETTINGS_IMPORT = "import_bookmark";
- private static final String SETTINGS_BROWSER_IMPORT = "import_browser_bookmark";
private Activity mActivity;
private BookmarkManager mBookmarkManager;
@@ -50,17 +49,9 @@ public class BookmarkSettingsFragment extends PreferenceFragment implements Pref
Preference exportpref = findPreference(SETTINGS_EXPORT);
Preference importpref = findPreference(SETTINGS_IMPORT);
- Preference importBrowserpref = findPreference(SETTINGS_BROWSER_IMPORT);
exportpref.setOnPreferenceClickListener(this);
importpref.setOnPreferenceClickListener(this);
- importBrowserpref.setOnPreferenceClickListener(this);
-
- if (mPreferences.getSystemBrowserPresent()) {
- importBrowserpref.setSummary(getResources().getString(R.string.stock_browser_available));
- } else {
- importBrowserpref.setSummary(getResources().getString(R.string.stock_browser_unavailable));
- }
}
@Override
@@ -73,13 +64,6 @@ public class BookmarkSettingsFragment extends PreferenceFragment implements Pref
loadFileList(null);
createDialog();
return true;
- case SETTINGS_BROWSER_IMPORT:
- try {
- mBookmarkManager.importBookmarksFromBrowser(getActivity());
- } catch (Exception e) {
- e.printStackTrace();
- }
- return true;
default:
return false;
}
diff --git a/app/src/main/java/acr/browser/lightning/fragment/PrivacySettingsFragment.java b/app/src/main/java/acr/browser/lightning/fragment/PrivacySettingsFragment.java
index 359d05d..66b9c11 100644
--- a/app/src/main/java/acr/browser/lightning/fragment/PrivacySettingsFragment.java
+++ b/app/src/main/java/acr/browser/lightning/fragment/PrivacySettingsFragment.java
@@ -28,19 +28,16 @@ public class PrivacySettingsFragment extends PreferenceFragment implements Prefe
private static final String SETTINGS_CACHEEXIT = "clear_cache_exit";
private static final String SETTINGS_HISTORYEXIT = "clear_history_exit";
private static final String SETTINGS_COOKIEEXIT = "clear_cookies_exit";
- private static final String SETTINGS_SYNCHISTORY = "sync_history";
private static final String SETTINGS_CLEARCACHE = "clear_cache";
private static final String SETTINGS_CLEARHISTORY = "clear_history";
private static final String SETTINGS_CLEARCOOKIES = "clear_cookies";
private static final String SETTINGS_CLEARWEBSTORAGE = "clear_webstorage";
private static final String SETTINGS_WEBSTORAGEEXIT = "clear_webstorage_exit";
- private static final int API = android.os.Build.VERSION.SDK_INT;
private Activity mActivity;
private PreferenceManager mPreferences;
private CheckBoxPreference cblocation, cb3cookies, cbsavepasswords, cbcacheexit, cbhistoryexit,
- cbcookiesexit, cbsynchistory, cbwebstorageexit;
- private boolean mSystemBrowser;
+ cbcookiesexit, cbwebstorageexit;
private Handler messageHandler;
@Override
@@ -57,7 +54,6 @@ public class PrivacySettingsFragment extends PreferenceFragment implements Prefe
private void initPrefs() {
// mPreferences storage
mPreferences = PreferenceManager.getInstance();
- mSystemBrowser = mPreferences.getSystemBrowserPresent();
Preference clearcache = findPreference(SETTINGS_CLEARCACHE);
Preference clearhistory = findPreference(SETTINGS_CLEARHISTORY);
@@ -70,7 +66,6 @@ public class PrivacySettingsFragment extends PreferenceFragment implements Prefe
cbcacheexit = (CheckBoxPreference) findPreference(SETTINGS_CACHEEXIT);
cbhistoryexit = (CheckBoxPreference) findPreference(SETTINGS_HISTORYEXIT);
cbcookiesexit = (CheckBoxPreference) findPreference(SETTINGS_COOKIEEXIT);
- cbsynchistory = (CheckBoxPreference) findPreference(SETTINGS_SYNCHISTORY);
cbwebstorageexit = (CheckBoxPreference) findPreference(SETTINGS_WEBSTORAGEEXIT);
clearcache.setOnPreferenceClickListener(this);
@@ -84,7 +79,6 @@ public class PrivacySettingsFragment extends PreferenceFragment implements Prefe
cbcacheexit.setOnPreferenceChangeListener(this);
cbhistoryexit.setOnPreferenceChangeListener(this);
cbcookiesexit.setOnPreferenceChangeListener(this);
- cbsynchistory.setOnPreferenceChangeListener(this);
cbwebstorageexit.setOnPreferenceChangeListener(this);
cblocation.setChecked(mPreferences.getLocationEnabled());
@@ -97,16 +91,6 @@ public class PrivacySettingsFragment extends PreferenceFragment implements Prefe
cb3cookies.setEnabled(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP);
- if (!mSystemBrowser) {
- cbsynchistory.setChecked(false);
- cbsynchistory.setEnabled(false);
- cbsynchistory.setSummary(getResources().getString(R.string.stock_browser_unavailable));
- } else {
- cbsynchistory.setEnabled(true);
- cbsynchistory.setChecked(mPreferences.getSyncHistoryEnabled());
- cbsynchistory.setSummary(getResources().getString(R.string.stock_browser_available));
- }
-
messageHandler = new MessageHandler(mActivity);
}
@@ -210,7 +194,7 @@ public class PrivacySettingsFragment extends PreferenceFragment implements Prefe
}
private void clearHistory() {
- WebUtils.clearHistory(getActivity(), mSystemBrowser);
+ WebUtils.clearHistory(getActivity());
messageHandler.sendEmptyMessage(1);
}
@@ -256,10 +240,6 @@ public class PrivacySettingsFragment extends PreferenceFragment implements Prefe
mPreferences.setClearWebStorageExitEnabled((Boolean) newValue);
cbwebstorageexit.setChecked((Boolean) newValue);
return true;
- case SETTINGS_SYNCHISTORY:
- mPreferences.setSyncHistoryEnabled((Boolean) newValue);
- cbsynchistory.setChecked((Boolean) newValue);
- return true;
default:
return false;
}
diff --git a/app/src/main/java/acr/browser/lightning/object/DrawerArrowDrawable.java b/app/src/main/java/acr/browser/lightning/object/DrawerArrowDrawable.java
index d05c8db..1cc2ee5 100644
--- a/app/src/main/java/acr/browser/lightning/object/DrawerArrowDrawable.java
+++ b/app/src/main/java/acr/browser/lightning/object/DrawerArrowDrawable.java
@@ -67,14 +67,14 @@ public class DrawerArrowDrawable extends Drawable {
mPaint.setAntiAlias(true);
mPaint.setColor(typedArray.getColor(R.styleable.DrawerArrowToggle_color, 0));
mSize = typedArray.getDimensionPixelSize(R.styleable.DrawerArrowToggle_drawableSize, 0);
- mBarSize = typedArray.getDimension(R.styleable.DrawerArrowToggle_barSize, 0);
+ mBarSize = typedArray.getDimension(R.styleable.DrawerArrowToggle_barLength, 0);
mTopBottomArrowSize = typedArray.getDimension(
- R.styleable.DrawerArrowToggle_topBottomBarArrowSize, 0);
+ R.styleable.DrawerArrowToggle_arrowHeadLength, 0);
mBarThickness = typedArray.getDimension(R.styleable.DrawerArrowToggle_thickness, 0);
mBarGap = typedArray.getDimension(R.styleable.DrawerArrowToggle_gapBetweenBars, 0);
mSpin = typedArray.getBoolean(R.styleable.DrawerArrowToggle_spinBars, true);
mMiddleArrowSize = typedArray.getDimension(
- R.styleable.DrawerArrowToggle_middleBarArrowSize, 0);
+ R.styleable.DrawerArrowToggle_arrowShaftLength, 0);
typedArray.recycle();
mPaint.setStyle(Paint.Style.STROKE);
mPaint.setStrokeJoin(Paint.Join.ROUND);
diff --git a/app/src/main/java/acr/browser/lightning/preference/PreferenceManager.java b/app/src/main/java/acr/browser/lightning/preference/PreferenceManager.java
index 128a1ee..d2aa0c2 100644
--- a/app/src/main/java/acr/browser/lightning/preference/PreferenceManager.java
+++ b/app/src/main/java/acr/browser/lightning/preference/PreferenceManager.java
@@ -27,7 +27,6 @@ public class PreferenceManager {
public static final String SAVE_PASSWORDS = "passwords";
public static final String SEARCH = "search";
public static final String SEARCH_URL = "searchurl";
- public static final String SYSTEM_BROWSER_PRESENT = "SystemBrowser";
public static final String TEXT_REFLOW = "textreflow";
public static final String TEXT_SIZE = "textsize";
public static final String URL_MEMORY = "memory";
@@ -39,7 +38,6 @@ public class PreferenceManager {
public static final String CLEAR_COOKIES_EXIT = "clearCookiesExit";
public static final String SAVE_URL = "saveUrl";
public static final String RENDERING_MODE = "renderMode";
- public static final String SYNC_HISTORY = "syncHistory";
public static final String BLOCK_THIRD_PARTY = "thirdParty";
public static final String ENABLE_COLOR_MODE = "colorMode";
public static final String URL_BOX_CONTENTS = "urlContent";
@@ -211,14 +209,6 @@ public class PreferenceManager {
return mPrefs.getString(Name.SEARCH_URL, Constants.GOOGLE_SEARCH);
}
- public boolean getSyncHistoryEnabled() {
- return mPrefs.getBoolean(Name.SYNC_HISTORY, true);
- }
-
- public boolean getSystemBrowserPresent() {
- return mPrefs.getBoolean(Name.SYSTEM_BROWSER_PRESENT, false);
- }
-
public boolean getTextReflowEnabled() {
return mPrefs.getBoolean(Name.TEXT_REFLOW, false);
}
@@ -411,14 +401,6 @@ public class PreferenceManager {
putString(Name.SEARCH_URL, url);
}
- public void setSyncHistoryEnabled(boolean enable) {
- putBoolean(Name.SYNC_HISTORY, enable);
- }
-
- public void setSystemBrowserPresent(boolean available) {
- putBoolean(Name.SYSTEM_BROWSER_PRESENT, available);
- }
-
public void setTextReflowEnabled(boolean enable) {
putBoolean(Name.TEXT_REFLOW, enable);
}
diff --git a/app/src/main/java/acr/browser/lightning/utils/WebUtils.java b/app/src/main/java/acr/browser/lightning/utils/WebUtils.java
index 6026a46..8ac6339 100644
--- a/app/src/main/java/acr/browser/lightning/utils/WebUtils.java
+++ b/app/src/main/java/acr/browser/lightning/utils/WebUtils.java
@@ -32,7 +32,7 @@ public class WebUtils {
WebStorage.getInstance().deleteAllData();
}
- public static void clearHistory(@NonNull Context context, boolean systemBrowserPresent) {
+ public static void clearHistory(@NonNull Context context) {
HistoryDatabase.getInstance(context).deleteHistory();
WebViewDatabase m = WebViewDatabase.getInstance(context);
m.clearFormData();
@@ -41,13 +41,6 @@ public class WebUtils {
m.clearUsernamePassword();
WebIconDatabase.getInstance().removeAllIcons();
}
- if (systemBrowserPresent) {
- try {
- Browser.clearHistory(context.getContentResolver());
- } catch (Exception ignored) {
- // ignored
- }
- }
Utils.trimCache(context);
}
diff --git a/app/src/main/res/drawable-hdpi/ic_action_copy.png b/app/src/main/res/drawable-hdpi/ic_action_copy.png
deleted file mode 100644
index 3da2504..0000000
Binary files a/app/src/main/res/drawable-hdpi/ic_action_copy.png and /dev/null differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_action_copy.png b/app/src/main/res/drawable-xhdpi/ic_action_copy.png
deleted file mode 100644
index 3abcd4f..0000000
Binary files a/app/src/main/res/drawable-xhdpi/ic_action_copy.png and /dev/null differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_action_copy.png b/app/src/main/res/drawable-xxhdpi/ic_action_copy.png
deleted file mode 100644
index 8a980d7..0000000
Binary files a/app/src/main/res/drawable-xxhdpi/ic_action_copy.png and /dev/null differ
diff --git a/app/src/main/res/xml/preference_bookmarks.xml b/app/src/main/res/xml/preference_bookmarks.xml
index 692ff25..92c3116 100644
--- a/app/src/main/res/xml/preference_bookmarks.xml
+++ b/app/src/main/res/xml/preference_bookmarks.xml
@@ -8,9 +8,5 @@
-
\ No newline at end of file
diff --git a/app/src/main/res/xml/preference_privacy.xml b/app/src/main/res/xml/preference_privacy.xml
index 9a493ec..bf709e3 100644
--- a/app/src/main/res/xml/preference_privacy.xml
+++ b/app/src/main/res/xml/preference_privacy.xml
@@ -31,10 +31,6 @@
android:defaultValue="false"
android:key="clear_webstorage_exit"
android:title="@string/clear_web_storage_exit" />
-
diff --git a/build.gradle b/build.gradle
index 88d246d..349f446 100644
--- a/build.gradle
+++ b/build.gradle
@@ -4,7 +4,7 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:1.2.3'
+ classpath 'com.android.tools.build:gradle:1.3.1'
}
}