Bug Fixes

master
msmannan00 2020-09-11 15:54:25 +05:00
parent 8f6b7eff6d
commit 7d00973017
112 changed files with 875 additions and 4925 deletions

View File

@ -1,6 +1,22 @@
<component name="ProjectCodeStyleConfiguration"> <component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173"> <code_scheme name="Project" version="173">
<JetCodeStyleSettings> <JetCodeStyleSettings>
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
<value>
<package name="java.util" alias="false" withSubpackages="false" />
<package name="kotlinx.android.synthetic" alias="false" withSubpackages="true" />
<package name="io.ktor" alias="false" withSubpackages="true" />
</value>
</option>
<option name="PACKAGES_IMPORT_LAYOUT">
<value>
<package name="" alias="false" withSubpackages="true" />
<package name="java" alias="false" withSubpackages="true" />
<package name="javax" alias="false" withSubpackages="true" />
<package name="kotlin" alias="false" withSubpackages="true" />
<package name="" alias="true" withSubpackages="true" />
</value>
</option>
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" /> <option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings> </JetCodeStyleSettings>
<codeStyleSettings language="JAVA"> <codeStyleSettings language="JAVA">
@ -9,6 +25,115 @@
<option name="METHOD_BRACE_STYLE" value="2" /> <option name="METHOD_BRACE_STYLE" value="2" />
<option name="LAMBDA_BRACE_STYLE" value="2" /> <option name="LAMBDA_BRACE_STYLE" value="2" />
</codeStyleSettings> </codeStyleSettings>
<codeStyleSettings language="XML">
<arrangement>
<rules>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:android</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:id</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>style</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
<order>ANDROID_ATTRIBUTE_ORDER</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>.*</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
</rules>
</arrangement>
</codeStyleSettings>
<codeStyleSettings language="kotlin"> <codeStyleSettings language="kotlin">
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" /> <option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</codeStyleSettings> </codeStyleSettings>

View File

@ -1,14 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings"> <component name="GradleSettings">
<option name="linkedExternalProjectsSettings"> <option name="linkedExternalProjectsSettings">
<GradleProjectSettings> <GradleProjectSettings>
<option name="testRunner" value="PLATFORM" />
<option name="distributionType" value="DEFAULT_WRAPPED" /> <option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" /> <option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules"> <option name="modules">
<set> <set>
<option value="$PROJECT_DIR$" /> <option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" /> <option value="$PROJECT_DIR$/app" />
<option value="$PROJECT_DIR$/orbotservice" />
</set> </set>
</option> </option>
<option name="resolveModulePerSourceSet" value="false" /> <option name="resolveModulePerSourceSet" value="false" />

55
.idea/jarRepositories.xml Normal file
View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="maven" />
<option name="name" value="maven" />
<option name="url" value="https://maven.fabric.io/public" />
</remote-repository>
<remote-repository>
<option name="id" value="maven2" />
<option name="name" value="maven2" />
<option name="url" value="https://maven.mozilla.org/maven2/" />
</remote-repository>
<remote-repository>
<option name="id" value="MavenLocal" />
<option name="name" value="MavenLocal" />
<option name="url" value="file:/$USER_HOME$/.m2/repository" />
</remote-repository>
<remote-repository>
<option name="id" value="BintrayJCenter" />
<option name="name" value="BintrayJCenter" />
<option name="url" value="https://jcenter.bintray.com/" />
</remote-repository>
<remote-repository>
<option name="id" value="maven3" />
<option name="name" value="maven3" />
<option name="url" value="https://jitpack.io" />
</remote-repository>
<remote-repository>
<option name="id" value="Google" />
<option name="name" value="Google" />
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
</remote-repository>
<remote-repository>
<option name="id" value="maven5" />
<option name="name" value="maven5" />
<option name="url" value="https://raw.githubusercontent.com/guardianproject/gpmaven/master" />
</remote-repository>
<remote-repository>
<option name="id" value="MavenRepo" />
<option name="name" value="MavenRepo" />
<option name="url" value="https://repo.maven.apache.org/maven2/" />
</remote-repository>
</component>
</project>

View File

@ -48,7 +48,7 @@ android {
versionName project.ext.arm_vname versionName project.ext.arm_vname
dimension "abi" dimension "abi"
ndk { ndk {
abiFilter "armeabi-v7a" abiFilters "armeabi", "armeabi-v7a", "x86"
} }
} }
aarch64 { aarch64 {
@ -56,7 +56,7 @@ android {
versionName project.ext.aarch_vname versionName project.ext.aarch_vname
dimension "abi" dimension "abi"
ndk { ndk {
abiFilter "arm64-v8a" abiFilters "armeabi", "armeabi-v7a", "x86"
} }
} }
x86 { x86 {
@ -64,7 +64,7 @@ android {
versionName project.ext.x86_vname versionName project.ext.x86_vname
dimension "abi" dimension "abi"
ndk { ndk {
abiFilter "x86" abiFilters "armeabi", "armeabi-v7a", "x86"
} }
} }
x86_64 { x86_64 {
@ -72,7 +72,7 @@ android {
versionName project.ext.x64_vname versionName project.ext.x64_vname
dimension "abi" dimension "abi"
ndk { ndk {
abiFilter "x86_64" abiFilters "armeabi", "armeabi-v7a", "x86"
} }
} }
@ -108,22 +108,22 @@ dependencies {
// Android Support Repository dependencies // Android Support Repository dependencies
def supportVersion = '28.0.0' def supportVersion = '28.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.preference:preference:1.1.0' implementation 'androidx.preference:preference:1.1.1'
implementation 'androidx.legacy:legacy-preference-v14:1.0.0' implementation 'androidx.legacy:legacy-preference-v14:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0' implementation 'androidx.recyclerview:recyclerview:1.1.0'
// Testing-only dependencies // Testing-only dependencies
androidTestImplementation('androidx.test.espresso:espresso-core:3.2.0') { androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0') {
exclude group: 'com.android.support', module: 'support-annotations' exclude group: 'com.android.support', module: 'support-annotations'
} }
/*Default Libraries*/ /*Default Libraries*/
implementation 'com.android.support.constraint:constraint-layout:2.0.0-beta4' implementation 'com.android.support.constraint:constraint-layout:2.0.1'
implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4' implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
implementation 'com.google.android.material:material:1.2.0-alpha04' implementation 'com.google.android.material:material:1.3.0-alpha02'
implementation 'androidx.preference:preference:1.1.0' implementation 'androidx.preference:preference:1.1.1'
implementation 'com.android.support:design:28.0.0' implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support:appcompat-v7:28.0.0'
@ -135,12 +135,12 @@ dependencies {
implementation 'com.crowdfire.cfalertdialog:cfalertdialog:1.1.0' implementation 'com.crowdfire.cfalertdialog:cfalertdialog:1.1.0'
/*Ads Manager*/ /*Ads Manager*/
implementation 'com.google.android.gms:play-services-ads:18.3.0' implementation 'com.google.android.gms:play-services-ads:19.4.0'
/*Crashlytics*/ /*Crashlytics*/
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1' implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
implementation 'com.flurry.android:analytics:12.1.0@aar' implementation 'com.flurry.android:analytics:12.4.0@aar'
/*View Animator*/ /*View Animator*/
implementation 'com.daimajia.easing:library:2.1@aar' implementation 'com.daimajia.easing:library:2.1@aar'

Binary file not shown.

View File

@ -1 +0,0 @@
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]

View File

@ -40,6 +40,11 @@
android:name="com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkController" android:name="com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkController"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize" android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustNothing" /> android:windowSoftInputMode="adjustNothing" />
<activity
android:name="com.darkweb.genesissearchengine.appManager.languageManager.languageController"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:label="@string/title_activity_setting_controller"
android:windowSoftInputMode="adjustNothing" />
<activity <activity
android:name="com.darkweb.genesissearchengine.appManager.bridgeManager.bridgeController" android:name="com.darkweb.genesissearchengine.appManager.bridgeManager.bridgeController"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize" android:configChanges="keyboard|keyboardHidden|orientation|screenSize"

View File

@ -46,6 +46,7 @@ public class bookmarkController extends AppCompatActivity
@Override @Override
protected void onCreate(Bundle savedInstanceState){ protected void onCreate(Bundle savedInstanceState){
pluginController.getInstance().onCreate(this);
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.bookmark_view); setContentView(R.layout.bookmark_view);
initializeListModel(); initializeListModel();

View File

@ -45,6 +45,7 @@ public class bridgeController extends AppCompatActivity {
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
pluginController.getInstance().onCreate(this);
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.bridge_settings_view); setContentView(R.layout.bridge_settings_view);
@ -132,9 +133,11 @@ public class bridgeController extends AppCompatActivity {
protected void onPause() protected void onPause()
{ {
super.onPause(); super.onPause();
dataController.getInstance().setString(keys.CUSTOM_BRIDGE_1,status.sCustomBridge); if(dataController.getInstance()!=null){
dataController.getInstance().setBool(keys.GATEWAY_AUTO,status.sGatewayAuto); dataController.getInstance().setString(keys.CUSTOM_BRIDGE_1,status.sCustomBridge);
dataController.getInstance().setBool(keys.GATEWAY_MANUAL,status.sGatewayManual); dataController.getInstance().setBool(keys.GATEWAY_AUTO,status.sGatewayAuto);
dataController.getInstance().setBool(keys.GATEWAY_MANUAL,status.sGatewayManual);
}
} }
@Override @Override

View File

@ -1,90 +0,0 @@
package com.darkweb.genesissearchengine.appManager.database_manager;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import com.darkweb.genesissearchengine.appManager.home_activity.home_model;
import com.darkweb.genesissearchengine.appManager.list_manager.list_row_model;
import com.darkweb.genesissearchengine.constants.constants;
import java.util.ArrayList;
import static android.content.Context.MODE_PRIVATE;
public class database_controller
{
/*Private Variables*/
private static final database_controller ourInstance = new database_controller();
private SQLiteDatabase database_instance;
public static database_controller getInstance()
{
return ourInstance;
}
private database_controller()
{
}
/*Initializations*/
public void initialize()
{
try
{
database_instance = home_model.getInstance().getHomeInstance().openOrCreateDatabase(constants.databae_name, MODE_PRIVATE, null);
database_instance.execSQL("CREATE TABLE IF NOT EXISTS " + "history" + " (id INT(4),date VARCHAR,url VARCHAR);");
database_instance.execSQL("CREATE TABLE IF NOT EXISTS " + "bookmark" + " (id INT(4),title VARCHAR,url VARCHAR);");
}
catch (Exception ex)
{
ex.printStackTrace();
}
}
/*Helper Methods*/
public void execSQL(String query,String[] params)
{
if(params==null)
{
database_instance.execSQL(query);
}
else
{
database_instance.execSQL(query,params);
}
}
public ArrayList<list_row_model> selectHistory(){
ArrayList<list_row_model> tempmodel = new ArrayList<>();
Cursor c = database_instance.rawQuery("SELECT * FROM history ORDER BY id DESC ", null);
if (c.moveToFirst()){
do {
tempmodel.add(new list_row_model(c.getString(2), c.getString(1),Integer.parseInt(c.getString(0))));
home_model.getInstance().initSuggestions(c.getString(2));
} while(c.moveToNext());
}
c.close();
return tempmodel;
}
public ArrayList<list_row_model> selectBookmark(){
ArrayList<list_row_model> tempmodel = new ArrayList<>();
Cursor c = database_instance.rawQuery("SELECT * FROM bookmark ORDER BY id DESC ", null);
if (c.moveToFirst()){
do {
tempmodel.add(new list_row_model(c.getString(2), c.getString(1),Integer.parseInt(c.getString(0))));
} while(c.moveToNext());
}
c.close();
return tempmodel;
}
}

View File

@ -50,6 +50,7 @@ public class historyController extends AppCompatActivity
@Override @Override
protected void onCreate(Bundle savedInstanceState){ protected void onCreate(Bundle savedInstanceState){
pluginController.getInstance().onCreate(this);
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.history_view); setContentView(R.layout.history_view);
initializeListModel(); initializeListModel();

View File

@ -32,6 +32,7 @@ import com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkContro
import com.darkweb.genesissearchengine.appManager.databaseManager.databaseController; import com.darkweb.genesissearchengine.appManager.databaseManager.databaseController;
import com.darkweb.genesissearchengine.appManager.historyManager.historyController; import com.darkweb.genesissearchengine.appManager.historyManager.historyController;
import com.darkweb.genesissearchengine.appManager.landingManager.landingController; import com.darkweb.genesissearchengine.appManager.landingManager.landingController;
import com.darkweb.genesissearchengine.appManager.languageManager.languageController;
import com.darkweb.genesissearchengine.appManager.settingManager.settingController; import com.darkweb.genesissearchengine.appManager.settingManager.settingController;
import com.darkweb.genesissearchengine.appManager.tabManager.tabController; import com.darkweb.genesissearchengine.appManager.tabManager.tabController;
import com.darkweb.genesissearchengine.appManager.tabManager.tabRowModel; import com.darkweb.genesissearchengine.appManager.tabManager.tabRowModel;
@ -101,15 +102,17 @@ public class homeController extends AppCompatActivity implements ComponentCallba
@Override @Override
protected void onCreate(Bundle savedInstanceState) protected void onCreate(Bundle savedInstanceState)
{ {
super.onCreate(savedInstanceState);
setContentView(R.layout.home_view);
initPreFixes();
pluginController.getInstance().preInitialize(this); pluginController.getInstance().preInitialize(this);
databaseController.getInstance().initialize(this); databaseController.getInstance().initialize(this);
dataController.getInstance().initialize(this); dataController.getInstance().initialize(this);
status.initStatus();
pluginController.getInstance().onCreate(this);
super.onCreate(savedInstanceState);
setContentView(R.layout.home_view);
initPreFixes();
activityContextManager.getInstance().setHomeController(this); activityContextManager.getInstance().setHomeController(this);
pluginController.getInstance().initializeAllServices(this); pluginController.getInstance().initializeAllServices(this);
status.initStatus();
dataController.getInstance().initializeListData(); dataController.getInstance().initializeListData();
initializeAppModel(); initializeAppModel();
initializeAppModel(); initializeAppModel();
@ -416,10 +419,12 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} }
public void onOpenMenuItem(View view){ public void onOpenMenuItem(View view){
pluginController.getInstance().setLanguage(this);
pluginController.getInstance().logEvent(strings.MENU_INVOKED); pluginController.getInstance().logEvent(strings.MENU_INVOKED);
status.sIsAppStarted = true; status.sIsAppStarted = true;
pluginController.getInstance().onResetMessage(); pluginController.getInstance().onResetMessage();
initLocalLanguage(); initLocalLanguage();
pluginController.getInstance().onCreate(this);
mHomeViewController.onOpenMenu(view,mGeckoClient.canGoBack(),mGeckoClient.canGoForward(),!(mProgressBar.getAlpha()<=0 || mProgressBar.getVisibility() ==View.INVISIBLE),mGeckoClient.getUserAgent()); mHomeViewController.onOpenMenu(view,mGeckoClient.canGoBack(),mGeckoClient.canGoForward(),!(mProgressBar.getAlpha()<=0 || mProgressBar.getVisibility() ==View.INVISIBLE),mGeckoClient.getUserAgent());
@ -524,11 +529,11 @@ public class homeController extends AppCompatActivity implements ComponentCallba
@Override @Override
public void onResume() public void onResume()
{ {
pluginController.getInstance().onResume(this);
activityContextManager.getInstance().setCurrentActivity(this); activityContextManager.getInstance().setCurrentActivity(this);
if (mGeckoClient!=null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && mGeckoClient.getUriPermission()!=null) { if (mGeckoClient!=null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && mGeckoClient.getUriPermission()!=null) {
this.revokeUriPermission(mGeckoClient.getUriPermission(), Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_GRANT_READ_URI_PERMISSION); this.revokeUriPermission(mGeckoClient.getUriPermission(), Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_GRANT_READ_URI_PERMISSION);
} }
super.onResume(); super.onResume();
} }
@ -706,6 +711,9 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mGeckoClient.toogleUserAgent(); mGeckoClient.toogleUserAgent();
mGeckoClient.onReload(); mGeckoClient.onReload();
} }
if(menuId == R.id.menu25){
helperMethod.openActivity(languageController.class, constants.LIST_HISTORY, homeController.this,true);
}
} }
mHomeViewController.closeMenu(); mHomeViewController.closeMenu();
} }
@ -814,6 +822,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} }
} }
else if(e_type.equals(enums.etype.on_load_error)){ else if(e_type.equals(enums.etype.on_load_error)){
pluginController.getInstance().setLanguage(homeController.this);
initLocalLanguage(); initLocalLanguage();
mHomeViewController.onPageFinished(); mHomeViewController.onPageFinished();
mHomeViewController.onUpdateSearchBar(dataToStr(data.get(0),mGeckoClient.getSession().getCurrentURL()),false); mHomeViewController.onUpdateSearchBar(dataToStr(data.get(0),mGeckoClient.getSession().getCurrentURL()),false);

View File

@ -1,121 +0,0 @@
package com.darkweb.genesissearchengine.appManager.home_activity;
import java.util.ArrayList;
import java.util.List;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.Filter;
import android.widget.Filterable;
import android.widget.TextView;
import com.darkweb.genesissearchengine.appManager.list_manager.list_model;
import com.example.myapplication.R;
public class AutoCompleteAdapter extends ArrayAdapter<String> implements Filterable {
private ArrayList<String> fullList;
private ArrayList<String> mOriginalValues;
private ArrayFilter mFilter;
private int getResultCount=0;
public int getResultCount()
{
if(getResultCount>0)
return 4;
else
return getResultCount;
}
public AutoCompleteAdapter(Context context, int resource, int textViewResourceId, List<String> objects) {
super(context, resource, textViewResourceId, objects);
fullList = (ArrayList<String>) objects;
mOriginalValues = new ArrayList<String>(fullList);
}
@Override
public int getCount() {
return fullList.size();
}
@Override
public String getItem(int position) {
return fullList.get(position);
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
return super.getView(position, convertView, parent);
}
@Override
public Filter getFilter() {
if (mFilter == null) {
mFilter = new ArrayFilter();
}
return mFilter;
}
private class ArrayFilter extends Filter {
private Object lock;
@Override
protected FilterResults performFiltering(CharSequence prefix) {
FilterResults results = new FilterResults();
if (mOriginalValues == null) {
synchronized (lock) {
mOriginalValues = new ArrayList<String>(fullList);
}
}
if (prefix == null || prefix.length() == 0) {
synchronized (lock) {
ArrayList<String> list = new ArrayList<String>(mOriginalValues);
results.values = list;
results.count = list.size();
}
} else {
final String prefixString = prefix.toString().toLowerCase();
ArrayList<String> values = mOriginalValues;
int count = values.size();
ArrayList<String> newValues = new ArrayList<String>(count);
for (int i = 0; i < count; i++) {
String item = values.get(i);
if (item.toLowerCase().contains(prefixString)) {
newValues.add(item);
}
}
results.values = newValues;
results.count = newValues.size();
}
getResultCount = results.count;
return results;
}
@SuppressWarnings("unchecked")
@Override
protected void publishResults(CharSequence constraint, FilterResults results) {
if(results.values!=null){
fullList = (ArrayList<String>) results.values;
}else{
fullList = new ArrayList<String>();
}
if (results.count > 0) {
notifyDataSetChanged();
} else {
notifyDataSetInvalidated();
}
}
}
}

View File

@ -1,41 +0,0 @@
package com.darkweb.genesissearchengine.appManager.home_activity;
import android.app.DownloadManager;
import android.app.IntentService;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Environment;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
public class DownloadFileService extends IntentService
{
private static final String DOWNLOAD_PATH = "com.spartons.androiddownloadmanager_DownloadSongService_Download_path";
private static final String DESTINATION_PATH = "com.spartons.androiddownloadmanager_DownloadSongService_Destination_path";
public DownloadFileService() {
super("DownloadSongService");
}
public static Intent getDownloadService(final @NonNull Context callingClassContext, final @NonNull String downloadPath, final @NonNull String destinationPath) {
return new Intent(callingClassContext, DownloadFileService.class)
.putExtra(DOWNLOAD_PATH, downloadPath)
.putExtra(DESTINATION_PATH, destinationPath);
}
@Override
protected void onHandleIntent(@Nullable Intent intent) {
String downloadPath = intent.getStringExtra(DOWNLOAD_PATH);
String destinationPath = intent.getStringExtra(DESTINATION_PATH);
startDownload(downloadPath, destinationPath);
}
private void startDownload(String downloadPath, String destinationPath) {
String []fn = downloadPath.split("__");
Uri uri = Uri.parse(fn[0]); // Path where you want to download file.
DownloadManager manager = (DownloadManager) home_model.getInstance().getHomeInstance().getSystemService(DOWNLOAD_SERVICE);
DownloadManager.Request req = new DownloadManager.Request(uri);
req.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, fn[1]);
req.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
manager.enqueue(req);
}
}

View File

@ -1,477 +0,0 @@
package com.darkweb.genesissearchengine.appManager.home_activity;
import android.Manifest;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.os.Handler;
import android.util.Log;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import com.darkweb.genesissearchengine.constants.*;
import com.darkweb.genesissearchengine.dataManager.preference_manager;
import com.darkweb.genesissearchengine.helperMethod;
import com.darkweb.genesissearchengine.pluginManager.fabricManager;
import com.darkweb.genesissearchengine.pluginManager.localNotification;
import com.darkweb.genesissearchengine.pluginManager.message_manager;
import com.darkweb.genesissearchengine.pluginManager.orbot_manager;
import org.mozilla.geckoview.*;
import java.util.LinkedList;
import static com.google.ads.AdRequest.LOGTAG;
class geckoClients
{
public GeckoSession session1 = null;
private GeckoRuntime runtime1 = null;
private final Handler internetErrorHandler = new Handler();
private boolean isRunning = false;
private boolean isContentLoading = false;
private String navigatedURL = "";
private boolean isFirstTimeLoad = true;
private boolean loadingCompeleted = false;
private boolean wasBackPressed = false;
private boolean isUrlSavable = true;
private int urlRequestCount = 0;
private boolean isAppRated = false;
private boolean canAdBeShown = false;
geckoClients()
{
isAppRated = preference_manager.getInstance().getBool(keys.isAppRated,false);
}
void loadGeckoURL(String url,GeckoView geckoView,boolean isUrlSavable,boolean reinit)
{
boolean init_status = orbot_manager.getInstance().initOrbot(url);
canAdBeShown = true;
if (init_status)
{
if(reinit)
{
initialize(geckoView);
}
this.isUrlSavable = isUrlSavable;
navigatedURL = "";
loadingCompeleted = false;
session1.loadUri(url);
home_model.getInstance().getHomeInstance().onRequestTriggered(true,url);
home_model.getInstance().getHomeInstance().onProgressBarUpdateView(4);
isFirstTimeLoad = true;
wasBackPressed = false;
isContentLoading = false;
isRunning = false;
}
}
void initialize(GeckoView geckoView)
{
session1 = new GeckoSession();
runtime1 = GeckoRuntime.getDefault(home_model.getInstance().getAppContext());
runtime1.getSettings().setJavaScriptEnabled(status.java_status);
session1.open(runtime1);
geckoView.releaseSession();
geckoView.setSession(session1);
session1.setProgressDelegate(new progressDelegate());
session1.setNavigationDelegate(new navigationDelegate());
geckoView.setVisibility(View.VISIBLE);
geckoView.setAlpha(1);
session1.setContentDelegate(new ExampleContentDelegate());
}
public void initializeDownloadManager()
{
//DownloadsFeature downloadsFeature = new DownloadsFeature(home_model.getInstance().getAppContext(),null,null,null,session1);
}
class navigationDelegate implements GeckoSession.NavigationDelegate
{
@Override
public void onLocationChange(GeckoSession session, String url)
{
navigatedURL = url;
if(isUrlSavable && home_model.getInstance().getNavigation().size()>0 && !url.equals("about:blank"))
{
home_model.getInstance().addHistory(navigatedURL);
home_model.getInstance().addNavigation(navigatedURL,enums.navigationType.onion);
}
}
@Override
public GeckoResult<GeckoSession> onNewSession(GeckoSession session, String url)
{
Log.i("FUCK2",url);
session1.loadUri(url);
return null;
}
}
class progressDelegate implements GeckoSession.ProgressDelegate
{
@Override
public void onPageStart(GeckoSession session, String url)
{
wasBackPressed = false;
isRunning = true;
loadingCompeleted = false;
fabricManager.getInstance().sendEvent("ONION GECKO_CLIENT URL REQEST : " + url + "--");
home_model.getInstance().getHomeInstance().onUpdateSearchBarView(url);
isContentLoading = !navigatedURL.equals(url);
navigatedURL = url;
}
@Override
public void onPageStop(GeckoSession session, boolean success)
{
internetErrorHandler.removeCallbacksAndMessages(null);
internetErrorHandler.postDelayed(new Runnable()
{
@Override
public void run()
{
if(loadingCompeleted)
{
if(isFirstTimeLoad)
{
home_model.getInstance().getHomeInstance().hideSplashScreen();
}
if(!success && !isContentLoading && !wasBackPressed)
{
home_model.getInstance().getHomeInstance().onPageFinished(true);
home_model.getInstance().getHomeInstance().onInternetErrorView();
fabricManager.getInstance().sendEvent("ONION GECKO_CLIENT URL ERROR : " + success + "--" + isContentLoading);
}
else if(success)
{
urlRequestCount++;
if(urlRequestCount==5)
{
if(!isAppRated)
{
//isAppRated = true;
//message_manager.getInstance().rateApp();
}
}
else if(helperMethod.getHost(navigatedURL).contains(".onion"))
{
home_model.getInstance().getHomeInstance().onShowAd(enums.adID.hidden_onion_start);
canAdBeShown = false;
/*if(isFirstTimeLoad && navigatedURL.contains(".onion"))
{
home_model.getInstance().getHomeInstance().onShowAd(enums.adID.hidden_onion_start);
}
else if(!isFirstTimeLoad && navigatedURL.contains(".onion"))
{
home_model.getInstance().getHomeInstance().onShowAd(enums.adID.hidden_onion);
}
else if(!isFirstTimeLoad && !navigatedURL.contains(".onion"))
{
home_model.getInstance().getHomeInstance().onShowAd(enums.adID.hidden_base);
}*/
}
else
{
canAdBeShown = true;
}
home_model.getInstance().getHomeInstance().onDisableInternetError();
home_model.getInstance().getHomeInstance().onProgressBarUpdateView(0);
fabricManager.getInstance().sendEvent("ONION GECKO_CLIENT URL SUCCESS : " + success + "--" + isContentLoading);
home_model.getInstance().getHomeInstance().onPageFinished(true);
}
isUrlSavable = true;
isFirstTimeLoad = false;
}
}
}, 500);
}
@Override
public void onProgressChange(GeckoSession session, int progress)
{
if(progress>=100)
{
loadingCompeleted = true;
isContentLoading = false;
}
else if(progress>=5)
{
home_model.getInstance().getHomeInstance().onProgressBarUpdateView(progress);
}
else
{
home_model.getInstance().getHomeInstance().onProgressBarUpdateView(4);
}
}
@Override
public void onSecurityChange(GeckoSession session, SecurityInformation securityInfo)
{
}
}
void onHiddenGoBack(GeckoView geckoView)
{
isRunning = false;
loadingCompeleted = false;
isUrlSavable = false;
wasBackPressed = true;
session1.stop();
if(home_model.getInstance().getHomeInstance().isInternetErrorOpened())
{
initialize(geckoView);
}
session1.loadUri(home_model.getInstance().getNavigation().get(home_model.getInstance().getNavigation().size()-1).getURL());
}
void stopHiddenView(GeckoView geckoView,boolean releaseView,boolean backPressed)
{
if(session1!=null)
{
isRunning = false;
loadingCompeleted = false;
wasBackPressed = backPressed;
session1.stop();
if(!releaseView)
{
//session1.close();
}
}
}
public void releaseSession(GeckoView geckoView)
{
geckoView.releaseSession();
}
void setRootEngine(String url)
{
}
boolean isGeckoViewRunning()
{
return isRunning;
}
void onReloadHiddenView()
{
if(home_model.getInstance().getNavigation().get(home_model.getInstance().getNavigation().size()-1).type().equals(enums.navigationType.onion))
{
isRunning = false;
loadingCompeleted = false;
isUrlSavable = false;
wasBackPressed = true;
session1.stop();
session1.loadUri(home_model.getInstance().getNavigation().get(home_model.getInstance().getNavigation().size()-1).getURL());
}
}
private class ExampleContentDelegate implements GeckoSession.ContentDelegate {
@Override
public void onFocusRequest(final GeckoSession session) {
Log.i(LOGTAG, "Content requesting focus");
}
@Override
public void onContextMenu(final GeckoSession session,
int screenX, int screenY,
final ContextElement element) {
Log.d(LOGTAG, "onContextMenu screenX=" + screenX +
" screenY=" + screenY +
" type=" + element.type +
" linkUri=" + element.linkUri +
" title=" + element.title +
" alt=" + element.altText +
" srcUri=" + element.srcUri);
}
@Override
public void onExternalResponse(GeckoSession session, GeckoSession.WebResponseInfo response) {
try {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndTypeAndNormalize(Uri.parse(response.uri), response.contentType);
home_model.getInstance().getHomeInstance().startActivity(intent);
} catch (ActivityNotFoundException e) {
wasBackPressed = true;
home_model.getInstance().getHomeInstance().onProgressBarUpdateView(0);
downloadFile(response);
}
}
}
private void downloadFile(GeckoSession.WebResponseInfo response) {
session1
.getUserAgent()
.accept(userAgent -> downloadFile(response, userAgent),
exception -> {
throw new IllegalStateException("Could not get UserAgent string.");
});
}
private static final int REQUEST_WRITE_EXTERNAL_STORAGE = 3;
private LinkedList<GeckoSession.WebResponseInfo> mPendingDownloads = new LinkedList<>();
private void downloadFile(GeckoSession.WebResponseInfo response, String userAgent) {
if (ContextCompat.checkSelfPermission(home_model.getInstance().getHomeInstance(),
Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
mPendingDownloads.add(response);
ActivityCompat.requestPermissions(home_model.getInstance().getHomeInstance(),
new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},
REQUEST_WRITE_EXTERNAL_STORAGE);
return;
}
url = Uri.parse(response.uri);
downloadFile = response.filename != null ? response.filename : url.getLastPathSegment();
message_manager.getInstance().downloadFile(downloadFile);
}
String downloadFile = "";
Uri url;
void downloadFile()
{
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
localNotification.getInstance().createNotification("Downloading | " + downloadFile,"Starting Download");
}
home_model.getInstance().getHomeInstance().startService(DownloadFileService.getDownloadService(home_model.getInstance().getHomeInstance(), url.toString()+"__"+downloadFile, Environment.DIRECTORY_DOWNLOADS));
}
private class ExampleContentBlockingDelegate
implements ContentBlocking.Delegate {
private int mBlockedAds = 0;
private int mBlockedAnalytics = 0;
private int mBlockedSocial = 0;
private int mBlockedContent = 0;
private int mBlockedTest = 0;
private void clearCounters() {
mBlockedAds = 0;
mBlockedAnalytics = 0;
mBlockedSocial = 0;
mBlockedContent = 0;
mBlockedTest = 0;
}
private void logCounters() {
Log.d(LOGTAG, "Trackers blocked: " + mBlockedAds + " ads, " +
mBlockedAnalytics + " analytics, " +
mBlockedSocial + " social, " +
mBlockedContent + " content, " +
mBlockedTest + " test");
}
@Override
public void onContentBlocked(final GeckoSession session,
final ContentBlocking.BlockEvent event) {
Log.d(LOGTAG, "onContentBlocked" +
" AT: " + event.getAntiTrackingCategory() +
" SB: " + event.getSafeBrowsingCategory() +
" CB: " + event.getCookieBehaviorCategory() +
" URI: " + event.uri);
if ((event.getAntiTrackingCategory() &
ContentBlocking.AntiTracking.TEST) != 0) {
mBlockedTest++;
}
if ((event.getAntiTrackingCategory() &
ContentBlocking.AntiTracking.AD) != 0) {
mBlockedAds++;
}
if ((event.getAntiTrackingCategory() &
ContentBlocking.AntiTracking.ANALYTIC) != 0) {
mBlockedAnalytics++;
}
if ((event.getAntiTrackingCategory() &
ContentBlocking.AntiTracking.SOCIAL) != 0) {
mBlockedSocial++;
}
if ((event.getAntiTrackingCategory() &
ContentBlocking.AntiTracking.CONTENT) != 0) {
mBlockedContent++;
}
}
@Override
public void onContentLoaded(final GeckoSession session,
final ContentBlocking.BlockEvent event) {
Log.d(LOGTAG, "onContentLoaded" +
" AT: " + event.getAntiTrackingCategory() +
" SB: " + event.getSafeBrowsingCategory() +
" CB: " + event.getCookieBehaviorCategory() +
" URI: " + event.uri);
}
}
private final class ExampleTelemetryDelegate
implements RuntimeTelemetry.Delegate {
@Override
public void onTelemetryReceived(final @NonNull RuntimeTelemetry.Metric metric) {
Log.d(LOGTAG, "onTelemetryReceived " + metric);
}
}
}

