Code Revision and Menu Update

master
msmannan00 2019-07-13 21:20:04 +05:00
parent 907173b534
commit fc1d48dea4
56 changed files with 2392 additions and 253 deletions

View File

@ -5,7 +5,7 @@ apply plugin: 'io.fabric'
ext {
geckoviewChannel = ""
geckoviewVersion = "64.0.20180927100037"
geckoviewVersion = "67.0.20190613202504"
}
@ -44,31 +44,30 @@ android {
flavorDimensions "abi"
productFlavors {
arm {
versionCode 175
versionName "175"
/*arm {
versionCode 180
versionName "180"
dimension "abi"
buildConfigField "String", "VARIANT", "\"arm\""
}
aarch64 {
versionCode 176
versionName "176"
versionCode 181
versionName "181"
dimension "abi"
buildConfigField "String", "VARIANT", "\"aarch64\""
}
}*/
x86 {
versionCode 177
versionName "177"
versionCode 182
versionName "182"
dimension "abi"
buildConfigField "String", "VARIANT", "\"i686\""
}
x86_64 {
versionCode 178
versionName "178"
/*x86_64 {
versionCode 183
versionName "183"
dimension "abi"
buildConfigField "String", "VARIANT", "\"x86_64\""
}
}*/
}
@ -109,11 +108,15 @@ dependencies {
implementation 'com.android.support.constraint:constraint-layout:2.0.0-beta2'
implementation 'cz.msebera.android:httpclient:4.5.8'
x86Implementation "org.mozilla.geckoview:geckoview-x86:67.0.20190521210220"
x86_64Implementation "org.mozilla.geckoview:geckoview-x86_64:67.0.20190521210220"
armImplementation "org.mozilla.geckoview:geckoview-armeabi-v7a:67.0.20190521210220"
implementation 'com.google.firebase:firebase-core:17.0.0'
aarch64Implementation "org.mozilla.geckoview:geckoview-arm64-v8a:67.0.20190521210220"
x86Implementation "org.mozilla.geckoview:geckoview-x86:67.0.20190613202504"
//x86_64Implementation "org.mozilla.geckoview:geckoview-x86_64:67.0.20190613202504"
//armImplementation "org.mozilla.geckoview:geckoview-armeabi-v7a:67.0.20190613202504"
//aarch64Implementation "org.mozilla.geckoview:geckoview-arm64-v8a:67.0.20190613202504"
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.preference:preference:1.1.0-alpha02'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
implementation 'com.crowdfire.cfalertdialog:cfalertdialog:1.1.0'
@ -123,6 +126,9 @@ dependencies {
implementation 'org.slf4j:slf4j-android:1.7.26'
implementation 'com.google.android.gms:play-services-ads:18.0.0'
implementation 'com.android.support:design:28.0.0'
androidTestImplementation 'androidx.test:runner:1.2.0-alpha03'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-alpha03'
implementation('com.crashlytics.sdk.android:crashlytics:2.10.1@aar') {
transitive = true;
}

View File

@ -1,34 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" package="com.example.myapplication">
xmlns:tools="http://schemas.android.com/tools"
package="com.example.myapplication">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher_v1"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/ic_launcher_round_v1"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:networkSecurityConfig="@xml/network_security_config"
android:usesCleartextTraffic="true">
<activity
android:name="com.darkweb.genesissearchengine.appManager.setting_manager.setting_controller"
android:windowSoftInputMode="adjustNothing"
android:label="@string/title_activity_setting_controller">
</activity>
<activity android:name="com.darkweb.genesissearchengine.appManager.list_activity.list_controller"
android:windowSoftInputMode="adjustNothing">
</activity>
<uses-library
android:name="org.apache.http.legacy"
android:required="false"/>
<activity android:name="com.darkweb.genesissearchengine.appManager.application_controller"
<activity
android:name="com.darkweb.genesissearchengine.appManager.main_activity.application_controller"
android:windowSoftInputMode="adjustNothing"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<meta-data
android:name="io.fabric.ApiKey"
android:value="be76c64dae2519d4ab8daaed88298da14c7c294f"
/>
android:value="be76c64dae2519d4ab8daaed88298da14c7c294f"/>
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-5074525529134731~2926711128"/>

View File

@ -1,54 +0,0 @@
package com.darkweb.genesissearchengine.appManager;
import android.content.Context;
public class app_model
{
/*Data Objects*/
private static String currentURL = "http://boogle.store/";
private static int port = 9150;
private boolean isURLLoading = true;
private Context appContext;
private application_controller appInstance;
/*Initializations*/
private static final app_model ourInstance = new app_model();
public static app_model getInstance()
{
return ourInstance;
}
/*Getters Setters*/
public int getPort()
{
return port;
}
public void setPort(int port)
{
this.port = port;
}
public Context getAppContext()
{
return appContext;
}
public void setAppContext(Context appContext)
{
this.appContext = appContext;
}
public application_controller getAppInstance()
{
return appInstance;
}
public void setAppInstance(application_controller appInstance)
{
this.appInstance = appInstance;
}
}

View File

@ -0,0 +1,82 @@
package com.darkweb.genesissearchengine.appManager.data_helper;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException;
import com.darkweb.genesissearchengine.appManager.list_activity.list_row_model;
import com.darkweb.genesissearchengine.appManager.main_activity.app_model;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.helperMethod;
import java.io.IOException;
import java.util.ArrayList;
import static android.content.Context.MODE_PRIVATE;
public class database_controller
{
private static final database_controller ourInstance = new database_controller();
public static database_controller getInstance()
{
return ourInstance;
}
private SQLiteDatabase database_instance;
private database_controller()
{
}
public void initialize()
{
try
{
database_instance = app_model.getInstance().getAppInstance().openOrCreateDatabase("DatabaseName", 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();
}
}
public void execSQL(String query)
{
database_instance.execSQL(query);
}
public ArrayList<list_row_model> selectHistory()
{
ArrayList<list_row_model> tempmodel = new ArrayList<list_row_model>();
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))));
app_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<list_row_model>();
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

@ -0,0 +1,135 @@
package com.darkweb.genesissearchengine.appManager.data_helper;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException;
import android.database.sqlite.SQLiteOpenHelper;
import com.darkweb.genesissearchengine.appManager.list_activity.list_model;
import com.darkweb.genesissearchengine.appManager.list_activity.list_row_model;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
public class database_helper extends SQLiteOpenHelper
{
private Context mContext;
private String mDbPath;
private String mDbName;
private int mDbVersion;
public SQLiteDatabase db;
public database_helper(Context context, String dbName, int version) {
super(context, dbName, null, version);
mContext = context;
mDbPath = context.getApplicationInfo().dataDir + "/databases/";
mDbName = dbName;
mDbVersion = version;
}
public boolean exists() {
SQLiteDatabase db = null;
try {
db = SQLiteDatabase.openDatabase(mDbPath + mDbName, null, SQLiteDatabase.OPEN_READONLY);
}
catch (SQLiteException e) {
//database does not exist yet.
}
if (db != null) {
db.close();
return true;
} else {
return false;
}
}
public void openDatabase(int flag) throws SQLiteException, IOException {
if (!exists()) {
if (flag == SQLiteDatabase.OPEN_READONLY) {
this.getReadableDatabase();
} else if (flag == SQLiteDatabase.OPEN_READWRITE) {
this.getWritableDatabase();
}
InputStream iStream = null;
OutputStream oStream = null;
try {
iStream = mContext.getAssets().open(mDbName);
oStream = new FileOutputStream(mDbPath + mDbName);
byte[] buffer = new byte[1024];
int length;
while ((length = iStream.read(buffer)) > 0) {
oStream.write(buffer, 0, length);
}
} catch (IOException e) {
throw e;
} finally {
if (iStream != null) {
iStream.close();
}
if (oStream != null) {
oStream.flush();
oStream.close();
}
}
}
try {
if (flag == SQLiteDatabase.OPEN_READONLY) {
db = SQLiteDatabase.openDatabase(mDbPath + mDbName, null,
SQLiteDatabase.OPEN_READONLY);
} else if (flag == SQLiteDatabase.OPEN_READWRITE) {
db = SQLiteDatabase.openDatabase(mDbPath + mDbName, null,
SQLiteDatabase.OPEN_READWRITE);
}
} catch (SQLiteException e) {
throw e;
}
}
@Override
public synchronized void close() {
if (db != null) {
db.close();
}
super.close();
}
@Override
public void onCreate(SQLiteDatabase db) {
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
}
public void runQuery(String query)
{
db.execSQL(query);
}
public ArrayList<list_row_model> selectHistory()
{
ArrayList<list_row_model> tempmodel = new ArrayList<list_row_model>();
Cursor c = db.rawQuery("SELECT * FROM history ", null);
if (c.moveToFirst()){
do {
tempmodel.add(new list_row_model(c.getString(0),c.getString(1),Integer.parseInt(c.getString(0))));
} while(c.moveToNext());
}
c.close();
///db.close();
return tempmodel;
}
}

View File

@ -0,0 +1,159 @@
package com.darkweb.genesissearchengine.appManager.list_activity;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.*;
import androidx.recyclerview.widget.RecyclerView;
import com.darkweb.genesissearchengine.appManager.data_helper.database_controller;
import com.darkweb.genesissearchengine.appManager.main_activity.app_model;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.helperMethod;
import com.darkweb.genesissearchengine.pluginManager.orbot_manager;
import com.example.myapplication.R;
public class list_adapter extends RecyclerView.Adapter<list_adapter.listViewHolder>
{
private ImageView empty_list;
private list_controller controller;
public list_adapter()
{
}
public void initialize(ImageView empty_list,list_controller controller)
{
this.empty_list = empty_list;
this.controller = controller;
}
@Override
public listViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_manager_row, parent, false);
listViewHolder viewHolder = new listViewHolder(view);
return viewHolder;
}
@Override
public void onBindViewHolder(list_adapter.listViewHolder holder, int position)
{
holder.bindListView(list_model.getInstance().getModel().get(position));
clearMessageItem(holder.messageButton,holder.empty_message,position);
}
@Override
public int getItemCount() {
return list_model.getInstance().getModel().size();
}
public class listViewHolder extends RecyclerView.ViewHolder
{
public TextView heaaderText;
public TextView descriptionText;
public ImageButton messageButton;
public ImageView empty_message;
public listViewHolder(View itemView) {
super(itemView);
}
public void bindListView(list_row_model model) {
heaaderText = itemView.findViewById(R.id.header);
descriptionText = itemView.findViewById(R.id.description);
String header = model.getHeader();
descriptionText.setText(model.getDescription());
if(model.getHeader().length()<=2)
{
header = model.getDescription() + model.getHeader();
}
heaaderText.setText(header);
messageButton = itemView.findViewById(R.id.message_button);
empty_message = itemView.findViewById(R.id.empty_list);
setItemViewOnClickListener(itemView,header);
}
}
public void setItemViewOnClickListener(View itemView,String url)
{
itemView.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v)
{
String tempurl = url;
isValidUrl(tempurl);
controller.finish();
}
});
}
public boolean isValidUrl(String url)
{
url = helperMethod.completeURL(url);
if(!url.contains("boogle") && !url.equals(constants.backendGoogle) && !url.equals(constants.backendBing))
{
if(orbot_manager.getInstance().initOrbot(url))
{
app_model.getInstance().getAppInstance().onloadURL(url,true,false);
return true;
}
return false;
}
else
{
app_model.getInstance().getAppInstance().onloadURL(url,false,false);
return true;
}
}
public void clearMessageItem(ImageButton messageButton,ImageView view,int index)
{
ImageView newview = view;
messageButton.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v)
{
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_adapter.this.notifyItemRemoved(index);
list_adapter.this.notifyDataSetChanged();
isListEmpty(newview);
}
});
}
public void deleteFromDatabase(int index)
{
String table="bookmark";
if(list_model.getInstance().getType()==constants.list_history)
{
table = "history";
}
Log.i("dgfdfg","delete from "+table+" where id="+index);
database_controller.getInstance().execSQL("delete from "+table+" where id="+index);
}
public void isListEmpty(ImageView view)
{
if(list_model.getInstance().getModel().size()<=0)
{
empty_list.setAlpha(0f);
empty_list.setVisibility(View.VISIBLE);
empty_list.animate().alpha(1);
}
}
}

