Use boolean constant to make free/plus builds easier to generate
This commit is contained in:
parent
2b59ea1906
commit
4fb1a50f03
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="acr.browser.lightning"
|
package="acr.browser.lightning"
|
||||||
android:versionCode="76"
|
android:versionCode="77"
|
||||||
android:versionName="4.0.8a" >
|
android:versionName="4.0.9a" >
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS" />
|
<uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS" />
|
||||||
|
@ -30,7 +30,7 @@ public class AdBlock {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private AdBlock(Context context) {
|
private AdBlock(Context context) {
|
||||||
if (mBlockedDomainsList.isEmpty()) {
|
if (mBlockedDomainsList.isEmpty() && Constants.FULL_VERSION) {
|
||||||
loadBlockedDomainsList(context);
|
loadBlockedDomainsList(context);
|
||||||
}
|
}
|
||||||
mBlockAds = PreferenceManager.getInstance().getAdBlockEnabled();
|
mBlockAds = PreferenceManager.getInstance().getAdBlockEnabled();
|
||||||
|
@ -1135,6 +1135,11 @@ public class BrowserActivity extends ThemableActivity implements BrowserControll
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected synchronized boolean newTab(String url, boolean show) {
|
protected synchronized boolean newTab(String url, boolean show) {
|
||||||
|
// Limit number of tabs for limited version of app
|
||||||
|
if (!Constants.FULL_VERSION && mWebViews.size() >= 10) {
|
||||||
|
Utils.showToast(this, this.getString(R.string.max_tabs));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
mIsNewIntent = false;
|
mIsNewIntent = false;
|
||||||
LightningView startingTab = new LightningView(mActivity, url, mDarkTheme);
|
LightningView startingTab = new LightningView(mActivity, url, mDarkTheme);
|
||||||
if (mIdGenerator == 0) {
|
if (mIdGenerator == 0) {
|
||||||
|
@ -10,6 +10,8 @@ public final class Constants {
|
|||||||
private Constants() {
|
private Constants() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final boolean FULL_VERSION = true;
|
||||||
|
|
||||||
public static final String DESKTOP_USER_AGENT = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2049.0 Safari/537.36";
|
public static final String DESKTOP_USER_AGENT = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2049.0 Safari/537.36";
|
||||||
public static final String MOBILE_USER_AGENT = "Mozilla/5.0 (Linux; U; Android 4.4; en-us; Nexus 4 Build/JOP24G) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30";
|
public static final String MOBILE_USER_AGENT = "Mozilla/5.0 (Linux; U; Android 4.4; en-us; Nexus 4 Build/JOP24G) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30";
|
||||||
public static final int API = android.os.Build.VERSION.SDK_INT;
|
public static final int API = android.os.Build.VERSION.SDK_INT;
|
||||||
|
@ -61,6 +61,7 @@ public class SettingsActivity extends ThemableSettingsActivity {
|
|||||||
// initialize UI
|
// initialize UI
|
||||||
RelativeLayout layoutFlash = (RelativeLayout) findViewById(R.id.layoutFlash);
|
RelativeLayout layoutFlash = (RelativeLayout) findViewById(R.id.layoutFlash);
|
||||||
RelativeLayout layoutBlockAds = (RelativeLayout) findViewById(R.id.layoutAdBlock);
|
RelativeLayout layoutBlockAds = (RelativeLayout) findViewById(R.id.layoutAdBlock);
|
||||||
|
layoutBlockAds.setEnabled(Constants.FULL_VERSION);
|
||||||
RelativeLayout layoutImages = (RelativeLayout) findViewById(R.id.layoutImages);
|
RelativeLayout layoutImages = (RelativeLayout) findViewById(R.id.layoutImages);
|
||||||
RelativeLayout layoutEnableJS = (RelativeLayout) findViewById(R.id.layoutEnableJS);
|
RelativeLayout layoutEnableJS = (RelativeLayout) findViewById(R.id.layoutEnableJS);
|
||||||
RelativeLayout layoutOrbot = (RelativeLayout) findViewById(R.id.layoutUseOrbot);
|
RelativeLayout layoutOrbot = (RelativeLayout) findViewById(R.id.layoutUseOrbot);
|
||||||
@ -85,6 +86,7 @@ public class SettingsActivity extends ThemableSettingsActivity {
|
|||||||
|
|
||||||
CheckBox flash = (CheckBox) findViewById(R.id.cbFlash);
|
CheckBox flash = (CheckBox) findViewById(R.id.cbFlash);
|
||||||
CheckBox adblock = (CheckBox) findViewById(R.id.cbAdblock);
|
CheckBox adblock = (CheckBox) findViewById(R.id.cbAdblock);
|
||||||
|
adblock.setEnabled(Constants.FULL_VERSION);
|
||||||
CheckBox images = (CheckBox) findViewById(R.id.cbImageBlock);
|
CheckBox images = (CheckBox) findViewById(R.id.cbImageBlock);
|
||||||
CheckBox enablejs = (CheckBox) findViewById(R.id.cbJavascript);
|
CheckBox enablejs = (CheckBox) findViewById(R.id.cbJavascript);
|
||||||
CheckBox orbot = (CheckBox) findViewById(R.id.cbOrbot);
|
CheckBox orbot = (CheckBox) findViewById(R.id.cbOrbot);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user