View File

@ -1,391 +0,0 @@
package com.darkweb.genesissearchengine.appManager.home_activity;
import android.content.ComponentCallbacks2;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.*;
import android.webkit.*;
import android.widget.*;
import androidx.appcompat.app.AppCompatActivity;
import androidx.constraintlayout.widget.ConstraintLayout;
import com.darkweb.genesissearchengine.*;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.enums;
import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.dataManager.preference_manager;
import com.darkweb.genesissearchengine.pluginManager.*;
import com.example.myapplication.R;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import org.mozilla.geckoview.GeckoSession;
import org.mozilla.geckoview.GeckoView;
public class home_controller extends AppCompatActivity implements ComponentCallbacks2
{
/*View Webviews*/
private WebView webView;
private GeckoView geckoView = null;
/*View Objects*/
private ProgressBar progressBar;
private ConstraintLayout requestFailure;
private ConstraintLayout splashScreen;
private AutoCompleteTextView searchbar;
private FloatingActionButton floatingButton;
private ImageView loadingIcon;
private ImageView splashlogo;
private TextView loadingText;
/*Redirection Objects*/
private geckoClients geckoclient = null;
private webviewClient webviewclient = null;
private home_ehandler eventhandler = null;
/*-------------------------------------------------------INITIALIZATION-------------------------------------------------------*/
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
if(helperMethod.isBuildValid())
{
setContentView(R.layout.home_view);
initializeAppModel();
preference_manager.getInstance().initialize();
initializeCrashlytics();
status.initStatus();
initializeConnections();
initializeWebView();
initializeLocalEventHandlers();
initAdManager();
initExitService();
orbot_manager.getInstance().reinitOrbot();
viewController.getInstance().initialization(webView,loadingText,progressBar,searchbar,splashScreen,requestFailure,floatingButton, loadingIcon,splashlogo);
firebase.getInstance().initialize();
geckoclient.initialize(geckoView);
home_model.getInstance().initialization();
initBoogle();
}
else
{
initializeAppModel();
setContentView(R.layout.invalid_setup_view);
message_manager.getInstance().abiError(Build.SUPPORTED_ABIS[0]);
}
}
public void initExitService()
{
startService(new Intent(getBaseContext(), exitManager.class));
}
public void lowMemoryError()
{
viewController.getInstance().lowMemoryError();
}
public void initAdManager()
{
}
@Override
public void onTrimMemory(int level)
{
if(level==80)
{
preference_manager.getInstance().setBool(keys.low_memory,true);
finish();
}
}
@Override
public void onResume()
{
lowMemoryError();
super.onResume();
}
@Override
public void onPause()
{
super.onPause();
}
public void initBoogle()
{
onloadURL(constants.backendGenesis,false,false);
}
public Boolean initSearchEngine()
{
if(status.search_status.equals(enums.searchEngine.Bing.toString()))
{
webView.stopLoading();
onloadURL(constants.backendBing,true,false);
if(home_model.getInstance().getNavigation().size()!=1)
{
home_model.getInstance().addNavigation(constants.backendBing,enums.navigationType.onion);
}
if(home_model.getInstance().getNavigation().size()>0)
{
home_model.getInstance().getNavigation().set(0,new navigation_model(constants.backendBing,enums.navigationType.onion));
}
return false;
}
else if(status.search_status.equals(enums.searchEngine.Google.toString()))
{
webView.stopLoading();
onloadURL(constants.backendGoogle,true,false);
if(home_model.getInstance().getNavigation().size()!=1)
{
home_model.getInstance().addNavigation(constants.backendGoogle,enums.navigationType.onion);
}
if(home_model.getInstance().getNavigation().size()>0)
{
home_model.getInstance().getNavigation().set(0,new navigation_model(constants.backendGoogle,enums.navigationType.onion));
}
return false;
}
else
{
onloadURL(constants.backendGenesis,false,false);
if(home_model.getInstance().getNavigation().size()!=1)
{
home_model.getInstance().addNavigation(constants.backendGenesis,enums.navigationType.base);
}
if(home_model.getInstance().getNavigation().size()>0)
{
home_model.getInstance().getNavigation().set(0,new navigation_model(constants.backendGenesis,enums.navigationType.base));
}
return true;
}
}
public void initializeAppModel()
{
home_model.getInstance().setAppContext(this);
home_model.getInstance().setAppInstance(this);
}
public void initializeConnections()
{
webView = findViewById(R.id.pageLoader1);
geckoView = findViewById(R.id.webLoader);
progressBar = findViewById(R.id.progressBar);
requestFailure = findViewById(R.id.requestFailure);
splashScreen = findViewById(R.id.splashScreen);
searchbar = findViewById(R.id.search);
floatingButton = findViewById(R.id.floatingActionButton3);
loadingIcon = findViewById(R.id.imageView_loading_back);
splashlogo = findViewById(R.id.backsplash);
loadingText = findViewById(R.id.loadingText);
webviewclient = new webviewClient();
geckoclient = new geckoClients();
eventhandler = new home_ehandler();
}
public void initializeCrashlytics()
{
fabricManager.getInstance().init(this);
}
public void initializeWebView()
{
setWebViewSettings(webView);
webviewclient.loadWebViewClient(webView);
}
public void setWebViewSettings(WebView view)
{
view.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
view.getSettings().setJavaScriptEnabled(status.java_status);
view.getSettings().setUseWideViewPort(true);
}
/*------------------------------------------------------- Event Handler ----------------------------------------------------*/
private void initializeLocalEventHandlers() {
searchbar.setOnEditorActionListener((v, actionId, event) ->
{
return eventhandler.onEditorClicked(v,actionId,event);
});
}
public void onReloadButtonPressed(View view)
{
eventhandler.onReloadButtonPressed(view);
}
@Override
public void onBackPressed()
{
eventhandler.onBackPressed();
}
public void onFloatingButtonPressed(View view)
{
eventhandler.onFloatingButtonPressed();
}
public void onHomeButtonPressed(View view)
{
eventhandler.onHomeButtonPressed();
}
public void onMenuButtonPressed(View view)
{
eventhandler.onMenuButtonPressed(view);
}
/*-------------------------------------------------------Helper Method In UI Redirection----------------------------------------------------*/
public void onloadURL(String url,boolean isHiddenWeb,boolean isUrlSavable) {
if(isHiddenWeb)
{
geckoclient.loadGeckoURL(url,geckoView,isUrlSavable,webView.getVisibility()==View.VISIBLE);
}
else if(!home_model.getInstance().isUrlRepeatable(url,webView.getUrl()) || webView.getVisibility() == View.GONE)
{
webView.loadUrl(url);
onRequestTriggered(isHiddenWeb,url);
}
}
public void onRequestTriggered(boolean isHiddenWeb,String url) {
viewController.getInstance().onRequestTriggered(isHiddenWeb,url);
}
public void onClearSearchBarCursorView()
{
viewController.getInstance().onClearSearchBarCursor();
}
public void onUpdateSearchBarView(String url)
{
viewController.getInstance().onUpdateSearchBar(url);
}
public void onInternetErrorView() {
viewController.getInstance().onInternetError();
viewController.getInstance().disableFloatingView();
}
public boolean onDisableInternetError()
{
return viewController.getInstance().onDisableInternetError();
}
public void onProgressBarUpdateView(int progress) {
viewController.getInstance().onProgressBarUpdate(progress);
}
public void onBackPressedView()
{
viewController.getInstance().onBackPressed();
}
public void onPageFinished(boolean isHidden)
{
viewController.getInstance().onPageFinished(isHidden);
}
public void onUpdateView(boolean status)
{
viewController.getInstance().onUpdateView(status);
}
public void onReload()
{
viewController.getInstance().onReload();
}
public void onShowAd(enums.adID id)
{
admanager.getInstance().showAd(id);
}
public void openMenu(View view) {
viewController.getInstance().openMenu(view);
}
public void reInitializeSuggestion() {
viewController.getInstance().reInitializeSuggestion();
}
public void hideSplashScreen(){
viewController.getInstance().hideSplashScreen();
}
/*-------------------------------------------------------Helper Method Out UI Redirection----------------------------------------------------*/
public String getSearchBarUrl()
{
return viewController.getInstance().getSearchBarUrl();
}
public void onReInitGeckoView() {
geckoclient.initialize(geckoView);
if(webView.getVisibility() != View.VISIBLE)
{
geckoclient.onReloadHiddenView();
}
}
public void onHiddenGoBack()
{
geckoclient.onHiddenGoBack(geckoView);
}
public void releaseSession()
{
geckoclient.releaseSession(geckoView);
}
public void stopHiddenView(boolean releaseView,boolean backPressed) {
geckoclient.stopHiddenView(geckoView,releaseView,backPressed);
//geckoclient.removeHistory();
}
public void onReloadHiddenView()
{
geckoclient.onReloadHiddenView();
}
public boolean isGeckoViewRunning()
{
return geckoclient.isGeckoViewRunning();
}
public boolean isInternetErrorOpened()
{
return requestFailure.getAlpha()==1;
}
public void downloadFile()
{
geckoclient.downloadFile();
}
/*-------------------------------------------------------Menu Handler----------------------------------------------------*/
public boolean onMenuOptionSelected(MenuItem item) {
eventhandler.onMenuPressed(item.getItemId());
return super.onOptionsItemSelected(item);
}
}

