diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
index 6eea2210..bb645ebe 100644
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -20,6 +20,7 @@
+
diff --git a/app/build.gradle b/app/build.gradle
index 48eaabe4..3c1af1f5 100755
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -76,6 +76,7 @@ android {
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',
@@ -178,7 +179,7 @@ dependencies {
implementation 'com.chauthai.overscroll:overscroll-bouncy:0.1.1'
androidTestImplementation "junit:junit:4.13.1"
implementation 'jp.wasabeef:recyclerview-animators:2.2.7'
- compile 'com.android.support:design:24.0.0'
+ implementation 'com.android.support:design:24.0.0'
}
apply plugin: 'com.android.application'
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 1aa0466c..509dc8ca 100755
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -48,6 +48,13 @@
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:label="@string/SETTING_HEADER"
android:windowSoftInputMode="adjustNothing" />
+
+
+
pluginController.getInstance().MessageManagerHandler(activityContextManager.getInstance().getBookmarkController(), Collections.singletonList(strings.GENERIC_EMPTY_STR), enums.etype.clear_bookmark));
+ mClearButton.setOnClickListener(v -> pluginController.getInstance().MessageManagerHandler(activityContextManager.getInstance().getBookmarkController(), Collections.singletonList(strings.GENERIC_EMPTY_STR), enums.eMessageEnums.M_CLEAR_BOOKMARK));
mSearchInput.setOnEditorActionListener((v, actionId, event) ->{
if (actionId == EditorInfo.IME_ACTION_NEXT)
diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/bridgeManager/bridgeController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/bridgeManager/bridgeController.java
index eb999c08..bffe763a 100755
--- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/bridgeManager/bridgeController.java
+++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/bridgeManager/bridgeController.java
@@ -1,20 +1,16 @@
package com.darkweb.genesissearchengine.appManager.bridgeManager;
-import android.content.Context;
-import android.graphics.Rect;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
-import android.view.MotionEvent;
import android.view.View;
-import android.view.inputmethod.InputMethodManager;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.RadioButton;
import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
-import com.darkweb.genesissearchengine.appManager.historyManager.historyAdapter;
+import com.darkweb.genesissearchengine.appManager.helpManager.helpController;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.enums;
import com.darkweb.genesissearchengine.constants.keys;
@@ -24,11 +20,11 @@ import com.darkweb.genesissearchengine.dataManager.dataEnums;
import com.darkweb.genesissearchengine.helperManager.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 java.util.Arrays;
import java.util.Collections;
import java.util.List;
-import java.util.Objects;
public class bridgeController extends AppCompatActivity {
@@ -102,6 +98,10 @@ public class bridgeController extends AppCompatActivity {
});
}
+ public void onOpenInfo(View view) {
+ helperMethod.openActivity(helpController.class, constants.CONST_LIST_HISTORY, this,true);
+ }
+
/* LISTENERS */
public class bridgeModelCallback implements eventObserver.eventListener{
@@ -145,7 +145,7 @@ public class bridgeController extends AppCompatActivity {
public void requestBridges(View view){
mBridgeModel.onTrigger(bridgeEnums.eBridgeModelCommands.M_REQUEST_BRIDGE, null);
- pluginController.getInstance().MessageManagerHandler(this, Collections.singletonList(constants.CONST_BACKEND_GOOGLE_URL), enums.etype.on_bridge_mail);
+ pluginController.getInstance().MessageManagerHandler(this, Collections.singletonList(constants.CONST_BACKEND_GOOGLE_URL), enums.eMessageEnums.M_BRIDGE_MAIL);
}
public void onCustomChecked(View view){
diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/bridgeManager/bridgeModel.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/bridgeManager/bridgeModel.java
index bf3902df..25404ba4 100644
--- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/bridgeManager/bridgeModel.java
+++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/bridgeManager/bridgeModel.java
@@ -11,6 +11,7 @@ import com.darkweb.genesissearchengine.dataManager.dataController;
import com.darkweb.genesissearchengine.dataManager.dataEnums;
import com.darkweb.genesissearchengine.helperManager.eventObserver;
import com.darkweb.genesissearchengine.pluginManager.pluginController;
+import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
import java.util.Arrays;
import java.util.Collections;
@@ -33,7 +34,7 @@ class bridgeModel
/*Helper Methods*/
public void requestBridges(){
- pluginController.getInstance().MessageManagerHandler(mContext, Collections.singletonList(constants.CONST_BACKEND_GOOGLE_URL), enums.etype.on_bridge_mail);
+ pluginController.getInstance().MessageManagerHandler(mContext, Collections.singletonList(constants.CONST_BACKEND_GOOGLE_URL), enums.eMessageEnums.M_BRIDGE_MAIL);
}
public void onCustomChecked(){
diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/bridgeManager/bridgeViewController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/bridgeManager/bridgeViewController.java
index 1c193d9e..8ee16438 100755
--- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/bridgeManager/bridgeViewController.java
+++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/bridgeManager/bridgeViewController.java
@@ -89,8 +89,8 @@ class bridgeViewController
helperMethod.hideKeyboard(mContext);
mCustomPort.clearFocus();
- mCustomPort.animate().setDuration(p_duration).alpha(0.2f);
- mBridgeButton.animate().setDuration(p_duration).alpha(0.2f);
+ mCustomPort.animate().setDuration(p_duration).alpha(0.35f);
+ mBridgeButton.animate().setDuration(p_duration).alpha(0.35f);
mCustomBridgeBlocker.setVisibility(View.VISIBLE);
}
@@ -102,17 +102,23 @@ class bridgeViewController
mBridgeObfs.setHighlightColor(Color.BLACK);
mBridgeObfs.setButtonTintList(ColorStateList.valueOf(ContextCompat.getColor(mContext, R.color.c_radio_tint)));
mBridgeObfs.setChecked(true);
+ mBridgeChina.setChecked(false);
+ mBridgeCustom.setChecked(false);
break;
case strings.BRIDGE_CUSTOM_BRIDGE_MEEK:
animateColor(mBridgeChina, mBridgeChina.getCurrentTextColor(), mContext.getResources().getColor(R.color.c_text_v1), "textColor", p_duration);
mBridgeChina.setHighlightColor(Color.BLACK);
mBridgeChina.setButtonTintList(ColorStateList.valueOf(ContextCompat.getColor(mContext, R.color.c_radio_tint)));
+ mBridgeObfs.setChecked(false);
mBridgeChina.setChecked(true);
+ mBridgeCustom.setChecked(false);
break;
case strings.BRIDGE_CUSTOM_BRIDGE_CUSTOM:
animateColor(mBridgeCustom, mBridgeCustom.getCurrentTextColor(), mContext.getResources().getColor(R.color.c_text_v1), "textColor", p_duration);
mBridgeCustom.setHighlightColor(Color.BLACK);
mBridgeCustom.setButtonTintList(ColorStateList.valueOf(ContextCompat.getColor(mContext, R.color.c_radio_tint)));
+ mBridgeObfs.setChecked(false);
+ mBridgeChina.setChecked(false);
mBridgeCustom.setChecked(true);
mCustomPort.animate().setDuration(p_duration).alpha(1f);
diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/databaseManager/databaseController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/databaseManager/databaseController.java
index 9a3200b5..12b960dd 100755
--- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/databaseManager/databaseController.java
+++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/databaseManager/databaseController.java
@@ -1,19 +1,20 @@
package com.darkweb.genesissearchengine.appManager.databaseManager;
+import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
-import android.database.sqlite.SQLiteException;
import androidx.appcompat.app.AppCompatActivity;
-
+import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkRowModel;
import com.darkweb.genesissearchengine.appManager.historyManager.historyRowModel;
+import com.darkweb.genesissearchengine.appManager.homeManager.geckoSession;
+import com.darkweb.genesissearchengine.appManager.tabManager.tabRowModel;
import com.darkweb.genesissearchengine.constants.constants;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
-
import static android.content.Context.MODE_PRIVATE;
public class databaseController
@@ -43,6 +44,7 @@ public class databaseController
mDatabaseInstance.execSQL("CREATE TABLE IF NOT EXISTS " + "history" + " (id INT(4) PRIMARY KEY,date DATETIME,url VARCHAR,title VARCHAR);");
mDatabaseInstance.execSQL("CREATE TABLE IF NOT EXISTS " + "bookmark" + " (id INT(4) PRIMARY KEY,title VARCHAR,url VARCHAR);");
+ mDatabaseInstance.execSQL("CREATE TABLE IF NOT EXISTS " + "tab" + " (mid INT(4) PRIMARY KEY,date,title VARCHAR,url VARCHAR,mThumbnail BLOB);");
}
catch (Exception ex)
@@ -54,6 +56,7 @@ public class databaseController
/*Helper Methods*/
+
public void execSQL(String query,String[] params)
{
if(params==null)
@@ -66,6 +69,14 @@ public class databaseController
}
}
+ public void execTab(String query, ContentValues params,String pID)
+ {
+ if(params!=null)
+ {
+ mDatabaseInstance.update(query, params, "mid = ?", new String[]{pID});
+ }
+ }
+
public ArrayList selectHistory(int startIndex,int endIndex){
ArrayList tempmodel = new ArrayList<>();
@@ -91,6 +102,24 @@ public class databaseController
return tempmodel;
}
+ public ArrayList selectTabs(){
+ ArrayList mTempListModel = new ArrayList<>();
+
+ Cursor c = mDatabaseInstance.rawQuery("SELECT * FROM tab ORDER BY date DESC", null);
+ if (c.moveToFirst()){
+ do {
+ geckoSession mSession = activityContextManager.getInstance().getHomeController().onNewTabInit();
+ tabRowModel model = new tabRowModel(c.getString(0), c.getString(1),c.getBlob(4));
+ model.setSession(mSession, c.getString(2),c.getString(3));
+ model.getSession().setSessionID(model.getmId());
+ mTempListModel.add(model);
+ } while(c.moveToNext());
+ }
+ c.close();
+
+ return mTempListModel;
+ }
+
public int getLargestHistoryID(){
int id = 0;
Cursor c = mDatabaseInstance.rawQuery("SELECT max(id) FROM history", null);
diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/helpManager/helpController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/helpManager/helpController.java
new file mode 100644
index 00000000..fccda916
--- /dev/null
+++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/helpManager/helpController.java
@@ -0,0 +1,61 @@
+package com.darkweb.genesissearchengine.appManager.helpManager;
+
+
+import android.os.Bundle;
+import android.view.View;
+import androidx.appcompat.app.AppCompatActivity;
+
+import com.darkweb.genesissearchengine.constants.constants;
+import com.darkweb.genesissearchengine.helperManager.eventObserver;
+import com.darkweb.genesissearchengine.helperManager.helperMethod;
+import com.darkweb.genesissearchengine.pluginManager.pluginController;
+import com.example.myapplication.R;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Locale;
+
+@SuppressWarnings("FieldCanBeLocal")
+public class helpController extends AppCompatActivity {
+
+ /*Initializations*/
+ private helpViewController mHelpViewController;
+ private helpModel mHelpModel;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ pluginController.getInstance().onCreate(this);
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.help_view);
+
+ initializeAppModel();
+ initializeConnections();
+ }
+
+ public void initializeAppModel()
+ {
+ mHelpViewController = new helpViewController();
+ mHelpModel = new helpModel();
+ }
+
+ public void initializeConnections()
+ {
+ mHelpViewController.initialization(new helpViewCallback(),this);
+ }
+
+ public class helpViewCallback implements eventObserver.eventListener{
+
+ @Override
+ public Object invokeObserver(List