Browse Source

3.0.5 - Crash fixes

- added workaround for crash on close due to zoom button error (WebView
bug)
- fixed bug with database not being properly closed
master
Anthony Restaino 10 years ago
parent
commit
10a18373d3
  1. 4
      AndroidManifest.xml
  2. BIN
      BrowserActivity.apk
  3. BIN
      MainActivity.apk
  4. 17
      README.md
  5. 4
      res/values-de/strings.xml
  6. 2
      res/values-ru/strings.xml
  7. 32
      src/acr/browser/barebones/activities/BrowserActivity.java
  8. 13
      src/acr/browser/barebones/activities/IncognitoModeActivity.java
  9. 2
      src/acr/browser/barebones/utilities/FinalVariables.java
  10. 2
      src/acr/browser/barebones/utilities/HistoryPageVariables.java

4
AndroidManifest.xml

@ -1,8 +1,8 @@ @@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="acr.browser.barebones"
android:versionCode="66"
android:versionName="3.0.0" >
android:versionCode="67"
android:versionName="3.0.5b" >
<uses-sdk
android:minSdkVersion="8"

BIN
BrowserActivity.apk

Binary file not shown.

BIN
MainActivity.apk

Binary file not shown.

17
README.md

@ -1,10 +1,12 @@ @@ -1,10 +1,12 @@
#Lightning Browser
#![](ic_launcher_small.png)
####Download
* [Download APK from here](https://github.com/anthonycr/Lightning-Browser/blob/master/BrowserActivity.apk?raw=true)
* [Download APK from here](https://github.com/anthonycr/Lightning-Browser/blob/master/Barebones.apk?raw=true)
* [Download from Google Play](https://play.google.com/store/apps/details?id=acr.browser.barebones)
* [Download the version with a new interface here](https://github.com/anthonycr/Lightning-Browser/blob/master/Lightning_API_14.apk?raw=true)
####Features
* Bookmarks
@ -40,16 +42,3 @@ @@ -40,16 +42,3 @@
* Please add translations/translation fixes as you see need
* Change ````FinalVariables.MAX_TABS```` from 5 to 100 to change the Lightning to the paid version
* Beware when using proguard while compiling. Some methods should not be obfuscated. Use the proguard settings file I provided for best results.
####The License
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

4
res/values-de/strings.xml

@ -48,7 +48,7 @@ @@ -48,7 +48,7 @@
<string name="settings_title">Einstellungen</string>
<string name="download">Download-Verzeichnis</string>
<string name="advanced">Erweiterte Einstellungen</string>
<string name="gestures">'Vor'- und 'Zurück'-Gesten aktivieren</string>
<string name="gestures">\'Vor\'- und \'Zurück\'-Gesten aktivieren</string>
<string name="source">Quelltext</string>
<string name="license">Lizenz</string>
<string name="github">github.com/anthonycr/Lightning-Browser</string>
@ -129,4 +129,4 @@ @@ -129,4 +129,4 @@
<string name="download_sdcard_busy_dlg_title">USB-Speicher nicht verfügbar!</string>
<string name="download_sdcard_busy_dlg_msg" >Speicher aktiv. Um ein Herunterladen zu ermöglichen, schalten Sie den USB-Speicher in der Benachrichtigung aus.</string>
</resources>
</resources>

2
res/values-ru/strings.xml

@ -107,4 +107,4 @@ @@ -107,4 +107,4 @@
<string name="download_no_sdcard_dlg_msg">Для загрузки файла необходима карта памяти</string>
<string name="download_sdcard_busy_dlg_title">Карта памяти недоступна</string>
<string name="download_sdcard_busy_dlg_msg">Карта памяти подключена к ПК. Для начала загрузки отключите её от ПК, нажав на уведомление</string>
</resources>
</resources>

32
src/acr/browser/barebones/activities/BrowserActivity.java

@ -169,7 +169,7 @@ public class BrowserActivity extends Activity implements OnTouchListener { @@ -169,7 +169,7 @@ public class BrowserActivity extends Activity implements OnTouchListener {
public static boolean DEVICE_HAS_GPS = false;
// semi constants
public static Context mContext;
public static String SEARCH;
public static String mSearch;
public static List<Integer> tabList;
// variables
@ -379,7 +379,6 @@ public class BrowserActivity extends Activity implements OnTouchListener { @@ -379,7 +379,6 @@ public class BrowserActivity extends Activity implements OnTouchListener {
null, null, null);
handler.sendEmptyMessage(1);
} catch (SQLiteException ignored) {
} catch (NullPointerException ignored) {
} catch (IllegalStateException ignored) {
@ -425,7 +424,7 @@ public class BrowserActivity extends Activity implements OnTouchListener { @@ -425,7 +424,7 @@ public class BrowserActivity extends Activity implements OnTouchListener {
e.printStackTrace();
}
if (uBar.isShown()) {
currentTabTitle.setText(mContext.getResources().getString(R.string.menu_history));
currentTabTitle.setText(mContext.getResources().getString(R.string.action_history));
setUrlText("");
getUrl.setPadding(tenPad, 0, tenPad, 0);
}
@ -972,7 +971,7 @@ public class BrowserActivity extends Activity implements OnTouchListener { @@ -972,7 +971,7 @@ public class BrowserActivity extends Activity implements OnTouchListener {
// TODO Auto-generated catch block
e.printStackTrace();
}
currentTab.loadUrl(SEARCH + query);
currentTab.loadUrl(mSearch + query);
} else if (!validURL) {
currentTab.loadUrl("http://" + query);
} else {
@ -1079,6 +1078,7 @@ public class BrowserActivity extends Activity implements OnTouchListener { @@ -1079,6 +1078,7 @@ public class BrowserActivity extends Activity implements OnTouchListener {
}
main[del].stopLoading();
main[del].clearHistory();
main[del].setVisibility(View.GONE);
tabScroll.smoothScrollTo(currentTabTitle.getLeft(), 0);
edit.putString("oldPage", urlToLoad[del][0]);
edit.commit();
@ -1248,7 +1248,6 @@ public class BrowserActivity extends Activity implements OnTouchListener { @@ -1248,7 +1248,6 @@ public class BrowserActivity extends Activity implements OnTouchListener {
null, // Which rows to return (all rows)
null, // Selection arguments (none)
null, null, null);
} catch (SQLiteException ignored) {
} catch (NullPointerException ignored) {
} catch (IllegalStateException ignored) {
@ -1565,28 +1564,28 @@ public class BrowserActivity extends Activity implements OnTouchListener { @@ -1565,28 +1564,28 @@ public class BrowserActivity extends Activity implements OnTouchListener {
// agent
switch (settings.getInt("search", 1)) {
case 1:
SEARCH = FinalVariables.GOOGLE_SEARCH;
mSearch = FinalVariables.GOOGLE_SEARCH;
break;
case 2:
SEARCH = FinalVariables.BING_SEARCH;
mSearch = FinalVariables.BING_SEARCH;
break;
case 3:
SEARCH = FinalVariables.YAHOO_SEARCH;
mSearch = FinalVariables.YAHOO_SEARCH;
break;
case 4:
SEARCH = FinalVariables.STARTPAGE_SEARCH;
mSearch = FinalVariables.STARTPAGE_SEARCH;
break;
case 5:
SEARCH = FinalVariables.DUCK_SEARCH;
mSearch = FinalVariables.DUCK_SEARCH;
break;
case 6:
SEARCH = FinalVariables.BAIDU_SEARCH;
mSearch = FinalVariables.BAIDU_SEARCH;
break;
case 7:
SEARCH = FinalVariables.YANDEX_SEARCH;
mSearch = FinalVariables.YANDEX_SEARCH;
break;
case 8:
SEARCH = FinalVariables.DUCK_LITE_SEARCH;
mSearch = FinalVariables.DUCK_LITE_SEARCH;
break;
}
@ -1986,6 +1985,10 @@ public class BrowserActivity extends Activity implements OnTouchListener { @@ -1986,6 +1985,10 @@ public class BrowserActivity extends Activity implements OnTouchListener {
@Override
protected void onPause() {
if(historyHandler != null){
historyHandler.close();
historyHandler = null;
}
if (currentTab != null) {
if (API >= 11) {
currentTab.onPause();
@ -2018,6 +2021,9 @@ public class BrowserActivity extends Activity implements OnTouchListener { @@ -2018,6 +2021,9 @@ public class BrowserActivity extends Activity implements OnTouchListener {
@Override
protected void onResume() {
super.onResume();
if(historyHandler == null){
historyHandler = new DatabaseHandler(this);
}
if (currentTab != null) {
onProgressChanged(currentId, currentTab.getProgress());
if (currentTab.getProgress() == 100) {

13
src/acr/browser/barebones/activities/IncognitoModeActivity.java

@ -371,7 +371,7 @@ public class IncognitoModeActivity extends Activity implements OnTouchListener { @@ -371,7 +371,7 @@ public class IncognitoModeActivity extends Activity implements OnTouchListener {
null, null, null);
handler.sendEmptyMessage(1);
} catch (SQLiteException ignored) {
} catch (NullPointerException ignored) {
} catch (IllegalStateException ignored) {
@ -1034,6 +1034,7 @@ public class IncognitoModeActivity extends Activity implements OnTouchListener { @@ -1034,6 +1034,7 @@ public class IncognitoModeActivity extends Activity implements OnTouchListener {
}
main[del].stopLoading();
main[del].clearHistory();
main[del].setVisibility(View.GONE);
tabScroll.smoothScrollTo(currentTabTitle.getLeft(), 0);
edit.putString("oldPage", urlToLoad[del][0]);
edit.commit();
@ -1226,7 +1227,7 @@ public class IncognitoModeActivity extends Activity implements OnTouchListener { @@ -1226,7 +1227,7 @@ public class IncognitoModeActivity extends Activity implements OnTouchListener {
null, // Which rows to return (all rows)
null, // Selection arguments (none)
null, null, null);
} catch (SQLiteException ignored) {
} catch (NullPointerException ignored) {
} catch (IllegalStateException ignored) {
@ -1920,7 +1921,10 @@ public class IncognitoModeActivity extends Activity implements OnTouchListener { @@ -1920,7 +1921,10 @@ public class IncognitoModeActivity extends Activity implements OnTouchListener {
@Override
protected void onPause() {
if(historyHandler == null){
historyHandler = new DatabaseHandler(this);
historyHandler = null;
}
if (currentTab != null) {
if (API >= 11) {
currentTab.onPause();
@ -1937,6 +1941,9 @@ public class IncognitoModeActivity extends Activity implements OnTouchListener { @@ -1937,6 +1941,9 @@ public class IncognitoModeActivity extends Activity implements OnTouchListener {
@Override
protected void onResume() {
super.onResume();
if(historyHandler == null){
historyHandler = new DatabaseHandler(this);
}
onProgressChanged(currentId, currentTab.getProgress());
if (currentTab.getProgress() == 100) {
progressBar.setVisibility(View.GONE);

2
src/acr/browser/barebones/utilities/FinalVariables.java

@ -16,7 +16,7 @@ public class FinalVariables { @@ -16,7 +16,7 @@ public class FinalVariables {
public static final String BING_SEARCH = "http://www.bing.com/search?q=";
public static final String DUCK_SEARCH = "https://duckduckgo.com/?t=lightning&q=";
public static final String DUCK_LITE_SEARCH = "https://duckduckgo.com/lite/?t=lightning&q=";
public static final String STARTPAGE_SEARCH = "https://startpage.com/do/metasearch.pl?language=english&cat=web&query=";
public static final String STARTPAGE_SEARCH = "https://startpage.com/do/m/mobilesearch?language=english&query=";
public static final String HOMEPAGE = "https://www.google.com";
public static final String BAIDU_SEARCH = "http://www.baidu.com/s?wd=";
public static final String YANDEX_SEARCH = "http://yandex.ru/yandsearch?lr=21411&text=";

2
src/acr/browser/barebones/utilities/HistoryPageVariables.java

@ -7,7 +7,7 @@ public class HistoryPageVariables { @@ -7,7 +7,7 @@ public class HistoryPageVariables {
+ "body{color: gray;text-size: 10px}div.space {height: 0.7em;} div.extra{text-align: center;}div {vertical-align: middle;}"
+ "div {background-color: #ffffff;}div.clickable {position:relative;}p.black{color: black;font-size: 1em;font-family: \"Lucida Console\"}"
+ "p.font{font-size: 1em;font-family: \"Lucida Console\"}p.black{padding-left: 0.5em;padding-right: 0.5em;padding-top: 0.5em;padding-bottom: 0em;}"
+ "p.font{padding-left: 0.5em;padding-right: 0.5em;padding-top: 0em;padding-bottom: 0.5em;}"
+ "p.font{padding-left: 0.5em;padding-right: 0.5em;padding-top: 0em;padding-bottom: 0.5em;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;}"
+ "div.clickable a {position:absolute; width:100%;height:100%;top:0;left:0;text-decoration:none; z-index:10; background-color:white;opacity: 0;filter: alpha(opacity=1);}"
+ "</style><body bgcolor = #f2f2f2>";

Loading…
Cancel
Save