View File

@ -1,194 +0,0 @@
package com.darkweb.genesissearchengine.appManager.home_activity;
import android.util.Patterns;
import android.view.KeyEvent;
import android.view.MenuItem;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.widget.TextView;
import com.darkweb.genesissearchengine.appManager.list_manager.list_controller;
import com.darkweb.genesissearchengine.appManager.setting_manager.setting_controller;
import com.darkweb.genesissearchengine.appManager.setting_manager.setting_model;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.enums;
import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.dataManager.preference_manager;
import com.darkweb.genesissearchengine.helperMethod;
import com.darkweb.genesissearchengine.pluginManager.fabricManager;
import com.darkweb.genesissearchengine.pluginManager.message_manager;
import com.darkweb.genesissearchengine.pluginManager.orbot_manager;
import com.example.myapplication.R;
import java.io.IOException;
import java.net.URL;
public class home_ehandler
{
home_controller appContoller;
public home_ehandler()
{
appContoller = home_model.getInstance().getHomeInstance();
}
public boolean onEditorClicked(TextView v, int actionId, KeyEvent event)
{
if (actionId != EditorInfo.IME_ACTION_NEXT)
{
return false;
}
helperMethod.hideKeyboard();
String url = helperMethod.completeURL(v.getText().toString());
try
{
URL host = new URL(url);
boolean isUrlValid = Patterns.WEB_URL.matcher(url).matches();
if(isUrlValid && host.getHost().replace("www.","").contains("."))
{
if(host.getHost().contains(constants.backendUrlHost) || host.getHost().contains(constants.frontEndUrlHost) || host.getHost().contains(constants.frontEndUrlHost_v1))
{
fabricManager.getInstance().sendEvent("EDITOR BASE URL REQUEST : " + url);
appContoller.onloadURL(url.replace(constants.frontEndUrlHost_v1,constants.backendUrlHost),false,true);
return true;
}
else
{
fabricManager.getInstance().sendEvent("EDITOR ONION URL REQUEST : " + url);
home_model.getInstance().getHomeInstance().onloadURL(url,true,true);
return true;
}
}
}
catch (IOException e){}
String editedURL = getSearchEngine(v.getText().toString().replaceAll(" ","+"));
home_model.getInstance().addHistory(editedURL);
appContoller.onloadURL(editedURL,false,true);
appContoller.onClearSearchBarCursorView();
fabricManager.getInstance().sendEvent("EDITOR SEARCHED : " + editedURL);
return true;
}
public String getSearchEngine(String query)
{
if(status.search_status.equals(enums.searchEngine.Darkweb.toString()))
{
return "https://boogle.store/search?q="+query+"&p_num=1&s_type=all&savesearch=on";
}
else if(status.search_status.equals(enums.searchEngine.Google.toString()))
{
return "https://www.google.com/search?source=hp&q="+query;
}
else
{
return "https://www.bing.com/search?q="+query;
}
}
public void onReloadButtonPressed(View view)
{
fabricManager.getInstance().sendEvent("RELOAD BUTTON PRESSSED : ");
appContoller.onReload();
}
void onMenuButtonPressed(View view)
{
appContoller.openMenu(view);
}
void onHomeButtonPressed()
{
appContoller.stopHiddenView(true,false);
fabricManager.getInstance().sendEvent("HOME BUTTON PRESSSED : ");
viewController.getInstance().checkSSLTextColor();
appContoller.initSearchEngine();
helperMethod.hideKeyboard();
}
void onFloatingButtonPressed()
{
fabricManager.getInstance().sendEvent("FLOATING BUTTON PRESSSED : ");
message_manager.getInstance().reportURL();
}
void onBackPressed()
{
fabricManager.getInstance().sendEvent("BACK BUTTON PRESSSED : ");
appContoller.onBackPressedView();
}
void onMenuPressed(int menuId)
{
if (menuId == R.id.menu1) {
helperMethod.openActivity(list_controller.class,constants.list_history);
}
else if (menuId == R.id.menu2) {
switchSearchEngine();
}
else if (menuId == R.id.menu3) {
helperMethod.openActivity(setting_controller.class,constants.list_history);
}
else if (menuId == R.id.menu4)
{
message_manager.getInstance().bookmark(home_model.getInstance().getHomeInstance().getSearchBarUrl());
}
else if (menuId == R.id.menu5)
{
helperMethod.openActivity(list_controller.class,constants.list_bookmark);
}
else if (menuId == R.id.menu6)
{
message_manager.getInstance().reportURL();
}
else if (menuId == R.id.menu7)
{
helperMethod.rateApp();
}
else if (menuId == R.id.menu8)
{
helperMethod.shareApp();
}
else if (menuId == R.id.menu0)
{
helperMethod.openDownloadFolder();
}
else if (menuId == R.id.menu9)
{
helperMethod.openActivity(setting_controller.class,constants.list_history);
}
}
private void switchSearchEngine()
{
setting_model.getInstance().search_status = "Google";
preference_manager.getInstance().setString(keys.search_engine, setting_model.getInstance().search_status);
if(status.search_status.equals("Google"))
{
preference_manager.getInstance().setString(keys.search_engine,"Hidden Web");
status.search_status = "Hidden Web";
home_model.getInstance().getHomeInstance().initSearchEngine();
}
else
{
if(orbot_manager.getInstance().initOrbot("https://google.com"))
{
preference_manager.getInstance().setString(keys.search_engine,"Google");
status.search_status = "Google";
home_model.getInstance().getHomeInstance().initSearchEngine();
}
}
}
}

View File

@ -1,180 +0,0 @@
package com.darkweb.genesissearchengine.appManager.home_activity;
import android.content.Context;
import android.net.Uri;
import com.darkweb.genesissearchengine.appManager.database_manager.database_controller;
import com.darkweb.genesissearchengine.appManager.list_manager.list_row_model;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.enums;
import com.darkweb.genesissearchengine.constants.status;
import java.text.SimpleDateFormat;
import java.util.*;
public class home_model
{
/*Data Objects*/
private ArrayList<list_row_model> history = new ArrayList<list_row_model>();
private ArrayList<list_row_model> bookmarks = new ArrayList<list_row_model>();
private ArrayList<navigation_model> navigation = new ArrayList<navigation_model>();
private HashSet<String> suggestions = new HashSet<String>();
private static int port = 9150;
private Context appContext;
private home_controller appInstance;
/*Initializations*/
public void initialization(){
database_controller.getInstance().initialize();
initializeHistory();
initializeBookmarks();
}
/*Setter Getter Initializations*/
private static final home_model ourInstance = new home_model();
public static home_model getInstance()
{
return ourInstance;
}
/*Getters Setters*/
public int getPort()
{
return port;
}
public void setPort(int port)
{
home_model.port = port;
}
public void setAppContext(Context appContext)
{
this.appContext = appContext;
}
public Context getAppContext()
{
return appContext;
}
public home_controller getHomeInstance()
{
return appInstance;
}
public void setAppInstance(home_controller appInstance)
{
this.appInstance = appInstance;
}
public void initializeHistory(){
if(!status.history_status)
{
history = database_controller.getInstance().selectHistory();
}
else
{
database_controller.getInstance().execSQL("delete from history where 1",null);
}
home_model.getInstance().getHomeInstance().reInitializeSuggestion();
}
public void addHistory(String url) {
if(history.size()> constants.max_history_size)
{
database_controller.getInstance().execSQL("delete from history where id="+history.get(history.size()-1).getId(),null);
history.remove(history.size()-1);
}
int autoval = 0;
if(history.size()>0)
{
autoval = history.get(0).getId()+1;
}
addSuggestions(url);
SimpleDateFormat d_form = new SimpleDateFormat("dd MMMM | hh:mm a");
String date = d_form.format(new Date());
String[] params = new String[1];
params[0] = url;
database_controller.getInstance().execSQL("INSERT INTO history(id,date,url) VALUES("+autoval+",'"+date+"',?);",params);
history.add(0,new list_row_model(url,date,autoval));
}
public ArrayList<list_row_model> getHistory() {
return history;
}
private void initializeBookmarks(){
bookmarks = database_controller.getInstance().selectBookmark();
}
public void addBookmark(String url,String title){
int autoval = 0;
if(bookmarks.size()> constants.max_bookmark_size)
{
database_controller.getInstance().execSQL("delete from bookmark where id="+bookmarks.get(bookmarks.size()-1).getId(),null);
bookmarks.remove(history.size()-1);
}
if(bookmarks.size()>0)
{
autoval = bookmarks.get(0).getId()+1;
}
if(title.equals(""))
{
title = "New_Bookmark"+autoval;
}
String[] params = new String[2];
params[0] = title;
params[1] = url;
database_controller.getInstance().execSQL("INSERT INTO bookmark(id,title,url) VALUES("+autoval+",?,?);",params);
bookmarks.add(0,new list_row_model(url,title,autoval));
}
public ArrayList<list_row_model> getBookmark(){
return bookmarks;
}
public void initSuggestions(String url) {
suggestions.add(url.replace("https://","").replace("http://",""));
}
public void addSuggestions(String url) {
if(url.contains("boogle.store"))
{
Uri uri = Uri.parse(url);
String actual_url = uri.getQueryParameter("q");
suggestions.add(actual_url);
}
suggestions.add(url.replace("https://","").replace("http://",""));
home_model.getInstance().getHomeInstance().reInitializeSuggestion();
}
public ArrayList<String> getSuggestions() {
return new ArrayList<String>(suggestions);
}
/*Navigation*/
public void addNavigation(String url,enums.navigationType type) {
if(navigation.size()==0 || !navigation.get(navigation.size()-1).getURL().equals(url))
{
navigation.add(new navigation_model(url,type));
}
}
public ArrayList<navigation_model> getNavigation() {
return navigation;
}
/*Helper Method*/
public boolean isUrlRepeatable(String url,String viewUrl){
return url.equals(viewUrl) && !home_model.getInstance().getHomeInstance().isInternetErrorOpened() || url.contains("https://boogle.store/search?q=&");
}
}

View File

@ -1,26 +0,0 @@
package com.darkweb.genesissearchengine.appManager.home_activity;
import com.darkweb.genesissearchengine.constants.enums;
public class navigation_model
{
private String url;
private enums.navigationType type;
/*Initializations*/
public navigation_model(String url, enums.navigationType type) {
this.url = url;
this.type = type;
}
/*Variable Getters*/
public String getURL() {
return url;
}
public enums.navigationType type() {
return type;
}
}

View File

@ -1,503 +0,0 @@
package com.darkweb.genesissearchengine.appManager.home_activity;
import android.annotation.SuppressLint;
import android.content.pm.ActivityInfo;
import android.content.res.Resources;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.os.Handler;
import android.os.Message;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.style.ForegroundColorSpan;
import android.util.Log;
import android.view.*;
import android.webkit.WebView;
import android.widget.*;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.view.MenuCompat;
import com.darkweb.genesissearchengine.appManager.setting_manager.setting_model;
import com.darkweb.genesissearchengine.constants.*;
import com.darkweb.genesissearchengine.dataManager.preference_manager;
import com.darkweb.genesissearchengine.helperMethod;
import com.darkweb.genesissearchengine.httpManager.serverRequestManager;
import com.darkweb.genesissearchengine.pluginManager.message_manager;
import com.darkweb.genesissearchengine.pluginManager.orbot_manager;
import com.example.myapplication.R;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
public class viewController
{
/*ViewControllers*/
private WebView webView;
private ProgressBar progressBar;
private AutoCompleteTextView searchbar;
private ConstraintLayout splashScreen;
private ConstraintLayout requestFailure;
private FloatingActionButton floatingButton;
private ImageView loading;
private ImageView splashlogo;
private TextView loadingText;
/*Private Variables*/
private boolean pageLoadedSuccessfully = true;
private boolean isSplashLoading = false;
private Handler updateUIHandler = null;
/*ProgressBar Delayed Updater*/
Handler progressBarHandler = null;
/*Initializations*/
private static final viewController ourInstance = new viewController();
public static viewController getInstance()
{
return ourInstance;
}
private viewController()
{
}
void initialization(WebView webView1, TextView loadingText, ProgressBar progressBar, AutoCompleteTextView searchbar, ConstraintLayout splashScreen, ConstraintLayout requestFailure, FloatingActionButton floatingButton, ImageView loading, ImageView splashlogo)
{
this.webView = webView1;
this.progressBar = progressBar;
this.searchbar = searchbar;
this.splashScreen = splashScreen;
this.requestFailure = requestFailure;
this.floatingButton = floatingButton;
this.loading = loading;
this.splashlogo = splashlogo;
this.loadingText = loadingText;
home_model.getInstance().getHomeInstance().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
checkSSLTextColor();
initSplashScreen();
initLock();
initViews();
createUpdateUiHandler();
initializeSuggestionView();
}
private void initializeSuggestionView()
{
AutoCompleteAdapter suggestionAdapter = new AutoCompleteAdapter(home_model.getInstance().getHomeInstance(), R.layout.hint_view, R.id.hintCompletionHeader, home_model.getInstance().getSuggestions());
int width = Math.round(helperMethod.screenWidth());
searchbar.setThreshold(2);
searchbar.setAdapter(suggestionAdapter);
searchbar.setDropDownVerticalOffset(22);
searchbar.setDropDownWidth(Math.round(width*0.95f));
searchbar.setDropDownHorizontalOffset(Math.round(width*0.114f)*-1);
Drawable drawable;
Resources res = home_model.getInstance().getHomeInstance().getResources();
try {
drawable = Drawable.createFromXml(res, res.getXml(R.xml.rouned_corner));
searchbar.setDropDownBackgroundDrawable(drawable);
} catch (Exception ex) {
Log.i("sdfsdf", ex.getMessage());
}
}
void reInitializeSuggestion()
{
initializeSuggestionView();
}
private boolean isHiddenView()
{
return home_model.getInstance().getHomeInstance().isGeckoViewRunning();
}
private void initViews()
{
floatingButton.setVisibility(View.INVISIBLE);
}
private void initLock()
{
Drawable img = home_model.getInstance().getHomeInstance().getResources().getDrawable( R.drawable.icon_lock);
searchbar.measure(0, 0);
img.setBounds( 0, (int)(searchbar.getMeasuredHeight()*0.00), (int)(searchbar.getMeasuredHeight()*1.10), (int)(searchbar.getMeasuredHeight()*0.69) );
searchbar.setCompoundDrawables( img, null, null, null );
}
void onRequestTriggered(boolean isHiddenWeb, String url)
{
onProgressBarUpdate(4);
helperMethod.hideKeyboard();
pageLoadedSuccessfully = true;
onUpdateSearchBar(url);
checkSSLTextColor();
onClearSearchBarCursor();
searchbar.setFocusableInTouchMode(false);
searchbar.setFocusable(false);
searchbar.setFocusableInTouchMode(true);
searchbar.setFocusable(true);
}
/*Helper Methods*/
void onInternetError()
{
disableSplashScreen();
requestFailure.setVisibility(View.VISIBLE);
webView.setAlpha(0);
requestFailure.animate().alpha(1f).setDuration(150);
pageLoadedSuccessfully = false;
onClearSearchBarCursor();
onProgressBarUpdate(0);
disableFloatingView();
home_model.getInstance().getHomeInstance().releaseSession();
}
private void disableSplashScreen()
{
if(!isSplashLoading)
{
isSplashLoading = true;
new Thread()
{
public void run()
{
try
{
boolean isFirstInstall = preference_manager.getInstance().getBool(keys.hasOrbotInstalled,true);
boolean isHidden = (status.search_status.equals(enums.searchEngine.Google.toString()) || status.search_status.equals(enums.searchEngine.Bing.toString()));
while (!status.isTorInitialized && (isFirstInstall || status.search_status.equals(enums.searchEngine.Google.toString()) || status.search_status.equals(enums.searchEngine.Bing.toString())))
{
startPostTask(messages.UPDATE_LOADING_TEXT);
sleep(100);
}
if(isHidden)
{
if(!isFirstInstall)
{
startPostTask(messages.LOAD_COMPLETED);
}
else
{
startPostTask(messages.INSTALL_COMPLETED);
}
}
preference_manager.getInstance().setBool(keys.hasOrbotInstalled,false);
startPostTask(messages.DISABLE_SPLASH_SCREEN);
}
catch (Exception ex)
{
Log.i("Fizza",ex.getMessage());
}
}
}.start();
}
}
public void startPostTask(int m_id)
{
Message message = new Message();
message.what = m_id;
updateUIHandler.sendMessage(message);
}
@SuppressLint("HandlerLeak")
private void createUpdateUiHandler()
{
updateUIHandler = new Handler()
{
@Override
public void handleMessage(Message msg)
{
if(msg.what == messages.INSTALL_COMPLETED)
{
loadingText.setText("Installed Successfully | Starting Search");
}
else if(msg.what == messages.LOAD_COMPLETED)
{
loadingText.setText("Loading Successfully | Starting Search");
}
else if(msg.what == messages.UPDATE_LOADING_TEXT)
{
loadingText.setText(orbot_manager.getInstance().getLogs());
}
else if(msg.what == messages.DISABLE_SPLASH_SCREEN)
{
boolean e_status = home_model.getInstance().getHomeInstance().initSearchEngine();
if(e_status)
{
hideSplashScreen();
}
}
}
};
}
void hideSplashScreen()
{
if(splashScreen.getVisibility()!=View.GONE)
{
onWelcomeMessageCheck();
}
status.isApplicationLoaded = true;
splashScreen.animate().alpha(0.0f).setDuration(200).setListener(null).withEndAction((() -> splashScreen.setVisibility(View.GONE)));
}
boolean onDisableInternetError()
{
if(requestFailure.getAlpha()==1)
{
requestFailure.animate().alpha(0f).setDuration(150).withEndAction((() -> requestFailure.setVisibility(View.INVISIBLE)));
return true;
}
else
{
return false;
}
}
@SuppressLint("RestrictedApi")
void onPageFinished(boolean status)
{
helperMethod.hideKeyboard();
progressBar.setProgress(100);
if(!status)
{
if(pageLoadedSuccessfully)
{
requestFailure.animate().alpha(0f).setStartDelay(200).setDuration(200).withEndAction((() -> requestFailure.setVisibility(View.INVISIBLE)));
onUpdateView(true);
}
//onUpdateSearchBar(webView.getUrl());
disableSplashScreen();
floatingButton.animate().alpha(0).withEndAction((() -> floatingButton.setVisibility(View.GONE)));
home_model.getInstance().getHomeInstance().stopHiddenView(false,false);
}
else
{
onUpdateView(false);
floatingButton.animate().alpha(1).withEndAction((() -> floatingButton.setVisibility(View.VISIBLE)));
}
}
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);
}
}
void onClearSearchBarCursor()
{
searchbar.clearFocus();
}
void disableFloatingView()
{
floatingButton.animate().alpha(0).withEndAction((() -> floatingButton.setVisibility(View.GONE)));
}
void onUpdateSearchBar(String url)
{
if(!url.equals("about:blank"))
{
searchbar.setText(url.replace(constants.backendUrlHost,constants.frontEndUrlHost_v1));
checkSSLTextColor();
}
}
private void initSplashScreen()
{
boolean hasSoftKey = helperMethod.hasSoftKeys(home_model.getInstance().getHomeInstance().getWindowManager());
int height = helperMethod.screenHeight(hasSoftKey);
splashlogo.getLayoutParams().height = height;
loading.setAnimation(helperMethod.getRotationAnimation());
loading.setLayoutParams(helperMethod.getCenterScreenPoint(loading.getLayoutParams()));
}
void onProgressBarUpdate(int progress)
{
if(progress==0)
{
progressBar.animate().alpha(0).withEndAction((() -> progressBar.setProgress(progress)));
}
else if(splashScreen.getVisibility() == View.GONE)
{
if(progressBar.getVisibility()==View.INVISIBLE)
{
progressBar.setProgress(4);
}
else
{
progressBar.setProgress(progress);
}
progressBar.setVisibility(View.VISIBLE);
progressBar.setAlpha(1);
}
}
void onBackPressed()
{
if(home_model.getInstance().getNavigation().size()>0)
{
if(home_model.getInstance().getNavigation().size()==1)
{
onProgressBarUpdate(0);
helperMethod.onMinimizeApp();
return;
}
else if(home_model.getInstance().getNavigation().get(home_model.getInstance().getNavigation().size()-2).type().equals(enums.navigationType.base))
{
home_model.getInstance().getHomeInstance().stopHiddenView(true,true);
if(webView.getVisibility()==View.VISIBLE)
{
onProgressBarUpdate(4);
webView.goBack();
}
else
{
onProgressBarUpdate(0);
}
/*CHANGED BUT NOT TESTED*/
home_model.getInstance().getNavigation().remove(home_model.getInstance().getNavigation().size()-1);
webView.bringToFront();
webView.setAlpha(1);
webView.setVisibility(View.VISIBLE);
requestFailure.animate().alpha(0f).setDuration(200).withEndAction((() -> requestFailure.setVisibility(View.INVISIBLE)));
onUpdateSearchBar(webView.getUrl());
floatingButton.animate().alpha(0).withEndAction((() -> floatingButton.setVisibility(View.GONE)));
}
else
{
home_model.getInstance().getHomeInstance().stopHiddenView(true,true);
home_model.getInstance().getNavigation().remove(home_model.getInstance().getNavigation().size()-1);
if(webView.getVisibility()==View.VISIBLE)
{
home_model.getInstance().getHomeInstance().onReInitGeckoView();
home_model.getInstance().getHomeInstance().onReloadHiddenView();
}
else
{
home_model.getInstance().getHomeInstance().onHiddenGoBack();
}
}
}
}
void onUpdateView(boolean status)
{
if(status)
{
floatingButton.animate().alpha(0).withEndAction((() -> floatingButton.setVisibility(View.GONE)));
webView.setAlpha(1);
webView.setVisibility(View.VISIBLE);
webView.bringToFront();
onProgressBarUpdate(0);
onUpdateSearchBar(webView.getUrl());
}
else
{
webView.animate().alpha(0).setDuration(150).withEndAction((() -> webView.setVisibility(View.GONE)));
}
}
private void onWelcomeMessageCheck()
{
if(!preference_manager.getInstance().getBool("FirstTimeLoaded",false))
{
message_manager.getInstance().welcomeMessage();
}
serverRequestManager.getInstance().versionChecker();
}
public void onShowAds()
{
startPostTask(messages.SHOW_ADS);
}
void openMenu(View view)
{
LinearLayout parentView = (LinearLayout)view.getParent();
PopupMenu popup = new PopupMenu(home_model.getInstance().getHomeInstance(), parentView,Gravity.RIGHT);
MenuInflater inflater = popup.getMenuInflater();
inflater.inflate(R.menu.menu_main, popup.getMenu());
MenuCompat.setGroupDividerEnabled(popup.getMenu(), true);
popup.setOnMenuItemClickListener(item ->
{
home_model.getInstance().getHomeInstance().onMenuOptionSelected(item);
return true;
});
MenuItem item = popup.getMenu().findItem(R.id.menu2);
if(status.search_status.equals("Google"))
{
item.setTitle("Switch | Secure Hidden Web");
}
else
{
item.setTitle("Switch | Secure Google");
}
popup.show();
view.bringToFront();
}
void onReload()
{
if(home_model.getInstance().getNavigation().get(home_model.getInstance().getNavigation().size()-1).type()==enums.navigationType.base)
{
onRequestTriggered(false,webView.getUrl());
webView.reload();
}
else
{
home_model.getInstance().getHomeInstance().onReloadHiddenView();
}
}
String getSearchBarUrl()
{
return searchbar.getText().toString();
}
public void lowMemoryError()
{
if(preference_manager.getInstance().getBool(keys.low_memory,false))
{
preference_manager.getInstance().setBool(keys.low_memory,false);
helperMethod.showToast("App Closed Due To Low Memory");
}
}
}

