diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index fb42af57..0a6e064e 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -29,6 +29,5 @@
-
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
index 28e5b907..6bb12ae8 100644
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -6,6 +6,10 @@
+
+
+
+
diff --git a/app/build.gradle b/app/build.gradle
index 01691d0b..f8200a4d 100755
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,6 +1,5 @@
-apply plugin: 'com.android.application'
apply from: 'variables.gradle'
-
+apply plugin: 'com.android.application'
apply plugin: 'maven-publish'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'kotlin-android'
@@ -12,8 +11,8 @@ ext {
repositories {
maven {
- maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
- url "https://maven.mozilla.org/maven2/"
+ maven { url project.ext.url_snapshot }
+ url project.ext.url
mavenLocal()
mavenCentral()
google()
@@ -22,19 +21,19 @@ repositories {
}
android {
- compileSdkVersion project.ext.compileSdkVersion
- ndkVersion "21.4.7075529"
+ compileSdkVersion project.ext.compile_sdk_version
+ ndkVersion project.ext.ndk_version
defaultConfig {
- applicationId project.ext.applicationId
- minSdkVersion project.ext.minSdkVersion
- targetSdkVersion project.ext.targetSdkVersion
- versionCode project.ext.versionCode
- versionName project.ext.versionName
+ applicationId project.ext.application_id
+ minSdkVersion project.ext.min_sdk_version
+ targetSdkVersion project.ext.target_sdk_version
+ versionCode project.ext.version_code
+ versionName project.ext.version_name
}
- buildToolsVersion '29.0.3'
+ buildToolsVersion project.ext.build_tool_version
- flavorDimensions "abi"
+ flavorDimensions project.ext.dimen
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
@@ -45,164 +44,103 @@ android {
flavorDimensions project.ext.dimen
productFlavors {
-
arm {
- dimension "abi"
- ndk {
- ndk.abiFilters 'armeabi-v7a','arm64-v8a', 'x86', 'x86_64'
- }
+ versionCode project.ext.arm_vcode
+ versionName project.ext.arm_vname
+ dimension project.ext.dimen
}
aarch64 {
- dimension "abi"
- ndk {
- ndk.abiFilters 'armeabi-v7a','arm64-v8a', 'x86', 'x86_64'
- }
+ versionCode project.ext.aarch_vcode
+ versionName project.ext.aarch_vname
+ dimension project.ext.dimen
}
x86 {
- dimension "abi"
- ndk {
- ndk.abiFilters 'armeabi-v7a','arm64-v8a', 'x86', 'x86_64'
- }
+ versionCode project.ext.x86_vcode
+ versionName project.ext.x86_vname
+ dimension project.ext.dimen
}
x86_64 {
- dimension "abi"
- ndk {
- ndk.abiFilters 'armeabi-v7a','arm64-v8a', 'x86', 'x86_64'
- }
+ versionCode project.ext.x64_vcode
+ versionName project.ext.x64_vname
+ dimension project.ext.dimen
}
}
sourceSets {
main {
- res.srcDirs =
- [
- 'src/main/res/layouts/history',
- 'src/main/res/layouts/help',
- 'src/main/res/layouts/tab',
- 'src/main/res/layouts/language',
- 'src/main/res/layouts/orbot',
- 'src/main/res/layouts/proxyStatus',
- 'src/main/res/layouts/orbotLog',
- 'src/main/res/layouts/setting',
- 'src/main/res/layouts/bridge',
- 'src/main/res/layouts/log',
- 'src/main/res/layouts/landing',
- 'src/main/res/layouts/alert',
- 'src/main/res/layouts/bookmark',
- 'src/main/res/layouts/shared',
- 'src/main/res/layouts/shared/listviews',
- 'src/main/res/layouts/searchWidget',
- 'src/main/res/layouts/home',
- 'src/main/res/custom-xml/alert',
- 'src/main/res/custom-xml/tab',
- 'src/main/res/custom-xml/images',
- 'src/main/res/custom-xml/bookmark',
- 'src/main/res/custom-xml/generic',
- 'src/main/res/custom-xml/history',
- 'src/main/res/custom-xml/home',
- 'src/main/res/custom-xml/landing',
- 'src/main/res/custom-xml/orbot',
- 'src/main/res/custom-xml/orbot_log',
- 'src/main/res/custom-xml/setting',
- 'src/main/res/layouts',
- 'src/main/res/images',
- 'src/main/res'
- ]
+ res.srcDirs = project.ext.resource_directories
}
}
buildTypes {
release {
- minifyEnabled true
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ minifyEnabled project.ext.minifyEnabled
+ proguardFiles getDefaultProguardFile(project.ext.proguard_file), project.ext.proguard_rule
}
}
lintOptions {
- checkReleaseBuilds false
- // Or, if you prefer, you can continue to check for errors in release builds,
- // but continue the build even when errors are found:
- abortOnError false
+ checkReleaseBuilds project.ext.checkReleaseBuilds
+ abortOnError project.ext.abortOnError
}
}
dependencies {
+ /* Android Support Repository dependencies */
- // Android Support Repository dependencies
- androidTestImplementation 'junit:junit:4.13.2'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
- implementation 'androidx.preference:preference:1.1.1'
- implementation 'androidx.preference:preference:1.1.1'
+ implementation 'androidx.preference:preference-ktx:1.1.1'
implementation 'androidx.legacy:legacy-preference-v14:1.0.0'
- implementation 'androidx.recyclerview:recyclerview:1.1.0'
+ implementation 'androidx.recyclerview:recyclerview:1.2.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
- implementation 'com.google.firebase:firebase-messaging:21.0.1'
+ implementation 'com.google.firebase:firebase-messaging:21.1.0'
- // Testing-only dependencies
- androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0') {
- exclude group: 'com.android.support', module: 'support-annotations'
- }
+ /* Default Libraries */
- /*Default Libraries*/
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.google.android.material:material:1.4.0-alpha02'
- implementation 'androidx.preference:preference:1.1.1'
+ implementation 'androidx.preference:preference-ktx:1.1.1'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
- implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.4.31'
+ implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2'
+ implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.4.32'
- /*Firefox ABI Splits*/
- implementation "org.mozilla.components:browser-engine-gecko:$mozilla_components_version"
- implementation "org.mozilla.components:browser-icons:$mozilla_components_icon_version"
- implementation "org.mozilla.geckoview:geckoview:$gecko_nightly_version"
+ /* Firefox ABI Splits */
- /*Alert Dialog*/
- implementation 'com.crowdfire.cfalertdialog:cfalertdialog:1.1.0'
-
- /*Ads Manager*/
- implementation 'com.google.android.gms:play-services-ads:19.8.0'
-
-
- /*Crashlytics*/
- implementation 'com.flurry.android:analytics:12.4.0@aar'
-
- /*View Animator*/
- implementation 'com.daimajia.easing:library:2.4@aar'
- implementation 'com.daimajia.androidanimations:library:2.4@aar'
-
- /*Orbot Service*/
- implementation project(path: ':orbotservice')
- implementation 'androidx.legacy:legacy-support-v4:1.0.0'
- implementation 'com.github.apl-devs:appintro:v4.2.2'
- implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.6'
-
- /*Helper Libraries*/
- implementation 'com.chauthai.overscroll:overscroll-bouncy:0.1.1'
- implementation 'jp.wasabeef:recyclerview-animators:2.2.7'
- implementation 'com.android.support:design:28.0.0'
- implementation "org.mozilla.components:browser-icons:9.0.0"
- implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:0.30.1'
- implementation 'com.android.volley:volley:1.2.0'
- implementation 'com.github.gabrielemariotti.recyclerview:recyclerview-animators:0.3.0-SNAPSHOT@aar'
- implementation 'com.github.instacart.truetime-android:library-extension-rx:3.3'
-
-
- /*Image Cache Libraries*/
- implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
- implementation 'com.github.intelligo-systems:slight:1.1.3'
+ implementation "org.mozilla.components:browser-engine-gecko:73.0.8"
+ implementation "org.mozilla.components:browser-icons:73.0.9"
+ implementation "org.mozilla.geckoview:geckoview:87.0.20210318103112"
implementation "org.mozilla.components:concept-fetch:73.0.9"
implementation "org.mozilla.components:concept-base:73.0.9"
implementation 'com.coolerfall:android-http-download-manager:1.6.3'
implementation "org.mozilla.components:support-utils:73.0.9"
+ /*Crashlytics*/
+
+ implementation 'com.flurry.android:analytics:12.4.0@aar'
+
+ /* Ads Manager */
+
+ implementation 'com.google.android.gms:play-services-ads:20.0.0'
+
+ /* Orbot Service */
+
+ implementation project(path: ':orbotservice')
+
+ /* Helper Libraries */
+
+ implementation 'com.github.intelligo-systems:slight:1.1.3'
+ implementation 'jp.wasabeef:recyclerview-animators:2.2.7'
+ implementation 'com.github.apl-devs:appintro:v4.2.2'
+ implementation 'com.android.support:design:28.0.0'
+ implementation 'com.android.volley:volley:1.2.0'
+ implementation 'com.github.instacart.truetime-android:library-extension-rx:3.3'
+ implementation files('libs\\httpclientandroidlib-1.2.1.jar')
+
}
-
-apply plugin: 'com.android.application'
-apply plugin: 'com.google.gms.google-services'
-
diff --git a/app/libs/httpclientandroidlib-1.2.1.jar b/app/libs/httpclientandroidlib-1.2.1.jar
new file mode 100644
index 00000000..f409b0b2
Binary files /dev/null and b/app/libs/httpclientandroidlib-1.2.1.jar differ
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 1a6026bd..f408d141 100755
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -11,6 +11,7 @@
+
diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/activityContextManager.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/activityContextManager.java
index cc2b7680..7e4f23f1 100755
--- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/activityContextManager.java
+++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/activityContextManager.java
@@ -1,5 +1,7 @@
package com.darkweb.genesissearchengine.appManager;
+import android.content.Context;
+
import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkController;
import com.darkweb.genesissearchengine.appManager.bridgeManager.bridgeController;
@@ -9,7 +11,6 @@ import com.darkweb.genesissearchengine.appManager.orbotLogManager.orbotLogContro
import com.darkweb.genesissearchengine.appManager.settingManager.generalManager.settingGeneralController;
import com.darkweb.genesissearchengine.appManager.settingManager.settingHomePage.settingHomeController;
import com.darkweb.genesissearchengine.appManager.tabManager.tabController;
-
import java.lang.ref.WeakReference;
import java.util.ArrayList;
@@ -33,6 +34,7 @@ public class activityContextManager
private WeakReference pSettingController;
private WeakReference pSettingGeneralController;
private WeakReference pOrbotLogController;
+ private WeakReference pApplicationContext;
private ArrayList> mStackList;
/*Initialization*/
@@ -79,6 +81,15 @@ public class activityContextManager
}
return pHomeController.get();
}
+
+ public void setApplicationContext(Context pContext){
+ this.pApplicationContext = new WeakReference(pContext);
+ }
+
+ public Context getApplicationController(){
+ return pApplicationContext.get();
+ }
+
public void setHomeController(homeController home_controller){
this.pHomeController = new WeakReference(home_controller);
}
diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/bookmarkManager/bookmarkAdapter.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/bookmarkManager/bookmarkAdapter.java
index e7d2ca3d..05515e10 100644
--- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/bookmarkManager/bookmarkAdapter.java
+++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/bookmarkManager/bookmarkAdapter.java
@@ -111,31 +111,25 @@ public class bookmarkAdapter extends RecyclerView.Adapter0 && mCurrentList.get(m_counter_inner-1).getDescription()==null && (mCurrentList.size()>m_counter_inner+1 && mCurrentList.get(m_counter_inner+1).getDescription()==null || mCurrentList.size()==m_counter_inner+1)){
+ if(mCurrentList.size()>0 && mCurrentList.size()m_counter_inner+1 && mCurrentList.get(m_counter_inner+1).getDescription()==null || mCurrentList.size()==m_counter_inner+1)){
mDateVerify = true;
}
- if(m_counter_inner==0){
- notifyDataSetChanged();
+ if(mDateVerify){
+ notifyItemRemoved(m_counter_inner-1);
+ mCurrentList.remove(m_counter_inner-1);
+ notifyItemRangeChanged(m_counter_inner-1, mCurrentList.size());
}else {
-
- if(mDateVerify){
- notifyItemRemoved(m_counter_inner-1);
- mCurrentList.remove(m_counter_inner-1);
- //notifyItemRemoved(m_counter_inner-1);
- //mCurrentList.remove(m_counter_inner-1);
- notifyItemRangeChanged(m_counter_inner-1, mCurrentList.size());
- }else {
- notifyItemRemoved(m_counter_inner);
- mCurrentList.remove(m_counter_inner);
- notifyItemRangeChanged(m_counter_inner, mCurrentList.size());
- }
+ notifyItemRemoved(m_counter_inner);
+ mCurrentList.remove(m_counter_inner);
+ notifyItemRangeChanged(m_counter_inner, mCurrentList.size());
}
break;
}
}
}
clearLongSelectedURL();
+ initializeModelWithDate(false);
}
private void clearLongSelectedURL(){
@@ -322,7 +316,6 @@ public class bookmarkAdapter extends RecyclerView.Adapter0){
@@ -348,22 +340,20 @@ public class bookmarkAdapter extends RecyclerView.Adapter6){
- break;
+ if(model.getDescription().contains("boogle.store") || model.getDescription().contains("genesis.onion")){
+ mFaviconLogo.setImageDrawable(itemView.getResources().getDrawable(R.drawable.genesis));
+ }else{
+ new Thread(){
+ public void run(){
+ try {
+ mHindTypeIconTemp.setImageDrawable(null);
+ mEvent.invokeObserver(Arrays.asList(mHindTypeIconTemp, "https://" + helperMethod.getDomainName(model.getDescription())), enums.etype.fetch_favicon);
+ while (true){
+ int mCounter=0;
+ if(mHindTypeIconTemp.isAttachedToWindow() || mHindTypeIconTemp.getDrawable()==null){
+ sleep(50);
+ mCounter+=1;
+ }else {
+ break;
+ }
+ if(mCounter>6){
+ break;
+ }
}
+ mContext.runOnUiThread(() -> {
+ Bitmap mBitmap = helperMethod.drawableToBitmap(mHindTypeIconTemp.getDrawable());
+ mFaviconLogo.setImageBitmap(mBitmap);
+ });
+ } catch (InterruptedException e) {
+ e.printStackTrace();
}
- mContext.runOnUiThread(() -> {
- Bitmap mBitmap = helperMethod.drawableToBitmap(mHindTypeIconTemp.getDrawable());
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- mBitmap.compress(Bitmap.CompressFormat.PNG, 20, out);
- Bitmap decoded = BitmapFactory.decodeStream(new ByteArrayInputStream(out.toByteArray()));
- mFaviconLogo.setImageBitmap(decoded);
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
}
- }
- }.start();
+ }.start();
+ }
setItemViewOnClickListener(mRowContainer, mRowMenu, mDescription.getText().toString(), p_position, header, mRowMenu, mLogoImage, model.getID(), model.getDate());
}
@@ -484,11 +475,6 @@ public class bookmarkAdapter extends RecyclerView.Adapter0){
- initializeModelWithDate(true);
- }else {
- initializeModelWithDate(false);
- }
notifyDataSetChanged();
}
}
diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/bookmarkManager/bookmarkAdapterView.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/bookmarkManager/bookmarkAdapterView.java
index 5dd1f29f..9e88fa2e 100644
--- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/bookmarkManager/bookmarkAdapterView.java
+++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/bookmarkManager/bookmarkAdapterView.java
@@ -77,16 +77,16 @@ public class bookmarkAdapterView
pItemView.setPressed(false);
int speed = 150;
if(pIsForced){
- speed=0;
+ speed=150;
}
if(pVibrate){
helperMethod.vibrate(mContext);
}
- pLogoImage.setAlpha(0.5f);
+ pLogoImage.setAlpha(0f);
pLogoImage.setVisibility(View.VISIBLE);
pLogoImage.animate().cancel();
- pLogoImage.animate().setDuration(speed).alpha(1);
+ pLogoImage.animate().setDuration(speed).alpha(0.95f);
}
public void onClearHighlight( View pItemView, View pMenuItem, ImageView pLogoImage, boolean pIsForced)
diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/bookmarkManager/bookmarkController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/bookmarkManager/bookmarkController.java
index e0368913..a0a8380d 100755
--- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/bookmarkManager/bookmarkController.java
+++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/bookmarkManager/bookmarkController.java
@@ -23,6 +23,7 @@ import androidx.recyclerview.widget.ItemTouchHelper;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
+import com.darkweb.genesissearchengine.appManager.historyManager.historyEnums;
import com.darkweb.genesissearchengine.databaseManager.databaseController;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.editTextManager;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
@@ -45,6 +46,8 @@ import java.util.Collections;
import java.util.List;
import java.util.Objects;
import static com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkEnums.eBookmarkViewCommands.M_VERTIFY_SELECTION_MENU;
+import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.M_CLEAR_BOOKMARK;
+import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.M_CLEAR_HISTORY;
public class bookmarkController extends AppCompatActivity
@@ -125,6 +128,10 @@ public class bookmarkController extends AppCompatActivity
mSearchInput.setEventHandler(new edittextManagerCallback());
+ mClearButton.setOnClickListener(v -> {
+ pluginController.getInstance().onMessageManagerInvoke(Arrays.asList(strings.GENERIC_EMPTY_STR, this), M_CLEAR_BOOKMARK);
+ });
+
mSearchInput.setOnEditorActionListener((v, actionId, event) ->{
if (actionId == EditorInfo.IME_ACTION_NEXT)
{
@@ -325,7 +332,7 @@ public class bookmarkController extends AppCompatActivity
((bookmarkAdapter) Objects.requireNonNull(mRecycleView.getAdapter())).invokeFilter(true );
mbookmarkViewController.onTrigger(bookmarkEnums.eBookmarkViewCommands.M_CLEAR_LIST, null);
databaseController.getInstance().execSQL(sql.SQL_CLEAR_BOOKMARK,null);
- finish();
+ mRecycleView.setAlpha(0);
}
public class edittextManagerCallback implements eventObserver.eventListener {
@@ -334,8 +341,7 @@ public class bookmarkController extends AppCompatActivity
public Object invokeObserver(List