mirror of https://github.com/LeOS-GSI/LeOS-Genesis
190 build bug fixes
parent
358f318111
commit
ef4ed7ba4e
|
@ -155,8 +155,11 @@ public class app_model
|
|||
/*Navigation*/
|
||||
|
||||
public void addNavigation(String url,enums.navigationType 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() {
|
||||
return navigation;
|
||||
}
|
||||
|
|
|
@ -65,6 +65,7 @@ public class application_controller extends AppCompatActivity
|
|||
geckoclient.initialize(geckoView);
|
||||
app_model.getInstance().initialization();
|
||||
initBoogle();
|
||||
downloadManager.getInstance().initialize();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -214,7 +215,7 @@ public class application_controller extends AppCompatActivity
|
|||
public void onloadURL(String url,boolean isHiddenWeb,boolean isUrlSavable) {
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
package com.darkweb.genesissearchengine.appManager.home_activity;
|
||||
|
||||
import android.os.Handler;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import com.darkweb.genesissearchengine.constants.*;
|
||||
import com.darkweb.genesissearchengine.dataManager.preference_manager;
|
||||
import com.darkweb.genesissearchengine.helperMethod;
|
||||
import com.darkweb.genesissearchengine.pluginManager.fabricManager;
|
||||
import com.darkweb.genesissearchengine.pluginManager.message_manager;
|
||||
import com.darkweb.genesissearchengine.pluginManager.orbot_manager;
|
||||
|
@ -38,15 +38,19 @@ class geckoClients
|
|||
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);
|
||||
if (init_status)
|
||||
{
|
||||
if(reinit)
|
||||
{
|
||||
initialize(geckoView);
|
||||
}
|
||||
|
||||
this.isUrlSavable = isUrlSavable;
|
||||
navigatedURL = "";
|
||||
loadingCompeleted = false;
|
||||
initialize(geckoView);
|
||||
session1.loadUri(url);
|
||||
app_model.getInstance().getAppInstance().onRequestTriggered(true,url);
|
||||
app_model.getInstance().getAppInstance().onProgressBarUpdateView(4);
|
||||
|
@ -71,18 +75,29 @@ class geckoClients
|
|||
geckoView.setAlpha(1);
|
||||
}
|
||||
|
||||
public void initializeDownloadManager()
|
||||
{
|
||||
//DownloadsFeature downloadsFeature = new DownloadsFeature(app_model.getInstance().getAppContext(),null,null,null,session1);
|
||||
}
|
||||
|
||||
class navigationDelegate implements GeckoSession.NavigationDelegate
|
||||
{
|
||||
@Override
|
||||
public void onLocationChange(GeckoSession session, String 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
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -137,7 +152,7 @@ class geckoClients
|
|||
message_manager.getInstance().rateApp();
|
||||
}
|
||||
}
|
||||
else if(isAppRated)
|
||||
else if(isAppRated || 1==1)
|
||||
{
|
||||
if(isFirstTimeLoad && navigatedURL.contains(".onion"))
|
||||
{
|
||||
|
@ -159,11 +174,6 @@ class geckoClients
|
|||
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;
|
||||
isFirstTimeLoad = false;
|
||||
|
||||
|
@ -208,6 +218,11 @@ class geckoClients
|
|||
wasBackPressed = true;
|
||||
session1.stop();
|
||||
|
||||
if(app_model.getInstance().getAppInstance().isInternetErrorOpened())
|
||||
{
|
||||
initialize(geckoView);
|
||||
}
|
||||
|
||||
session1.loadUri(app_model.getInstance().getNavigation().get(app_model.getInstance().getNavigation().size()-1).getURL());
|
||||
}
|
||||
|
||||
|
|
|
@ -356,17 +356,21 @@ public class viewController
|
|||
{
|
||||
onProgressBarUpdate(4);
|
||||
webView.goBack();
|
||||
app_model.getInstance().getNavigation().remove(app_model.getInstance().getNavigation().size()-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
onProgressBarUpdate(0);
|
||||
}
|
||||
|
||||
/*CHANGED BUT NOT TESTED*/
|
||||
app_model.getInstance().getNavigation().remove(app_model.getInstance().getNavigation().size()-1);
|
||||
|
||||
webView.bringToFront();
|
||||
webView.setAlpha(1);
|
||||
webView.setVisibility(View.VISIBLE);
|
||||
requestFailure.animate().alpha(0f).setDuration(200).withEndAction((() -> requestFailure.setVisibility(View.INVISIBLE)));
|
||||
onUpdateSearchBar(webView.getUrl());
|
||||
floatingButton.animate().alpha(0).withEndAction((() -> floatingButton.setVisibility(View.GONE)));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -7,6 +7,7 @@ import android.view.inputmethod.InputMethodManager;
|
|||
import android.widget.EditText;
|
||||
import com.darkweb.genesissearchengine.appManager.home_activity.app_model;
|
||||
import com.darkweb.genesissearchengine.constants.constants;
|
||||
import com.darkweb.genesissearchengine.constants.enums;
|
||||
import com.darkweb.genesissearchengine.helperMethod;
|
||||
import com.darkweb.genesissearchengine.pluginManager.orbot_manager;
|
||||
import com.example.myapplication.R;
|
||||
|
@ -75,6 +76,8 @@ public class list_ehandler
|
|||
{
|
||||
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(orbot_manager.getInstance().initOrbot(url_temp))
|
||||
|
|
|
@ -62,6 +62,7 @@ class list_view_controller
|
|||
table = strings.history_text;
|
||||
}
|
||||
database_controller.getInstance().execSQL("delete from "+table+" where 1");
|
||||
list_model.getInstance().getListInstance().initializeList();
|
||||
}
|
||||
|
||||
void updateListStatus(boolean animate)
|
||||
|
|
|
@ -30,8 +30,8 @@ public class admanager
|
|||
{
|
||||
MobileAds.initialize(app_model.getInstance().getAppInstance(), "ca-app-pub-5074525529134731~2926711128");
|
||||
mInterstitialHidden_base = initAd("ca-app-pub-5074525529134731/1637043432");
|
||||
mInterstitialHidden_onion = initAd("ca-app-pub-5074525529134731/4332539288");
|
||||
mInterstitialInternal = initAd("ca-app-pub-5074525529134731/8478420705");
|
||||
//mInterstitialHidden_onion = initAd("ca-app-pub-5074525529134731/4332539288");
|
||||
//mInterstitialInternal = initAd("ca-app-pub-5074525529134731/8478420705");
|
||||
}
|
||||
|
||||
public InterstitialAd initAd(String id)
|
||||
|
@ -47,12 +47,12 @@ public class admanager
|
|||
|
||||
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.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.loadAd(new AdRequest.Builder().build());
|
||||
|
@ -61,6 +61,6 @@ public class admanager
|
|||
{
|
||||
mInterstitialInternal.show();
|
||||
mInterstitialInternal.loadAd(new AdRequest.Builder().build());
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
|
|
@ -204,7 +204,6 @@ public class message_manager
|
|||
builder.show();
|
||||
}
|
||||
|
||||
|
||||
public void reportURL()
|
||||
{
|
||||
Context application_context = app_model.getInstance().getAppContext();
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
/*arm versions*/
|
||||
project.ext.arm_vname = '188'
|
||||
project.ext.arm_vcode = 188
|
||||
project.ext.arm_vname = '196'
|
||||
project.ext.arm_vcode = 196
|
||||
|
||||
/*aarch versions*/
|
||||
project.ext.aarch_vname = '189'
|
||||
project.ext.aarch_vcode = 189
|
||||
project.ext.aarch_vname = '197'
|
||||
project.ext.aarch_vcode = 197
|
||||
|
||||
/*x86 versions*/
|
||||
project.ext.x86_vname = '190'
|
||||
project.ext.x86_vcode = 190
|
||||
project.ext.x86_vname = '198'
|
||||
project.ext.x86_vcode = 198
|
||||
|
||||
/*x64 versions*/
|
||||
project.ext.x64_vname = '191'
|
||||
project.ext.x64_vcode = 191
|
||||
project.ext.x64_vname = '199'
|
||||
project.ext.x64_vcode = 199
|
||||
|
||||
/*dimension*/
|
||||
project.ext.dimen = 'abi'
|
||||
|
|
Loading…
Reference in New Issue