View File

@ -1,118 +0,0 @@
package com.darkweb.genesissearchengine.appManager.home_activity;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import com.darkweb.genesissearchengine.constants.enums;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.helperMethod;
import com.darkweb.genesissearchengine.pluginManager.fabricManager;
import com.darkweb.genesissearchengine.pluginManager.orbot_manager;
public class webviewClient
{
boolean isGeckoView = false;
public void loadWebViewClient(WebView webview)
{
WebViewClient client = new WebViewClient()
{
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url)
{
if(url.contains("advert"))
{
home_model.getInstance().getHomeInstance().onProgressBarUpdateView(0);
helperMethod.openPlayStore(url.split("__")[1]);
return true;
}
isGeckoView = false;
if(home_model.getInstance().isUrlRepeatable(url,view.getUrl()))
{
home_model.getInstance().getHomeInstance().onProgressBarUpdateView(0);
return true;
}
if(!url.contains("boogle"))
{
home_model.getInstance().getHomeInstance().stopHiddenView(false,false);
fabricManager.getInstance().sendEvent("BASE SIMPLE SEARCHED : " + url);
isGeckoView = true;
if(orbot_manager.getInstance().initOrbot(url))
{
home_model.getInstance().getHomeInstance().onloadURL(url,true,true);
}
return true;
}
else
{
/* if(url.startsWith("https://boogle.store/search?"))
{
url = url.replace("https://boogle.store/search?q=random&p_num=1&s_type=image","https://duckduckgo.com/?q=onion+links+websites&iar=images&iax=images&ia=images");
url = url.replace("boogle.store/search?","duckduckgo.com/?");
url = url.replace("q=","q=onion+links+");
url = url.replace("&s_type=image","&ia=images&iax=images");
home_model.getInstance().getHomeInstance().stopHiddenView(false,false);
fabricManager.getInstance().sendEvent("BASE SIMPLE SEARCHED : " + url);
isGeckoView = true;
if(orbot_manager.getInstance().initOrbot(url))
{
home_model.getInstance().getHomeInstance().onloadURL(url,true,true);
}
return true;
}
else
{
home_model.getInstance().addNavigation(url,enums.navigationType.base);
home_model.getInstance().addHistory(url);
fabricManager.getInstance().sendEvent("BASE ONION SEARCHED : " + url);
home_model.getInstance().getHomeInstance().onRequestTriggered(false,url);
} */
home_model.getInstance().addNavigation(url,enums.navigationType.base);
home_model.getInstance().addHistory(url);
fabricManager.getInstance().sendEvent("BASE ONION SEARCHED : " + url);
home_model.getInstance().getHomeInstance().onRequestTriggered(false,url);
return false;
}
}
@Override
public void onPageFinished(WebView view, String url)
{
super.onPageFinished(view, url);
home_model.getInstance().getHomeInstance().onPageFinished(false);
home_model.getInstance().getHomeInstance().onUpdateSearchBarView(url);
home_model.getInstance().getHomeInstance().onProgressBarUpdateView(0);
status.isApplicationLoaded = true;
fabricManager.getInstance().sendEvent("BASE SUCCESSFULLY LOADED : " + url);
}
@Override
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl)
{
fabricManager.getInstance().sendEvent("BASE URL ERROR : " + failingUrl + "--" + description);
home_model.getInstance().getHomeInstance().onInternetErrorView();
}
};
webview.setWebViewClient(client);
webview.setWebChromeClient(new WebChromeClient()
{
public void onProgressChanged(WebView view, int newProgress)
{
if(!isGeckoView)
{
if(newProgress<95 && newProgress>5)
{
home_model.getInstance().getHomeInstance().onProgressBarUpdateView(newProgress);
}
else if(newProgress<=5)
{
home_model.getInstance().getHomeInstance().onProgressBarUpdateView(4);
}
}
}
});
}
}

View File

@ -8,6 +8,7 @@ import androidx.fragment.app.Fragment;
import android.view.View; import android.view.View;
import com.darkweb.genesissearchengine.appManager.bridgeManager.bridgeController; import com.darkweb.genesissearchengine.appManager.bridgeManager.bridgeController;
import com.darkweb.genesissearchengine.pluginManager.pluginController;
import com.example.myapplication.R; import com.example.myapplication.R;
import com.github.paolorotolo.appintro.AppIntro; import com.github.paolorotolo.appintro.AppIntro;
@ -17,6 +18,7 @@ public class landingController extends AppIntro {
@Override @Override
protected void onCreate(@Nullable Bundle savedInstanceState) { protected void onCreate(@Nullable Bundle savedInstanceState) {
pluginController.getInstance().onCreate(this);
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
// Instead of fragments, you can also use our default slide // Instead of fragments, you can also use our default slide

View File

@ -0,0 +1,93 @@
package com.darkweb.genesissearchengine.appManager.languageManager;
import android.os.Bundle;
import android.view.View;
import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.constants.enums;
import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.dataManager.dataController;
import com.darkweb.genesissearchengine.helperManager.eventObserver;
import com.darkweb.genesissearchengine.pluginManager.pluginController;
import com.example.myapplication.R;
import java.util.List;
import java.util.Locale;
@SuppressWarnings("FieldCanBeLocal")
public class languageController extends AppCompatActivity {
/*Initializations*/
private languageViewController mLanguageViewController;
private languageModel mLanguageModel;
@Override
protected void onCreate(Bundle savedInstanceState) {
pluginController.getInstance().onCreate(this);
super.onCreate(savedInstanceState);
setContentView(R.layout.language_view);
initializeAppModel();
initializeConnections();
}
public void initializeAppModel()
{
mLanguageViewController = new languageViewController();
mLanguageModel = new languageModel();
}
public void initializeConnections()
{
mLanguageViewController.initialization(new languageViewCallback(),this);
}
public class languageViewCallback implements eventObserver.eventListener{
@Override
public void invokeObserver(List<Object> data, enums.etype e_type)
{
}
}
public void changeLanguage(Locale language){
status.sLanguage = language.getLanguage();
dataController.getInstance().setString(keys.LANGUAGE,language.getLanguage());
pluginController.getInstance().setLanguage(this);
}
/*-------------------------------------------------------CALLBACKS-------------------------------------------------------*/
public void onNavigationBackPressed(View view) {
finish();
}
public void onMenuItemInvoked(View view) {
int menuId = view.getId();
if (menuId == R.id.langEnglish) {
changeLanguage(Locale.ENGLISH);
}
else if (menuId == R.id.langGerman) {
changeLanguage(new Locale("de"));
}
else if (menuId == R.id.langItalian) {
changeLanguage(new Locale("it"));
}
else if (menuId == R.id.langPorteguse) {
changeLanguage(new Locale("pt"));
}
else if (menuId == R.id.langRussian) {
changeLanguage(new Locale("ru"));
}
else if (menuId == R.id.langUkarian) {
changeLanguage(new Locale("uk"));
}
else if (menuId == R.id.langChinese) {
changeLanguage(new Locale("zh"));
}
finish();
}
}

View File

@ -0,0 +1,7 @@
package com.darkweb.genesissearchengine.appManager.languageManager;
class languageModel
{
}

View File

@ -0,0 +1,35 @@
package com.darkweb.genesissearchengine.appManager.languageManager;
import android.os.Build;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.helperManager.eventObserver;
import com.example.myapplication.R;
class languageViewController
{
/*ViewControllers*/
private AppCompatActivity mContext;
private eventObserver.eventListener mEvent;
void initialization(eventObserver.eventListener event, AppCompatActivity context){
this.mContext = context;
initPostUI();
}
private void initPostUI(){
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Window window = mContext.getWindow();
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) {
window.setStatusBarColor(mContext.getResources().getColor(R.color.blue_dark));
}
else {
mContext.getWindow().setStatusBarColor(mContext.getColor(R.color.white));
mContext.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);// set status text dark
}
}
}
}

View File

@ -1,67 +0,0 @@
package com.darkweb.genesissearchengine.appManager.launcherManager;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.enums;
import com.darkweb.genesissearchengine.constants.strings;
import com.darkweb.genesissearchengine.helperManager.eventObserver;
import com.darkweb.genesissearchengine.helperManager.helperMethod;
import com.darkweb.genesissearchengine.pluginManager.pluginController;
import com.example.myapplication.R;
import java.util.List;
/*Not Yet Registered Belongs To Previous Builds
* Application Error Fallback Restart Instead Of Crash
**/
public class launcherController extends AppCompatActivity
{
/*Private Variables*/
private launcherViewController mLauncherViewController;
private boolean mIsStarted = false;
/*Initializations*/
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.invalid_setup_view);
initViews();
helperMethod.openActivity(homeController.class, constants.LIST_HISTORY, this,false);
}
private void initViews(){
mLauncherViewController = new launcherViewController(this,new launcherViewCallback());
}
/*Activity State Manager*/
@Override
public void onResume()
{
activityContextManager.getInstance().setCurrentActivity(this);
if(mIsStarted){
helperMethod.openActivity(homeController.class, constants.LIST_HISTORY, this,false);
pluginController.getInstance().logEvent(strings.APP_RESTARTED);
}
else {
mIsStarted = true;
}
super.onResume();
}
/*Initializations Callbacks*/
public class launcherViewCallback implements eventObserver.eventListener
{
@Override
public void invokeObserver(List<Object> data, enums.etype e_type)
{
}
}
}

View File

@ -1,30 +0,0 @@
package com.darkweb.genesissearchengine.appManager.launcherManager;
import android.os.Build;
import android.view.Window;
import android.view.WindowManager;
import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.helperManager.eventObserver;
import com.example.myapplication.R;
class launcherViewController
{
/*Private Variables*/
private AppCompatActivity mContext;
/*Initializations*/
launcherViewController(AppCompatActivity mContext, eventObserver.eventListener event){
this.mContext = mContext;
initUI();
}
private void initUI(){
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Window window = mContext.getWindow();
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
window.setStatusBarColor(mContext.getResources().getColor(R.color.ease_blue));
}
}
}

View File

@ -1,93 +0,0 @@
package com.darkweb.genesissearchengine.appManager.list_manager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.*;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.darkweb.genesissearchengine.constants.constants;
import com.example.myapplication.R;
public class list_adapter extends RecyclerView.Adapter<list_adapter.listViewHolder>
{
list_adapter() {
}
/*Initializations*/
@NonNull
@Override
public listViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_row_view, parent, false);
return new listViewHolder(view);
}
@Override
public void onBindViewHolder(@NonNull list_adapter.listViewHolder holder, int position)
{
holder.bindListView(list_model.getInstance().getModel().get(position));
clearMessageItem(holder.messageButton,position);
}
@Override
public int getItemCount() {
return list_model.getInstance().getModel().size();
}
private void setItemViewOnClickListener(View itemView, String url)
{
itemView.setOnClickListener(v ->
{
list_model.getInstance().getListInstance().onUrlClick(url);
});
}
private void clearMessageItem(ImageButton clearButton, int index)
{
list_model.getInstance().getListInstance().onClickListenersInitialize(clearButton,index);
}
/*View Holder Extensions*/
class listViewHolder extends RecyclerView.ViewHolder
{
TextView heaaderText;
TextView descriptionText;
ImageButton messageButton;
ImageView empty_message;
listViewHolder(View itemView) {
super(itemView);
}
void bindListView(list_row_model model) {
heaaderText = itemView.findViewById(R.id.header);
descriptionText = itemView.findViewById(R.id.description);
String header = model.getHeader();
if(model.getHeader().length()<=2)
{
header = model.getDescription() + model.getHeader();
}
if(list_model.getInstance().getType() == constants.list_bookmark)
{
heaaderText.setText(list_model.getInstance().getListInstance().removeHttpRequest(model.getDescription()));
descriptionText.setText(header);
}
else
{
heaaderText.setText(list_model.getInstance().getListInstance().removeHttpRequest(header));
descriptionText.setText(model.getDescription());
}
messageButton = itemView.findViewById(R.id.message_button);
empty_message = itemView.findViewById(R.id.empty_list);
setItemViewOnClickListener(itemView,header);
}
}
}

View File

@ -1,122 +0,0 @@
package com.darkweb.genesissearchengine.appManager.list_manager;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.darkweb.genesissearchengine.appManager.home_activity.home_model;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.keys;
import com.example.myapplication.R;
import java.util.Objects;
public class list_controller extends AppCompatActivity
{
/*Private Variables*/
private ImageView emptyListNotifier;
private EditText searchBar;
private RecyclerView listView;
private list_view_controller viewController;
/*Initializations*/
@Override
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.list_view);
initializeListInstance();
initializeListModel();
initializeViews();
initializeList();
initSearchBar();
updatelist();
}
public void initializeListInstance(){
list_model.getInstance().setListInstance(this);
list_model.getInstance().setListContext(this);
}
public void initializeListModel(){
Bundle bundle = getIntent().getExtras();
if(Objects.requireNonNull(bundle).getInt(keys.list_type)==constants.list_bookmark)
{
list_model.getInstance().setType(constants.list_bookmark);
list_model.getInstance().setMainList(home_model.getInstance().getBookmark());
}
else
{
list_model.getInstance().setType(constants.list_history);
list_model.getInstance().setMainList(home_model.getInstance().getHistory());
}
}
public void initializeViews(){
emptyListNotifier = findViewById(R.id.empty_list);
searchBar = findViewById(R.id.search);
listView = findViewById(R.id.listview);
viewController = new list_view_controller(emptyListNotifier,searchBar,listView);
}
public void initializeList(){
list_adapter adapter = new list_adapter();
listView.setAdapter(adapter);
listView.setLayoutManager(new LinearLayoutManager(this));
updateListStatus(false);
}
/*View Handlers*/
public void onClearHistory(View view)
{
viewController.onClearHistory();
}
public void onClearAll(){
viewController.onClearAll();
initializeViews();
}
public void updateListStatus(boolean animate)
{
viewController.updateListStatus(animate);
}
public void initSearchBar()
{
list_ehandler.getInstance().onEditorActionListener(searchBar);
}
public boolean updatelist(){
viewController.updateList();
updateListStatus(false);
return true;
}
public void closeView()
{
viewController.closeView();
}
public void onDatasetChanged(int index)
{
viewController.onDatasetChanged(index);
}
public void onClearSearchBarCursor() {
viewController.onClearSearchBarCursor();
}
public String removeHttpRequest(String view){
return viewController.removeHttpRequest(view);
}
/*Event Handlers*/
public void onBackPressed(View view)
{
list_ehandler.getInstance().onBackPressed();
}
public void onUrlClick(String url)
{
list_ehandler.getInstance().onUrlClick(url);
}
public void onClickListenersInitialize(View view,int index) {
list_ehandler.getInstance().onClickListenersInitialize(view,index);
}
}

View File

@ -1,96 +0,0 @@
package com.darkweb.genesissearchengine.appManager.list_manager;
import android.content.Context;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import com.darkweb.genesissearchengine.appManager.home_activity.home_model;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.enums;
import com.darkweb.genesissearchengine.helperMethod;
import com.darkweb.genesissearchengine.pluginManager.orbot_manager;
import com.example.myapplication.R;
public class list_ehandler
{
/*Initializations*/
private static final list_ehandler ourInstance = new list_ehandler();
public static list_ehandler getInstance()
{
return ourInstance;
}
private list_ehandler(){
}
/*Listener Initializations*/
void onEditorActionListener(EditText view)
{
view.setOnEditorActionListener((v, actionId, event) ->
{
if (actionId != EditorInfo.IME_ACTION_NEXT)
{
return false;
}
else
{
list_model.getInstance().getListInstance().onClearSearchBarCursor();
InputMethodManager imm = (InputMethodManager) list_model.getInstance().getListInstance().getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
return list_model.getInstance().getListInstance().updatelist();
}
});
}
void onClickListenersInitialize(View view,int index)
{
view.setOnClickListener(v ->
{
if(v.getId() == R.id.message_button)
{
onManualClear(index);
}
});
}
/*Listeners*/
private void onManualClear(int index)
{
list_model.getInstance().deleteFromDatabase(list_model.getInstance().getModel().get(index).getId());
list_model.getInstance().getModel().remove(index);
list_model.getInstance().removeFromMainList(list_model.getInstance().getIndex().get(index));
list_model.getInstance().removeIndex(index);
list_model.getInstance().getListInstance().onDatasetChanged(index);
list_model.getInstance().getListInstance().updateListStatus(true);
}
void onBackPressed()
{
list_model.getInstance().getListInstance().closeView();
}
void onUrlClick(String url)
{
String url_temp = helperMethod.completeURL(url);
home_model.getInstance().addNavigation(url, enums.navigationType.onion);
if(!url_temp.contains("boogle") && !url_temp.equals(constants.backendGoogle) && !url_temp.equals(constants.backendBing))
{
if(orbot_manager.getInstance().initOrbot(url_temp))
{
home_model.getInstance().getHomeInstance().onloadURL(url_temp,true,false);
}
}
else
{
home_model.getInstance().getHomeInstance().onloadURL(url_temp,false,false);
}
list_model.getInstance().getListInstance().closeView();
}
}

