diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
index 676c6da7..22dc01da 100644
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -5,6 +5,7 @@
+
diff --git a/app/build.gradle b/app/build.gradle
index c2bf07fc..b9c953c8 100755
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -75,12 +75,13 @@ android {
dependencies {
/* Android Support Repository dependencies */
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
- implementation 'androidx.appcompat:appcompat:1.2.0'
+ implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'androidx.preference:preference-ktx:1.1.1'
implementation 'androidx.legacy:legacy-preference-v14:1.0.0'
- implementation 'androidx.recyclerview:recyclerview:1.2.0'
+ implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
implementation 'com.android.support:support-core-utils:28.0.0'
@@ -89,12 +90,12 @@ dependencies {
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
- implementation 'androidx.appcompat:appcompat:1.2.0'
+ implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
- implementation 'com.google.android.material:material:1.4.0-alpha02'
+ implementation 'com.google.android.material:material:1.4.0'
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 'com.google.android.material:material:1.4.0'
+ implementation 'androidx.appcompat:appcompat:1.3.0'
/* Firefox ABI Splits */
@@ -107,11 +108,13 @@ dependencies {
/*Crashlytics*/
- implementation 'com.flurry.android:analytics:12.4.0@aar'
+ implementation 'com.flurry.android:analytics:12.13.0@aar'
/* Ads Manager */
- implementation 'com.google.android.gms:play-services-ads:20.1.0'
+ implementation('com.mopub:mopub-sdk:5.17.0@aar') {
+ transitive = true
+ }
/* Orbot Service */
@@ -126,13 +129,14 @@ dependencies {
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 'net.zetetic:android-database-sqlcipher:4.4.3@aar'
+ implementation "net.zetetic:android-database-sqlcipher:4.4.3"
+ implementation "androidx.sqlite:sqlite-ktx:2.1.0"
implementation 'com.github.apl-devs:appintro:v4.2.2'
- implementation 'androidx.palette:palette:1.0.0'
+ implementation 'androidx.palette:palette-ktx:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
- implementation 'androidx.recyclerview:recyclerview:1.1.0'
+ implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
- implementation 'com.google.android.material:material:1.2.1'
+ implementation 'com.google.android.material:material:1.4.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
diff --git a/app/libs/mopub-sdk-5.17.0.aar b/app/libs/mopub-sdk-5.17.0.aar
new file mode 100644
index 00000000..32d6a201
Binary files /dev/null and b/app/libs/mopub-sdk-5.17.0.aar differ
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index c7f327cf..0a52050b 100755
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -28,7 +28,10 @@
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true"
tools:targetApi="n">
-
+
@@ -278,16 +281,11 @@
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_path" />
-
-
-
-
-
+ android:exported="false"
+ android:stopWithTask="true" />
\ No newline at end of file
diff --git a/app/src/main/assets/Homepage/javascript/js-homepage.js b/app/src/main/assets/Homepage/javascript/js-homepage.js
index e1f665bd..d812d53b 100644
--- a/app/src/main/assets/Homepage/javascript/js-homepage.js
+++ b/app/src/main/assets/Homepage/javascript/js-homepage.js
@@ -74,7 +74,9 @@ $(window).on('load', function() {
// var mResponseJson = '[{ "mIcon":"https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196", "mHeader":"Experience", "mBody":"Donec id elit non mi porta gravida at eget metus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui"},{ "mIcon":"https://wikileaks.org/static/img/wl-logo.png", "mHeader":"Experience", "mBody":"Donec id elit non mi porta gravida at eget metus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui"},{ "mIcon":"https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196", "mHeader":"Experience", "mBody":"Donec id elit non mi porta gravida at eget metus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui"},{ "mIcon":"https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196", "mHeader":"Experience", "mBody":"Donec id elit non mi porta gravida at eget metus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui"},{ "mIcon":"https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196", "mHeader":"Experience", "mBody":"Donec id elit non mi porta gravida at eget metus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui"},{ "mIcon":"https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196", "mHeader":"Experience", "mBody":"Donec id elit non mi porta gravida at eget metus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui"}]';
// setTimeout(mHomepageLoader.onLoadReferenceWebsites, 500);
// setTimeout(mHomepageLoader.onLoadReferenceWebsiteContent, 1000, mResponseJson);
- document.getElementById("pBody").classList.toggle('body_fadein');
+ $(document).ready(function() {
+ $('body').hide().fadeIn('fast');
+ });
setTimeout(function (){
onTriggerScriptHandler(Commands.onLoadReferenceWebsites, null)
diff --git a/app/src/main/assets/Homepage/style/cs-homepage.css b/app/src/main/assets/Homepage/style/cs-homepage.css
index d7c91a62..8fb517dd 100644
--- a/app/src/main/assets/Homepage/style/cs-homepage.css
+++ b/app/src/main/assets/Homepage/style/cs-homepage.css
@@ -1,8 +1,6 @@
/*Search*/
body{
- opacity: 0;
- transition: opacity 2s;
- -webkit-transition: opacity 2s; /* Safari */
+ opacity: 1;
}
.body_fadein {
diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/bookmarkManager/BookmarkSettings/bookmarkSettingController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/bookmarkManager/BookmarkSettings/bookmarkSettingController.java
index 869b836f..a4a91e7f 100644
--- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/bookmarkManager/BookmarkSettings/bookmarkSettingController.java
+++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/bookmarkManager/BookmarkSettings/bookmarkSettingController.java
@@ -2,29 +2,32 @@ package com.darkweb.genesissearchengine.appManager.bookmarkManager.BookmarkSetti
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
+import android.annotation.SuppressLint;
+import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.widget.EditText;
+import android.widget.ScrollView;
import android.widget.TextView;
-
import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.activityThemeManager;
import com.darkweb.genesissearchengine.constants.keys;
-import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.eventObserver;
+import com.darkweb.genesissearchengine.helperManager.helperMethod;
import com.darkweb.genesissearchengine.pluginManager.pluginController;
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
import com.example.myapplication.R;
-
-import org.mozilla.geckoview.GeckoSession;
-
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
+import static com.darkweb.genesissearchengine.constants.keys.M_ACTIVITY_RESPONSE;
+import static com.darkweb.genesissearchengine.constants.responses.BOOKMARK_SETTING_CONTROLLER_SHOW_DELETE_ALERT;
+import static com.darkweb.genesissearchengine.constants.responses.BOOKMARK_SETTING_CONTROLLER_SHOW_SUCCESS_ALERT;
+
public class bookmarkSettingController extends AppCompatActivity {
/* Private Variables */
@@ -35,10 +38,9 @@ public class bookmarkSettingController extends AppCompatActivity {
/* UI Variables */
private EditText mBookmarName;
- private EditText mBookmarURL;
+ private TextView mBookmarURL;
+ private ScrollView mScrollView;
- private TextView mBookmarkNameError;
- private TextView mBookmarkURLError;
/* Initializations */
@@ -58,19 +60,20 @@ public class bookmarkSettingController extends AppCompatActivity {
private void initializeViews() {
mBookmarName = findViewById(R.id.pBookmarkName);
mBookmarURL = findViewById(R.id.pBookmarkURL);
- mBookmarkNameError = findViewById(R.id.pBookmarkNameError);
- mBookmarkURLError = findViewById(R.id.pBookmarkURLError);
+ mScrollView = findViewById(R.id.pScrollView);
}
+ @SuppressLint("ClickableViewAccessibility")
private void initializeLocalEventHandlers() {
-
- TextWatcher mTextWatcher = new TextWatcher() {
+ mBookmarName.addTextChangedListener(new TextWatcher() {
@Override
public void afterTextChanged(Editable s) {
String mBookmarkName = (String) mBookmarkSettingViewController.onTrigger(bookmarkSettingEnums.eBookmarkSettingViewCommands.M_GET_BOOKMARK_NAME);
- String mBookmarkURL = (String) mBookmarkSettingViewController.onTrigger(bookmarkSettingEnums.eBookmarkSettingViewCommands.M_GET_BOOKMARK_URL);
- mBookmarkSettingModel.onTrigger(bookmarkSettingEnums.eBookmarkSettingModelCommands.M_VALIDATE_FORM, Arrays.asList(mBookmarkName, mBookmarkURL));
+
+ boolean mValidationStatus = (boolean)mBookmarkSettingModel.onTrigger(bookmarkSettingEnums.eBookmarkSettingModelCommands.M_VALIDATE_FORM, Collections.singletonList(mBookmarkName));
+ mBookmarkSettingModel.onTrigger(bookmarkSettingEnums.eBookmarkSettingModelCommands.M_SET_BOOOKMARK_CHANGED_STATUS, Collections.singletonList(true));
+ mBookmarkSettingViewController.onTrigger(bookmarkSettingEnums.eBookmarkSettingViewCommands.M_BOOKMARK_NAME_VALIDATION_RESPONSE, Collections.singletonList(mValidationStatus));
}
@Override
@@ -81,20 +84,40 @@ public class bookmarkSettingController extends AppCompatActivity {
public void onTextChanged(CharSequence s, int start,int before, int count) {
}
- };
+ });
- mBookmarName.addTextChangedListener(mTextWatcher);
- mBookmarURL.addTextChangedListener(mTextWatcher);
+
+ mBookmarName.setOnFocusChangeListener((v, hasFocus) -> {
+ if(!hasFocus){
+ mBookmarkSettingViewController.onTrigger(bookmarkSettingEnums.eBookmarkSettingViewCommands.M_CLEAR_FORM_FOCUS);
+ }
+ });
+
+ mScrollView.setOnTouchListener((v, event) -> {
+ mBookmarkSettingViewController.onTrigger(bookmarkSettingEnums.eBookmarkSettingViewCommands.M_CLEAR_FORM_FOCUS);
+ return false;
+ });
}
- public void initializeModels(){
+ private void initializeModels(){
String mBookmarkName = getIntent().getStringExtra(keys.BOOKMARK_SETTING_NAME);
String mBookmarkURL = getIntent().getStringExtra(keys.BOOKMARK_SETTING_URL);
int mBookmarkID = getIntent().getIntExtra(keys.BOOKMARK_SETTING_ID, -1);
- mBookmarkSettingViewController = new bookmarkSettingViewController(this, new bookmarkSettingViewCallback(), mBookmarName, mBookmarURL, mBookmarkNameError, mBookmarkURLError);
+ mBookmarkSettingViewController = new bookmarkSettingViewController(this, new bookmarkSettingViewCallback(), mBookmarName, mBookmarURL);
mBookmarkSettingViewController.onTrigger(bookmarkSettingEnums.eBookmarkSettingViewCommands.M_INITIALIZE, Arrays.asList(mBookmarkName,mBookmarkURL));
- mBookmarkSettingModel = new bookmarkSettingModel(this, new bookmarkSettingModelCallback(), mBookmarkID);
+ mBookmarkSettingModel = new bookmarkSettingModel(this, new bookmarkSettingModelCallback(), mBookmarkID, mBookmarkURL);
+ }
+
+ private void initCallableResponse(bookmarkSettingEnums.eActivityResponseCommands pResponse){
+ Intent data = new Intent();
+ if(pResponse.equals(bookmarkSettingEnums.eActivityResponseCommands.M_OPEN_UPDATE_ALERT)){
+ data.putExtra(M_ACTIVITY_RESPONSE, BOOKMARK_SETTING_CONTROLLER_SHOW_SUCCESS_ALERT);
+ }
+ else if(pResponse.equals(bookmarkSettingEnums.eActivityResponseCommands.M_OPEN_DELETE_ALERT)){
+ data.putExtra(M_ACTIVITY_RESPONSE, BOOKMARK_SETTING_CONTROLLER_SHOW_DELETE_ALERT);
+ }
+ setResult(RESULT_OK,data);
}
/* Local Override */
@@ -126,19 +149,39 @@ public class bookmarkSettingController extends AppCompatActivity {
@Override
public void onBackPressed() {
- onClose(null);
+ onCloseTrigger(null);
}
/* UI Redirection */
- public void onClose(View view){
+ public void onCloseTrigger(View view){
finish();
}
- public void onUpdateBookmark(View view) {
- String mBookmarkName = (String) mBookmarkSettingViewController.onTrigger(bookmarkSettingEnums.eBookmarkSettingViewCommands.M_GET_BOOKMARK_NAME);
- String mBookmarkURL = (String) mBookmarkSettingViewController.onTrigger(bookmarkSettingEnums.eBookmarkSettingViewCommands.M_GET_BOOKMARK_URL);
- mBookmarkSettingModel.onTrigger(bookmarkSettingEnums.eBookmarkSettingModelCommands.M_UPDATE_BOOKMARK, Arrays.asList(mBookmarkName, mBookmarkURL));
+ public void onUITrigger(View view){
+ if(view.getId()==R.id.pBookmarkUpdate){
+ mBookmarkSettingViewController.onTrigger(bookmarkSettingEnums.eBookmarkSettingViewCommands.M_CLEAR_FORM);
+
+ String mBookmarkName = (String) mBookmarkSettingViewController.onTrigger(bookmarkSettingEnums.eBookmarkSettingViewCommands.M_GET_BOOKMARK_NAME);
+ boolean mValid = (boolean) mBookmarkSettingModel.onTrigger(bookmarkSettingEnums.eBookmarkSettingModelCommands.M_VALIDATE_FORM, Collections.singletonList(mBookmarkName));
+ boolean mBookmarkChanged = (boolean) mBookmarkSettingModel.onTrigger(bookmarkSettingEnums.eBookmarkSettingModelCommands.M_GET_UPDATE_STATUS);
+
+ if(mValid){
+ mBookmarkSettingModel.onTrigger(bookmarkSettingEnums.eBookmarkSettingModelCommands.M_UPDATE_BOOKMARK, Collections.singletonList(mBookmarkName));
+ mBookmarkSettingViewController.onTrigger(bookmarkSettingEnums.eBookmarkSettingViewCommands.M_CLEAR_FORM_FOCUS);
+ if(mBookmarkChanged){
+ initCallableResponse(bookmarkSettingEnums.eActivityResponseCommands.M_OPEN_UPDATE_ALERT);
+ }
+ }else {
+ mBookmarkSettingViewController.onTrigger(bookmarkSettingEnums.eBookmarkSettingViewCommands.M_BOOKMARK_NAME_VALIDATION_RESPONSE, Collections.singletonList(false));
+ }
+ onCloseTrigger(null);
+ }
+ if(view.getId()==R.id.pRemoveBookmark){
+ initCallableResponse(bookmarkSettingEnums.eActivityResponseCommands.M_OPEN_DELETE_ALERT);
+ mBookmarkSettingModel.onTrigger(bookmarkSettingEnums.eBookmarkSettingModelCommands.M_DELETE_BOOKMARK);
+ onCloseTrigger(null);
+ }
}
/* UI Callbacks */
@@ -146,7 +189,7 @@ public class bookmarkSettingController extends AppCompatActivity {
private class bookmarkSettingViewCallback implements eventObserver.eventListener{
@Override
- public Object invokeObserver(List