View File

@ -0,0 +1,152 @@
package com.darkweb.genesissearchengine.appManager.list_activity;
import android.view.View;
import android.view.inputmethod.EditorInfo;
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.data_helper.database_controller;
import com.darkweb.genesissearchengine.appManager.main_activity.app_model;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.pluginManager.message_manager;
import com.example.myapplication.R;
import java.util.ArrayList;
public class list_controller extends AppCompatActivity
{
private ImageView empty_list;
private EditText search_bar;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_app_list_manager);
initializeListInstance();
initializeListModel();
initializeListController();
initSearchBar();
updatelist();
}
public void initializeListInstance()
{
app_model.getInstance().setListInstance(this);
app_model.getInstance().setListContext(this);
}
public void initializeListModel()
{
Bundle bundle = getIntent().getExtras();
if(bundle.getInt(keys.list_type)==constants.list_bookmark)
{
list_model.getInstance().setType(constants.list_bookmark);
list_model.getInstance().setMainList(app_model.getInstance().getBookmark());
}
else
{
list_model.getInstance().setType(constants.list_history);
list_model.getInstance().setMainList(app_model.getInstance().getHistory());
}
}
public void initializeListController()
{
empty_list = findViewById(R.id.empty_list);
search_bar = findViewById(R.id.search);
RecyclerView list_view = findViewById(R.id.listview);
list_adapter adapter = new list_adapter();
adapter.initialize(empty_list,this);
list_view.setAdapter(adapter);
list_view.setLayoutManager(new LinearLayoutManager(this));
isListEmpty();
}
public void clearHistory(View view)
{
if(app_model.getInstance().getHistory().size()>0)
{
message_manager.getInstance().clearData();
}
}
public void clearAll()
{
list_model.getInstance().getModel().clear();
list_model.getInstance().getMainList().clear();
initializeListController();
empty_list.setAlpha(0f);
empty_list.setVisibility(View.VISIBLE);
empty_list.animate().alpha(1);
search_bar.setText("");
String table="bookmark";
if(list_model.getInstance().getType()==constants.list_history)
{
table = "history";
}
database_controller.getInstance().execSQL("delete from "+table+" where 1");
}
public void isListEmpty()
{
if(list_model.getInstance().getModel().size()<=0)
{
empty_list.setVisibility(View.VISIBLE);
}
else
{
empty_list.setVisibility(View.GONE);
}
}
public void initSearchBar()
{
search_bar.setOnEditorActionListener((v, actionId, event) ->
{
if (actionId != EditorInfo.IME_ACTION_NEXT)
{
return false;
}
else
{
return updatelist();
}
});
}
public boolean updatelist()
{
String query = search_bar.getText().toString();
ArrayList<list_row_model> temp_model = new ArrayList<list_row_model>();
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);
initializeListController();
return true;
}
public void onBackPressed(View view)
{
finish();
}
}

View File

@ -0,0 +1,78 @@
package com.darkweb.genesissearchengine.appManager.list_activity;
import java.util.ArrayList;
public class list_model
{
private static final list_model ourInstance = new list_model();
public static list_model getInstance()
{
return ourInstance;
}
private list_model()
{
}
public ArrayList<list_row_model> list_model = new ArrayList<list_row_model>();
public ArrayList<Integer> list_index = new ArrayList<Integer>();
private ArrayList<list_row_model> main_model_ref = new ArrayList<list_row_model>();
public int listType;
public void setType(int listType)
{
this.listType = listType;
}
public int getType()
{
return listType;
}
public void setModel(ArrayList<list_row_model> list_model)
{
this.list_model = list_model;
}
public ArrayList<list_row_model> getModel()
{
return list_model;
}
public void setIndex(int index)
{
list_index.add(index);
}
public ArrayList<Integer> getIndex()
{
return list_index;
}
public 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);
}
}
public void setMainList(ArrayList<list_row_model> model)
{
main_model_ref = model;
}
public ArrayList<list_row_model> getMainList()
{
return main_model_ref;
}
public void removeFromMainList(int index)
{
main_model_ref.remove(index);
}
}

View File

@ -0,0 +1,26 @@
package com.darkweb.genesissearchengine.appManager.list_activity;
public class list_row_model
{
private int id;
private String header;
private String description;
public list_row_model(String header, String description,int id) {
this.id = id;
this.header = header;
this.description = description;
}
public String getHeader() {
return header;
}
public String getDescription() {
return description;
}
public int getId() {
return id;
}
}

View File

@ -0,0 +1,118 @@
package com.darkweb.genesissearchengine.appManager.main_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;
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