View File

@ -1,108 +0,0 @@
package com.darkweb.genesissearchengine.appManager.list_manager;
import android.content.Context;
import com.darkweb.genesissearchengine.appManager.database_manager.database_controller;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.strings;
import java.util.ArrayList;
public class list_model
{
/*Private Variables*/
private ArrayList<list_row_model> list_model = new ArrayList<>();
private ArrayList<Integer> list_index;
private ArrayList<list_row_model> main_model_ref = new ArrayList<>();
private list_controller listInstance;
private Context listContext;
private int listType;
/*Initializations*/
private static final list_model ourInstance = new list_model();
public static list_model getInstance()
{
return ourInstance;
}
private list_model(){
list_index = new ArrayList<>();
}
/*Helper Methods*/
void setType(int listType)
{
this.listType = listType;
}
int getType()
{
return listType;
}
void setModel(ArrayList<list_row_model> list_model)
{
this.list_model = list_model;
}
ArrayList<list_row_model> getModel()
{
return list_model;
}
void setIndex(int index){
list_index.add(index);
}
void removeIndex(int index){
list_index.remove(index);
for(int counter=index;counter<=list_index.size()-1;counter++)
{
list_index.set(counter,list_index.get(counter)-1);
}
}
ArrayList<Integer> getIndex(){
return list_index;
}
void setMainList(ArrayList<list_row_model> model)
{
main_model_ref = model;
}
ArrayList<list_row_model> getMainList()
{
return main_model_ref;
}
void removeFromMainList(int index)
{
main_model_ref.remove(index);
}
public list_controller getListInstance()
{
return listInstance;
}
void setListInstance(list_controller listInstance)
{
this.listInstance = listInstance;
}
public Context getListContext(){
return listContext;
}
void setListContext(Context listContext)
{
this.listContext = listContext;
}
/*Database Handler*/
void deleteFromDatabase(int index) {
String table = strings.bookmark_text;
if(getType()== constants.list_history)
{
table = strings.history_text;
}
database_controller.getInstance().execSQL("delete from "+table+" where id="+index,null);
}
}

View File

@ -1,30 +0,0 @@
package com.darkweb.genesissearchengine.appManager.list_manager;
public class list_row_model
{
/*Private Variables*/
private int id;
private String header;
private String description;
/*Initializations*/
public list_row_model(String header, String description,int id) {
this.id = id;
this.header = header;
this.description = description;
}
/*Variable Getters*/
public String getHeader() {
return header;
}
public String getDescription() {
return description;
}
public int getId() {
return id;
}
}

View File

@ -1,161 +0,0 @@
package com.darkweb.genesissearchengine.appManager.list_manager;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import androidx.recyclerview.widget.RecyclerView;
import com.darkweb.genesissearchengine.appManager.database_manager.database_controller;
import com.darkweb.genesissearchengine.appManager.home_activity.home_model;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.strings;
import com.darkweb.genesissearchengine.pluginManager.message_manager;
import java.util.ArrayList;
import java.util.Objects;
class list_view_controller
{
/*Private Variables*/
private ImageView emptyListNotifier;
private EditText searchBar;
private RecyclerView listView;
/*Initializations*/
list_view_controller(ImageView emptyListNotifier, EditText searchBar,RecyclerView listView)
{
this.emptyListNotifier = emptyListNotifier;
this.searchBar = searchBar;
this.listView = listView;
}
/*Handlers*/
void onClearHistory()
{
if(home_model.getInstance().getHistory().size()>0)
{
message_manager.getInstance().clearData();
}
}
void onClearAll()
{
list_model.getInstance().getModel().clear();
list_model.getInstance().getMainList().clear();
home_model.getInstance().getSuggestions().clear();
emptyListNotifier.setAlpha(0f);
emptyListNotifier.setVisibility(View.VISIBLE);
emptyListNotifier.animate().alpha(1);
searchBar.setText(strings.emptyStr);
String table = strings.bookmark_text;
if(list_model.getInstance().getType()== constants.list_history)
{
table = strings.history_text;
}
database_controller.getInstance().execSQL("delete from "+table+" where 1",null);
list_model.getInstance().getListInstance().initializeList();
}
void updateListStatus(boolean animate)
{
if(list_model.getInstance().getModel().size()<=0)
{
if(animate)
{
emptyListNotifier.setAlpha(0f);
emptyListNotifier.setVisibility(View.VISIBLE);
emptyListNotifier.animate().alpha(1);
}
else
{
emptyListNotifier.setVisibility(View.VISIBLE);
}
}
else
{
emptyListNotifier.setVisibility(View.GONE);
}
}
void updateList()
{
String query = searchBar.getText().toString();
ArrayList<list_row_model> temp_model = new ArrayList<>();
list_model.getInstance().getIndex().clear();
for(int counter=0;counter<=list_model.getInstance().getMainList().size()-1;counter++)
{
if(list_model.getInstance().getMainList().get(counter).getHeader().contains(query) || list_model.getInstance().getMainList().get(counter).getDescription().contains(query))
{
temp_model.add(list_model.getInstance().getMainList().get(counter));
list_model.getInstance().setIndex(counter);
}
}
list_model.getInstance().setModel(temp_model);
listView.getAdapter().notifyDataSetChanged();
}
void onDatasetChanged(int index)
{
Objects.requireNonNull(listView.getAdapter()).notifyItemRemoved(index);
listView.getAdapter().notifyDataSetChanged();
}
void closeView()
{
list_model.getInstance().getListInstance().finish();
}
public void onClearSearchBarCursor()
{
searchBar.clearFocus();
}
public String removeHttpRequest(String url)
{
if (url.startsWith("https://"))
{
return url.substring(8);
}
else if (url.startsWith("http://"))
{
return url.substring(7);
}
else
{
return url;
}
/*
if (view == null)
{
return;
}
if (view.getText().toString().contains("https://"))
{
SpannableString ss = new SpannableString(view.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);
view.setText(ss);
} else if (view.getText().toString().contains("http://"))
{
SpannableString ss = new SpannableString(view.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);
view.setText(ss);
} else
{
SpannableString ss = new SpannableString(view.getText());
ss.setSpan(new ForegroundColorSpan(Color.BLACK), 0, view.getText().length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
view.setText(ss);
}*/
}
}

View File

@ -27,6 +27,7 @@ public class orbotController extends AppCompatActivity {
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
pluginController.getInstance().onCreate(this);
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.orbot_settings_view); setContentView(R.layout.orbot_settings_view);

View File

@ -53,6 +53,7 @@ public class settingController extends AppCompatActivity
@Override @Override
protected void onCreate(Bundle savedInstanceState) protected void onCreate(Bundle savedInstanceState)
{ {
pluginController.getInstance().onCreate(this);
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.settings_view); setContentView(R.layout.settings_view);
@ -145,6 +146,10 @@ public class settingController extends AppCompatActivity
} }
else if(parentView.getId()== R.id.font_adjustable) else if(parentView.getId()== R.id.font_adjustable)
{ {
if(position==0){
mSettingModel.setFontSize(100);
}
mSettingViewController.setFontSizeAdjustable(position==0);
mSettingModel.setAdjustableStatus(position==0); mSettingModel.setAdjustableStatus(position==0);
} }
else if(parentView.getId()== R.id.cookies_manager) else if(parentView.getId()== R.id.cookies_manager)
@ -170,6 +175,8 @@ public class settingController extends AppCompatActivity
float cur_progress = seekBar.getProgress(); float cur_progress = seekBar.getProgress();
mSettingModel.setFontSize((cur_progress)); mSettingModel.setFontSize((cur_progress));
mSettingViewController.updatePercentage(mFontSize.getProgress()); mSettingViewController.updatePercentage(mFontSize.getProgress());
mSettingViewController.setFontSize(b);
mSettingModel.setAdjustableStatus(b);
if(cur_progress<1){ if(cur_progress<1){
mFontSize.setProgress(1); mFontSize.setProgress(1);
} }

View File

@ -144,6 +144,18 @@ class settingViewController
updatePercentage(mFontSize.getProgress()); updatePercentage(mFontSize.getProgress());
} }
void setFontSize(boolean status){
if(status){
mFontAdjustable.setSelection(1);
}
}
void setFontSizeAdjustable(boolean status){
if(status){
mFontSize.setProgress(100);
}
}
private void initSearchEngine() private void initSearchEngine()
{ {
mSearch.setSelection(getEngineIndex()); mSearch.setSelection(getEngineIndex());

View File

@ -1,86 +0,0 @@
package com.darkweb.genesissearchengine.appManager.setting_manager;
import android.os.Bundle;
import android.view.View;
import android.widget.Spinner;
import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.constants.status;
import com.example.myapplication.R;
import static com.darkweb.genesissearchengine.constants.status.history_status;
import static com.darkweb.genesissearchengine.constants.status.java_status;
public class setting_controller extends AppCompatActivity
{
/*Private Variables*/
private setting_view_controller viewController;
private Spinner search;
private Spinner javascript;
private Spinner history;
/*Initializations*/
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.settings_view);
setting_model.getInstance().init_status();
viewsInitializations();
listenersInitializations();
initializeModel();
setting_model.getInstance().java_status = java_status;
setting_model.getInstance().history_status = history_status;
setting_model.getInstance().search_status = status.search_status;
}
public void viewsInitializations()
{
search = findViewById(R.id.search_manager);
javascript = findViewById(R.id.javascript_manager);
history = findViewById(R.id.history_manager);
viewController = new setting_view_controller(search,javascript,history);
}
public void listenersInitializations()
{
initializeItemSelectedListener(search);
initializeItemSelectedListener(javascript);
initializeItemSelectedListener(history);
}
public void initializeModel()
{
setting_model.getInstance().setSettingInstance(this);
}
/*Event Handlers*/
public void initializeItemSelectedListener(Spinner view)
{
settings_ehandler.getInstance().onItemListnerInitialization(view);
}
public void onBackPressed(View view)
{
settings_ehandler.getInstance().onBackPressed();
}
/*View Handlers*/
@Override
public void onBackPressed(){
closeView();
}
public void closeView()
{
viewController.closeView();
}
}

View File

@ -1,39 +0,0 @@
package com.darkweb.genesissearchengine.appManager.setting_manager;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.constants.strings;
public class setting_model
{
private static final setting_model ourInstance = new setting_model();
private setting_model(){
}
public static setting_model getInstance()
{
return ourInstance;
}
private setting_controller settingInstance;
setting_controller getSettingInstance()
{
return settingInstance;
}
void setSettingInstance(setting_controller settingInstance)
{
this.settingInstance = settingInstance;
}
public void init_status()
{
setting_model.getInstance().search_status = status.search_status;
setting_model.getInstance().history_status = status.history_status;
setting_model.getInstance().java_status = status.java_status;
}
/*Changed Status*/
public String search_status = strings.emptyStr;
public boolean java_status = false;
public boolean history_status = true;
}

View File

@ -1,107 +0,0 @@
package com.darkweb.genesissearchengine.appManager.setting_manager;
import android.widget.ArrayAdapter;
import android.widget.Spinner;
import com.darkweb.genesissearchengine.appManager.home_activity.home_model;
import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.constants.strings;
import com.darkweb.genesissearchengine.dataManager.preference_manager;
import static com.darkweb.genesissearchengine.constants.status.history_status;
import static com.darkweb.genesissearchengine.constants.status.java_status;
class setting_view_controller
{
/*Private Variables*/
private Spinner search;
private Spinner javascript;
private Spinner history;
/*Initializations*/
setting_view_controller(Spinner search, Spinner javascript, Spinner history)
{
this.search = search;
this.javascript = javascript;
this.history = history;
initViews();
initJavascript();
initHistory();
initSearchEngine();
}
private void initViews()
{
search.setDropDownVerticalOffset(15);
search.setDropDownHorizontalOffset(-15);
javascript.setDropDownVerticalOffset(15);
javascript.setDropDownHorizontalOffset(-15);
history.setDropDownVerticalOffset(15);
history.setDropDownHorizontalOffset(-15);
}
private void initJavascript()
{
if (java_status)
{
javascript.setSelection(0);
}
else
{
javascript.setSelection(1);
}
}
private void initHistory()
{
if (history_status)
{
history.setSelection(0);
}
else
{
history.setSelection(1);
}
}
@SuppressWarnings("unchecked")
private void initSearchEngine()
{
String myString = preference_manager.getInstance().getString(keys.search_engine, strings.darkweb);
ArrayAdapter myAdap = (ArrayAdapter) search.getAdapter();
int spinnerPosition = myAdap.getPosition(myString);
search.setSelection(spinnerPosition);
}
/*Helper Methods*/
void closeView()
{
if(status.search_status != setting_model.getInstance().search_status)
{
status.search_status = setting_model.getInstance().search_status;
home_model.getInstance().getHomeInstance().initSearchEngine();
preference_manager.getInstance().setString(keys.search_engine, setting_model.getInstance().search_status);
}
if(status.java_status != setting_model.getInstance().java_status)
{
status.java_status = setting_model.getInstance().java_status;
home_model.getInstance().getHomeInstance().onReInitGeckoView();
preference_manager.getInstance().setBool(keys.java_script, status.java_status);
}
if(status.history_status != setting_model.getInstance().history_status)
{
status.history_status = setting_model.getInstance().history_status;
preference_manager.getInstance().setBool(keys.history_clear, status.history_status);
}
setting_model.getInstance().getSettingInstance().finish();
}
}

View File

@ -1,90 +0,0 @@
package com.darkweb.genesissearchengine.appManager.setting_manager;
import android.view.View;
import android.widget.AdapterView;
import android.widget.Spinner;
import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.dataManager.preference_manager;
import com.example.myapplication.R;
public class settings_ehandler
{
/*Initializations*/
private static final settings_ehandler ourInstance = new settings_ehandler();
public static settings_ehandler getInstance()
{
return ourInstance;
}
private settings_ehandler()
{
}
/*Listeners*/
private void onJavaScriptListener(int position)
{
if(position==1 && setting_model.getInstance().java_status)
{
setting_model.getInstance().java_status = false;
}
else if(position==0 && !setting_model.getInstance().java_status)
{
setting_model.getInstance().java_status = true;
}
}
private void onSearchListner(AdapterView<?> parentView,int position)
{
if(!setting_model.getInstance().search_status.equals(parentView.getItemAtPosition(position).toString()))
{
setting_model.getInstance().search_status = parentView.getItemAtPosition(position).toString();
}
}
private void onHistoryListener(int position)
{
if(position==1 && setting_model.getInstance().history_status)
{
setting_model.getInstance().history_status = false;
}
else if(position==0 && !setting_model.getInstance().history_status)
{
setting_model.getInstance().history_status = true;
}
}
void onBackPressed()
{
setting_model.getInstance().getSettingInstance().closeView();
}
/*Listener Initializations*/
void onItemListnerInitialization(Spinner view)
{
view.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int position, long id) {
if(parentView.getId()== R.id.search_manager)
{
onSearchListner(parentView,position);
}
else if(parentView.getId()== R.id.javascript_manager)
{
onJavaScriptListener(position);
}
else if(parentView.getId()== R.id.history_manager)
{
onHistoryListener(position);
}
}
@Override
public void onNothingSelected(AdapterView<?> parentView) {
}
});
}
}

View File

