190 build bug fixes

master
msmannan00 2019-07-20 22:11:55 +05:00
parent 358f318111
commit ef4ed7ba4e
10 changed files with 75 additions and 28 deletions

View File

@ -155,7 +155,10 @@ public class app_model
/*Navigation*/ /*Navigation*/
public void addNavigation(String url,enums.navigationType type) { public void addNavigation(String url,enums.navigationType type) {
navigation.add(new navigation_model(url,type)); if(navigation.size()==0 || !navigation.get(navigation.size()-1).getURL().equals(url))
{
navigation.add(new navigation_model(url,type));
}
} }
public ArrayList<navigation_model> getNavigation() { public ArrayList<navigation_model> getNavigation() {
return navigation; return navigation;

View File

@ -65,6 +65,7 @@ public class application_controller extends AppCompatActivity
geckoclient.initialize(geckoView); geckoclient.initialize(geckoView);
app_model.getInstance().initialization(); app_model.getInstance().initialization();
initBoogle(); initBoogle();
downloadManager.getInstance().initialize();
} }
else else
{ {
@ -214,7 +215,7 @@ public class application_controller extends AppCompatActivity
public void onloadURL(String url,boolean isHiddenWeb,boolean isUrlSavable) { public void onloadURL(String url,boolean isHiddenWeb,boolean isUrlSavable) {
if(isHiddenWeb) if(isHiddenWeb)
{ {
geckoclient.loadGeckoURL(url,geckoView,isUrlSavable); geckoclient.loadGeckoURL(url,geckoView,isUrlSavable,webView.getVisibility()==View.VISIBLE);
} }
else if(!app_model.getInstance().isUrlRepeatable(url,webView.getUrl()) || webView.getVisibility() == View.GONE) else if(!app_model.getInstance().isUrlRepeatable(url,webView.getUrl()) || webView.getVisibility() == View.GONE)
{ {

View File

@ -0,0 +1,21 @@
package com.darkweb.genesissearchengine.appManager.home_activity;
public class downloadManager
{
private static final downloadManager ourInstance = new downloadManager();
public static downloadManager getInstance()
{
return ourInstance;
}
private downloadManager()
{
}
public void initialize()
{
}
}

View File

@ -1,10 +1,10 @@
package com.darkweb.genesissearchengine.appManager.home_activity; package com.darkweb.genesissearchengine.appManager.home_activity;
import android.os.Handler; import android.os.Handler;
import android.util.Log;
import android.view.View; import android.view.View;
import com.darkweb.genesissearchengine.constants.*; import com.darkweb.genesissearchengine.constants.*;
import com.darkweb.genesissearchengine.dataManager.preference_manager; import com.darkweb.genesissearchengine.dataManager.preference_manager;
import com.darkweb.genesissearchengine.helperMethod;
import com.darkweb.genesissearchengine.pluginManager.fabricManager; import com.darkweb.genesissearchengine.pluginManager.fabricManager;
import com.darkweb.genesissearchengine.pluginManager.message_manager; import com.darkweb.genesissearchengine.pluginManager.message_manager;
import com.darkweb.genesissearchengine.pluginManager.orbot_manager; import com.darkweb.genesissearchengine.pluginManager.orbot_manager;
@ -38,15 +38,19 @@ class geckoClients
isAppRated = preference_manager.getInstance().getBool(keys.isAppRated,false); isAppRated = preference_manager.getInstance().getBool(keys.isAppRated,false);
} }
void loadGeckoURL(String url,GeckoView geckoView,boolean isUrlSavable) void loadGeckoURL(String url,GeckoView geckoView,boolean isUrlSavable,boolean reinit)
{ {
boolean init_status = orbot_manager.getInstance().initOrbot(url); boolean init_status = orbot_manager.getInstance().initOrbot(url);
if (init_status) if (init_status)
{ {
if(reinit)
{
initialize(geckoView);
}
this.isUrlSavable = isUrlSavable; this.isUrlSavable = isUrlSavable;
navigatedURL = ""; navigatedURL = "";
loadingCompeleted = false; loadingCompeleted = false;
initialize(geckoView);
session1.loadUri(url); session1.loadUri(url);
app_model.getInstance().getAppInstance().onRequestTriggered(true,url); app_model.getInstance().getAppInstance().onRequestTriggered(true,url);
app_model.getInstance().getAppInstance().onProgressBarUpdateView(4); app_model.getInstance().getAppInstance().onProgressBarUpdateView(4);
@ -71,18 +75,29 @@ class geckoClients
geckoView.setAlpha(1); geckoView.setAlpha(1);
} }
public void initializeDownloadManager()
{
//DownloadsFeature downloadsFeature = new DownloadsFeature(app_model.getInstance().getAppContext(),null,null,null,session1);
}
class navigationDelegate implements GeckoSession.NavigationDelegate class navigationDelegate implements GeckoSession.NavigationDelegate
{ {
@Override @Override
public void onLocationChange(GeckoSession session, String url) public void onLocationChange(GeckoSession session, String url)
{ {
navigatedURL = url; navigatedURL = url;
if(isUrlSavable && app_model.getInstance().getNavigation().size()>0 && !url.equals("about:blank"))
{
app_model.getInstance().addHistory(navigatedURL);
app_model.getInstance().addNavigation(navigatedURL,enums.navigationType.onion);
}
} }
@Override @Override
public GeckoResult<GeckoSession> onNewSession(GeckoSession session, String uri) public GeckoResult<GeckoSession> onNewSession(GeckoSession session, String url)
{ {
session1.loadUri(uri); Log.i("FUCK2",url);
session1.loadUri(url);
return null; return null;
} }
@ -137,7 +152,7 @@ class geckoClients
message_manager.getInstance().rateApp(); message_manager.getInstance().rateApp();
} }
} }
else if(isAppRated) else if(isAppRated || 1==1)
{ {
if(isFirstTimeLoad && navigatedURL.contains(".onion")) if(isFirstTimeLoad && navigatedURL.contains(".onion"))
{ {
@ -159,11 +174,6 @@ class geckoClients
app_model.getInstance().getAppInstance().onPageFinished(true); app_model.getInstance().getAppInstance().onPageFinished(true);
} }
if(isUrlSavable && !app_model.getInstance().getNavigation().get(app_model.getInstance().getNavigation().size()-1).equals(navigatedURL))
{
app_model.getInstance().addHistory(navigatedURL);
app_model.getInstance().addNavigation(navigatedURL,enums.navigationType.onion);
}
isUrlSavable = true; isUrlSavable = true;
isFirstTimeLoad = false; isFirstTimeLoad = false;
@ -208,6 +218,11 @@ class geckoClients
wasBackPressed = true; wasBackPressed = true;
session1.stop(); session1.stop();
if(app_model.getInstance().getAppInstance().isInternetErrorOpened())
{
initialize(geckoView);
}
session1.loadUri(app_model.getInstance().getNavigation().get(app_model.getInstance().getNavigation().size()-1).getURL()); session1.loadUri(app_model.getInstance().getNavigation().get(app_model.getInstance().getNavigation().size()-1).getURL());
} }

View File

@ -356,17 +356,21 @@ public class viewController
{ {
onProgressBarUpdate(4); onProgressBarUpdate(4);
webView.goBack(); webView.goBack();
app_model.getInstance().getNavigation().remove(app_model.getInstance().getNavigation().size()-1);
} }
else else
{ {
onProgressBarUpdate(0); onProgressBarUpdate(0);
} }
/*CHANGED BUT NOT TESTED*/
app_model.getInstance().getNavigation().remove(app_model.getInstance().getNavigation().size()-1);
webView.bringToFront(); webView.bringToFront();
webView.setAlpha(1); webView.setAlpha(1);
webView.setVisibility(View.VISIBLE); webView.setVisibility(View.VISIBLE);
requestFailure.animate().alpha(0f).setDuration(200).withEndAction((() -> requestFailure.setVisibility(View.INVISIBLE))); requestFailure.animate().alpha(0f).setDuration(200).withEndAction((() -> requestFailure.setVisibility(View.INVISIBLE)));
onUpdateSearchBar(webView.getUrl()); onUpdateSearchBar(webView.getUrl());
floatingButton.animate().alpha(0).withEndAction((() -> floatingButton.setVisibility(View.GONE)));
} }
else else
{ {

View File

@ -7,6 +7,7 @@ import android.view.inputmethod.InputMethodManager;
import android.widget.EditText; import android.widget.EditText;
import com.darkweb.genesissearchengine.appManager.home_activity.app_model; import com.darkweb.genesissearchengine.appManager.home_activity.app_model;
import com.darkweb.genesissearchengine.constants.constants; import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.enums;
import com.darkweb.genesissearchengine.helperMethod; import com.darkweb.genesissearchengine.helperMethod;
import com.darkweb.genesissearchengine.pluginManager.orbot_manager; import com.darkweb.genesissearchengine.pluginManager.orbot_manager;
import com.example.myapplication.R; import com.example.myapplication.R;
@ -75,6 +76,8 @@ public class list_ehandler
{ {
String url_temp = helperMethod.completeURL(url); String url_temp = helperMethod.completeURL(url);
app_model.getInstance().addNavigation(url, enums.navigationType.onion);
if(!url_temp.contains("boogle") && !url_temp.equals(constants.backendGoogle) && !url_temp.equals(constants.backendBing)) if(!url_temp.contains("boogle") && !url_temp.equals(constants.backendGoogle) && !url_temp.equals(constants.backendBing))
{ {
if(orbot_manager.getInstance().initOrbot(url_temp)) if(orbot_manager.getInstance().initOrbot(url_temp))

View File

@ -62,6 +62,7 @@ class list_view_controller
table = strings.history_text; table = strings.history_text;
} }
database_controller.getInstance().execSQL("delete from "+table+" where 1"); database_controller.getInstance().execSQL("delete from "+table+" where 1");
list_model.getInstance().getListInstance().initializeList();
} }
void updateListStatus(boolean animate) void updateListStatus(boolean animate)

View File

@ -30,8 +30,8 @@ public class admanager
{ {
MobileAds.initialize(app_model.getInstance().getAppInstance(), "ca-app-pub-5074525529134731~2926711128"); MobileAds.initialize(app_model.getInstance().getAppInstance(), "ca-app-pub-5074525529134731~2926711128");
mInterstitialHidden_base = initAd("ca-app-pub-5074525529134731/1637043432"); mInterstitialHidden_base = initAd("ca-app-pub-5074525529134731/1637043432");
mInterstitialHidden_onion = initAd("ca-app-pub-5074525529134731/4332539288"); //mInterstitialHidden_onion = initAd("ca-app-pub-5074525529134731/4332539288");
mInterstitialInternal = initAd("ca-app-pub-5074525529134731/8478420705"); //mInterstitialInternal = initAd("ca-app-pub-5074525529134731/8478420705");
} }
public InterstitialAd initAd(String id) public InterstitialAd initAd(String id)
@ -47,12 +47,12 @@ public class admanager
public void showAd(enums.adID id) public void showAd(enums.adID id)
{ {
if(id.equals(enums.adID.hidden_base)) if(id.equals(enums.adID.hidden_onion_start))
{ {
mInterstitialHidden_base.show(); mInterstitialHidden_base.show();
mInterstitialHidden_base.loadAd(new AdRequest.Builder().build()); mInterstitialHidden_base.loadAd(new AdRequest.Builder().build());
} }
else if(id.equals(enums.adID.hidden_onion)) /*else if(id.equals(enums.adID.hidden_onion))
{ {
mInterstitialHidden_onion.show(); mInterstitialHidden_onion.show();
mInterstitialHidden_onion.loadAd(new AdRequest.Builder().build()); mInterstitialHidden_onion.loadAd(new AdRequest.Builder().build());
@ -61,6 +61,6 @@ public class admanager
{ {
mInterstitialInternal.show(); mInterstitialInternal.show();
mInterstitialInternal.loadAd(new AdRequest.Builder().build()); mInterstitialInternal.loadAd(new AdRequest.Builder().build());
} }*/
} }
} }

View File

@ -204,7 +204,6 @@ public class message_manager
builder.show(); builder.show();
} }
public void reportURL() public void reportURL()
{ {
Context application_context = app_model.getInstance().getAppContext(); Context application_context = app_model.getInstance().getAppContext();

View File

@ -1,18 +1,18 @@
/*arm versions*/ /*arm versions*/
project.ext.arm_vname = '188' project.ext.arm_vname = '196'
project.ext.arm_vcode = 188 project.ext.arm_vcode = 196
/*aarch versions*/ /*aarch versions*/
project.ext.aarch_vname = '189' project.ext.aarch_vname = '197'
project.ext.aarch_vcode = 189 project.ext.aarch_vcode = 197
/*x86 versions*/ /*x86 versions*/
project.ext.x86_vname = '190' project.ext.x86_vname = '198'
project.ext.x86_vcode = 190 project.ext.x86_vcode = 198
/*x64 versions*/ /*x64 versions*/
project.ext.x64_vname = '191' project.ext.x64_vname = '199'
project.ext.x64_vcode = 191 project.ext.x64_vcode = 199
/*dimension*/ /*dimension*/
project.ext.dimen = 'abi' project.ext.dimen = 'abi'