@ -0,0 +1,174 @@
package com.darkweb.genesissearchengine.appManager.main_activity;
import android.content.Context;
import android.net.Uri;
import com.darkweb.genesissearchengine.appManager.data_helper.database_controller;
import com.darkweb.genesissearchengine.appManager.list_activity.list_controller;
import com.darkweb.genesissearchengine.appManager.list_activity.list_model;
import com.darkweb.genesissearchengine.appManager.list_activity.list_row_model;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.helperMethod;
import java.text.SimpleDateFormat;
import java.util.*;
public class app_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 HashSet<String> suggestions = new HashSet<String>();
private static int port = 9150;
private Context appContext;
private application_controller appInstance;
private Context listContext;
private list_controller listInstance;
/*Initializations*/
public void initialization()
{
database_controller.getInstance().initialize();
initializeHistory();
initializeBookmarks();
}
/*Setter Getter Initializations*/
private static final app_model ourInstance = new app_model();
public static app_model getInstance()
{
return ourInstance;
}
/*Getters Setters*/
public int getPort()
{
return port;
}
public void setPort(int port)
{
this.port = port;
}
public void setAppContext(Context appContext)
{
this.appContext = appContext;
}
public Context getAppContext()
{
return appContext;
}
public application_controller getAppInstance()
{
return appInstance;
}
public void setAppInstance(application_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");
}
app_model.getInstance().getAppInstance().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());
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("yyyy-MM-dd | HH-mm-ss");
String date = d_form.format(new Date());
database_controller.getInstance().execSQL("INSERT INTO history(id,date,url) VALUES("+autoval+",'"+date+"','"+url+"');");
history.add(0,new list_row_model(url,date,autoval));
}
public ArrayList<list_row_model> getHistory() {
return history;
}
public 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());
bookmarks.remove(history.size()-1);
}
if(bookmarks.size()>0)
{
autoval = bookmarks.get(0).getId()+1;
}
if(title.equals(""))
{
title = "New_Bookmark"+autoval;
}
database_controller.getInstance().execSQL("INSERT INTO bookmark(id,title,url) VALUES("+autoval+",'"+title+"','"+url+"');");
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);
}
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);
app_model.getInstance().getAppInstance().reInitializeSuggestion();
}
public ArrayList<String> getSuggestions() {
return new ArrayList<String>(suggestions);
}
public void setListInstance(list_controller listInstance){
this.listInstance = listInstance;
}
public list_controller getListInstance(){
return listInstance;
}
public void setListContext(Context listContext) {
this.listContext = listContext;
}
public Context getListContext(){
return listContext;
}
}

View File

@ -1,23 +1,21 @@
package com.darkweb.genesissearchengine.appManager;
package com.darkweb.genesissearchengine.appManager.main_activity;
import android.annotation.SuppressLint;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.style.ForegroundColorSpan;
import android.util.Log;
import android.view.MenuInflater;
import android.view.View;
import android.view.WindowManager;
import android.webkit.WebView;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.*;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.view.MenuCompat;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.constants.messages;
@ -25,6 +23,7 @@ import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.dataManager.preference_manager;
import com.darkweb.genesissearchengine.helperMethod;
import com.darkweb.genesissearchengine.httpManager.serverRequestManager;
import com.darkweb.genesissearchengine.pluginManager.admanager;
import com.darkweb.genesissearchengine.pluginManager.message_manager;
import com.darkweb.genesissearchengine.pluginManager.orbot_manager;
import com.example.myapplication.R;
@ -37,7 +36,7 @@ public class applicationViewController
/*ViewControllers*/
private WebView webView;
private ProgressBar progressBar;
private EditText searchbar;
private AutoCompleteTextView searchbar;
private ConstraintLayout splashScreen;
private ConstraintLayout requestFailure;
private FloatingActionButton floatingButton;
@ -49,6 +48,7 @@ public class applicationViewController
private boolean pageLoadedSuccessfully = true;
private boolean isSplashLoading = false;
private Handler updateUIHandler = null;
private AutoCompleteAdapter suggestionAdapter;
/*ProgressBar Delayed Updater*/
Handler progressBarHandler = null;
@ -65,7 +65,7 @@ public class applicationViewController
{
}
public void initialization(WebView webView1, TextView loadingText, ProgressBar progressBar, EditText searchbar, ConstraintLayout splashScreen, ConstraintLayout requestFailure, FloatingActionButton floatingButton, ImageView loading, ImageView splashlogo)
public 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;
@ -83,6 +83,26 @@ public class applicationViewController
initLock();
initViews();
createUpdateUiHandler();
initializeSuggestionView();
}
private void initializeSuggestionView()
{
suggestionAdapter = new AutoCompleteAdapter(app_model.getInstance().getAppInstance(), R.layout.hint_completion_layout, R.id.hintCompletionText,app_model.getInstance().getSuggestions());
searchbar.setThreshold(2);
searchbar.setAdapter(suggestionAdapter);
searchbar.setDropDownVerticalOffset(27);
searchbar.setDropDownWidth(helperMethod.screenWidth()-80);
searchbar.setDropDownHorizontalOffset(-88);
searchbar.setDropDownHeight(Math.round(helperMethod.screenHeight(false)*0.35f));
searchbar.setDropDownBackgroundDrawable(app_model.getInstance().getAppInstance().getResources().getDrawable(R.drawable.rouned_corner));
}
public void reInitializeSuggestion()
{
initializeSuggestionView();
}
public boolean isHiddenView()
@ -143,11 +163,11 @@ public class applicationViewController
try
{
boolean isFirstInstall = preference_manager.getInstance().getBool(keys.hasOrbotInstalled,true);
while (!status.isTorInitialized && isFirstInstall)
{
startPostTask(messages.UPDATE_LOADING_TEXT);
sleep(100);
}
//while (!status.isTorInitialized && isFirstInstall)
//{
// startPostTask(messages.UPDATE_LOADING_TEXT);
// sleep(100);
//}
preference_manager.getInstance().setBool(keys.hasOrbotInstalled,false);
startPostTask(messages.DISABLE_SPLASH_SCREEN);
}
@ -179,11 +199,16 @@ public class applicationViewController
{
loadingText.setText(orbot_manager.getInstance().getLogs());
}
if(msg.what == messages.DISABLE_SPLASH_SCREEN)
else if(msg.what == messages.DISABLE_SPLASH_SCREEN)
{
status.isApplicationLoaded = true;
splashScreen.animate().alpha(0.0f).setDuration(200).setListener(null).withEndAction((() -> splashScreen.setVisibility(View.GONE)));
onWelcomeMessageCheck();
//app_model.getInstance().getAppInstance().initAdManager();
}
else if(msg.what == messages.SHOW_ADS)
{
admanager.getInstance().showAd(true);
}
}
};
@ -202,6 +227,7 @@ public class applicationViewController
}
}
@SuppressLint("RestrictedApi")
public void onPageFinished(boolean status)
{
helperMethod.hideKeyboard();
@ -338,6 +364,20 @@ public class applicationViewController
serverRequestManager.getInstance().versionChecker();
}
public void onShowAds()
{
startPostTask(messages.SHOW_ADS);
}
public void openMenu(View view)
{
PopupMenu popup = new PopupMenu(app_model.getInstance().getAppInstance(), view);
MenuInflater inflater = popup.getMenuInflater();
inflater.inflate(R.menu.menu_main, popup.getMenu());
MenuCompat.setGroupDividerEnabled(popup.getMenu(), true);
popup.show();
}
public void onReload()
{
if(!isHiddenView())
@ -351,5 +391,9 @@ public class applicationViewController
}
}
public String getSearchBarUrl()
{
return searchbar.getText().toString();
}
}

View File

@ -1,4 +1,4 @@
package com.darkweb.genesissearchengine.appManager;
package com.darkweb.genesissearchengine.appManager.main_activity;
import android.os.Build;
import android.os.Bundle;
@ -9,6 +9,8 @@ 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.status;
import com.darkweb.genesissearchengine.dataManager.preference_manager;
import com.darkweb.genesissearchengine.pluginManager.*;
@ -27,7 +29,7 @@ public class application_controller extends AppCompatActivity
private ProgressBar progressBar;
private ConstraintLayout requestFailure;
private ConstraintLayout splashScreen;
private EditText searchbar;
private AutoCompleteTextView searchbar;
private FloatingActionButton floatingButton;
private ImageView loadingIcon;
private ImageView splashlogo;
@ -43,24 +45,27 @@ public class application_controller extends AppCompatActivity
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.application_view);
setContentView(R.layout.home_view);
if(helperMethod.isBuildValid())
{
initializeAppModel();
preference_manager.getInstance().initialize();
status.initStatus();
initializeCrashlytics();
initializeConnections();
initializeWebView();
initializeLocalEventHandlers();
initAdManager();
preference_manager.getInstance().initialize();
orbot_manager.getInstance().reinitOrbot();
admanager.getInstance().initialize();
applicationViewController.getInstance().initialization(webView,loadingText,progressBar,searchbar,splashScreen,requestFailure,floatingButton, loadingIcon,splashlogo);
firebase.getInstance().initialize();
geckoclient.initialize(geckoView);
app_model.getInstance().initialization();
startApplication();
initSearchEngine();
}
else
{
@ -70,10 +75,26 @@ public class application_controller extends AppCompatActivity
}
public void startApplication()
public void initAdManager()
{
admanager.getInstance().initialize();
}
public void initSearchEngine()
{
fabricManager.getInstance().sendEvent("HOME PAGE LOADING : " );
webView.loadUrl(constants.backendUrl);
if(status.search_status.equals(enums.searchEngine.Google.toString()))
{
webView.loadUrl(constants.backendGoogle);
}
else if(status.search_status.equals(enums.searchEngine.Bing.toString()))
{
webView.loadUrl(constants.backendBing);
}
else
{
webView.loadUrl(constants.backendGenesis);
}
}
public void initializeAppModel()
@ -104,7 +125,7 @@ public class application_controller extends AppCompatActivity
public void initializeCrashlytics()
{
fabricManager.getInstance().init();
//fabricManager.getInstance().init();
}
public void initializeWebView()
@ -116,14 +137,13 @@ public class application_controller extends AppCompatActivity
public void setWebViewSettings(WebView view)
{
view.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
view.getSettings().setJavaScriptEnabled(true);
view.getSettings().setJavaScriptEnabled(false);
view.getSettings().setUseWideViewPort(true);
}
/*------------------------------------------------------- Event Handler ----------------------------------------------------*/
private void initializeLocalEventHandlers()
{
private void initializeLocalEventHandlers() {
searchbar.setOnEditorActionListener((v, actionId, event) ->
{
return eventhandler.onEditorClicked(v,actionId,event);
@ -151,13 +171,17 @@ public class application_controller extends AppCompatActivity
eventhandler.onHomeButtonPressed();
}
public void onMenuButtonPressed(View view)
{
eventhandler.onMenuButtonPressed(view);
}
/*-------------------------------------------------------Helper Method In UI Redirection----------------------------------------------------*/
public void onloadURL(String url,boolean isHiddenWeb)
{
public void onloadURL(String url,boolean isHiddenWeb,boolean isUrlSavable) {
if(isHiddenWeb)
{
geckoclient.loadGeckoURL(url,geckoView);
geckoclient.loadGeckoURL(url,geckoView,isUrlSavable);
}
else
{
@ -166,8 +190,7 @@ public class application_controller extends AppCompatActivity
}
}
public void onRequestTriggered(boolean isHiddenWeb,String url)
{
public void onRequestTriggered(boolean isHiddenWeb,String url) {
applicationViewController.getInstance().onRequestTriggered(isHiddenWeb,url);
}
@ -181,8 +204,7 @@ public class application_controller extends AppCompatActivity
applicationViewController.getInstance().onUpdateSearchBar(url);
}
public void onInternetErrorView()
{
public void onInternetErrorView() {
applicationViewController.getInstance().onInternetError();
applicationViewController.getInstance().disableFloatingView();
}
@ -192,8 +214,7 @@ public class application_controller extends AppCompatActivity
return applicationViewController.getInstance().onDisableInternetError();
}
public void onProgressBarUpdateView(int progress)
{
public void onProgressBarUpdateView(int progress) {
applicationViewController.getInstance().onProgressBarUpdate(progress);
}
@ -217,17 +238,39 @@ public class application_controller extends AppCompatActivity
applicationViewController.getInstance().onReload();
}
public void onShowAds()
{
applicationViewController.getInstance().onShowAds();
}
public void openMenu(View view) {
applicationViewController.getInstance().openMenu(view);
}
public void reInitializeSuggestion() {
applicationViewController.getInstance().reInitializeSuggestion();
}
/*-------------------------------------------------------Helper Method Out UI Redirection----------------------------------------------------*/
public String getSearchBarUrl()
{
return applicationViewController.getInstance().getSearchBarUrl();
}
public void onReInitGeckoView() {
geckoclient.initialize(geckoView);
geckoclient.onReloadHiddenView();
}
public void onHiddenGoBack()
{
geckoclient.onHiddenGoBack(geckoView);
}
public void stopHiddenView()
{
public void stopHiddenView() {
geckoclient.stopHiddenView(geckoView);
geckoclient.removeHistory();
}
public void onReloadHiddenView()
@ -240,14 +283,18 @@ public class application_controller extends AppCompatActivity
return geckoclient.isGeckoViewRunning();
}
public void forcedCachePatch()
{
}
public boolean isInternetErrorOpened()
{
return requestFailure.getAlpha()==1;
}
/*-------------------------------------------------------Menu Handler----------------------------------------------------*/
public boolean onMenuOptionSelected(MenuItem item) {
eventhandler.onMenuPressed(item.getItemId());
return super.onOptionsItemSelected(item);
}
}

View File

@ -1,14 +1,19 @@
package com.darkweb.genesissearchengine.appManager;
package com.darkweb.genesissearchengine.appManager.main_activity;
import android.util.Patterns;
import android.view.KeyEvent;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.widget.TextView;
import com.darkweb.genesissearchengine.appManager.list_activity.list_controller;
import com.darkweb.genesissearchengine.appManager.setting_manager.setting_controller;
import com.darkweb.genesissearchengine.constants.constants;
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.message_manager;
import com.example.myapplication.R;
import java.io.IOException;
import java.net.URL;
@ -42,47 +47,65 @@ public class eventHandler
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);
appContoller.onloadURL(url.replace(constants.frontEndUrlHost_v1,constants.backendUrlHost),false,true);
return true;
}
else /*if(host.getHost().contains(constants.allowedHost))*/
{
fabricManager.getInstance().sendEvent("EDITOR ONION URL REQUEST : " + url);
app_model.getInstance().getAppInstance().onloadURL(url,true);
return true;
}/*
else
{
message_manager.getInstance().baseURLError();
fabricManager.getInstance().sendEvent("EDITOR ONION URL REQUEST : " + url);
app_model.getInstance().getAppInstance().onloadURL(url,true,true);
return true;
}*/
}
}
}
catch (IOException e){}
String editedURL = "https://boogle.store/search?q="+v.getText().toString().replaceAll(" ","+")+"&p_num=1&s_type=all&savesearch=on";
appContoller.onloadURL(editedURL,false);
String editedURL = getSearchEngine(v.getText().toString().replaceAll(" ","+"));
app_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();
}
public void onMenuButtonPressed(View view)
{
appContoller.openMenu(view);
}
public void onHomeButtonPressed()
{
appContoller.stopHiddenView();
fabricManager.getInstance().sendEvent("HOME BUTTON PRESSSED : ");
applicationViewController.getInstance().checkSSLTextColor();
appContoller.onloadURL(constants.backendUrlSlashed,false);
appContoller.initSearchEngine();
helperMethod.hideKeyboard();
appContoller.onUpdateSearchBarView(constants.frontUrlSlashed);
appContoller.stopHiddenView();
}
public void onFloatingButtonPressed()
@ -97,4 +120,39 @@ public class eventHandler
appContoller.onBackPressedView();
}
public void onMenuPressed(int menuId)
{
if (menuId == R.id.menu1) {
helperMethod.openActivity(list_controller.class,constants.list_history);
}
else if (menuId == R.id.menu2) {
helperMethod.openActivity(setting_controller.class,constants.list_history);
}
else if (menuId == R.id.menu3) {
helperMethod.openActivity(setting_controller.class,constants.list_history);
}
else if (menuId == R.id.menu4)
{
message_manager.getInstance().bookmark(app_model.getInstance().getAppInstance().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();
}
}
}

View File

@ -1,10 +1,13 @@
package com.darkweb.genesissearchengine.appManager;
package com.darkweb.genesissearchengine.appManager.main_activity;
import android.os.Handler;
import android.util.Log;
import android.view.View;
import com.darkweb.genesissearchengine.pluginManager.admanager;
import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.dataManager.preference_manager;
import com.darkweb.genesissearchengine.pluginManager.fabricManager;
import com.darkweb.genesissearchengine.pluginManager.message_manager;
import com.darkweb.genesissearchengine.pluginManager.orbot_manager;
import org.mozilla.geckoview.GeckoRuntime;
import org.mozilla.geckoview.GeckoSession;
@ -28,13 +31,22 @@ public class geckoClients
private boolean loadingCompeleted = false;
private String currentURL = "";
private boolean wasBackPressed = false;
private boolean isUrlSavable = true;
public void loadGeckoURL(String url,GeckoView geckoView)
private int urlRequestCount = 0;
private boolean isAppRated = false;
public geckoClients()
{
isAppRated = preference_manager.getInstance().getBool(keys.isAppRated,false);
}
public void loadGeckoURL(String url,GeckoView geckoView,boolean isUrlSavable)
{
boolean init_status = orbot_manager.getInstance().initOrbot(url);
if (init_status)
{
urlList.clear();
this.isUrlSavable = isUrlSavable;
navigatedURL = "";
loadingCompeleted = false;
initialize(geckoView);
@ -42,13 +54,20 @@ public class geckoClients
app_model.getInstance().getAppInstance().onRequestTriggered(true,url);
app_model.getInstance().getAppInstance().onProgressBarUpdateView(4);
isFirstTimeLoad = true;
if(isUrlSavable)
{
urlList.clear();
}
}
}
public void initialize(GeckoView geckoView)
{
if(urlList.size()<=0)
{
session1 = new GeckoSession();
runtime1 = GeckoRuntime.getDefault(app_model.getInstance().getAppContext());
runtime1.getSettings().setJavaScriptEnabled(status.java_status);
session1.open(runtime1);
geckoView.releaseSession();
geckoView.setSession(session1);
@ -57,6 +76,7 @@ public class geckoClients
geckoView.setVisibility(View.VISIBLE);
geckoView.setAlpha(1);
}
}
class navigationDelegate implements GeckoSession.NavigationDelegate
{
@ -119,7 +139,7 @@ public class geckoClients
{
if(isFirstTimeLoad)
{
admanager.getInstance().showAd(true);
//admanager.getInstance().showAd(true);
isFirstTimeLoad = false;
}
@ -130,8 +150,27 @@ public class geckoClients
if(urlList.size()>0)
{
admanager.getInstance().showAd(false);
//admanager.getInstance().showAd(false);
}
urlRequestCount++;
if(urlRequestCount==5)
{
if(!isAppRated)
{
isAppRated = true;
message_manager.getInstance().rateApp();
}
}
else if(urlRequestCount>=4 && isAppRated)
{
app_model.getInstance().getAppInstance().onShowAds();
}
if(isUrlSavable && !urlList.get(urlList.size()-1).equals("navigatedURL"))
{
app_model.getInstance().addHistory(navigatedURL);
}
isUrlSavable = true;
app_model.getInstance().getAppInstance().onDisableInternetError();
app_model.getInstance().getAppInstance().onProgressBarUpdateView(0);
fabricManager.getInstance().sendEvent("ONION GECKO_CLIENT URL SUCCESS : " + success + "--" + isContentLoading);
@ -209,15 +248,23 @@ public class geckoClients
}
public void removeHistory()
{
urlList.clear();
}
public boolean isGeckoViewRunning()
{
return isRunning;
}
public void onReloadHiddenView()
{
if(urlList.size()>0)
{
wasBackPressed = true;
session1.stop();
session1.loadUri(navigatedURL);
}
}
}

View File

@ -1,9 +1,9 @@
package com.darkweb.genesissearchengine.appManager;
package com.darkweb.genesissearchengine.appManager.main_activity;
import android.util.Log;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.pluginManager.fabricManager;
import com.darkweb.genesissearchengine.pluginManager.orbot_manager;
@ -25,19 +25,20 @@ public class webviewClient
app_model.getInstance().getAppInstance().onProgressBarUpdateView(0);
return true;
}
if(!url.contains("boogle"))
if(!url.contains("boogle") && !url.equals(constants.backendGoogle) && !url.equals(constants.backendBing))
{
app_model.getInstance().getAppInstance().stopHiddenView();
fabricManager.getInstance().sendEvent("BASE SIMPLE SEARCHED : " + url);
isGeckoView = true;
if(orbot_manager.getInstance().initOrbot(url))
{
app_model.getInstance().getAppInstance().onloadURL(url,true);
app_model.getInstance().getAppInstance().onloadURL(url,true,true);
}
return true;
}
else
{
app_model.getInstance().addHistory(url);
fabricManager.getInstance().sendEvent("BASE ONION SEARCHED : " + url);
app_model.getInstance().getAppInstance().onRequestTriggered(false,url);
return false;

View File

@ -0,0 +1,72 @@
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.example.myapplication.R;
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_activity);
viewsInitializations();
listenersInitializations();
initializeModel();
}
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*/
public void closeView()
{
viewController.closeView();
}
}

View File

@ -0,0 +1,23 @@
package com.darkweb.genesissearchengine.appManager.setting_manager;
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;
}
}

View File

@ -0,0 +1,73 @@
package com.darkweb.genesissearchengine.appManager.setting_manager;
import android.widget.ArrayAdapter;
import android.widget.Spinner;
import com.darkweb.genesissearchengine.constants.keys;
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.search = javascript;
this.search = history;
initJavascript();
initHistory();
initSearchEngine();
}
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()
{
setting_model.getInstance().getSettingInstance().finish();
}
}

View File

@ -0,0 +1,104 @@
package com.darkweb.genesissearchengine.appManager.setting_manager;
import android.view.View;
import android.widget.AdapterView;
import android.widget.Spinner;
import com.darkweb.genesissearchengine.appManager.main_activity.app_model;
import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.dataManager.preference_manager;
import com.example.myapplication.R;
import static com.darkweb.genesissearchengine.constants.status.*;
import static com.darkweb.genesissearchengine.constants.status.search_status;
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*/
@SuppressWarnings("ConstantConditions")
private void onJavaScriptListener(int position)
{
if(position==1 && java_status)
{
java_status = false;
preference_manager.getInstance().setBool(keys.java_script, java_status);
app_model.getInstance().getAppInstance().onReInitGeckoView();
}
else if(!java_status)
{
java_status = true;
preference_manager.getInstance().setBool(keys.java_script, java_status);
app_model.getInstance().getAppInstance().onReInitGeckoView();
}
}
private void onSearchListner(AdapterView<?> parentView,int position)
{
if(!search_status.equals(parentView.getItemAtPosition(position).toString()))
{
search_status = parentView.getItemAtPosition(position).toString();
preference_manager.getInstance().setString(keys.search_engine, search_status);
app_model.getInstance().getAppInstance().initSearchEngine();
}
}
@SuppressWarnings("ConstantConditions")
private void onHistoryListener(int position)
{
if(position==1 && history_status)
{
history_status = false;
preference_manager.getInstance().setBool(keys.history_clear, history_status);
}
else if(!java_status)
{
history_status = true;
preference_manager.getInstance().setBool(keys.history_clear, history_status);
}
}
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(selectedItemView.getId()== R.id.search_manager)
{
settings_ehandler.getInstance().onJavaScriptListener(position);
}
else if(selectedItemView.getId()== R.id.javascript_manager)
{
settings_ehandler.getInstance().onHistoryListener(position);
}
else if(selectedItemView.getId()== R.id.history_manager)
{
settings_ehandler.getInstance().onSearchListner(parentView,position);
}
}
@Override
public void onNothingSelected(AdapterView<?> parentView) {
}
});
}
}

View File

@ -9,7 +9,9 @@ public class constants
public static String softwares = "https://boogle.store/search?q=softwares+tools&p_num=1&s_type=all&p_num=1&s_type=all";
/*URL CONSTANTS*/
public static String backendUrl = "https://boogle.store";
public static String backendGenesis = "https://boogle.store";
public static String backendGoogle = "https://www.google.com/";
public static String backendBing = "https://www.bing.com/";
public static String backendUrlHost = "boogle.store";
public static String backendUrlSlashed = "https://boogle.store/";
public static String frontUrlSlashed = "https://genesis.onion/";
@ -31,7 +33,16 @@ public class constants
public static boolean proxy_socks_remote_dns = true;
public static boolean proxy_cache = false;
public static boolean proxy_memory = false;
public static String proxy_useragent_override = "Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20100101 Firefox/17.0";
public static String proxy_useragent_override = "Mozilla/5.0 (Android 9; Mobile; rv:67.0) Gecko/67.0 Firefox/67.0";
public static boolean proxy_donottrackheader_enabled = false;
public static int proxy_donottrackheader_value = 1;
public static int list_history = 1;
public static int list_bookmark = 2;
public static String databae_name="genesis.db";
public static int databae_version=1;
public static int max_history_size=3;
public static int max_bookmark_size=3;
}

View File

@ -5,5 +5,6 @@ public class enums
/*Web Request*/
public enum webRequestStatus{notRunning,running,repeat;}
public enum searchEngine{Darkweb,Bing,Google}
}

View File

@ -20,5 +20,12 @@ public class keys
public static String proxy_donottrackheader_enabled = "privacy.donottrackheader.enabled";
public static String proxy_donottrackheader_value = "privacy.donottrackheader.value";
public static String hasOrbotInstalled = "hasOrbotInstalled";
public static String isAppRated = "isAppRated";
public static String list_type = "list_type";
/*Settings*/
public static String search_engine = "search_engine";
public static String java_script = "java_script";
public static String history_clear = "history_clear";
}

View File

@ -9,4 +9,5 @@ public class messages
public final static int LOAD_WEBVIEW_BACKGROUND = 2;
public final static int DISABLE_SPLASH_SCREEN =3;
public final static int UPDATE_LOADING_TEXT =5;
public final static int SHOW_ADS =6;
}

View File

@ -1,10 +1,25 @@
package com.darkweb.genesissearchengine.constants;
import com.darkweb.genesissearchengine.dataManager.preference_manager;
public class status
{
/*App Level*/
public static boolean isApplicationLoaded = false;
public static boolean isPlayStoreInstalled = true;
public static boolean isTorInitialized = false;
public static String version_code = "6.0";
/*Settings Level*/
public static String search_status = "";
public static boolean java_status = false;
public static boolean history_status = true;
public static void initStatus()
{
status.java_status = preference_manager.getInstance().getBool(keys.java_script,true);
status.history_status = preference_manager.getInstance().getBool(keys.history_clear,true);
status.search_status = preference_manager.getInstance().getString(keys.search_engine,"Darkweb");
}
public static String version_code = "5.0";
}

View File

@ -2,6 +2,8 @@ package com.darkweb.genesissearchengine.constants;
public class strings
{
public static String torfolder = "torfiles";
public static String welcome_message_title = "Welcome | Deep Web Gateway";
public static String welcome_message_desc = "\nWelcome to Deep Web | Dark Web Gateway. This application provide you a platform to Search and Open Dark Web urls.\n\nYou cannot open any url related to normal internet as its not the intended purpose. You can check out following urls to get yourself started\n\nHere are few Suggestions\n";
public static String welcome_message_bt1 = "Deep Web Online Market";
@ -37,7 +39,27 @@ public class strings
public static String report_success_desc = "URL has been successfully reported. It will take about a week to completely remove this website from our servers\n";
public static String report_success_bt1 = "Dismiss";
public static String torfolder = "torfiles";
public static String rate_title = "Rate US";
public static String rate_message = "We dont 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";
public static String rate_positive = "Like This App";
public static String rate_negative = "Don't Like This App";
public static String rate_success_title = "Sorry To Hear That!";
public static String rate_success_desc = "If you are having any trouble and want to contact us please email us at gamesolstudios@gmail.com \n\nWe will try to solve your problem as soon as possible";
public static String rate_success_bt1 = "Dismiss";
public static String bookmark_url_title = "Bookmark This Page";
public static String bookmark_url_desc = "Bookmark this URL To Restore It Again Afterward\n";
public static String bookmark_url_bt1 = "Bookmark";
public static String bookmark_url_bt2 = "Dismiss";
public static String clear_title = "Warning | Clearing Data";
public static String clear_desc = "You are about to clear your data if you are sure please continue\n";
public static String clear_bt1 = "Clear Data";
public static String clear_bt2 = "Dismiss";
public static String darkweb = "Darkweb";
}

View File

@ -2,7 +2,7 @@ package com.darkweb.genesissearchengine.dataManager;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import com.darkweb.genesissearchengine.appManager.app_model;
import com.darkweb.genesissearchengine.appManager.main_activity.app_model;
public class preference_manager
{

View File

@ -1,12 +1,14 @@
package com.darkweb.genesissearchengine;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.Uri;
import android.os.Build;
import android.preference.PreferenceManager;
import android.util.DisplayMetrics;
@ -17,10 +19,17 @@ import android.view.WindowManager;
import android.view.animation.Animation;
import android.view.animation.RotateAnimation;
import android.view.inputmethod.InputMethodManager;
import com.darkweb.genesissearchengine.appManager.app_model;
import androidx.core.app.ShareCompat;
import com.darkweb.genesissearchengine.appManager.list_activity.list_controller;
import com.darkweb.genesissearchengine.appManager.main_activity.app_model;
import com.darkweb.genesissearchengine.constants.constants;
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*/
@ -35,20 +44,6 @@ public class helperMethod
return false;
}
public static String readHomepageHTML(Context applicationContext)
{
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(applicationContext);
return prefs.getString(keys.homepage_html_key,"");
}
public static void setHomepageHTML(String html, Context applicationContext)
{
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(applicationContext);
SharedPreferences.Editor edit = prefs.edit();
edit.putString(keys.homepage_html_key, html);
edit.commit();
}
public static String completeURL(String url)
{
@ -83,6 +78,11 @@ public class helperMethod
}
}
public static int screenWidth()
{
return (int)(Resources.getSystem().getDisplayMetrics().widthPixels);
}
public static int getNavigationBarHeight() {
Resources resources = app_model.getInstance().getAppContext().getResources();
int resourceId = resources.getIdentifier("navigation_bar_height", "dimen", "android");
@ -100,14 +100,6 @@ public class helperMethod
return rotate;
}
public static Bitmap screenShot(View view)
{
Bitmap bitmap = Bitmap.createBitmap(view.getWidth(), view.getHeight(), Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(bitmap);
view.draw(canvas);
return bitmap;
}
public static ViewGroup.MarginLayoutParams getCenterScreenPoint(ViewGroup.LayoutParams itemLayoutParams)
{
double heightloader = Resources.getSystem().getDisplayMetrics().heightPixels*0.78;
@ -149,4 +141,43 @@ public class helperMethod
}
public static void rateApp()
{
preference_manager.getInstance().setBool(keys.isAppRated,true);
app_model.getInstance().getAppInstance().startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.darkweb.genesissearchengine")));
}
public static void shareApp()
{
ShareCompat.IntentBuilder.from(app_model.getInstance().getAppInstance())
.setType("text/plain")
.setChooserTitle("Genesis | Onion Search")
.setText("http://play.google.com/store/apps/details?id=" + app_model.getInstance().getAppInstance().getPackageName())
.startChooser();
}
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(app_model.getInstance().getAppInstance(), cls);
myIntent.putExtra(keys.list_type, type);
app_model.getInstance().getAppInstance().startActivity(myIntent);
}
}

View File

@ -2,10 +2,7 @@ package com.darkweb.genesissearchengine.httpManager;
import android.os.Handler;
import android.os.Message;
import com.darkweb.genesissearchengine.appManager.app_model;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.messages;
import com.darkweb.genesissearchengine.helperMethod;
import cz.msebera.android.httpclient.HttpResponse;
import cz.msebera.android.httpclient.client.HttpClient;
import cz.msebera.android.httpclient.client.methods.HttpGet;

View File

@ -5,7 +5,7 @@ import android.os.Message;
import android.os.Handler;
import com.darkweb.genesissearchengine.appManager.app_model;
import com.darkweb.genesissearchengine.appManager.main_activity.app_model;
import com.darkweb.genesissearchengine.constants.messages;
public class webRequestHandler

View File

@ -1,6 +1,6 @@
package com.darkweb.genesissearchengine.pluginManager;
import com.darkweb.genesissearchengine.appManager.app_model;
import com.darkweb.genesissearchengine.appManager.main_activity.app_model;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.InterstitialAd;
import com.google.android.gms.ads.MobileAds;
@ -12,6 +12,7 @@ public class admanager
private static final admanager ourInstance = new admanager();
private InterstitialAd mInterstitialAd;
private int adCount = 0;
boolean isAdShown = false;
/*Initializations*/
@ -24,22 +25,25 @@ public class admanager
public void initialize()
{
/*
MobileAds.initialize(app_model.getInstance().getAppContext(), "ca-app-pub-5074525529134731~2926711128");
mInterstitialAd = new InterstitialAd(app_model.getInstance().getAppContext());
MobileAds.initialize(app_model.getInstance().getAppInstance(), "ca-app-pub-5074525529134731~2926711128");
mInterstitialAd = new InterstitialAd(app_model.getInstance().getAppInstance());
mInterstitialAd.setAdUnitId("ca-app-pub-5074525529134731/8478420705");
mInterstitialAd.loadAd(new AdRequest.Builder().build());*/
mInterstitialAd.loadAd(new AdRequest.Builder().build());
}
/*Helper Methods*/
public void showAd(boolean isAdForced)
{
/*
if(isAdShown)
{
return;
}
if(!mInterstitialAd.isLoading() && !mInterstitialAd.isLoaded())
{
mInterstitialAd.loadAd(new AdRequest.Builder().build());
if(isAdForced || adCount==0 || adCount%5==0)
if(isAdForced || adCount==0 || adCount%3==0)
{
adCount = 0;
}
@ -54,6 +58,7 @@ public class admanager
{
if(isAdForced)
{
isAdShown = true;
mInterstitialAd.show();
adCount = 1;
}
@ -66,6 +71,6 @@ public class admanager
adCount += 1;
}
}
}*/
}
}
}

View File

@ -1,11 +1,5 @@
package com.darkweb.genesissearchengine.pluginManager;
import com.crashlytics.android.Crashlytics;
import com.crashlytics.android.answers.Answers;
import com.crashlytics.android.answers.CustomEvent;
import com.darkweb.genesissearchengine.appManager.app_model;
import io.fabric.sdk.android.Fabric;
public class fabricManager
{
private static final fabricManager ourInstance = new fabricManager();
@ -21,13 +15,13 @@ public class fabricManager
public void init()
{
Fabric.with(app_model.getInstance().getAppContext(), new Crashlytics());
analyticmanager.getInstance().initialize(app_model.getInstance().getAppContext());
analyticmanager.getInstance().logUser();
//Fabric.with(app_model.getInstance().getAppContext(), new Crashlytics());
//analyticmanager.getInstance().initialize(app_model.getInstance().getAppContext());
//analyticmanager.getInstance().logUser();
}
public void sendEvent(String value)
{
analyticmanager.getInstance().sendEvent(value);
//analyticmanager.getInstance().sendEvent(value);
}
}

View File

@ -1,8 +1,6 @@
package com.darkweb.genesissearchengine.pluginManager;
import android.os.Bundle;
import com.darkweb.genesissearchengine.appManager.app_model;
import com.google.firebase.analytics.FirebaseAnalytics;
//import com.google.firebase.analytics.FirebaseAnalytics;
public class firebase
{
@ -13,20 +11,21 @@ public class firebase
return ourInstance;
}
private FirebaseAnalytics mFirebaseAnalytics;
//private FirebaseAnalytics mFirebaseAnalytics;
public void initialize()
{
mFirebaseAnalytics = FirebaseAnalytics.getInstance(app_model.getInstance().getAppContext());
//mFirebaseAnalytics = FirebaseAnalytics.getInstance(app_model.getInstance().getAppContext());
}
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);
mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, bundle);*/
}
private firebase()

View File

@ -1,13 +1,19 @@
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.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;
import android.text.InputType;
import android.widget.EditText;
import androidx.core.content.ContextCompat;
import com.crowdfire.cfalertdialog.CFAlertDialog;
import com.darkweb.genesissearchengine.appManager.app_model;
import com.darkweb.genesissearchengine.appManager.application_controller;
import com.darkweb.genesissearchengine.appManager.main_activity.app_model;
import com.darkweb.genesissearchengine.appManager.main_activity.application_controller;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.constants.strings;
@ -44,23 +50,23 @@ public class message_manager
.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);
controller.onloadURL(constants.blackMarket,false);
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);
controller.onloadURL(constants.leakedDocument,false);
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);
controller.onloadURL(constants.news,false);
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);
controller.onloadURL(constants.softwares,false);
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();
@ -114,15 +120,31 @@ public class message_manager
builder.show();
}
public void reportedSuccessfully()
public void ratedSuccessfully()
{
Context application_context = app_model.getInstance().getAppContext();
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(application_context)
.setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET)
.setTitle(strings.report_success_title)
.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.report_success_desc)
.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 = app_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();
});
@ -130,6 +152,60 @@ public class message_manager
builder.show();
}
@SuppressLint("ResourceType")
public void bookmark(String url)
{
final EditText input = new EditText(app_model.getInstance().getAppInstance());
input.setInputType(InputType.TYPE_CLASS_TEXT);
input.setText("");
input.setBackground(ContextCompat.getDrawable(app_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 = app_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) -> {
app_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 = app_model.getInstance().getListContext();
CFAlertDialog.Builder builder = new CFAlertDialog.Builder(app_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) -> {
app_model.getInstance().getListInstance().clearAll();
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 = app_model.getInstance().getAppContext();
@ -140,11 +216,8 @@ public class message_manager
.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) -> {
//String reportURL = constants.reportUrl+URL;
//serverRequestManager.getInstance().reportURL(reportURL);
dialog.dismiss();
reportedSuccessfully();
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();
@ -153,6 +226,29 @@ public class message_manager
builder.show();
}
public void rateApp()
{
Context application_context = app_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);
app_model.getInstance().getAppInstance().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 startingOrbotInfo(String url)
{
if(!isPopupOn)
@ -185,7 +281,7 @@ public class message_manager
{
if(!url.equals(""))
{
app_model.getInstance().getAppInstance().onloadURL(url,true);
app_model.getInstance().getAppInstance().onloadURL(url,true,true);
}
else
{

View File

@ -1,18 +1,14 @@
package com.darkweb.genesissearchengine.pluginManager;
import android.util.Log;
import com.darkweb.genesissearchengine.appManager.app_model;
import com.darkweb.genesissearchengine.appManager.main_activity.app_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;
import java.io.IOException;
public class orbot_manager {
/*Private Variables*/

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 966 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -0,0 +1,12 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/white"/>
<corners
android:bottomLeftRadius="8dp"
android:bottomRightRadius="8dp"/>
<padding
android:bottom="8dp"
android:top="8dp"/>
</shape>

View File

@ -0,0 +1,93 @@
<?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_activity.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="16sp"
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"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="0dp"
style="?android:attr/borderlessButtonStyle"
android:layout_marginStart="0dp"
android:paddingBottom="19dp"
android:paddingTop="19dp"
android:layout_marginEnd="0dp"
android:id="@+id/menu"
android:onClick="clearHistory"
android:scaleType="fitCenter"
android:text="Clear"
android:bottomRightRadius="15dp"
android:bottomLeftRadius="15dp"
android:topLeftRadius="15dp"
android:topRightRadius="15dp"
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"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingRight="15dp"
android:layout_marginTop="60dp"
android:paddingLeft="15dp"
android:paddingBottom="-35dp"
android:background="@color/white"
android:elevation="0dp"
android:orientation="vertical">
<TextView
android:id="@+id/hintCompletionText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:padding="10dp"
android:singleLine="true"
android:ellipsize="end"
android:textColor="@color/holo_gray"
android:textSize="15.5sp"
android:textStyle="bold" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/white_dark" />
</LinearLayout>

View File

@ -5,7 +5,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.darkweb.genesissearchengine.appManager.application_controller">
android:background="@color/white"
tools:context="com.darkweb.genesissearchengine.appManager.main_activity.application_controller">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -129,19 +130,19 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent"
tools:ignore="RtlHardcoded,UselessParent">
<ImageButton
android:tint="@color/black"
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:scaleType="fitCenter"
android:onClick="onHomeButtonPressed"
android:scaleType="fitCenter"
android:tint="@color/black"
android:src="@drawable/icon_homeicon"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/todo"/>
<EditText
<AutoCompleteTextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:textSize="16sp"
@ -158,14 +159,28 @@
android:layout_marginTop="8dp"
android:inputType="textNoSuggestions"
android:layout_marginBottom="8dp"
android:layout_marginEnd="10dp"
android:completionHintView="@layout/hint_completion_layout"
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="wrap_content"
android:layout_marginTop="0dp"
android:layout_marginStart="0dp"
android:paddingBottom="19dp"
android:paddingTop="19dp"
android:layout_marginEnd="0dp"
android:id="@+id/menu"
android:scaleType="fitCenter"
android:src="@drawable/menu_item"
android:onClick="onMenuButtonPressed"
android:background="@color/white"
android:contentDescription="@string/todo"/>
</LinearLayout>
</LinearLayout>
</FrameLayout>
<FrameLayout
@ -231,4 +246,8 @@
android:id="@+id/floatingActionButton3" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" android:layout_marginBottom="24dp"
android:layout_marginEnd="24dp"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,51 @@
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="15dp"
android:paddingBottom="16dp"
android:background="@xml/border_set"
>
<LinearLayout
android:layout_width="0dp"
android:orientation="vertical"
android:layout_marginLeft="45px"
android:id="@+id/item_container"
android:paddingRight="8px"
android:layout_weight="4"
android:layout_height="wrap_content">
<TextView
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
/>
<TextView
android:id="@+id/description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:ellipsize="end"
android:textColor="@color/ease_blue"
/>
</LinearLayout>
<ImageButton
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginEnd="10dp"
android:layout_marginTop="5dp"
android:id="@+id/message_button"
android:onClick="onHomeButtonPressed"
android:scaleType="fitCenter"
android:src="@drawable/cancel"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/todo"/>
</LinearLayout>

View File

@ -0,0 +1,174 @@
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:background="@color/white"
android:orientation="vertical"
android:layout_height="match_parent">
<!-- Title Header -->
<LinearLayout
android:layout_width="match_parent"
android:background="@color/white"
android:layout_marginBottom="30dp"
android:orientation="horizontal"
android:layout_height="115dp">
<ImageButton
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginStart="10dp"
android:layout_marginBottom="0dp"
android:layout_marginTop="20dp"
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"/>
<TextView
android:textStyle="bold"
android:textColor="@color/cursor_blue"
android:textSize="20sp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="40"
android:layout_marginTop="20dp"
android:layout_marginStart="30dp"
android:text="@string/settings_header"
/>
</LinearLayout>
<!-- Title Search Engine -->
<LinearLayout
android:layout_width="match_parent"
android:background="@color/white"
android:layout_marginTop="15dp"
android:orientation="horizontal"
android:layout_height="wrap_content">
<TextView
android:textStyle="bold"
android:textSize="17sp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="40"
android:layout_marginStart="30dp"
android:text="@string/settings_search_engine"
/>
<Spinner
android:id="@+id/search_manager"
android:textSize="13sp"
android:layout_width="150dp"
android:layout_height="40dp"
android:paddingRight="30dp"
android:paddingLeft="30dp"
android:stateListAnimator="@xml/spinner_style_animate"
android:background="@xml/spinner_style_background"
android:drawSelectorOnTop="true"
android:entries="@array/search_engines"
android:layout_marginTop="1dp"
style="@style/Widget.AppCompat.DropDownItem.Spinner"
android:dropDownWidth="200dp"
android:popupBackground="@android:color/white"
android:overlapAnchor="false"
android:popupTheme="@style/AppTheme.PopupOverlay"
android:popupElevation="3dp"
/>
<ImageView android:layout_width="15dp" android:layout_height="15dp"
android:layout_marginEnd="35dp"
android:layout_marginStart="-26dp"
android:layout_marginTop="12dp"
android:src="@drawable/dropdown_arrow"
android:contentDescription="@string/todo"/>
</LinearLayout>
<!-- Title Enable Javascript -->
<LinearLayout
android:layout_width="match_parent"
android:background="@color/white"
android:layout_marginTop="30dp"
android:orientation="horizontal"
android:layout_height="wrap_content">
<TextView
android:textStyle="bold"
android:textSize="17sp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="40"
android:layout_marginStart="30dp"
android:text="@string/settings_javascript"
/>
<Spinner
android:id="@+id/javascript_manager"
android:textSize="13sp"
android:layout_width="150dp"
android:layout_height="40dp"
android:layout_marginTop="1dp"
android:paddingRight="30dp"
android:paddingLeft="30dp"
android:stateListAnimator="@xml/spinner_style_animate"
android:background="@xml/spinner_style_background"
android:drawSelectorOnTop="true"
android:entries="@array/boolean_option"
android:popupTheme="@style/AppTheme.PopupOverlay"
style="@style/Widget.AppCompat.DropDownItem.Spinner"
android:dropDownWidth="200dp"
android:popupBackground="@android:color/white"
android:overlapAnchor="false"
android:popupElevation="3dp"
/>
<ImageView android:layout_width="15dp" android:layout_height="15dp"
android:layout_marginEnd="35dp"
android:layout_marginStart="-26dp"
android:layout_marginTop="12dp"
android:src="@drawable/dropdown_arrow"
android:contentDescription="@string/todo"/>
</LinearLayout>
<!-- Title Auto Clear -->
<LinearLayout
android:layout_width="match_parent"
android:background="@color/white"
android:layout_marginTop="30dp"
android:orientation="horizontal"
android:layout_height="wrap_content">
<TextView
android:textStyle="bold"
android:textSize="17sp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="40"
android:layout_marginStart="30dp"
android:text="@string/settings_clear_history"
/>
<Spinner
android:id="@+id/history_manager"
android:textSize="13sp"
android:layout_width="150dp"
android:layout_height="40dp"
android:layout_marginTop="1dp"
android:paddingRight="30dp"
android:paddingLeft="30dp"
android:stateListAnimator="@xml/spinner_style_animate"
android:background="@xml/spinner_style_background"
android:drawSelectorOnTop="true"
android:entries="@array/boolean_option"
android:popupTheme="@style/AppTheme.PopupOverlay"
style="@style/Widget.AppCompat.DropDownItem.Spinner"
android:dropDownWidth="200dp"
android:popupBackground="@android:color/white"
android:overlapAnchor="false"
android:popupElevation="3dp"
/>
<ImageView android:layout_width="15dp" android:layout_height="15dp"
android:layout_marginEnd="35dp"
android:layout_marginStart="-26dp"
android:layout_marginTop="12dp"
android:src="@drawable/dropdown_arrow"
android:contentDescription="@string/todo"/>
</LinearLayout>
</LinearLayout>

View File

@ -0,0 +1,46 @@
<menu 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"
tools:context="example.javatpoint.com.optionmenu.MainActivity">
<item android:id="@+id/menu1"
android:onClick="onMenuOptionSelected"
android:title="History"
app:showAsAction="always"
android:icon="@android:drawable/btn_star"/>
<item android:id="@+id/menu2"
android:onClick="onMenuOptionSelected"
android:title="Manager Search Engine"
app:showAsAction="always"
android:icon="@android:drawable/btn_star"/>
<item android:id="@+id/menu3"
android:onClick="onMenuOptionSelected"
android:title="Settings"
app:showAsAction="always"
android:icon="@android:drawable/btn_star"/>
<group android:id="@+id/group_1" >
<item android:id="@+id/menu4"
android:onClick="onMenuOptionSelected"
android:title="Bookmark This Page"
app:showAsAction="always"
android:icon="@android:drawable/btn_star"/>
<item android:id="@+id/menu5"
android:onClick="onMenuOptionSelected"
android:title="Open Bookmarks"
app:showAsAction="ifRoom"
android:icon="@android:drawable/btn_plus"/>
</group>
<group android:id="@+id/group_2" >
<item android:id="@+id/menu6"
android:onClick="onMenuOptionSelected"
android:title="Report Website"/>
<item android:id="@+id/menu7"
android:onClick="onMenuOptionSelected"
android:title="Rate This App"
app:showAsAction="withText"/>
<item android:id="@+id/menu8"
android:onClick="onMenuOptionSelected"
android:title="Share"
app:showAsAction="withText"/>
</group>
</menu>

View File

@ -0,0 +1,12 @@
<resources>
<!-- Reply Preference -->
<string-array name="reply_entries">
<item>Reply</item>
<item>Reply to all</item>
</string-array>
<string-array name="reply_values">
<item>reply</item>
<item>reply_all</item>
</string-array>
</resources>

View File

@ -0,0 +1,3 @@
<resources>
<dimen name="fab_margin">16dp</dimen>
</resources>

View File

@ -1,13 +1,47 @@
<resources>
<!-- Application Strings -->
<string name="app_name">Genesis</string>
<string name="SearchHint">Search or type web address</string>
<string name="SearchHint">Search History</string>
<string name="homeUrl">https://genesis.onion</string>
<string name="errorTiyle">\u0020\u0020\u0020Opps! Some Thing Went Wrong</string>
<string name="todo">TODO</string>
<string name="projectName">Genesis Search Engine</string>
<string name="loadingText">Online Freedom</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_setting_controller">Settings</string>
<!-- Preference Titles -->
<string name="messages_header">Messages</string>
<string name="sync_header">Sync</string>
<!-- Messages Preferences -->
<string name="signature_title">Your signature</string>
<string name="reply_title">Default reply action</string>
<!-- Sync Preferences -->
<string name="sync_title">Sync email periodically</string>
<string name="attachment_title">Download incoming attachments</string>
<string name="attachment_summary_on">Automatically download attachments for incoming emails</string>
<string name="attachment_summary_off">Only download attachments when manually requested</string>
<!-- Settings -->
<string name="settings_header">Settings</string>
<string name="settings_search_engine">Search Engine</string>
<string name="settings_javascript">Javascript</string>
<string name="settings_clear_history">Auto Clear History</string>
<string-array name="search_engines">
<item>Darkweb</item>
<item>Google</item>
<item>Bing</item>
</string-array>
<string-array name="boolean_option">
<item>Enabled</item>
<item>Disabled</item>
</string-array>
</resources>

View File

@ -9,6 +9,24 @@
<item name="android:windowBackground">@xml/splash_gradient</item>
<item name="android:statusBarColor">#000000</item>
</style>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/>
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light">
<item name="android:paddingRight">21dp</item>
</style>
<style name="SpinnerTheme" parent="android:Widget.DeviceDefault.Spinner">
<item name="android:background">@xml/spinner_style_background</item>
<item name="android:padding">8dp</item>
<item name="android:paddingTop">5dp</item>
<item name="android:textSize">18sp</item>
<item name="android:textColor">@android:color/white</item>
<item name="android:paddingBottom">5dp</item>
<item name="android:paddingRight">15dp</item>
</style>
</resources>

View File

@ -0,0 +1,13 @@
<?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

@ -0,0 +1,54 @@
<!--
~ Copyright 2018 The app Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<androidx.preference.PreferenceScreen
xmlns:app="http://schemas.android.com/apk/res-auto">
<PreferenceCategory
app:title="@string/messages_header">
<EditTextPreference
app:key="signature"
app:title="@string/signature_title"
app:useSimpleSummaryProvider="true"/>
<ListPreference
app:key="reply"
app:title="@string/reply_title"
app:entries="@array/reply_entries"
app:entryValues="@array/reply_values"
app:defaultValue="reply"
app:useSimpleSummaryProvider="true"/>
</PreferenceCategory>
<PreferenceCategory
app:title="@string/sync_header">
<SwitchPreferenceCompat
app:key="sync"
app:title="@string/sync_title"/>
<SwitchPreferenceCompat
app:key="attachment"
app:title="@string/attachment_title"
app:summaryOn="@string/attachment_summary_on"
app:summaryOff="@string/attachment_summary_off"
app:dependency="sync"/>
</PreferenceCategory>
</androidx.preference.PreferenceScreen>

View File

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" >
<item android:state_pressed="true"
android:top="113dp">
<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-->
@ -9,7 +10,8 @@
<corners android:radius="25dp"/>
</shape>
</item>
<item android:state_pressed="false" >
<item android:state_pressed="false"
android:top="113dp">
<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-->

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<set>
<objectAnimator
android:duration="@android:integer/config_mediumAnimTime"
android:propertyName="translationZ"
android:valueTo="5dp" />
</set>
</item>
<item android:state_selected="true">
<set>
<objectAnimator
android:duration="@android:integer/config_shortAnimTime"
android:propertyName="translationZ"
android:valueTo="5dp" />
</set>
</item>
<item>
<set>
<objectAnimator
android:duration="@android:integer/config_shortAnimTime"
android:propertyName="translationZ"
android:valueTo="0dp" />
</set>
</item>
</selector>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:exitFadeDuration="@android:integer/config_mediumAnimTime">
<item android:state_pressed="true" android:drawable="@android:color/white" />
<item android:state_selected="true" android:drawable="@android:color/white" />
<item>
<inset>
<shape android:shape="rectangle">
<stroke android:width="0dp"
android:color="#e6e6e6" />
<solid android:color="#f3f3f3" />
</shape>
</inset>
</item>
</selector>