@ -49,6 +49,7 @@ public class tabController extends AppCompatActivity
@Override @Override
protected void onCreate(Bundle savedInstanceState){ protected void onCreate(Bundle savedInstanceState){
pluginController.getInstance().onCreate(this);
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.tab_view); setContentView(R.layout.tab_view);
initializeListModel(); initializeListModel();

View File

@ -25,7 +25,7 @@ public class status
public static boolean sDesktopSite = false; public static boolean sDesktopSite = false;
public static int sCookieStatus = ACCEPT_FIRST_PARTY; public static int sCookieStatus = ACCEPT_FIRST_PARTY;
public static float sFontSize = 1; public static float sFontSize = 1;
public static String sLanguage = "ru"; public static String sLanguage = "en";
/*Bridge Status*/ /*Bridge Status*/

View File

@ -111,7 +111,7 @@ public class strings
public static final String CUSTOM_FONTS = "Custom Font"; public static final String CUSTOM_FONTS = "Custom Font";
public static final String PERCENT_SIGN = "%"; public static final String PERCENT_SIGN = "%";
public static final String DEFAULT_LANGUAGE = "ru"; public static final String DEFAULT_LANGUAGE = "en";
/*Bookmark Manager*/ /*Bookmark Manager*/

View File

@ -1,58 +0,0 @@
package com.darkweb.genesissearchengine.dataManager;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import com.darkweb.genesissearchengine.appManager.home_activity.home_model;
public class preference_manager
{
/*Private Declarations*/
private static final preference_manager ourInstance = new preference_manager();
private SharedPreferences prefs;
private SharedPreferences.Editor edit;
public static preference_manager getInstance()
{
return ourInstance;
}
/*Initializations*/
private preference_manager()
{
}
public void initialize()
{
prefs = PreferenceManager.getDefaultSharedPreferences(home_model.getInstance().getAppContext());
edit = prefs.edit();
}
/*Saving Preferences*/
public void setString(String valueKey, String value)
{
edit.putString(valueKey, value);
edit.commit();
}
public void setBool(String valueKey, boolean value)
{
edit.putBoolean(valueKey, value);
edit.commit();
}
/*Recieving Preferences*/
public String getString(String valueKey, String valueDefault)
{
return prefs.getString(valueKey, valueDefault);
}
public boolean getBool(String valueKey, boolean valueDefault)
{
return prefs.getBoolean(valueKey, valueDefault);
}
}

View File

@ -0,0 +1,64 @@
package com.darkweb.genesissearchengine.helperManager;
import android.app.Activity;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
import android.preference.PreferenceManager;
import android.text.TextUtils;
import com.darkweb.genesissearchengine.constants.status;
import com.example.myapplication.R;
import java.util.Locale;
public class LocaleManager {
private Locale currentLocale;
public void onCreate(Activity activity) {
currentLocale = getSelectedLocale(activity);
setContextLocale(activity, currentLocale);
}
public void onResume(Activity activity) {
// If the activity has the incorrect locale, restart it
//if (!currentLocale.equals(getSelectedLocale(activity))) {
//Intent intent = activity.getIntent();
//activity.finish();
//activity.overridePendingTransition(0, 0);
//activity.startActivity(intent);
//activity.overridePendingTransition(0, 0);
//}
}
public void updateServiceLocale(Service service) {
currentLocale = getSelectedLocale(service);
setContextLocale(service, currentLocale);
}
private static Locale getSelectedLocale(Context context) {
String defaultLanguage = context.getString(R.string.DEFAULT_LANGUAGE);
String selectedLanguage = PreferenceManager.getDefaultSharedPreferences(context).getString(
context.getResources().getString(R.string.PREF_LANGUAGE),
defaultLanguage
);
String language[] = TextUtils.split(selectedLanguage, "_");
if (language[0].equals(defaultLanguage))
return Locale.getDefault();
else if (language.length == 2)
return new Locale(language[0], language[1]);
else
return new Locale(language[0]);
}
private static void setContextLocale(Context context, Locale selectedLocale) {
Configuration configuration = context.getResources().getConfiguration();
configuration.locale = new Locale(status.sLanguage);
context.getResources().updateConfiguration(
configuration,
context.getResources().getDisplayMetrics()
);
}
}

View File

@ -1,183 +0,0 @@
package com.darkweb.genesissearchengine;
import android.app.DownloadManager;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.Uri;
import android.os.Build;
import android.util.DisplayMetrics;
import android.view.Display;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.view.animation.Animation;
import android.view.animation.RotateAnimation;
import android.view.inputmethod.InputMethodManager;
import android.widget.Toast;
import androidx.core.app.ShareCompat;
import com.darkweb.genesissearchengine.appManager.home_activity.home_model;
import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.dataManager.preference_manager;
import com.example.myapplication.BuildConfig;
import java.net.MalformedURLException;
import java.net.URL;
public class helperMethod
{
/*Helper Methods*/
public static boolean isNetworkAvailable(){
ConnectivityManager cm = (ConnectivityManager) home_model.getInstance().getAppContext().getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo networkInfo = cm.getActiveNetworkInfo();
return networkInfo != null && networkInfo.isConnected();
}
public static String completeURL(String url){
if(!url.startsWith("www.")&& !url.startsWith("http://")&& !url.startsWith("https://")){
url = "www."+url;
}
if(!url.startsWith("http://")&&!url.startsWith("https://")){
url = "http://"+url;
}
return url;
}
public static void hideKeyboard() {
View view = home_model.getInstance().getHomeInstance().findViewById(android.R.id.content);
if (view != null)
{
InputMethodManager imm = (InputMethodManager) home_model.getInstance().getHomeInstance().getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
}
}
public static void rateApp(){
preference_manager.getInstance().setBool(keys.isAppRated,true);
home_model.getInstance().getHomeInstance().startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.darkweb.genesissearchengine")));
}
public static void shareApp() {
ShareCompat.IntentBuilder.from(home_model.getInstance().getHomeInstance())
.setType("text/plain")
.setChooserTitle("Hi! Check out this Awesome App")
.setSubject("Hi! Check out this Awesome App")
.setText("Genesis | Onion Search | http://play.google.com/store/apps/details?id=" + home_model.getInstance().getHomeInstance().getPackageName())
.startChooser();
}
public static void openDownloadFolder()
{
home_model.getInstance().getHomeInstance().startActivity(new Intent(DownloadManager.ACTION_VIEW_DOWNLOADS));
}
public static String getHost(String link){
URL url = null;
try
{
url = new URL(link);
String host = url.getHost();
return host;
}
catch (MalformedURLException e)
{
e.printStackTrace();
return "";
}
}
public static void openActivity( Class<?> cls,int type){
Intent myIntent = new Intent(home_model.getInstance().getHomeInstance(), cls);
myIntent.putExtra(keys.list_type, type);
home_model.getInstance().getHomeInstance().startActivity(myIntent);
}
public static void onMinimizeApp(){
Intent startMain = new Intent(Intent.ACTION_MAIN);
startMain.addCategory(Intent.CATEGORY_HOME);
startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
home_model.getInstance().getHomeInstance().startActivity(startMain);
}
/*Splash Screen Initializations*/
public static int screenHeight(boolean hasSoftKeys) {
if(!hasSoftKeys)
{
return Resources.getSystem().getDisplayMetrics().heightPixels -(helperMethod.getNavigationBarHeight());
}
else
{
return (Resources.getSystem().getDisplayMetrics().heightPixels);
}
}
public static int screenWidth()
{
return (Resources.getSystem().getDisplayMetrics().widthPixels);
}
public static int getNavigationBarHeight() {
Resources resources = home_model.getInstance().getAppContext().getResources();
int resourceId = resources.getIdentifier("navigation_bar_height", "dimen", "android");
if (resourceId > 0) {
return resources.getDimensionPixelSize(resourceId);
}
return 0;
}
public static RotateAnimation getRotationAnimation(){
RotateAnimation rotate = new RotateAnimation(0, 360, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF,0.5f);
rotate.setDuration(2000);
rotate.setRepeatCount(Animation.INFINITE);
return rotate;
}
public static ViewGroup.MarginLayoutParams getCenterScreenPoint(ViewGroup.LayoutParams itemLayoutParams) {
double heightloader = Resources.getSystem().getDisplayMetrics().heightPixels*0.78;
ViewGroup.MarginLayoutParams params_loading = (ViewGroup.MarginLayoutParams) itemLayoutParams;
params_loading.topMargin = (int)(heightloader);
return params_loading;
}
public static boolean hasSoftKeys(WindowManager windowManager){
Display d = windowManager.getDefaultDisplay();
DisplayMetrics realDisplayMetrics = new DisplayMetrics();
d.getRealMetrics(realDisplayMetrics);
int realHeight = realDisplayMetrics.heightPixels;
int realWidth = realDisplayMetrics.widthPixels;
DisplayMetrics displayMetrics = new DisplayMetrics();
d.getMetrics(displayMetrics);
int displayHeight = displayMetrics.heightPixels;
int displayWidth = displayMetrics.widthPixels;
return (realWidth - displayWidth) > 0 || (realHeight - displayHeight) > 0;
}
public static boolean isBuildValid (){
return BuildConfig.FLAVOR.equals("aarch64") && Build.SUPPORTED_ABIS[0].equals("arm64-v8a") || BuildConfig.FLAVOR.equals("arm") && Build.SUPPORTED_ABIS[0].equals("armeabi-v7a") || BuildConfig.FLAVOR.equals("x86") && Build.SUPPORTED_ABIS[0].equals("x86") || BuildConfig.FLAVOR.equals("x86_64") && Build.SUPPORTED_ABIS[0].equals("x86_64");
}
public static void openPlayStore(String packageName)
{
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("market://details?id="+packageName));
home_model.getInstance().getHomeInstance().startActivity(intent);
}
public static void showToast(String messaage)
{
Toast.makeText(home_model.getInstance().getHomeInstance().getApplicationContext(),messaage,Toast.LENGTH_SHORT).show();
}
}

View File

@ -1,95 +0,0 @@
package com.darkweb.genesissearchengine.httpManager;
import android.os.Handler;
import android.os.Message;
import com.darkweb.genesissearchengine.constants.messages;
import cz.msebera.android.httpclient.HttpResponse;
import cz.msebera.android.httpclient.client.HttpClient;
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.HttpClients;
import cz.msebera.android.httpclient.ssl.SSLContexts;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
public class httpclient
{
private HttpGet request = null;
private String html = "";
public void httpConnection(String url,Handler updateUIHandler,boolean isCachedRequest)
{
new Thread()
{
public void run()
{
try
{
String c_url = url.replace("http://boogle","https://boogle").replaceAll("genesis.onion","boogle.store").replaceAll("genesis.store","boogle.store");
HttpClient client=new DefaultHttpClient();
SSLConnectionSocketFactory scsf = new SSLConnectionSocketFactory(
SSLContexts.custom().loadTrustMaterial(null, new TrustSelfSignedStrategy()).build(),
NoopHostnameVerifier.INSTANCE);
client = HttpClients.custom().setSSLSocketFactory(scsf).build();
request = new HttpGet(c_url);
HttpResponse response = client.execute(request);
InputStream in = response.getEntity().getContent();
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
StringBuilder str = new StringBuilder();
String line = null;
while((line = reader.readLine()) != null)
{
str.append(line);
}
in.close();
html = str.toString();
}
catch (Exception e)
{
if(!request.isAborted() && !isCachedRequest)
{
startPostTask(messages.INTERNET_ERROR,updateUIHandler);
}
}
request = null;
}
}.start();
}
public void startPostTask(int m_id,Handler updateUIHandler)
{
Message message = new Message();
message.what = m_id;
updateUIHandler.sendMessage(message);
}
public String getHtmlResponse()
{
return html;
}
public boolean isRequestLoading()
{
return request!=null;
}
public void stopRequest()
{
new Thread()
{
public void run()
{
request.abort();
}
}.start();
}
}

View File

@ -1,85 +0,0 @@
package com.darkweb.genesissearchengine.httpManager;
import android.content.Context;
import com.darkweb.genesissearchengine.dataManager.preference_manager;
import cz.msebera.android.httpclient.client.HttpClient;
import cz.msebera.android.httpclient.client.methods.HttpGet;
import cz.msebera.android.httpclient.impl.client.DefaultHttpClient;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
public class serverRequestManager
{
private static final serverRequestManager ourInstance = new serverRequestManager();
public static serverRequestManager getInstance()
{
return ourInstance;
}
private serverRequestManager()
{
}
public void reportURL(String url)
{
try
{
HttpGet reportrequest = new HttpGet(url);
HttpClient client=new DefaultHttpClient();
client.execute(reportrequest);
}
catch (Exception ex)
{
ex.printStackTrace();
}
}
public void getVersion(Context applicationContext)
{
new Thread()
{
public void run()
{
try
{
String webPage = "https://boogle.store/version";
URL url = new URL(webPage);
URLConnection urlConnection = null;
urlConnection = url.openConnection();
InputStream is = urlConnection.getInputStream();
InputStreamReader isr = new InputStreamReader(is);
int numCharsRead;
char[] charArray = new char[1024];
StringBuffer sb = new StringBuffer();
while ((numCharsRead = isr.read(charArray)) > 0) {
sb.append(charArray, 0, numCharsRead);
}
String result = sb.toString();
preference_manager.getInstance().setString("version",result);
}
catch (IOException e) {
e.printStackTrace();
}
}
}.start();
}
public void versionChecker()
{
/*String version = preference_manager.getInstance().getString("version","none",this);
if(!version.equals(version_code) && !version.equals("none"))
{
message_manager.getInstance().versionWarning(this,Build.SUPPORTED_ABIS[0]);
}
webRequestHandler.getInstance().getVersion(this);*/
}
}

View File

@ -1,75 +0,0 @@
package com.darkweb.genesissearchengine.httpManager;
import android.annotation.SuppressLint;
import android.os.Message;
import android.os.Handler;
import com.darkweb.genesissearchengine.appManager.home_activity.home_model;
import com.darkweb.genesissearchengine.constants.messages;
public class webRequestHandler
{
/*Private Variables*/
private String html = "";
private Handler updateUIHandler = null;
private httpclient client;
private String requestedUrl = "";
/*Initialization*/
private static final webRequestHandler ourInstance = new webRequestHandler();
public static webRequestHandler getInstance() {
return ourInstance;
}
private webRequestHandler()
{
client = new httpclient();
createUpdateUiHandler();
}
/*Helper Methods*/
public void loadURL(final String url)
{
if(client.isRequestLoading())
{
client.stopRequest();
}
cachedURLSelector();
}
public void cachedURLSelector()
{
client = new httpclient();
client.httpConnection(requestedUrl,updateUIHandler,false);
}
public void startPostTask(int m_id)
{
Message message = new Message();
message.what = m_id;
updateUIHandler.sendMessage(message);
}
@SuppressLint("HandlerLeak")
private void createUpdateUiHandler()
{
updateUIHandler = new Handler()
{
@Override
public void handleMessage(Message msg)
{
if(msg.what == messages.MESSAGE_UPDATE_TEXT_CHILD_THREAD)
{
//home_model.getInstance().getHomeInstance().onloadURL(client.getHtmlResponse());
}
else if (msg.what == messages.INTERNET_ERROR)
{
home_model.getInstance().getHomeInstance().onInternetErrorView();
}
}
};
}
}

View File

@ -1,79 +1,93 @@
package com.darkweb.genesissearchengine.pluginManager; package com.darkweb.genesissearchengine.pluginManager;
import com.darkweb.genesissearchengine.appManager.home_activity.home_model; import android.util.Log;
import com.darkweb.genesissearchengine.constants.enums;
import com.example.myapplication.R;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdView;
import com.google.android.gms.ads.InterstitialAd;
import com.google.android.gms.ads.MobileAds;
public class admanager import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.helperManager.eventObserver;
import com.google.android.gms.ads.*;
import static com.darkweb.genesissearchengine.constants.status.paid_status;
class adManager
{ {
/*Private Variables*/ /*Private Variables*/
private static final admanager ourInstance = new admanager();
private InterstitialAd mInterstitialHidden_onion; private AppCompatActivity mAppContext;
private InterstitialAd mInterstitialInternal; private eventObserver.eventListener mEvent;
private InterstitialAd mInterstitialHidden_base; private AdView mBannerAds;
private int adCount = 0; private boolean bannerAdsLoading = false;
boolean isAdShown = false; private boolean bannerAdsLoaded = false;
private AdView bannerAds = null;
/*Initializations*/ /*Initializations*/
public static admanager getInstance() { adManager(AppCompatActivity app_context, eventObserver.eventListener event, AdView banner_ads) {
return ourInstance; this.mAppContext = app_context;
this.mEvent = event;
mBannerAds = banner_ads;
} }
private admanager() { void loadAds(){
} if(!paid_status)
public void initialize()
{
MobileAds.initialize(home_model.getInstance().getHomeInstance(), "ca-app-pub-5074525529134731~2926711128");
mInterstitialHidden_base = initAd("ca-app-pub-5074525529134731/1637043432");
// initBannerAds();
// mInterstitialHidden_onion = initAd("ca-app-pub-5074525529134731/4332539288");
// mInterstitialInternal = initAd("ca-app-pub-5074525529134731/8478420705");
}
public InterstitialAd initAd(String id)
{
InterstitialAd adInstance = new InterstitialAd(home_model.getInstance().getHomeInstance());
adInstance.setAdUnitId(id);
adInstance.loadAd(new AdRequest.Builder().addTestDevice("5AAFC2DFAE5C3906292EB576F0822FD7").build());
return adInstance;
}
private void initBannerAds()
{
// bannerAds = home_model.getInstance().getHomeInstance().findViewById(R.id.adView);
// AdRequest request = new AdRequest.Builder()
// .addTestDevice("5AAFC2DFAE5C3906292EB576F0822FD7")
// .build();
// bannerAds.loadAd(request );
}
/*Helper Methods*/
public void showAd(enums.adID id)
{
if(id.equals(enums.adID.hidden_onion_start))
{ {
mInterstitialHidden_base.show(); if (!bannerAdsLoading)
mInterstitialHidden_base.loadAd(new AdRequest.Builder().addTestDevice("5AAFC2DFAE5C3906292EB576F0822FD7").build()); {
bannerAdsLoading = true;
MobileAds.initialize(mAppContext, constants.ADMOB_KEY);
mBannerAds.setAlpha(0f);
initializeBannerAds();
}
} }
/*else if(id.equals(enums.adID.hidden_onion))
{
mInterstitialHidden_onion.show();
mInterstitialHidden_onion.loadAd(new AdRequest.Builder().build());
}
else
{
mInterstitialInternal.show();
mInterstitialInternal.loadAd(new AdRequest.Builder().build());
}*/
} }
boolean isAdvertLoaded(){
return bannerAdsLoaded;
}
/*Local Helper Methods*/
private void admobListeners(){
if(!paid_status){
mBannerAds.setAdListener(new AdListener() {
@Override
public void onAdLoaded() {
bannerAdsLoaded = true;
mEvent.invokeObserver(null,null);
}
@Override
public void onAdFailedToLoad(int errorCode) {
//Log.i("Failure___",""+errorCode);
}
@Override
public void onAdOpened() {
}
@Override
public void onAdClicked() {
}
@Override
public void onAdLeftApplication() {
}
@Override
public void onAdClosed() {
}
});
}
}
/*External Helper Methods*/
private void initializeBannerAds(){
if(!paid_status){
AdRequest request = new AdRequest.Builder().addTestDevice("E731DE5933CDC0E42B335787CE3E23EF").build();
mBannerAds.loadAd(request);
admobListeners();
}
}
} }

View File

@ -2,61 +2,60 @@ package com.darkweb.genesissearchengine.pluginManager;
import android.content.Context; import android.content.Context;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import androidx.appcompat.app.AppCompatActivity;
import com.crashlytics.android.Crashlytics; import com.crashlytics.android.Crashlytics;
import com.crashlytics.android.answers.Answers; import com.darkweb.genesissearchengine.constants.constants;
import com.crashlytics.android.answers.CustomEvent; import com.darkweb.genesissearchengine.helperManager.eventObserver;
import java.util.UUID; import java.util.UUID;
public class analyticmanager class analyticManager
{ {
/*Private Variables*/ /*Private Variables*/
private static final analyticmanager ourInstance = new analyticmanager(); private AppCompatActivity mAppContext;
private String uniqueID = null; private String mUniqueID = null;
public static analyticmanager getInstance() {
return ourInstance;
}
/*Initializations*/ /*Initializations*/
private analyticmanager() analyticManager(AppCompatActivity app_context, eventObserver.eventListener event){
{ this.mAppContext = app_context;
initialize();
} }
public void initialize(Context context) private void initialize(){
{ final String PREF_UNIQUE_ID = constants.UNIQUE_KEY_ID;
final String PREF_UNIQUE_ID = "PREF_UNIQUE_ID";
if (uniqueID == null) if (mUniqueID == null)
{ {
SharedPreferences sharedPrefs = context.getSharedPreferences( SharedPreferences sharedPrefs = mAppContext.getSharedPreferences(
PREF_UNIQUE_ID, Context.MODE_PRIVATE); PREF_UNIQUE_ID, Context.MODE_PRIVATE);
uniqueID = sharedPrefs.getString(PREF_UNIQUE_ID, null); mUniqueID = sharedPrefs.getString(PREF_UNIQUE_ID, null);
if (uniqueID == null) { if (mUniqueID == null) {
uniqueID = UUID.randomUUID().toString();
SharedPreferences.Editor editor = sharedPrefs.edit(); new Thread(){
editor.putString(PREF_UNIQUE_ID, uniqueID); public void run(){
editor.commit(); try{
mUniqueID = UUID.randomUUID().toString();
}catch (Exception ex){
mUniqueID = UUID.randomUUID().toString();
}
SharedPreferences.Editor editor = sharedPrefs.edit();
editor.putString(PREF_UNIQUE_ID, mUniqueID);
editor.apply();
}
}.start();
} }
} }
} }
/*Helper Methods*/ /*Helper Methods*/
public void logUser() void logUser(){
{ Crashlytics.setUserIdentifier(mUniqueID);
Crashlytics.setUserIdentifier(uniqueID); Crashlytics.setUserEmail(constants.USER_EMAIL);
Crashlytics.setUserEmail("user@fabric.io"); Crashlytics.setUserName(mUniqueID);
Crashlytics.setUserName(uniqueID);
}
public void sendEvent(String value)
{
//firebase.getInstance().logEvent(value,uniqueID);
//Answers.getInstance().logCustom(new CustomEvent(value));
} }
} }

View File

@ -1,40 +0,0 @@
package com.darkweb.genesissearchengine.pluginManager;
//import com.google.firebase.analytics.FirebaseAnalytics;
public class firebase
{
/*Private Variables*/
private static final firebase ourInstance = new firebase();
/*Initializations*/
public static firebase getInstance()
{
return ourInstance;
}
//private FirebaseAnalytics mFirebaseAnalytics;
public void initialize()
{
//mFirebaseAnalytics = FirebaseAnalytics.getInstance(home_model.getInstance().getAppContext());
}
/*Helper Methods*/
public void logEvent(String value,String id)
{
/*
Bundle bundle = new Bundle();
bundle.putString(FirebaseAnalytics.Param.ITEM_ID, id);
bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, value);
bundle.putString(FirebaseAnalytics.Param.CONTENT_TYPE, "Custom");
mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, bundle);*/
}
private firebase()
{
}
}

View File

@ -0,0 +1,55 @@
package com.darkweb.genesissearchengine.pluginManager;
import android.app.Activity;
import android.content.res.Configuration;
import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.helperManager.LocaleManager;
import com.darkweb.genesissearchengine.helperManager.eventObserver;
import java.util.Locale;
class langManager
{
/*Private Variables*/
private AppCompatActivity mAppContext;
private eventObserver.eventListener mEvent;
private Locale language;
private LocaleManager mLocaleManguage;
/*Initializations*/
langManager(AppCompatActivity mAppContext, eventObserver.eventListener mEvent){
this.mAppContext = mAppContext;
this.mEvent = mEvent;
initialize();
}
private void initialize(){
mLocaleManguage = new LocaleManager();
}
void setDefaultLanguage(Locale language){
this.language = language;
onSaveLanguage();
}
private void onSaveLanguage(){
Configuration configuration = mAppContext.getResources().getConfiguration();
configuration.locale = this.language;
mAppContext.getResources().updateConfiguration(
configuration,
mAppContext.getResources().getDisplayMetrics()
);
}
/*External Locale Requrest Manager*/
public void onCreate(Activity activity) {
mLocaleManguage.onCreate(activity);
}
public void onResume(Activity activity) {
mLocaleManguage.onResume(activity);
}
}

View File

