mirror of https://github.com/LeOS-GSI/LeOS-Genesis
parent
d3529cfe11
commit
1c5282f031
|
@ -6,6 +6,7 @@
|
||||||
<inspection_tool class="BooleanMethodIsAlwaysInverted" enabled="false" level="WARNING" enabled_by_default="false" />
|
<inspection_tool class="BooleanMethodIsAlwaysInverted" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
<inspection_tool class="BusyWait" enabled="false" level="WARNING" enabled_by_default="false" />
|
<inspection_tool class="BusyWait" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
<inspection_tool class="CollectionAddAllCanBeReplacedWithConstructor" enabled="false" level="WARNING" enabled_by_default="false" />
|
<inspection_tool class="CollectionAddAllCanBeReplacedWithConstructor" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="Deprecation" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
<inspection_tool class="DifferentKotlinGradleVersion" enabled="false" level="WARNING" enabled_by_default="false" />
|
<inspection_tool class="DifferentKotlinGradleVersion" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
<inspection_tool class="EmptyStatementBody" enabled="false" level="WARNING" enabled_by_default="false">
|
<inspection_tool class="EmptyStatementBody" enabled="false" level="WARNING" enabled_by_default="false">
|
||||||
<option name="m_reportEmptyBlocks" value="true" />
|
<option name="m_reportEmptyBlocks" value="true" />
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
|
import com.android.build.OutputFile
|
||||||
|
|
||||||
apply from: 'variables.gradle'
|
apply from: 'variables.gradle'
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
apply plugin: 'maven-publish'
|
apply plugin: 'maven-publish'
|
||||||
apply plugin: 'com.google.gms.google-services'
|
apply plugin: 'com.google.gms.google-services'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
|
|
||||||
import com.android.build.OutputFile
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
compileSdkVersion project.ext.compile_sdk_version
|
compileSdkVersion project.ext.compile_sdk_version
|
||||||
|
|
|
@ -209,7 +209,7 @@
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:stopWithTask="true" />
|
android:stopWithTask="true" />
|
||||||
<service
|
<service
|
||||||
android:name="com.darkweb.genesissearchengine.helperManager.OnClearFromRecentService"
|
android:name="com.darkweb.genesissearchengine.helperManager.clearAllRecentServices"
|
||||||
android:stopWithTask="true" />
|
android:stopWithTask="true" />
|
||||||
|
|
||||||
<receiver android:name="com.darkweb.genesissearchengine.helperManager.userEngagementNotification" />
|
<receiver android:name="com.darkweb.genesissearchengine.helperManager.userEngagementNotification" />
|
||||||
|
|
|
@ -3,7 +3,6 @@ package com.darkweb.genesissearchengine.appManager.bookmarkManager;
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.BitmapFactory;
|
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
|
@ -16,15 +15,12 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import com.darkweb.genesissearchengine.constants.enums;
|
import com.darkweb.genesissearchengine.constants.enums;
|
||||||
import com.darkweb.genesissearchengine.constants.strings;
|
import com.darkweb.genesissearchengine.constants.strings;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
|
||||||
import java.io.ByteArrayOutputStream;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Calendar;
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -23,7 +23,6 @@ import androidx.recyclerview.widget.ItemTouchHelper;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
import com.darkweb.genesissearchengine.appManager.historyManager.historyEnums;
|
|
||||||
import com.darkweb.genesissearchengine.databaseManager.databaseController;
|
import com.darkweb.genesissearchengine.databaseManager.databaseController;
|
||||||
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.editTextManager;
|
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.editTextManager;
|
||||||
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
|
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
|
||||||
|
@ -34,7 +33,7 @@ import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.constants.strings;
|
import com.darkweb.genesissearchengine.constants.strings;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
import com.darkweb.genesissearchengine.dataManager.dataController;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.darkweb.genesissearchengine.helperManager.theme;
|
import com.darkweb.genesissearchengine.helperManager.theme;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
||||||
|
|
|
@ -19,7 +19,7 @@ import com.darkweb.genesissearchengine.constants.keys;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
import com.darkweb.genesissearchengine.dataManager.dataController;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.darkweb.genesissearchengine.helperManager.theme;
|
import com.darkweb.genesissearchengine.helperManager.theme;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
||||||
|
|
|
@ -3,17 +3,14 @@ package com.darkweb.genesissearchengine.appManager.bridgeManager;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
import com.darkweb.genesissearchengine.constants.constants;
|
||||||
import com.darkweb.genesissearchengine.constants.enums;
|
|
||||||
import com.darkweb.genesissearchengine.constants.keys;
|
import com.darkweb.genesissearchengine.constants.keys;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.constants.strings;
|
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
import com.darkweb.genesissearchengine.dataManager.dataController;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static com.darkweb.genesissearchengine.constants.strings.BRIDGE_CUSTOM_BRIDGE_MEEK;
|
import static com.darkweb.genesissearchengine.constants.strings.BRIDGE_CUSTOM_BRIDGE_MEEK;
|
||||||
|
|
|
@ -6,7 +6,7 @@ import android.view.KeyEvent;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import com.darkweb.genesissearchengine.constants.enums;
|
import com.darkweb.genesissearchengine.constants.enums;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
|
|
||||||
public class editViewController extends androidx.appcompat.widget.AppCompatAutoCompleteTextView {
|
public class editViewController extends androidx.appcompat.widget.AppCompatAutoCompleteTextView {
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
import com.darkweb.genesissearchengine.constants.constants;
|
||||||
import com.darkweb.genesissearchengine.constants.enums;
|
import com.darkweb.genesissearchengine.constants.enums;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.darkweb.genesissearchengine.helperManager.theme;
|
import com.darkweb.genesissearchengine.helperManager.theme;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
||||||
|
|
|
@ -5,11 +5,10 @@ import com.android.volley.Request;
|
||||||
import com.android.volley.RequestQueue;
|
import com.android.volley.RequestQueue;
|
||||||
import com.android.volley.toolbox.StringRequest;
|
import com.android.volley.toolbox.StringRequest;
|
||||||
import com.android.volley.toolbox.Volley;
|
import com.android.volley.toolbox.Volley;
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
import com.darkweb.genesissearchengine.dataManager.dataController;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
|
@ -5,7 +5,6 @@ import android.view.View;
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.LinearLayout;
|
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
@ -14,9 +13,7 @@ import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.appManager.orbotLogManager.orbotLogEnums;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -3,8 +3,6 @@ package com.darkweb.genesissearchengine.appManager.historyManager;
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.graphics.Bitmap;
|
|
||||||
import android.graphics.BitmapFactory;
|
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
@ -20,12 +18,10 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.constants.enums;
|
import com.darkweb.genesissearchengine.constants.enums;
|
||||||
import com.darkweb.genesissearchengine.constants.strings;
|
import com.darkweb.genesissearchengine.constants.strings;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
|
||||||
import java.io.ByteArrayOutputStream;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
|
|
@ -34,7 +34,7 @@ import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.constants.strings;
|
import com.darkweb.genesissearchengine.constants.strings;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
import com.darkweb.genesissearchengine.dataManager.dataController;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.darkweb.genesissearchengine.helperManager.theme;
|
import com.darkweb.genesissearchengine.helperManager.theme;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
||||||
|
|
|
@ -7,7 +7,7 @@ import android.util.AttributeSet;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import org.mozilla.geckoview.GeckoView;
|
import org.mozilla.geckoview.GeckoView;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ import com.darkweb.genesissearchengine.appManager.kotlinHelperLibraries.BrowserI
|
||||||
import com.darkweb.genesissearchengine.constants.*;
|
import com.darkweb.genesissearchengine.constants.*;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
import com.darkweb.genesissearchengine.dataManager.dataController;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
|
@ -10,8 +10,8 @@ import androidx.core.app.ActivityCompat;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import com.darkweb.genesissearchengine.constants.enums;
|
import com.darkweb.genesissearchengine.constants.enums;
|
||||||
import com.darkweb.genesissearchengine.constants.strings;
|
import com.darkweb.genesissearchengine.constants.strings;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import org.mozilla.geckoview.GeckoSession;
|
|
||||||
import org.mozilla.geckoview.WebResponse;
|
import org.mozilla.geckoview.WebResponse;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
|
@ -32,23 +32,14 @@ import android.widget.ScrollView;
|
||||||
import android.widget.Spinner;
|
import android.widget.Spinner;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.TimePicker;
|
import android.widget.TimePicker;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.annotation.UiThread;
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import com.darkweb.genesissearchengine.helperManager.PathUtil;
|
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
|
||||||
import com.example.myapplication.R;
|
|
||||||
|
|
||||||
import java.lang.ref.WeakReference;
|
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.mozilla.geckoview.AllowOrDeny;
|
import org.mozilla.geckoview.AllowOrDeny;
|
||||||
import org.mozilla.geckoview.GeckoResult;
|
import org.mozilla.geckoview.GeckoResult;
|
||||||
import org.mozilla.geckoview.GeckoSession;
|
import org.mozilla.geckoview.GeckoSession;
|
||||||
|
|
|
@ -29,18 +29,14 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.core.app.NotificationCompat;
|
import androidx.core.app.NotificationCompat;
|
||||||
import androidx.core.content.FileProvider;
|
import androidx.core.content.FileProvider;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
import com.darkweb.genesissearchengine.constants.constants;
|
||||||
import com.darkweb.genesissearchengine.constants.enums;
|
import com.darkweb.genesissearchengine.constants.enums;
|
||||||
import com.darkweb.genesissearchengine.constants.keys;
|
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.constants.strings;
|
import com.darkweb.genesissearchengine.constants.strings;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
||||||
import com.darkweb.genesissearchengine.helperManager.JavaScriptInterface;
|
import com.darkweb.genesissearchengine.helperManager.internalFileDownloadManager;
|
||||||
import com.darkweb.genesissearchengine.helperManager.downloadFileService;
|
import com.darkweb.genesissearchengine.helperManager.downloadFileService;
|
||||||
import com.darkweb.genesissearchengine.helperManager.errorHandler;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.darkweb.genesissearchengine.helperManager.trueTime;
|
import com.darkweb.genesissearchengine.helperManager.trueTime;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
|
@ -56,6 +52,7 @@ import org.mozilla.geckoview.WebRequestError;
|
||||||
import org.mozilla.geckoview.WebResponse;
|
import org.mozilla.geckoview.WebResponse;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
|
@ -65,6 +62,9 @@ import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import javax.crypto.spec.SecretKeySpec;
|
import javax.crypto.spec.SecretKeySpec;
|
||||||
|
|
||||||
|
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_ERROR_CACHED;
|
||||||
|
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_ERROR_CACHED_DARK;
|
||||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_HELP_URL_CACHE;
|
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_HELP_URL_CACHE;
|
||||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_HELP_URL_CACHE_DARK;
|
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_HELP_URL_CACHE_DARK;
|
||||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_URL_CACHED;
|
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_URL_CACHED;
|
||||||
|
@ -528,12 +528,24 @@ public class geckoSession extends GeckoSession implements GeckoSession.MediaDele
|
||||||
|
|
||||||
public GeckoResult<String> onLoadError(@NonNull GeckoSession var1, @Nullable String var2, WebRequestError var3) {
|
public GeckoResult<String> onLoadError(@NonNull GeckoSession var1, @Nullable String var2, WebRequestError var3) {
|
||||||
if(status.sSettingIsAppStarted){
|
if(status.sSettingIsAppStarted){
|
||||||
errorHandler handler = new errorHandler();
|
pageErrorHandler handler = new pageErrorHandler();
|
||||||
mProgress = 0;
|
mProgress = 0;
|
||||||
mPreviousErrorPage = true;
|
mPreviousErrorPage = true;
|
||||||
event.invokeObserver(Arrays.asList(var2,mSessionID), enums.etype.on_load_error);
|
event.invokeObserver(Arrays.asList(var2,mSessionID), enums.etype.on_load_error);
|
||||||
event.invokeObserver(Arrays.asList(mCurrentURL,mSessionID,mCurrentTitle, mTheme), enums.etype.ON_UPDATE_THEME);
|
event.invokeObserver(Arrays.asList(mCurrentURL,mSessionID,mCurrentTitle, mTheme), enums.etype.ON_UPDATE_THEME);
|
||||||
return GeckoResult.fromValue("data:text/html," + handler.createErrorPage(var3.category, var3.code,mContext.get(),var2));
|
|
||||||
|
InputStream mResourceURL = null;
|
||||||
|
try {
|
||||||
|
if(status.sTheme == enums.Theme.THEME_LIGHT || helperMethod.isDayMode(mContext.get())){
|
||||||
|
mResourceURL = mContext.get().getResources().getAssets().open(CONST_GENESIS_ERROR_CACHED);
|
||||||
|
}else {
|
||||||
|
mResourceURL = mContext.get().getResources().getAssets().open(CONST_GENESIS_ERROR_CACHED_DARK);
|
||||||
|
}
|
||||||
|
}catch (Exception ignored){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return GeckoResult.fromValue("data:text/html," + handler.loadErrorPage(var3.category, var3.code,mContext.get(),var2, mResourceURL));
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -763,7 +775,7 @@ public class geckoSession extends GeckoSession implements GeckoSession.MediaDele
|
||||||
String filename;
|
String filename;
|
||||||
|
|
||||||
if(url.startsWith("blob")){
|
if(url.startsWith("blob")){
|
||||||
loadUri(JavaScriptInterface.getBase64StringFromBlobUrl(url));
|
loadUri(internalFileDownloadManager.getBase64StringFromBlobUrl(url));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,43 +1,28 @@
|
||||||
package com.darkweb.genesissearchengine.helperManager;
|
package com.darkweb.genesissearchengine.appManager.homeManager.geckoManager;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
|
||||||
import com.darkweb.genesissearchengine.constants.enums;
|
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
|
||||||
import com.darkweb.genesissearchengine.constants.strings;
|
import com.darkweb.genesissearchengine.constants.strings;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
|
|
||||||
import org.mozilla.geckoview.WebRequestError;
|
import org.mozilla.geckoview.WebRequestError;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
|
|
||||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_ERROR_CACHED;
|
public class pageErrorHandler
|
||||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_ERROR_CACHED_DARK;
|
|
||||||
|
|
||||||
public class errorHandler
|
|
||||||
{
|
{
|
||||||
private AppCompatActivity mContext;
|
private AppCompatActivity mContext;
|
||||||
private String mErrorTemplate;
|
private String mErrorTemplate;
|
||||||
public String createErrorPage(final int category, final int error,AppCompatActivity mContext,String url) {
|
|
||||||
this.mContext = mContext;
|
|
||||||
if (mErrorTemplate == null) {
|
|
||||||
InputStream stream = null;
|
|
||||||
BufferedReader reader = null;
|
|
||||||
StringBuilder builder = new StringBuilder();
|
|
||||||
try {
|
|
||||||
if(status.sTheme == enums.Theme.THEME_LIGHT || helperMethod.isDayMode(mContext)){
|
|
||||||
stream = mContext.getResources().getAssets().open(CONST_GENESIS_ERROR_CACHED);
|
|
||||||
}else {
|
|
||||||
stream = mContext.getResources().getAssets().open(CONST_GENESIS_ERROR_CACHED_DARK);
|
|
||||||
}
|
|
||||||
|
|
||||||
reader = new BufferedReader(new InputStreamReader(stream));
|
public String loadErrorPage(final int category, final int error, AppCompatActivity mContext, String url, InputStream mResourceURL) {
|
||||||
|
this.mContext = mContext;
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (mErrorTemplate == null) {
|
||||||
|
StringBuilder builder = new StringBuilder();
|
||||||
|
InputStream stream = mResourceURL;
|
||||||
|
BufferedReader reader = new BufferedReader(new InputStreamReader(stream));
|
||||||
|
|
||||||
String line;
|
String line;
|
||||||
while ((line = reader.readLine()) != null) {
|
while ((line = reader.readLine()) != null) {
|
||||||
|
@ -46,23 +31,6 @@ public class errorHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
mErrorTemplate = builder.toString();
|
mErrorTemplate = builder.toString();
|
||||||
} catch (IOException e) {
|
|
||||||
return null;
|
|
||||||
} finally {
|
|
||||||
if (stream != null) {
|
|
||||||
try {
|
|
||||||
stream.close();
|
|
||||||
} catch (IOException e) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (reader != null) {
|
|
||||||
try {
|
|
||||||
reader.close();
|
|
||||||
} catch (IOException ignored) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
String title = helperMethod.getHost(url);
|
String title = helperMethod.getHost(url);
|
||||||
|
|
||||||
|
@ -74,14 +42,35 @@ public class errorHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
String replaceUrl = errorToString(error).replace("$URL",url);
|
String replaceUrl = errorToString(error).replace("$URL",url);
|
||||||
// String replaceUrl = errorToString(error).replace("$URL",url);
|
String errorPage = createErrorPage("CODE : " + categoryToString(category) + " <br>TYPE : " + replaceUrl.replace("$TITLE",title),url,mResourceURL);
|
||||||
// if(replaceUrl==null){
|
|
||||||
// replaceUrl = "Hidden Error";
|
|
||||||
// }
|
|
||||||
|
|
||||||
String errorPage = createErrorPage("CODE : " + categoryToString(category) + " <br>TYPE : " + replaceUrl.replace("$TITLE",title),url);
|
|
||||||
errorPage = translateMessage(errorPage,"CODE : " + categoryToString(category));
|
errorPage = translateMessage(errorPage,"CODE : " + categoryToString(category));
|
||||||
return errorPage;
|
return errorPage;
|
||||||
|
}catch (Exception ex){
|
||||||
|
return strings.GENERIC_EMPTY_STR;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private String createErrorPage(final String error, String url, InputStream mResourceURL) throws IOException {
|
||||||
|
if(error==null){
|
||||||
|
return strings.GENERIC_EMPTY_STR;
|
||||||
|
}
|
||||||
|
|
||||||
|
StringBuilder builder = new StringBuilder();
|
||||||
|
InputStream stream = mResourceURL;
|
||||||
|
BufferedReader reader = new BufferedReader(new InputStreamReader(stream));
|
||||||
|
|
||||||
|
String line;
|
||||||
|
while ((line = reader.readLine()) != null) {
|
||||||
|
builder.append(line);
|
||||||
|
builder.append("\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
mErrorTemplate = builder.toString();
|
||||||
|
|
||||||
|
String replaceUrl = mErrorTemplate.replace("$URL",url);
|
||||||
|
|
||||||
|
return replaceUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String translateMessage(String message,String error){
|
private String translateMessage(String message,String error){
|
||||||
|
@ -176,51 +165,5 @@ public class errorHandler
|
||||||
return "UNKNOWN";
|
return "UNKNOWN";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private String createErrorPage(final String error,String url) {
|
|
||||||
if(error==null){
|
|
||||||
return strings.GENERIC_EMPTY_STR;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mErrorTemplate == null) {
|
|
||||||
InputStream stream = null;
|
|
||||||
BufferedReader reader = null;
|
|
||||||
StringBuilder builder = new StringBuilder();
|
|
||||||
try {
|
|
||||||
if(status.sTheme == enums.Theme.THEME_LIGHT || helperMethod.isDayMode(mContext)){
|
|
||||||
stream = mContext.getResources().getAssets().open(CONST_GENESIS_ERROR_CACHED);
|
|
||||||
}else {
|
|
||||||
stream = mContext.getResources().getAssets().open(CONST_GENESIS_ERROR_CACHED_DARK);
|
|
||||||
}
|
|
||||||
reader = new BufferedReader(new InputStreamReader(stream));
|
|
||||||
|
|
||||||
String line;
|
|
||||||
while ((line = reader.readLine()) != null) {
|
|
||||||
builder.append(line);
|
|
||||||
builder.append("\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
mErrorTemplate = builder.toString();
|
|
||||||
} catch (IOException e) {
|
|
||||||
return null;
|
|
||||||
} finally {
|
|
||||||
if (stream != null) {
|
|
||||||
try {
|
|
||||||
stream.close();
|
|
||||||
} catch (IOException e) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (reader != null) {
|
|
||||||
try {
|
|
||||||
reader.close();
|
|
||||||
} catch (IOException e) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
String replaceUrl = mErrorTemplate.replace("$URL",url);
|
|
||||||
|
|
||||||
return replaceUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -3,8 +3,6 @@ package com.darkweb.genesissearchengine.appManager.homeManager.hintManager;
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.content.res.ColorStateList;
|
import android.content.res.ColorStateList;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.graphics.Bitmap;
|
|
||||||
import android.graphics.BitmapFactory;
|
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
@ -19,21 +17,15 @@ import android.widget.TextView;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import androidx.room.Ignore;
|
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.appManager.historyManager.historyRowModel;
|
import com.darkweb.genesissearchengine.appManager.historyManager.historyRowModel;
|
||||||
import com.darkweb.genesissearchengine.appManager.tabManager.tabEnums;
|
import com.darkweb.genesissearchengine.appManager.tabManager.tabEnums;
|
||||||
import com.darkweb.genesissearchengine.constants.enums;
|
import com.darkweb.genesissearchengine.constants.enums;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
|
||||||
import com.darkweb.genesissearchengine.constants.strings;
|
import com.darkweb.genesissearchengine.constants.strings;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
|
||||||
import java.io.ByteArrayOutputStream;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
|
@ -8,7 +8,7 @@ import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.constants.enums;
|
import com.darkweb.genesissearchengine.constants.enums;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
|
|
||||||
public class editTextManager extends androidx.appcompat.widget.AppCompatAutoCompleteTextView {
|
public class editTextManager extends androidx.appcompat.widget.AppCompatAutoCompleteTextView {
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@ import android.view.View;
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.view.inputmethod.EditorInfo;
|
import android.view.inputmethod.EditorInfo;
|
||||||
import android.view.inputmethod.InputMethodManager;
|
|
||||||
import android.webkit.URLUtil;
|
import android.webkit.URLUtil;
|
||||||
import android.widget.*;
|
import android.widget.*;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
@ -68,9 +67,9 @@ import com.darkweb.genesissearchengine.constants.strings;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
import com.darkweb.genesissearchengine.dataManager.dataController;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
||||||
import com.darkweb.genesissearchengine.helperManager.KeyboardUtils;
|
import com.darkweb.genesissearchengine.helperManager.KeyboardUtils;
|
||||||
import com.darkweb.genesissearchengine.helperManager.OnClearFromRecentService;
|
import com.darkweb.genesissearchengine.helperManager.clearAllRecentServices;
|
||||||
import com.darkweb.genesissearchengine.helperManager.SimpleGestureFilter;
|
import com.darkweb.genesissearchengine.helperManager.SimpleGestureFilter;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.darkweb.genesissearchengine.helperManager.theme;
|
import com.darkweb.genesissearchengine.helperManager.theme;
|
||||||
import com.darkweb.genesissearchengine.helperManager.trueTime;
|
import com.darkweb.genesissearchengine.helperManager.trueTime;
|
||||||
|
@ -480,6 +479,10 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
|
|
||||||
public void initPreFixes() {
|
public void initPreFixes() {
|
||||||
try {
|
try {
|
||||||
|
if(!status.mThemeApplying){
|
||||||
|
orbotLocalConstants.mTorLogsStatus = strings.GENERIC_EMPTY_STR;
|
||||||
|
}
|
||||||
|
|
||||||
Class clazz = Class.forName("java.lang.Daemons$FinalizerWatchdogDaemon");
|
Class clazz = Class.forName("java.lang.Daemons$FinalizerWatchdogDaemon");
|
||||||
|
|
||||||
Method method = Objects.requireNonNull(clazz.getSuperclass()).getDeclaredMethod("stop");
|
Method method = Objects.requireNonNull(clazz.getSuperclass()).getDeclaredMethod("stop");
|
||||||
|
@ -758,7 +761,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
@SuppressLint("ClickableViewAccessibility")
|
@SuppressLint("ClickableViewAccessibility")
|
||||||
private void initializeLocalEventHandlers() {
|
private void initializeLocalEventHandlers() {
|
||||||
|
|
||||||
startService(new Intent(getBaseContext(), OnClearFromRecentService.class));
|
startService(new Intent(getBaseContext(), clearAllRecentServices.class));
|
||||||
|
|
||||||
registerReceiver(downloadStatus,new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
|
registerReceiver(downloadStatus,new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,6 @@ import android.graphics.drawable.GradientDrawable;
|
||||||
import android.graphics.drawable.InsetDrawable;
|
import android.graphics.drawable.InsetDrawable;
|
||||||
import android.graphics.drawable.StateListDrawable;
|
import android.graphics.drawable.StateListDrawable;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Debug;
|
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.text.method.MovementMethod;
|
import android.text.method.MovementMethod;
|
||||||
|
@ -42,8 +41,8 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||||
import com.darkweb.genesissearchengine.constants.*;
|
import com.darkweb.genesissearchengine.constants.*;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
import com.darkweb.genesissearchengine.dataManager.dataController;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
||||||
import com.darkweb.genesissearchengine.helperManager.animatedColor;
|
import com.darkweb.genesissearchengine.helperManager.colorAnimationReciever;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.darkweb.genesissearchengine.widget.progressBar.AnimatedProgressBar;
|
import com.darkweb.genesissearchengine.widget.progressBar.AnimatedProgressBar;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
|
@ -57,9 +56,6 @@ import java.util.List;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
import static android.content.Context.LAYOUT_INFLATER_SERVICE;
|
import static android.content.Context.LAYOUT_INFLATER_SERVICE;
|
||||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_DOMAIN_URL;
|
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_DOMAIN_URL;
|
||||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_HELP_URL;
|
|
||||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_HELP_URL_CACHE;
|
|
||||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_HELP_URL_CACHE_DARK;
|
|
||||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_URL_CACHED;
|
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_URL_CACHED;
|
||||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_URL_CACHED_DARK;
|
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_URL_CACHED_DARK;
|
||||||
import static org.mozilla.geckoview.GeckoSessionSettings.USER_AGENT_MODE_DESKTOP;
|
import static org.mozilla.geckoview.GeckoSessionSettings.USER_AGENT_MODE_DESKTOP;
|
||||||
|
@ -493,7 +489,7 @@ class homeViewController
|
||||||
|
|
||||||
public void initStatusBarColor(boolean mInstant) {
|
public void initStatusBarColor(boolean mInstant) {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||||
animatedColor oneToTwo = new animatedColor(ContextCompat.getColor(mContext, R.color.landing_ease_blue), ContextCompat.getColor(mContext, R.color.green_dark_v2));
|
colorAnimationReciever oneToTwo = new colorAnimationReciever(ContextCompat.getColor(mContext, R.color.landing_ease_blue), ContextCompat.getColor(mContext, R.color.green_dark_v2));
|
||||||
|
|
||||||
int mDelay = 1350;
|
int mDelay = 1350;
|
||||||
if(status.mThemeApplying || mInstant){
|
if(status.mThemeApplying || mInstant){
|
||||||
|
|
|
@ -1,19 +1,11 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.landingManager;
|
package com.darkweb.genesissearchengine.appManager.landingManager;
|
||||||
|
|
||||||
import android.animation.Animator;
|
|
||||||
import android.animation.AnimatorListenerAdapter;
|
|
||||||
import android.animation.ObjectAnimator;
|
|
||||||
import android.animation.ValueAnimator;
|
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.view.View;
|
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import androidx.annotation.RequiresApi;
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.appcompat.app.AppCompatDelegate;
|
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import com.darkweb.genesissearchengine.helperManager.animatedColor;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
|
|
||||||
class landingViewController
|
class landingViewController
|
||||||
|
|
|
@ -14,7 +14,7 @@ import androidx.annotation.NonNull;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
|
@ -14,13 +14,12 @@ import androidx.recyclerview.widget.SimpleItemAnimator;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
import com.darkweb.genesissearchengine.appManager.helpManager.helpController;
|
import com.darkweb.genesissearchengine.appManager.helpManager.helpController;
|
||||||
import com.darkweb.genesissearchengine.appManager.tabManager.tabController;
|
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
import com.darkweb.genesissearchengine.constants.constants;
|
||||||
import com.darkweb.genesissearchengine.constants.keys;
|
import com.darkweb.genesissearchengine.constants.keys;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
import com.darkweb.genesissearchengine.dataManager.dataController;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.darkweb.genesissearchengine.helperManager.theme;
|
import com.darkweb.genesissearchengine.helperManager.theme;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
||||||
|
|
|
@ -4,15 +4,13 @@ import android.os.Build;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.widget.Button;
|
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.appcompat.app.AppCompatDelegate;
|
import androidx.appcompat.app.AppCompatDelegate;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
class languageViewController
|
class languageViewController
|
||||||
|
|
|
@ -10,10 +10,10 @@ import android.widget.TextView;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
import com.darkweb.genesissearchengine.appManager.tabManager.tabEnums;
|
import com.darkweb.genesissearchengine.appManager.tabManager.tabEnums;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.constants.constants;
|
||||||
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
import org.torproject.android.service.wrapper.logRowModel;
|
import org.torproject.android.service.wrapper.logRowModel;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -26,9 +26,9 @@ public class orbotLogAdapter extends RecyclerView.Adapter<orbotLogAdapter.listVi
|
||||||
private ArrayList<logRowModel> mModelList;
|
private ArrayList<logRowModel> mModelList;
|
||||||
private eventObserver.eventListener mEvent;
|
private eventObserver.eventListener mEvent;
|
||||||
|
|
||||||
orbotLogAdapter(ArrayList<logRowModel> model_list, eventObserver.eventListener event) {
|
orbotLogAdapter(ArrayList<logRowModel> pModelList, eventObserver.eventListener pEvent) {
|
||||||
this.mModelList = model_list;
|
this.mModelList = pModelList;
|
||||||
this.mEvent = event;
|
this.mEvent = pEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull @Override
|
@NonNull @Override
|
||||||
|
@ -71,12 +71,13 @@ public class orbotLogAdapter extends RecyclerView.Adapter<orbotLogAdapter.listVi
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://duckduckgo.com/?q=tor logs " + mHeader.getText()));
|
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(constants.CONST_LOG_DUCKDUCK + mHeader.getText()));
|
||||||
intent.putExtra(SearchManager.QUERY, mDescription.getText());
|
intent.putExtra(SearchManager.QUERY, mDescription.getText());
|
||||||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||||
activityContextManager.getInstance().getHomeController().startActivity(intent);
|
activityContextManager.getInstance().getHomeController().startActivity(intent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object onTrigger(tabEnums.eTabAdapterCommands pCommands, List<Object> pData){
|
public Object onTrigger(tabEnums.eTabAdapterCommands pCommands, List<Object> pData){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,23 +1,25 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.orbotLogManager;
|
package com.darkweb.genesissearchengine.appManager.orbotLogManager;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.GestureDetector;
|
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.view.ViewTreeObserver;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.RequiresApi;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.core.widget.NestedScrollView;
|
import androidx.core.widget.NestedScrollView;
|
||||||
|
import androidx.recyclerview.widget.DefaultItemAnimator;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
import com.darkweb.genesissearchengine.appManager.settingManager.logManager.settingLogController;
|
import com.darkweb.genesissearchengine.appManager.settingManager.logManager.settingLogController;
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
import com.darkweb.genesissearchengine.constants.constants;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.helperManager.SimpleGestureFilter;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.darkweb.genesissearchengine.helperManager.theme;
|
import com.darkweb.genesissearchengine.helperManager.theme;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
||||||
|
@ -27,38 +29,46 @@ import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||||
import org.torproject.android.service.wrapper.orbotLocalConstants;
|
import org.torproject.android.service.wrapper.orbotLocalConstants;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import static com.darkweb.genesissearchengine.appManager.orbotLogManager.orbotLogEnums.eOrbotLogViewCommands.M_SCROLL_THEME_UPDATE;
|
||||||
|
|
||||||
|
|
||||||
public class orbotLogController extends AppCompatActivity {
|
public class orbotLogController extends AppCompatActivity {
|
||||||
|
|
||||||
/* PRIVATE VARIABLES */
|
/* PRIVATE VARIABLES */
|
||||||
private orbotLogModel mOrbotModel;
|
|
||||||
private orbotLogViewController mOrbotViewController;
|
|
||||||
private RecyclerView mRecycleView;
|
|
||||||
private orbotLogAdapter mOrbotAdapter;
|
|
||||||
private NestedScrollView mMainScroll;
|
|
||||||
private FloatingActionButton mFloatingScroller;
|
|
||||||
|
|
||||||
private TextView mLogs;
|
private orbotLogModel mOrbotModel;
|
||||||
|
private orbotLogViewController mOrbotLogViewController;
|
||||||
|
private orbotLogAdapter mOrbotAdapter;
|
||||||
private boolean mActivityClosed = false;
|
private boolean mActivityClosed = false;
|
||||||
private int mLogCounter = 0;
|
private int mLogCounter = 0;
|
||||||
private GestureDetector mSwipeDirectionDetector;
|
private boolean mIsRecycleviewInteracting = false;
|
||||||
private boolean mIsLayoutChanging = false;
|
|
||||||
|
/* UI VARIABLES */
|
||||||
|
|
||||||
|
private TextView mLogs;
|
||||||
|
private RecyclerView mLogRecycleView;
|
||||||
|
private NestedScrollView mNestedScrollView;
|
||||||
|
private FloatingActionButton mFloatingScroller;
|
||||||
|
|
||||||
/* INITIALIZATIONS */
|
/* INITIALIZATIONS */
|
||||||
|
|
||||||
|
@RequiresApi(api = Build.VERSION_CODES.M)
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
|
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
|
||||||
overridePendingTransition(R.anim.push_anim_out_reverse, R.anim.push_anim_in_reverse);
|
overridePendingTransition(R.anim.push_anim_out_reverse, R.anim.push_anim_in_reverse);
|
||||||
|
activityContextManager.getInstance().setOrbotLogController(this);
|
||||||
|
activityContextManager.getInstance().onStack(this);
|
||||||
|
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.orbot_log_view);
|
setContentView(R.layout.orbot_log_view);
|
||||||
|
|
||||||
viewsInitializations();
|
initializeViews();
|
||||||
onUpdateLogs();
|
|
||||||
initializeLogs();
|
initializeLogs();
|
||||||
onInitListener();
|
initListener();
|
||||||
|
updateLogs();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -72,22 +82,19 @@ public class orbotLogController extends AppCompatActivity {
|
||||||
super.onConfigurationChanged(newConfig);
|
super.onConfigurationChanged(newConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void viewsInitializations() {
|
public void initializeViews() {
|
||||||
mRecycleView = findViewById(R.id.pLogRecycleView);
|
mLogRecycleView = findViewById(R.id.pLogRecycleView);
|
||||||
mLogs = findViewById(R.id.pLogs);
|
mLogs = findViewById(R.id.pLogs);
|
||||||
mMainScroll = findViewById(R.id.mMainScroll);
|
mNestedScrollView = findViewById(R.id.pNestedScrollView);
|
||||||
mFloatingScroller = findViewById(R.id.pFloatingScroller);
|
mFloatingScroller = findViewById(R.id.pFloatingScroller);
|
||||||
|
|
||||||
activityContextManager.getInstance().setOrbotLogController(this);
|
mOrbotLogViewController = new orbotLogViewController(this, new orbotLogViewCallback() , mLogs, mLogRecycleView, mNestedScrollView, mFloatingScroller);
|
||||||
activityContextManager.getInstance().onStack(this);
|
|
||||||
mOrbotViewController = new orbotLogViewController(this, mLogs, mRecycleView);
|
|
||||||
mOrbotModel = new orbotLogModel();
|
mOrbotModel = new orbotLogModel();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initializeLogs(){
|
public void initializeLogs(){
|
||||||
mLogCounter = 0;
|
mLogCounter = 0;
|
||||||
if(status.sLogListView){
|
if(status.sLogThemeStyleAdvanced){
|
||||||
mLogCounter = orbotLocalConstants.mTorLogsHistory.size();
|
mLogCounter = orbotLocalConstants.mTorLogsHistory.size();
|
||||||
mOrbotModel.setList(orbotLocalConstants.mTorLogsHistory);
|
mOrbotModel.setList(orbotLocalConstants.mTorLogsHistory);
|
||||||
LinearLayoutManager layoutManager = new LinearLayoutManager(orbotLogController.this);
|
LinearLayoutManager layoutManager = new LinearLayoutManager(orbotLogController.this);
|
||||||
|
@ -95,105 +102,116 @@ public class orbotLogController extends AppCompatActivity {
|
||||||
mOrbotAdapter = adapter;
|
mOrbotAdapter = adapter;
|
||||||
layoutManager.setReverseLayout(true);
|
layoutManager.setReverseLayout(true);
|
||||||
|
|
||||||
|
mLogRecycleView.setAdapter(adapter);
|
||||||
|
Objects.requireNonNull(mLogRecycleView.getItemAnimator()).setAddDuration(250);
|
||||||
|
|
||||||
|
mLogRecycleView.setNestedScrollingEnabled(false);
|
||||||
|
mLogRecycleView.setLayoutManager(new LinearLayoutManager(orbotLogController.this));
|
||||||
|
|
||||||
mRecycleView.setNestedScrollingEnabled(false);
|
|
||||||
mRecycleView.setLayoutManager(new LinearLayoutManager(orbotLogController.this));
|
|
||||||
mOrbotAdapter.notifyDataSetChanged();
|
mOrbotAdapter.notifyDataSetChanged();
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
logToString();
|
logToString();
|
||||||
}
|
}
|
||||||
mOrbotViewController.onTrigger(orbotLogEnums.eOrbotLogViewCommands.M_INIT_VIEWS, null);
|
mOrbotLogViewController.onTrigger(orbotLogEnums.eOrbotLogViewCommands.M_INIT_VIEWS, Collections.singletonList(status.sLogThemeStyleAdvanced));
|
||||||
mRecycleView.smoothScrollToPosition(mOrbotModel.getList().size());
|
mLogRecycleView.smoothScrollToPosition(mOrbotModel.getList().size());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* LISTENERS */
|
||||||
|
|
||||||
|
@SuppressLint("ClickableViewAccessibility")
|
||||||
|
private void initListener(){
|
||||||
|
|
||||||
|
mLogRecycleView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||||
|
@SuppressLint("NewApi") @SuppressWarnings("deprecation")
|
||||||
|
@Override
|
||||||
|
public void onGlobalLayout() {
|
||||||
|
if(orbotLogStatus.sScrollPosition!=-1){
|
||||||
|
mNestedScrollView.scrollTo(0, orbotLogStatus.sScrollPosition);
|
||||||
|
}else if(mNestedScrollView.canScrollVertically(1)){
|
||||||
|
onScrollBottom(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) {
|
||||||
|
mNestedScrollView.setOnScrollChangeListener((View.OnScrollChangeListener) (v, scrollX, scrollY, oldScrollX, oldScrollY) -> {
|
||||||
|
orbotLogStatus.sScrollPosition = scrollY;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
mOrbotLogViewController.onTrigger(M_SCROLL_THEME_UPDATE);
|
||||||
|
mLogRecycleView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
mNestedScrollView.setOnTouchListener((v, event) -> {
|
||||||
|
if(mNestedScrollView.canScrollVertically(1)){
|
||||||
|
orbotLogStatus.sUIInteracted = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(event.getAction() == MotionEvent.ACTION_UP){
|
||||||
|
mOrbotLogViewController.onTrigger(M_SCROLL_THEME_UPDATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(event.getAction() == MotionEvent.ACTION_UP){
|
||||||
|
mIsRecycleviewInteracting = false;
|
||||||
|
}else if(event.getAction() == MotionEvent.ACTION_DOWN){
|
||||||
|
mIsRecycleviewInteracting = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
mNestedScrollView.getViewTreeObserver() .addOnScrollChangedListener(() -> {
|
||||||
|
if (mNestedScrollView.getChildAt(0).getBottom() <= (mNestedScrollView.getHeight() + mNestedScrollView.getScrollY())) {
|
||||||
|
mOrbotLogViewController.onTrigger(M_SCROLL_THEME_UPDATE);
|
||||||
|
|
||||||
|
if(!mIsRecycleviewInteracting){
|
||||||
|
orbotLogStatus.sUIInteracted = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void logToString(){
|
public void logToString(){
|
||||||
for(int mCounter=0;mCounter<orbotLocalConstants.mTorLogsHistory.size();mCounter++){
|
for(int mCounter=0;mCounter<orbotLocalConstants.mTorLogsHistory.size();mCounter++){
|
||||||
mOrbotViewController.onTrigger(orbotLogEnums.eOrbotLogViewCommands.M_UPDATE_LOGS, Collections.singletonList(orbotLocalConstants.mTorLogsHistory.get(mCounter).getLog()));
|
mOrbotLogViewController.onTrigger(orbotLogEnums.eOrbotLogViewCommands.M_UPDATE_LOGS, Collections.singletonList(orbotLocalConstants.mTorLogsHistory.get(mCounter).getLog()));
|
||||||
mLogCounter+=1;
|
mLogCounter+=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* LISTENERS */
|
public void updateLogs(){
|
||||||
|
|
||||||
private void onInitListener(){
|
|
||||||
|
|
||||||
mRecycleView.getViewTreeObserver().addOnGlobalLayoutListener(() -> mIsLayoutChanging = false);
|
|
||||||
|
|
||||||
mMainScroll.getViewTreeObserver().addOnScrollChangedListener(() -> {
|
|
||||||
if(status.sLogListView){
|
|
||||||
if(mMainScroll.canScrollVertically(1)){
|
|
||||||
if(mFloatingScroller.getAlpha()==0){
|
|
||||||
mFloatingScroller.setVisibility(View.VISIBLE);
|
|
||||||
mFloatingScroller.animate().cancel();
|
|
||||||
mFloatingScroller.animate().alpha(1);
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
mFloatingScroller.animate().cancel();
|
|
||||||
mFloatingScroller.animate().alpha(0).withEndAction(() -> mFloatingScroller.setVisibility(View.GONE));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
mSwipeDirectionDetector=new GestureDetector(this,new SimpleGestureFilter(){
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onSwipe(Direction direction) {
|
|
||||||
if (direction==Direction.right){
|
|
||||||
finish();
|
|
||||||
overridePendingTransition(R.anim.push_anim_in, R.anim.push_anim_out);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onUpdateLogs(){
|
|
||||||
|
|
||||||
new Thread(){
|
new Thread(){
|
||||||
public void run(){
|
public void run(){
|
||||||
while (true){
|
while (!mActivityClosed){
|
||||||
try {
|
try {
|
||||||
if(mActivityClosed){
|
if(status.sLogThemeStyleAdvanced){
|
||||||
break;
|
sleep(800);
|
||||||
}
|
|
||||||
boolean mLayoutChangeTemp = mIsLayoutChanging;
|
|
||||||
if(mIsLayoutChanging){
|
|
||||||
if(status.sLogListView){
|
|
||||||
sleep(1000);
|
|
||||||
}else {
|
}else {
|
||||||
sleep(50);
|
sleep(100);
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}else {
|
|
||||||
if(status.sLogListView){
|
|
||||||
sleep(500);
|
|
||||||
}else {
|
|
||||||
sleep(50);
|
|
||||||
}
|
|
||||||
if(mLayoutChangeTemp != mIsLayoutChanging){
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(orbotLocalConstants.mTorLogsHistory.size()>0){
|
if(orbotLocalConstants.mTorLogsHistory.size()>0){
|
||||||
mIsLayoutChanging = true;
|
|
||||||
runOnUiThread(() -> {
|
runOnUiThread(() -> {
|
||||||
if(orbotLocalConstants.mTorLogsHistory.size()>mLogCounter){
|
if(orbotLocalConstants.mTorLogsHistory.size()>mLogCounter){
|
||||||
mOrbotModel.getList().add(orbotLocalConstants.mTorLogsHistory.get(mLogCounter));
|
mOrbotModel.getList().add(orbotLocalConstants.mTorLogsHistory.get(mLogCounter));
|
||||||
if(!status.sLogListView){
|
if(!status.sLogThemeStyleAdvanced){
|
||||||
mOrbotViewController.onTrigger(orbotLogEnums.eOrbotLogViewCommands.M_UPDATE_LOGS, Collections.singletonList(orbotLocalConstants.mTorLogsHistory.get(mLogCounter).getLog()));
|
mOrbotLogViewController.onTrigger(orbotLogEnums.eOrbotLogViewCommands.M_UPDATE_LOGS, Collections.singletonList(orbotLocalConstants.mTorLogsHistory.get(mLogCounter).getLog()));
|
||||||
mIsLayoutChanging = false;
|
|
||||||
onScrollBottom(null);
|
|
||||||
}else {
|
}else {
|
||||||
if(mOrbotAdapter!=null){
|
if(mOrbotAdapter!=null){
|
||||||
mOrbotAdapter.notifyItemInserted(mOrbotModel.getList().size()-1);
|
mOrbotAdapter.notifyItemInserted(mOrbotModel.getList().size()-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else {
|
|
||||||
mIsLayoutChanging = false;
|
|
||||||
}
|
|
||||||
mLogCounter+=1;
|
mLogCounter+=1;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
sleep(100);
|
||||||
|
if(!orbotLogStatus.sUIInteracted){
|
||||||
|
runOnUiThread(() -> {
|
||||||
|
if(orbotLocalConstants.mTorLogsHistory.size()>mLogCounter) {
|
||||||
|
onScrollBottom(null);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
sleep(500);
|
|
||||||
}
|
}
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -203,8 +221,11 @@ public class orbotLogController extends AppCompatActivity {
|
||||||
}.start();
|
}.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* View Callback */
|
||||||
|
|
||||||
public void onScrollBottom(View view) {
|
public void onScrollBottom(View view) {
|
||||||
mMainScroll.fullScroll(View.FOCUS_DOWN);
|
mNestedScrollView.fullScroll(View.FOCUS_DOWN);
|
||||||
|
orbotLogStatus.sUIInteracted = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onOpenInfo(View view) {
|
public void onOpenInfo(View view) {
|
||||||
|
@ -218,12 +239,15 @@ public class orbotLogController extends AppCompatActivity {
|
||||||
mActivityClosed = true;
|
mActivityClosed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* View Callback */
|
||||||
|
|
||||||
|
private class orbotLogViewCallback implements eventObserver.eventListener{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
public Object invokeObserver(List<Object> data, Object e_type)
|
||||||
super.onDestroy();
|
{
|
||||||
activityContextManager.getInstance().onRemoveStack(this);
|
return null;
|
||||||
activityContextManager.getInstance().setOrbotLogController(null);
|
}
|
||||||
mActivityClosed = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Model Callback */
|
/* Model Callback */
|
||||||
|
@ -238,23 +262,13 @@ public class orbotLogController extends AppCompatActivity {
|
||||||
|
|
||||||
/* LOCAL OVERRIDES */
|
/* LOCAL OVERRIDES */
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onStop() {
|
|
||||||
super.onStop();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResume()
|
public void onResume()
|
||||||
{
|
{
|
||||||
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_RESUME);
|
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_RESUME);
|
||||||
activityContextManager.getInstance().setCurrentActivity(this);
|
activityContextManager.getInstance().setCurrentActivity(this);
|
||||||
super.onResume();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
super.onResume();
|
||||||
public void onPause()
|
|
||||||
{
|
|
||||||
super.onPause();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -263,19 +277,20 @@ public class orbotLogController extends AppCompatActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean dispatchTouchEvent(MotionEvent event) {
|
protected void onDestroy() {
|
||||||
if(inSignatureArea(event)){
|
super.onDestroy();
|
||||||
try{
|
activityContextManager.getInstance().onRemoveStack(this);
|
||||||
mSwipeDirectionDetector.onTouchEvent(event);
|
activityContextManager.getInstance().setOrbotLogController(null);
|
||||||
}catch (Exception ignored){ }
|
mActivityClosed = true;
|
||||||
}
|
|
||||||
return super.dispatchTouchEvent(event);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean inSignatureArea(MotionEvent ev) {
|
/* External Calls */
|
||||||
float mEventY = ev.getY();
|
|
||||||
return mEventY>helperMethod.pxFromDp(300) || ev.getX()<helperMethod.pxFromDp(80);
|
public void onRefreshLayoutTheme(){
|
||||||
|
orbotLogStatus.sScrollPosition = 0;
|
||||||
|
orbotLogStatus.sUIInteracted = false;
|
||||||
|
mIsRecycleviewInteracting = false;
|
||||||
|
recreate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -2,11 +2,14 @@ package com.darkweb.genesissearchengine.appManager.orbotLogManager;
|
||||||
|
|
||||||
public class orbotLogEnums
|
public class orbotLogEnums
|
||||||
{
|
{
|
||||||
/*Settings Manager*/
|
/*Orbot Log View Manager*/
|
||||||
|
|
||||||
public enum eOrbotLogViewCommands {
|
public enum eOrbotLogViewCommands {
|
||||||
M_UPDATE_LOGS, M_INIT_VIEWS
|
M_UPDATE_LOGS, M_INIT_VIEWS, M_SCROLL_THEME_UPDATE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*Orbot Log Model Manager*/
|
||||||
|
|
||||||
public enum eOrbotLogModelCommands {
|
public enum eOrbotLogModelCommands {
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -13,11 +13,11 @@ class orbotLogModel
|
||||||
|
|
||||||
/*Helper Methods*/
|
/*Helper Methods*/
|
||||||
|
|
||||||
void setList(ArrayList<logRowModel> model)
|
void setList(ArrayList<logRowModel> pModel)
|
||||||
{
|
{
|
||||||
if(model.size()>0){
|
if(pModel.size()>0){
|
||||||
mModelList.clear();
|
mModelList.clear();
|
||||||
mModelList.addAll(model);
|
mModelList.addAll(pModel);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
mModelList.add(new logRowModel(constants.CONST_LOGS_DEFAULT_MESSAGE, helperMethod.getCurrentTime()));
|
mModelList.add(new logRowModel(constants.CONST_LOGS_DEFAULT_MESSAGE, helperMethod.getCurrentTime()));
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
package com.darkweb.genesissearchengine.appManager.orbotLogManager;
|
||||||
|
|
||||||
|
public class orbotLogStatus {
|
||||||
|
|
||||||
|
public static boolean sUIInteracted = false;
|
||||||
|
public static int sScrollPosition = -1;
|
||||||
|
|
||||||
|
}
|
|
@ -1,16 +1,15 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.orbotLogManager;
|
package com.darkweb.genesissearchengine.appManager.orbotLogManager;
|
||||||
|
|
||||||
import android.os.Build;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.Window;
|
|
||||||
import android.view.WindowManager;
|
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.appcompat.app.AppCompatDelegate;
|
import androidx.core.widget.NestedScrollView;
|
||||||
import androidx.core.content.ContextCompat;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
|
||||||
import com.example.myapplication.R;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
|
import com.darkweb.genesissearchengine.helperManager.sharedUIMethod;
|
||||||
|
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
class orbotLogViewController
|
class orbotLogViewController
|
||||||
|
@ -18,61 +17,77 @@ class orbotLogViewController
|
||||||
/*Private Variables*/
|
/*Private Variables*/
|
||||||
|
|
||||||
private AppCompatActivity mContext;
|
private AppCompatActivity mContext;
|
||||||
|
private eventObserver.eventListener mEvent;
|
||||||
|
|
||||||
private TextView mLogs;
|
private TextView mLogs;
|
||||||
private RecyclerView mRecycleView;
|
private RecyclerView mLogRecycleView;
|
||||||
|
private NestedScrollView mNestedScrollView;
|
||||||
|
private FloatingActionButton mFloatingScroller;
|
||||||
|
|
||||||
/*Initializations*/
|
/*Initializations*/
|
||||||
|
|
||||||
orbotLogViewController(AppCompatActivity pContext, TextView pLogs, RecyclerView pRecycleView)
|
orbotLogViewController(AppCompatActivity pContext, eventObserver.eventListener pEvent, TextView pLogs, RecyclerView pLogRecycleView, NestedScrollView pNestedScrollView, FloatingActionButton pFloatingScroller)
|
||||||
{
|
{
|
||||||
this.mContext = pContext;
|
this.mContext = pContext;
|
||||||
this.mLogs = pLogs;
|
this.mLogs = pLogs;
|
||||||
this.mRecycleView = pRecycleView;
|
this.mLogRecycleView = pLogRecycleView;
|
||||||
|
this.mNestedScrollView = pNestedScrollView;
|
||||||
|
this.mFloatingScroller = pFloatingScroller;
|
||||||
|
this.mEvent = pEvent;
|
||||||
|
|
||||||
initViews();
|
|
||||||
initPostUI();
|
initPostUI();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initViews(){
|
private void initViews(boolean pLogThemeStyleAdvanced){
|
||||||
if(status.sLogListView){
|
if(pLogThemeStyleAdvanced){
|
||||||
mRecycleView.setVisibility(View.VISIBLE);
|
mLogRecycleView.setVisibility(View.VISIBLE);
|
||||||
mLogs.setVisibility(View.GONE);
|
mLogs.setVisibility(View.GONE);
|
||||||
}else {
|
}else {
|
||||||
mRecycleView.setVisibility(View.GONE);
|
mLogRecycleView.setVisibility(View.GONE);
|
||||||
mLogs.setVisibility(View.VISIBLE);
|
mLogs.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*Helper Methods*/
|
||||||
|
|
||||||
private void initPostUI(){
|
private void initPostUI(){
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
sharedUIMethod.updateStatusBar(mContext);
|
||||||
Window window = mContext.getWindow();
|
|
||||||
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
|
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) {
|
|
||||||
window.setStatusBarColor(mContext.getResources().getColor(R.color.blue_dark));
|
|
||||||
mContext.getWindow().setStatusBarColor(ContextCompat.getColor(mContext, R.color.landing_ease_blue));
|
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
if(AppCompatDelegate.getDefaultNightMode() == AppCompatDelegate.MODE_NIGHT_NO){
|
|
||||||
mContext.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
|
||||||
}
|
|
||||||
mContext.getWindow().setStatusBarColor(ContextCompat.getColor(mContext, R.color.c_background));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void onUpdateLogs(String pLogs){
|
private void onUpdateLogs(String pLogs){
|
||||||
pLogs = "~ " + pLogs;
|
pLogs = "~ " + pLogs;
|
||||||
mLogs.setText(String.format("%s%s",mLogs.getText() ,pLogs + "\n\n"));
|
mLogs.setText(String.format("%s%s",mLogs.getText() ,pLogs + "\n\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void onScrollThemeUpdate(){
|
||||||
|
if(mNestedScrollView.canScrollVertically(1)){
|
||||||
|
if(mFloatingScroller.getAlpha()==0){
|
||||||
|
mFloatingScroller.setVisibility(View.VISIBLE);
|
||||||
|
mFloatingScroller.animate().cancel();
|
||||||
|
mFloatingScroller.animate().alpha(1);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
mFloatingScroller.animate().cancel();
|
||||||
|
mFloatingScroller.animate().alpha(0).withEndAction(() -> mFloatingScroller.setVisibility(View.GONE));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*Triggers*/
|
||||||
|
|
||||||
public void onTrigger(orbotLogEnums.eOrbotLogViewCommands pCommands, List<Object> pData){
|
public void onTrigger(orbotLogEnums.eOrbotLogViewCommands pCommands, List<Object> pData){
|
||||||
if(pCommands.equals(orbotLogEnums.eOrbotLogViewCommands.M_UPDATE_LOGS)){
|
if(pCommands.equals(orbotLogEnums.eOrbotLogViewCommands.M_UPDATE_LOGS)){
|
||||||
onUpdateLogs((String) pData.get(0));
|
onUpdateLogs((String) pData.get(0));
|
||||||
}
|
}
|
||||||
else if(pCommands.equals(orbotLogEnums.eOrbotLogViewCommands.M_INIT_VIEWS)){
|
else if(pCommands.equals(orbotLogEnums.eOrbotLogViewCommands.M_INIT_VIEWS)){
|
||||||
initViews();
|
initViews((boolean)pData.get(0));
|
||||||
|
}
|
||||||
|
else if(pCommands.equals(orbotLogEnums.eOrbotLogViewCommands.M_SCROLL_THEME_UPDATE)){
|
||||||
|
onScrollThemeUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onTrigger(orbotLogEnums.eOrbotLogViewCommands pCommands){
|
||||||
|
onTrigger(pCommands, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.orbotManager;
|
package com.darkweb.genesissearchengine.appManager.orbotManager;
|
||||||
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.net.VpnService;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Debug;
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.GestureDetector;
|
import android.view.GestureDetector;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
|
@ -22,7 +19,7 @@ import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
import com.darkweb.genesissearchengine.dataManager.dataController;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
||||||
import com.darkweb.genesissearchengine.helperManager.SimpleGestureFilter;
|
import com.darkweb.genesissearchengine.helperManager.SimpleGestureFilter;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.darkweb.genesissearchengine.helperManager.theme;
|
import com.darkweb.genesissearchengine.helperManager.theme;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.orbotManager;
|
package com.darkweb.genesissearchengine.appManager.orbotManager;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
|
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
import com.darkweb.genesissearchengine.appManager.orbotLogManager.orbotLogController;
|
import com.darkweb.genesissearchengine.appManager.orbotLogManager.orbotLogController;
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
import com.darkweb.genesissearchengine.constants.constants;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.darkweb.genesissearchengine.helperManager.theme;
|
import com.darkweb.genesissearchengine.helperManager.theme;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.proxyStatusManager;
|
package com.darkweb.genesissearchengine.appManager.proxyStatusManager;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
|
|
||||||
class proxyStatusModel
|
class proxyStatusModel
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,7 +16,7 @@ import com.darkweb.genesissearchengine.constants.keys;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
import com.darkweb.genesissearchengine.dataManager.dataController;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.darkweb.genesissearchengine.helperManager.theme;
|
import com.darkweb.genesissearchengine.helperManager.theme;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.settingManager.accessibilityManager;
|
package com.darkweb.genesissearchengine.appManager.settingManager.accessibilityManager;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
class settingAccessibilityModel
|
class settingAccessibilityModel
|
||||||
|
|
|
@ -11,7 +11,7 @@ import androidx.appcompat.app.AppCompatDelegate;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
import com.darkweb.genesissearchengine.constants.constants;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
import com.google.android.material.switchmaterial.SwitchMaterial;
|
import com.google.android.material.switchmaterial.SwitchMaterial;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -14,7 +14,7 @@ import com.darkweb.genesissearchengine.constants.keys;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
import com.darkweb.genesissearchengine.dataManager.dataController;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.darkweb.genesissearchengine.helperManager.theme;
|
import com.darkweb.genesissearchengine.helperManager.theme;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
||||||
|
|
|
@ -3,7 +3,7 @@ package com.darkweb.genesissearchengine.appManager.settingManager.advanceManager
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -10,7 +10,7 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.appcompat.app.AppCompatDelegate;
|
import androidx.appcompat.app.AppCompatDelegate;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
import com.google.android.material.switchmaterial.SwitchMaterial;
|
import com.google.android.material.switchmaterial.SwitchMaterial;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
|
@ -11,7 +11,6 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.appcompat.app.AppCompatDelegate;
|
import androidx.appcompat.app.AppCompatDelegate;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
import com.darkweb.genesissearchengine.appManager.settingManager.generalManager.settingGeneralController;
|
|
||||||
import com.darkweb.genesissearchengine.databaseManager.databaseController;
|
import com.darkweb.genesissearchengine.databaseManager.databaseController;
|
||||||
import com.darkweb.genesissearchengine.appManager.helpManager.helpController;
|
import com.darkweb.genesissearchengine.appManager.helpManager.helpController;
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
import com.darkweb.genesissearchengine.constants.constants;
|
||||||
|
@ -22,7 +21,7 @@ import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.constants.strings;
|
import com.darkweb.genesissearchengine.constants.strings;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
import com.darkweb.genesissearchengine.dataManager.dataController;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.darkweb.genesissearchengine.helperManager.theme;
|
import com.darkweb.genesissearchengine.helperManager.theme;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.settingManager.clearManager;
|
package com.darkweb.genesissearchengine.appManager.settingManager.clearManager;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
|
|
||||||
class settingClearModel
|
class settingClearModel
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,7 +9,7 @@ import android.widget.CheckBox;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.appcompat.app.AppCompatDelegate;
|
import androidx.appcompat.app.AppCompatDelegate;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -17,7 +17,7 @@ import com.darkweb.genesissearchengine.constants.keys;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
import com.darkweb.genesissearchengine.dataManager.dataController;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.darkweb.genesissearchengine.helperManager.theme;
|
import com.darkweb.genesissearchengine.helperManager.theme;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.settingManager.generalManager;
|
package com.darkweb.genesissearchengine.appManager.settingManager.generalManager;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
class settingGeneralModel
|
class settingGeneralModel
|
||||||
|
|
|
@ -12,7 +12,7 @@ import androidx.appcompat.app.AppCompatDelegate;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import com.darkweb.genesissearchengine.constants.enums;
|
import com.darkweb.genesissearchengine.constants.enums;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
import com.google.android.material.switchmaterial.SwitchMaterial;
|
import com.google.android.material.switchmaterial.SwitchMaterial;
|
||||||
|
|
|
@ -2,9 +2,7 @@ package com.darkweb.genesissearchengine.appManager.settingManager.logManager;
|
||||||
|
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
|
@ -14,51 +12,58 @@ import com.darkweb.genesissearchengine.constants.keys;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
import com.darkweb.genesissearchengine.dataManager.dataController;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.darkweb.genesissearchengine.helperManager.theme;
|
import com.darkweb.genesissearchengine.helperManager.theme;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
|
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
import com.google.android.material.switchmaterial.SwitchMaterial;
|
import com.google.android.material.switchmaterial.SwitchMaterial;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import static com.darkweb.genesissearchengine.appManager.settingManager.logManager.settingLogEnums.eLogViewController.M_TOOGLE_LOG_VIEW;
|
||||||
|
|
||||||
public class settingLogController extends AppCompatActivity {
|
public class settingLogController extends AppCompatActivity {
|
||||||
|
|
||||||
/* PRIVATE VARIABLES */
|
/* UI Variables */
|
||||||
private SwitchMaterial mListView;
|
|
||||||
|
private SwitchMaterial mLogThemeToggle;
|
||||||
|
|
||||||
|
/* Private Variables */
|
||||||
|
|
||||||
private settingLogModel mSettingLogModel;
|
private settingLogModel mSettingLogModel;
|
||||||
private settingLogViewController mSettingLogViewController;
|
private settingLogViewController mSettingLogViewController;
|
||||||
|
|
||||||
|
/* Initializations */
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
|
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
setContentView(R.layout.setting_log_view);
|
|
||||||
activityContextManager.getInstance().onStack(this);
|
activityContextManager.getInstance().onStack(this);
|
||||||
|
|
||||||
viewsInitializations();
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.setting_log_view);
|
||||||
|
|
||||||
|
initializeViews();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onConfigurationChanged(@NonNull Configuration newConfig) {
|
public void onConfigurationChanged(@NonNull Configuration newConfig) {
|
||||||
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
|
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
|
||||||
super.onConfigurationChanged(newConfig);
|
super.onConfigurationChanged(newConfig);
|
||||||
|
|
||||||
if(newConfig.uiMode != getResources().getConfiguration().uiMode){
|
if(newConfig.uiMode != getResources().getConfiguration().uiMode){
|
||||||
activityContextManager.getInstance().onResetTheme();
|
activityContextManager.getInstance().onResetTheme();
|
||||||
theme.getInstance().onConfigurationChanged(this);
|
theme.getInstance().onConfigurationChanged(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void viewsInitializations() {
|
private void initializeViews() {
|
||||||
mListView = findViewById(R.id.pListView);
|
mLogThemeToggle = findViewById(R.id.pLogThemeToggle);
|
||||||
activityContextManager.getInstance().onStack(this);
|
|
||||||
mSettingLogViewController = new settingLogViewController(this, new settingLogViewCallback(), mListView);
|
|
||||||
|
|
||||||
|
mSettingLogViewController = new settingLogViewController(this, new settingLogViewCallback(), mLogThemeToggle);
|
||||||
|
mSettingLogViewController.onTrigger(settingLogEnums.eLogViewController.M_INIT_VIEW, Collections.singletonList(status.sLogThemeStyleAdvanced));
|
||||||
mSettingLogModel = new settingLogModel(new settingLogModelCallback());
|
mSettingLogModel = new settingLogModel(new settingLogModelCallback());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,15 +99,9 @@ public class settingLogController extends AppCompatActivity {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onPause()
|
|
||||||
{
|
|
||||||
super.onPause();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBackPressed() {
|
public void onBackPressed() {
|
||||||
finish();
|
onClose(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -118,15 +117,14 @@ public class settingLogController extends AppCompatActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onSwitchLogUIMode(View view){
|
public void onSwitchLogUIMode(View view){
|
||||||
mSettingLogModel.onTrigger(settingLogEnums.eLogModel.M_SWITCH_LOG_VIEW, Collections.singletonList(!mListView.isChecked()));
|
mSettingLogModel.onTrigger(settingLogEnums.eLogModel.M_SWITCH_LOG_VIEW, Collections.singletonList(!mLogThemeToggle.isChecked()));
|
||||||
mListView.toggle();
|
mSettingLogViewController.onTrigger(M_TOOGLE_LOG_VIEW);
|
||||||
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_LIST_VIEW, status.sLogListView));
|
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_LIST_VIEW, status.sLogThemeStyleAdvanced));
|
||||||
|
|
||||||
final Handler handler = new Handler();
|
helperMethod.onDelayHandler(this, 250, () -> {
|
||||||
handler.postDelayed(() ->
|
activityContextManager.getInstance().getOrbotLogController().onRefreshLayoutTheme();
|
||||||
{
|
return null;
|
||||||
activityContextManager.getInstance().getOrbotLogController().recreate();
|
});
|
||||||
}, 250);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onOpenInfo(View view) {
|
public void onOpenInfo(View view) {
|
||||||
|
|
|
@ -2,13 +2,15 @@ package com.darkweb.genesissearchengine.appManager.settingManager.logManager;
|
||||||
|
|
||||||
class settingLogEnums
|
class settingLogEnums
|
||||||
{
|
{
|
||||||
/*History Manager*/
|
/* Log Model */
|
||||||
|
|
||||||
public enum eLogModel {
|
public enum eLogModel {
|
||||||
M_SWITCH_LOG_VIEW
|
M_SWITCH_LOG_VIEW
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Log View Controller */
|
||||||
|
|
||||||
public enum eLogViewController {
|
public enum eLogViewController {
|
||||||
|
M_INIT_VIEW, M_TOOGLE_LOG_VIEW
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,11 +1,8 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.settingManager.logManager;
|
package com.darkweb.genesissearchengine.appManager.settingManager.logManager;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.constants.keys;
|
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
class settingLogModel
|
class settingLogModel
|
||||||
|
@ -20,8 +17,8 @@ class settingLogModel
|
||||||
this.mEvent = mEvent;
|
this.mEvent = mEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onUpdateLogView(boolean pIsListView){
|
private void onUpdateLogView(boolean pLogThemeStyle){
|
||||||
status.sLogListView = pIsListView;
|
status.sLogThemeStyleAdvanced = pLogThemeStyle;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*Helper Methods*/
|
/*Helper Methods*/
|
||||||
|
|
|
@ -1,18 +1,10 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.settingManager.logManager;
|
package com.darkweb.genesissearchengine.appManager.settingManager.logManager;
|
||||||
|
|
||||||
import android.os.Build;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.Window;
|
|
||||||
import android.view.WindowManager;
|
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.appcompat.app.AppCompatDelegate;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import androidx.core.content.ContextCompat;
|
import com.darkweb.genesissearchengine.helperManager.sharedUIMethod;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
|
||||||
import com.example.myapplication.R;
|
|
||||||
import com.google.android.material.switchmaterial.SwitchMaterial;
|
import com.google.android.material.switchmaterial.SwitchMaterial;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
class settingLogViewController
|
class settingLogViewController
|
||||||
{
|
{
|
||||||
|
@ -21,44 +13,52 @@ class settingLogViewController
|
||||||
private eventObserver.eventListener mEvent;
|
private eventObserver.eventListener mEvent;
|
||||||
private AppCompatActivity mContext;
|
private AppCompatActivity mContext;
|
||||||
|
|
||||||
private SwitchMaterial mLogUI;
|
private SwitchMaterial mLogThemeToggle;
|
||||||
|
|
||||||
/*Initializations*/
|
/*Initializations*/
|
||||||
|
|
||||||
settingLogViewController(settingLogController pContext, eventObserver.eventListener pEvent, SwitchMaterial pLogManual)
|
settingLogViewController(settingLogController pContext, eventObserver.eventListener pEvent, SwitchMaterial pLogThemeToggle)
|
||||||
{
|
{
|
||||||
this.mLogUI = pLogManual;
|
this.mLogThemeToggle = pLogThemeToggle;
|
||||||
this.mEvent = pEvent;
|
this.mEvent = pEvent;
|
||||||
this.mContext = pContext;
|
this.mContext = pContext;
|
||||||
|
|
||||||
initViews();
|
|
||||||
initPostUI();
|
initPostUI();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initViews()
|
private void initViews(boolean pLogThemeStyle)
|
||||||
{
|
{
|
||||||
if(status.sLogListView){
|
if(pLogThemeStyle){
|
||||||
mLogUI.setChecked(true);
|
mLogThemeToggle.setChecked(true);
|
||||||
}else {
|
}else {
|
||||||
mLogUI.setChecked(false);
|
mLogThemeToggle.setChecked(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*Helper Methods*/
|
||||||
|
|
||||||
|
private void toggleLogThemeStyle()
|
||||||
|
{
|
||||||
|
mLogThemeToggle.toggle();
|
||||||
|
}
|
||||||
|
|
||||||
private void initPostUI(){
|
private void initPostUI(){
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
sharedUIMethod.updateStatusBar(mContext);
|
||||||
Window window = mContext.getWindow();
|
}
|
||||||
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
|
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) {
|
/*Triggers*/
|
||||||
window.setStatusBarColor(mContext.getResources().getColor(R.color.blue_dark));
|
|
||||||
mContext.getWindow().setStatusBarColor(ContextCompat.getColor(mContext, R.color.landing_ease_blue));
|
public Object onTrigger(settingLogEnums.eLogViewController pCommands, List<Object> pData){
|
||||||
}
|
if(settingLogEnums.eLogViewController.M_TOOGLE_LOG_VIEW.equals(pCommands)){
|
||||||
else {
|
toggleLogThemeStyle();
|
||||||
if(AppCompatDelegate.getDefaultNightMode() == AppCompatDelegate.MODE_NIGHT_NO){
|
|
||||||
mContext.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
|
||||||
}
|
|
||||||
mContext.getWindow().setStatusBarColor(ContextCompat.getColor(mContext, R.color.c_background));
|
|
||||||
}
|
}
|
||||||
|
else if(settingLogEnums.eLogViewController.M_INIT_VIEW.equals(pCommands)){
|
||||||
|
initViews((boolean)pData.get(0));
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object onTrigger(settingLogEnums.eLogViewController pCommands){
|
||||||
|
return onTrigger(pCommands, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ import com.darkweb.genesissearchengine.constants.keys;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
import com.darkweb.genesissearchengine.dataManager.dataController;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.darkweb.genesissearchengine.helperManager.theme;
|
import com.darkweb.genesissearchengine.helperManager.theme;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
||||||
|
|
|
@ -1,14 +1,10 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.settingManager.notificationManager;
|
package com.darkweb.genesissearchengine.appManager.settingManager.notificationManager;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.constants.keys;
|
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
|
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
class settingNotificationModel
|
class settingNotificationModel
|
||||||
|
|
|
@ -8,7 +8,7 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.appcompat.app.AppCompatDelegate;
|
import androidx.appcompat.app.AppCompatDelegate;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
import com.google.android.material.switchmaterial.SwitchMaterial;
|
import com.google.android.material.switchmaterial.SwitchMaterial;
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ import com.darkweb.genesissearchengine.constants.keys;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
import com.darkweb.genesissearchengine.dataManager.dataController;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.darkweb.genesissearchengine.helperManager.theme;
|
import com.darkweb.genesissearchengine.helperManager.theme;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.settingManager.privacyManager;
|
package com.darkweb.genesissearchengine.appManager.settingManager.privacyManager;
|
||||||
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import com.darkweb.genesissearchengine.constants.keys;
|
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import static org.mozilla.geckoview.ContentBlocking.CookieBehavior.ACCEPT_ALL;
|
import static org.mozilla.geckoview.ContentBlocking.CookieBehavior.ACCEPT_ALL;
|
||||||
import static org.mozilla.geckoview.ContentBlocking.CookieBehavior.ACCEPT_FIRST_PARTY;
|
import static org.mozilla.geckoview.ContentBlocking.CookieBehavior.ACCEPT_FIRST_PARTY;
|
||||||
|
|
|
@ -10,7 +10,7 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.appcompat.app.AppCompatDelegate;
|
import androidx.appcompat.app.AppCompatDelegate;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
import com.google.android.material.switchmaterial.SwitchMaterial;
|
import com.google.android.material.switchmaterial.SwitchMaterial;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
|
@ -14,7 +14,7 @@ import com.darkweb.genesissearchengine.constants.keys;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
import com.darkweb.genesissearchengine.dataManager.dataController;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.darkweb.genesissearchengine.helperManager.theme;
|
import com.darkweb.genesissearchengine.helperManager.theme;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.settingManager.searchEngineManager;
|
package com.darkweb.genesissearchengine.appManager.settingManager.searchEngineManager;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ import androidx.appcompat.app.AppCompatDelegate;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
import com.darkweb.genesissearchengine.constants.constants;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
import com.google.android.material.switchmaterial.SwitchMaterial;
|
import com.google.android.material.switchmaterial.SwitchMaterial;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.settingManager.settingHomePage;
|
package com.darkweb.genesissearchengine.appManager.settingManager.settingHomePage;
|
||||||
|
|
||||||
import android.content.ClipData;
|
|
||||||
import android.content.ClipboardManager;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
|
@ -28,7 +25,7 @@ import com.darkweb.genesissearchengine.constants.keys;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
import com.darkweb.genesissearchengine.dataManager.dataController;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.darkweb.genesissearchengine.helperManager.theme;
|
import com.darkweb.genesissearchengine.helperManager.theme;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.settingManager.settingHomePage;
|
package com.darkweb.genesissearchengine.appManager.settingManager.settingHomePage;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
|
|
||||||
class settingHomeModel
|
class settingHomeModel
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,7 +7,7 @@ import android.view.WindowManager;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.appcompat.app.AppCompatDelegate;
|
import androidx.appcompat.app.AppCompatDelegate;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
|
@ -14,15 +14,12 @@ import com.darkweb.genesissearchengine.constants.keys;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
import com.darkweb.genesissearchengine.dataManager.dataController;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.darkweb.genesissearchengine.helperManager.theme;
|
import com.darkweb.genesissearchengine.helperManager.theme;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
|
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
import com.google.android.material.switchmaterial.SwitchMaterial;
|
|
||||||
|
|
||||||
import org.mozilla.geckoview.ContentBlocking;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
|
@ -1,20 +1,14 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.settingManager.trackingManager;
|
package com.darkweb.genesissearchengine.appManager.settingManager.trackingManager;
|
||||||
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import com.darkweb.genesissearchengine.constants.keys;
|
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
|
|
||||||
import org.mozilla.geckoview.ContentBlocking;
|
import org.mozilla.geckoview.ContentBlocking;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import static org.mozilla.geckoview.ContentBlocking.CookieBehavior.ACCEPT_ALL;
|
|
||||||
import static org.mozilla.geckoview.ContentBlocking.CookieBehavior.ACCEPT_FIRST_PARTY;
|
|
||||||
import static org.mozilla.geckoview.ContentBlocking.CookieBehavior.ACCEPT_NONE;
|
|
||||||
import static org.mozilla.geckoview.ContentBlocking.CookieBehavior.ACCEPT_NON_TRACKERS;
|
|
||||||
|
|
||||||
class settingTrackingModel
|
class settingTrackingModel
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,7 +10,7 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.appcompat.app.AppCompatDelegate;
|
import androidx.appcompat.app.AppCompatDelegate;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
import org.mozilla.geckoview.ContentBlocking;
|
import org.mozilla.geckoview.ContentBlocking;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
|
@ -8,7 +8,6 @@ import android.graphics.Color;
|
||||||
import android.graphics.drawable.BitmapDrawable;
|
import android.graphics.drawable.BitmapDrawable;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.util.Log;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
@ -26,7 +25,7 @@ import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
import com.darkweb.genesissearchengine.constants.enums;
|
import com.darkweb.genesissearchengine.constants.enums;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.helperManager.TopCropImageView;
|
import com.darkweb.genesissearchengine.helperManager.TopCropImageView;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -39,7 +38,6 @@ import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_
|
||||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_HELP_URL_CACHE_DARK;
|
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_HELP_URL_CACHE_DARK;
|
||||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_URL_CACHED;
|
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_URL_CACHED;
|
||||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_URL_CACHED_DARK;
|
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_URL_CACHED_DARK;
|
||||||
import static org.mozilla.gecko.util.ThreadUtils.runOnUiThread;
|
|
||||||
|
|
||||||
public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
|
public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.tabManager;
|
package com.darkweb.genesissearchengine.appManager.tabManager;
|
||||||
|
|
||||||
import android.animation.Animator;
|
|
||||||
import android.animation.AnimatorListenerAdapter;
|
|
||||||
import android.animation.ObjectAnimator;
|
import android.animation.ObjectAnimator;
|
||||||
import android.animation.PropertyValuesHolder;
|
import android.animation.PropertyValuesHolder;
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
|
@ -34,7 +32,7 @@ import com.darkweb.genesissearchengine.constants.constants;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
import com.darkweb.genesissearchengine.dataManager.dataController;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
|
@ -14,6 +14,7 @@ public class constants
|
||||||
public static final String CONST_PRIVACY_POLICY_URL = "https://genesishiddentechnologies.com/privacy";
|
public static final String CONST_PRIVACY_POLICY_URL = "https://genesishiddentechnologies.com/privacy";
|
||||||
public static final String CONST_REPORT_URL = "https://genesishiddentechnologies.com/reportus?url=";
|
public static final String CONST_REPORT_URL = "https://genesishiddentechnologies.com/reportus?url=";
|
||||||
public static final String CONST_SITEMAP = "https://genesishiddentechnologies.com/create";
|
public static final String CONST_SITEMAP = "https://genesishiddentechnologies.com/create";
|
||||||
|
public static final String CONST_PACKAGE_NAME = "com.darkweb.genesissearchengine";
|
||||||
|
|
||||||
/*DRIVE URL DEV*/
|
/*DRIVE URL DEV*/
|
||||||
|
|
||||||
|
@ -46,6 +47,7 @@ public class constants
|
||||||
public static final String CONST_BACKEND_DUCK_DUCK_GO_URL = "https://duckduckgo.com?q=$s&ia=web";
|
public static final String CONST_BACKEND_DUCK_DUCK_GO_URL = "https://duckduckgo.com?q=$s&ia=web";
|
||||||
public static final String CONST_BACKEND_BING_URL = "https://bing.com/search?q=$s";
|
public static final String CONST_BACKEND_BING_URL = "https://bing.com/search?q=$s";
|
||||||
public static final String CONST_BACKEND_WIKI_URL = "https://en.wikipedia.org/wiki/$s";
|
public static final String CONST_BACKEND_WIKI_URL = "https://en.wikipedia.org/wiki/$s";
|
||||||
|
public static final String CONST_LOG_DUCKDUCK = "https://duckduckgo.com/?q=tor logs";
|
||||||
|
|
||||||
/*PROXY CONSTANTS*/
|
/*PROXY CONSTANTS*/
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ public class status
|
||||||
public static boolean sFullScreenBrowsing = false;
|
public static boolean sFullScreenBrowsing = false;
|
||||||
public static boolean sOpenURLInNewTab = true;
|
public static boolean sOpenURLInNewTab = true;
|
||||||
public static boolean sDefaultNightMode;
|
public static boolean sDefaultNightMode;
|
||||||
public static boolean sLogListView;
|
public static boolean sLogThemeStyleAdvanced;
|
||||||
public static boolean sBridgeGatewayAuto = false;
|
public static boolean sBridgeGatewayAuto = false;
|
||||||
public static boolean sBridgeGatewayManual = false;
|
public static boolean sBridgeGatewayManual = false;
|
||||||
public static boolean sVPNStatus = false;
|
public static boolean sVPNStatus = false;
|
||||||
|
@ -128,7 +128,7 @@ public class status
|
||||||
status.sToolbarTheme = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_TOOLBAR_THEME,true));
|
status.sToolbarTheme = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_TOOLBAR_THEME,true));
|
||||||
status.sTheme = (int)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_INT, Arrays.asList(keys.SETTING_THEME,enums.Theme.THEME_DEFAULT));
|
status.sTheme = (int)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_INT, Arrays.asList(keys.SETTING_THEME,enums.Theme.THEME_DEFAULT));
|
||||||
status.sOpenURLInNewTab = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_OPEN_URL_IN_NEW_TAB,true));
|
status.sOpenURLInNewTab = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_OPEN_URL_IN_NEW_TAB,true));
|
||||||
status.sLogListView = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_LIST_VIEW,true));
|
status.sLogThemeStyleAdvanced = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_LIST_VIEW,true));
|
||||||
status.sTabGridLayoutEnabled = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_SHOW_TAB_GRID,true));
|
status.sTabGridLayoutEnabled = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_SHOW_TAB_GRID,true));
|
||||||
status.sRateCount = (int)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_INT, Arrays.asList(keys.SETTING_RATE_COUNT, 0));
|
status.sRateCount = (int)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_INT, Arrays.asList(keys.SETTING_RATE_COUNT, 0));
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,22 +63,5 @@ public class strings
|
||||||
/*Message Manager*/
|
/*Message Manager*/
|
||||||
|
|
||||||
public static final String MESSAGE_PLAYSTORE_NOT_FOUND = "Playstore Not Found";
|
public static final String MESSAGE_PLAYSTORE_NOT_FOUND = "Playstore Not Found";
|
||||||
|
|
||||||
/*Events*/
|
|
||||||
|
|
||||||
/* public static final String EVENT_APP_STARTED = "APP_STARTED";
|
|
||||||
public static final String EVENT_SETTINGS_OPENED = "SETTINGS_OPENED";
|
|
||||||
public static final String EVENT_URL_BOOKMARKED = "URL_BOOKMARKED";
|
|
||||||
public static final String EVENT_BOOKMARK_OPENED = "BOOKMARK_OPENED";
|
|
||||||
public static final String EVENT_TAB_OPENED = "TAB_OPENED";
|
|
||||||
public static final String EVENT_GATEWAY_OPENED = "GATEWAY_OPENED";
|
|
||||||
public static final String EVENT_HISTORY_OPENED = "HISTORY_OPENED";
|
|
||||||
public static final String EVENT_HISTORY_TRIGGERED = "HISTORY_TRIGGERED";
|
|
||||||
public static final String EVENT_BOOKMARK_TRIGGERED = "BOOKMARK_TRIGGERED";
|
|
||||||
public static final String EVENT_PAGE_OPENED_SUCCESS = "PAGE_OPENED_SUCCESS";
|
|
||||||
public static final String EVENT_HOME_INVOKED = "HOME_INVOKED";
|
|
||||||
public static final String EVENT_SEARCH_INVOKED = "SEARCH_INVOKED";
|
|
||||||
public static final String EVENT_MENU_INVOKED = "MENU_INVOKED";
|
|
||||||
public static final String EVENT_ON_BACK = "ON_BACK"; */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,23 +9,16 @@ import com.darkweb.genesissearchengine.appManager.historyManager.historyRowModel
|
||||||
import com.darkweb.genesissearchengine.appManager.homeManager.geckoManager.geckoSession;
|
import com.darkweb.genesissearchengine.appManager.homeManager.geckoManager.geckoSession;
|
||||||
import com.darkweb.genesissearchengine.appManager.tabManager.tabRowModel;
|
import com.darkweb.genesissearchengine.appManager.tabManager.tabRowModel;
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
import com.darkweb.genesissearchengine.constants.constants;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
|
||||||
|
|
||||||
import net.sqlcipher.database.SQLiteDatabaseHook;
|
import net.sqlcipher.database.SQLiteDatabaseHook;
|
||||||
import net.sqlcipher.database.SQLiteDatabase;
|
import net.sqlcipher.database.SQLiteDatabase;
|
||||||
|
|
||||||
import org.mozilla.geckoview.GeckoSession;
|
import org.mozilla.geckoview.GeckoSession;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_DATABASE_NAME;
|
import static com.darkweb.genesissearchengine.constants.constants.CONST_DATABASE_NAME;
|
||||||
|
|
||||||
|
@ -36,24 +29,20 @@ public class databaseController
|
||||||
/*Private Variables*/
|
/*Private Variables*/
|
||||||
|
|
||||||
private static final databaseController sOurInstance = new databaseController();
|
private static final databaseController sOurInstance = new databaseController();
|
||||||
private static SQLiteDatabase mDatabaseInstance;
|
private static SQLiteDatabase sDatabaseInstance;
|
||||||
|
|
||||||
public static databaseController getInstance()
|
public static databaseController getInstance()
|
||||||
{
|
{
|
||||||
return sOurInstance;
|
return sOurInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
private databaseController()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/*Initializations*/
|
/*Initializations*/
|
||||||
|
|
||||||
public void prepareDatabaseEnvironment(AppCompatActivity app_context) {
|
public void prepareDatabaseEnvironment(AppCompatActivity app_context) {
|
||||||
File databaseFile = app_context.getDatabasePath(CONST_DATABASE_NAME + "_SECURE");
|
File databaseFile = app_context.getDatabasePath(CONST_DATABASE_NAME + "_SECURE");
|
||||||
|
|
||||||
if (!databaseFile.exists()) {
|
if (!databaseFile.exists()) {
|
||||||
databaseFile.getParentFile().mkdirs();
|
Objects.requireNonNull(databaseFile.getParentFile()).mkdirs();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,11 +52,11 @@ public class databaseController
|
||||||
{
|
{
|
||||||
SQLiteDatabase.loadLibs(app_context);
|
SQLiteDatabase.loadLibs(app_context);
|
||||||
prepareDatabaseEnvironment(app_context);
|
prepareDatabaseEnvironment(app_context);
|
||||||
mDatabaseInstance = mDatabaseInstance.openOrCreateDatabase(app_context.getDatabasePath(CONST_DATABASE_NAME + "_SECURE"), constants.CONST_ENCRYPTION_KEY_DATABASE,null, wrapHook(null));
|
sDatabaseInstance = SQLiteDatabase.openOrCreateDatabase(app_context.getDatabasePath(CONST_DATABASE_NAME + "_SECURE"), constants.CONST_ENCRYPTION_KEY_DATABASE,null, wrapHook(null));
|
||||||
|
|
||||||
mDatabaseInstance.execSQL("CREATE TABLE IF NOT EXISTS " + "history" + " (id INT(4) PRIMARY KEY,date DATETIME,url VARCHAR,title VARCHAR);");
|
sDatabaseInstance.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);");
|
sDatabaseInstance.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, theme VARCHAR, session VARCHAR);");
|
sDatabaseInstance.execSQL("CREATE TABLE IF NOT EXISTS " + "tab" + " (mid INT(4) PRIMARY KEY,date,title VARCHAR,url VARCHAR,mThumbnail BLOB, theme VARCHAR, session VARCHAR);");
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -115,11 +104,11 @@ public class databaseController
|
||||||
{
|
{
|
||||||
if(params==null)
|
if(params==null)
|
||||||
{
|
{
|
||||||
mDatabaseInstance.execSQL(query);
|
sDatabaseInstance.execSQL(query);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mDatabaseInstance.execSQL(query,params);
|
sDatabaseInstance.execSQL(query,params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,14 +116,14 @@ public class databaseController
|
||||||
{
|
{
|
||||||
if(params!=null)
|
if(params!=null)
|
||||||
{
|
{
|
||||||
mDatabaseInstance.update(query, params, "mid = ?", new String[]{pID});
|
sDatabaseInstance.update(query, params, "mid = ?", new String[]{pID});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<historyRowModel> selectHistory(int startIndex,int endIndex){
|
public ArrayList<historyRowModel> selectHistory(int pStartIndex,int pEndIndex){
|
||||||
ArrayList<historyRowModel> tempmodel = new ArrayList<>();
|
ArrayList<historyRowModel> tempmodel = new ArrayList<>();
|
||||||
|
|
||||||
Cursor c = mDatabaseInstance.rawQuery("SELECT * FROM history ORDER BY date DESC LIMIT " + endIndex + " OFFSET "+startIndex, null);
|
Cursor c = sDatabaseInstance.rawQuery("SELECT * FROM history ORDER BY date DESC LIMIT " + pEndIndex + " OFFSET "+pStartIndex, null);
|
||||||
if (c.moveToFirst()){
|
if (c.moveToFirst()){
|
||||||
do {
|
do {
|
||||||
historyRowModel model = new historyRowModel(c.getString(3), c.getString(2),Integer.parseInt(c.getString(0)));
|
historyRowModel model = new historyRowModel(c.getString(3), c.getString(2),Integer.parseInt(c.getString(0)));
|
||||||
|
@ -159,7 +148,7 @@ public class databaseController
|
||||||
public ArrayList<tabRowModel> selectTabs(){
|
public ArrayList<tabRowModel> selectTabs(){
|
||||||
ArrayList<tabRowModel> mTempListModel = new ArrayList<>();
|
ArrayList<tabRowModel> mTempListModel = new ArrayList<>();
|
||||||
|
|
||||||
Cursor c = mDatabaseInstance.rawQuery("SELECT * FROM tab ORDER BY date ASC", null);
|
Cursor c = sDatabaseInstance.rawQuery("SELECT * FROM tab ORDER BY date ASC", null);
|
||||||
if (c.moveToFirst()){
|
if (c.moveToFirst()){
|
||||||
do {
|
do {
|
||||||
geckoSession mSession = activityContextManager.getInstance().getHomeController().onNewTabInit();
|
geckoSession mSession = activityContextManager.getInstance().getHomeController().onNewTabInit();
|
||||||
|
@ -188,7 +177,7 @@ public class databaseController
|
||||||
|
|
||||||
public int getLargestHistoryID(){
|
public int getLargestHistoryID(){
|
||||||
int id = 0;
|
int id = 0;
|
||||||
Cursor c = mDatabaseInstance.rawQuery("SELECT max(id) FROM history", null);
|
Cursor c = sDatabaseInstance.rawQuery("SELECT max(id) FROM history", null);
|
||||||
|
|
||||||
if (c.moveToFirst()){
|
if (c.moveToFirst()){
|
||||||
do {
|
do {
|
||||||
|
@ -206,7 +195,7 @@ public class databaseController
|
||||||
|
|
||||||
public ArrayList<bookmarkRowModel> selectBookmark(){
|
public ArrayList<bookmarkRowModel> selectBookmark(){
|
||||||
ArrayList<bookmarkRowModel> tempmodel = new ArrayList<>();
|
ArrayList<bookmarkRowModel> tempmodel = new ArrayList<>();
|
||||||
Cursor c = mDatabaseInstance.rawQuery("SELECT * FROM bookmark ORDER BY id DESC ", null);
|
Cursor c = sDatabaseInstance.rawQuery("SELECT * FROM bookmark ORDER BY id DESC ", null);
|
||||||
|
|
||||||
if (c.moveToFirst()){
|
if (c.moveToFirst()){
|
||||||
do {
|
do {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.darkweb.genesissearchengine.helperManager;
|
package com.darkweb.genesissearchengine;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.constants.enums;
|
import com.darkweb.genesissearchengine.constants.enums;
|
||||||
|
|
|
@ -4,16 +4,17 @@ import android.content.Intent;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
|
import android.os.Looper;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
|
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.example.myapplication.R;
|
|
||||||
|
|
||||||
import org.torproject.android.service.wrapper.orbotLocalConstants;
|
import static com.darkweb.genesissearchengine.constants.constants.CONST_PACKAGE_NAME;
|
||||||
|
|
||||||
public class externalNavigationController extends AppCompatActivity {
|
public class externalNavigationController extends AppCompatActivity {
|
||||||
@Override
|
@Override
|
||||||
|
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
Uri data = externalNavigationController.this.getIntent().getData();
|
Uri data = externalNavigationController.this.getIntent().getData();
|
||||||
|
@ -30,11 +31,10 @@ public class externalNavigationController extends AppCompatActivity {
|
||||||
finish();
|
finish();
|
||||||
activityContextManager.getInstance().onClearStack();
|
activityContextManager.getInstance().onClearStack();
|
||||||
|
|
||||||
new Handler().postDelayed(() ->
|
new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
||||||
{
|
|
||||||
activityContextManager.getInstance().getHomeController().onOpenLinkNewTab(activityContextManager.getInstance().getHomeController().completeURL(data.toString()));
|
activityContextManager.getInstance().getHomeController().onOpenLinkNewTab(activityContextManager.getInstance().getHomeController().completeURL(data.toString()));
|
||||||
activityContextManager.getInstance().getHomeController().onClearSelectionTab();
|
activityContextManager.getInstance().getHomeController().onClearSelectionTab();
|
||||||
}, 500);
|
}, 3000);
|
||||||
|
|
||||||
Intent bringToForegroundIntent = new Intent(activityContextManager.getInstance().getHomeController(), homeController.class);
|
Intent bringToForegroundIntent = new Intent(activityContextManager.getInstance().getHomeController(), homeController.class);
|
||||||
bringToForegroundIntent.setFlags(Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED | Intent.FLAG_ACTIVITY_NEW_TASK);
|
bringToForegroundIntent.setFlags(Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED | Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
|
@ -50,13 +50,13 @@ public class externalNavigationController extends AppCompatActivity {
|
||||||
Intent intent = new Intent(this.getIntent());
|
Intent intent = new Intent(this.getIntent());
|
||||||
intent.setClassName(this.getApplicationContext(), homeController.class.getName());
|
intent.setClassName(this.getApplicationContext(), homeController.class.getName());
|
||||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||||
if(data!=null){
|
|
||||||
if(activityContextManager.getInstance().getHomeController()!=null){
|
if(activityContextManager.getInstance().getHomeController()!=null){
|
||||||
activityContextManager.getInstance().getHomeController().onOpenLinkNewTab(data.toString());
|
activityContextManager.getInstance().getHomeController().onOpenLinkNewTab(data.toString());
|
||||||
}else {
|
}else {
|
||||||
status.sExternalWebsite = data.toString();
|
status.sExternalWebsite = data.toString();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
this.startActivity(intent);
|
this.startActivity(intent);
|
||||||
this.overridePendingTransition(0, 0);
|
this.overridePendingTransition(0, 0);
|
||||||
|
|
||||||
|
@ -71,12 +71,11 @@ public class externalNavigationController extends AppCompatActivity {
|
||||||
}
|
}
|
||||||
}.start();
|
}.start();
|
||||||
|
|
||||||
Intent launchIntent = getPackageManager().getLaunchIntentForPackage("com.darkweb.genesissearchengine");
|
Intent launchIntent = getPackageManager().getLaunchIntentForPackage(CONST_PACKAGE_NAME);
|
||||||
startActivity(launchIntent);
|
startActivity(launchIntent);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onNewIntent(Intent intent)
|
protected void onNewIntent(Intent intent)
|
||||||
{
|
{
|
||||||
|
@ -84,9 +83,8 @@ public class externalNavigationController extends AppCompatActivity {
|
||||||
Uri data = intent.getData();
|
Uri data = intent.getData();
|
||||||
if(data!=null){
|
if(data!=null){
|
||||||
activityContextManager.getInstance().getHomeController().onOpenLinkNewTab(data.toString());
|
activityContextManager.getInstance().getHomeController().onOpenLinkNewTab(data.toString());
|
||||||
Intent launchIntent = getPackageManager().getLaunchIntentForPackage("com.darkweb.genesissearchengine");
|
Intent launchIntent = getPackageManager().getLaunchIntentForPackage(CONST_PACKAGE_NAME);
|
||||||
startActivity(launchIntent);
|
startActivity(launchIntent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,10 @@
|
||||||
package com.darkweb.genesissearchengine.externalNavigationManager;
|
package com.darkweb.genesissearchengine.externalNavigationManager;
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.view.View;
|
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
|
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
import com.darkweb.genesissearchengine.constants.constants;
|
||||||
|
@ -20,17 +16,12 @@ import com.darkweb.genesissearchengine.constants.strings;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
import com.darkweb.genesissearchengine.dataManager.dataController;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
||||||
import com.darkweb.genesissearchengine.databaseManager.databaseController;
|
import com.darkweb.genesissearchengine.databaseManager.databaseController;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
|
|
||||||
import org.mozilla.geckoview.ContentBlocking;
|
import org.mozilla.geckoview.ContentBlocking;
|
||||||
import org.torproject.android.service.wrapper.orbotLocalConstants;
|
import org.torproject.android.service.wrapper.orbotLocalConstants;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
|
||||||
|
|
||||||
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
|
import static com.darkweb.genesissearchengine.constants.constants.CONST_PACKAGE_NAME;
|
||||||
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.M_DATA_CLEARED;
|
|
||||||
import static org.mozilla.geckoview.ContentBlocking.CookieBehavior.ACCEPT_FIRST_PARTY;
|
import static org.mozilla.geckoview.ContentBlocking.CookieBehavior.ACCEPT_FIRST_PARTY;
|
||||||
|
|
||||||
public class externalShortcuts extends AppCompatActivity {
|
public class externalShortcuts extends AppCompatActivity {
|
||||||
|
@ -62,10 +53,7 @@ public class externalShortcuts extends AppCompatActivity {
|
||||||
setContentView(R.layout.empty_view);
|
setContentView(R.layout.empty_view);
|
||||||
|
|
||||||
if(mConnect){
|
if(mConnect){
|
||||||
new Handler().postDelayed(() ->
|
new Handler().postDelayed(() -> activityContextManager.getInstance().getHomeController().onStartApplication(null), 2000);
|
||||||
{
|
|
||||||
activityContextManager.getInstance().getHomeController().onStartApplication(null);
|
|
||||||
}, 2000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
new Handler().postDelayed(() ->
|
new Handler().postDelayed(() ->
|
||||||
|
@ -106,13 +94,13 @@ public class externalShortcuts extends AppCompatActivity {
|
||||||
Intent intent = new Intent(this.getIntent());
|
Intent intent = new Intent(this.getIntent());
|
||||||
intent.setClassName(this.getApplicationContext(), homeController.class.getName());
|
intent.setClassName(this.getApplicationContext(), homeController.class.getName());
|
||||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||||
if(data!=null){
|
|
||||||
if(activityContextManager.getInstance().getHomeController()!=null){
|
if(activityContextManager.getInstance().getHomeController()!=null){
|
||||||
activityContextManager.getInstance().getHomeController().onOpenLinkNewTab(data.toString());
|
activityContextManager.getInstance().getHomeController().onOpenLinkNewTab(data.toString());
|
||||||
}else {
|
}else {
|
||||||
status.sExternalWebsite = data.toString();
|
status.sExternalWebsite = data.toString();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
this.startActivity(intent);
|
this.startActivity(intent);
|
||||||
overridePendingTransition(R.anim.fade_in_instant, R.anim.fade_out_instant);
|
overridePendingTransition(R.anim.fade_in_instant, R.anim.fade_out_instant);
|
||||||
|
|
||||||
|
@ -127,11 +115,10 @@ public class externalShortcuts extends AppCompatActivity {
|
||||||
}
|
}
|
||||||
}.start();
|
}.start();
|
||||||
|
|
||||||
Intent launchIntent = getPackageManager().getLaunchIntentForPackage("com.darkweb.genesissearchengine");
|
Intent launchIntent = getPackageManager().getLaunchIntentForPackage(CONST_PACKAGE_NAME);
|
||||||
startActivity(launchIntent);
|
startActivity(launchIntent);
|
||||||
overridePendingTransition(R.anim.fade_in_instant, R.anim.fade_out_instant);
|
overridePendingTransition(R.anim.fade_in_instant, R.anim.fade_out_instant);
|
||||||
}, 800);
|
}, 800);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
package org.mozilla.focus.generated;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class LocaleList {
|
|
||||||
public static final List<String> BUNDLED_LOCALES = Collections.unmodifiableList(Arrays.asList(new String[] { "ca", "ch", "de", "el", "en-US", "fr", "hu", "in-ID", "it", "ja-JP", "ko", "night", "nl", "pt", "ro", "ru", "th", "tr", "uk", "ur", "vi", "zh" }));
|
|
||||||
}
|
|
|
@ -1,96 +0,0 @@
|
||||||
package com.darkweb.genesissearchengine.helperManager;
|
|
||||||
|
|
||||||
import android.animation.ValueAnimator;
|
|
||||||
import android.animation.ValueAnimator.AnimatorUpdateListener;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.util.AttributeSet;
|
|
||||||
import android.view.animation.AccelerateDecelerateInterpolator;
|
|
||||||
import android.view.animation.Interpolator;
|
|
||||||
import android.widget.ProgressBar;
|
|
||||||
|
|
||||||
public class AnimatingProgressBar extends ProgressBar {
|
|
||||||
|
|
||||||
private static final Interpolator DEFAULT_INTERPOLATER = new AccelerateDecelerateInterpolator();
|
|
||||||
|
|
||||||
private ValueAnimator animator;
|
|
||||||
private ValueAnimator animatorSecondary;
|
|
||||||
private boolean animate = true;
|
|
||||||
|
|
||||||
public AnimatingProgressBar(Context context, AttributeSet attrs, int defStyle) {
|
|
||||||
super(context, attrs, defStyle);
|
|
||||||
}
|
|
||||||
|
|
||||||
public AnimatingProgressBar(Context context, AttributeSet attrs) {
|
|
||||||
super(context, attrs);
|
|
||||||
}
|
|
||||||
|
|
||||||
public AnimatingProgressBar(Context context) {
|
|
||||||
super(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isAnimate() {
|
|
||||||
return animate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAnimate(boolean animate) {
|
|
||||||
this.animate = animate;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public synchronized void setProgress(int progress) {
|
|
||||||
if (!animate) {
|
|
||||||
super.setProgress(progress);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (animator != null)
|
|
||||||
animator.cancel();
|
|
||||||
if (animator == null) {
|
|
||||||
animator = ValueAnimator.ofInt(getProgress(), progress);
|
|
||||||
animator.setInterpolator(DEFAULT_INTERPOLATER);
|
|
||||||
animator.addUpdateListener(new AnimatorUpdateListener() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onAnimationUpdate(ValueAnimator animation) {
|
|
||||||
AnimatingProgressBar.super.setProgress((Integer) animation.getAnimatedValue());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else
|
|
||||||
animator.setIntValues(getProgress(), progress);
|
|
||||||
animator.start();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public synchronized void setSecondaryProgress(int secondaryProgress) {
|
|
||||||
if (!animate) {
|
|
||||||
super.setSecondaryProgress(secondaryProgress);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (animatorSecondary != null)
|
|
||||||
animatorSecondary.cancel();
|
|
||||||
if (animatorSecondary == null) {
|
|
||||||
animatorSecondary = ValueAnimator.ofInt(getProgress(), secondaryProgress);
|
|
||||||
animatorSecondary.setInterpolator(DEFAULT_INTERPOLATER);
|
|
||||||
animatorSecondary.addUpdateListener(new AnimatorUpdateListener() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onAnimationUpdate(ValueAnimator animation) {
|
|
||||||
AnimatingProgressBar.super.setSecondaryProgress((Integer) animation
|
|
||||||
.getAnimatedValue());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else
|
|
||||||
animatorSecondary.setIntValues(getProgress(), secondaryProgress);
|
|
||||||
animatorSecondary.start();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onDetachedFromWindow() {
|
|
||||||
super.onDetachedFromWindow();
|
|
||||||
if (animator != null)
|
|
||||||
animator.cancel();
|
|
||||||
if (animatorSecondary != null)
|
|
||||||
animatorSecondary.cancel();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -7,30 +7,25 @@ import android.view.ViewGroup;
|
||||||
import android.view.ViewTreeObserver;
|
import android.view.ViewTreeObserver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.view.inputmethod.InputMethodManager;
|
import android.view.inputmethod.InputMethodManager;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
|
||||||
* Based on the following Stackoverflow answer:
|
|
||||||
* http://stackoverflow.com/questions/2150078/how-to-check-visibility-of-software-keyboard-in-android
|
|
||||||
*/
|
|
||||||
@SuppressWarnings("WeakerAccess")
|
|
||||||
public class KeyboardUtils implements ViewTreeObserver.OnGlobalLayoutListener
|
public class KeyboardUtils implements ViewTreeObserver.OnGlobalLayoutListener
|
||||||
{
|
{
|
||||||
private final static int MAGIC_NUMBER = 200;
|
|
||||||
|
|
||||||
private SoftKeyboardToggleListener mCallback;
|
private SoftKeyboardToggleListener mCallback;
|
||||||
private View mRootView;
|
private View mRootView;
|
||||||
private Boolean prevValue = null;
|
|
||||||
private float mScreenDensity;
|
private final static int sMagicNumber = 200;
|
||||||
private static HashMap<SoftKeyboardToggleListener, KeyboardUtils> sListenerMap = new HashMap<>();
|
private static HashMap<SoftKeyboardToggleListener, KeyboardUtils> sListenerMap = new HashMap<>();
|
||||||
|
|
||||||
|
private Boolean mPrevValue = null;
|
||||||
|
private float mScreenDensity;
|
||||||
|
|
||||||
public interface SoftKeyboardToggleListener
|
public interface SoftKeyboardToggleListener
|
||||||
{
|
{
|
||||||
void onToggleSoftKeyboard(boolean isVisible);
|
void onToggleSoftKeyboard(boolean isVisible);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onGlobalLayout()
|
public void onGlobalLayout()
|
||||||
{
|
{
|
||||||
|
@ -39,88 +34,67 @@ public class KeyboardUtils implements ViewTreeObserver.OnGlobalLayoutListener
|
||||||
|
|
||||||
int heightDiff = mRootView.getRootView().getHeight() - (r.bottom - r.top);
|
int heightDiff = mRootView.getRootView().getHeight() - (r.bottom - r.top);
|
||||||
float dp = heightDiff/ mScreenDensity;
|
float dp = heightDiff/ mScreenDensity;
|
||||||
boolean isVisible = dp > MAGIC_NUMBER;
|
boolean isVisible = dp > sMagicNumber;
|
||||||
|
|
||||||
if (mCallback != null && (prevValue == null || isVisible != prevValue)) {
|
if (mCallback != null && (mPrevValue == null || isVisible != mPrevValue)) {
|
||||||
prevValue = isVisible;
|
mPrevValue = isVisible;
|
||||||
mCallback.onToggleSoftKeyboard(isVisible);
|
mCallback.onToggleSoftKeyboard(isVisible);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Add a new keyboard listener
|
|
||||||
* @param act calling activity
|
|
||||||
* @param listener callback
|
|
||||||
*/
|
|
||||||
public static void addKeyboardToggleListener(Activity act, SoftKeyboardToggleListener listener)
|
public static void addKeyboardToggleListener(Activity act, SoftKeyboardToggleListener listener)
|
||||||
{
|
{
|
||||||
removeKeyboardToggleListener(listener);
|
removeKeyboardToggleListener(listener);
|
||||||
|
|
||||||
sListenerMap.put(listener, new KeyboardUtils(act, listener));
|
sListenerMap.put(listener, new KeyboardUtils(act, listener));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove a registered listener
|
|
||||||
* @param listener {@link SoftKeyboardToggleListener}
|
|
||||||
*/
|
|
||||||
public static void removeKeyboardToggleListener(SoftKeyboardToggleListener listener)
|
public static void removeKeyboardToggleListener(SoftKeyboardToggleListener listener)
|
||||||
{
|
{
|
||||||
if(sListenerMap.containsKey(listener))
|
if(sListenerMap.containsKey(listener))
|
||||||
{
|
{
|
||||||
KeyboardUtils k = sListenerMap.get(listener);
|
KeyboardUtils k = sListenerMap.get(listener);
|
||||||
|
assert k != null;
|
||||||
k.removeListener();
|
k.removeListener();
|
||||||
|
|
||||||
sListenerMap.remove(listener);
|
sListenerMap.remove(listener);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove all registered keyboard listeners
|
|
||||||
*/
|
|
||||||
public static void removeAllKeyboardToggleListeners()
|
public static void removeAllKeyboardToggleListeners()
|
||||||
{
|
{
|
||||||
for(SoftKeyboardToggleListener l : sListenerMap.keySet())
|
for(SoftKeyboardToggleListener l : sListenerMap.keySet()){
|
||||||
sListenerMap.get(l).removeListener();
|
Objects.requireNonNull(sListenerMap.get(l)).removeListener();
|
||||||
|
}
|
||||||
|
|
||||||
sListenerMap.clear();
|
sListenerMap.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Manually toggle soft keyboard visibility
|
|
||||||
* @param context calling context
|
|
||||||
*/
|
|
||||||
public static void toggleKeyboardVisibility(Context context)
|
public static void toggleKeyboardVisibility(Context context)
|
||||||
{
|
{
|
||||||
InputMethodManager inputMethodManager = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
|
InputMethodManager inputMethodManager = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
if(inputMethodManager != null)
|
if(inputMethodManager != null){
|
||||||
inputMethodManager.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
|
inputMethodManager.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Force closes the soft keyboard
|
|
||||||
* @param activeView the view with the keyboard focus
|
|
||||||
*/
|
|
||||||
public static void forceCloseKeyboard(View activeView)
|
public static void forceCloseKeyboard(View activeView)
|
||||||
{
|
{
|
||||||
InputMethodManager inputMethodManager = (InputMethodManager) activeView.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
InputMethodManager inputMethodManager = (InputMethodManager) activeView.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
if(inputMethodManager != null)
|
if(inputMethodManager != null){
|
||||||
inputMethodManager.hideSoftInputFromWindow(activeView.getWindowToken(), 0);
|
inputMethodManager.hideSoftInputFromWindow(activeView.getWindowToken(), 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void removeListener()
|
private void removeListener()
|
||||||
{
|
{
|
||||||
mCallback = null;
|
mCallback = null;
|
||||||
|
|
||||||
mRootView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
mRootView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
private KeyboardUtils(Activity act, SoftKeyboardToggleListener listener)
|
private KeyboardUtils(Activity act, SoftKeyboardToggleListener listener)
|
||||||
{
|
{
|
||||||
mCallback = listener;
|
mCallback = listener;
|
||||||
|
|
||||||
mRootView = ((ViewGroup) act.findViewById(android.R.id.content)).getChildAt(0);
|
mRootView = ((ViewGroup) act.findViewById(android.R.id.content)).getChildAt(0);
|
||||||
mRootView.getViewTreeObserver().addOnGlobalLayoutListener(this);
|
mRootView.getViewTreeObserver().addOnGlobalLayoutListener(this);
|
||||||
|
|
||||||
mScreenDensity = act.getResources().getDisplayMetrics().density;
|
mScreenDensity = act.getResources().getDisplayMetrics().density;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,103 +0,0 @@
|
||||||
package com.darkweb.genesissearchengine.helperManager;
|
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.content.ContentUris;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.database.Cursor;
|
|
||||||
import android.net.Uri;
|
|
||||||
import android.os.Build;
|
|
||||||
import android.os.Environment;
|
|
||||||
import android.provider.DocumentsContract;
|
|
||||||
import android.provider.MediaStore;
|
|
||||||
|
|
||||||
import java.net.URISyntaxException;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by Aki on 1/7/2017.
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class PathUtil {
|
|
||||||
/*
|
|
||||||
* Gets the file path of the given Uri.
|
|
||||||
*/
|
|
||||||
@SuppressLint("NewApi")
|
|
||||||
public static String getPath(Context context, Uri uri)
|
|
||||||
{
|
|
||||||
final boolean needToCheckUri = Build.VERSION.SDK_INT >= 19;
|
|
||||||
String selection = null;
|
|
||||||
String[] selectionArgs = null;
|
|
||||||
|
|
||||||
if(uri==null){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (uri.getPathSegments()!=null && needToCheckUri && DocumentsContract.isDocumentUri(context.getApplicationContext(), uri)) {
|
|
||||||
if (isExternalStorageDocument(uri)) {
|
|
||||||
final String docId = DocumentsContract.getDocumentId(uri);
|
|
||||||
final String[] split = docId.split(":");
|
|
||||||
return Environment.getExternalStorageDirectory() + "/" + split[1];
|
|
||||||
} else if (isDownloadsDocument(uri)) {
|
|
||||||
final String id = DocumentsContract.getDocumentId(uri);
|
|
||||||
uri = ContentUris.withAppendedId(
|
|
||||||
Uri.parse("content://downloads/public_downloads"), Long.valueOf(id));
|
|
||||||
} else if (isMediaDocument(uri)) {
|
|
||||||
final String docId = DocumentsContract.getDocumentId(uri);
|
|
||||||
final String[] split = docId.split(":");
|
|
||||||
final String type = split[0];
|
|
||||||
if ("image".equals(type)) {
|
|
||||||
uri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
|
|
||||||
} else if ("video".equals(type)) {
|
|
||||||
uri = MediaStore.Video.Media.EXTERNAL_CONTENT_URI;
|
|
||||||
} else if ("audio".equals(type)) {
|
|
||||||
uri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;
|
|
||||||
}
|
|
||||||
selection = "_id=?";
|
|
||||||
selectionArgs = new String[]{ split[1] };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(uri.getScheme()!=null){
|
|
||||||
if ("content".equalsIgnoreCase(uri.getScheme())) {
|
|
||||||
String[] projection = { MediaStore.Images.Media.DATA };
|
|
||||||
Cursor cursor = null;
|
|
||||||
try {
|
|
||||||
cursor = context.getContentResolver().query(uri, projection, selection, selectionArgs, null);
|
|
||||||
int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
|
|
||||||
if (cursor.moveToFirst()) {
|
|
||||||
return cursor.getString(column_index);
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
}
|
|
||||||
} else if ("file".equalsIgnoreCase(uri.getScheme())) {
|
|
||||||
return uri.getPath();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param uri The Uri to check.
|
|
||||||
* @return Whether the Uri authority is ExternalStorageProvider.
|
|
||||||
*/
|
|
||||||
public static boolean isExternalStorageDocument(Uri uri) {
|
|
||||||
return "com.android.externalstorage.documents".equals(uri.getAuthority());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param uri The Uri to check.
|
|
||||||
* @return Whether the Uri authority is DownloadsProvider.
|
|
||||||
*/
|
|
||||||
public static boolean isDownloadsDocument(Uri uri) {
|
|
||||||
return "com.android.providers.downloads.documents".equals(uri.getAuthority());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param uri The Uri to check.
|
|
||||||
* @return Whether the Uri authority is MediaProvider.
|
|
||||||
*/
|
|
||||||
public static boolean isMediaDocument(Uri uri) {
|
|
||||||
return "com.android.providers.media.documents".equals(uri.getAuthority());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,120 +0,0 @@
|
||||||
package com.darkweb.genesissearchengine.helperManager;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.util.Log;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.widget.ArrayAdapter;
|
|
||||||
import android.widget.Filter;
|
|
||||||
import android.widget.ImageButton;
|
|
||||||
import android.widget.TextView;
|
|
||||||
import com.darkweb.genesissearchengine.appManager.historyManager.historyRowModel;
|
|
||||||
import com.darkweb.genesissearchengine.constants.strings;
|
|
||||||
import com.example.myapplication.R;
|
|
||||||
|
|
||||||
public class autoCompleteAdapter extends ArrayAdapter<historyRowModel> {
|
|
||||||
private final String MY_DEBUG_TAG = "CustomerAdapter";
|
|
||||||
private ArrayList<historyRowModel> items;
|
|
||||||
private ArrayList<historyRowModel> itemsAll;
|
|
||||||
private ArrayList<historyRowModel> suggestions;
|
|
||||||
private int viewResourceId;
|
|
||||||
|
|
||||||
public autoCompleteAdapter(Context context, int viewResourceId, ArrayList<historyRowModel> items) {
|
|
||||||
super(context, viewResourceId, items);
|
|
||||||
this.items = items;
|
|
||||||
this.itemsAll = (ArrayList<historyRowModel>) items.clone();
|
|
||||||
this.suggestions = new ArrayList<>();
|
|
||||||
this.viewResourceId = viewResourceId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public View getView(int position, View convertView, ViewGroup parent) {
|
|
||||||
View v = convertView;
|
|
||||||
if (v == null) {
|
|
||||||
LayoutInflater vi = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
|
||||||
v = vi.inflate(viewResourceId, null);
|
|
||||||
}
|
|
||||||
historyRowModel customer = items.get(position);
|
|
||||||
if (customer != null) {
|
|
||||||
|
|
||||||
TextView customerNameLabel = v.findViewById(R.id.pHeader);
|
|
||||||
TextView myTv = v.findViewById( R.id.pURL);
|
|
||||||
ImageButton mMoveURL = v.findViewById( R.id.pMoveURL);
|
|
||||||
|
|
||||||
if (customerNameLabel != null) {
|
|
||||||
if(customer.getHeader().equals(strings.GENERIC_EMPTY_STR)){
|
|
||||||
customerNameLabel.setText(customer.getHeader() );
|
|
||||||
}else {
|
|
||||||
customerNameLabel.setText(customer.getHeader());
|
|
||||||
}
|
|
||||||
myTv.setText(customer.getDescription());
|
|
||||||
mMoveURL.setTag(customer.getDescription());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return v;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Filter getFilter() {
|
|
||||||
return nameFilter;
|
|
||||||
}
|
|
||||||
|
|
||||||
Filter nameFilter = new Filter() {
|
|
||||||
@Override
|
|
||||||
public String convertResultToString(Object resultValue) {
|
|
||||||
if(resultValue==null){
|
|
||||||
return strings.GENERIC_EMPTY_STR;
|
|
||||||
}
|
|
||||||
historyRowModel model = (historyRowModel)(resultValue);
|
|
||||||
String str = model.getHeader();
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
protected FilterResults performFiltering(CharSequence constraint) {
|
|
||||||
if(constraint != null && !constraint.equals("about:blank")) {
|
|
||||||
suggestions.clear();
|
|
||||||
if(constraint.toString().startsWith("https://")){
|
|
||||||
constraint = constraint.subSequence(0,8);
|
|
||||||
}else if (constraint.toString().startsWith("http://")){
|
|
||||||
constraint = constraint.subSequence(0,7);
|
|
||||||
}
|
|
||||||
for (historyRowModel customer : itemsAll) {
|
|
||||||
if(suggestions.size()>4){
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!customer.getHeader().equals("$TITLE") && customer.getHeader().length()>2 && customer.getDescription().toLowerCase().length()>2 && (customer.getHeader().toLowerCase().contains(constraint.toString().toLowerCase()) || constraint.toString().toLowerCase().toLowerCase().contains(customer.getHeader()) || constraint.toString().toLowerCase().contains(customer.getDescription().toLowerCase()) || customer.getDescription().toLowerCase().contains(constraint.toString().toLowerCase()))){
|
|
||||||
Log.i("memememe:","memememe:"+constraint.toString().toLowerCase().replace("https://","").replace("http://",""));
|
|
||||||
Log.i("memememe1:","memememe2:"+customer.getDescription().replace("https://","").replace("http://",""));
|
|
||||||
suggestions.add(customer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
FilterResults filterResults = new FilterResults();
|
|
||||||
filterResults.values = suggestions;
|
|
||||||
filterResults.count = suggestions.size();
|
|
||||||
return filterResults;
|
|
||||||
} else {
|
|
||||||
return new FilterResults();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
protected void publishResults(CharSequence constraint, FilterResults results)
|
|
||||||
{
|
|
||||||
try{
|
|
||||||
if(results != null) {
|
|
||||||
ArrayList<historyRowModel> filteredList = (ArrayList<historyRowModel>)((ArrayList<historyRowModel>)results.values).clone();
|
|
||||||
|
|
||||||
clear();
|
|
||||||
for (historyRowModel c : filteredList) {
|
|
||||||
add(c);
|
|
||||||
}
|
|
||||||
notifyDataSetChanged();
|
|
||||||
}
|
|
||||||
}catch (Exception ignored){
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
|
@ -5,7 +5,7 @@ import android.content.Intent;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
|
|
||||||
public class OnClearFromRecentService extends Service {
|
public class clearAllRecentServices extends Service {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IBinder onBind(Intent intent) {
|
public IBinder onBind(Intent intent) {
|
|
@ -2,14 +2,14 @@ package com.darkweb.genesissearchengine.helperManager;
|
||||||
|
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
|
|
||||||
public class animatedColor
|
public class colorAnimationReciever
|
||||||
{
|
{
|
||||||
private final int mStartColor, mEndColor;
|
private final int mStartColor, mEndColor;
|
||||||
private final float[] mStartHSV, mEndHSV;
|
private final float[] mStartHSV, mEndHSV;
|
||||||
private float[] mMove = new float[3];
|
private float[] mMove = new float[3];
|
||||||
|
|
||||||
|
|
||||||
public animatedColor(int start, int end) {
|
public colorAnimationReciever(int start, int end) {
|
||||||
mStartColor = start;
|
mStartColor = start;
|
||||||
mEndColor = end;
|
mEndColor = end;
|
||||||
mStartHSV = toHSV(start);
|
mStartHSV = toHSV(start);
|
|
@ -19,10 +19,9 @@ import static java.lang.Thread.sleep;
|
||||||
|
|
||||||
public class downloadFileService extends IntentService
|
public class downloadFileService extends IntentService
|
||||||
{
|
{
|
||||||
private static final String PROXY_ADDRESS = CONST_PROXY_SOCKS;
|
|
||||||
private static final int PROXY_PORT = 9050;
|
|
||||||
private static final String DOWNLOAD_PATH = "com.spartons.androiddownloadmanager_DownloadSongService_Download_path";
|
private static final String DOWNLOAD_PATH = "com.spartons.androiddownloadmanager_DownloadSongService_Download_path";
|
||||||
private static final String DESTINATION_PATH = "com.spartons.androiddownloadmanager_DownloadSongService_Destination_path";
|
private static final String DESTINATION_PATH = "com.spartons.androiddownloadmanager_DownloadSongService_Destination_path";
|
||||||
|
|
||||||
public downloadFileService() {
|
public downloadFileService() {
|
||||||
super("DownloadSongService");
|
super("DownloadSongService");
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,5 +16,4 @@ public class downloadNotification extends BroadcastReceiver {
|
||||||
pluginController.getInstance().onDownloadInvoke(Collections.singletonList(intent.getExtras().getInt("N_ID")), pluginEnums.eDownloadManager.M_CANCEL);
|
pluginController.getInstance().onDownloadInvoke(Collections.singletonList(intent.getExtras().getInt("N_ID")), pluginEnums.eDownloadManager.M_CANCEL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import android.Manifest;
|
||||||
import android.animation.Animator;
|
import android.animation.Animator;
|
||||||
import android.animation.AnimatorListenerAdapter;
|
import android.animation.AnimatorListenerAdapter;
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
|
import android.app.ActivityManager;
|
||||||
import android.app.DownloadManager;
|
import android.app.DownloadManager;
|
||||||
import android.content.ActivityNotFoundException;
|
import android.content.ActivityNotFoundException;
|
||||||
import android.content.ClipData;
|
import android.content.ClipData;
|
||||||
|
@ -25,6 +26,7 @@ import android.graphics.drawable.TransitionDrawable;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Environment;
|
import android.os.Environment;
|
||||||
|
import android.os.Handler;
|
||||||
import android.os.Vibrator;
|
import android.os.Vibrator;
|
||||||
import android.text.SpannableString;
|
import android.text.SpannableString;
|
||||||
import android.text.Spanned;
|
import android.text.Spanned;
|
||||||
|
@ -52,6 +54,7 @@ import androidx.core.content.ContextCompat;
|
||||||
import androidx.core.content.FileProvider;
|
import androidx.core.content.FileProvider;
|
||||||
import androidx.core.graphics.ColorUtils;
|
import androidx.core.graphics.ColorUtils;
|
||||||
|
|
||||||
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
import com.darkweb.genesissearchengine.appManager.homeManager.FakeLauncherActivity;
|
import com.darkweb.genesissearchengine.appManager.homeManager.FakeLauncherActivity;
|
||||||
import com.darkweb.genesissearchengine.constants.enums;
|
import com.darkweb.genesissearchengine.constants.enums;
|
||||||
import com.darkweb.genesissearchengine.constants.keys;
|
import com.darkweb.genesissearchengine.constants.keys;
|
||||||
|
@ -80,6 +83,7 @@ import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
import java.util.concurrent.Callable;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
@ -133,6 +137,18 @@ public class helperMethod
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void onDelayHandler(AppCompatActivity pActivity, int pTime, Callable<Void> pMethodParam) {
|
||||||
|
final Handler handler = new Handler();
|
||||||
|
handler.postDelayed(() ->
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
pMethodParam.call();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}, pTime);
|
||||||
|
}
|
||||||
|
|
||||||
public static void onOpenHelpExternal(AppCompatActivity context, String pURL){
|
public static void onOpenHelpExternal(AppCompatActivity context, String pURL){
|
||||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(pURL));
|
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(pURL));
|
||||||
context.startActivity(browserIntent);
|
context.startActivity(browserIntent);
|
||||||
|
|
|
@ -17,10 +17,10 @@ import java.io.IOException;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
public class JavaScriptInterface {
|
public class internalFileDownloadManager {
|
||||||
private Context context;
|
private Context context;
|
||||||
private NotificationManager nm;
|
private NotificationManager nm;
|
||||||
public JavaScriptInterface(Context context) {
|
public internalFileDownloadManager(Context context) {
|
||||||
this.context = context;
|
this.context = context;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,12 +18,12 @@ import android.os.Environment;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.StrictMode;
|
import android.os.StrictMode;
|
||||||
import android.provider.MediaStore;
|
import android.provider.MediaStore;
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import androidx.core.app.NotificationCompat;
|
import androidx.core.app.NotificationCompat;
|
||||||
import androidx.core.content.FileProvider;
|
import androidx.core.content.FileProvider;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.netcipher.client.StrongHttpsClient;
|
import com.darkweb.genesissearchengine.netcipher.client.StrongHttpsClient;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
|
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
|
||||||
|
@ -39,15 +39,12 @@ import java.net.InetSocketAddress;
|
||||||
import java.net.Proxy;
|
import java.net.Proxy;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLConnection;
|
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
import ch.boye.httpclientandroidlib.HttpHost;
|
|
||||||
import ch.boye.httpclientandroidlib.HttpResponse;
|
import ch.boye.httpclientandroidlib.HttpResponse;
|
||||||
import ch.boye.httpclientandroidlib.client.methods.HttpGet;
|
import ch.boye.httpclientandroidlib.client.methods.HttpGet;
|
||||||
import ch.boye.httpclientandroidlib.conn.params.ConnRoutePNames;
|
|
||||||
|
|
||||||
import static com.darkweb.genesissearchengine.constants.enums.etype.M_DOWNLOAD_FAILURE;
|
import static com.darkweb.genesissearchengine.constants.enums.etype.M_DOWNLOAD_FAILURE;
|
||||||
import static java.lang.Thread.sleep;
|
import static java.lang.Thread.sleep;
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
package com.darkweb.genesissearchengine.helperManager;
|
||||||
|
|
||||||
|
|
||||||
|
import android.os.Build;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.appcompat.app.AppCompatDelegate;
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
|
import com.example.myapplication.R;
|
||||||
|
|
||||||
|
public class sharedUIMethod
|
||||||
|
{
|
||||||
|
/*Shared UI Helper Methods General*/
|
||||||
|
|
||||||
|
public static void updateStatusBar(AppCompatActivity mContext) {
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||||
|
Window window = mContext.getWindow();
|
||||||
|
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
|
||||||
|
|
||||||
|
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) {
|
||||||
|
window.setStatusBarColor(mContext.getResources().getColor(R.color.blue_dark));
|
||||||
|
mContext.getWindow().setStatusBarColor(ContextCompat.getColor(mContext, R.color.landing_ease_blue));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if(AppCompatDelegate.getDefaultNightMode() == AppCompatDelegate.MODE_NIGHT_NO){
|
||||||
|
mContext.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
||||||
|
}
|
||||||
|
mContext.getWindow().setStatusBarColor(ContextCompat.getColor(mContext, R.color.c_background));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
package com.darkweb.genesissearchengine.pluginManager;
|
package com.darkweb.genesissearchengine.pluginManager;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.google.android.gms.ads.*;
|
import com.google.android.gms.ads.*;
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -3,7 +3,7 @@ package com.darkweb.genesissearchengine.pluginManager;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.flurry.android.FlurryAgent;
|
import com.flurry.android.FlurryAgent;
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
@ -2,7 +2,7 @@ package com.darkweb.genesissearchengine.pluginManager;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import com.darkweb.genesissearchengine.helperManager.localFileDownloader;
|
import com.darkweb.genesissearchengine.helperManager.localFileDownloader;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
|
@ -5,7 +5,7 @@ import android.content.res.Resources;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
import com.darkweb.genesissearchengine.constants.constants;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.constants.strings;
|
import com.darkweb.genesissearchengine.constants.strings;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
import com.google.android.material.switchmaterial.SwitchMaterial;
|
import com.google.android.material.switchmaterial.SwitchMaterial;
|
||||||
|
|
|
@ -11,7 +11,7 @@ import android.os.SystemClock;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.core.app.NotificationCompat;
|
import androidx.core.app.NotificationCompat;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.userEngagementNotification;
|
import com.darkweb.genesissearchengine.helperManager.userEngagementNotification;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
|
|
|
@ -11,7 +11,7 @@ import org.torproject.android.service.wrapper.orbotLocalConstants;
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.darkweb.genesissearchengine.constants.*;
|
import com.darkweb.genesissearchengine.constants.*;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
|
|
||||||
import static org.torproject.android.proxy.TorServiceConstants.ACTION_START;
|
import static org.torproject.android.proxy.TorServiceConstants.ACTION_START;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package com.darkweb.genesissearchengine.pluginManager;
|
package com.darkweb.genesissearchengine.pluginManager;
|
||||||
|
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.view.View;
|
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
|
@ -13,7 +12,7 @@ import com.darkweb.genesissearchengine.constants.keys;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
import com.darkweb.genesissearchengine.dataManager.dataController;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
<androidx.core.widget.NestedScrollView
|
||||||
android:id="@+id/mMainScroll"
|
android:id="@+id/pNestedScrollView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:fillViewport="true"
|
android:fillViewport="true"
|
||||||
|
@ -129,10 +129,12 @@
|
||||||
android:layout_marginEnd="12dp"
|
android:layout_marginEnd="12dp"
|
||||||
android:background="@xml/sx_border_left"
|
android:background="@xml/sx_border_left"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:paddingStart="10dp"
|
android:paddingStart="15dp"
|
||||||
android:paddingTop="5dp"
|
android:paddingEnd="10dp"
|
||||||
android:layout_marginBottom="25dp"
|
android:paddingTop="25dp"
|
||||||
android:paddingBottom="25dp"
|
android:paddingBottom="5dp"
|
||||||
|
android:layout_marginBottom="190dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
android:textColor="@color/c_text_v4"
|
android:textColor="@color/c_text_v4"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
@ -141,6 +143,8 @@
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/pLogRecycleView"
|
android:id="@+id/pLogRecycleView"
|
||||||
|
android:fillViewport="true"
|
||||||
|
android:paddingBottom="150dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:nestedScrollingEnabled="false"/>
|
android:nestedScrollingEnabled="false"/>
|
||||||
|
|
|
@ -130,7 +130,7 @@
|
||||||
|
|
||||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:id="@+id/pListView"
|
android:id="@+id/pLogThemeToggle"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:focusable="false"
|
android:focusable="false"
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue