From 6f3af99487bf1a3ac1352f7f9d16ebc4365d5ad9 Mon Sep 17 00:00:00 2001 From: msmannan00 Date: Tue, 16 Jul 2019 19:13:43 +0500 Subject: [PATCH] bug fixes --- .idea/misc.xml | 35 ++++ app/build.gradle | 10 +- app/src/main/AndroidManifest.xml | 4 +- .../data_helper/database_helper.java | 135 -------------- .../database_controller.java | 15 +- .../AutoCompleteAdapter.java | 5 +- .../app_model.java | 35 ++-- .../application_controller.java | 98 +++++++---- .../eventHandler.java | 10 +- .../geckoClients.java | 135 +++++++------- .../viewController.java} | 132 +++++++++----- .../webviewClient.java | 9 +- .../list_activity/list_adapter.java | 159 ----------------- .../list_activity/list_controller.java | 152 ---------------- .../appManager/list_activity/list_model.java | 78 --------- .../appManager/list_manager/list_adapter.java | 93 ++++++++++ .../list_manager/list_controller.java | 123 +++++++++++++ .../list_manager/list_ehandler.java | 93 ++++++++++ .../appManager/list_manager/list_model.java | 108 ++++++++++++ .../list_row_model.java | 10 +- .../list_manager/list_view_controller.java | 165 ++++++++++++++++++ .../setting_manager/setting_controller.java | 8 +- .../setting_manager/setting_model.java | 16 ++ .../setting_view_controller.java | 28 ++- .../setting_manager/settings_ehandler.java | 39 ++--- .../constants/constants.java | 19 +- .../genesissearchengine/constants/enums.java | 4 +- .../constants/messages.java | 5 +- .../genesissearchengine/constants/status.java | 3 +- .../constants/strings.java | 14 ++ .../dataManager/preference_manager.java | 2 +- .../genesissearchengine/helperMethod.java | 79 ++++++--- .../httpManager/httpclient.java | 2 +- .../httpManager/serverRequestManager.java | 2 +- .../httpManager/webRequestHandler.java | 2 +- .../pluginManager/admanager.java | 58 +++--- .../pluginManager/message_manager.java | 13 +- .../pluginManager/orbot_manager.java | 2 +- app/src/main/res/drawable/back_arrow.webp | Bin 0 -> 720 bytes app/src/main/res/drawable/cancel.png | Bin 10021 -> 8305 bytes app/src/main/res/drawable/cancel.webp | Bin 0 -> 3344 bytes app/src/main/res/drawable/dustbin.png | Bin 0 -> 1528 bytes ...nt_completion_layout.xml => hint_view.xml} | 14 +- app/src/main/res/layout/home_view.xml | 8 +- ...valid_setup.xml => invalid_setup_view.xml} | 4 +- ...list_manager_row.xml => list_row_view.xml} | 11 +- ...ity_app_list_manager.xml => list_view.xml} | 33 ++-- ...ettings_activity.xml => settings_view.xml} | 69 +++++--- app/src/main/res/menu/menu_main.xml | 8 - .../main/res/mipmap-hdpi/splashlogoclip.webp | Bin 0 -> 8012 bytes app/src/main/res/mipmap-mdpi/homeicon.webp | Bin 0 -> 730 bytes .../main/res/mipmap-mdpi/ic_launcher_v1.webp | Bin 0 -> 2120 bytes app/src/main/res/mipmap-mdpi/splashlogo.webp | Bin 0 -> 5330 bytes .../main/res/mipmap-mdpi/splashlogoclip.webp | Bin 0 -> 5318 bytes app/src/main/res/mipmap-xhdpi/homeicon.webp | Bin 0 -> 730 bytes .../mipmap-xhdpi/ic_launcher_round_v1.webp | Bin 0 -> 4986 bytes .../mipmap-xhdpi/ic_launcher_round_v2.webp | Bin 0 -> 13314 bytes .../main/res/mipmap-xhdpi/ic_launcher_v1.webp | Bin 0 -> 4986 bytes app/src/main/res/mipmap-xhdpi/splashlogo.webp | Bin 0 -> 11168 bytes .../main/res/mipmap-xhdpi/splashlogoclip.webp | Bin 0 -> 11004 bytes app/src/main/res/mipmap-xxhdpi/homeicon.webp | Bin 0 -> 730 bytes .../mipmap-xxhdpi/ic_launcher_round_v1.webp | Bin 0 -> 9426 bytes .../mipmap-xxhdpi/ic_launcher_round_v2.webp | Bin 0 -> 13314 bytes .../res/mipmap-xxhdpi/ic_launcher_v1.webp | Bin 0 -> 9426 bytes .../main/res/mipmap-xxhdpi/splashlogo.webp | Bin 0 -> 17216 bytes .../res/mipmap-xxhdpi/splashlogoclip.webp | Bin 0 -> 17032 bytes app/src/main/res/mipmap-xxxhdpi/homeicon.webp | Bin 0 -> 730 bytes .../mipmap-xxxhdpi/ic_launcher_round_v1.webp | Bin 0 -> 13314 bytes .../mipmap-xxxhdpi/ic_launcher_round_v2.webp | Bin 0 -> 13314 bytes .../res/mipmap-xxxhdpi/ic_launcher_v1.webp | Bin 0 -> 13314 bytes .../main/res/mipmap-xxxhdpi/splashlogo.webp | Bin 0 -> 24366 bytes app/src/main/res/values/colors.xml | 3 + app/src/main/res/values/strings.xml | 5 + app/src/main/res/values/styles.xml | 19 +- .../res/{drawable => xml}/rouned_corner.xml | 0 .../main/res/xml/spinner_style_animate.xml | 16 -- .../main/res/xml/spinner_style_background.xml | 33 +++- build.gradle | 2 +- 78 files changed, 1192 insertions(+), 933 deletions(-) delete mode 100644 app/src/main/java/com/darkweb/genesissearchengine/appManager/data_helper/database_helper.java rename app/src/main/java/com/darkweb/genesissearchengine/appManager/{data_helper => database_manager}/database_controller.java (78%) rename app/src/main/java/com/darkweb/genesissearchengine/appManager/{main_activity => home_activity}/AutoCompleteAdapter.java (94%) rename app/src/main/java/com/darkweb/genesissearchengine/appManager/{main_activity => home_activity}/app_model.java (80%) rename app/src/main/java/com/darkweb/genesissearchengine/appManager/{main_activity => home_activity}/application_controller.java (70%) rename app/src/main/java/com/darkweb/genesissearchengine/appManager/{main_activity => home_activity}/eventHandler.java (93%) rename app/src/main/java/com/darkweb/genesissearchengine/appManager/{main_activity => home_activity}/geckoClients.java (67%) rename app/src/main/java/com/darkweb/genesissearchengine/appManager/{main_activity/applicationViewController.java => home_activity/viewController.java} (75%) rename app/src/main/java/com/darkweb/genesissearchengine/appManager/{main_activity => home_activity}/webviewClient.java (89%) delete mode 100644 app/src/main/java/com/darkweb/genesissearchengine/appManager/list_activity/list_adapter.java delete mode 100644 app/src/main/java/com/darkweb/genesissearchengine/appManager/list_activity/list_controller.java delete mode 100644 app/src/main/java/com/darkweb/genesissearchengine/appManager/list_activity/list_model.java create mode 100644 app/src/main/java/com/darkweb/genesissearchengine/appManager/list_manager/list_adapter.java create mode 100644 app/src/main/java/com/darkweb/genesissearchengine/appManager/list_manager/list_controller.java create mode 100644 app/src/main/java/com/darkweb/genesissearchengine/appManager/list_manager/list_ehandler.java create mode 100644 app/src/main/java/com/darkweb/genesissearchengine/appManager/list_manager/list_model.java rename app/src/main/java/com/darkweb/genesissearchengine/appManager/{list_activity => list_manager}/list_row_model.java (76%) create mode 100644 app/src/main/java/com/darkweb/genesissearchengine/appManager/list_manager/list_view_controller.java create mode 100644 app/src/main/res/drawable/back_arrow.webp create mode 100644 app/src/main/res/drawable/cancel.webp create mode 100644 app/src/main/res/drawable/dustbin.png rename app/src/main/res/layout/{hint_completion_layout.xml => hint_view.xml} (70%) rename app/src/main/res/layout/{invalid_setup.xml => invalid_setup_view.xml} (57%) rename app/src/main/res/layout/{list_manager_row.xml => list_row_view.xml} (81%) rename app/src/main/res/layout/{activity_app_list_manager.xml => list_view.xml} (82%) rename app/src/main/res/layout/{settings_activity.xml => settings_view.xml} (79%) create mode 100644 app/src/main/res/mipmap-hdpi/splashlogoclip.webp create mode 100644 app/src/main/res/mipmap-mdpi/homeicon.webp create mode 100644 app/src/main/res/mipmap-mdpi/ic_launcher_v1.webp create mode 100644 app/src/main/res/mipmap-mdpi/splashlogo.webp create mode 100644 app/src/main/res/mipmap-mdpi/splashlogoclip.webp create mode 100644 app/src/main/res/mipmap-xhdpi/homeicon.webp create mode 100644 app/src/main/res/mipmap-xhdpi/ic_launcher_round_v1.webp create mode 100644 app/src/main/res/mipmap-xhdpi/ic_launcher_round_v2.webp create mode 100644 app/src/main/res/mipmap-xhdpi/ic_launcher_v1.webp create mode 100644 app/src/main/res/mipmap-xhdpi/splashlogo.webp create mode 100644 app/src/main/res/mipmap-xhdpi/splashlogoclip.webp create mode 100644 app/src/main/res/mipmap-xxhdpi/homeicon.webp create mode 100644 app/src/main/res/mipmap-xxhdpi/ic_launcher_round_v1.webp create mode 100644 app/src/main/res/mipmap-xxhdpi/ic_launcher_round_v2.webp create mode 100644 app/src/main/res/mipmap-xxhdpi/ic_launcher_v1.webp create mode 100644 app/src/main/res/mipmap-xxhdpi/splashlogo.webp create mode 100644 app/src/main/res/mipmap-xxhdpi/splashlogoclip.webp create mode 100644 app/src/main/res/mipmap-xxxhdpi/homeicon.webp create mode 100644 app/src/main/res/mipmap-xxxhdpi/ic_launcher_round_v1.webp create mode 100644 app/src/main/res/mipmap-xxxhdpi/ic_launcher_round_v2.webp create mode 100644 app/src/main/res/mipmap-xxxhdpi/ic_launcher_v1.webp create mode 100644 app/src/main/res/mipmap-xxxhdpi/splashlogo.webp rename app/src/main/res/{drawable => xml}/rouned_corner.xml (100%) diff --git a/.idea/misc.xml b/.idea/misc.xml index 7bfef59d..bd8f4892 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,5 +1,40 @@ + + + + diff --git a/app/build.gradle b/app/build.gradle index 0e6a4422..e5941d18 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -49,13 +49,13 @@ android { versionName "180" dimension "abi" buildConfigField "String", "VARIANT", "\"arm\"" - } + }*/ aarch64 { versionCode 181 versionName "181" dimension "abi" buildConfigField "String", "VARIANT", "\"aarch64\"" - }*/ + }/* x86 { versionCode 182 versionName "182" @@ -108,10 +108,10 @@ 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.20190613202504" + //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" + aarch64Implementation "org.mozilla.geckoview:geckoview-arm64-v8a:67.0.20190613202504" implementation 'androidx.appcompat:appcompat:1.0.2' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' @@ -130,7 +130,7 @@ dependencies { androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-alpha03' implementation('com.crashlytics.sdk.android:crashlytics:2.10.1@aar') { - transitive = true; + transitive = true } implementation 'com.android.support:appcompat-v7:28.0.0' } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 72c52ac9..41104a36 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -22,7 +22,7 @@ android:windowSoftInputMode="adjustNothing" android:label="@string/title_activity_setting_controller"> - @@ -31,7 +31,7 @@ android:required="false"/> diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/data_helper/database_helper.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/data_helper/database_helper.java deleted file mode 100644 index efd410f2..00000000 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/data_helper/database_helper.java +++ /dev/null @@ -1,135 +0,0 @@ -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 selectHistory() - { - ArrayList tempmodel = new ArrayList(); - 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; - } -} diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/data_helper/database_controller.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/database_manager/database_controller.java similarity index 78% rename from app/src/main/java/com/darkweb/genesissearchengine/appManager/data_helper/database_controller.java rename to app/src/main/java/com/darkweb/genesissearchengine/appManager/database_manager/database_controller.java index ca23131a..fa7c0a3c 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/data_helper/database_controller.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/database_manager/database_controller.java @@ -1,14 +1,11 @@ -package com.darkweb.genesissearchengine.appManager.data_helper; +package com.darkweb.genesissearchengine.appManager.database_manager; 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.appManager.list_manager.list_row_model; +import com.darkweb.genesissearchengine.appManager.home_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; @@ -32,7 +29,7 @@ public class database_controller { try { - database_instance = app_model.getInstance().getAppInstance().openOrCreateDatabase("DatabaseName", MODE_PRIVATE, null); + database_instance = app_model.getInstance().getAppInstance().openOrCreateDatabase(constants.databae_name, MODE_PRIVATE, null); database_instance.execSQL("CREATE TABLE IF NOT EXISTS " + "history" + " (id INT(4),date VARCHAR,url VARCHAR);"); database_instance.execSQL("CREATE TABLE IF NOT EXISTS " + "bookmark" + " (id INT(4),title VARCHAR,url VARCHAR);"); @@ -51,7 +48,7 @@ public class database_controller public ArrayList selectHistory() { - ArrayList tempmodel = new ArrayList(); + ArrayList tempmodel = new ArrayList<>(); Cursor c = database_instance.rawQuery("SELECT * FROM history ORDER BY id DESC ", null); if (c.moveToFirst()){ do { @@ -66,7 +63,7 @@ public class database_controller public ArrayList selectBookmark() { - ArrayList tempmodel = new ArrayList(); + ArrayList tempmodel = new ArrayList<>(); Cursor c = database_instance.rawQuery("SELECT * FROM bookmark ORDER BY id DESC ", null); if (c.moveToFirst()){ diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/main_activity/AutoCompleteAdapter.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/home_activity/AutoCompleteAdapter.java similarity index 94% rename from app/src/main/java/com/darkweb/genesissearchengine/appManager/main_activity/AutoCompleteAdapter.java rename to app/src/main/java/com/darkweb/genesissearchengine/appManager/home_activity/AutoCompleteAdapter.java index 4c42019a..4e5cb4fb 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/main_activity/AutoCompleteAdapter.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/home_activity/AutoCompleteAdapter.java @@ -1,4 +1,4 @@ -package com.darkweb.genesissearchengine.appManager.main_activity; +package com.darkweb.genesissearchengine.appManager.home_activity; import java.util.ArrayList; import java.util.List; @@ -9,6 +9,9 @@ import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.Filter; import android.widget.Filterable; +import android.widget.TextView; +import com.darkweb.genesissearchengine.appManager.list_manager.list_model; +import com.example.myapplication.R; public class AutoCompleteAdapter extends ArrayAdapter implements Filterable { diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/main_activity/app_model.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/home_activity/app_model.java similarity index 80% rename from app/src/main/java/com/darkweb/genesissearchengine/appManager/main_activity/app_model.java rename to app/src/main/java/com/darkweb/genesissearchengine/appManager/home_activity/app_model.java index 992c6dcf..c91caa89 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/main_activity/app_model.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/home_activity/app_model.java @@ -1,11 +1,10 @@ -package com.darkweb.genesissearchengine.appManager.main_activity; +package com.darkweb.genesissearchengine.appManager.home_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.appManager.database_manager.database_controller; +import com.darkweb.genesissearchengine.appManager.list_manager.list_controller; +import com.darkweb.genesissearchengine.appManager.list_manager.list_row_model; import com.darkweb.genesissearchengine.constants.constants; import com.darkweb.genesissearchengine.constants.status; import com.darkweb.genesissearchengine.helperMethod; @@ -24,9 +23,6 @@ public class app_model private Context appContext; private application_controller appInstance; - private Context listContext; - private list_controller listInstance; - /*Initializations*/ public void initialization() { @@ -50,7 +46,7 @@ public class app_model } public void setPort(int port) { - this.port = port; + app_model.port = port; } @@ -100,7 +96,7 @@ public class app_model } addSuggestions(url); - SimpleDateFormat d_form = new SimpleDateFormat("yyyy-MM-dd | HH-mm-ss"); + SimpleDateFormat d_form = new SimpleDateFormat("dd MMMM | hh:mm a"); 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)); @@ -139,7 +135,7 @@ public class app_model public void initSuggestions(String url) { - suggestions.add(url); + suggestions.add(url.replace("https://","").replace("http://","")); } public void addSuggestions(String url) { if(url.contains("boogle.store")) @@ -148,7 +144,7 @@ public class app_model String actual_url = uri.getQueryParameter("q"); suggestions.add(actual_url); } - suggestions.add(url); + suggestions.add(url.replace("https://","").replace("http://","")); app_model.getInstance().getAppInstance().reInitializeSuggestion(); } public ArrayList getSuggestions() { @@ -156,19 +152,10 @@ public class app_model } - public void setListInstance(list_controller listInstance){ - this.listInstance = listInstance; - } - public list_controller getListInstance(){ - return listInstance; - } + /*Helper Method*/ + public boolean isUrlRepeatable(String url,String viewUrl){ + return url.equals(viewUrl) && !app_model.getInstance().getAppInstance().isInternetErrorOpened() || url.contains("https://boogle.store/search?q=&"); - - public void setListContext(Context listContext) { - this.listContext = listContext; - } - public Context getListContext(){ - return listContext; } } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/main_activity/application_controller.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/home_activity/application_controller.java similarity index 70% rename from app/src/main/java/com/darkweb/genesissearchengine/appManager/main_activity/application_controller.java rename to app/src/main/java/com/darkweb/genesissearchengine/appManager/home_activity/application_controller.java index 914aa6b8..874cbfa5 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/main_activity/application_controller.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/home_activity/application_controller.java @@ -1,4 +1,4 @@ -package com.darkweb.genesissearchengine.appManager.main_activity; +package com.darkweb.genesissearchengine.appManager.home_activity; import android.os.Build; import android.os.Bundle; @@ -45,10 +45,10 @@ public class application_controller extends AppCompatActivity protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setContentView(R.layout.home_view); if(helperMethod.isBuildValid()) { + setContentView(R.layout.home_view); initializeAppModel(); preference_manager.getInstance().initialize(); @@ -60,16 +60,16 @@ public class application_controller extends AppCompatActivity initAdManager(); orbot_manager.getInstance().reinitOrbot(); - applicationViewController.getInstance().initialization(webView,loadingText,progressBar,searchbar,splashScreen,requestFailure,floatingButton, loadingIcon,splashlogo); + viewController.getInstance().initialization(webView,loadingText,progressBar,searchbar,splashScreen,requestFailure,floatingButton, loadingIcon,splashlogo); firebase.getInstance().initialize(); - geckoclient.initialize(geckoView); + geckoclient.initialize(geckoView,false); app_model.getInstance().initialization(); - - initSearchEngine(); + initBoogle(); } else { - setContentView(R.layout.invalid_setup); + initializeAppModel(); + setContentView(R.layout.invalid_setup_view); message_manager.getInstance().abiError(Build.SUPPORTED_ABIS[0]); } @@ -80,20 +80,31 @@ public class application_controller extends AppCompatActivity admanager.getInstance().initialize(); } - public void initSearchEngine() + public void initBoogle() { - fabricManager.getInstance().sendEvent("HOME PAGE LOADING : " ); - if(status.search_status.equals(enums.searchEngine.Google.toString())) + onloadURL(constants.backendGenesis,false,false); + } + + public Boolean initSearchEngine() + { + if(status.search_status.equals(enums.searchEngine.Bing.toString())) { - webView.loadUrl(constants.backendGoogle); + geckoclient.setRootEngine(constants.backendBing); + webView.stopLoading(); + onloadURL(constants.backendBing,true,false); + return false; } - else if(status.search_status.equals(enums.searchEngine.Bing.toString())) + else if(status.search_status.equals(enums.searchEngine.Google.toString())) { - webView.loadUrl(constants.backendBing); + geckoclient.setRootEngine(constants.backendGoogle); + webView.stopLoading(); + onloadURL(constants.backendGoogle,true,false); + return false; } else { - webView.loadUrl(constants.backendGenesis); + onloadURL(constants.backendGenesis,false,false); + return true; } } @@ -137,7 +148,7 @@ public class application_controller extends AppCompatActivity public void setWebViewSettings(WebView view) { view.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK); - view.getSettings().setJavaScriptEnabled(false); + view.getSettings().setJavaScriptEnabled(status.java_status); view.getSettings().setUseWideViewPort(true); } @@ -183,7 +194,7 @@ public class application_controller extends AppCompatActivity { geckoclient.loadGeckoURL(url,geckoView,isUrlSavable); } - else + else if(!app_model.getInstance().isUrlRepeatable(url,webView.getUrl()) || webView.getVisibility() == View.GONE) { webView.loadUrl(url); onRequestTriggered(isHiddenWeb,url); @@ -191,76 +202,84 @@ public class application_controller extends AppCompatActivity } public void onRequestTriggered(boolean isHiddenWeb,String url) { - applicationViewController.getInstance().onRequestTriggered(isHiddenWeb,url); + viewController.getInstance().onRequestTriggered(isHiddenWeb,url); } public void onClearSearchBarCursorView() { - applicationViewController.getInstance().onClearSearchBarCursor(); + viewController.getInstance().onClearSearchBarCursor(); } public void onUpdateSearchBarView(String url) { - applicationViewController.getInstance().onUpdateSearchBar(url); + viewController.getInstance().onUpdateSearchBar(url); } public void onInternetErrorView() { - applicationViewController.getInstance().onInternetError(); - applicationViewController.getInstance().disableFloatingView(); + viewController.getInstance().onInternetError(); + viewController.getInstance().disableFloatingView(); } public boolean onDisableInternetError() { - return applicationViewController.getInstance().onDisableInternetError(); + return viewController.getInstance().onDisableInternetError(); } public void onProgressBarUpdateView(int progress) { - applicationViewController.getInstance().onProgressBarUpdate(progress); + viewController.getInstance().onProgressBarUpdate(progress); } public void onBackPressedView() { - applicationViewController.getInstance().onBackPressed(); + viewController.getInstance().onBackPressed(); } public void onPageFinished(boolean isHidden) { - applicationViewController.getInstance().onPageFinished(isHidden); + viewController.getInstance().onPageFinished(isHidden); } public void onUpdateView(boolean status) { - applicationViewController.getInstance().onUpdateView(status); + viewController.getInstance().onUpdateView(status); } public void onReload() { - applicationViewController.getInstance().onReload(); + viewController.getInstance().onReload(); } - public void onShowAds() + public void onShowAd(enums.adID id) { - applicationViewController.getInstance().onShowAds(); + admanager.getInstance().showAd(id); } public void openMenu(View view) { - applicationViewController.getInstance().openMenu(view); + + viewController.getInstance().openMenu(view); } public void reInitializeSuggestion() { - applicationViewController.getInstance().reInitializeSuggestion(); + viewController.getInstance().reInitializeSuggestion(); + } + + public void hideSplashScreen(){ + viewController.getInstance().hideSplashScreen(); } /*-------------------------------------------------------Helper Method Out UI Redirection----------------------------------------------------*/ public String getSearchBarUrl() { - return applicationViewController.getInstance().getSearchBarUrl(); + return viewController.getInstance().getSearchBarUrl(); } public void onReInitGeckoView() { - geckoclient.initialize(geckoView); - geckoclient.onReloadHiddenView(); + geckoclient.initialize(geckoView,true); + if(webView.getVisibility() != View.VISIBLE) + { + geckoclient.onReloadHiddenView(); + } } public void onHiddenGoBack() @@ -268,9 +287,14 @@ public class application_controller extends AppCompatActivity geckoclient.onHiddenGoBack(geckoView); } - public void stopHiddenView() { - geckoclient.stopHiddenView(geckoView); - geckoclient.removeHistory(); + public int getHiddenQueueLength() + { + return geckoclient.getHiddenQueueLength(); + } + + public void stopHiddenView(boolean releaseView) { + geckoclient.stopHiddenView(geckoView,releaseView); + //geckoclient.removeHistory(); } public void onReloadHiddenView() diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/main_activity/eventHandler.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/home_activity/eventHandler.java similarity index 93% rename from app/src/main/java/com/darkweb/genesissearchengine/appManager/main_activity/eventHandler.java rename to app/src/main/java/com/darkweb/genesissearchengine/appManager/home_activity/eventHandler.java index baeb6284..1056730a 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/main_activity/eventHandler.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/home_activity/eventHandler.java @@ -1,11 +1,12 @@ -package com.darkweb.genesissearchengine.appManager.main_activity; +package com.darkweb.genesissearchengine.appManager.home_activity; +import android.util.Log; 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.list_manager.list_controller; import com.darkweb.genesissearchengine.appManager.setting_manager.setting_controller; import com.darkweb.genesissearchengine.constants.constants; import com.darkweb.genesissearchengine.constants.enums; @@ -100,12 +101,11 @@ public class eventHandler public void onHomeButtonPressed() { - appContoller.stopHiddenView(); + appContoller.stopHiddenView(true); fabricManager.getInstance().sendEvent("HOME BUTTON PRESSSED : "); - applicationViewController.getInstance().checkSSLTextColor(); + viewController.getInstance().checkSSLTextColor(); appContoller.initSearchEngine(); helperMethod.hideKeyboard(); - appContoller.onUpdateSearchBarView(constants.frontUrlSlashed); } public void onFloatingButtonPressed() diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/main_activity/geckoClients.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/home_activity/geckoClients.java similarity index 67% rename from app/src/main/java/com/darkweb/genesissearchengine/appManager/main_activity/geckoClients.java rename to app/src/main/java/com/darkweb/genesissearchengine/appManager/home_activity/geckoClients.java index 0ffd4d25..8b6716ae 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/main_activity/geckoClients.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/home_activity/geckoClients.java @@ -1,47 +1,44 @@ -package com.darkweb.genesissearchengine.appManager.main_activity; +package com.darkweb.genesissearchengine.appManager.home_activity; import android.os.Handler; -import android.util.Log; import android.view.View; -import com.darkweb.genesissearchengine.constants.keys; -import com.darkweb.genesissearchengine.constants.status; +import com.darkweb.genesissearchengine.constants.*; import com.darkweb.genesissearchengine.dataManager.preference_manager; +import com.darkweb.genesissearchengine.helperMethod; import com.darkweb.genesissearchengine.pluginManager.fabricManager; import com.darkweb.genesissearchengine.pluginManager.message_manager; import com.darkweb.genesissearchengine.pluginManager.orbot_manager; +import org.mozilla.geckoview.GeckoResult; import org.mozilla.geckoview.GeckoRuntime; import org.mozilla.geckoview.GeckoSession; import org.mozilla.geckoview.GeckoView; import java.util.ArrayList; -public class geckoClients +class geckoClients { private GeckoSession session1 = null; - private GeckoRuntime runtime1; private final Handler internetErrorHandler = new Handler(); + private ArrayList urlList = new ArrayList<>(); - boolean canSessionGoBack = false; - boolean isRunning = false; - boolean isContentLoading = false; - String navigatedURL = ""; - boolean isFirstTimeLoad = true; - ArrayList urlList = new ArrayList<>(); + private boolean isRunning = false; + private boolean isContentLoading = false; + private String navigatedURL = ""; + private boolean isFirstTimeLoad = true; private boolean loadingCompeleted = false; - private String currentURL = ""; private boolean wasBackPressed = false; private boolean isUrlSavable = true; private int urlRequestCount = 0; private boolean isAppRated = false; - public geckoClients() + geckoClients() { isAppRated = preference_manager.getInstance().getBool(keys.isAppRated,false); } - public void loadGeckoURL(String url,GeckoView geckoView,boolean isUrlSavable) + void loadGeckoURL(String url,GeckoView geckoView,boolean isUrlSavable) { boolean init_status = orbot_manager.getInstance().initOrbot(url); if (init_status) @@ -49,7 +46,7 @@ public class geckoClients this.isUrlSavable = isUrlSavable; navigatedURL = ""; loadingCompeleted = false; - initialize(geckoView); + initialize(geckoView,false); session1.loadUri(url); app_model.getInstance().getAppInstance().onRequestTriggered(true,url); app_model.getInstance().getAppInstance().onProgressBarUpdateView(4); @@ -61,12 +58,12 @@ public class geckoClients } } - public void initialize(GeckoView geckoView) + void initialize(GeckoView geckoView,boolean release) { - if(urlList.size()<=0) + if(urlList.size()<=0 || release) { session1 = new GeckoSession(); - runtime1 = GeckoRuntime.getDefault(app_model.getInstance().getAppContext()); + GeckoRuntime runtime1 = GeckoRuntime.getDefault(app_model.getInstance().getAppContext()); runtime1.getSettings().setJavaScriptEnabled(status.java_status); session1.open(runtime1); geckoView.releaseSession(); @@ -87,10 +84,12 @@ public class geckoClients } @Override - public void onCanGoBack(GeckoSession session, boolean canGoBack) + public GeckoResult onNewSession(GeckoSession session, String uri) { - canSessionGoBack = canGoBack; + session1.loadUri(uri); + return null; } + } class progressDelegate implements GeckoSession.ProgressDelegate @@ -101,20 +100,11 @@ public class geckoClients wasBackPressed = false; isRunning = true; loadingCompeleted = false; - currentURL = url; fabricManager.getInstance().sendEvent("ONION GECKO_CLIENT URL REQEST : " + url + "--"); app_model.getInstance().getAppInstance().onUpdateSearchBarView(url); - if(navigatedURL.equals(currentURL)) - { - isContentLoading = false; - } - else - { - isContentLoading = true; - } + isContentLoading = !navigatedURL.equals(url); - Log.i("SHITJ2",""+navigatedURL + "--" + currentURL + "--" + isContentLoading); navigatedURL = url; } @@ -123,12 +113,17 @@ public class geckoClients { internetErrorHandler.removeCallbacksAndMessages(null); - internetErrorHandler.postDelayed(new Runnable() { + internetErrorHandler.postDelayed(new Runnable() + { @Override public void run() { if(loadingCompeleted) { + if(isFirstTimeLoad) + { + app_model.getInstance().getAppInstance().hideSplashScreen(); + } if(!success && !isContentLoading) { app_model.getInstance().getAppInstance().onPageFinished(true); @@ -137,21 +132,11 @@ public class geckoClients } else if(success) { - if(isFirstTimeLoad) - { - //admanager.getInstance().showAd(true); - isFirstTimeLoad = false; - } - - if((urlList.size()==0 || urlList.size()>0 && !urlList.get(urlList.size()-1).equals(navigatedURL))&& !wasBackPressed) + if((urlList.size() == 0 || !urlList.get(urlList.size() - 1).equals(navigatedURL)) && !wasBackPressed) { urlList.add(navigatedURL); } - if(urlList.size()>0) - { - //admanager.getInstance().showAd(false); - } urlRequestCount++; if(urlRequestCount==5) { @@ -161,9 +146,16 @@ public class geckoClients message_manager.getInstance().rateApp(); } } - else if(urlRequestCount>=4 && isAppRated) + else if(isAppRated) { - app_model.getInstance().getAppInstance().onShowAds(); + if(isFirstTimeLoad) + { + app_model.getInstance().getAppInstance().onShowAd(enums.adID.hidden); + } + else + { + app_model.getInstance().getAppInstance().onShowAd(enums.adID.internal); + } } if(isUrlSavable && !urlList.get(urlList.size()-1).equals("navigatedURL")) @@ -176,6 +168,7 @@ public class geckoClients fabricManager.getInstance().sendEvent("ONION GECKO_CLIENT URL SUCCESS : " + success + "--" + isContentLoading); app_model.getInstance().getAppInstance().onPageFinished(true); } + isFirstTimeLoad = false; } } }, 500); @@ -191,8 +184,7 @@ public class geckoClients loadingCompeleted = true; isContentLoading = false; } - - if(progress>=5) + else if(progress>=5) { app_model.getInstance().getAppInstance().onProgressBarUpdateView(progress); } @@ -209,7 +201,7 @@ public class geckoClients } - public void onHiddenGoBack(GeckoView geckoView) + void onHiddenGoBack(GeckoView geckoView) { if(urlList.size()>1) { @@ -221,19 +213,24 @@ public class geckoClients } else if(isRunning) { - if(urlList.size()>0) + if(navigatedURL.equals(constants.backendGoogle) && status.search_status.equals(strings.google_text) || navigatedURL.equals(constants.backendBing) && status.search_status.equals(strings.bing_text)) { - urlList.remove(urlList.size()-1); + helperMethod.onMinimizeApp(); + } + else + { + if(urlList.size()>0) + { + urlList.remove(urlList.size()-1); + } + stopHiddenView(geckoView,false); + app_model.getInstance().getAppInstance().onUpdateView(true); + app_model.getInstance().getAppInstance().onDisableInternetError(); } - stopHiddenView(geckoView); - app_model.getInstance().getAppInstance().onUpdateView(true); - app_model.getInstance().getAppInstance().onDisableInternetError(); } - - } - public void stopHiddenView(GeckoView geckoView) + void stopHiddenView(GeckoView geckoView,boolean releaseView) { if(session1!=null) { @@ -241,30 +238,38 @@ public class geckoClients loadingCompeleted = false; session1.stop(); - session1.close(); + if(!releaseView) + { + session1.close(); + } } - - geckoView.releaseSession(); - } - public void removeHistory() + int getHiddenQueueLength() { - urlList.clear(); + return urlList.size(); } - public boolean isGeckoViewRunning() + void setRootEngine(String url) + { + if(urlList.size()>1) + { + urlList.set(0,url); + } + } + + boolean isGeckoViewRunning() { return isRunning; } - public void onReloadHiddenView() + void onReloadHiddenView() { if(urlList.size()>0) { wasBackPressed = true; session1.stop(); - session1.loadUri(navigatedURL); + session1.loadUri(urlList.get(urlList.size()-1)); } } } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/main_activity/applicationViewController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/home_activity/viewController.java similarity index 75% rename from app/src/main/java/com/darkweb/genesissearchengine/appManager/main_activity/applicationViewController.java rename to app/src/main/java/com/darkweb/genesissearchengine/appManager/home_activity/viewController.java index 229d548e..2bd2b252 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/main_activity/applicationViewController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/home_activity/viewController.java @@ -1,6 +1,7 @@ -package com.darkweb.genesissearchengine.appManager.main_activity; +package com.darkweb.genesissearchengine.appManager.home_activity; import android.annotation.SuppressLint; +import android.content.res.Resources; import android.graphics.Color; import android.graphics.drawable.Drawable; import android.os.Handler; @@ -9,17 +10,12 @@ 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.view.*; import android.webkit.WebView; 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; -import com.darkweb.genesissearchengine.constants.status; +import com.darkweb.genesissearchengine.constants.*; import com.darkweb.genesissearchengine.dataManager.preference_manager; import com.darkweb.genesissearchengine.helperMethod; import com.darkweb.genesissearchengine.httpManager.serverRequestManager; @@ -29,9 +25,7 @@ import com.darkweb.genesissearchengine.pluginManager.orbot_manager; import com.example.myapplication.R; import com.google.android.material.floatingactionbutton.FloatingActionButton; -import java.util.ArrayList; - -public class applicationViewController +public class viewController { /*ViewControllers*/ private WebView webView; @@ -54,14 +48,14 @@ public class applicationViewController Handler progressBarHandler = null; /*Initializations*/ - private static final applicationViewController ourInstance = new applicationViewController(); + private static final viewController ourInstance = new viewController(); - public static applicationViewController getInstance() + public static viewController getInstance() { return ourInstance; } - private applicationViewController() + private viewController() { } @@ -88,15 +82,23 @@ public class applicationViewController private void initializeSuggestionView() { - suggestionAdapter = new AutoCompleteAdapter(app_model.getInstance().getAppInstance(), R.layout.hint_completion_layout, R.id.hintCompletionText,app_model.getInstance().getSuggestions()); + suggestionAdapter = new AutoCompleteAdapter(app_model.getInstance().getAppInstance(), R.layout.hint_view, R.id.hintCompletionHeader,app_model.getInstance().getSuggestions()); + int width = Math.round(helperMethod.screenWidth()); 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)); + searchbar.setDropDownVerticalOffset(22); + searchbar.setDropDownWidth(Math.round(width*0.95f)); + searchbar.setDropDownHorizontalOffset(Math.round(width*0.114f)*-1); + + Drawable drawable; + Resources res = app_model.getInstance().getAppInstance().getResources(); + try { + drawable = Drawable.createFromXml(res, res.getXml(R.xml.rouned_corner)); + searchbar.setDropDownBackgroundDrawable(drawable); + } catch (Exception ex) { + Log.i("sdfsdf", ex.getMessage()); + } } @@ -163,11 +165,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 || status.search_status.equals(enums.searchEngine.Google.toString()) || status.search_status.equals(enums.searchEngine.Bing.toString()))) + { + startPostTask(messages.UPDATE_LOADING_TEXT); + sleep(100); + } preference_manager.getInstance().setBool(keys.hasOrbotInstalled,false); startPostTask(messages.DISABLE_SPLASH_SCREEN); } @@ -201,10 +203,12 @@ public class applicationViewController } 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(); + boolean e_status = app_model.getInstance().getAppInstance().initSearchEngine(); + + if(e_status) + { + hideSplashScreen(); + } } else if(msg.what == messages.SHOW_ADS) { @@ -214,11 +218,18 @@ public class applicationViewController }; } + public void hideSplashScreen() + { + status.isApplicationLoaded = true; + splashScreen.animate().alpha(0.0f).setDuration(200).setListener(null).withEndAction((() -> splashScreen.setVisibility(View.GONE))); + onWelcomeMessageCheck(); + } + public boolean onDisableInternetError() { if(requestFailure.getAlpha()==1) { - requestFailure.animate().alpha(0f).setDuration(150).withEndAction((() -> requestFailure.setVisibility(View.INVISIBLE)));; + requestFailure.animate().alpha(0f).setDuration(150).withEndAction((() -> requestFailure.setVisibility(View.INVISIBLE))); return true; } else @@ -242,14 +253,14 @@ public class applicationViewController } //onUpdateSearchBar(webView.getUrl()); disableSplashScreen(); - floatingButton.animate().alpha(0).withEndAction((() -> floatingButton.setVisibility(View.GONE)));; + floatingButton.animate().alpha(0).withEndAction((() -> floatingButton.setVisibility(View.GONE))); - app_model.getInstance().getAppInstance().stopHiddenView(); + app_model.getInstance().getAppInstance().stopHiddenView(false); } else { onUpdateView(false); - floatingButton.animate().alpha(1).withEndAction((() -> floatingButton.setVisibility(View.VISIBLE)));; + floatingButton.animate().alpha(1).withEndAction((() -> floatingButton.setVisibility(View.VISIBLE))); } } @@ -287,7 +298,7 @@ public class applicationViewController public void disableFloatingView() { - floatingButton.animate().alpha(0).withEndAction((() -> floatingButton.setVisibility(View.GONE)));; + floatingButton.animate().alpha(0).withEndAction((() -> floatingButton.setVisibility(View.GONE))); } @@ -309,28 +320,49 @@ public class applicationViewController public void onProgressBarUpdate(int progress) { - progressBar.setVisibility(View.VISIBLE); if(progress==0) { progressBar.animate().alpha(0).withEndAction((() -> progressBar.setProgress(progress))); } - else + else if(splashScreen.getVisibility() == View.GONE) { - progressBar.setProgress(progress); + if(progressBar.getVisibility()==View.INVISIBLE) + { + progressBar.setProgress(4); + } + else + { + progressBar.setProgress(progress); + } + progressBar.setVisibility(View.VISIBLE); progressBar.setAlpha(1); } } public void onBackPressed() { - if(!isHiddenView()) + if(webView.getVisibility() == View.VISIBLE) { - webView.goBack(); - webView.bringToFront(); - webView.setAlpha(1); - webView.setVisibility(View.VISIBLE); - requestFailure.animate().alpha(0f).setDuration(200).withEndAction((() -> requestFailure.setVisibility(View.INVISIBLE))); - onUpdateSearchBar(webView.getUrl()); + if(!webView.canGoBack()) + { + if(app_model.getInstance().getAppInstance().getHiddenQueueLength()>0) + { + onUpdateView(false); + } + else + { + helperMethod.onMinimizeApp(); + } + } + else + { + webView.goBack(); + webView.bringToFront(); + webView.setAlpha(1); + webView.setVisibility(View.VISIBLE); + requestFailure.animate().alpha(0f).setDuration(200).withEndAction((() -> requestFailure.setVisibility(View.INVISIBLE))); + onUpdateSearchBar(webView.getUrl()); + } } else { @@ -342,7 +374,7 @@ public class applicationViewController { if(status) { - floatingButton.animate().alpha(0).withEndAction((() -> floatingButton.setVisibility(View.GONE)));; + floatingButton.animate().alpha(0).withEndAction((() -> floatingButton.setVisibility(View.GONE))); webView.setAlpha(1); webView.setVisibility(View.VISIBLE); webView.bringToFront(); @@ -371,11 +403,19 @@ public class applicationViewController public void openMenu(View view) { - PopupMenu popup = new PopupMenu(app_model.getInstance().getAppInstance(), view); + LinearLayout parentView = (LinearLayout)view.getParent(); + + PopupMenu popup = new PopupMenu(app_model.getInstance().getAppInstance(), parentView,Gravity.RIGHT); MenuInflater inflater = popup.getMenuInflater(); inflater.inflate(R.menu.menu_main, popup.getMenu()); MenuCompat.setGroupDividerEnabled(popup.getMenu(), true); + popup.setOnMenuItemClickListener(item -> + { + app_model.getInstance().getAppInstance().onMenuOptionSelected(item); + return true; + }); popup.show(); + view.bringToFront(); } public void onReload() diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/main_activity/webviewClient.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/home_activity/webviewClient.java similarity index 89% rename from app/src/main/java/com/darkweb/genesissearchengine/appManager/main_activity/webviewClient.java rename to app/src/main/java/com/darkweb/genesissearchengine/appManager/home_activity/webviewClient.java index d64ab42e..f160ba70 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/main_activity/webviewClient.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/home_activity/webviewClient.java @@ -1,9 +1,10 @@ -package com.darkweb.genesissearchengine.appManager.main_activity; +package com.darkweb.genesissearchengine.appManager.home_activity; import android.webkit.WebChromeClient; import android.webkit.WebView; import android.webkit.WebViewClient; import com.darkweb.genesissearchengine.constants.constants; +import com.darkweb.genesissearchengine.constants.enums; import com.darkweb.genesissearchengine.constants.status; import com.darkweb.genesissearchengine.pluginManager.fabricManager; import com.darkweb.genesissearchengine.pluginManager.orbot_manager; @@ -20,14 +21,14 @@ public class webviewClient public boolean shouldOverrideUrlLoading(WebView view, String url) { isGeckoView = false; - if(url.equals(view.getUrl()) && !app_model.getInstance().getAppInstance().isInternetErrorOpened() || url.contains("https://boogle.store/search?q=&")) + if(app_model.getInstance().isUrlRepeatable(url,view.getUrl())) { app_model.getInstance().getAppInstance().onProgressBarUpdateView(0); return true; } - if(!url.contains("boogle") && !url.equals(constants.backendGoogle) && !url.equals(constants.backendBing)) + if(!url.contains("boogle")) { - app_model.getInstance().getAppInstance().stopHiddenView(); + app_model.getInstance().getAppInstance().stopHiddenView(false); fabricManager.getInstance().sendEvent("BASE SIMPLE SEARCHED : " + url); isGeckoView = true; if(orbot_manager.getInstance().initOrbot(url)) diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/list_activity/list_adapter.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/list_activity/list_adapter.java deleted file mode 100644 index 8a988abd..00000000 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/list_activity/list_adapter.java +++ /dev/null @@ -1,159 +0,0 @@ -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 -{ - 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); - } - - } - -} diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/list_activity/list_controller.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/list_activity/list_controller.java deleted file mode 100644 index 24338380..00000000 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/list_activity/list_controller.java +++ /dev/null @@ -1,152 +0,0 @@ -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 temp_model = new ArrayList(); - list_model.getInstance().getIndex().clear(); - for(int counter=0;counter<=list_model.getInstance().getMainList().size()-1;counter++) - { - if(list_model.getInstance().getMainList().get(counter).getHeader().contains(query) || list_model.getInstance().getMainList().get(counter).getDescription().contains(query)) - { - temp_model.add(list_model.getInstance().getMainList().get(counter)); - list_model.getInstance().setIndex(counter); - } - } - list_model.getInstance().setModel(temp_model); - initializeListController(); - - return true; - } - - public void onBackPressed(View view) - { - finish(); - } - -} diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/list_activity/list_model.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/list_activity/list_model.java deleted file mode 100644 index e9bbf7ba..00000000 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/list_activity/list_model.java +++ /dev/null @@ -1,78 +0,0 @@ -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_model = new ArrayList(); - public ArrayList list_index = new ArrayList(); - private ArrayList main_model_ref = new ArrayList(); - - public int listType; - - public void setType(int listType) - { - this.listType = listType; - } - - public int getType() - { - return listType; - } - - public void setModel(ArrayList list_model) - { - this.list_model = list_model; - } - - public ArrayList getModel() - { - return list_model; - } - - public void setIndex(int index) - { - list_index.add(index); - } - - public ArrayList 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 model) - { - main_model_ref = model; - } - - public ArrayList getMainList() - { - return main_model_ref; - } - - public void removeFromMainList(int index) - { - main_model_ref.remove(index); - } - -} \ No newline at end of file diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/list_manager/list_adapter.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/list_manager/list_adapter.java new file mode 100644 index 00000000..ed473251 --- /dev/null +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/list_manager/list_adapter.java @@ -0,0 +1,93 @@ +package com.darkweb.genesissearchengine.appManager.list_manager; + +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.*; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; +import com.darkweb.genesissearchengine.constants.constants; +import com.example.myapplication.R; + +public class list_adapter extends RecyclerView.Adapter +{ + list_adapter() { + } + + /*Initializations*/ + + @NonNull + @Override + public listViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { + View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_row_view, parent, false); + return new listViewHolder(view); + } + + @Override + public void onBindViewHolder(@NonNull list_adapter.listViewHolder holder, int position) + { + holder.bindListView(list_model.getInstance().getModel().get(position)); + clearMessageItem(holder.messageButton,position); + } + + @Override + public int getItemCount() { + return list_model.getInstance().getModel().size(); + } + + private void setItemViewOnClickListener(View itemView, String url) + { + itemView.setOnClickListener(v -> + { + list_model.getInstance().getListInstance().onUrlClick(url); + }); + } + + private void clearMessageItem(ImageButton clearButton, int index) + { + list_model.getInstance().getListInstance().onClickListenersInitialize(clearButton,index); + } + + /*View Holder Extensions*/ + class listViewHolder extends RecyclerView.ViewHolder + { + TextView heaaderText; + TextView descriptionText; + ImageButton messageButton; + ImageView empty_message; + + listViewHolder(View itemView) { + super(itemView); + } + + void bindListView(list_row_model model) { + + heaaderText = itemView.findViewById(R.id.header); + descriptionText = itemView.findViewById(R.id.description); + + String header = model.getHeader(); + + if(model.getHeader().length()<=2) + { + header = model.getDescription() + model.getHeader(); + } + + if(list_model.getInstance().getType() == constants.list_bookmark) + { + heaaderText.setText(list_model.getInstance().getListInstance().removeHttpRequest(model.getDescription())); + descriptionText.setText(header); + } + else + { + heaaderText.setText(list_model.getInstance().getListInstance().removeHttpRequest(header)); + descriptionText.setText(model.getDescription()); + } + + messageButton = itemView.findViewById(R.id.message_button); + empty_message = itemView.findViewById(R.id.empty_list); + + setItemViewOnClickListener(itemView,header); + } + } + +} diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/list_manager/list_controller.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/list_manager/list_controller.java new file mode 100644 index 00000000..6e20c1e7 --- /dev/null +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/list_manager/list_controller.java @@ -0,0 +1,123 @@ +package com.darkweb.genesissearchengine.appManager.list_manager; + +import android.view.View; +import android.widget.EditText; +import android.widget.ImageView; +import android.widget.TextView; +import androidx.appcompat.app.AppCompatActivity; +import android.os.Bundle; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; +import com.darkweb.genesissearchengine.appManager.home_activity.app_model; +import com.darkweb.genesissearchengine.constants.constants; +import com.darkweb.genesissearchengine.constants.keys; +import com.example.myapplication.R; +import java.util.Objects; + +public class list_controller extends AppCompatActivity +{ + /*Private Variables*/ + + private ImageView emptyListNotifier; + private EditText searchBar; + private RecyclerView listView; + + private list_view_controller viewController; + + /*Initializations*/ + + @Override + protected void onCreate(Bundle savedInstanceState){ + super.onCreate(savedInstanceState); + setContentView(R.layout.list_view); + + initializeListInstance(); + initializeListModel(); + initializeViews(); + initializeList(); + initSearchBar(); + updatelist(); + } + public void initializeListInstance(){ + list_model.getInstance().setListInstance(this); + list_model.getInstance().setListContext(this); + } + public void initializeListModel(){ + Bundle bundle = getIntent().getExtras(); + if(Objects.requireNonNull(bundle).getInt(keys.list_type)==constants.list_bookmark) + { + list_model.getInstance().setType(constants.list_bookmark); + list_model.getInstance().setMainList(app_model.getInstance().getBookmark()); + } + else + { + list_model.getInstance().setType(constants.list_history); + list_model.getInstance().setMainList(app_model.getInstance().getHistory()); + } + } + public void initializeViews(){ + emptyListNotifier = findViewById(R.id.empty_list); + searchBar = findViewById(R.id.search); + listView = findViewById(R.id.listview); + viewController = new list_view_controller(emptyListNotifier,searchBar,listView); + } + public void initializeList(){ + list_adapter adapter = new list_adapter(); + listView.setAdapter(adapter); + listView.setLayoutManager(new LinearLayoutManager(this)); + updateListStatus(false); + } + + /*View Handlers*/ + + public void onClearHistory(View view) + { + viewController.onClearHistory(); + } + public void onClearAll(){ + viewController.onClearAll(); + initializeViews(); + } + public void updateListStatus(boolean animate) + { + viewController.updateListStatus(animate); + } + public void initSearchBar() + { + list_ehandler.getInstance().onEditorActionListener(searchBar); + } + public boolean updatelist(){ + viewController.updateList(); + updateListStatus(false); + return true; + } + public void closeView() + { + viewController.closeView(); + } + public void onDatasetChanged(int index) + { + viewController.onDatasetChanged(index); + } + public void onClearSearchBarCursor() { + viewController.onClearSearchBarCursor(); + } + public String removeHttpRequest(String view){ + return viewController.removeHttpRequest(view); + } + + /*Event Handlers*/ + + public void onBackPressed(View view) + { + list_ehandler.getInstance().onBackPressed(); + } + public void onUrlClick(String url) + { + list_ehandler.getInstance().onUrlClick(url); + } + public void onClickListenersInitialize(View view,int index) { + list_ehandler.getInstance().onClickListenersInitialize(view,index); + } + +} diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/list_manager/list_ehandler.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/list_manager/list_ehandler.java new file mode 100644 index 00000000..2d366476 --- /dev/null +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/list_manager/list_ehandler.java @@ -0,0 +1,93 @@ +package com.darkweb.genesissearchengine.appManager.list_manager; + +import android.content.Context; +import android.view.View; +import android.view.inputmethod.EditorInfo; +import android.view.inputmethod.InputMethodManager; +import android.widget.EditText; +import com.darkweb.genesissearchengine.appManager.home_activity.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_ehandler +{ + /*Initializations*/ + + private static final list_ehandler ourInstance = new list_ehandler(); + public static list_ehandler getInstance() + { + return ourInstance; + } + private list_ehandler(){ + } + + /*Listener Initializations*/ + + void onEditorActionListener(EditText view) + { + view.setOnEditorActionListener((v, actionId, event) -> + { + if (actionId != EditorInfo.IME_ACTION_NEXT) + { + return false; + } + else + { + list_model.getInstance().getListInstance().onClearSearchBarCursor(); + InputMethodManager imm = (InputMethodManager) list_model.getInstance().getListInstance().getSystemService(Context.INPUT_METHOD_SERVICE); + imm.hideSoftInputFromWindow(view.getWindowToken(), 0); + return list_model.getInstance().getListInstance().updatelist(); + } + }); + } + + void onClickListenersInitialize(View view,int index) + { + view.setOnClickListener(v -> + { + if(v.getId() == R.id.message_button) + { + onManualClear(index); + } + }); + } + + /*Listeners*/ + + private void onManualClear(int index) + { + list_model.getInstance().deleteFromDatabase(list_model.getInstance().getModel().get(index).getId()); + list_model.getInstance().getModel().remove(index); + list_model.getInstance().removeFromMainList(list_model.getInstance().getIndex().get(index)); + list_model.getInstance().removeIndex(index); + list_model.getInstance().getListInstance().onDatasetChanged(index); + list_model.getInstance().getListInstance().updateListStatus(true); + } + + void onBackPressed() + { + list_model.getInstance().getListInstance().closeView(); + } + + void onUrlClick(String url) + { + String url_temp = helperMethod.completeURL(url); + + if(!url_temp.contains("boogle") && !url_temp.equals(constants.backendGoogle) && !url_temp.equals(constants.backendBing)) + { + if(orbot_manager.getInstance().initOrbot(url_temp)) + { + app_model.getInstance().getAppInstance().onloadURL(url_temp,true,false); + } + } + else + { + app_model.getInstance().getAppInstance().onloadURL(url_temp,false,false); + } + list_model.getInstance().getListInstance().closeView(); + + } + +} \ No newline at end of file diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/list_manager/list_model.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/list_manager/list_model.java new file mode 100644 index 00000000..a95121eb --- /dev/null +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/list_manager/list_model.java @@ -0,0 +1,108 @@ +package com.darkweb.genesissearchengine.appManager.list_manager; + +import android.content.Context; +import com.darkweb.genesissearchengine.appManager.database_manager.database_controller; +import com.darkweb.genesissearchengine.constants.constants; +import com.darkweb.genesissearchengine.constants.strings; + +import java.util.ArrayList; + +public class list_model +{ + /*Private Variables*/ + + private ArrayList list_model = new ArrayList<>(); + private ArrayList list_index; + private ArrayList main_model_ref = new ArrayList<>(); + private list_controller listInstance; + private Context listContext; + private int listType; + + /*Initializations*/ + + private static final list_model ourInstance = new list_model(); + public static list_model getInstance() + { + return ourInstance; + } + private list_model(){ + list_index = new ArrayList<>(); + } + + /*Helper Methods*/ + + void setType(int listType) + { + this.listType = listType; + } + int getType() + { + return listType; + } + + void setModel(ArrayList list_model) + { + this.list_model = list_model; + } + ArrayList getModel() + { + return list_model; + } + + void setIndex(int index){ + list_index.add(index); + } + void removeIndex(int index){ + list_index.remove(index); + for(int counter=index;counter<=list_index.size()-1;counter++) + { + list_index.set(counter,list_index.get(counter)-1); + } + } + ArrayList getIndex(){ + return list_index; + } + + void setMainList(ArrayList model) + { + main_model_ref = model; + } + ArrayList getMainList() + { + return main_model_ref; + } + void removeFromMainList(int index) + { + main_model_ref.remove(index); + } + + public list_controller getListInstance() + { + return listInstance; + } + void setListInstance(list_controller listInstance) + { + this.listInstance = listInstance; + } + + public Context getListContext(){ + return listContext; + } + void setListContext(Context listContext) + { + this.listContext = listContext; + } + + /*Database Handler*/ + + void deleteFromDatabase(int index) { + String table = strings.bookmark_text; + if(getType()== constants.list_history) + { + table = strings.history_text; + } + database_controller.getInstance().execSQL("delete from "+table+" where id="+index); + } + + +} \ No newline at end of file diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/list_activity/list_row_model.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/list_manager/list_row_model.java similarity index 76% rename from app/src/main/java/com/darkweb/genesissearchengine/appManager/list_activity/list_row_model.java rename to app/src/main/java/com/darkweb/genesissearchengine/appManager/list_manager/list_row_model.java index 8da32334..d2084782 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/list_activity/list_row_model.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/list_manager/list_row_model.java @@ -1,25 +1,29 @@ -package com.darkweb.genesissearchengine.appManager.list_activity; +package com.darkweb.genesissearchengine.appManager.list_manager; public class list_row_model { + /*Private Variables*/ + private int id; private String header; private String description; + /*Initializations*/ + public list_row_model(String header, String description,int id) { this.id = id; this.header = header; this.description = description; } + /*Variable Getters*/ + public String getHeader() { return header; } - public String getDescription() { return description; } - public int getId() { return id; } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/list_manager/list_view_controller.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/list_manager/list_view_controller.java new file mode 100644 index 00000000..bbb374f3 --- /dev/null +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/list_manager/list_view_controller.java @@ -0,0 +1,165 @@ +package com.darkweb.genesissearchengine.appManager.list_manager; + +import android.graphics.Color; +import android.text.SpannableString; +import android.text.Spanned; +import android.text.style.ForegroundColorSpan; +import android.view.View; +import android.widget.EditText; +import android.widget.ImageView; +import android.widget.TextView; +import androidx.recyclerview.widget.RecyclerView; +import com.darkweb.genesissearchengine.appManager.database_manager.database_controller; +import com.darkweb.genesissearchengine.appManager.home_activity.app_model; +import com.darkweb.genesissearchengine.constants.constants; +import com.darkweb.genesissearchengine.constants.strings; +import com.darkweb.genesissearchengine.pluginManager.message_manager; + +import java.util.ArrayList; +import java.util.Objects; + +class list_view_controller +{ + /*Private Variables*/ + + private ImageView emptyListNotifier; + private EditText searchBar; + private RecyclerView listView; + + /*Initializations*/ + + list_view_controller(ImageView emptyListNotifier, EditText searchBar,RecyclerView listView) + { + this.emptyListNotifier = emptyListNotifier; + this.searchBar = searchBar; + this.listView = listView; + } + + /*Handlers*/ + + void onClearHistory() + { + if(app_model.getInstance().getHistory().size()>0) + { + message_manager.getInstance().clearData(); + } + } + + void onClearAll() + { + list_model.getInstance().getModel().clear(); + list_model.getInstance().getMainList().clear(); + app_model.getInstance().getSuggestions().clear(); + + emptyListNotifier.setAlpha(0f); + emptyListNotifier.setVisibility(View.VISIBLE); + emptyListNotifier.animate().alpha(1); + searchBar.setText(strings.emptyStr); + + String table = strings.bookmark_text; + if(list_model.getInstance().getType()== constants.list_history) + { + table = strings.history_text; + } + database_controller.getInstance().execSQL("delete from "+table+" where 1"); + } + + void updateListStatus(boolean animate) + { + if(list_model.getInstance().getModel().size()<=0) + { + if(animate) + { + emptyListNotifier.setAlpha(0f); + emptyListNotifier.setVisibility(View.VISIBLE); + emptyListNotifier.animate().alpha(1); + } + else + { + emptyListNotifier.setVisibility(View.VISIBLE); + } + } + else + { + emptyListNotifier.setVisibility(View.GONE); + } + + } + + void updateList() + { + String query = searchBar.getText().toString(); + ArrayList temp_model = new ArrayList<>(); + list_model.getInstance().getIndex().clear(); + for(int counter=0;counter<=list_model.getInstance().getMainList().size()-1;counter++) + { + if(list_model.getInstance().getMainList().get(counter).getHeader().contains(query) || list_model.getInstance().getMainList().get(counter).getDescription().contains(query)) + { + temp_model.add(list_model.getInstance().getMainList().get(counter)); + list_model.getInstance().setIndex(counter); + } + } + list_model.getInstance().setModel(temp_model); + listView.getAdapter().notifyDataSetChanged(); + } + + void onDatasetChanged(int index) + { + Objects.requireNonNull(listView.getAdapter()).notifyItemRemoved(index); + listView.getAdapter().notifyDataSetChanged(); + } + + + void closeView() + { + list_model.getInstance().getListInstance().finish(); + } + + public void onClearSearchBarCursor() + { + searchBar.clearFocus(); + } + + public String removeHttpRequest(String url) + { + + if (url.startsWith("https://")) + { + return url.substring(8); + } + else if (url.startsWith("http://")) + { + return url.substring(7); + } + else + { + return url; + } + /* + if (view == null) + { + return; + } + + if (view.getText().toString().contains("https://")) + { + SpannableString ss = new SpannableString(view.getText()); + ss.setSpan(new ForegroundColorSpan(Color.argb(255, 0, 123, 43)), 0, 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); + ss.setSpan(new ForegroundColorSpan(Color.GRAY), 5, 8, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); + view.setText(ss); + } else if (view.getText().toString().contains("http://")) + { + SpannableString ss = new SpannableString(view.getText()); + ss.setSpan(new ForegroundColorSpan(Color.argb(255, 0, 128, 43)), 0, 4, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); + ss.setSpan(new ForegroundColorSpan(Color.GRAY), 4, 7, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); + view.setText(ss); + } else + { + SpannableString ss = new SpannableString(view.getText()); + ss.setSpan(new ForegroundColorSpan(Color.BLACK), 0, view.getText().length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); + view.setText(ss); + }*/ + } + + +} diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/setting_manager/setting_controller.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/setting_manager/setting_controller.java index 265c034c..270a0537 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/setting_manager/setting_controller.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/setting_manager/setting_controller.java @@ -22,8 +22,9 @@ public class setting_controller extends AppCompatActivity protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setContentView(R.layout.settings_activity); + setContentView(R.layout.settings_view); + setting_model.getInstance().init_status(); viewsInitializations(); listenersInitializations(); initializeModel(); @@ -64,6 +65,11 @@ public class setting_controller extends AppCompatActivity /*View Handlers*/ + @Override + public void onBackPressed(){ + closeView(); + } + public void closeView() { viewController.closeView(); diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/setting_manager/setting_model.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/setting_manager/setting_model.java index 67088e4f..210f6b9f 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/setting_manager/setting_model.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/setting_manager/setting_model.java @@ -1,5 +1,8 @@ package com.darkweb.genesissearchengine.appManager.setting_manager; +import com.darkweb.genesissearchengine.constants.status; +import com.darkweb.genesissearchengine.constants.strings; + public class setting_model { private static final setting_model ourInstance = new setting_model(); @@ -20,4 +23,17 @@ public class setting_model { this.settingInstance = settingInstance; } + + public void init_status() + { + setting_model.getInstance().search_status = status.search_status; + setting_model.getInstance().history_status = status.history_status; + setting_model.getInstance().java_status = status.java_status; + } + + /*Changed Status*/ + public String search_status = strings.emptyStr; + public boolean java_status = false; + public boolean history_status = true; + } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/setting_manager/setting_view_controller.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/setting_manager/setting_view_controller.java index 7a0cc39d..9292ad8b 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/setting_manager/setting_view_controller.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/setting_manager/setting_view_controller.java @@ -2,7 +2,9 @@ package com.darkweb.genesissearchengine.appManager.setting_manager; import android.widget.ArrayAdapter; import android.widget.Spinner; +import com.darkweb.genesissearchengine.appManager.home_activity.app_model; import com.darkweb.genesissearchengine.constants.keys; +import com.darkweb.genesissearchengine.constants.status; import com.darkweb.genesissearchengine.constants.strings; import com.darkweb.genesissearchengine.dataManager.preference_manager; @@ -22,14 +24,22 @@ class setting_view_controller setting_view_controller(Spinner search, Spinner javascript, Spinner history) { this.search = search; - this.search = javascript; - this.search = history; + this.javascript = javascript; + this.history = history; + initViews(); initJavascript(); initHistory(); initSearchEngine(); } + private void initViews() + { + search.setDropDownVerticalOffset(15); + javascript.setDropDownVerticalOffset(15); + history.setDropDownVerticalOffset(15); + } + private void initJavascript() { if (java_status) @@ -67,6 +77,20 @@ class setting_view_controller void closeView() { + + if(status.search_status != setting_model.getInstance().search_status) + { + status.search_status = setting_model.getInstance().search_status; + app_model.getInstance().getAppInstance().initSearchEngine(); + } + else if(status.java_status != setting_model.getInstance().java_status) + { + status.java_status = setting_model.getInstance().java_status; + app_model.getInstance().getAppInstance().onReInitGeckoView(); + } + + status.history_status = setting_model.getInstance().history_status; + setting_model.getInstance().getSettingInstance().finish(); } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/setting_manager/settings_ehandler.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/setting_manager/settings_ehandler.java index f62db563..d07bfc1b 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/setting_manager/settings_ehandler.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/setting_manager/settings_ehandler.java @@ -3,7 +3,7 @@ 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.appManager.home_activity.app_model; import com.darkweb.genesissearchengine.constants.keys; import com.darkweb.genesissearchengine.dataManager.preference_manager; import com.example.myapplication.R; @@ -28,20 +28,17 @@ public class 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(); + setting_model.getInstance().java_status = false; + preference_manager.getInstance().setBool(keys.java_script, false); } else if(!java_status) { - java_status = true; - preference_manager.getInstance().setBool(keys.java_script, java_status); - app_model.getInstance().getAppInstance().onReInitGeckoView(); + setting_model.getInstance().java_status = true; + preference_manager.getInstance().setBool(keys.java_script, true); } } @@ -49,24 +46,22 @@ public class settings_ehandler { 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(); + setting_model.getInstance().search_status = parentView.getItemAtPosition(position).toString(); + preference_manager.getInstance().setString(keys.search_engine, setting_model.getInstance().search_status); } } - @SuppressWarnings("ConstantConditions") private void onHistoryListener(int position) { if(position==1 && history_status) { - history_status = false; - preference_manager.getInstance().setBool(keys.history_clear, history_status); + setting_model.getInstance().history_status = false; + preference_manager.getInstance().setBool(keys.history_clear, false); } else if(!java_status) { - history_status = true; - preference_manager.getInstance().setBool(keys.history_clear, history_status); + setting_model.getInstance().history_status = true; + preference_manager.getInstance().setBool(keys.history_clear, true); } } @@ -82,17 +77,17 @@ public class settings_ehandler view.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView parentView, View selectedItemView, int position, long id) { - if(selectedItemView.getId()== R.id.search_manager) + if(parentView.getId()== R.id.search_manager) { - settings_ehandler.getInstance().onJavaScriptListener(position); + onSearchListner(parentView,position); } - else if(selectedItemView.getId()== R.id.javascript_manager) + else if(parentView.getId()== R.id.javascript_manager) { - settings_ehandler.getInstance().onHistoryListener(position); + onJavaScriptListener(position); } - else if(selectedItemView.getId()== R.id.history_manager) + else if(parentView.getId()== R.id.history_manager) { - settings_ehandler.getInstance().onSearchListner(parentView,position); + onHistoryListener(position); } } @Override diff --git a/app/src/main/java/com/darkweb/genesissearchengine/constants/constants.java b/app/src/main/java/com/darkweb/genesissearchengine/constants/constants.java index 6b7bc6e9..6cfff191 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/constants/constants.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/constants/constants.java @@ -3,13 +3,15 @@ package com.darkweb.genesissearchengine.constants; public class constants { /*LOCAL URL CONSTANTS*/ + public static String blackMarket = "https://boogle.store/search?q=black+market&p_num=1&s_type=all"; public static String leakedDocument = "https://boogle.store/search?q=leaked+document&p_num=1&s_type=all&p_num=1&s_type=all"; public static String news = "https://boogle.store/search?q=latest%20news&p_num=1&s_type=news"; 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 backendGenesis = "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"; @@ -23,10 +25,12 @@ public class constants public static String playstoreUrl = "https://play.google.com/store/apps/details?id=com.darkweb.genesissearchengine"; /*BUILD CONSTANTS*/ + public static String build_type = "playstore"; //public static String build_type = "local"; - /*BUILD PROXY*/ + /*PROXY CONSTANTS*/ + public static int proxy_type = 1; public static String proxy_socks = "127.0.0.1"; public static int proxy_socks_version = 5; @@ -37,12 +41,15 @@ public class constants public static boolean proxy_donottrackheader_enabled = false; public static int proxy_donottrackheader_value = 1; + /*MENU CONSTANTS*/ + 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; + /*SETTINGS CONSTANTS*/ + + public static int max_history_size=500; + public static int max_bookmark_size=500; + public static String databae_name="genesis_dbase"; - public static int max_history_size=3; - public static int max_bookmark_size=3; } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/constants/enums.java b/app/src/main/java/com/darkweb/genesissearchengine/constants/enums.java index 424286f6..768088da 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/constants/enums.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/constants/enums.java @@ -2,9 +2,9 @@ package com.darkweb.genesissearchengine.constants; public class enums { - /*Web Request*/ - public enum webRequestStatus{notRunning,running,repeat;} + /*SETTINGS*/ public enum searchEngine{Darkweb,Bing,Google} + public enum adID{hidden, internal} } \ No newline at end of file diff --git a/app/src/main/java/com/darkweb/genesissearchengine/constants/messages.java b/app/src/main/java/com/darkweb/genesissearchengine/constants/messages.java index ec891b3b..74ab7e60 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/constants/messages.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/constants/messages.java @@ -2,11 +2,10 @@ package com.darkweb.genesissearchengine.constants; public class messages { - /*Post Messages*/ - public final static int LOCAL_HOMEPAGE_CACHED =0; + /*POST MESSAGES KEYS*/ + public final static int INTERNET_ERROR =2; public final static int MESSAGE_UPDATE_TEXT_CHILD_THREAD =1; - 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; diff --git a/app/src/main/java/com/darkweb/genesissearchengine/constants/status.java b/app/src/main/java/com/darkweb/genesissearchengine/constants/status.java index 7b041ab1..ecbb98a3 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/constants/status.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/constants/status.java @@ -1,5 +1,6 @@ package com.darkweb.genesissearchengine.constants; +import android.util.Log; import com.darkweb.genesissearchengine.dataManager.preference_manager; public class status @@ -11,7 +12,7 @@ public class status public static String version_code = "6.0"; /*Settings Level*/ - public static String search_status = ""; + public static String search_status = strings.emptyStr; public static boolean java_status = false; public static boolean history_status = true; diff --git a/app/src/main/java/com/darkweb/genesissearchengine/constants/strings.java b/app/src/main/java/com/darkweb/genesissearchengine/constants/strings.java index 24c39d25..a6e8bbb4 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/constants/strings.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/constants/strings.java @@ -2,8 +2,12 @@ package com.darkweb.genesissearchengine.constants; public class strings { + /*Orbot Manager*/ + public static String torfolder = "torfiles"; + /*Messsage Manager*/ + 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"; @@ -58,7 +62,17 @@ public class strings public static String clear_bt1 = "Clear Data"; public static String clear_bt2 = "Dismiss"; + + /*Text Manager*/ + public static String darkweb = "Darkweb"; + public static String emptyStr = ""; + public static String bookmark_text = "bookmark"; + public static String history_text = "history"; + public static String bing_text = "Bing"; + public static String google_text = "Google"; + + } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/dataManager/preference_manager.java b/app/src/main/java/com/darkweb/genesissearchengine/dataManager/preference_manager.java index 3a2a53ab..7c8a3a46 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/dataManager/preference_manager.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/dataManager/preference_manager.java @@ -2,7 +2,7 @@ package com.darkweb.genesissearchengine.dataManager; import android.content.SharedPreferences; import android.preference.PreferenceManager; -import com.darkweb.genesissearchengine.appManager.main_activity.app_model; +import com.darkweb.genesissearchengine.appManager.home_activity.app_model; public class preference_manager { diff --git a/app/src/main/java/com/darkweb/genesissearchengine/helperMethod.java b/app/src/main/java/com/darkweb/genesissearchengine/helperMethod.java index d560c8f4..12e4f829 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/helperMethod.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/helperMethod.java @@ -2,15 +2,15 @@ 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.graphics.Color; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.net.Uri; import android.os.Build; -import android.preference.PreferenceManager; +import android.text.Spannable; +import android.text.SpannableString; +import android.text.style.ForegroundColorSpan; import android.util.DisplayMetrics; import android.view.Display; import android.view.View; @@ -20,15 +20,15 @@ import android.view.animation.Animation; import android.view.animation.RotateAnimation; import android.view.inputmethod.InputMethodManager; 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.appManager.home_activity.app_model; import com.darkweb.genesissearchengine.constants.keys; import com.darkweb.genesissearchengine.dataManager.preference_manager; import com.example.myapplication.BuildConfig; import java.net.MalformedURLException; import java.net.URL; +import java.text.Normalizer; +import java.util.Locale; public class helperMethod { @@ -37,11 +37,7 @@ public class helperMethod { ConnectivityManager cm = (ConnectivityManager) app_model.getInstance().getAppContext().getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo networkInfo = cm.getActiveNetworkInfo(); - if (networkInfo != null && networkInfo.isConnected()) - { - return true; - } - return false; + return networkInfo != null && networkInfo.isConnected(); } @@ -70,17 +66,17 @@ public class helperMethod { if(!hasSoftKeys) { - return (int)(Resources.getSystem().getDisplayMetrics().heightPixels)-(helperMethod.getNavigationBarHeight()); + return Resources.getSystem().getDisplayMetrics().heightPixels -(helperMethod.getNavigationBarHeight()); } else { - return (int)(Resources.getSystem().getDisplayMetrics().heightPixels); + return (Resources.getSystem().getDisplayMetrics().heightPixels); } } public static int screenWidth() { - return (int)(Resources.getSystem().getDisplayMetrics().widthPixels); + return (Resources.getSystem().getDisplayMetrics().widthPixels); } public static int getNavigationBarHeight() { @@ -130,14 +126,7 @@ public class helperMethod public static boolean isBuildValid () { - if(BuildConfig.FLAVOR.equals("aarch64")&& Build.SUPPORTED_ABIS[0].equals("arm64-v8a") || BuildConfig.FLAVOR.equals("arm")&&Build.SUPPORTED_ABIS[0].equals("armeabi-v7a") || BuildConfig.FLAVOR.equals("x86")&&Build.SUPPORTED_ABIS[0].equals("x86") || BuildConfig.FLAVOR.equals("x86_64")&&Build.SUPPORTED_ABIS[0].equals("x86_64")) - { - return true; - } - else - { - return false; - } + return BuildConfig.FLAVOR.equals("aarch64") && Build.SUPPORTED_ABIS[0].equals("arm64-v8a") || BuildConfig.FLAVOR.equals("arm") && Build.SUPPORTED_ABIS[0].equals("armeabi-v7a") || BuildConfig.FLAVOR.equals("x86") && Build.SUPPORTED_ABIS[0].equals("x86") || BuildConfig.FLAVOR.equals("x86_64") && Build.SUPPORTED_ABIS[0].equals("x86_64"); } @@ -151,8 +140,9 @@ public class helperMethod { 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()) + .setChooserTitle("Hi! Check out this Awesome App") + .setSubject("Hi! Check out this Awesome App") + .setText("Genesis | Onion Search | http://play.google.com/store/apps/details?id=" + app_model.getInstance().getAppInstance().getPackageName()) .startChooser(); } @@ -180,4 +170,43 @@ public class helperMethod app_model.getInstance().getAppInstance().startActivity(myIntent); } + public static CharSequence highlight(String search, String originalText) { + // ignore case and accents + // the same thing should have been done for the search text + String normalizedText = Normalizer + .normalize(originalText, Normalizer.Form.NFD) + .replaceAll("\\p{InCombiningDiacriticalMarks}+", "") + .toLowerCase(Locale.ENGLISH); + + int start = normalizedText.indexOf(search.toLowerCase(Locale.ENGLISH)); + if (start < 0) { + // not found, nothing to to + return originalText; + } else { + // highlight each appearance in the original text + // while searching in normalized text + Spannable highlighted = new SpannableString(originalText); + while (start >= 0) { + int spanStart = Math.min(start, originalText.length()); + int spanEnd = Math.min(start + search.length(), + originalText.length()); + + highlighted.setSpan(new ForegroundColorSpan(Color.BLUE), + spanStart, spanEnd, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); + + start = normalizedText.indexOf(search, spanEnd); + } + + return highlighted; + } + } + + public static void onMinimizeApp() + { + Intent startMain = new Intent(Intent.ACTION_MAIN); + startMain.addCategory(Intent.CATEGORY_HOME); + startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + app_model.getInstance().getAppInstance().startActivity(startMain); + } + } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/httpManager/httpclient.java b/app/src/main/java/com/darkweb/genesissearchengine/httpManager/httpclient.java index eced7892..0dd29bb9 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/httpManager/httpclient.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/httpManager/httpclient.java @@ -32,7 +32,7 @@ public class httpclient { String c_url = url.replace("http://boogle","https://boogle").replaceAll("genesis.onion","boogle.store").replaceAll("genesis.store","boogle.store"); - HttpClient client=new DefaultHttpClient();; + HttpClient client=new DefaultHttpClient(); SSLConnectionSocketFactory scsf = new SSLConnectionSocketFactory( SSLContexts.custom().loadTrustMaterial(null, new TrustSelfSignedStrategy()).build(), NoopHostnameVerifier.INSTANCE); diff --git a/app/src/main/java/com/darkweb/genesissearchengine/httpManager/serverRequestManager.java b/app/src/main/java/com/darkweb/genesissearchengine/httpManager/serverRequestManager.java index 2f6b9933..fd61e3a3 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/httpManager/serverRequestManager.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/httpManager/serverRequestManager.java @@ -30,7 +30,7 @@ public class serverRequestManager try { HttpGet reportrequest = new HttpGet(url); - HttpClient client=new DefaultHttpClient();; + HttpClient client=new DefaultHttpClient(); client.execute(reportrequest); } catch (Exception ex) diff --git a/app/src/main/java/com/darkweb/genesissearchengine/httpManager/webRequestHandler.java b/app/src/main/java/com/darkweb/genesissearchengine/httpManager/webRequestHandler.java index 5e825f22..83d46a21 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/httpManager/webRequestHandler.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/httpManager/webRequestHandler.java @@ -5,7 +5,7 @@ import android.os.Message; import android.os.Handler; -import com.darkweb.genesissearchengine.appManager.main_activity.app_model; +import com.darkweb.genesissearchengine.appManager.home_activity.app_model; import com.darkweb.genesissearchengine.constants.messages; public class webRequestHandler diff --git a/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/admanager.java b/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/admanager.java index 25cfbea8..65d15d15 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/admanager.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/admanager.java @@ -1,6 +1,7 @@ package com.darkweb.genesissearchengine.pluginManager; -import com.darkweb.genesissearchengine.appManager.main_activity.app_model; +import com.darkweb.genesissearchengine.appManager.home_activity.app_model; +import com.darkweb.genesissearchengine.constants.enums; import com.google.android.gms.ads.AdRequest; import com.google.android.gms.ads.InterstitialAd; import com.google.android.gms.ads.MobileAds; @@ -10,7 +11,8 @@ public class admanager /*Private Variables*/ private static final admanager ourInstance = new admanager(); - private InterstitialAd mInterstitialAd; + private InterstitialAd mInterstitialHidden; + private InterstitialAd mInterstitialInternal; private int adCount = 0; boolean isAdShown = false; @@ -26,51 +28,31 @@ public class admanager public void initialize() { 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()); + initAd(mInterstitialHidden,"ca-app-pub-5074525529134731/4332539288"); + initAd(mInterstitialInternal,"ca-app-pub-5074525529134731/8478420705"); + } + + public void initAd(InterstitialAd adInstance,String id) + { + adInstance = new InterstitialAd(app_model.getInstance().getAppInstance()); + + adInstance.setAdUnitId(id); + adInstance.loadAd(new AdRequest.Builder().build()); } /*Helper Methods*/ - public void showAd(boolean isAdForced) + public void showAd(enums.adID id) { - if(isAdShown) + if(id.equals(enums.adID.hidden)) { - return; - } - - if(!mInterstitialAd.isLoading() && !mInterstitialAd.isLoaded()) - { - mInterstitialAd.loadAd(new AdRequest.Builder().build()); - if(isAdForced || adCount==0 || adCount%3==0) - { - adCount = 0; - } - else - { - adCount+=1; - } + mInterstitialHidden.show(); + mInterstitialHidden.loadAd(new AdRequest.Builder().build()); } else { - if(mInterstitialAd.isLoaded()) - { - if(isAdForced) - { - isAdShown = true; - mInterstitialAd.show(); - adCount = 1; - } - else - { - if(adCount%3==0) - { - mInterstitialAd.show(); - } - adCount += 1; - } - } + mInterstitialInternal.show(); + mInterstitialInternal.loadAd(new AdRequest.Builder().build()); } } } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/message_manager.java b/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/message_manager.java index 9f4d223c..46e7082d 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/message_manager.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/message_manager.java @@ -6,14 +6,13 @@ 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.main_activity.app_model; -import com.darkweb.genesissearchengine.appManager.main_activity.application_controller; +import com.darkweb.genesissearchengine.appManager.list_manager.list_model; +import com.darkweb.genesissearchengine.appManager.home_activity.app_model; +import com.darkweb.genesissearchengine.appManager.home_activity.application_controller; import com.darkweb.genesissearchengine.constants.constants; import com.darkweb.genesissearchengine.constants.keys; import com.darkweb.genesissearchengine.constants.strings; @@ -187,15 +186,15 @@ public class message_manager public void clearData() { - Context application_context = app_model.getInstance().getListContext(); - CFAlertDialog.Builder builder = new CFAlertDialog.Builder(app_model.getInstance().getListContext()) + Context application_context = list_model.getInstance().getListContext(); + CFAlertDialog.Builder builder = new CFAlertDialog.Builder(list_model.getInstance().getListContext()) .setDialogStyle(CFAlertDialog.CFAlertStyle.BOTTOM_SHEET) .setTitle(strings.clear_title) .setBackgroundColor(application_context.getResources().getColor(R.color.blue_dark_v2)) .setTextColor(application_context.getResources().getColor(R.color.black)) .setMessage(strings.clear_desc) .addButton(strings.clear_bt1, -1, -1, CFAlertDialog.CFAlertActionStyle.POSITIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> { - app_model.getInstance().getListInstance().clearAll(); + list_model.getInstance().getListInstance().onClearAll(); dialog.dismiss(); }) .addButton(strings.clear_bt2, -1, -1, CFAlertDialog.CFAlertActionStyle.NEGATIVE, CFAlertDialog.CFAlertActionAlignment.JUSTIFIED, (dialog, which) -> { diff --git a/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/orbot_manager.java b/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/orbot_manager.java index ce7fe711..ea8c6d93 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/orbot_manager.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/orbot_manager.java @@ -1,6 +1,6 @@ package com.darkweb.genesissearchengine.pluginManager; -import com.darkweb.genesissearchengine.appManager.main_activity.app_model; +import com.darkweb.genesissearchengine.appManager.home_activity.app_model; import com.darkweb.genesissearchengine.constants.constants; import com.darkweb.genesissearchengine.constants.keys; import com.darkweb.genesissearchengine.constants.status; diff --git a/app/src/main/res/drawable/back_arrow.webp b/app/src/main/res/drawable/back_arrow.webp new file mode 100644 index 0000000000000000000000000000000000000000..1d0c464a617d87efce184f4c104072a609c38681 GIT binary patch literal 720 zcmV;>0x$hiNk&G<0ssJ4MM6+kP&iDx0ssInUBDj@fZR5cB#Hi;y_m>3TJJ@K+-=*A zzj;6V`{HDCHfzd}&9-gZ8Bu$4`zP48-TrK2tlJMSBe!iM#S$h!+nLioKLGx(3S6ut z$s)UjR_v%7uG^Llt*XX-G6?$Tyo6?<)O$<=|3X%SNcI{$B7-lniVGH2qo)+`wM=4z zqnbRUjcf{`xk7003Y-X;$K-^m_j={Ch0h65i2DBGl=M2>h;qfy>VFYYOI&_&?vHZP1DMAXe4;q(Y4a(^h0vu404ZDA9Mh{ z^UE0f>Wx--u0$DUUA@+V>S>x~qbXWtPSNHVchoZt=$_`8k6s-j=y7H6 zULyvMKq4Lt?31IKXJ08!s#Bx(*~t0e%3zKYJc^E<;o;c(zSMGqrMU3ET%)y%8Elt} z)OM+6Z5PZm+c8Y#U}AYV4t(-}V1{`I$xf(Ms{Gl=06qxOECXe)5$Z7j$$}C?bhB3!Q-?XkFgy0$&Y@EVjD5Juob)*lP1`4@z&e*djFhurM1X0l}#E;rIgD zM2+{y_c)UxizxMJ5ip-brH|CbLK4+p@98XPzIZxA)OhCaAZ!vF1g6fTg+n2lhq-Lgkw`6r!t(ZD~Q0RRB- CplVhC literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable/cancel.png b/app/src/main/res/drawable/cancel.png index 964dc9d7d355e053a55586b3190389b10611ccaa..54d6587f150622f958378f484b285b21e0906aa6 100644 GIT binary patch literal 8305 zcmb_?cQjnl*Y;r4Xi=k!9=(hbVsu6sUGx@R^k_jCHAE*N`X~{-hv*`@h%tib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^EyKHF}m#X!+u|9av* zMQetN$Gg-?h%K~36dOqH#?`Dl7#R!72KBESE>b>Y4}nKY`9{=>AjZ5Aiun}ZL6et zw45P$XwxzjPQVXS8qN9h=!bwU4Bj&Gxv2Grxw*9-jJS}(Q3+L$-&?C`6b#{OJuU-F z6xGTuBiFeV8}y`l?gHu);xI6HOZH``$Fnry8ed^i{Y#>}LG%~>)?O`M*+1*TnB;Vt zWq7pjBHjT<`F_gh6Q~j`Jyp)K10J$`JhXJXD9Ck|rts^;L;+RTBQ;UWM|Pt>$Z-ZA z9%{HHBZ(@&Q$wMLf0%Q`zd#1PG^#4bKO-!%CtWSz(R~<(JnvEc^MN5un_I zmamU)V`YCu65F2mPm+~(D322%QiN%W7GWj?RgLYgbOhQJ&XY(@eVLBb9*_l)_3e4Q zTOc|?X)jye!AA=#gBZ?oolJj`3ur+h-8!=K={wQ8ma~G?%Gw?M(eU^mjn_L;FYuqg zgUgKAy{kgCD`!--+%$Rsf?G{bzCNKhA@1cXrYPS@mvL(&VWsNMsR4Xblg zx|;72>9{W-e=>@`7^3>_#x4#PXlD3d^8^2{A^lCc!NoJOuB{^8pVv%ZU#_+xDST3u Jt&}zk{Xbm#i8}xQ diff --git a/app/src/main/res/drawable/cancel.webp b/app/src/main/res/drawable/cancel.webp new file mode 100644 index 0000000000000000000000000000000000000000..74c67a9179284bc4fae9ae2d54c7ca8ca4030dc4 GIT binary patch literal 3344 zcmV+r4e#<&Nk&Ep4FCXFMM6+kP&iEc3;+Nx{(wIawRpR2OLJP=*7)cAhV{PW7b$ul zDZ8Lg>;3EeX)ZI7Ksh2t=p$i731p^+VM5@vl{PCv0<~?&+nm(4ZJWVt*PPvUwyo5j zUE2(5yIb01Mv@vqmH+$y4;F1JajVOvy$umNyg?I^=DX~AyYe4b{^P1hoZ#MS!Zxf4 z2XG5yJm+T=lY$O@X~u*vI$vLwq~ z5fKprqQD3bV<94<@3Q>R3CRzC*~?md;BELXO#UFfvjAJ}MZz9{?HpiIBAp#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_PwcX&BsaLty^A z>(Te)J{v7{EyEsDk{Z;n?fy6{+3oBX#Su}O7=GVuI30D);1OY}<*%V!QMsd8Y9Nig z>DcbBa&KnjT;$Kmulmy%;&6Ow@+BAlcM+k9KXDTJ=?tT`vzv#V)Whp2z2yI2UaNLc z++t!(U%K0$GQH3h9bes7wYJqyi+z0m1D;!`&}wUa`8QhvQ~JNQ;&3HnhT6~2qG))p zT~$)m*#*9Z)f|EGV$Gt~wF3*A%nsrcc<=cydsX&!aU=0_m+g$2aK&PGaf)72FZ_Ej MPj`l!&?PwjUpyB%ZU6uP literal 0 HcmV?d00001 diff --git a/app/src/main/res/layout/hint_completion_layout.xml b/app/src/main/res/layout/hint_view.xml similarity index 70% rename from app/src/main/res/layout/hint_completion_layout.xml rename to app/src/main/res/layout/hint_view.xml index 954c57c7..81f8d599 100644 --- a/app/src/main/res/layout/hint_completion_layout.xml +++ b/app/src/main/res/layout/hint_view.xml @@ -3,7 +3,6 @@ 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" @@ -11,19 +10,22 @@ android:orientation="vertical"> + android:textColor="@color/text_color_v1" + android:textSize="15.5sp"/> diff --git a/app/src/main/res/layout/home_view.xml b/app/src/main/res/layout/home_view.xml index 4a2d54b5..5d516814 100644 --- a/app/src/main/res/layout/home_view.xml +++ b/app/src/main/res/layout/home_view.xml @@ -6,7 +6,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/white" - tools:context="com.darkweb.genesissearchengine.appManager.main_activity.application_controller"> + tools:context="com.darkweb.genesissearchengine.appManager.home_activity.application_controller"> @@ -153,14 +153,16 @@ android:textColorHighlight="@color/text_color_highlight_v1" android:background="@xml/search_back_default" android:textCursorDrawable="@xml/search_cursor_state" - android:hint="@string/SearchHint" + android:hint="@string/SearchHintMain" android:text="@string/homeUrl" android:ems="10" android:layout_marginTop="8dp" + android:dropDownHeight="220dp" android:inputType="textNoSuggestions" android:layout_marginBottom="8dp" - android:completionHintView="@layout/hint_completion_layout" + android:completionHintView="@layout/hint_view" android:layout_marginEnd="0dp" + android:dropDownSelector="@xml/rouned_corner" android:layout_marginStart="10dp" android:maxLines="1" android:id="@+id/search" android:layout_weight="1" android:importantForAutofill="no" diff --git a/app/src/main/res/layout/invalid_setup.xml b/app/src/main/res/layout/invalid_setup_view.xml similarity index 57% rename from app/src/main/res/layout/invalid_setup.xml rename to app/src/main/res/layout/invalid_setup_view.xml index 6c159a4e..9168d840 100644 --- a/app/src/main/res/layout/invalid_setup.xml +++ b/app/src/main/res/layout/invalid_setup_view.xml @@ -1,6 +1,6 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/list_manager_row.xml b/app/src/main/res/layout/list_row_view.xml similarity index 81% rename from app/src/main/res/layout/list_manager_row.xml rename to app/src/main/res/layout/list_row_view.xml index 4516d30a..de254430 100644 --- a/app/src/main/res/layout/list_manager_row.xml +++ b/app/src/main/res/layout/list_row_view.xml @@ -11,9 +11,9 @@ @@ -21,6 +21,7 @@ android:id="@+id/header" android:layout_width="match_parent" android:layout_height="wrap_content" + android:textColor="@color/black" android:singleLine="true" /> @@ -29,8 +30,10 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:singleLine="true" + android:layout_marginTop="2dp" android:ellipsize="end" - android:textColor="@color/ease_blue" + android:textSize="12sp" + android:textColor="@color/holo_dark_gray" /> @@ -38,7 +41,7 @@ android:layout_width="35dp" android:layout_height="35dp" android:layout_marginEnd="10dp" - android:layout_marginTop="5dp" + android:layout_marginTop="0dp" android:id="@+id/message_button" android:onClick="onHomeButtonPressed" android:scaleType="fitCenter" diff --git a/app/src/main/res/layout/activity_app_list_manager.xml b/app/src/main/res/layout/list_view.xml similarity index 82% rename from app/src/main/res/layout/activity_app_list_manager.xml rename to app/src/main/res/layout/list_view.xml index 1cabcb6c..07b0fd91 100644 --- a/app/src/main/res/layout/activity_app_list_manager.xml +++ b/app/src/main/res/layout/list_view.xml @@ -6,7 +6,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/white" - tools:context="com.darkweb.genesissearchengine.appManager.list_activity.list_controller"> + tools:context="com.darkweb.genesissearchengine.appManager.list_manager.list_controller"> -