@ -1,86 +0,0 @@
package com.darkweb.genesissearchengine.pluginManager;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.os.SystemClock;
import androidx.core.app.NotificationCompat;
import com.darkweb.genesissearchengine.appManager.home_activity.home_model;
import com.example.myapplication.R;
public class localNotification
{
private static final localNotification ourInstance = new localNotification();
public static localNotification getInstance()
{
return ourInstance;
}
private localNotification()
{
mContext = home_model.getInstance().getAppContext();
}
private Context mContext;
private NotificationManager mNotificationManager;
private NotificationCompat.Builder mBuilder;
public static final String NOTIFICATION_CHANNEL_ID = "10001";
/**
* Create and push the notification
*/
public void createNotification(String title, String message)
{
/**Creates an explicit intent for an Activity in your app**/
Intent resultIntent = new Intent(mContext , home_model.getInstance().getHomeInstance().getClass());
resultIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
PendingIntent resultPendingIntent = PendingIntent.getActivity(mContext,
0 /* Request code */, resultIntent,
PendingIntent.FLAG_UPDATE_CURRENT);
mBuilder = new NotificationCompat.Builder(mContext);
mBuilder.setSmallIcon(R.xml.ic_icon_download_notification);
mBuilder.setContentTitle(title)
.setContentText(message)
.setAutoCancel(true)
.setContentIntent(resultPendingIntent);
mNotificationManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O)
{
int importance = NotificationManager.IMPORTANCE_DEFAULT;
NotificationChannel notificationChannel = new NotificationChannel(NOTIFICATION_CHANNEL_ID, "NOTIFICATION_CHANNEL_NAME", importance);
assert mNotificationManager != null;
mBuilder.setChannelId(NOTIFICATION_CHANNEL_ID);
mNotificationManager.createNotificationChannel(notificationChannel);
}
assert mNotificationManager != null;
int oneTimeID = (int) SystemClock.uptimeMillis();
mNotificationManager.notify(oneTimeID, mBuilder.build());
mNotificationManager.notify(oneTimeID /* Request Code */, mBuilder.build());
new Thread()
{
public void run()
{
try
{
sleep(5000);
mNotificationManager.cancel(oneTimeID);
}
catch (InterruptedException e)
{
e.printStackTrace();
}
}
}.start();
}
}

View File

@ -1,334 +0,0 @@
package com.darkweb.genesissearchengine.pluginManager;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.os.Handler;
import android.text.InputType;
import android.widget.EditText;
import androidx.core.content.ContextCompat;
import com.crowdfire.cfalertdialog.CFAlertDialog;
import com.darkweb.genesissearchengine.appManager.home_activity.home_model;
import com.darkweb.genesissearchengine.appManager.list_manager.list_model;
import com.darkweb.genesissearchengine.appManager.home_activity.home_controller;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.constants.strings;
import com.darkweb.genesissearchengine.dataManager.preference_manager;
import com.example.myapplication.R;
public class message_manager
{
/*Initializations*/
private boolean isPopupOn = false;
private static final message_manager ourInstance = new message_manager();
public static message_manager getInstance()
{
return ourInstance;
}
private message_manager()
{
}
/*Helper Methods*/
public void welcomeMessage()
{
Context application_context = home_model.getInstance().getAppContext();
home_controller controller = home_model.getInstance().getHomeInstance();
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.ALERT)
.setTitle(strings.welcome_message_title)
.setBackgroundColor(application_context.getResources().getColor(R.color.blue_dark_v2))
.setTextColor(application_context.getResources().getColor(R.color.blue_dark))
.setMessage(strings.welcome_message_desc)
.addButton(strings.welcome_message_bt1, -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED , (dialog, which) -> {
dialog.dismiss();
controller.onloadURL(constants.blackMarket,false,true);
controller.onloadURL(constants.blackMarket,false,true);
})
.addButton(strings.welcome_message_bt2, -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED , (dialog, which) -> {
dialog.dismiss();
controller.onloadURL(constants.leakedDocument,false,true);
controller.onloadURL(constants.leakedDocument,false,true);
})
.addButton(strings.welcome_message_bt3, -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED , (dialog, which) -> {
dialog.dismiss();
controller.onloadURL(constants.news,false,true);
controller.onloadURL(constants.news,false,true);
})
.addButton(strings.welcome_message_bt4, -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED , (dialog, which) -> {
dialog.dismiss();
controller.onloadURL(constants.softwares,false,true);
controller.onloadURL(constants.softwares,false,true);
})
.addButton(strings.welcome_message_bt5, -1, -1, CFAlertDialog.CFAlertActionStyle.NEGATIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED , (dialog, which) -> {
dialog.dismiss();
preference_manager.getInstance().setBool(keys.first_time_loaded,true);
});
builder.show();
}
public void baseURLError()
{
Context application_context = home_model.getInstance().getAppContext();
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
.setTitle(strings.base_error_title)
.setBackgroundColor(application_context.getResources().getColor(R.color.blue_dark_v2))
.setTextColor(application_context.getResources().getColor(R.color.black))
.setMessage(strings.base_error_desc)
.addButton(strings.base_error_bt1, -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.END, (dialog, which) -> {
dialog.dismiss();
});
builder.show();
}
public void abiError(String currentAbi)
{
Context application_context = home_model.getInstance().getAppContext();
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
.setTitle(strings.abi_error_title)
.setBackgroundColor(application_context.getResources().getColor(R.color.blue_dark_v2))
.setTextColor(application_context.getResources().getColor(R.color.black))
.onDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialog) {
abiError(currentAbi);
}
})
.setMessage(strings.abi_error_desc)
.addButton(strings.abi_error_bt1, -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(constants.updateUrl+currentAbi));
application_context.startActivity(browserIntent);
})
.addButton(strings.abi_error_bt2, -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(constants.playstoreUrl));
application_context.startActivity(browserIntent);
});
builder.show();
}
public void ratedSuccessfully()
{
Context application_context = home_model.getInstance().getAppContext();
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
.setTitle(strings.rate_success_title)
.setBackgroundColor(application_context.getResources().getColor(R.color.blue_dark_v2))
.setTextColor(application_context.getResources().getColor(R.color.black))
.setMessage(strings.rate_success_desc)
.addButton(strings.rate_success_bt1, -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
dialog.dismiss();
});
builder.show();
}
public void reportedSuccessfully(String title,String desc)
{
Context application_context = home_model.getInstance().getAppContext();
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
.setTitle(title)
.setBackgroundColor(application_context.getResources().getColor(R.color.blue_dark_v2))
.setTextColor(application_context.getResources().getColor(R.color.black))
.setMessage(desc)
.addButton(strings.report_success_bt1, -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
dialog.dismiss();
});
builder.show();
}
@SuppressLint("ResourceType")
public void bookmark(String url)
{
final EditText input = new EditText(home_model.getInstance().getHomeInstance());
input.setInputType(InputType.TYPE_CLASS_TEXT);
input.setText("");
input.setBackground(ContextCompat.getDrawable(home_model.getInstance().getAppContext(), R.xml.search_back_default));
input.setPadding(40,15,40,15);
input.setHeight(80);
input.setTextSize(17);
input.setHint("Enter Bookmark Title");
Context application_context = home_model.getInstance().getAppContext();
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.ALERT)
.setBackgroundColor(application_context.getResources().getColor(R.color.blue_dark_v2))
.setTextColor(application_context.getResources().getColor(R.color.black))
//.setTitle(strings.bookmark_url_title)
.setHeaderView(input)
.setMessage("Bookmark URL | " + url + "\n")
.addButton(strings.bookmark_url_bt1, -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
home_model.getInstance().addBookmark(url.replace("genesis.onion","boogle.store"),input.getText().toString());
dialog.dismiss();
})
.addButton(strings.bookmark_url_bt2, -1, -1, CFAlertDialog.CFAlertActionStyle.NEGATIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
dialog.dismiss();
});
builder.show();
}
public void clearData()
{
Context application_context = list_model.getInstance().getListContext();
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(list_model.getInstance().getListContext())
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
.setTitle(strings.clear_title)
.setBackgroundColor(application_context.getResources().getColor(R.color.blue_dark_v2))
.setTextColor(application_context.getResources().getColor(R.color.black))
.setMessage(strings.clear_desc)
.addButton(strings.clear_bt1, -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
list_model.getInstance().getListInstance().onClearAll();
dialog.dismiss();
})
.addButton(strings.clear_bt2, -1, -1, CFAlertDialog.CFAlertActionStyle.NEGATIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
dialog.dismiss();
});
builder.show();
}
public void reportURL()
{
Context application_context = home_model.getInstance().getAppContext();
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
.setTitle(strings.report_url_title)
.setBackgroundColor(application_context.getResources().getColor(R.color.blue_dark_v2))
.setTextColor(application_context.getResources().getColor(R.color.black))
.setMessage(strings.report_url_desc)
.addButton(strings.report_url_bt1, -1, -1, CFAlertDialog.CFAlertActionStyle.NEGATIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
dialog.dismiss();
reportedSuccessfully(strings.report_success_title,strings.report_success_desc);
})
.addButton(strings.report_url_bt2, -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
dialog.dismiss();
});
builder.show();
}
public void rateApp()
{
Context application_context = home_model.getInstance().getAppContext();
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.ALERT)
.setTitle(strings.rate_title)
.setBackgroundColor(application_context.getResources().getColor(R.color.blue_dark_v2))
.setTextColor(application_context.getResources().getColor(R.color.black))
.setMessage(strings.rate_message)
.addButton(strings.rate_positive, -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
preference_manager.getInstance().setBool(keys.isAppRated,true);
home_model.getInstance().getHomeInstance().startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.darkweb.genesissearchengine")));
dialog.dismiss();
})
.addButton(strings.rate_negative, -1, -1, CFAlertDialog.CFAlertActionStyle.NEGATIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
preference_manager.getInstance().setBool(keys.isAppRated,true);
dialog.dismiss();
ratedSuccessfully();
});
builder.show();
}
public void downloadFile(String filename)
{
Context application_context = home_model.getInstance().getAppContext();
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
.setTitle(strings.download_title)
.setBackgroundColor(application_context.getResources().getColor(R.color.blue_dark_v2))
.setTextColor(application_context.getResources().getColor(R.color.black))
.setMessage(strings.download_message + filename)
.addButton(strings.download_positive, -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
home_model.getInstance().getHomeInstance().downloadFile();
dialog.dismiss();
})
.addButton(strings.download_negative, -1, -1, CFAlertDialog.CFAlertActionStyle.NEGATIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
dialog.dismiss();
});
builder.show();
}
public void startingOrbotInfo(String url)
{
if(!isPopupOn)
{
isPopupOn = true;
Context application_context = home_model.getInstance().getAppContext();
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
.setTitle(strings.orbot_init_title)
.setBackgroundColor(application_context.getResources().getColor(R.color.blue_dark_v2))
.setTextColor(application_context.getResources().getColor(R.color.black))
.setMessage(strings.orbot_init_desc)
.onDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialog) {
isPopupOn = false;
}
})
.addButton(strings.orbot_init_bt1, -1, -1, CFAlertDialog.CFAlertActionStyle.NEGATIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
dialog.dismiss();
isPopupOn = false;
}).addButton(strings.orbot_init_bt2, -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> {
dialog.dismiss();
isPopupOn = false;
final Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run()
{
if(!url.equals(""))
{
home_model.getInstance().getHomeInstance().onloadURL(url,true,true);
}
else
{
home_model.getInstance().getHomeInstance().onReload();
}
}
}, 500);
});
builder.show();
}
}
public void versionWarning(String currentAbi)
{
Context application_context = home_model.getInstance().getAppContext();
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
.setTitle(strings.version_title)
.setBackgroundColor(application_context.getResources().getColor(R.color.blue_dark_v2))
.setTextColor(application_context.getResources().getColor(R.color.black))
.setMessage(strings.version_desc)
.addButton(strings.version_bt1, -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.END, (dialog, which) -> {
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(constants.updateUrl+currentAbi));
application_context.startActivity(browserIntent);
});
builder.show();
}
}

View File

@ -67,7 +67,10 @@ class orbotManager
} }
void enableTorNotificationNoBandwidth(){ void enableTorNotificationNoBandwidth(){
TorService.getServiceObject().enableTorNotificationNoBandwidth(); TorService service = TorService.getServiceObject();
if(service!=null){
TorService.getServiceObject().enableTorNotificationNoBandwidth();
}
} }
/*------------------------------------------------------- POST TASK HANDLER -------------------------------------------------------*/ /*------------------------------------------------------- POST TASK HANDLER -------------------------------------------------------*/

View File

