bug fixes
|
@ -1,55 +1,122 @@
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven'
|
||||||
|
apply plugin: 'io.fabric'
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
geckoviewChannel = ""
|
geckoviewChannel = "nightly"
|
||||||
geckoviewVersion = "66.0.20190322021635"
|
geckoviewVersion = "64.0.20180927100037"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
url "https://maven.mozilla.org/maven2/"
|
||||||
|
mavenLocal()
|
||||||
|
mavenCentral()
|
||||||
|
google()
|
||||||
|
jcenter()
|
||||||
|
maven { url "https://raw.githubusercontent.com/guardianproject/gpmaven/master" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 28
|
compileSdkVersion 28
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.darkweb.genesissearchengine"
|
applicationId "com.darkweb.genesissearchengine"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 28
|
targetSdkVersion 28
|
||||||
versionCode 61
|
versionCode 126
|
||||||
versionName "61.0"
|
versionName "126.0"
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
flavorDimensions "abi"
|
flavorDimensions "abi"
|
||||||
// Note: compileOptions is only required for minSdkVersion < 24
|
// Note: compileOptions is only required for minSdkVersion < 24
|
||||||
|
// Note: compileOptions is only required for minSdkVersion < 26 (not 24)
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
flavorDimensions "abi"
|
||||||
|
|
||||||
productFlavors {
|
productFlavors {
|
||||||
x86 { dimension "abi" }
|
arm {
|
||||||
x86_64 { dimension "abi" }
|
versionCode 131
|
||||||
arm { dimension "abi" }
|
versionName "131"
|
||||||
aarch64 { dimension "abi" }
|
dimension "abi"
|
||||||
}
|
}
|
||||||
|
aarch64 {
|
||||||
|
versionCode 132
|
||||||
|
versionName "132"
|
||||||
|
dimension "abi"
|
||||||
|
}
|
||||||
|
x86_64 {
|
||||||
|
versionCode 135
|
||||||
|
versionName "135"
|
||||||
|
dimension "abi"
|
||||||
|
}
|
||||||
|
x86 {
|
||||||
|
versionCode 134
|
||||||
|
versionName "134"
|
||||||
|
dimension "abi"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
minifyEnabled false
|
minifyEnabled false
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
|
}
|
||||||
|
|
||||||
|
splits {
|
||||||
|
abi {
|
||||||
|
enable true
|
||||||
|
reset()
|
||||||
|
include 'arm64-v8a'
|
||||||
|
//include 'x86'
|
||||||
|
//include 'armeabi-v7a'
|
||||||
|
//include 'x86_64'
|
||||||
|
//include 'armeabi'
|
||||||
|
|
||||||
|
universalApk true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
configurations.all {
|
||||||
|
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
|
||||||
|
def requested = details.requested
|
||||||
|
if (requested.group == 'com.android.support') {
|
||||||
|
if (!requested.name.startsWith("multidex")) {
|
||||||
|
details.useVersion '26.1.0'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
implementation 'com.android.support:appcompat-v7:28.0.0'
|
|
||||||
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
|
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
|
||||||
implementation 'com.google.android.gms:play-services-ads:17.1.1'
|
implementation 'com.google.android.gms:play-services-ads:17.1.1'
|
||||||
implementation "cz.msebera.android:httpclient:4.4.1.2"
|
implementation "cz.msebera.android:httpclient:4.4.1.2"
|
||||||
implementation 'info.guardianproject.netcipher:netcipher:2.0.0-alpha1'
|
|
||||||
implementation 'info.guardianproject.netcipher:netcipher-okhttp3:2.0.0-alpha1'
|
//x86Implementation "org.mozilla.geckoview:geckoview-nightly-x86:68.0.20190405111221"
|
||||||
armImplementation "org.mozilla.geckoview:geckoview-armeabi-v7a:${geckoviewVersion}"
|
//x86_64Implementation "org.mozilla.geckoview:geckoview-nightly-x86_64:68.0.20190405111221"
|
||||||
aarch64Implementation "org.mozilla.geckoview:geckoview-arm64-v8a:${geckoviewVersion}"
|
//armImplementation "org.mozilla.geckoview:geckoview-nightly-armeabi-v7a:68.0.20190405111221"
|
||||||
implementation 'com.yarolegovich:lovely-dialog:1.1.0'
|
aarch64Implementation "org.mozilla.geckoview:geckoview-nightly-arm64-v8a:68.0.20190405111221"
|
||||||
|
|
||||||
|
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.9'
|
||||||
|
implementation 'com.crowdfire.cfalertdialog:cfalertdialog:1.1.0'
|
||||||
|
|
||||||
|
implementation 'com.github.jehy:Tor-Onion-Proxy-Library:0.0.7'
|
||||||
|
implementation 'org.slf4j:slf4j-api:1.7.7'
|
||||||
|
implementation 'org.slf4j:slf4j-android:1.7.7'
|
||||||
|
implementation 'com.android.support:design:28.0.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
|
@ -0,0 +1,3 @@
|
||||||
|
#Contains API Secret used to validate your application. Commit to internal source control; avoid making secret public.
|
||||||
|
#Wed May 01 00:42:45 PKT 2019
|
||||||
|
apiSecret=042501af0b2390b9f064ff9a0823e52a2dd04b2280c9b675925cebbb9620ecbf
|
|
@ -13,7 +13,7 @@
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/AppTheme"
|
android:theme="@style/AppTheme"
|
||||||
android:networkSecurityConfig="@xml/network_security_config"
|
android:networkSecurityConfig="@xml/network_security_config"
|
||||||
android:usesCleartextTraffic="true" tools:ignore="GoogleAppIndexingWarning">
|
android:usesCleartextTraffic="true" >
|
||||||
<uses-library
|
<uses-library
|
||||||
android:name="org.apache.http.legacy"
|
android:name="org.apache.http.legacy"
|
||||||
android:required="false" />
|
android:required="false" />
|
||||||
|
@ -21,11 +21,14 @@
|
||||||
android:screenOrientation="portrait" >
|
android:screenOrientation="portrait" >
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN"/>
|
<action android:name="android.intent.action.MAIN"/>
|
||||||
|
<action android:name="android.intent.action.VIEW" />
|
||||||
<category android:name="android.intent.category.LAUNCHER"/>
|
<category android:name="android.intent.category.LAUNCHER"/>
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
<meta-data
|
||||||
|
android:name="io.fabric.ApiKey"
|
||||||
|
android:value="be76c64dae2519d4ab8daaed88298da14c7c294f"
|
||||||
|
/>
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="com.google.android.gms.ads.APPLICATION_ID"
|
android:name="com.google.android.gms.ads.APPLICATION_ID"
|
||||||
android:value="ca-app-pub-5074525529134731~2926711128"/>
|
android:value="ca-app-pub-5074525529134731~2926711128"/>
|
||||||
|
|
|
@ -37,7 +37,7 @@ public class admanager {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onAdFailedToLoad(int errorCode) {
|
public void onAdFailedToLoad(int errorCode) {
|
||||||
mInterstitialAd.loadAd(new AdRequest.Builder().build());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -59,6 +59,7 @@ public class admanager {
|
||||||
public void showAd()
|
public void showAd()
|
||||||
{
|
{
|
||||||
mInterstitialAd.show();
|
mInterstitialAd.show();
|
||||||
|
mInterstitialAd.loadAd(new AdRequest.Builder().build());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
package com.darkweb.genesissearchengine;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import com.crashlytics.android.Crashlytics;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
public class analyticmanager {
|
||||||
|
private static final analyticmanager ourInstance = new analyticmanager();
|
||||||
|
|
||||||
|
public static analyticmanager getInstance() {
|
||||||
|
return ourInstance;
|
||||||
|
}
|
||||||
|
String uniqueID = null;
|
||||||
|
|
||||||
|
private analyticmanager()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void logUser()
|
||||||
|
{
|
||||||
|
Crashlytics.setUserIdentifier(uniqueID);
|
||||||
|
Crashlytics.setUserEmail("user@fabric.io");
|
||||||
|
Crashlytics.setUserName(uniqueID);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeviceID(Context context)
|
||||||
|
{
|
||||||
|
final String PREF_UNIQUE_ID = "PREF_UNIQUE_ID";
|
||||||
|
|
||||||
|
if (uniqueID == null)
|
||||||
|
{
|
||||||
|
SharedPreferences sharedPrefs = context.getSharedPreferences(
|
||||||
|
PREF_UNIQUE_ID, Context.MODE_PRIVATE);
|
||||||
|
uniqueID = sharedPrefs.getString(PREF_UNIQUE_ID, null);
|
||||||
|
if (uniqueID == null) {
|
||||||
|
uniqueID = UUID.randomUUID().toString();
|
||||||
|
SharedPreferences.Editor editor = sharedPrefs.edit();
|
||||||
|
editor.putString(PREF_UNIQUE_ID, uniqueID);
|
||||||
|
editor.commit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -1,31 +1,34 @@
|
||||||
package com.darkweb.genesissearchengine;
|
package com.darkweb.genesissearchengine;
|
||||||
|
|
||||||
import android.app.Application;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.pm.ActivityInfo;
|
||||||
import android.content.IntentFilter;
|
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.support.constraint.ConstraintLayout;
|
import android.support.constraint.ConstraintLayout;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.support.design.widget.FloatingActionButton;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
|
import android.text.SpannableString;
|
||||||
|
import android.text.Spanned;
|
||||||
|
import android.text.style.ForegroundColorSpan;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.util.Patterns;
|
import android.util.Patterns;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.view.Window;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.view.inputmethod.InputMethodManager;
|
import android.view.inputmethod.InputMethodManager;
|
||||||
import android.webkit.*;
|
import android.webkit.*;
|
||||||
import android.widget.*;
|
import android.widget.*;
|
||||||
|
import com.crashlytics.android.Crashlytics;
|
||||||
|
import io.fabric.sdk.android.Fabric;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.Stack;
|
import java.util.Stack;
|
||||||
|
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
import info.guardianproject.netcipher.proxy.OrbotHelper;
|
|
||||||
import org.mozilla.gecko.PrefsHelper;
|
|
||||||
import org.mozilla.geckoview.GeckoRuntime;
|
import org.mozilla.geckoview.GeckoRuntime;
|
||||||
import org.mozilla.geckoview.GeckoSession;
|
import org.mozilla.geckoview.GeckoSession;
|
||||||
import org.mozilla.geckoview.GeckoView;
|
import org.mozilla.geckoview.GeckoView;
|
||||||
|
@ -37,12 +40,13 @@ public class application_controller extends AppCompatActivity
|
||||||
{
|
{
|
||||||
|
|
||||||
/*View Objects*/
|
/*View Objects*/
|
||||||
private WebView webView1;
|
public WebView webView1;
|
||||||
private WebView webView2;
|
public WebView webView2;
|
||||||
private GeckoView webLoader;
|
private GeckoView webLoader;
|
||||||
private ProgressBar progressBar;
|
private ProgressBar progressBar;
|
||||||
private ConstraintLayout requestFailure;
|
private ConstraintLayout requestFailure;
|
||||||
private ConstraintLayout splashScreen;
|
private ConstraintLayout splashScreen;
|
||||||
|
private FloatingActionButton floatingButton;
|
||||||
private Button reloadButton;
|
private Button reloadButton;
|
||||||
private ImageButton homeButton;
|
private ImageButton homeButton;
|
||||||
private EditText searchbar;
|
private EditText searchbar;
|
||||||
|
@ -52,26 +56,61 @@ public class application_controller extends AppCompatActivity
|
||||||
private String version_code = "3.0";
|
private String version_code = "3.0";
|
||||||
private boolean wasBackPressed = false;
|
private boolean wasBackPressed = false;
|
||||||
private boolean isLoadedUrlSet = false;
|
private boolean isLoadedUrlSet = false;
|
||||||
|
private boolean isGeckoURLLoadded = false;
|
||||||
private boolean isOnnionUrlHalted = false;
|
private boolean isOnnionUrlHalted = false;
|
||||||
Handler handler = null;
|
Handler handler = null;
|
||||||
Runnable geckoRunnable = null;
|
Runnable geckoRunnable = null;
|
||||||
boolean isBlackPage = false;
|
boolean isBlackPage = false;
|
||||||
|
int startPage=0;
|
||||||
|
Handler geckoHandler = null;
|
||||||
|
Runnable geckoRunnableError = null;
|
||||||
/*helper Variables*/
|
/*helper Variables*/
|
||||||
Stack traceUrlList = new Stack<String>();
|
Stack traceUrlList = new Stack<String>();
|
||||||
|
boolean isTutorialPopupShown = false;
|
||||||
|
|
||||||
/*-------------------------------------------------------INITIALIZATION-------------------------------------------------------*/
|
/*-------------------------------------------------------INITIALIZATION-------------------------------------------------------*/
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState)
|
protected void onCreate(Bundle savedInstanceState)
|
||||||
{
|
{
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
//initializeCrashlytics();
|
||||||
|
initializeBackgroundColor();
|
||||||
|
//setOrientation();
|
||||||
setContentView(R.layout.application_view);
|
setContentView(R.layout.application_view);
|
||||||
|
orbot_manager.getInstance().initializeTorClient(this);
|
||||||
|
initializeStatus();
|
||||||
initializeRunnable();
|
initializeRunnable();
|
||||||
initializeProxy();
|
|
||||||
initializeConnections();
|
initializeConnections();
|
||||||
initializeOrbot();
|
|
||||||
initializeWebViews();
|
initializeWebViews();
|
||||||
initializeView();
|
initializeView();
|
||||||
initializeAds();
|
initializeAds();
|
||||||
|
checkSSLTextColor();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrientation()
|
||||||
|
{
|
||||||
|
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void initializeBackgroundColor()
|
||||||
|
{
|
||||||
|
if (android.os.Build.VERSION.SDK_INT > Build.VERSION_CODES.M){
|
||||||
|
getWindow().setBackgroundDrawableResource(R.drawable.backgradientwhite);
|
||||||
|
} else{
|
||||||
|
getWindow().setBackgroundDrawableResource(R.drawable.backgradientblack);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void initializeStatus()
|
||||||
|
{
|
||||||
|
helperMethod.setPlaystoreStatus(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void initializeCrashlytics()
|
||||||
|
{
|
||||||
|
Fabric.with(this, new Crashlytics());
|
||||||
|
analyticmanager.getInstance().setDeviceID(this);
|
||||||
|
analyticmanager.getInstance().logUser();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void versionChecker()
|
public void versionChecker()
|
||||||
|
@ -92,10 +131,11 @@ public class application_controller extends AppCompatActivity
|
||||||
Runnable my_runnable = new Runnable() {
|
Runnable my_runnable = new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if(!isBlackPage)
|
if(!isBlackPage || startPage>1)
|
||||||
{
|
{
|
||||||
Log.i("SHIT1 : ",status.currentURL);
|
Log.i("PROBLEM24","");
|
||||||
progressBar.animate().setDuration(150).alpha(0f).withEndAction((() -> progressBar.setVisibility(View.INVISIBLE)));;
|
progressBar.animate().setDuration(150).alpha(0f).withEndAction((() -> progressBar.setVisibility(View.INVISIBLE)));;
|
||||||
|
Log.i("SHIT1 : ",status.currentURL);
|
||||||
datamodel.getInstance().setIsLoadingURL(false);
|
datamodel.getInstance().setIsLoadingURL(false);
|
||||||
message_manager.getInstance().URLNotFoundError(application_controller.this);
|
message_manager.getInstance().URLNotFoundError(application_controller.this);
|
||||||
}
|
}
|
||||||
|
@ -108,67 +148,39 @@ public class application_controller extends AppCompatActivity
|
||||||
admanager.getInstance().initialize(this);
|
admanager.getInstance().initialize(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initializeProxy()
|
|
||||||
{
|
|
||||||
PrefsHelper.setPref("network.proxy.type",1); //manual proxy settings
|
|
||||||
PrefsHelper.setPref("network.proxy.socks","127.0.0.1"); //manual proxy settings
|
|
||||||
PrefsHelper.setPref("network.proxy.socks_port",9050); //manual proxy settings
|
|
||||||
PrefsHelper.setPref("network.proxy.socks_version",5); //manual proxy settings
|
|
||||||
PrefsHelper.setPref("network.proxy.socks_remote_dns",true); //manual proxy settings
|
|
||||||
PrefsHelper.setPref("browser.cache.disk.enable",false);
|
|
||||||
PrefsHelper.setPref("browser.cache.memory.enable",false);
|
|
||||||
PrefsHelper.setPref("general.useragent.override", "Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20100101 Firefox/17.0");
|
|
||||||
PrefsHelper.setPref("privacy.donottrackheader.enabled",false);
|
|
||||||
PrefsHelper.setPref("privacy.donottrackheader.value",1);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void initializeConnections()
|
public void initializeConnections()
|
||||||
{
|
{
|
||||||
webView1 = findViewById(R.id.pageLoader1);
|
webView1 = (WebView) findViewById(R.id.pageLoader1);
|
||||||
webView2 = findViewById(R.id.pageLoader2);
|
webView2 = (WebView) findViewById(R.id.pageLoader2);
|
||||||
progressBar = findViewById(R.id.progressBar);
|
progressBar = (ProgressBar) findViewById(R.id.progressBar);
|
||||||
requestFailure = findViewById(R.id.requestFailure);
|
requestFailure = (ConstraintLayout) findViewById(R.id.requestFailure);
|
||||||
splashScreen = findViewById(R.id.splashScreen);
|
splashScreen = (ConstraintLayout) findViewById(R.id.splashScreen);
|
||||||
reloadButton = findViewById(R.id.reloadButton);
|
reloadButton = (Button) findViewById(R.id.reloadButton);
|
||||||
homeButton = findViewById(R.id.home);
|
homeButton = (ImageButton) findViewById(R.id.home);
|
||||||
searchbar = findViewById(R.id.search);
|
searchbar = (EditText) findViewById(R.id.search);
|
||||||
topbar = findViewById(R.id.topbar);
|
floatingButton = (FloatingActionButton) findViewById(R.id.floatingActionButton3);
|
||||||
webLoader = findViewById(R.id.webLoader);
|
topbar = (LinearLayout) findViewById(R.id.topbar);
|
||||||
}
|
webLoader = (GeckoView) findViewById(R.id.webLoader);
|
||||||
|
|
||||||
public void initializeOrbot()
|
|
||||||
{
|
|
||||||
Intent orbot = OrbotHelper.getOrbotStartIntent(getApplicationContext());
|
|
||||||
getApplicationContext().registerReceiver(orbot_manager.getInstance().orbotStatusReceiver,new IntentFilter(OrbotHelper.ACTION_STATUS));
|
|
||||||
getApplicationContext().sendBroadcast(orbot);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initializeWebViews()
|
public void initializeWebViews()
|
||||||
{
|
{
|
||||||
webRequestHandler.getInstance().initialization(webView1,webView2,progressBar,searchbar,requestFailure,this,splashScreen);
|
webRequestHandler.getInstance().initialization(webView1,webView2,progressBar,searchbar,requestFailure,this,splashScreen,this);
|
||||||
webView1.bringToFront();
|
webView1.bringToFront();
|
||||||
|
Log.i("PROBLEM25","");
|
||||||
progressBar.animate().setDuration(150).alpha(0f);
|
progressBar.animate().setDuration(150).alpha(0f);
|
||||||
|
//floatingButton.setAlpha(0);
|
||||||
|
|
||||||
new Thread()
|
|
||||||
{
|
|
||||||
public void run()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
session1 = new GeckoSession();
|
session1 = new GeckoSession();
|
||||||
runtime1 = GeckoRuntime.create(application_controller.this);
|
runtime1 = GeckoRuntime.getDefault(application_controller.this);
|
||||||
session1.open(runtime1);
|
session1.open(runtime1);
|
||||||
|
if(session1.isOpen())
|
||||||
|
{
|
||||||
|
webLoader.releaseSession();
|
||||||
|
}
|
||||||
webLoader.setSession(session1);
|
webLoader.setSession(session1);
|
||||||
session1.setProgressDelegate(new progressDelegate());
|
session1.setProgressDelegate(new progressDelegate());
|
||||||
webLoader.setVisibility(View.INVISIBLE);
|
webLoader.setVisibility(View.INVISIBLE);
|
||||||
sleep(2000);
|
|
||||||
}
|
|
||||||
catch (InterruptedException e)
|
|
||||||
{
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}.start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*Initialization*/
|
/*Initialization*/
|
||||||
|
@ -179,16 +191,19 @@ public class application_controller extends AppCompatActivity
|
||||||
webView1.setWebViewClient(loadWebViewClient());
|
webView1.setWebViewClient(loadWebViewClient());
|
||||||
webView1.getSettings().setJavaScriptEnabled(true);
|
webView1.getSettings().setJavaScriptEnabled(true);
|
||||||
webView1.getSettings().setUseWideViewPort(true);
|
webView1.getSettings().setUseWideViewPort(true);
|
||||||
|
webView1.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
|
||||||
|
|
||||||
webView2.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
|
webView2.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
|
||||||
webView2.setBackgroundColor(Color.WHITE);
|
webView2.setBackgroundColor(Color.WHITE);
|
||||||
webView2.setWebViewClient(loadWebViewClient());
|
webView2.setWebViewClient(loadWebViewClient());
|
||||||
webView2.getSettings().setJavaScriptEnabled(true);
|
webView2.getSettings().setJavaScriptEnabled(true);
|
||||||
webView2.getSettings().setUseWideViewPort(true);
|
webView2.getSettings().setUseWideViewPort(true);
|
||||||
|
webView2.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
|
||||||
|
|
||||||
webView2.animate().setDuration(0).alpha(0f);
|
webView2.animate().setDuration(0).alpha(0f);
|
||||||
progressBar.setVisibility(View.INVISIBLE);
|
progressBar.setVisibility(View.INVISIBLE);
|
||||||
requestFailure.animate().setDuration(0).alpha(0.0f);
|
requestFailure.animate().setDuration(0).alpha(0.0f);
|
||||||
|
Log.i("PROBLEM26","");
|
||||||
progressBar.animate().setDuration(150).alpha(0f);
|
progressBar.animate().setDuration(150).alpha(0f);
|
||||||
|
|
||||||
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
|
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
|
||||||
|
@ -199,12 +214,57 @@ public class application_controller extends AppCompatActivity
|
||||||
private void initializeViewClients()
|
private void initializeViewClients()
|
||||||
{
|
{
|
||||||
searchbar.setOnEditorActionListener((v, actionId, event) -> {
|
searchbar.setOnEditorActionListener((v, actionId, event) -> {
|
||||||
|
Log.i("1actionId : ",actionId+"");
|
||||||
|
if (actionId == 5)
|
||||||
|
{
|
||||||
return onEditorClicked(v, actionId, event);
|
return onEditorClicked(v, actionId, event);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
floatingButton.setOnClickListener(new View.OnClickListener(){
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View v)
|
||||||
|
{
|
||||||
|
message_manager.getInstance().reportURL(application_controller.this,searchbar.getText().toString());
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-------------------------------------------------------WEBVIEW LISTENERS-------------------------------------------------------*/
|
/*-------------------------------------------------------WEBVIEW LISTENERS-------------------------------------------------------*/
|
||||||
|
|
||||||
|
public void loadGeckoURL(String url)
|
||||||
|
{
|
||||||
|
|
||||||
|
boolean init_status=orbot_manager.getInstance().reinitOrbot(application_controller.this);
|
||||||
|
if(init_status)
|
||||||
|
{
|
||||||
|
searchbar.setText(url.replaceAll("boogle.store","genesis.onion"));
|
||||||
|
checkSSLTextColor();
|
||||||
|
KeyboardUtils.hideKeyboard(application_controller.this);
|
||||||
|
|
||||||
|
progressBar.setAlpha(0);
|
||||||
|
progressBar.setVisibility(View.VISIBLE);
|
||||||
|
Log.i("PROBLEM11","");
|
||||||
|
progressBar.animate().setDuration(150).setDuration(300).alpha(1f);
|
||||||
|
|
||||||
|
isOnnionUrlHalted = false;
|
||||||
|
session1.stop();
|
||||||
|
session1.close();
|
||||||
|
webLoader.releaseSession();
|
||||||
|
session1 = new GeckoSession();
|
||||||
|
session1.open(runtime1);
|
||||||
|
session1.setProgressDelegate(new progressDelegate());
|
||||||
|
webLoader.setSession(session1);
|
||||||
|
|
||||||
|
session1.loadUri(url);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private WebViewClient loadWebViewClient()
|
private WebViewClient loadWebViewClient()
|
||||||
{
|
{
|
||||||
WebViewClient client = new WebViewClient()
|
WebViewClient client = new WebViewClient()
|
||||||
|
@ -220,33 +280,26 @@ public class application_controller extends AppCompatActivity
|
||||||
|
|
||||||
if(!url.toString().contains("boogle"))
|
if(!url.toString().contains("boogle"))
|
||||||
{
|
{
|
||||||
boolean init_status=orbot_manager.getInstance().reinitOrbot(application_controller.this);
|
try
|
||||||
if(init_status)
|
|
||||||
{
|
{
|
||||||
searchbar.setText(url.replaceAll("boogle.store","genesis.onion"));
|
if(orbot_manager.getInstance().reinitOrbot(application_controller.this))
|
||||||
KeyboardUtils.hideKeyboard(application_controller.this);
|
{
|
||||||
admanager.getInstance().showAd();
|
loadGeckoURL(url);
|
||||||
|
}
|
||||||
progressBar.setAlpha(0);
|
}
|
||||||
progressBar.setVisibility(View.VISIBLE);
|
catch (Exception ex)
|
||||||
progressBar.animate().setDuration(150).setDuration(300).alpha(1f);
|
{
|
||||||
|
ex.printStackTrace();
|
||||||
isOnnionUrlHalted = false;
|
|
||||||
session1.stop();
|
|
||||||
session1.close();
|
|
||||||
webLoader.releaseSession();
|
|
||||||
session1 = new GeckoSession();
|
|
||||||
session1.open(runtime1);
|
|
||||||
session1.setProgressDelegate(new progressDelegate());
|
|
||||||
webLoader.setSession(session1);
|
|
||||||
|
|
||||||
session1.loadUri(url);
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
session1.stop();
|
||||||
|
session1.close();
|
||||||
|
|
||||||
searchbar.setText(url.replaceAll("boogle.store","genesis.onion"));
|
searchbar.setText(url.replaceAll("boogle.store","genesis.onion"));
|
||||||
|
checkSSLTextColor();
|
||||||
KeyboardUtils.hideKeyboard(application_controller.this);
|
KeyboardUtils.hideKeyboard(application_controller.this);
|
||||||
if(traceUrlList.size()==0 || !status.currentURL.equals(traceUrlList.peek()))
|
if(traceUrlList.size()==0 || !status.currentURL.equals(traceUrlList.peek()))
|
||||||
{
|
{
|
||||||
|
@ -266,34 +319,68 @@ public class application_controller extends AppCompatActivity
|
||||||
{
|
{
|
||||||
super.onPageFinished(view, url);
|
super.onPageFinished(view, url);
|
||||||
|
|
||||||
|
handler = new Handler();
|
||||||
|
int delay = 800;
|
||||||
|
if(startPage>2)
|
||||||
|
{
|
||||||
|
delay = 0;
|
||||||
|
}
|
||||||
|
handler.postDelayed(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
webView1.stopLoading();
|
webView1.stopLoading();
|
||||||
webView2.stopLoading();
|
webView2.stopLoading();
|
||||||
|
if(webView1.getAlpha()==0)
|
||||||
|
{
|
||||||
webView1.animate().setDuration(250).alpha(1f);
|
webView1.animate().setDuration(250).alpha(1f);
|
||||||
webView2.animate().setDuration(250).alpha(1f).withEndAction((() -> {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
webView2.animate().setDuration(250).alpha(1f);
|
||||||
|
}
|
||||||
|
//.withEndAction((() -> {
|
||||||
|
|
||||||
|
//}));;
|
||||||
datamodel.getInstance().setIsLoadingURL(false);
|
datamodel.getInstance().setIsLoadingURL(false);
|
||||||
requestFailure.animate().alpha(0f).setDuration(300).withEndAction((() -> requestFailure.setVisibility(View.INVISIBLE)));;
|
requestFailure.animate().alpha(0f).setDuration(300).withEndAction((() -> requestFailure.setVisibility(View.INVISIBLE)));;
|
||||||
|
Log.i("PROBLEM12","");
|
||||||
|
|
||||||
}));;
|
if(searchbar.getText().toString().contains("genesis.onion"))
|
||||||
|
{
|
||||||
progressBar.animate().setDuration(150).alpha(0f).withEndAction((() -> progressBar.setVisibility(View.INVISIBLE)));;
|
progressBar.animate().setDuration(150).alpha(0f).withEndAction((() -> progressBar.setVisibility(View.INVISIBLE)));;
|
||||||
|
}
|
||||||
|
|
||||||
if(!status.hasApplicationLoaded)
|
if(!status.hasApplicationLoaded)
|
||||||
{
|
{
|
||||||
try
|
|
||||||
{
|
|
||||||
sleep(2000);
|
|
||||||
}
|
|
||||||
catch (InterruptedException e)
|
|
||||||
{
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
status.hasApplicationLoaded = true;
|
status.hasApplicationLoaded = true;
|
||||||
splashScreen.animate().alpha(0.0f).setDuration(300).setListener(null).withEndAction((() -> splashScreen.setVisibility(View.GONE)));
|
handler = new Handler();
|
||||||
|
|
||||||
|
splashScreen.animate().alpha(0.0f).setStartDelay(500).setDuration(300).setListener(null).withEndAction((() -> splashScreen.setVisibility(View.GONE)));
|
||||||
versionChecker();
|
versionChecker();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
|
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
imm.hideSoftInputFromWindow(searchbar.getWindowToken(), 0);
|
imm.hideSoftInputFromWindow(searchbar.getWindowToken(), 0);
|
||||||
|
|
||||||
|
}
|
||||||
|
}, delay);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Handler popuphandler = new Handler();
|
||||||
|
|
||||||
|
popuphandler.postDelayed(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
if(status.hasApplicationLoaded && !isTutorialPopupShown)
|
||||||
|
{
|
||||||
|
message_manager.getInstance().welcomeMessage(application_controller.this,application_controller.this);
|
||||||
|
isTutorialPopupShown = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -303,11 +390,13 @@ public class application_controller extends AppCompatActivity
|
||||||
handler.postDelayed(new Runnable() {
|
handler.postDelayed(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
Log.i("PROBLEM13","");
|
||||||
progressBar.animate().setDuration(150).alpha(0f).withEndAction((() -> progressBar.setVisibility(View.INVISIBLE)));;
|
progressBar.animate().setDuration(150).alpha(0f).withEndAction((() -> progressBar.setVisibility(View.INVISIBLE)));;
|
||||||
datamodel.getInstance().setIsLoadingURL(false);
|
datamodel.getInstance().setIsLoadingURL(false);
|
||||||
splashScreen.animate().alpha(0);
|
splashScreen.animate().alpha(0);
|
||||||
requestFailure.setVisibility(View.VISIBLE);
|
requestFailure.setVisibility(View.VISIBLE);
|
||||||
requestFailure.animate().alpha(1.0f);
|
requestFailure.animate().alpha(1.0f);
|
||||||
|
status.isTorInitialized = false;
|
||||||
}
|
}
|
||||||
}, 3000);
|
}, 3000);
|
||||||
|
|
||||||
|
@ -328,6 +417,7 @@ public class application_controller extends AppCompatActivity
|
||||||
|
|
||||||
requestFailure.setVisibility(View.VISIBLE);
|
requestFailure.setVisibility(View.VISIBLE);
|
||||||
requestFailure.animate().alpha(1.0f);
|
requestFailure.animate().alpha(1.0f);
|
||||||
|
status.isTorInitialized = false;
|
||||||
loadErrorPage();
|
loadErrorPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -340,7 +430,9 @@ class progressDelegate implements GeckoSession.ProgressDelegate
|
||||||
@Override
|
@Override
|
||||||
public void onPageStart(GeckoSession session, String url)
|
public void onPageStart(GeckoSession session, String url)
|
||||||
{
|
{
|
||||||
if(!orbot_manager.getInstance().reinitOrbot(application_controller.this))
|
isGeckoURLLoadded = false;
|
||||||
|
isBlackPage = url.equals("about:blank");
|
||||||
|
if(!isBlackPage && !orbot_manager.getInstance().reinitOrbot(application_controller.this))
|
||||||
{
|
{
|
||||||
session1.stop();
|
session1.stop();
|
||||||
session1.close();
|
session1.close();
|
||||||
|
@ -371,10 +463,12 @@ class progressDelegate implements GeckoSession.ProgressDelegate
|
||||||
}
|
}
|
||||||
|
|
||||||
datamodel.getInstance().setIsLoadingURL(true);
|
datamodel.getInstance().setIsLoadingURL(true);
|
||||||
isBlackPage = url.equals("about:blank");
|
|
||||||
if(!isBlackPage)
|
if(!isBlackPage)
|
||||||
{
|
{
|
||||||
|
Log.i("HUTEES : 1","11");
|
||||||
searchbar.setText(url);
|
searchbar.setText(url);
|
||||||
|
checkSSLTextColor();
|
||||||
|
//initGeckoFailureHandler();
|
||||||
}
|
}
|
||||||
if(!isBlackPage && progressBar.getVisibility() == View.INVISIBLE)
|
if(!isBlackPage && progressBar.getVisibility() == View.INVISIBLE)
|
||||||
{
|
{
|
||||||
|
@ -386,43 +480,67 @@ class progressDelegate implements GeckoSession.ProgressDelegate
|
||||||
@Override
|
@Override
|
||||||
public void onPageStop(GeckoSession session, boolean success)
|
public void onPageStop(GeckoSession session, boolean success)
|
||||||
{
|
{
|
||||||
|
Log.i("STATUS-- : ",success+"");
|
||||||
if(!success)
|
if(!success)
|
||||||
{
|
{
|
||||||
handler.postDelayed(geckoRunnable, 15000);
|
initGeckoFailureHandler(isGeckoURLLoadded);
|
||||||
|
isGeckoURLLoadded = false;
|
||||||
|
}
|
||||||
|
if(success)
|
||||||
|
{
|
||||||
|
Log.i("PROBLEM14","");
|
||||||
|
isGeckoURLLoadded = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onProgressChange(GeckoSession session, int progress)
|
public void onProgressChange(GeckoSession session, int progress)
|
||||||
{
|
{
|
||||||
|
if(geckoHandler!=null)
|
||||||
|
{
|
||||||
|
geckoHandler.removeCallbacks(geckoRunnableError);
|
||||||
|
geckoHandler = null;
|
||||||
|
Log.i("HUTEES : 4","11");
|
||||||
|
}
|
||||||
if(progress>=100)
|
if(progress>=100)
|
||||||
{
|
{
|
||||||
|
isGeckoURLLoadded = true;
|
||||||
|
floatingButton.animate().alpha(1);
|
||||||
|
|
||||||
|
if(status.currentURL.contains("://boogle.store"))
|
||||||
|
{
|
||||||
|
admanager.getInstance().showAd();
|
||||||
|
}
|
||||||
if(!isLoadedUrlSet &&!isOnnionUrlHalted)
|
if(!isLoadedUrlSet &&!isOnnionUrlHalted)
|
||||||
{
|
{
|
||||||
webLoader.bringToFront();
|
webLoader.bringToFront();
|
||||||
webLoader.animate().setDuration(100).alpha(1);
|
webLoader.animate().setDuration(100).alpha(1);
|
||||||
webLoader.setVisibility(View.VISIBLE);
|
webLoader.setVisibility(View.VISIBLE);
|
||||||
requestFailure.animate().alpha(0f).setDuration(300).withEndAction((() -> requestFailure.setVisibility(View.INVISIBLE)));;
|
requestFailure.animate().alpha(0f).setDuration(300).withEndAction((() -> requestFailure.setVisibility(View.INVISIBLE)));;
|
||||||
|
|
||||||
String url = searchbar.getText().toString();
|
String url = searchbar.getText().toString();
|
||||||
boolean isBlackPage = url.equals("about:blank");
|
boolean isBlackPage = url.equals("about:blank");
|
||||||
if(!isBlackPage && !wasBackPressed)
|
if(!isBlackPage && !wasBackPressed)
|
||||||
{
|
{
|
||||||
Log.i("SHIT2 : ",status.currentURL);
|
|
||||||
traceUrlList.add(status.currentURL);
|
traceUrlList.add(status.currentURL);
|
||||||
searchbar.setText(url);
|
searchbar.setText(url);
|
||||||
|
checkSSLTextColor();
|
||||||
status.currentURL = url;
|
status.currentURL = url;
|
||||||
}
|
}
|
||||||
|
wasBackPressed=false;
|
||||||
}
|
}
|
||||||
|
progressBar.animate().setDuration(150).alpha(0f).withEndAction((() -> progressBar.setVisibility(View.INVISIBLE)));;
|
||||||
isLoadedUrlSet = true;
|
isLoadedUrlSet = true;
|
||||||
}
|
}
|
||||||
|
else if(progress<100)
|
||||||
|
{
|
||||||
|
//Log.i("HUTEES : 3","11");
|
||||||
|
//initGeckoFailureHandler();
|
||||||
|
}
|
||||||
if(progress>=100)
|
if(progress>=100)
|
||||||
{
|
{
|
||||||
progressBar.animate().setDuration(150).alpha(0f).withEndAction((() -> progressBar.setVisibility(View.INVISIBLE)));;
|
|
||||||
datamodel.getInstance().setIsLoadingURL(false);
|
datamodel.getInstance().setIsLoadingURL(false);
|
||||||
}
|
}
|
||||||
|
//handler.removeCallbacks(geckoRunnable);
|
||||||
handler.removeCallbacks(geckoRunnable);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -430,6 +548,42 @@ class progressDelegate implements GeckoSession.ProgressDelegate
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public void initGeckoFailureHandler(boolean hasURLLoaded)
|
||||||
|
{
|
||||||
|
int delay = 15000;
|
||||||
|
if(!helperMethod.isNetworkAvailable(application_controller.this) || hasURLLoaded)
|
||||||
|
{
|
||||||
|
delay=0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(geckoHandler == null)
|
||||||
|
{
|
||||||
|
geckoHandler = new Handler();
|
||||||
|
geckoRunnableError = new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
floatingButton.animate().alpha(0);
|
||||||
|
Log.i("PROBLEM15","");
|
||||||
|
datamodel.getInstance().setIsLoadingURL(false);
|
||||||
|
requestFailure.setAlpha(0.0f);
|
||||||
|
requestFailure.setVisibility(View.VISIBLE);
|
||||||
|
requestFailure.animate().alpha(1.0f);
|
||||||
|
Log.i("PROBLEM16","");
|
||||||
|
progressBar.animate().setDuration(150).alpha(0f).withEndAction((() -> progressBar.setVisibility(View.INVISIBLE)));;
|
||||||
|
geckoHandler = null;
|
||||||
|
|
||||||
|
if(!helperMethod.isNetworkAvailable(application_controller.this))
|
||||||
|
{
|
||||||
|
orbot_manager.getInstance().restartOrbot(application_controller.this);
|
||||||
|
}
|
||||||
|
wasBackPressed=false;
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
geckoHandler.postDelayed(geckoRunnableError, delay);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*-------------------------------------------------------Helper Method-------------------------------------------------------*/
|
/*-------------------------------------------------------Helper Method-------------------------------------------------------*/
|
||||||
|
|
||||||
public void loadErrorPage()
|
public void loadErrorPage()
|
||||||
|
@ -441,19 +595,33 @@ class progressDelegate implements GeckoSession.ProgressDelegate
|
||||||
|
|
||||||
public void loadURLAnimate(String url)
|
public void loadURLAnimate(String url)
|
||||||
{
|
{
|
||||||
|
floatingButton.animate().alpha(0);
|
||||||
webRequestHandler.getInstance().loadURL(url);
|
webRequestHandler.getInstance().loadURL(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-------------------------------------------------------EVENT LISTENERS-------------------------------------------------------*/
|
/*-------------------------------------------------------EVENT LISTENERS-------------------------------------------------------*/
|
||||||
|
|
||||||
|
public void initializePopupView(String url)
|
||||||
|
{
|
||||||
|
searchbar.setText(url.replaceAll("boogle.store","genesis.onion"));
|
||||||
|
checkSSLTextColor();
|
||||||
|
traceUrlList.add(status.currentURL);
|
||||||
|
status.currentURL=url;
|
||||||
|
progressBar.setAlpha(0f);
|
||||||
|
progressBar.setVisibility(View.VISIBLE);
|
||||||
|
Log.i("PROBLEM17","");
|
||||||
|
progressBar.animate().setDuration(150).alpha(1f);
|
||||||
|
}
|
||||||
|
|
||||||
public void onHomeButtonPressed(View view)
|
public void onHomeButtonPressed(View view)
|
||||||
{
|
{
|
||||||
webRequestHandler.getInstance().isUrlStoped=true;
|
webRequestHandler.getInstance().isUrlStoped=true;
|
||||||
searchbar.setText("https://genesis.onion");
|
searchbar.setText("https://genesis.onion");
|
||||||
|
checkSSLTextColor();
|
||||||
status.currentURL="https://boogle.store";
|
status.currentURL="https://boogle.store";
|
||||||
progressBar.setAlpha(0f);
|
progressBar.setAlpha(0f);
|
||||||
progressBar.setVisibility(View.VISIBLE);
|
progressBar.setVisibility(View.VISIBLE);
|
||||||
|
Log.i("PROBLEM18","");
|
||||||
progressBar.animate().setDuration(150).alpha(1f);
|
progressBar.animate().setDuration(150).alpha(1f);
|
||||||
loadURLAnimate("https://boogle.store");
|
loadURLAnimate("https://boogle.store");
|
||||||
webView1.stopLoading();
|
webView1.stopLoading();
|
||||||
|
@ -468,39 +636,99 @@ class progressDelegate implements GeckoSession.ProgressDelegate
|
||||||
public void onReloadButtonPressed(View view)
|
public void onReloadButtonPressed(View view)
|
||||||
{
|
{
|
||||||
webRequestHandler.getInstance().isReloadedUrl = true;
|
webRequestHandler.getInstance().isReloadedUrl = true;
|
||||||
|
Log.i("PROBLEM19","");
|
||||||
progressBar.animate().setDuration(150).alpha(0f);
|
progressBar.animate().setDuration(150).alpha(0f);
|
||||||
progressBar.setVisibility(View.VISIBLE);
|
progressBar.setVisibility(View.VISIBLE);
|
||||||
|
if(searchbar.getText().toString().contains("://genesis.onion"))
|
||||||
|
{
|
||||||
|
Log.i("PROBLEM20","");
|
||||||
progressBar.animate().setDuration(150).alpha(1f);
|
progressBar.animate().setDuration(150).alpha(1f);
|
||||||
loadURLAnimate(status.currentURL);
|
loadURLAnimate(status.currentURL);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
@Override
|
{
|
||||||
public void onBackPressed()
|
if(status.isTorInitialized)
|
||||||
|
{
|
||||||
|
Log.i("PROBLEM21","");
|
||||||
|
progressBar.animate().setDuration(150).alpha(1f);
|
||||||
|
wasBackPressed = true;
|
||||||
|
loadGeckoURL(searchbar.getText().toString());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
orbot_manager.getInstance().reinitOrbot(application_controller.this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void checkSSLTextColor()
|
||||||
|
{
|
||||||
|
if(searchbar==null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(searchbar.getText().toString().contains("https://"))
|
||||||
|
{
|
||||||
|
SpannableString ss = new SpannableString(searchbar.getText());
|
||||||
|
ss.setSpan(new ForegroundColorSpan(Color.argb(255,0,123,43)),0,5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
ss.setSpan(new ForegroundColorSpan(Color.GRAY),5,8, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
searchbar.setText(ss);
|
||||||
|
}
|
||||||
|
else if(searchbar.getText().toString().contains("http://"))
|
||||||
|
{
|
||||||
|
SpannableString ss = new SpannableString(searchbar.getText());
|
||||||
|
ss.setSpan(new ForegroundColorSpan(Color.argb(255,0,128,43)),0,4, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
ss.setSpan(new ForegroundColorSpan(Color.GRAY),4,7, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
searchbar.setText(ss);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SpannableString ss = new SpannableString(searchbar.getText());
|
||||||
|
ss.setSpan(new ForegroundColorSpan(Color.BLACK),0,searchbar.getText().length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
searchbar.setText(ss);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void backPressed()
|
||||||
{
|
{
|
||||||
session1.stop();
|
|
||||||
if(traceUrlList.size()>0)
|
if(traceUrlList.size()>0)
|
||||||
{
|
{
|
||||||
searchbar.setText(traceUrlList.peek().toString().replaceAll("boogle.store","genesis.onion"));
|
|
||||||
if(traceUrlList.peek().toString().contains("boogle.store"))
|
if(traceUrlList.peek().toString().contains("boogle.store"))
|
||||||
{
|
{
|
||||||
|
session1.stop();
|
||||||
|
session1.close();
|
||||||
if(!status.currentURL.contains("boogle.store"))
|
if(!status.currentURL.contains("boogle.store"))
|
||||||
{
|
{
|
||||||
Log.i("FITS4 : " , "");
|
searchbar.setText(traceUrlList.peek().toString().replaceAll("boogle.store","genesis.onion"));
|
||||||
isOnnionUrlHalted=true;
|
isOnnionUrlHalted=true;
|
||||||
session1.stop();
|
session1.stop();
|
||||||
session1.close();
|
session1.close();
|
||||||
webLoader.releaseSession();
|
webLoader.releaseSession();
|
||||||
|
webLoader.releaseSession();
|
||||||
status.currentURL = traceUrlList.pop().toString();
|
status.currentURL = traceUrlList.pop().toString();
|
||||||
progressBar.animate().setDuration(150).alpha(0f).withEndAction((() -> progressBar.setVisibility(View.INVISIBLE)));;
|
Log.i("PROBLEM22","");
|
||||||
webLoader.animate().alpha(0f).withEndAction((() -> webLoader.setVisibility(View.INVISIBLE)));;
|
webLoader.animate().alpha(0f).withEndAction((() -> webLoader.setVisibility(View.INVISIBLE)));;
|
||||||
isOnnionUrlHalted = true;
|
//isOnnionUrlHalted = true;
|
||||||
wasBackPressed = false;
|
|
||||||
KeyboardUtils.hideKeyboard(application_controller.this);
|
KeyboardUtils.hideKeyboard(application_controller.this);
|
||||||
|
if(requestFailure.getAlpha()==1)
|
||||||
|
{
|
||||||
|
requestFailure.animate().alpha(0f).withEndAction((() -> requestFailure.setVisibility(View.INVISIBLE)));;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
progressBar.animate().alpha(0f).withEndAction((() -> progressBar.setVisibility(View.INVISIBLE)));;
|
||||||
|
}
|
||||||
|
floatingButton.animate().alpha(0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//if(progressBar.getAlpha()==0)
|
||||||
|
//{
|
||||||
|
//progressBar.animate().setDuration(150).setDuration(300).alpha(1f);
|
||||||
|
Log.i("1LOG3","LOG1");
|
||||||
|
searchbar.setText(traceUrlList.peek().toString().replaceAll("boogle.store","genesis.onion"));
|
||||||
session1.close();
|
session1.close();
|
||||||
Log.i("FITS3 : " , "");
|
|
||||||
loadURLAnimate(traceUrlList.pop().toString());
|
loadURLAnimate(traceUrlList.pop().toString());
|
||||||
if(traceUrlList.size()<=0)
|
if(traceUrlList.size()<=0)
|
||||||
{
|
{
|
||||||
|
@ -510,49 +738,71 @@ class progressDelegate implements GeckoSession.ProgressDelegate
|
||||||
{
|
{
|
||||||
status.currentURL = traceUrlList.peek().toString();
|
status.currentURL = traceUrlList.peek().toString();
|
||||||
}
|
}
|
||||||
|
floatingButton.animate().alpha(0);
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(traceUrlList.size()<=0 || traceUrlList.peek().toString().contains("boogle.store"))
|
if(traceUrlList.size()<=0 || traceUrlList.peek().toString().contains("boogle.store"))
|
||||||
{
|
{
|
||||||
Log.i("FITS2 : " , "");
|
session1.stop();
|
||||||
|
session1.close();
|
||||||
|
|
||||||
|
searchbar.setText(traceUrlList.peek().toString().replaceAll("boogle.store","genesis.onion"));
|
||||||
status.currentURL = "https://boogle.store";
|
status.currentURL = "https://boogle.store";
|
||||||
webLoader.animate().setDuration(250).alpha(0);
|
webLoader.animate().setDuration(250).alpha(0);
|
||||||
traceUrlList.pop();
|
traceUrlList.pop();
|
||||||
wasBackPressed = false;
|
wasBackPressed = false;
|
||||||
session1.close();
|
session1.close();
|
||||||
|
floatingButton.animate().alpha(0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
webLoader.animate().setDuration(250).alpha(1);
|
if(orbot_manager.getInstance().reinitOrbot(this))
|
||||||
|
{
|
||||||
|
searchbar.setText(traceUrlList.peek().toString().replaceAll("boogle.store","genesis.onion"));
|
||||||
status.currentURL = traceUrlList.peek().toString();
|
status.currentURL = traceUrlList.peek().toString();
|
||||||
String prevURL = traceUrlList.pop().toString();
|
String prevURL = traceUrlList.pop().toString();
|
||||||
Log.i("FITS : " , prevURL);
|
boolean init_status=orbot_manager.getInstance().reinitOrbot(application_controller.this);
|
||||||
session1.goBack();
|
//isOnnionUrlHalted = true;
|
||||||
|
if(init_status)
|
||||||
|
{
|
||||||
|
searchbar.setText(status.currentURL.replaceAll("boogle.store","genesis.onion"));
|
||||||
|
KeyboardUtils.hideKeyboard(application_controller.this);
|
||||||
|
progressBar.animate().alpha(1);
|
||||||
|
progressBar.setVisibility(View.VISIBLE);
|
||||||
wasBackPressed = true;
|
wasBackPressed = true;
|
||||||
|
requestFailure.animate().alpha(0);
|
||||||
|
session1.goBack();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
session1.stop();
|
||||||
|
session1.close();
|
||||||
|
orbot_manager.getInstance().reinitOrbot(application_controller.this);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(traceUrlList.size()==0)
|
if(traceUrlList.size()==0)
|
||||||
{
|
{
|
||||||
searchbar.setText("https://genesis.onion/");
|
searchbar.setText("https://genesis.onion/");
|
||||||
}
|
}
|
||||||
|
checkSSLTextColor();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadGeckoUrl(String url)
|
@Override
|
||||||
|
public void onBackPressed()
|
||||||
{
|
{
|
||||||
session1.close();
|
backPressed();
|
||||||
session1 = new GeckoSession();
|
|
||||||
session1.open(runtime1);
|
|
||||||
session1.setProgressDelegate(new application_controller.progressDelegate());
|
|
||||||
webLoader.releaseSession();
|
|
||||||
webLoader.setSession(session1);
|
|
||||||
session1.loadUri(url);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onEditorClicked(TextView v, int actionId, KeyEvent event)
|
public boolean onEditorClicked(TextView v, int actionId, KeyEvent event)
|
||||||
{
|
{
|
||||||
|
KeyboardUtils.hideKeyboard(application_controller.this);
|
||||||
|
Log.i("FUCKOFF : ",actionId+"");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
session1.stop();
|
session1.stop();
|
||||||
|
@ -570,21 +820,34 @@ class progressDelegate implements GeckoSession.ProgressDelegate
|
||||||
|
|
||||||
boolean isUrlValid = Patterns.WEB_URL.matcher(url).matches();
|
boolean isUrlValid = Patterns.WEB_URL.matcher(url).matches();
|
||||||
|
|
||||||
|
url = url.replace("genesis.onion","boogle.store");
|
||||||
URL host = new URL(url);
|
URL host = new URL(url);
|
||||||
if(isUrlValid && host.getHost().replace("www.","").contains("."))
|
if(isUrlValid && host.getHost().replace("www.","").contains("."))
|
||||||
{
|
{
|
||||||
if(host.getHost().contains(constants.backendUrlHost)||host.getHost().contains(constants.frontEndUrlHost))
|
if(host.getHost().contains(constants.backendUrlHost)||host.getHost().contains(constants.frontEndUrlHost))
|
||||||
{
|
{
|
||||||
loadURLAnimate(v.getText().toString());
|
floatingButton.animate().alpha(0);
|
||||||
|
loadURLAnimate(url);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if(host.getHost().contains(constants.allowedHost))
|
else if(host.getHost().contains(constants.allowedHost))
|
||||||
{
|
{
|
||||||
if(!orbot_manager.getInstance().reinitOrbot(this))
|
if(!url.contains("://boogle.store"))
|
||||||
|
{
|
||||||
|
orbot_manager.getInstance().reinitOrbot(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(status.isTorInitialized)
|
||||||
{
|
{
|
||||||
session1.stop();
|
session1.stop();
|
||||||
session1.loadUri(url);
|
session1.loadUri(url);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
orbot_manager.getInstance().reinitOrbot(application_controller.this);
|
||||||
|
message_manager.getInstance().startingOrbotInfo(this);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -597,7 +860,6 @@ class progressDelegate implements GeckoSession.ProgressDelegate
|
||||||
{
|
{
|
||||||
loadURLAnimate("https://boogle.store/search?q="+v.getText().toString().replaceAll(" ","+")+"&p_num=1&s_type=all");
|
loadURLAnimate("https://boogle.store/search?q="+v.getText().toString().replaceAll(" ","+")+"&p_num=1&s_type=all");
|
||||||
}
|
}
|
||||||
orbot_manager.getInstance().reinitOrbot(this);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (IOException e)
|
catch (IOException e)
|
||||||
|
|
|
@ -1,8 +1,15 @@
|
||||||
package com.darkweb.genesissearchengine;
|
package com.darkweb.genesissearchengine;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
|
import android.content.pm.PackageInfo;
|
||||||
|
import android.content.pm.PackageManager;
|
||||||
import android.net.ConnectivityManager;
|
import android.net.ConnectivityManager;
|
||||||
import android.net.NetworkInfo;
|
import android.net.NetworkInfo;
|
||||||
|
import android.preference.PreferenceManager;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
public class helperMethod
|
public class helperMethod
|
||||||
{
|
{
|
||||||
|
@ -17,4 +24,37 @@ public class helperMethod
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean readPrefs(String valueKey,Context applicationContext) {
|
||||||
|
SharedPreferences prefs = PreferenceManager
|
||||||
|
.getDefaultSharedPreferences(applicationContext);
|
||||||
|
return prefs.getBoolean(valueKey,false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void savePrefs(String valueKey, boolean value,Context applicationContext) {
|
||||||
|
SharedPreferences prefs = PreferenceManager
|
||||||
|
.getDefaultSharedPreferences(applicationContext);
|
||||||
|
SharedPreferences.Editor edit = prefs.edit();
|
||||||
|
edit.putBoolean(valueKey, value);
|
||||||
|
edit.commit();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setPlaystoreStatus(Context context) {
|
||||||
|
|
||||||
|
String GooglePlayStorePackageNameOld = "com.google.market";
|
||||||
|
String GooglePlayStorePackageNameNew = "com.android.vending";
|
||||||
|
|
||||||
|
PackageManager packageManager = context.getPackageManager();
|
||||||
|
List<PackageInfo> packages = packageManager.getInstalledPackages(PackageManager.GET_UNINSTALLED_PACKAGES);
|
||||||
|
|
||||||
|
for (PackageInfo packageInfo : packages)
|
||||||
|
{
|
||||||
|
if (packageInfo.packageName.equals(GooglePlayStorePackageNameOld) ||
|
||||||
|
packageInfo.packageName.equals(GooglePlayStorePackageNameNew)) {
|
||||||
|
status.isPlayStoreInstalled = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,9 @@
|
||||||
package com.darkweb.genesissearchengine;
|
package com.darkweb.genesissearchengine;
|
||||||
|
|
||||||
|
import android.app.Application;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.graphics.Color;
|
||||||
import android.net.Uri;
|
import com.crowdfire.cfalertdialog.CFAlertDialog;
|
||||||
import android.view.View;
|
|
||||||
import com.example.myapplication.R;
|
|
||||||
import com.yarolegovich.lovelydialog.LovelyInfoDialog;
|
|
||||||
import com.yarolegovich.lovelydialog.LovelyStandardDialog;
|
|
||||||
|
|
||||||
public class message_manager {
|
public class message_manager {
|
||||||
private static final message_manager ourInstance = new message_manager();
|
private static final message_manager ourInstance = new message_manager();
|
||||||
|
@ -18,38 +15,166 @@ public class message_manager {
|
||||||
private message_manager() {
|
private message_manager() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void welcomeMessage(Context application_context, application_controller controller)
|
||||||
|
{
|
||||||
|
if(!helperMethod.readPrefs("FirstTimeLoaded",application_context))
|
||||||
|
{
|
||||||
|
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
|
||||||
|
.setDialogStyle(CFAlertDialog.CFAlertStyle.ALERT)
|
||||||
|
.setTitle("DeepWeb Gateway | Welcome")
|
||||||
|
.setBackgroundColor(Color.argb(230,33,45,69))
|
||||||
|
.setTextColor(Color.argb(255,0,38,77))
|
||||||
|
.setMessage("\nWelcome to DeepWeb | Darkweb Gateway. This application provide you a platform to Search and Open DarkWeb urls.\n\nYou cannot open any url related to normal internet as its not the intended purpose. You can check out following urls to get yourself started\n\nHere are few Suggestions\n")
|
||||||
|
|
||||||
|
.addButton("DeepWeb Online Market", -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED , (dialog, which) -> {
|
||||||
|
dialog.dismiss();
|
||||||
|
controller.initializePopupView("https://boogle.store/search?q=black+market&p_num=1&s_type=all");
|
||||||
|
controller.loadURLAnimate("https://boogle.store/search?q=black+market&p_num=1&s_type=all");
|
||||||
|
})
|
||||||
|
.addButton("Leaked Documents and Books", -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED , (dialog, which) -> {
|
||||||
|
dialog.dismiss();
|
||||||
|
controller.initializePopupView("https://boogle.store/search?q=leaked+document&p_num=1&s_type=all&p_num=1&s_type=all");
|
||||||
|
controller.loadURLAnimate("https://boogle.store/search?q=leaked+document&p_num=1&s_type=all&p_num=1&s_type=all");
|
||||||
|
})
|
||||||
|
.addButton("Darkweb News and Articles", -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED , (dialog, which) -> {
|
||||||
|
dialog.dismiss();
|
||||||
|
controller.initializePopupView("https://boogle.store/search?q=latest%20news&p_num=1&s_type=news");
|
||||||
|
controller.loadURLAnimate("https://boogle.store/search?q=latest%20news&p_num=1&s_type=news");
|
||||||
|
})
|
||||||
|
.addButton("Secret Softwares and Hacking Tools", -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED , (dialog, which) -> {
|
||||||
|
dialog.dismiss();
|
||||||
|
controller.initializePopupView("https://boogle.store/search?q=softwares+tools&p_num=1&s_type=all&p_num=1&s_type=all");
|
||||||
|
controller.loadURLAnimate("https://boogle.store/search?q=softwares+tools&p_num=1&s_type=all&p_num=1&s_type=all");
|
||||||
|
})
|
||||||
|
.addButton("Don't Show Again", -1, -1, CFAlertDialog.CFAlertActionStyle.NEGATIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED , (dialog, which) -> {
|
||||||
|
dialog.dismiss();
|
||||||
|
helperMethod.savePrefs("FirstTimeLoaded",true,application_context);
|
||||||
|
});
|
||||||
|
builder.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Create Alert using Builder
|
||||||
|
/*
|
||||||
|
new LovelyStandardDialog(application_context)
|
||||||
|
.setTopColorRes(R.color.header)
|
||||||
|
.setTopTitleColor(Color.argb(255,255,255,255))
|
||||||
|
.setTopTitle("Welcome")
|
||||||
|
.setMessage("This software can only be used to access hidden web such as \"Onion\" and \"I2P\" \n\nFor accessing Surface Web use Google or Bing")
|
||||||
|
.setPositiveButton(android.R.string.ok, new View.OnClickListener() {
|
||||||
|
@Override/
|
||||||
|
public void onClick(View v)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.setNegativeButton("Don't Show Again", null)
|
||||||
|
.show();*/
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void baseURLError(Context application_context)
|
public void baseURLError(Context application_context)
|
||||||
{
|
{
|
||||||
new LovelyInfoDialog(application_context)
|
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
|
||||||
.setTopColorRes(R.color.header)
|
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
|
||||||
.setIcon(R.drawable.logo)
|
.setTitle("Darkweb URL | Invalid URL")
|
||||||
.setTitle("Surface Web URL Not Allowed")
|
.setBackgroundColor(Color.argb(230,33,45,69))
|
||||||
.setMessage("This software can only be used to search hidden web such as \"Onion\" and \"I2P\" for searching in Surface Web use \"Google\" or \"Bing\"")
|
.setTextColor(Color.argb(255,255,255,255))
|
||||||
.show();
|
.setMessage("This software can only be used to access hidden web such as \"Onion\" and \"I2P\" \n\nFor accessing Surface Web use Google or Bing\n")
|
||||||
|
.addButton("Dismiss", -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.END, (dialog, which) -> {
|
||||||
|
dialog.dismiss();
|
||||||
|
});
|
||||||
|
|
||||||
|
builder.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void illegalWarningDialog(Context application_context,application_controller controller)
|
||||||
|
{
|
||||||
|
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
|
||||||
|
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
|
||||||
|
.setTitle("Illegal Activity Detected")
|
||||||
|
.setBackgroundColor(Color.argb(255,33,45,69))
|
||||||
|
.setTextColor(Color.argb(255,255,255,255))
|
||||||
|
.setMessage("This software can only be used to access hidden web such as \"Onion\" and \"I2P\" \n\nFor accessing Surface Web use Google or Bing\n")
|
||||||
|
.addButton("Go Back", -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.END, (dialog, which) -> {
|
||||||
|
dialog.dismiss();
|
||||||
|
})
|
||||||
|
.addButton("Dismiss", -1, -1, CFAlertDialog.CFAlertActionStyle.NEGATIVE, CFAlertDialog.CFAlertActionAlignment.END, (dialog, which) -> {
|
||||||
|
dialog.dismiss();
|
||||||
|
controller.backPressed();
|
||||||
|
});
|
||||||
|
|
||||||
|
builder.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void URLNotFoundError(Context application_context)
|
public void URLNotFoundError(Context application_context)
|
||||||
{
|
{
|
||||||
new LovelyInfoDialog(application_context)
|
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
|
||||||
.setTopColorRes(R.color.header)
|
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
|
||||||
.setIcon(R.drawable.logo)
|
.setTitle("Darkweb URL | Invalid")
|
||||||
.setTitle("URL Temporarily Unavailable")
|
.setBackgroundColor(Color.argb(230,33,45,69))
|
||||||
.setMessage("Site is Down or temporarily Unavailabe. Try again after a while")
|
.setTextColor(Color.argb(255,255,255,255))
|
||||||
.show();
|
.setMessage("This software can only be used to access hidden web such as \"Onion\" and \"I2P\" \n\nFor accessing Surface Web use Google or Bing\n")
|
||||||
|
.addButton("Dismiss", -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.END, (dialog, which) -> {
|
||||||
|
dialog.dismiss();
|
||||||
|
});
|
||||||
|
|
||||||
|
builder.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void reportedSuccessfully(Context application_context)
|
||||||
|
{
|
||||||
|
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
|
||||||
|
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
|
||||||
|
.setTitle("URL Reported Successfully")
|
||||||
|
.setBackgroundColor(Color.argb(230,33,45,69))
|
||||||
|
.setTextColor(Color.argb(255,255,255,255))
|
||||||
|
.setMessage("URL has been succuessfully repotorted. It will take about a week to completely remove this website from our server\n")
|
||||||
|
.addButton("Dismiss", -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
|
||||||
|
dialog.dismiss();
|
||||||
|
});
|
||||||
|
|
||||||
|
builder.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void reportURL(Context application_context,String URL)
|
||||||
|
{
|
||||||
|
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
|
||||||
|
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
|
||||||
|
.setTitle("Report URL | "+status.currentURL.substring(0,status.currentURL.indexOf(".onion")))
|
||||||
|
.setBackgroundColor(Color.argb(230,33,45,69))
|
||||||
|
.setTextColor(Color.argb(255,255,255,255))
|
||||||
|
.setMessage("If you think url is illegal or disturbing report us so that we can update our database\n")
|
||||||
|
.addButton("Report", -1, -1, CFAlertDialog.CFAlertActionStyle.NEGATIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
|
||||||
|
|
||||||
|
String reportURL = "https://boogle.store/reportus?r_key="+URL;
|
||||||
|
webRequestHandler.getInstance().reportURL(reportURL);
|
||||||
|
dialog.dismiss();
|
||||||
|
reportedSuccessfully(application_context);
|
||||||
|
})
|
||||||
|
.addButton("Dismiss", -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
|
||||||
|
dialog.dismiss();
|
||||||
|
});
|
||||||
|
|
||||||
|
builder.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void startingOrbotInfo(Context application_context)
|
public void startingOrbotInfo(Context application_context)
|
||||||
{
|
{
|
||||||
new LovelyInfoDialog(application_context)
|
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
|
||||||
.setTopColorRes(R.color.header)
|
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
|
||||||
.setIcon(R.drawable.logo)
|
.setTitle("Initializing Darkweb")
|
||||||
.setTitle("Orbot is Starting")
|
.setBackgroundColor(Color.argb(230,33,45,69))
|
||||||
.setMessage("Looks Like Orbot is Installed but not Running. Please wait while we Start Orbot for you")
|
.setTextColor(Color.argb(255,255,255,255))
|
||||||
.show();
|
.setMessage("Please wait! While we connect you to hidden web. This might take few seconds\n")
|
||||||
|
.addButton("Dismiss", -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.END, (dialog, which) -> {
|
||||||
|
dialog.dismiss();
|
||||||
|
});
|
||||||
|
|
||||||
|
builder.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void versionWarning(Context application_context)
|
public void versionWarning(Context application_context)
|
||||||
{
|
{/*
|
||||||
new LovelyStandardDialog(application_context)
|
new LovelyStandardDialog(application_context)
|
||||||
.setTopColorRes(R.color.header)
|
.setTopColorRes(R.color.header)
|
||||||
.setIcon(R.drawable.logo)
|
.setIcon(R.drawable.logo)
|
||||||
|
@ -67,7 +192,7 @@ public class message_manager {
|
||||||
})
|
})
|
||||||
.setNegativeButton(android.R.string.no, null)
|
.setNegativeButton(android.R.string.no, null)
|
||||||
.show();
|
.show();
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
package com.darkweb.genesissearchengine;
|
package com.darkweb.genesissearchengine;
|
||||||
|
|
||||||
import android.content.BroadcastReceiver;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.util.Log;
|
||||||
import android.net.Uri;
|
import com.msopentech.thali.android.toronionproxy.AndroidOnionProxyManager;
|
||||||
import android.text.TextUtils;
|
import com.msopentech.thali.toronionproxy.OnionProxyManager;
|
||||||
import android.view.View;
|
import org.mozilla.gecko.PrefsHelper;
|
||||||
import com.example.myapplication.R;
|
|
||||||
import com.yarolegovich.lovelydialog.LovelyStandardDialog;
|
import java.io.IOException;
|
||||||
import info.guardianproject.netcipher.proxy.OrbotHelper;
|
|
||||||
|
|
||||||
public class orbot_manager {
|
public class orbot_manager {
|
||||||
private static final orbot_manager ourInstance = new orbot_manager();
|
private static final orbot_manager ourInstance = new orbot_manager();
|
||||||
boolean isOrbotRunning = false;
|
boolean isOrbotRunning = false;
|
||||||
|
boolean isLoading = false;
|
||||||
|
OnionProxyManager onionProxyManager = null;
|
||||||
|
|
||||||
public static orbot_manager getInstance() {
|
public static orbot_manager getInstance() {
|
||||||
return ourInstance;
|
return ourInstance;
|
||||||
|
@ -21,62 +21,118 @@ public class orbot_manager {
|
||||||
private orbot_manager() {
|
private orbot_manager() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public BroadcastReceiver orbotStatusReceiver = new BroadcastReceiver() {
|
|
||||||
@Override
|
|
||||||
public void onReceive(Context context, Intent intent) {
|
|
||||||
if (TextUtils.equals(intent.getAction(),
|
|
||||||
OrbotHelper.ACTION_STATUS)) {
|
|
||||||
String status = intent.getStringExtra(OrbotHelper.EXTRA_STATUS);
|
|
||||||
if (status.equals(OrbotHelper.STATUS_ON))
|
|
||||||
{
|
|
||||||
isOrbotRunning = true;
|
|
||||||
}
|
|
||||||
else if (status.equals(OrbotHelper.STATUS_OFF))
|
|
||||||
{
|
|
||||||
isOrbotRunning = false;
|
|
||||||
}
|
|
||||||
else if (status.equals(OrbotHelper.STATUS_STARTING))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
else if (status.equals(OrbotHelper.STATUS_STOPPING))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
public boolean reinitOrbot(Context application_context)
|
public boolean reinitOrbot(Context application_context)
|
||||||
{
|
{
|
||||||
if(!OrbotHelper.isOrbotInstalled(application_context))
|
if(!status.isTorInitialized)
|
||||||
{
|
{
|
||||||
OrbotHelper.getOrbotInstallIntent(application_context);
|
|
||||||
new LovelyStandardDialog(application_context)
|
|
||||||
.setTopColorRes(R.color.header)
|
|
||||||
.setIcon(R.drawable.logo)
|
|
||||||
.setTitle("Orbot Proxy Not Installed")
|
|
||||||
.setMessage("Hidden Web can only be access by Special Proxies. Please Install Orbot Proxy from Playstore")
|
|
||||||
.setPositiveButton(android.R.string.ok, new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
final String appPackageName = "org.torproject.android"; // getPackageName() from Context or Activity object
|
|
||||||
try {
|
|
||||||
application_context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appPackageName)));
|
|
||||||
} catch (android.content.ActivityNotFoundException anfe) {
|
|
||||||
application_context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + appPackageName)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.setNegativeButton(android.R.string.no, null)
|
|
||||||
.show();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if(!isOrbotRunning)
|
|
||||||
{
|
|
||||||
OrbotHelper.get(application_context).init();
|
|
||||||
message_manager.getInstance().startingOrbotInfo(application_context);
|
message_manager.getInstance().startingOrbotInfo(application_context);
|
||||||
|
initializeTorClient(application_context);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void restartOrbot(Context applicationContext)
|
||||||
|
{
|
||||||
|
isOrbotRunning = false;
|
||||||
|
status.isTorInitialized = false;
|
||||||
|
if(onionProxyManager!=null)
|
||||||
|
{
|
||||||
|
new Thread()
|
||||||
|
{
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
onionProxyManager.stop();
|
||||||
|
//initializeTorClient(applicationContext);
|
||||||
|
}
|
||||||
|
catch (IOException e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}.start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void initializeTorClient(Context applicationContext)
|
||||||
|
{
|
||||||
|
if(isLoading)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
new Thread()
|
||||||
|
{
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
isLoading = true;
|
||||||
|
String fileStorageLocation = "torfiles";
|
||||||
|
onionProxyManager = new AndroidOnionProxyManager(applicationContext, fileStorageLocation);
|
||||||
|
int totalSecondsPerTorStartup = 4 * 60;
|
||||||
|
int totalTriesPerTorStartup = 5;
|
||||||
|
try {
|
||||||
|
boolean ok = onionProxyManager.startWithRepeat(totalSecondsPerTorStartup, totalTriesPerTorStartup);
|
||||||
|
if (!ok) {
|
||||||
|
Log.i("TorTest", "Couldn't start Tor!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(onionProxyManager.isRunning()) {
|
||||||
|
Log.i("My App", "Tor initialized on port " + onionProxyManager.getIPv4LocalHostSocksPort());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex) {
|
||||||
|
ex.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
while (!onionProxyManager.isRunning())
|
||||||
|
{
|
||||||
|
sleep(1000);
|
||||||
|
}
|
||||||
|
if(onionProxyManager.isRunning())
|
||||||
|
{
|
||||||
|
Log.i("My App", "Tor initialized on port " + onionProxyManager.getIPv4LocalHostSocksPort());
|
||||||
|
status.port = onionProxyManager.getIPv4LocalHostSocksPort();
|
||||||
|
initializeProxy();
|
||||||
|
sleep(1500);
|
||||||
|
status.isTorInitialized = true;
|
||||||
|
}
|
||||||
|
isLoading = false;
|
||||||
|
}
|
||||||
|
catch (InterruptedException e)
|
||||||
|
{
|
||||||
|
isLoading = false;
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (IOException e) {
|
||||||
|
isLoading = false;
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void initializeProxy()
|
||||||
|
{
|
||||||
|
PrefsHelper.setPref("network.proxy.type",1); //manual proxy settings
|
||||||
|
PrefsHelper.setPref("network.proxy.socks","127.0.0.1"); //manual proxy settings
|
||||||
|
PrefsHelper.setPref("network.proxy.socks_port",status.port); //manual proxy settings
|
||||||
|
PrefsHelper.setPref("network.proxy.socks_version",5); //manual proxy settings
|
||||||
|
PrefsHelper.setPref("network.proxy.socks_remote_dns",true); //manual proxy settings
|
||||||
|
PrefsHelper.setPref("browser.cache.disk.enable",false);
|
||||||
|
PrefsHelper.setPref("browser.cache.memory.enable",false);
|
||||||
|
PrefsHelper.setPref("general.useragent.override", "Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20100101 Firefox/17.0");
|
||||||
|
PrefsHelper.setPref("privacy.donottrackheader.enabled",false);
|
||||||
|
PrefsHelper.setPref("privacy.donottrackheader.value",1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,4 +4,7 @@ public class status
|
||||||
{
|
{
|
||||||
public static boolean hasApplicationLoaded = false;
|
public static boolean hasApplicationLoaded = false;
|
||||||
public static String currentURL = "http://boogle.store/";
|
public static String currentURL = "http://boogle.store/";
|
||||||
|
public static boolean isPlayStoreInstalled = false;
|
||||||
|
public static int port = 9150;
|
||||||
|
public static boolean isTorInitialized = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.darkweb.genesissearchengine;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.os.AsyncTask;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.support.constraint.ConstraintLayout;
|
import android.support.constraint.ConstraintLayout;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
@ -10,6 +11,7 @@ import android.webkit.WebView;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
|
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
@ -17,17 +19,22 @@ import java.io.InputStreamReader;
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLConnection;
|
import java.net.URLConnection;
|
||||||
|
import java.security.KeyManagementException;
|
||||||
|
import java.security.KeyStoreException;
|
||||||
|
import java.security.NoSuchAlgorithmException;
|
||||||
|
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import cz.msebera.android.httpclient.HttpResponse;
|
import cz.msebera.android.httpclient.HttpResponse;
|
||||||
import cz.msebera.android.httpclient.client.HttpClient;
|
import cz.msebera.android.httpclient.client.HttpClient;
|
||||||
import cz.msebera.android.httpclient.client.methods.HttpGet;
|
import cz.msebera.android.httpclient.client.methods.HttpGet;
|
||||||
|
import cz.msebera.android.httpclient.conn.ssl.NoopHostnameVerifier;
|
||||||
|
import cz.msebera.android.httpclient.conn.ssl.SSLConnectionSocketFactory;
|
||||||
|
import cz.msebera.android.httpclient.conn.ssl.TrustSelfSignedStrategy;
|
||||||
import cz.msebera.android.httpclient.impl.client.DefaultHttpClient;
|
import cz.msebera.android.httpclient.impl.client.DefaultHttpClient;
|
||||||
import info.guardianproject.netcipher.NetCipher;
|
import cz.msebera.android.httpclient.impl.client.HttpClients;
|
||||||
import info.guardianproject.netcipher.client.StrongBuilder;
|
import cz.msebera.android.httpclient.ssl.SSLContexts;
|
||||||
import info.guardianproject.netcipher.proxy.OrbotHelper;
|
|
||||||
|
|
||||||
public class webRequestHandler implements StrongBuilder.Callback<HttpClient>
|
public class webRequestHandler
|
||||||
{
|
{
|
||||||
private static final webRequestHandler ourInstance = new webRequestHandler();
|
private static final webRequestHandler ourInstance = new webRequestHandler();
|
||||||
private WebView[] view = new WebView[2];
|
private WebView[] view = new WebView[2];
|
||||||
|
@ -35,6 +42,7 @@ public class webRequestHandler implements StrongBuilder.Callback<HttpClient>
|
||||||
private EditText searchbar;
|
private EditText searchbar;
|
||||||
private ConstraintLayout requestFailure;
|
private ConstraintLayout requestFailure;
|
||||||
|
|
||||||
|
public boolean reloadError=false;
|
||||||
public boolean isReloadedUrl = false;
|
public boolean isReloadedUrl = false;
|
||||||
private int viewIndex = 1;
|
private int viewIndex = 1;
|
||||||
private int currentViewIndex = 0;
|
private int currentViewIndex = 0;
|
||||||
|
@ -49,6 +57,7 @@ public class webRequestHandler implements StrongBuilder.Callback<HttpClient>
|
||||||
private final static int INTERNET_ERROR =2;
|
private final static int INTERNET_ERROR =2;
|
||||||
private final static int MESSAGE_UPDATE_TEXT_CHILD_THREAD =1;
|
private final static int MESSAGE_UPDATE_TEXT_CHILD_THREAD =1;
|
||||||
private final static int RELOAD_ERROR =3;
|
private final static int RELOAD_ERROR =3;
|
||||||
|
private application_controller controller;
|
||||||
|
|
||||||
public static webRequestHandler getInstance() {
|
public static webRequestHandler getInstance() {
|
||||||
return ourInstance;
|
return ourInstance;
|
||||||
|
@ -58,33 +67,34 @@ public class webRequestHandler implements StrongBuilder.Callback<HttpClient>
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initialization(WebView view1, WebView view2, ProgressBar progressBar, EditText searchbar, ConstraintLayout requestFailure, Context applicationContext,ConstraintLayout splash)
|
public void initialization(WebView view1, WebView view2, ProgressBar progressBar, EditText searchbar, ConstraintLayout requestFailure, Context applicationContext,ConstraintLayout splash,application_controller controller)
|
||||||
{
|
{
|
||||||
|
this.controller = controller;
|
||||||
this.splash = splash;
|
this.splash = splash;
|
||||||
this.view[0] = view1;
|
this.view[0] = view1;
|
||||||
this.view[1] = view2;
|
this.view[1] = view2;
|
||||||
this.progressBar = progressBar;
|
this.progressBar = progressBar;
|
||||||
this.searchbar = searchbar;
|
this.searchbar = searchbar;
|
||||||
this.requestFailure = requestFailure;
|
this.requestFailure = requestFailure;
|
||||||
OrbotHelper.get(applicationContext).init();
|
|
||||||
createUpdateUiHandler();
|
createUpdateUiHandler();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadURL(final String url)
|
public void loadURL(final String url)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Log.i("STEST : 1","1 : " + currenturl.equals(url) + " : " + isReloadedUrl + " : " + !reloadError);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Log.i("WOW MAN 0","WOW MAN 2 : " + currenturl + "----" + url);
|
if(!currenturl.equals(url) || isReloadedUrl || !reloadError)
|
||||||
if(!currenturl.equals(url) || isReloadedUrl)
|
|
||||||
{
|
{
|
||||||
Log.i("WOW MAN 1","WOW MAN 2");
|
Log.i("STEST : 2","1");
|
||||||
isReloadedUrl = false;
|
isReloadedUrl = false;
|
||||||
currenturl = url;
|
|
||||||
preInitialization(url);
|
preInitialization(url);
|
||||||
|
currenturl = url;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Log.i("STEST : 3","1");
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = RELOAD_ERROR;
|
message.what = RELOAD_ERROR;
|
||||||
updateUIHandler.sendMessage(message);
|
updateUIHandler.sendMessage(message);
|
||||||
|
@ -93,28 +103,34 @@ public class webRequestHandler implements StrongBuilder.Callback<HttpClient>
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
Log.i("STEST : 4","1 : " + e.getMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
clientThread = new Thread(() -> {
|
clientThread = new Thread(() -> {
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
Log.i("STEST : 5","1");
|
||||||
currenturl = url;
|
currenturl = url;
|
||||||
if(url.contains("boogle.store"))
|
if(url.contains("boogle.store"))
|
||||||
{
|
{
|
||||||
|
Log.i("STEST : 6","1");
|
||||||
nonProxyConnection(url);
|
nonProxyConnection(url);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Log.i("STEST : 7","1");
|
||||||
proxyConnection(url);
|
proxyConnection(url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
if(!e.getMessage().contains("failed to respond"))
|
Log.i("STEST : 8","1");
|
||||||
|
if(!e.getMessage().contains("Socket closed") && !e.getMessage().contains("failed to respond") && e.getMessage().contains("Unable to resolve host \"boogle.store\""))
|
||||||
{
|
{
|
||||||
Log.i("SUP3",e.getMessage()+"");
|
Log.i("STEST99 : 9","1 : "+e.getMessage());
|
||||||
onError();
|
onError();
|
||||||
|
reloadError=true;
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -124,6 +140,12 @@ public class webRequestHandler implements StrongBuilder.Callback<HttpClient>
|
||||||
|
|
||||||
public void preInitialization(String url)
|
public void preInitialization(String url)
|
||||||
{
|
{
|
||||||
|
Log.i("WOW MAN 0","WOW MAN 2 : " + currenturl + "----" + url);
|
||||||
|
progressBar.setAlpha(0);
|
||||||
|
progressBar.setVisibility(View.VISIBLE);
|
||||||
|
progressBar.animate().setDuration(150).alpha(1f);
|
||||||
|
Log.i("WOW MAN 1","WOW MAN 2 : " + currenturl + "----" + url);
|
||||||
|
|
||||||
if(!datamodel.getInstance().getIsLoadingURL())
|
if(!datamodel.getInstance().getIsLoadingURL())
|
||||||
{
|
{
|
||||||
datamodel.getInstance().setIsLoadingURL(true);
|
datamodel.getInstance().setIsLoadingURL(true);
|
||||||
|
@ -137,16 +159,25 @@ public class webRequestHandler implements StrongBuilder.Callback<HttpClient>
|
||||||
clientThread = null;
|
clientThread = null;
|
||||||
searchbar.setText(url.replace("http://boogle.store","http://genesis.onion"));
|
searchbar.setText(url.replace("http://boogle.store","http://genesis.onion"));
|
||||||
}
|
}
|
||||||
progressBar.animate().setDuration(150).alpha(0f);
|
|
||||||
progressBar.setVisibility(View.VISIBLE);
|
|
||||||
progressBar.animate().setDuration(150).alpha(1f);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void nonProxyConnection(String url) throws IOException {
|
public void nonProxyConnection(String url) throws IOException {
|
||||||
url = url.replace("http://boogle","https://boogle");
|
url = url.replace("http://boogle","https://boogle");
|
||||||
|
HttpClient client=new DefaultHttpClient();;
|
||||||
|
try {
|
||||||
|
SSLConnectionSocketFactory scsf = new SSLConnectionSocketFactory(
|
||||||
|
SSLContexts.custom().loadTrustMaterial(null, new TrustSelfSignedStrategy()).build(),
|
||||||
|
NoopHostnameVerifier.INSTANCE);
|
||||||
|
client = HttpClients.custom().setSSLSocketFactory(scsf).build();
|
||||||
|
|
||||||
|
} catch (NoSuchAlgorithmException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (KeyManagementException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (KeyStoreException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
HttpClient client = new DefaultHttpClient();
|
|
||||||
request = new HttpGet(url);
|
request = new HttpGet(url);
|
||||||
baseURL = url;
|
baseURL = url;
|
||||||
HttpResponse response = client.execute(request);
|
HttpResponse response = client.execute(request);
|
||||||
|
@ -168,33 +199,40 @@ public class webRequestHandler implements StrongBuilder.Callback<HttpClient>
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void proxyConnection(String url) throws Exception {
|
public void reportURL(String url)
|
||||||
NetCipher.useTor();
|
{
|
||||||
HttpURLConnection connection = NetCipher.getHttpURLConnection(url);
|
try
|
||||||
connection.setRequestProperty("User-Agent","Mozilla/5.0 ( compatible ) ");
|
{
|
||||||
connection.setRequestProperty("Accept","*/*");
|
HttpGet reportrequest = new HttpGet(url);
|
||||||
connection.connect();
|
HttpClient client=new DefaultHttpClient();;
|
||||||
|
HttpResponse response = client.execute(reportrequest);
|
||||||
BufferedReader br = new BufferedReader(new InputStreamReader((connection.getInputStream())));
|
}
|
||||||
StringBuilder sb = new StringBuilder();
|
catch (Exception ex)
|
||||||
String output;
|
{
|
||||||
while ((output = br.readLine()) != null) {
|
ex.printStackTrace();
|
||||||
sb.append(output);
|
}
|
||||||
}
|
}
|
||||||
html = sb.toString();
|
|
||||||
|
|
||||||
Message message = new Message();
|
public void proxyConnection(String url) throws Exception {
|
||||||
message.what = MESSAGE_UPDATE_TEXT_CHILD_THREAD;
|
|
||||||
updateUIHandler.sendMessage(message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onError()
|
public void onError()
|
||||||
{
|
{
|
||||||
|
Log.i("WOW222","WOW222 : " + isReloadedUrl);
|
||||||
|
reloadError = true;
|
||||||
if(!isReloadedUrl)
|
if(!isReloadedUrl)
|
||||||
{
|
{
|
||||||
Message message = new Message();
|
Message message = new Message();
|
||||||
message.what = INTERNET_ERROR;
|
message.what = INTERNET_ERROR;
|
||||||
updateUIHandler.sendMessage(message);
|
updateUIHandler.sendMessage(message);
|
||||||
|
Log.i("WOW222","WOW333 : " + isReloadedUrl);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Log.i("SUSHIT5","5");
|
||||||
|
Message message = new Message();
|
||||||
|
message.what = RELOAD_ERROR;
|
||||||
|
updateUIHandler.sendMessage(message);
|
||||||
}
|
}
|
||||||
isReloadedUrl = false;
|
isReloadedUrl = false;
|
||||||
}
|
}
|
||||||
|
@ -211,9 +249,11 @@ public class webRequestHandler implements StrongBuilder.Callback<HttpClient>
|
||||||
public void handleMessage(Message msg) {
|
public void handleMessage(Message msg) {
|
||||||
if(msg.what == MESSAGE_UPDATE_TEXT_CHILD_THREAD)
|
if(msg.what == MESSAGE_UPDATE_TEXT_CHILD_THREAD)
|
||||||
{
|
{
|
||||||
view[viewIndex].animate().setDuration(0).alpha(0f);
|
reloadError = false;
|
||||||
|
view[viewIndex].setAlpha(0);
|
||||||
view[viewIndex].bringToFront();
|
view[viewIndex].bringToFront();
|
||||||
view[viewIndex].loadDataWithBaseURL(baseURL,html, "text/html", "utf-8", null);
|
view[viewIndex].loadDataWithBaseURL(baseURL,html, "text/html", "utf-8", null);
|
||||||
|
//view[currentViewIndex].animate().alpha(1);
|
||||||
|
|
||||||
if(viewIndex==1)
|
if(viewIndex==1)
|
||||||
{
|
{
|
||||||
|
@ -225,24 +265,34 @@ public class webRequestHandler implements StrongBuilder.Callback<HttpClient>
|
||||||
viewIndex = 1;
|
viewIndex = 1;
|
||||||
currentViewIndex=0;
|
currentViewIndex=0;
|
||||||
}
|
}
|
||||||
view[currentViewIndex].animate().setDuration(0).alpha(0f).withEndAction((() -> {
|
//view[currentViewIndex].animate().setDuration(0).alpha(0f).withEndAction((() -> {
|
||||||
}));
|
//}));
|
||||||
}
|
}
|
||||||
else if (msg.what == INTERNET_ERROR)
|
else if (msg.what == INTERNET_ERROR)
|
||||||
{
|
{
|
||||||
splash.animate().setStartDelay(2000).alpha(0);
|
splash.animate().setStartDelay(2000).alpha(0);
|
||||||
datamodel.getInstance().setIsLoadingURL(false);
|
datamodel.getInstance().setIsLoadingURL(false);
|
||||||
|
Log.i("PROBLEM28","");
|
||||||
progressBar.animate().setDuration(150).alpha(0f);
|
progressBar.animate().setDuration(150).alpha(0f);
|
||||||
requestFailure.setVisibility(View.VISIBLE);
|
requestFailure.setVisibility(View.VISIBLE);
|
||||||
requestFailure.animate().alpha(1f).setDuration(300).withEndAction((() -> {
|
requestFailure.animate().alpha(1f).setDuration(300).withEndAction((() -> {
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
if(!helperMethod.isNetworkAvailable(controller))
|
||||||
|
{
|
||||||
|
orbot_manager.getInstance().restartOrbot(controller);
|
||||||
|
}
|
||||||
|
|
||||||
|
Log.i("SUSHIT2","2");
|
||||||
}
|
}
|
||||||
else if (msg.what == RELOAD_ERROR)
|
else if (msg.what == RELOAD_ERROR)
|
||||||
{
|
{
|
||||||
|
Log.i("SUSHIT1","1");
|
||||||
Handler handler = new Handler();
|
Handler handler = new Handler();
|
||||||
handler.postDelayed(new Runnable() {
|
handler.postDelayed(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
Log.i("PROBLEM29","");
|
||||||
progressBar.animate().setDuration(150).alpha(0f);
|
progressBar.animate().setDuration(150).alpha(0f);
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
@ -253,25 +303,6 @@ public class webRequestHandler implements StrongBuilder.Callback<HttpClient>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onConnected(HttpClient httpClient) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onConnectionException(Exception e) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onTimeout() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onInvalid() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void getVersion(Context applicationContext)
|
public void getVersion(Context applicationContext)
|
||||||
{
|
{
|
||||||
new Thread()
|
new Thread()
|
||||||
|
@ -304,4 +335,9 @@ public class webRequestHandler implements StrongBuilder.Callback<HttpClient>
|
||||||
|
|
||||||
}.start();
|
}.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****--------------------ASYNC TASK--------------------******/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<gradient
|
<gradient
|
||||||
android:startColor="#0066ff"
|
android:startColor="#141e30"
|
||||||
android:endColor="#4d94ff"
|
android:endColor="#004e92"
|
||||||
android:angle="90"
|
android:angle="135"
|
||||||
/>
|
/>
|
||||||
</shape>
|
</shape>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<gradient
|
||||||
|
android:startColor="#000000"
|
||||||
|
android:endColor="#000000"
|
||||||
|
android:angle="90"
|
||||||
|
/>
|
||||||
|
</shape>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<gradient
|
||||||
|
android:startColor="#ffffff"
|
||||||
|
android:endColor="#ffffff"
|
||||||
|
android:angle="90"
|
||||||
|
/>
|
||||||
|
</shape>
|
After Width: | Height: | Size: 436 B |
After Width: | Height: | Size: 366 B |
After Width: | Height: | Size: 734 B |
After Width: | Height: | Size: 3.0 KiB |
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:drawable="@drawable/lock"
|
||||||
|
android:width="26dp"
|
||||||
|
android:height="16dp"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</layer-list >
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.1 KiB |
|
@ -62,7 +62,7 @@
|
||||||
app:layout_constraintTop_toTopOf="parent" android:layout_marginTop="74dp"
|
app:layout_constraintTop_toTopOf="parent" android:layout_marginTop="74dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent" tools:ignore="TextViewEdits"/>
|
app:layout_constraintEnd_toEndOf="parent" tools:ignore="TextViewEdits"/>
|
||||||
<Button
|
<Button
|
||||||
android:text="Reload"
|
android:text="@string/reload"
|
||||||
android:onClick="onReloadButtonPressed"
|
android:onClick="onReloadButtonPressed"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
android:layout_marginBottom="36dp" app:layout_constraintStart_toStartOf="parent"
|
android:layout_marginBottom="36dp" app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.498" app:layout_constraintEnd_toEndOf="parent"/>
|
app:layout_constraintHorizontal_bias="0.498" app:layout_constraintEnd_toEndOf="parent"/>
|
||||||
<TextView
|
<TextView
|
||||||
android:text="These might be the problems you are facing\n\n\u2022 Webpage or Website might be down\n\u2022 Your Internet connection might be poor\n\u2022 You might be using a proxy\n\u2022 Website might be blocked by firewall"
|
android:text="@string/internetErrorMessage"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/textView"
|
android:id="@+id/textView"
|
||||||
|
@ -93,7 +93,7 @@
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/textView"
|
app:layout_constraintTop_toBottomOf="@+id/textView"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/reloadButton" android:layout_marginBottom="35dp"
|
app:layout_constraintBottom_toTopOf="@+id/reloadButton" android:layout_marginBottom="35dp"
|
||||||
android:layout_marginTop="35dp"/>
|
android:layout_marginTop="35dp" android:contentDescription="@string/todo"/>
|
||||||
</android.support.constraint.ConstraintLayout>
|
</android.support.constraint.ConstraintLayout>
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -108,11 +108,12 @@
|
||||||
android:elevation="10dp"
|
android:elevation="10dp"
|
||||||
android:background="@drawable/border"
|
android:background="@drawable/border"
|
||||||
android:gravity="left" app:layout_constraintTop_toTopOf="parent"
|
android:gravity="left" app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent">
|
app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
tools:ignore="RtlHardcoded,UselessParent">
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:layout_width="35dp"
|
android:layout_width="35dp"
|
||||||
android:layout_height="35dp"
|
android:layout_height="35dp"
|
||||||
android:layout_marginLeft="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:layout_marginTop="10.5dp"
|
android:layout_marginTop="10.5dp"
|
||||||
android:id="@+id/home"
|
android:id="@+id/home"
|
||||||
android:bottomRightRadius="13dp"
|
android:bottomRightRadius="13dp"
|
||||||
|
@ -123,7 +124,7 @@
|
||||||
android:src="@drawable/homeicon"
|
android:src="@drawable/homeicon"
|
||||||
android:onClick="onHomeButtonPressed"
|
android:onClick="onHomeButtonPressed"
|
||||||
android:background="@drawable/pressedcolor"
|
android:background="@drawable/pressedcolor"
|
||||||
/>
|
android:contentDescription="@string/todo"/>
|
||||||
<EditText
|
<EditText
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -131,7 +132,8 @@
|
||||||
android:textColor="#333333"
|
android:textColor="#333333"
|
||||||
android:selectAllOnFocus="true"
|
android:selectAllOnFocus="true"
|
||||||
android:paddingLeft="10dp"
|
android:paddingLeft="10dp"
|
||||||
android:paddingRight="10dp"
|
android:drawableLeft="@drawable/lockstyle"
|
||||||
|
android:paddingRight="15dp"
|
||||||
android:textColorHighlight="#b3d1ff"
|
android:textColorHighlight="#b3d1ff"
|
||||||
android:background="@drawable/searchbar"
|
android:background="@drawable/searchbar"
|
||||||
android:textCursorDrawable="@drawable/cursorcolor"
|
android:textCursorDrawable="@drawable/cursorcolor"
|
||||||
|
@ -144,7 +146,8 @@
|
||||||
android:layout_marginEnd="10dp"
|
android:layout_marginEnd="10dp"
|
||||||
android:layout_marginStart="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:id="@+id/search" android:layout_weight="1" android:importantForAutofill="no"/>
|
android:id="@+id/search" android:layout_weight="1" android:importantForAutofill="no"
|
||||||
|
tools:targetApi="o"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
@ -157,6 +160,7 @@
|
||||||
android:layout_height="108dp"
|
android:layout_height="108dp"
|
||||||
android:indeterminateTint="#0047b3"
|
android:indeterminateTint="#0047b3"
|
||||||
android:id="@+id/progressBar"
|
android:id="@+id/progressBar"
|
||||||
|
android:indeterminateTintMode="src_in"
|
||||||
android:indeterminateOnly="true"
|
android:indeterminateOnly="true"
|
||||||
android:progress="50" app:layout_constraintTop_toTopOf="parent"
|
android:progress="50" app:layout_constraintTop_toTopOf="parent"
|
||||||
/>
|
/>
|
||||||
|
@ -173,12 +177,13 @@
|
||||||
android:id="@+id/imageView_loading_back" app:layout_constraintStart_toStartOf="parent"
|
android:id="@+id/imageView_loading_back" app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:layout_marginBottom="80dp"/>
|
android:layout_marginBottom="80dp" android:contentDescription="@string/todo"/>
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
style="?android:attr/progressBarStyle"
|
style="?android:attr/progressBarStyle"
|
||||||
android:layout_width="95dp"
|
android:layout_width="95dp"
|
||||||
android:layout_height="95dp"
|
android:layout_height="95dp"
|
||||||
android:indeterminateTint="#455265"
|
android:indeterminateTintMode="src_in"
|
||||||
|
android:indeterminateTint="#414e62"
|
||||||
app:layout_constraintStart_toStartOf="parent" app:layout_constraintHorizontal_bias="0.5"
|
app:layout_constraintStart_toStartOf="parent" app:layout_constraintHorizontal_bias="0.5"
|
||||||
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent" android:layout_marginBottom="80dp"/>
|
app:layout_constraintBottom_toBottomOf="parent" android:layout_marginBottom="80dp"/>
|
||||||
|
@ -189,7 +194,7 @@
|
||||||
android:id="@+id/imageView_loading" app:layout_constraintStart_toStartOf="parent"
|
android:id="@+id/imageView_loading" app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:layout_marginBottom="80dp"/>
|
android:layout_marginBottom="80dp" android:contentDescription="@string/todo"/>
|
||||||
<TextView
|
<TextView
|
||||||
android:text="@string/projectName"
|
android:text="@string/projectName"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -214,4 +219,16 @@
|
||||||
</android.support.constraint.ConstraintLayout>
|
</android.support.constraint.ConstraintLayout>
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
<android.support.design.widget.FloatingActionButton
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:src="@drawable/ban"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:alpha="0"
|
||||||
|
app:borderWidth="0dp"
|
||||||
|
app:elevation="10dp"
|
||||||
|
android:backgroundTint="#ffffff"
|
||||||
|
android:clickable="true" app:srcCompat="?attr/actionModeSelectAllDrawable"
|
||||||
|
android:id="@+id/floatingActionButton3" app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent" android:layout_marginBottom="24dp"
|
||||||
|
android:layout_marginEnd="24dp"/>
|
||||||
</android.support.constraint.ConstraintLayout>
|
</android.support.constraint.ConstraintLayout>
|
|
@ -132,7 +132,8 @@
|
||||||
android:textColor="#333333"
|
android:textColor="#333333"
|
||||||
android:selectAllOnFocus="true"
|
android:selectAllOnFocus="true"
|
||||||
android:paddingLeft="10dp"
|
android:paddingLeft="10dp"
|
||||||
android:paddingRight="10dp"
|
android:drawableLeft="@drawable/lockstyle"
|
||||||
|
android:paddingRight="15dp"
|
||||||
android:textColorHighlight="#b3d1ff"
|
android:textColorHighlight="#b3d1ff"
|
||||||
android:background="@drawable/searchbar"
|
android:background="@drawable/searchbar"
|
||||||
android:textCursorDrawable="@drawable/cursorcolor"
|
android:textCursorDrawable="@drawable/cursorcolor"
|
||||||
|
@ -159,6 +160,7 @@
|
||||||
android:layout_height="108dp"
|
android:layout_height="108dp"
|
||||||
android:indeterminateTint="#0047b3"
|
android:indeterminateTint="#0047b3"
|
||||||
android:id="@+id/progressBar"
|
android:id="@+id/progressBar"
|
||||||
|
android:indeterminateTintMode="src_in"
|
||||||
android:indeterminateOnly="true"
|
android:indeterminateOnly="true"
|
||||||
android:progress="50" app:layout_constraintTop_toTopOf="parent"
|
android:progress="50" app:layout_constraintTop_toTopOf="parent"
|
||||||
/>
|
/>
|
||||||
|
@ -180,7 +182,8 @@
|
||||||
style="?android:attr/progressBarStyle"
|
style="?android:attr/progressBarStyle"
|
||||||
android:layout_width="95dp"
|
android:layout_width="95dp"
|
||||||
android:layout_height="95dp"
|
android:layout_height="95dp"
|
||||||
android:indeterminateTint="#455265"
|
android:indeterminateTintMode="src_in"
|
||||||
|
android:indeterminateTint="#414e62"
|
||||||
app:layout_constraintStart_toStartOf="parent" app:layout_constraintHorizontal_bias="0.5"
|
app:layout_constraintStart_toStartOf="parent" app:layout_constraintHorizontal_bias="0.5"
|
||||||
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent" android:layout_marginBottom="80dp"/>
|
app:layout_constraintBottom_toBottomOf="parent" android:layout_marginBottom="80dp"/>
|
||||||
|
@ -216,4 +219,16 @@
|
||||||
</android.support.constraint.ConstraintLayout>
|
</android.support.constraint.ConstraintLayout>
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
<android.support.design.widget.FloatingActionButton
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:src="@drawable/ban"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:alpha="0"
|
||||||
|
app:borderWidth="0dp"
|
||||||
|
app:elevation="10dp"
|
||||||
|
android:backgroundTint="#ffffff"
|
||||||
|
android:clickable="true" app:srcCompat="?attr/actionModeSelectAllDrawable"
|
||||||
|
android:id="@+id/floatingActionButton3" app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent" android:layout_marginBottom="24dp"
|
||||||
|
android:layout_marginEnd="24dp"/>
|
||||||
</android.support.constraint.ConstraintLayout>
|
</android.support.constraint.ConstraintLayout>
|
|
@ -3,7 +3,7 @@
|
||||||
<color name="colorPrimary">#000000</color>
|
<color name="colorPrimary">#000000</color>
|
||||||
<color name="colorPrimaryDark">#000000</color>
|
<color name="colorPrimaryDark">#000000</color>
|
||||||
<color name="colorAccent">#000000</color>
|
<color name="colorAccent">#000000</color>
|
||||||
<color name="blue">#0066ff</color>
|
<color name="blue">#0066FF</color>
|
||||||
<color name="holo_gray">#b3b3b3</color>
|
<color name="holo_gray">#b3b3b3</color>
|
||||||
<color name="header">#009933</color>
|
<color name="header">#212f45</color>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<item name="colorPrimaryDark">#f9f9f9</item>
|
<item name="colorPrimaryDark">#f9f9f9</item>
|
||||||
<item name="colorAccent">#f9f9f9</item>
|
<item name="colorAccent">#f9f9f9</item>
|
||||||
<item name="android:windowBackground">@drawable/backgradient</item>
|
<item name="android:windowBackground">@drawable/backgradient</item>
|
||||||
<item name="android:windowLightStatusBar">true</item>
|
<item name="android:statusBarColor">#000000</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,10 +4,11 @@ buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
jcenter()
|
||||||
maven { url 'https://jitpack.io' }
|
maven { url 'https://maven.fabric.io/public' }
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.3.1'
|
classpath 'com.android.tools.build:gradle:3.3.1'
|
||||||
|
classpath 'io.fabric.tools:gradle:1.+'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,6 +17,7 @@ allprojects {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
jcenter()
|
||||||
maven { url 'https://jitpack.io' }
|
maven { url 'https://jitpack.io' }
|
||||||
|
maven { url 'https://maven.fabric.io/public' }
|
||||||
maven { url 'https://maven.mozilla.org/maven2/' }
|
maven { url 'https://maven.mozilla.org/maven2/' }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|