|
|
|
@ -99,10 +99,10 @@ public class Barebones extends Activity {
@@ -99,10 +99,10 @@ public class Barebones extends Activity {
|
|
|
|
|
|
|
|
|
|
@SuppressLint("SetJavaScriptEnabled") |
|
|
|
|
public class CustomChromeClient extends WebChromeClient { |
|
|
|
|
private Bitmap mDefaultVideoPoster; |
|
|
|
|
private View mVideoProgressView; |
|
|
|
|
private FrameLayout fullScreenContainer; |
|
|
|
|
private int orientation; |
|
|
|
|
public Bitmap mDefaultVideoPoster; |
|
|
|
|
public View mVideoProgressView; |
|
|
|
|
public FrameLayout fullScreenContainer; |
|
|
|
|
public int orientation; |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void onExceededDatabaseQuota(String url, |
|
|
|
@ -316,7 +316,7 @@ public class Barebones extends Activity {
@@ -316,7 +316,7 @@ public class Barebones extends Activity {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private class CustomDownloadListener implements DownloadListener { |
|
|
|
|
public class CustomDownloadListener implements DownloadListener { |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void onDownloadStart(final String url, String userAgent, |
|
|
|
@ -362,7 +362,7 @@ public class Barebones extends Activity {
@@ -362,7 +362,7 @@ public class Barebones extends Activity {
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private class CustomWebViewClient extends WebViewClient { |
|
|
|
|
public class CustomWebViewClient extends WebViewClient { |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean shouldOverrideUrlLoading(WebView view, String url) { |
|
|
|
@ -494,7 +494,7 @@ public class Barebones extends Activity {
@@ -494,7 +494,7 @@ public class Barebones extends Activity {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void generateHistory(final CustomWebView view) { |
|
|
|
|
public void generateHistory(final CustomWebView view) { |
|
|
|
|
|
|
|
|
|
Thread history = new Thread(new Runnable() { |
|
|
|
|
|
|
|
|
@ -571,7 +571,7 @@ public class Barebones extends Activity {
@@ -571,7 +571,7 @@ public class Barebones extends Activity {
|
|
|
|
|
history.run(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void setUrlText(String url) { |
|
|
|
|
public void setUrlText(String url) { |
|
|
|
|
if (!url.contains("file:///" + getBaseContext().getFilesDir() |
|
|
|
|
+ "/bookmarks.html") |
|
|
|
|
&& !url.contains("file:///" + getBaseContext().getFilesDir() |
|
|
|
@ -582,7 +582,7 @@ public class Barebones extends Activity {
@@ -582,7 +582,7 @@ public class Barebones extends Activity {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private class TabTouchListener implements OnTouchListener { |
|
|
|
|
public class TabTouchListener implements OnTouchListener { |
|
|
|
|
|
|
|
|
|
@SuppressWarnings("deprecation") |
|
|
|
|
@Override |
|
|
|
@ -668,7 +668,7 @@ public class Barebones extends Activity {
@@ -668,7 +668,7 @@ public class Barebones extends Activity {
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void removeView(WebView view) { |
|
|
|
|
public void removeView(WebView view) { |
|
|
|
|
if (!showFullScreen) { |
|
|
|
|
view.startAnimation(fadeOut); |
|
|
|
|
} |
|
|
|
@ -676,7 +676,7 @@ public class Barebones extends Activity {
@@ -676,7 +676,7 @@ public class Barebones extends Activity {
|
|
|
|
|
uBar.bringToFront(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void deleteBookmark(String url) { |
|
|
|
|
public void deleteBookmark(String url) { |
|
|
|
|
File book = new File(getBaseContext().getFilesDir(), "bookmarks"); |
|
|
|
|
File bookUrl = new File(getBaseContext().getFilesDir(), "bookurl"); |
|
|
|
|
int n = 0; |
|
|
|
@ -720,7 +720,7 @@ public class Barebones extends Activity {
@@ -720,7 +720,7 @@ public class Barebones extends Activity {
|
|
|
|
|
openBookmarks(main[pageId]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private class WebPageLongClickListener implements OnLongClickListener { |
|
|
|
|
public class WebPageLongClickListener implements OnLongClickListener { |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean onLongClick(View v) { |
|
|
|
@ -902,107 +902,107 @@ public class Barebones extends Activity {
@@ -902,107 +902,107 @@ public class Barebones extends Activity {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// variables to differentiate free from paid
|
|
|
|
|
private static final int MAX_TABS = FinalVars.MAX_TABS; |
|
|
|
|
private static final int MAX_BOOKMARKS = FinalVars.MAX_BOOKMARKS; |
|
|
|
|
private static final boolean PAID_VERSION = FinalVars.PAID_VERSION; |
|
|
|
|
private final Context CONTEXT = Barebones.this; |
|
|
|
|
private static final String HOMEPAGE = FinalVars.HOMEPAGE; |
|
|
|
|
private static final String SEARCH = FinalVars.GOOGLE_SEARCH; |
|
|
|
|
private static SimpleAdapter adapter; |
|
|
|
|
private static MultiAutoCompleteTextView getUrl; |
|
|
|
|
private static final TextView[] urlTitle = new TextView[MAX_TABS]; |
|
|
|
|
private static final CustomWebView[] main = new CustomWebView[MAX_TABS]; |
|
|
|
|
private static Rect bounds; |
|
|
|
|
private static ValueCallback<Uri> mUploadMessage; |
|
|
|
|
private static ImageView refresh; |
|
|
|
|
private static ProgressBar progressBar; |
|
|
|
|
private static Drawable webpageOther; |
|
|
|
|
private static Drawable incognitoPage; |
|
|
|
|
private static Drawable exitTab; |
|
|
|
|
private static int numberPage; |
|
|
|
|
private static final int fuzz = 10; |
|
|
|
|
private static int number; |
|
|
|
|
private static int pageId = 0; |
|
|
|
|
private static int agentPicker; |
|
|
|
|
private static int enableFlash; |
|
|
|
|
private static int height32; |
|
|
|
|
private static int height; |
|
|
|
|
private static int width; |
|
|
|
|
private static int pixels; |
|
|
|
|
private static int leftPad; |
|
|
|
|
private static int rightPad; |
|
|
|
|
private static final int API = FinalVars.API; |
|
|
|
|
private static int mShortAnimationDuration; |
|
|
|
|
private static int id; |
|
|
|
|
private static int tenPad; |
|
|
|
|
private static int urlColumn; |
|
|
|
|
private static int titleColumn; |
|
|
|
|
private static int closeWindow; |
|
|
|
|
private static View mCustomView = null; |
|
|
|
|
private static CustomViewCallback mCustomViewCallback; |
|
|
|
|
private static final boolean[] incognito = new boolean[MAX_TABS]; |
|
|
|
|
private static boolean isPhone = false; |
|
|
|
|
private static boolean pageIsLoading = false; |
|
|
|
|
private static boolean allowLocation; |
|
|
|
|
private static boolean savePasswords; |
|
|
|
|
private static boolean deleteHistory; |
|
|
|
|
private static boolean saveTabs; |
|
|
|
|
public static final int MAX_TABS = FinalVars.MAX_TABS; |
|
|
|
|
public static final int MAX_BOOKMARKS = FinalVars.MAX_BOOKMARKS; |
|
|
|
|
public static final boolean PAID_VERSION = FinalVars.PAID_VERSION; |
|
|
|
|
public final Context CONTEXT = Barebones.this; |
|
|
|
|
public static final String HOMEPAGE = FinalVars.HOMEPAGE; |
|
|
|
|
public static final String SEARCH = FinalVars.GOOGLE_SEARCH; |
|
|
|
|
public static SimpleAdapter adapter; |
|
|
|
|
public static MultiAutoCompleteTextView getUrl; |
|
|
|
|
public static final TextView[] urlTitle = new TextView[MAX_TABS]; |
|
|
|
|
public static final CustomWebView[] main = new CustomWebView[MAX_TABS]; |
|
|
|
|
public static Rect bounds; |
|
|
|
|
public static ValueCallback<Uri> mUploadMessage; |
|
|
|
|
public static ImageView refresh; |
|
|
|
|
public static ProgressBar progressBar; |
|
|
|
|
public static Drawable webpageOther; |
|
|
|
|
public static Drawable incognitoPage; |
|
|
|
|
public static Drawable exitTab; |
|
|
|
|
public static int numberPage; |
|
|
|
|
public static final int fuzz = 10; |
|
|
|
|
public static int number; |
|
|
|
|
public static int pageId = 0; |
|
|
|
|
public static int agentPicker; |
|
|
|
|
public static int enableFlash; |
|
|
|
|
public static int height32; |
|
|
|
|
public static int height; |
|
|
|
|
public static int width; |
|
|
|
|
public static int pixels; |
|
|
|
|
public static int leftPad; |
|
|
|
|
public static int rightPad; |
|
|
|
|
public static final int API = FinalVars.API; |
|
|
|
|
public static int mShortAnimationDuration; |
|
|
|
|
public static int id; |
|
|
|
|
public static int tenPad; |
|
|
|
|
public static int urlColumn; |
|
|
|
|
public static int titleColumn; |
|
|
|
|
public static int closeWindow; |
|
|
|
|
public static View mCustomView = null; |
|
|
|
|
public static CustomViewCallback mCustomViewCallback; |
|
|
|
|
public static final boolean[] incognito = new boolean[MAX_TABS]; |
|
|
|
|
public static boolean isPhone = false; |
|
|
|
|
public static boolean pageIsLoading = false; |
|
|
|
|
public static boolean allowLocation; |
|
|
|
|
public static boolean savePasswords; |
|
|
|
|
public static boolean deleteHistory; |
|
|
|
|
public static boolean saveTabs; |
|
|
|
|
static boolean showFullScreen; |
|
|
|
|
private static boolean noStockBrowser = true; |
|
|
|
|
private static SharedPreferences settings; |
|
|
|
|
private static SharedPreferences.Editor edit; |
|
|
|
|
private static String desktop; |
|
|
|
|
private static String mobile; |
|
|
|
|
private static String user; |
|
|
|
|
private static String urlA; |
|
|
|
|
private static String title; |
|
|
|
|
private static String[] memoryURL = new String[MAX_TABS]; |
|
|
|
|
private static final String[] bUrl = new String[MAX_BOOKMARKS]; |
|
|
|
|
private static final String[] bTitle = new String[MAX_BOOKMARKS]; |
|
|
|
|
private static String[] columns; |
|
|
|
|
private static String homepage; |
|
|
|
|
private static String str; |
|
|
|
|
private static final String preferences = "settings"; |
|
|
|
|
private static String query; |
|
|
|
|
private static String userAgent; |
|
|
|
|
private static final String[][] urlToLoad = new String[MAX_TABS][2]; |
|
|
|
|
private static FrameLayout background; |
|
|
|
|
public static boolean noStockBrowser = true; |
|
|
|
|
public static SharedPreferences settings; |
|
|
|
|
public static SharedPreferences.Editor edit; |
|
|
|
|
public static String desktop; |
|
|
|
|
public static String mobile; |
|
|
|
|
public static String user; |
|
|
|
|
public static String urlA; |
|
|
|
|
public static String title; |
|
|
|
|
public static String[] memoryURL = new String[MAX_TABS]; |
|
|
|
|
public static final String[] bUrl = new String[MAX_BOOKMARKS]; |
|
|
|
|
public static final String[] bTitle = new String[MAX_BOOKMARKS]; |
|
|
|
|
public static String[] columns; |
|
|
|
|
public static String homepage; |
|
|
|
|
public static String str; |
|
|
|
|
public static final String preferences = "settings"; |
|
|
|
|
public static String query; |
|
|
|
|
public static String userAgent; |
|
|
|
|
public static final String[][] urlToLoad = new String[MAX_TABS][2]; |
|
|
|
|
public static FrameLayout background; |
|
|
|
|
static RelativeLayout uBar; |
|
|
|
|
private static HorizontalScrollView tabScroll; |
|
|
|
|
public static HorizontalScrollView tabScroll; |
|
|
|
|
static Animation slideUp; |
|
|
|
|
static Animation slideDown; |
|
|
|
|
private static Animation fadeOut; |
|
|
|
|
private static Animation fadeIn; |
|
|
|
|
private static TextView txt; |
|
|
|
|
public static Animation fadeOut; |
|
|
|
|
public static Animation fadeIn; |
|
|
|
|
public static TextView txt; |
|
|
|
|
|
|
|
|
|
private static CookieManager cookieManager; |
|
|
|
|
public static CookieManager cookieManager; |
|
|
|
|
|
|
|
|
|
private static Uri bookmarks; |
|
|
|
|
private static List<Map<String, String>> list; |
|
|
|
|
private static Map<String, String> map; |
|
|
|
|
public static Uri bookmarks; |
|
|
|
|
public static List<Map<String, String>> list; |
|
|
|
|
public static Map<String, String> map; |
|
|
|
|
|
|
|
|
|
private static Handler handler, browserHandler; |
|
|
|
|
public static Handler handler, browserHandler; |
|
|
|
|
|
|
|
|
|
private static DatabaseHandler historyHandler; |
|
|
|
|
public static DatabaseHandler historyHandler; |
|
|
|
|
|
|
|
|
|
private static StringBuilder sb; |
|
|
|
|
public static StringBuilder sb; |
|
|
|
|
|
|
|
|
|
private static Runnable update; |
|
|
|
|
public static Runnable update; |
|
|
|
|
|
|
|
|
|
private static SQLiteDatabase s; |
|
|
|
|
public static SQLiteDatabase s; |
|
|
|
|
|
|
|
|
|
private static Drawable inactive; |
|
|
|
|
public static Drawable inactive; |
|
|
|
|
|
|
|
|
|
private static Drawable active; |
|
|
|
|
public static Drawable active; |
|
|
|
|
|
|
|
|
|
private static LinearLayout tabLayout; |
|
|
|
|
public static LinearLayout tabLayout; |
|
|
|
|
|
|
|
|
|
private static String[] GetArray(String input) { |
|
|
|
|
public static String[] GetArray(String input) { |
|
|
|
|
return input.split("\\|\\$\\|SEPARATOR\\|\\$\\|"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@SuppressWarnings("unused") |
|
|
|
|
private static void setFavicon(int id, Bitmap favicon) { |
|
|
|
|
public static void setFavicon(int id, Bitmap favicon) { |
|
|
|
|
Drawable icon = null; |
|
|
|
|
icon = new BitmapDrawable(null, favicon); |
|
|
|
|
icon.setBounds(0, 0, width / 2, height / 2); |
|
|
|
@ -1356,7 +1356,9 @@ public class Barebones extends Activity {
@@ -1356,7 +1356,9 @@ public class Barebones extends Activity {
|
|
|
|
|
noStockBrowser = true; |
|
|
|
|
Log.e("Barebones", "did not detect AOSP browser"); |
|
|
|
|
} |
|
|
|
|
c.close(); |
|
|
|
|
if (c != null) { |
|
|
|
|
c.close(); |
|
|
|
|
} |
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
managedCursor = null; |
|
|
|
@ -1807,7 +1809,7 @@ public class Barebones extends Activity {
@@ -1807,7 +1809,7 @@ public class Barebones extends Activity {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private CustomWebView makeTab(final int pageToView, final String Url, |
|
|
|
|
public CustomWebView makeTab(final int pageToView, final String Url, |
|
|
|
|
final boolean display) { |
|
|
|
|
CustomWebView view = new CustomWebView(CONTEXT); |
|
|
|
|
view.setId(pageToView); |
|
|
|
|