@ -1,174 +0,0 @@
package com.darkweb.genesissearchengine.pluginManager;
import com.darkweb.genesissearchengine.appManager.home_activity.home_model;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.constants.strings;
import com.darkweb.genesissearchengine.helperMethod;
import com.msopentech.thali.android.toronionproxy.AndroidOnionProxyManager;
import com.msopentech.thali.toronionproxy.OnionProxyManager;
import org.mozilla.gecko.PrefsHelper;
public class orbot_manager {
/*Private Variables*/
private boolean isLoading = false;
private int threadCounter = 100;
private OnionProxyManager onionProxyManager = null;
/*Local Initialization*/
private static final orbot_manager ourInstance = new orbot_manager();
public static orbot_manager getInstance()
{
return ourInstance;
}
private orbot_manager()
{
}
/*Orbot Initialization*/
public boolean initOrbot(String url)
{
if(!status.isTorInitialized)
{
fabricManager.getInstance().sendEvent("TOR NOT INITIALIZED : " + url);
message_manager.getInstance().startingOrbotInfo(url);
return false;
}
else
{
return true;
}
}
public void reinitOrbot()
{
new Thread()
{
public void run()
{
while (true)
{
try
{
if(onionProxyManager!=null)
{
if(onionProxyManager.isRunning())
{
status.isTorInitialized = true;
threadCounter = 5000;
}
else
{
status.isTorInitialized = false;
}
}
if(!isLoading && !status.isTorInitialized)
{
if(helperMethod.isNetworkAvailable())
{
if(onionProxyManager == null)
{
onionProxyManager = new AndroidOnionProxyManager(home_model.getInstance().getAppContext(), strings.torfolder);
}
isLoading = false;
status.isTorInitialized = false;
initializeTorClient();
}
}
else
{
sleep(threadCounter);
}
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
}.start();
}
public void initializeTorClient()
{
if(!isLoading)
{
new Thread()
{
public void run()
{
while (true)
{
try
{
isLoading = true;
int totalSecondsPerTorStartup = 4 * 60;
int totalTriesPerTorStartup = 5;
boolean ok = onionProxyManager.startWithRepeat(totalSecondsPerTorStartup, totalTriesPerTorStartup);
if (!ok)
{
continue;
}
home_model.getInstance().setPort(onionProxyManager.getIPv4LocalHostSocksPort());
initializeProxy();
status.isTorInitialized = true;
isLoading = false;
break;
} catch (Exception ex) {
ex.printStackTrace();
continue;
}
}
}
}.start();
}
}
/*Proxy Initialization*/
public void initializeProxy()
{
PrefsHelper.setPref(keys.proxy_type, constants.proxy_type);
PrefsHelper.setPref(keys.proxy_socks,constants.proxy_socks);
PrefsHelper.setPref(keys.proxy_socks_port, home_model.getInstance().getPort());
PrefsHelper.setPref(keys.proxy_socks_version,constants.proxy_socks_version);
PrefsHelper.setPref(keys.proxy_socks_remote_dns,constants.proxy_socks_remote_dns);
PrefsHelper.setPref(keys.proxy_cache,constants.proxy_cache);
PrefsHelper.setPref(keys.proxy_memory,constants.proxy_memory);
PrefsHelper.setPref(keys.proxy_useragent_override, constants.proxy_useragent_override);
PrefsHelper.setPref(keys.proxy_donottrackheader_enabled,constants.proxy_donottrackheader_enabled);
PrefsHelper.setPref(keys.proxy_donottrackheader_value,constants.proxy_donottrackheader_value);
}
/*Helper Methods*/
public String getLogs()
{
if(onionProxyManager!=null)
{
String Logs = onionProxyManager.getLastLog();
if(Logs.equals(""))
{
return "Loading Please Wait";
}
Logs=Logs.replace("FAILED","Securing");
return "Installing | " + Logs;
}
return "Loading Please Wait";
}
}

View File

@ -1,5 +1,6 @@
package com.darkweb.genesissearchengine.pluginManager; package com.darkweb.genesissearchengine.pluginManager;
import android.app.Activity;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
@ -7,6 +8,7 @@ import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController; import com.darkweb.genesissearchengine.appManager.homeManager.homeController;
import com.darkweb.genesissearchengine.constants.enums; import com.darkweb.genesissearchengine.constants.enums;
import com.darkweb.genesissearchengine.constants.keys; import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.constants.strings; import com.darkweb.genesissearchengine.constants.strings;
import com.darkweb.genesissearchengine.dataManager.dataController; import com.darkweb.genesissearchengine.dataManager.dataController;
import com.darkweb.genesissearchengine.helperManager.eventObserver; import com.darkweb.genesissearchengine.helperManager.eventObserver;
@ -16,6 +18,7 @@ import org.torproject.android.service.wrapper.orbotLocalConstants;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Locale;
public class pluginController public class pluginController
{ {
@ -28,6 +31,7 @@ public class pluginController
private messageManager mMessageManager; private messageManager mMessageManager;
private activityContextManager mContextManager; private activityContextManager mContextManager;
private boolean mIsInitialized = false; private boolean mIsInitialized = false;
private langManager mLangManager;
private boolean mIsServiceInitialized = false; private boolean mIsServiceInitialized = false;
/*Private Variables*/ /*Private Variables*/
@ -53,6 +57,9 @@ public class pluginController
} }
public void preInitialize(homeController context){ public void preInitialize(homeController context){
mLangManager = new langManager(context,new langCallback());
mLangManager.setDefaultLanguage(new Locale(status.sLanguage));
mFabricManager = new fabricManager(context,new fabricCallback()); mFabricManager = new fabricManager(context,new fabricCallback());
} }
@ -180,6 +187,14 @@ public class pluginController
} }
} }
/*Lang Manager*/
private class langCallback implements eventObserver.eventListener{
@Override
public void invokeObserver(List<Object> data, enums.etype event_type)
{
}
}
/*Onion Proxy Manager*/ /*Onion Proxy Manager*/
private class orbotCallback implements eventObserver.eventListener{ private class orbotCallback implements eventObserver.eventListener{
@Override @Override
@ -189,6 +204,17 @@ public class pluginController
} }
} }
/*Lang Manager*/
public void setLanguage(AppCompatActivity context){
mLangManager.setDefaultLanguage(new Locale(status.sLanguage));
}
public void onCreate(Activity activity) {
mLangManager.onCreate(activity);
}
public void onResume(Activity activity) {
mLangManager.onResume(activity);
}
/*Message Manager*/ /*Message Manager*/
private class messageCallback implements eventObserver.eventListener{ private class messageCallback implements eventObserver.eventListener{
@Override @Override

View File

@ -1,34 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillType="evenOdd"
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
android:strokeColor="#00000000"
android:strokeWidth="1">
<aapt:attr name="android:fillColor">
<gradient
android:endX="78.5885"
android:endY="90.9159"
android:startX="48.7653"
android:startY="61.0927"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0"/>
<item
android:color="#00000000"
android:offset="1.0"/>
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
android:strokeColor="#00000000"
android:strokeWidth="1"/>
</vector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 720 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 638 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

View File

@ -1,76 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:height="108dp"
android:width="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<item android:drawable="@android:color/black" />
<path android:fillColor="#008577"
android:pathData="M0,0h108v108h-108z"/>
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
</vector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 B

View File

@ -85,6 +85,7 @@
<TextView <TextView
android:textSize="16sp" android:textSize="16sp"
android:layout_width="0dp" android:layout_width="0dp"
android:paddingBottom="30dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="40" android:layout_weight="40"
android:background="@color/clear_alpha" android:background="@color/clear_alpha"

View File

@ -265,7 +265,7 @@
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginTop="54.9dp" android:layout_marginTop="54.9dp"
android:alpha="0" android:alpha="0"
ads:adSize="BANNER" ads:adSize="SMART_BANNER"
ads:adUnitId="ca-app-pub-5074525529134731/7816565677" ads:adUnitId="ca-app-pub-5074525529134731/7816565677"
ads:layout_constraintEnd_toEndOf="parent" ads:layout_constraintEnd_toEndOf="parent"
ads:layout_constraintHorizontal_bias="0.5" ads:layout_constraintHorizontal_bias="0.5"

View File

@ -0,0 +1,184 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
tools:context="com.darkweb.genesissearchengine.appManager.languageManager.languageController">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:background="@color/white"
android:orientation="vertical"
android:paddingBottom="50dp"
android:layout_height="wrap_content">
<!-- Title Header -->
<LinearLayout
android:layout_width="match_parent"
android:background="@color/white"
android:layout_marginBottom="0dp"
android:orientation="horizontal"
android:layout_height="52dp">
<ImageButton
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginStart="10dp"
android:layout_marginBottom="0dp"
android:layout_marginTop="12dp"
android:id="@+id/newButton"
android:onClick="onNavigationBackPressed"
android:scaleType="fitCenter"
android:tint="@color/black"
android:src="@drawable/back_arrow"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/todo"/>
<TextView
android:textColor="@color/text_color_v1"
android:textSize="19sp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="40"
android:layout_marginTop="12dp"
android:textStyle="bold"
android:layout_marginStart="30dp"
android:text="@string/LANGUAGE_HEADER"
/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="1dp"
android:background="@color/white_dark" />
<Button
android:id="@+id/langEnglish"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@xml/sc_side_item"
android:gravity="start|center_vertical"
android:onClick="onMenuItemInvoked"
android:paddingStart="15dp"
android:paddingEnd="15dp"
android:text="@string/LANGUAGE_MESSAGE_BT_DEFAULT"
android:textSize="14sp" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="1dp"
android:background="@color/white_dark" />
<Button
android:id="@+id/langGerman"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@xml/sc_side_item"
android:gravity="start|center_vertical"
android:onClick="onMenuItemInvoked"
android:paddingStart="15dp"
android:paddingEnd="15dp"
android:text="@string/LANGUAGE_MESSAGE_BT_1"
android:textSize="14sp" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="1dp"
android:background="@color/white_dark" />
<Button
android:id="@+id/langItalian"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@xml/sc_side_item"
android:gravity="start|center_vertical"
android:onClick="onMenuItemInvoked"
android:paddingStart="15dp"
android:paddingEnd="15dp"
android:text="@string/LANGUAGE_MESSAGE_BT_2"
android:textSize="14sp" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="1dp"
android:background="@color/white_dark" />
<Button
android:id="@+id/langPorteguse"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@xml/sc_side_item"
android:gravity="start|center_vertical"
android:onClick="onMenuItemInvoked"
android:paddingStart="15dp"
android:paddingEnd="15dp"
android:text="@string/LANGUAGE_MESSAGE_BT_3"
android:textSize="14sp" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="1dp"
android:background="@color/white_dark" />
<Button
android:id="@+id/langRussian"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@xml/sc_side_item"
android:gravity="start|center_vertical"
android:onClick="onMenuItemInvoked"
android:paddingStart="15dp"
android:paddingEnd="15dp"
android:text="@string/LANGUAGE_MESSAGE_BT_4"
android:textSize="14sp" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="1dp"
android:background="@color/white_dark" />
<Button
android:id="@+id/langUkarian"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@xml/sc_side_item"
android:gravity="start|center_vertical"
android:onClick="onMenuItemInvoked"
android:paddingStart="15dp"
android:paddingEnd="15dp"
android:text="@string/LANGUAGE_MESSAGE_BT_5"
android:textSize="14sp" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="1dp"
android:background="@color/white_dark" />
<Button
android:id="@+id/langChinese"
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@xml/sc_side_item"
android:gravity="start|center_vertical"
android:onClick="onMenuItemInvoked"
android:paddingStart="15dp"
android:paddingEnd="15dp"
android:text="@string/LANGUAGE_MESSAGE_BT_6"
android:textSize="14sp" />
<!-- Title Header -->
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1,86 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
tools:context="com.darkweb.genesissearchengine.appManager.list_manager.list_controller">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="56dp"
android:orientation="horizontal"
android:elevation="7dp"
android:background="@xml/floating_button_border"
android:gravity="left" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent"
tools:ignore="RtlHardcoded,UselessParent">
<ImageButton
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginStart="10dp"
android:layout_marginTop="14dp"
android:layout_marginBottom="0dp"
android:id="@+id/home"
android:onClick="onBackPressed"
android:scaleType="fitCenter"
android:tint="@color/black"
android:src="@drawable/back_arrow"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/todo"/>
<EditText
android:layout_width="0dp"
android:layout_height="match_parent"
android:textSize="15sp"
android:textColor="@color/text_color_v2"
android:selectAllOnFocus="true"
android:paddingLeft="18dp"
android:paddingRight="10dp"
android:textColorHighlight="@color/text_color_highlight_v1"
android:background="@xml/search_back_default"
android:textCursorDrawable="@xml/search_cursor_state"
android:hint="@string/SearchHint"
android:ems="10"
android:layout_marginTop="8dp"
android:inputType="textNoSuggestions"
android:layout_marginBottom="8dp"
android:layout_marginEnd="0dp"
android:layout_marginStart="10dp"
android:maxLines="1"
android:id="@+id/search" android:layout_weight="1" android:importantForAutofill="no"
tools:targetApi="o"/>
<ImageButton
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:layout_marginTop="12dp"
android:layout_marginBottom="12dp"
android:id="@+id/menu"
android:onClick="onClearHistory"
android:scaleType="fitCenter"
android:src="@drawable/dustbin"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/todo"/>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/listview"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginStart="0dp"
android:layout_marginTop="55dp" android:layout_width="match_parent" android:layout_height="match_parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintEnd_toEndOf="parent"/>
<ImageView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="80dp"
android:paddingLeft="80dp"
android:id="@+id/empty_list"
android:src="@drawable/empty_list"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:contentDescription="@string/todo"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -282,6 +282,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:background="@color/white" android:background="@color/white"
android:orientation="horizontal" android:orientation="horizontal"
android:layout_marginBottom="20dp"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<TextView <TextView
android:id="@+id/font_size_percentage" android:id="@+id/font_size_percentage"
@ -296,11 +297,12 @@
<SeekBar <SeekBar
android:id="@+id/font_size" android:id="@+id/font_size"
android:layout_width="158dp" android:layout_width="158dp"
android:layout_height="55dp" android:layout_height="wrap_content"
android:paddingBottom="10dp"
android:paddingTop="10dp"
android:ems="10" android:ems="10"
android:progress="100" android:progress="100"
android:max="200" android:max="200"
android:layout_marginTop="-15dp"
android:layout_marginEnd="18dp" android:layout_marginEnd="18dp"
android:layout_weight="1" android:layout_weight="1"
android:paddingRight="30dp" android:paddingRight="30dp"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 730 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 730 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 730 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 730 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 730 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 730 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

View File

@ -250,7 +250,7 @@
<string name="home_tab_text">1</string> <string name="home_tab_text">1</string>
<string name="home_connect">Verbinden</string> <string name="home_connect">Connect</string>
<string name="home_loading">Laden, bitte warten</string> <string name="home_loading">Laden, bitte warten</string>

View File

@ -250,7 +250,7 @@
<string name="home_tab_text">1</string> <string name="home_tab_text">1</string>
<string name="home_connect">Collegare</string> <string name="home_connect">Connect</string>
<string name="home_loading">Attendere il caricamento prego</string> <string name="home_loading">Attendere il caricamento prego</string>

View File

@ -250,7 +250,7 @@
<string name="home_tab_text">1</string> <string name="home_tab_text">1</string>
<string name="home_connect">Conectar</string> <string name="home_connect">Connect</string>
<string name="home_loading">Carregando, por favor espere</string> <string name="home_loading">Carregando, por favor espere</string>

View File

@ -250,7 +250,7 @@
<string name="home_tab_text">1</string> <string name="home_tab_text">1</string>
<string name="home_connect">Підключення</string> <string name="home_connect">Connect</string>
<string name="home_loading">Завантаження, будь ласка, зачекайте</string> <string name="home_loading">Завантаження, будь ласка, зачекайте</string>

View File

@ -250,7 +250,7 @@
<string name="home_tab_text">1个</string> <string name="home_tab_text">1个</string>
<string name="home_connect">连接</string> <string name="home_connect">Connect</string>
<string name="home_loading">加载请稍候</string> <string name="home_loading">加载请稍候</string>

View File

@ -7,13 +7,13 @@
<string name="homeUrl" translatable="false">https://genesis.onion</string> <string name="homeUrl" translatable="false">https://genesis.onion</string>
<string name="errorTiyle">\u0020\u0020\u0020Opps! Some Thing Went Wrong</string> <string name="errorTiyle">\u0020\u0020\u0020Opps! Some Thing Went Wrong</string>
<string name="todo">TODO</string> <string name="todo">TODO</string>
<string name="projectName">Genesis Search Engine</string> <string name="projectName" translatable="false">Genesis Search Engine</string>
<string name="loadingText">Online Freedom</string> <string name="loadingText">Online Freedom</string>
<string name="reload">Reload</string> <string name="reload">Reload</string>
<string name="internetErrorMessage">These might be the problems you are facing \n\n• Webpage or Website might be down \n• Your Internet connection might be poor \n• You might be using a proxy \n• Website might be blocked by firewall</string> <string name="internetErrorMessage">These might be the problems you are facing \n\n• Webpage or Website might be down \n• Your Internet connection might be poor \n• You might be using a proxy \n• Website might be blocked by firewall</string>
<string name="title_activity_list_manager">list_manager</string> <string name="title_activity_list_manager">list_manager</string>
<string name="title_activity_setting_controller">Settings</string> <string name="title_activity_setting_controller">Settings</string>
<string name="file_provider_authority">com.darkweb.genesissearchengine.fileprovider</string> <string name="file_provider_authority" translatable="false">com.darkweb.genesissearchengine.fileprovider</string>
<!-- Preference Titles --> <!-- Preference Titles -->
<string name="preferences_messages_header">Messages</string> <string name="preferences_messages_header">Messages</string>
@ -39,12 +39,12 @@
<!-- Bridge Settings --> <!-- Bridge Settings -->
<string name="bridge_basic_settings">Basic Settings</string> <string name="bridge_basic_settings">Basic Settings</string>
<string name="bridge_Automatid_title">Create Automatically</string> <string name="bridge_Automatid_title">Create Automatically</string>
<string name="bridge_Manual_desc">Provide a Bridge I know</string> <string name="bridge_Manual_desc" translatable="false">Provide a Bridge I know</string>
<string name="bridge_Auto_switch">Auto</string> <string name="bridge_Auto_switch">Auto</string>
<string name="bridge_Manual_switch">Manual</string> <string name="bridge_Manual_switch">Manual</string>
<string name="bridge_port_hint">address:port Single Line</string> <string name="bridge_port_hint">address:port Single Line</string>
<string name="bridge_header">Bridge Settings</string> <string name="bridge_header" translatable="false">Bridge Settings</string>
<string name="bridge_desc">Bridges are unlisted Tor relays that make it more difficult to block connections into the Tor network. Because of how some countries try to block Tor, certain bridges work in some countries but not others</string> <string name="bridge_desc" translatable="false">Bridges are unlisted Tor relays that make it more difficult to block connections into the Tor network. Because of how some countries try to block Tor, certain bridges work in some countries but not others</string>
<string name="bridge_default_title">Select Default Bridge</string> <string name="bridge_default_title">Select Default Bridge</string>
<string name="bridge_request" translatable="false">Request Bridge</string> <string name="bridge_request" translatable="false">Request Bridge</string>
@ -78,9 +78,9 @@
<string name="REPORT_SUCCESS_TITLE">URL Reported Successfully</string> <string name="REPORT_SUCCESS_TITLE">URL Reported Successfully</string>
<string name="REPORT_SUCCESS_DESC">URL has been successfully reported. It will take about a week to completely remove this website from our servers\n</string> <string name="REPORT_SUCCESS_DESC">URL has been successfully reported. It will take about a week to completely remove this website from our servers\n</string>
<string name="REPORT_SUCCESS_BT_1">Dismiss</string> <string name="REPORT_SUCCESS_BT_1">Dismiss</string>
<string name="NOT_SUPPORTED_TITLE">Action not Supported</string> <string name="NOT_SUPPORTED_TITLE" translatable="false">Action not Supported</string>
<string name="NOT_SUPPORTED_MESSAGE">No application found to handle email</string> <string name="NOT_SUPPORTED_MESSAGE" translatable="false">No application found to handle email</string>
<string name="NOT_SUPPORTED_BT_1">Dismiss</string> <string name="NOT_SUPPORTED_BT_1" translatable="false">Dismiss</string>
<string name="RATE_TITLE">Rate US</string> <string name="RATE_TITLE">Rate US</string>
<string name="RATE_MESSAGE">We don\'t take donations or earn money from this app. We are trying to make a private anonymous internet \n\nIf you think this app works please rate us it gives us hope and strength to continue</string> <string name="RATE_MESSAGE">We don\'t take donations or earn money from this app. We are trying to make a private anonymous internet \n\nIf you think this app works please rate us it gives us hope and strength to continue</string>
<string name="RATE_POSITIVE">Like This App</string> <string name="RATE_POSITIVE">Like This App</string>
@ -108,7 +108,7 @@
<string name="BRIDGE_MAIL_MESSAGE">You can get a bridge address through email, the web or by scanning a bridge QR code. Select \'Email\' below to request a bridge address.\n\nOnce you have an address, copy &amp; paste it into the above box and start.</string> <string name="BRIDGE_MAIL_MESSAGE">You can get a bridge address through email, the web or by scanning a bridge QR code. Select \'Email\' below to request a bridge address.\n\nOnce you have an address, copy &amp; paste it into the above box and start.</string>
<string name="BRIDGE_MAIL_POSITIVE">EMAIL</string> <string name="BRIDGE_MAIL_POSITIVE">EMAIL</string>
<string name="LONG_URL_TITLE">URL Notification</string> <string name="LONG_URL_TITLE">URL Notification</string>
<string name="LONG_URL_MESSAGE"></string> <string name="LONG_URL_MESSAGE" />
<string name="LONG_URL_OPTION_1">Open In New Tab</string> <string name="LONG_URL_OPTION_1">Open In New Tab</string>
<string name="LONG_URL_OPTION_2">Open In Current Tab</string> <string name="LONG_URL_OPTION_2">Open In Current Tab</string>
<string name="LONG_URL_OPTION_3">Copy to Clipboard</string> <string name="LONG_URL_OPTION_3">Copy to Clipboard</string>
@ -137,9 +137,9 @@
/*Text Manager*/ /*Text Manager*/
public public
<string name="DARK_WEB">Hidden Web</string> <string name="DARK_WEB" translatable="false">Hidden Web</string>
public public
<string name="EMPTY_STR"></string> <string name="EMPTY_STR" />
public public
<string name="EMPTY_SPACE"> </string> <string name="EMPTY_SPACE"> </string>
@ -221,19 +221,30 @@
<string name="popup_download">Downloads</string> <string name="popup_download">Downloads</string>
<string name="popup_history">History</string> <string name="popup_history">History</string>
<string name="popup_settings">Settings</string> <string name="popup_settings">Settings</string>
<string name="popup_desktop">Desktop Site</string> <string name="popup_desktop" translatable="false">Desktop Site</string>
<string name="popup_bookmark_page">Bookmark This Page</string> <string name="popup_bookmark_page">Bookmark This Page</string>
<string name="popup_open_bookmark">Open Bookmarks</string> <string name="popup_open_bookmark">Open Bookmarks</string>
<string name="popup_report">Report Website</string> <string name="popup_report">Report Website</string>
<string name="popup_rate">Rate This App</string> <string name="popup_rate">Rate This App</string>
<string name="popup_share">Share</string> <string name="popup_share">Share</string>
<!-- Language Manager Manager -->
<string name="LANGUAGE_HEADER" translatable="false">Language</string>
<string name="LANGUAGE_MESSAGE_TITLE" translatable="false">Change Language</string>
<string name="LANGUAGE_MESSAGE_DESC" translatable="false">We currently support the following langugage would be adding more soon\n</string>
<string name="LANGUAGE_MESSAGE_BT_DEFAULT" translatable="false">English (United States)</string>
<string name="LANGUAGE_MESSAGE_BT_1" translatable="false">German (Germany)</string>
<string name="LANGUAGE_MESSAGE_BT_2" translatable="false">Italian (Italy)</string>
<string name="LANGUAGE_MESSAGE_BT_3" translatable="false">Portuguese (Brazil)</string>
<string name="LANGUAGE_MESSAGE_BT_4" translatable="false">Russian (Russia)</string>
<string name="LANGUAGE_MESSAGE_BT_5" translatable="false">Ukrainian (Ukraine)</string>
<string name="LANGUAGE_MESSAGE_BT_6" translatable="false">Chinese Simplified (Mainland China)</string>
<!-- Orbot Settings --> <!-- Orbot Settings -->
<string name="orbot_settings_warning">⚠️ Warning</string> <string name="orbot_settings_warning">⚠️ Warning</string>
<string name="orbot_settings_bridges">Enable Bridges</string> <string name="orbot_settings_bridges" translatable="false">Enable Bridges</string>
<string name="gateway_info">Enable Gateway</string> <string name="gateway_info" translatable="false">Enable Gateway</string>
<string name="gateway_button">Enable Gateway</string> <string name="gateway_button" translatable="false">Enable Gateway</string>
<string name="loading_please_wait">Loading Please Wait</string> <string name="loading_please_wait">Loading Please Wait</string>
<string name="orbot_option_title_reset">App Stuck in loading</string> <string name="orbot_option_title_reset">App Stuck in loading</string>
<string name="orbot_option_desc_reset">Clear Storage</string> <string name="orbot_option_desc_reset">Clear Storage</string>
@ -241,10 +252,10 @@
<!-- Orbot View --> <!-- Orbot View -->
<string name="orbot_header">Proxy Settings</string> <string name="orbot_header">Proxy Settings</string>
<string name="orbot_desc">Genesis Browser connects you to the Tor Network run by thousands of volunteers around the world! Can these options help you</string> <string name="orbot_desc">We connect you to the Tor Network run by thousands of volunteers around the world! Can these options help you</string>
<string name="orbot_option_title">Internet is censored here</string> <string name="orbot_option_title">Internet is censored here</string>
<string name="orbot_option_desc">Bypass Firewall</string> <string name="orbot_option_desc">Bypass Firewall</string>
<string name="orbot_option_warning_slow_speed">Bridges causes internet to run very slow. Use them only if internet is censored in your country or Tor network is blocked</string> <string name="orbot_option_warning_slow_speed" translatable="false">Bridges causes internet to run very slow. Use them only if internet is censored in your country or Tor network is blocked</string>
<!-- Splash --> <!-- Splash -->
@ -266,11 +277,11 @@
<!-- Home View --> <!-- Home View -->
<string name="home_tab_text">1</string> <string name="home_tab_text">1</string>
<string name="home_connect">Connect</string> <string name="home_connect" translatable="false">Connect</string>
<string name="home_loading">Loading Please Wait</string> <string name="home_loading" translatable="false">Loading Please Wait</string>
<!-- Landing Page --> <!-- Landing Page -->
<string name="bridges_sometimes">"Sometimes you need a bridge to get to Tor."</string> <string name="bridges_sometimes" translatable="false">"Sometimes you need a bridge to get to Tor."</string>
<string name="action_more">"TELL ME MORE"</string> <string name="action_more">"TELL ME MORE"</string>
<string name="vpn_setup">"You can enable any app to go through Tor using our built-in VPN."</string> <string name="vpn_setup">"You can enable any app to go through Tor using our built-in VPN."</string>
<string name="vpn_setup_sub">"This won\'t make you anonymous, but it will help get through firewalls."</string> <string name="vpn_setup_sub">"This won\'t make you anonymous, but it will help get through firewalls."</string>
@ -288,6 +299,8 @@
<string name="error_m5">Please contact the website owners to inform them of this problem.</string> <string name="error_m5">Please contact the website owners to inform them of this problem.</string>
<string name="error_m6">Reload</string> <string name="error_m6">Reload</string>
<!-- Others -->
<string name="PREF_LANGUAGE" translatable="false">pref_language</string>
<string-array name="fonts"> <string-array name="fonts">
<item>55 Percent</item> <item>55 Percent</item>

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="#e2e2e2" />
</shape>
</item>
<item android:bottom="1dp">
<shape android:shape="rectangle">
<solid android:color="#fcfcfc" />
</shape>
</item>
</layer-list>

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<shape
android:shape="rectangle">
<stroke android:width="0px" android:color="@color/float_white" />
<solid android:color="@color/white" />
</shape>
</item>
<item android:top="0px" android:bottom="0px">
<shape
android:shape="rectangle">
<stroke android:width="0px" android:color="#00000000" />
<solid android:color="#00000000" />
</shape>
</item>
</layer-list>

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="false">
<shape android:shape="oval">
<solid android:color="#ffffff"/>
</shape>
</item>
<item android:state_pressed="true">
<shape android:shape="oval">
<solid android:color="@color/holo_gray"/>
</shape>
</item>
</selector>

View File

@ -1,9 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M19,9h-4V3H9v6H5l7,7 7,-7zM5,18v2h14v-2H5z"/>
</vector>

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config
cleartextTrafficPermitted="true">
<trust-anchors>
<certificates src="system"/>
<certificates src="user"/>
</trust-anchors>
</base-config>
</network-security-config>

View File

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" >
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp" >
<!-- you can use any color you want I used here gray color-->
<solid android:color="@color/button_gray"/>
<corners android:radius="5dp"/>
</shape>
</item>
<item android:state_pressed="false" >
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp">
<!-- you can use any color you want I used here gray color-->
<solid android:color="@color/white"/>
<corners android:radius="5dp"/>
</shape>
</item>
</selector>

Some files were not shown because too many files have changed in this diff Show More