From 7cf4b89e4293c294750b25b61870754a1efbd3f0 Mon Sep 17 00:00:00 2001 From: Genesis Date: Tue, 15 Jun 2021 16:17:59 +0500 Subject: [PATCH] Bug Fixes --- .../widget/Genesis/constants/constants.java | 10 ++ .../com/widget/Genesis/eventObserver.java | 11 ++ .../Genesis/helperMethod/helperMethod.java | 19 +++ .../widgetManager/widgetController.java} | 86 +++-------- .../Genesis/widgetManager/widgetEnums.java | 13 ++ .../widgetManager/widgetModelController.java | 97 ++++++++++++ .../widgetManager/widgetViewController.java | 120 +++++++++++++++ .../com/widget/search/constants/enums.java | 49 ++++++ .../com/widget/search/constants/keys.java | 70 +++++++++ .../com/widget/search/constants/messages.java | 10 ++ .../java/com/widget/search/constants/sql.java | 12 ++ .../com/widget/search/constants/status.java | 139 ++++++++++++++++++ .../com/widget/search/constants/strings.java | 67 +++++++++ app/src/main/res/anim/linear_out_slow_in.xml | 0 14 files changed, 639 insertions(+), 64 deletions(-) create mode 100644 app/src/main/java/com/widget/Genesis/constants/constants.java create mode 100644 app/src/main/java/com/widget/Genesis/eventObserver.java create mode 100644 app/src/main/java/com/widget/Genesis/helperMethod/helperMethod.java rename app/src/main/java/com/widget/{search/searchWidgetManager.java => Genesis/widgetManager/widgetController.java} (59%) create mode 100644 app/src/main/java/com/widget/Genesis/widgetManager/widgetEnums.java create mode 100644 app/src/main/java/com/widget/Genesis/widgetManager/widgetModelController.java create mode 100644 app/src/main/java/com/widget/Genesis/widgetManager/widgetViewController.java create mode 100644 app/src/main/java/com/widget/search/constants/enums.java create mode 100644 app/src/main/java/com/widget/search/constants/keys.java create mode 100644 app/src/main/java/com/widget/search/constants/messages.java create mode 100644 app/src/main/java/com/widget/search/constants/sql.java create mode 100644 app/src/main/java/com/widget/search/constants/status.java create mode 100644 app/src/main/java/com/widget/search/constants/strings.java create mode 100644 app/src/main/res/anim/linear_out_slow_in.xml diff --git a/app/src/main/java/com/widget/Genesis/constants/constants.java b/app/src/main/java/com/widget/Genesis/constants/constants.java new file mode 100644 index 00000000..bc06d783 --- /dev/null +++ b/app/src/main/java/com/widget/Genesis/constants/constants.java @@ -0,0 +1,10 @@ +package com.widget.search.constants; + +import static com.darkweb.genesissearchengine.constants.constants.CONST_WIDGET_NAME; + +public class constants { + + /*LOCAL URL CONSTANTS*/ + public static final String SHARED_PREF_FILE = CONST_WIDGET_NAME; + public static final String COUNT_KEY = "count"; +} diff --git a/app/src/main/java/com/widget/Genesis/eventObserver.java b/app/src/main/java/com/widget/Genesis/eventObserver.java new file mode 100644 index 00000000..a04781fc --- /dev/null +++ b/app/src/main/java/com/widget/Genesis/eventObserver.java @@ -0,0 +1,11 @@ +package com.darkweb.genesissearchengine; + +import java.util.List; + +public class eventObserver +{ + public interface eventListener + { + Object invokeObserver(List data, Object event_type); + } +} diff --git a/app/src/main/java/com/widget/Genesis/helperMethod/helperMethod.java b/app/src/main/java/com/widget/Genesis/helperMethod/helperMethod.java new file mode 100644 index 00000000..ad7e789a --- /dev/null +++ b/app/src/main/java/com/widget/Genesis/helperMethod/helperMethod.java @@ -0,0 +1,19 @@ +package com.widget.search.helperMethod; + +import android.app.PendingIntent; +import android.content.Context; +import android.content.Intent; + +import com.widget.search.searchWidgetManager; + +public class helperMethod +{ + /*Helper Methods General*/ + public static PendingIntent onCreatePendingIntent(Context pContext,int pFlag, int pID, String pAction){ + Intent intentUpdate = new Intent(pContext, searchWidgetManager.class); + intentUpdate.setAction(pAction); + PendingIntent pendingUpdate = PendingIntent.getBroadcast(pContext, pID, intentUpdate, pFlag); + return pendingUpdate; + } + +} diff --git a/app/src/main/java/com/widget/search/searchWidgetManager.java b/app/src/main/java/com/widget/Genesis/widgetManager/widgetController.java similarity index 59% rename from app/src/main/java/com/widget/search/searchWidgetManager.java rename to app/src/main/java/com/widget/Genesis/widgetManager/widgetController.java index 7f0596c3..cc0dc5ee 100644 --- a/app/src/main/java/com/widget/search/searchWidgetManager.java +++ b/app/src/main/java/com/widget/Genesis/widgetManager/widgetController.java @@ -5,56 +5,31 @@ import android.appwidget.AppWidgetManager; import android.appwidget.AppWidgetProvider; import android.content.Context; import android.content.Intent; -import android.content.SharedPreferences; import android.graphics.Color; import android.os.Bundle; +import android.view.View; import android.widget.RemoteViews; import com.darkweb.genesissearchengine.constants.enums; import com.darkweb.genesissearchengine.constants.status; import com.example.myapplication.R; - +import com.widget.search.helperMethod.helperMethod; import static com.darkweb.genesissearchengine.constants.constants.CONST_PACKAGE_NAME; -import static com.darkweb.genesissearchengine.constants.constants.CONST_WIDGET_NAME; public class searchWidgetManager extends AppWidgetProvider { /* Local Variables */ - private static final String SHARED_PREF_FILE = CONST_WIDGET_NAME; - private static final String COUNT_KEY = "count"; - private static int mCurrentWidth = -1; + int mCurrentWidth; /* Navigator Initializations */ private void updateAppWidget(Context context, AppWidgetManager appWidgetManager, int appWidgetId) { - SharedPreferences prefs = context.getSharedPreferences(SHARED_PREF_FILE, 0); - int count = prefs.getInt(COUNT_KEY + appWidgetId, 0); - count++; - RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_search_controller); - SharedPreferences.Editor prefEditor = prefs.edit(); - prefEditor.putInt(COUNT_KEY + appWidgetId, count); - prefEditor.apply(); - - int[] idArray = new int[]{appWidgetId}; - Intent intentUpdate = new Intent(context, searchWidgetManager.class); - intentUpdate.setAction("mOpenApplication"); - intentUpdate.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, idArray); - PendingIntent pendingUpdate = PendingIntent.getBroadcast(context, appWidgetId, intentUpdate, PendingIntent.FLAG_UPDATE_CURRENT); - - Intent mintentUpdate = new Intent(context, searchWidgetManager.class); - mintentUpdate.setAction("mOpenVoice"); - mintentUpdate.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, idArray); - PendingIntent mpintentUpdate = PendingIntent.getBroadcast(context, appWidgetId, mintentUpdate, PendingIntent.FLAG_UPDATE_CURRENT); - - views.setOnClickPendingIntent(R.id.pSearchLogo, pendingUpdate); - views.setOnClickPendingIntent(R.id.pTopBarContainer, pendingUpdate); - views.setOnClickPendingIntent(R.id.pSearchInputWidget, pendingUpdate); - views.setOnClickPendingIntent(R.id.pVoiceInput, mpintentUpdate); + views.setOnClickPendingIntent(R.id.pTextInvoker, helperMethod.onCreatePendingIntent(context, appWidgetId, PendingIntent.FLAG_UPDATE_CURRENT, "mOpenApplication")); + views.setOnClickPendingIntent(R.id.pVoiceInvoker, helperMethod.onCreatePendingIntent(context, appWidgetId, PendingIntent.FLAG_UPDATE_CURRENT, "mOpenVoice")); appWidgetManager.updateAppWidget(appWidgetId, views); - } public void onReceive(Context context, Intent intent) { @@ -95,21 +70,14 @@ public class searchWidgetManager extends AppWidgetProvider { } case AppWidgetManager.ACTION_APPWIDGET_OPTIONS_CHANGED: { Bundle extras = intent.getExtras(); - if (extras != null && extras.containsKey(AppWidgetManager.EXTRA_APPWIDGET_ID) - && extras.containsKey(AppWidgetManager.EXTRA_APPWIDGET_OPTIONS)) { + if (extras != null && extras.containsKey(AppWidgetManager.EXTRA_APPWIDGET_ID)&& extras.containsKey(AppWidgetManager.EXTRA_APPWIDGET_OPTIONS)) { int appWidgetId = extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID); Bundle widgetExtras = extras.getBundle(AppWidgetManager.EXTRA_APPWIDGET_OPTIONS); - this.onAppWidgetOptionsChanged(context, AppWidgetManager.getInstance(context), - appWidgetId, widgetExtras); + this.onAppWidgetOptionsChanged(context, AppWidgetManager.getInstance(context),appWidgetId, widgetExtras); } break; } - case AppWidgetManager.ACTION_APPWIDGET_ENABLED: - this.onEnabled(context); - break; - case AppWidgetManager.ACTION_APPWIDGET_DISABLED: - this.onDisabled(context); - break; + case AppWidgetManager.ACTION_APPWIDGET_RESTORED: { Bundle extras = intent.getExtras(); if (extras != null) { @@ -124,40 +92,30 @@ public class searchWidgetManager extends AppWidgetProvider { } } } - /* Local Overrides */ @Override public void onAppWidgetOptionsChanged (Context context, AppWidgetManager appWidgetManager, int appWidgetId, Bundle widgetInfo) { - int width = widgetInfo.getInt (AppWidgetManager.OPTION_APPWIDGET_MAX_WIDTH); - mCurrentWidth = width; - int[] appWidgetIds = new int[1]; - appWidgetIds[0] = appWidgetId; - onUpdate(context, appWidgetManager, appWidgetIds); + mCurrentWidth = widgetInfo.getInt (AppWidgetManager.OPTION_APPWIDGET_MAX_WIDTH); + onUpdate(context, appWidgetManager, new int[]{appWidgetId}); } @Override public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { - for (int appWidgetId : appWidgetIds) { - updateAppWidget(context, appWidgetManager, appWidgetId); - - int size = getColsNum(mCurrentWidth); + if(mCurrentWidth!=0){ RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_search_controller); - if(mCurrentWidth!=-1){ - if(size<=2){ - views.setTextColor(R.id.pSearchInputWidget, Color.WHITE); - }else { - views.setTextColor(R.id.pSearchInputWidget, Color.GRAY); - } - appWidgetManager.updateAppWidget(appWidgetIds, views); + int size = (int) Math.floor ((mCurrentWidth - 30) / 70);; + + if(size<=3){ + views.setViewVisibility(R.id.pVoiceInput, View.GONE); + views.setViewVisibility(R.id.pSearchInputWidget, View.GONE); + }else { + views.setViewVisibility(R.id.pVoiceInput, View.VISIBLE); + views.setViewVisibility(R.id.pSearchInputWidget, View.VISIBLE); } + appWidgetManager.updateAppWidget(appWidgetIds, views); + }else { + updateAppWidget(context, appWidgetManager, appWidgetIds[0]); } } - - /* Helper Methods */ - - private int getColsNum (int size) { - return (int) Math.floor ((size - 30) / 70); - } - } \ No newline at end of file diff --git a/app/src/main/java/com/widget/Genesis/widgetManager/widgetEnums.java b/app/src/main/java/com/widget/Genesis/widgetManager/widgetEnums.java new file mode 100644 index 00000000..c87345b2 --- /dev/null +++ b/app/src/main/java/com/widget/Genesis/widgetManager/widgetEnums.java @@ -0,0 +1,13 @@ +package com.darkweb.genesissearchengine.appManager.settingManager.settingHomeManager; + +public class settingHomeEnums +{ + /*History Manager*/ + public enum eHomeModel { + } + + public enum eHomeViewController { + M_INIT + } + +} \ No newline at end of file diff --git a/app/src/main/java/com/widget/Genesis/widgetManager/widgetModelController.java b/app/src/main/java/com/widget/Genesis/widgetManager/widgetModelController.java new file mode 100644 index 00000000..84cf2e9c --- /dev/null +++ b/app/src/main/java/com/widget/Genesis/widgetManager/widgetModelController.java @@ -0,0 +1,97 @@ +package com.widget.Genesis.widgetManager; + +import android.appwidget.AppWidgetManager; +import android.appwidget.AppWidgetProvider; +import android.content.Context; +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.RemoteViews; + +import com.darkweb.genesissearchengine.constants.enums; +import com.darkweb.genesissearchengine.constants.status; +import com.darkweb.genesissearchengine.eventObserver; +import com.example.myapplication.R; +import com.widget.Genesis.helperMethod.helperMethod; + +import java.util.List; + +import static com.darkweb.genesissearchengine.constants.constants.CONST_PACKAGE_NAME; + +public class modelViewController extends AppWidgetProvider { + + /*Private Variables*/ + + private eventObserver.eventListener mEvent; + + /*Initializations*/ + + modelViewController(eventObserver.eventListener pEvent) + { + this.mEvent = pEvent; + } + + private void initialize(Context context, Intent intent){ + String action = intent.getAction(); + switch (action) { + case enums.WidgetCommands.OPEN_APPLICATION: { + status.sWidgetResponse = enums.WidgetResponse.SEARCHBAR; + helperMethod.onStartApplication(context, CONST_PACKAGE_NAME); + break; + } + case enums.WidgetCommands.OPEN_VOICE: { + status.sWidgetResponse = enums.WidgetResponse.VOICE; + helperMethod.onStartApplication(context, CONST_PACKAGE_NAME); + break; + } + case AppWidgetManager.ACTION_APPWIDGET_UPDATE: { + Bundle extras = intent.getExtras(); + if (extras != null) { + int[] appWidgetIds = extras.getIntArray(AppWidgetManager.EXTRA_APPWIDGET_IDS); + if (appWidgetIds != null && appWidgetIds.length > 0) { + this.onUpdate(context, AppWidgetManager.getInstance(context), appWidgetIds); + } + } + break; + } + case AppWidgetManager.ACTION_APPWIDGET_DELETED: { + Bundle extras = intent.getExtras(); + if (extras != null && extras.containsKey(AppWidgetManager.EXTRA_APPWIDGET_ID)) { + final int appWidgetId = extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID); + this.onDeleted(context, new int[]{appWidgetId}); + } + break; + } + case AppWidgetManager.ACTION_APPWIDGET_OPTIONS_CHANGED: { + Bundle extras = intent.getExtras(); + if (extras != null && extras.containsKey(AppWidgetManager.EXTRA_APPWIDGET_ID)&& extras.containsKey(AppWidgetManager.EXTRA_APPWIDGET_OPTIONS)) { + int appWidgetId = extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID); + Bundle widgetExtras = extras.getBundle(AppWidgetManager.EXTRA_APPWIDGET_OPTIONS); + this.onAppWidgetOptionsChanged(context, AppWidgetManager.getInstance(context),appWidgetId, widgetExtras); + } + break; + } + + case AppWidgetManager.ACTION_APPWIDGET_RESTORED: { + Bundle extras = intent.getExtras(); + if (extras != null) { + int[] oldIds = extras.getIntArray(AppWidgetManager.EXTRA_APPWIDGET_OLD_IDS); + int[] newIds = extras.getIntArray(AppWidgetManager.EXTRA_APPWIDGET_IDS); + if (oldIds != null && oldIds.length > 0) { + this.onRestored(context, oldIds, newIds); + this.onUpdate(context, AppWidgetManager.getInstance(context), newIds); + } + } + break; + } + } + } + + public Object onTrigger(widgetEnums.eModelViewController pCommands, List pData){ + if(pCommands.equals(widgetEnums.eModelViewController.M_ON_RECIEVE)){ + initialize((Context)pData.get(0), (Intent) pData.get(1)); + } + return null; + } + +} \ No newline at end of file diff --git a/app/src/main/java/com/widget/Genesis/widgetManager/widgetViewController.java b/app/src/main/java/com/widget/Genesis/widgetManager/widgetViewController.java new file mode 100644 index 00000000..ee1c321a --- /dev/null +++ b/app/src/main/java/com/widget/Genesis/widgetManager/widgetViewController.java @@ -0,0 +1,120 @@ +package com.widget.Genesis.widgetManager; + +import android.app.PendingIntent; +import android.appwidget.AppWidgetManager; +import android.appwidget.AppWidgetProvider; +import android.content.Context; +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.RemoteViews; +import com.darkweb.genesissearchengine.constants.enums; +import com.darkweb.genesissearchengine.constants.status; +import com.example.myapplication.R; +import com.widget.Genesis.helperMethod.helperMethod; +import static com.darkweb.genesissearchengine.constants.constants.CONST_PACKAGE_NAME; + +public class widgetController extends AppWidgetProvider { + + /* Local Variables */ + + int mCurrentWidth; + + /* Navigator Initializations */ + + private void updateAppWidget(Context context, AppWidgetManager appWidgetManager, int appWidgetId) { + + RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_search_controller); + + views.setOnClickPendingIntent(R.id.pTextInvoker, helperMethod.onCreatePendingIntent(context, appWidgetId, PendingIntent.FLAG_UPDATE_CURRENT, "mOpenApplication")); + views.setOnClickPendingIntent(R.id.pVoiceInvoker, helperMethod.onCreatePendingIntent(context, appWidgetId, PendingIntent.FLAG_UPDATE_CURRENT, "mOpenVoice")); + appWidgetManager.updateAppWidget(appWidgetId, views); + } + + public void onReceive(Context context, Intent intent) { + + String action = intent.getAction(); + switch (action) { + case enums.WidgetCommands.OPEN_APPLICATION: { + status.sWidgetResponse = enums.WidgetResponse.SEARCHBAR; + Intent launchIntent = context.getPackageManager().getLaunchIntentForPackage(CONST_PACKAGE_NAME); + launchIntent.putExtra(enums.WidgetCommands.OPEN_APPLICATION, true); + context.startActivity(launchIntent); + break; + } + case enums.WidgetCommands.OPEN_VOICE: { + status.sWidgetResponse = enums.WidgetResponse.VOICE; + Intent launchIntent = context.getPackageManager().getLaunchIntentForPackage(CONST_PACKAGE_NAME); + launchIntent.putExtra(enums.WidgetCommands.OPEN_APPLICATION, true); + context.startActivity(launchIntent); + break; + } + case AppWidgetManager.ACTION_APPWIDGET_UPDATE: { + Bundle extras = intent.getExtras(); + if (extras != null) { + int[] appWidgetIds = extras.getIntArray(AppWidgetManager.EXTRA_APPWIDGET_IDS); + if (appWidgetIds != null && appWidgetIds.length > 0) { + this.onUpdate(context, AppWidgetManager.getInstance(context), appWidgetIds); + } + } + break; + } + case AppWidgetManager.ACTION_APPWIDGET_DELETED: { + Bundle extras = intent.getExtras(); + if (extras != null && extras.containsKey(AppWidgetManager.EXTRA_APPWIDGET_ID)) { + final int appWidgetId = extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID); + this.onDeleted(context, new int[]{appWidgetId}); + } + break; + } + case AppWidgetManager.ACTION_APPWIDGET_OPTIONS_CHANGED: { + Bundle extras = intent.getExtras(); + if (extras != null && extras.containsKey(AppWidgetManager.EXTRA_APPWIDGET_ID)&& extras.containsKey(AppWidgetManager.EXTRA_APPWIDGET_OPTIONS)) { + int appWidgetId = extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID); + Bundle widgetExtras = extras.getBundle(AppWidgetManager.EXTRA_APPWIDGET_OPTIONS); + this.onAppWidgetOptionsChanged(context, AppWidgetManager.getInstance(context),appWidgetId, widgetExtras); + } + break; + } + + case AppWidgetManager.ACTION_APPWIDGET_RESTORED: { + Bundle extras = intent.getExtras(); + if (extras != null) { + int[] oldIds = extras.getIntArray(AppWidgetManager.EXTRA_APPWIDGET_OLD_IDS); + int[] newIds = extras.getIntArray(AppWidgetManager.EXTRA_APPWIDGET_IDS); + if (oldIds != null && oldIds.length > 0) { + this.onRestored(context, oldIds, newIds); + this.onUpdate(context, AppWidgetManager.getInstance(context), newIds); + } + } + break; + } + } + } + /* Local Overrides */ + + @Override + public void onAppWidgetOptionsChanged (Context context, AppWidgetManager appWidgetManager, int appWidgetId, Bundle widgetInfo) { + mCurrentWidth = widgetInfo.getInt (AppWidgetManager.OPTION_APPWIDGET_MAX_WIDTH); + onUpdate(context, appWidgetManager, new int[]{appWidgetId}); + } + + @Override + public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { + if(mCurrentWidth!=0){ + RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_search_controller); + int size = (int) Math.floor ((mCurrentWidth - 30) / 70);; + + if(size<=3){ + views.setViewVisibility(R.id.pVoiceInput, View.GONE); + views.setViewVisibility(R.id.pSearchInputWidget, View.GONE); + }else { + views.setViewVisibility(R.id.pVoiceInput, View.VISIBLE); + views.setViewVisibility(R.id.pSearchInputWidget, View.VISIBLE); + } + appWidgetManager.updateAppWidget(appWidgetIds, views); + }else { + updateAppWidget(context, appWidgetManager, appWidgetIds[0]); + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/widget/search/constants/enums.java b/app/src/main/java/com/widget/search/constants/enums.java new file mode 100644 index 00000000..a6acbd4d --- /dev/null +++ b/app/src/main/java/com/widget/search/constants/enums.java @@ -0,0 +1,49 @@ +package com.darkweb.genesissearchengine.constants; + +public class enums +{ + /*Settings Manager*/ + public enum etype{ + M_CHANGE_HOME_THEME, M_IS_ERROR_PAGE, on_update_favicon,M_RELOAD,ON_UPDATE_TAB_TITLE, ON_OPEN_TAB_VIEW,ON_NEW_TAB_ANIMATION, M_UPDATE_SESSION_STATE,ON_LOAD_REQUEST, GECKO_SCROLL_UP, GECKO_SCROLL_UP_ALWAYS, GECKO_SCROLL_DOWN, WAS_SCROLL_CHANGED, GECKO_SCROLL_DOWN_MOVE, GECKO_SCROLL_UP_MOVE, GECKO_SCROLL_DOWN_CALLER,ON_UPDATE_SEARCH_BAR,M_ON_MAIL,SESSION_ID,M_UPDATE_PIXEL_BACKGROUND, M_ON_SCROLL_BOUNDARIES, M_ON_SCROLL_TOP_BOUNDARIES, M_ON_SCROLL_NO_BOUNDARIES, M_INIT_PADDING, M_RATE_COUNT,M_CACHE_UPDATE_TAB,M_DEFAULT_BROWSER, + on_verify_selected_url_menu,FINDER_RESULT_CALLBACK,M_ADMOB_BANNER_RECHECK,M_OPEN_SESSION,M_DOWNLOAD_FAILURE, M_ADVERT_LOADED, + welcome, reload,download_folder, M_UPDATE_THEME,M_ON_BANNER_UPDATE, M_LOAD_HOMEPAGE_GENESIS,M_INIT_TAB_COUNT_FORCED,M_SPLASH_DISABLE,M_NEW_LINK_IN_NEW_TAB,M_RESET_SUGGESTION, + url_triggered, url_triggered_new_tab,url_clear,fetch_favicon, M_COPY_URL,url_clear_at,remove_from_database,is_empty,M_HOME_PAGE,M_PRELOAD_URL,ON_KEYBOARD_CLOSE,M_CLOSE_TAB, + on_close_sesson,on_long_press, on_full_screen,on_handle_external_intent,on_update_suggestion_url,progress_update,progress_update_forced, ON_EXPAND_TOP_BAR,recheck_orbot,on_url_load,on_playstore_load,back_list_empty,start_proxy, ON_UPDATE_THEME, M_NEW_IDENTITY, M_NEW_IDENTITY_MESSAGED, M_INITIALIZE_TAB_SINGLE, M_INITIALIZE_TAB_LINK,on_request_completed, on_update_history,on_update_suggestion,M_WELCOME_MESSAGE,ON_FIRST_PAINT, ON_LOAD_TAB_ON_RESUME, ON_SESSION_REINIT,on_page_loaded,on_load_error, M_ORBOT_LOADING,download_file_popup,on_init_ads, M_GET_CURRENT_URL,search_update, open_new_tab,open_new_tab_instant + } + + /*General Enums*/ + + public static class AddTabCallback { + public static final int TAB_ADDED = 0; + public static final int TAB_FULL = 1; + } + + public static class Theme { + public static final int THEME_LIGHT = 0; + public static final int THEME_DARK = 1; + public static final int THEME_DEFAULT = 2; + } + + public static class WidgetResponse { + public static final int NONE = 0; + public static final int VOICE = 1; + public static final int SEARCHBAR = 2; + } + + public static class ImageQueueStatus { + public static final int M_IMAGE_LOADING = 0; + public static final int M_IMAGE_LOADED_SUCCESSFULLY = 1; + public static final int M_IMAGE_LOADING_FAILED = 2; + } + + public static class ScrollDirection { + public static final int HORIZONTAL = 0; + public static final int VERTICAL = 1; + } + + public static class WidgetCommands { + public static final String OPEN_APPLICATION = "mOpenApplication"; + public static final String OPEN_VOICE = "mOpenVoice"; + } + +} \ No newline at end of file diff --git a/app/src/main/java/com/widget/search/constants/keys.java b/app/src/main/java/com/widget/search/constants/keys.java new file mode 100644 index 00000000..7745a57e --- /dev/null +++ b/app/src/main/java/com/widget/search/constants/keys.java @@ -0,0 +1,70 @@ +package com.darkweb.genesissearchengine.constants; + +public class keys +{ + /*Home page*/ + + public static String HOME_LOW_MEMORY = "LOW_MEMORY"; + public static final String HOME_REFERENCE_WEBSITES = "HOME_REFERENCE_WEBSITES"; + + /*Proxy Manager*/ + + public static final String PROXY_TYPE = "network.proxy.type"; + public static final String PROXY_SOCKS = "network.proxy.socks"; + public static final String PROXY_SOCKS_PORT = "network.proxy.socks_port"; + public static final String PROXY_SOCKS_VERSION = "network.proxy.socks_version"; + public static final String PROXY_SOCKS_REMOTE_DNS = "network.proxy.socks_remote_dns"; + public static final String PROXY_CACHE = "browser.cache.disk.enable"; + public static final String PROXY_MEMORY = "browser.cache.memory.enable"; + public static final String PROXY_DO_NOT_TRACK_HEADER_ENABLED = "privacy.donottrackheader.enabled"; + public static final String PROXY_DO_NOT_TRACK_HEADER_VALUE = "privacy.donottrackheader.value"; + public static final String PROXY_IS_APP_RATED = "IS_APP_RATED"; + public static final String PROXY_LIST_TYPE = "list_type"; + public static final String PROXY_IMAGE = "permissions.default.image"; + + /*Settings*/ + + public static final String SETTING_VERSION = "VERSION_V1"; + public static final String SETTING_LANGUAGE = "LANGUAGE_V1"; + public static final String SETTING_LANGUAGE_REGION = "LANGUAGE_REGION_V1"; + public static final String SETTING_SEARCH_ENGINE = "SEARCH_ENGINE_V1"; + public static final String SETTING_FIRST_INSTALLED = "FIRST_INSTALLED_V1"; + public static final String SETTING_JAVA_SCRIPT = "JAVA_SCRIPT_V1"; + public static final String SETTING_POPUP = "POPUP_V1"; + public static final String SETTING_HISTORY_CLEAR = "HISTORY_CLEAR_V1"; + public static final String SETTING_GATEWAY = "pref_bridges_enabled_auto_V1"; + public static final String SETTING_GATEWAY_MANUAL = "pref_bridges_enabled_manual_V1"; + public static final String SETTING_IS_BOOTSTRAPPED = "IS_BOOTSTRAPPED_V1"; + public static final String SETTING_IS_WELCOME_ENABLED = "IS_WELCOME_ENABLED_V1"; + public static final String SETTING_FONT_SIZE = "FONT_SIZE_V1"; + public static final String SETTING_FONT_ADJUSTABLE = "FONT_ADJUSTABLE_V1"; + public static final String SETTING_COOKIE_ADJUSTABLE = "COOKIE_ADJUSTABLE_NEW_V1"; + public static final String SETTING_NOTIFICATION_STATUS = "NOTIFICATION_STATUS_V1"; + public static final String SETTING_SEARCH_HISTORY = "SETTING_SEARCH_HISTORY_V1"; + public static final String SETTING_SEARCH_SUGGESTION = "SETTING_SEARCH_STATUS_V1"; + public static final String SETTING_ZOOM = "SETTING_ZOOM_V1"; + public static final String SETTING_VOICE_INPUT = "SETTING_VOICE_INPUT_V1"; + public static final String SETTING_TRACKING_PROTECTION = "SETTING_TRACKING_PROTECTION_V1"; + public static final String SETTING_RATE_COUNT = "SETTING_RATE_COUNT_V1"; + public static final String SETTING_DONOT_TRACK = "SETTING_DONOT_TRACK_V1"; + public static final String SETTING_RESTORE_TAB = "SETTING_RESTORE_TAB_V1"; + public static final String SETTING_CHARACTER_ENCODING = "SETTING_CHARACTER_ENCODING_V1"; + public static final String SETTING_SHOW_IMAGES = "SETTING_SHOW_IMAGES_V1"; + public static final String SETTING_SHOW_TAB_GRID = "SETTING_SHOW_TAB_GRID_V1"; + public static final String SETTING_SHOW_FONTS = "SETTING_SHOW_FONTS_V1"; + public static final String SETTING_TOOLBAR_THEME = "SETTING_TOOLBAR_THEME_V1"; + public static final String SETTING_THEME = "SETTING_THEME_LIGHT_V1"; + public static final String SETTING_FULL_SCREEN_BROWSIING = "SETTING_FULL_SCREEN_BROWSIING_V2"; + public static final String SETTING_OPEN_URL_IN_NEW_TAB = "SETTING_OPEN_URL_IN_NEW_TAB_V1"; + public static final String SETTING_LIST_VIEW = "SETTING_LIST_VIEW_V1"; + public static final String SETTING_INSTALLED = "SETTING_INSTALLED_V1"; + + /*Bridge Settings*/ + + public static final String BRIDGE_CUSTOM_BRIDGE_1 = "CLEAR_PREFS_V1"; + public static final String BRIDGE_CUSTOM_TYPE = "BRIDGE_CUSTOM_TYPE_V1"; + public static final String BRIDGE_ENABLES = "pref_bridges_enabled_V1"; + public static final String VPN_ENABLED = "pref_vpn_V1"; + public static final String BRIDGE_DEFAULT = "BRIDGE_DEFAULT"; + +} diff --git a/app/src/main/java/com/widget/search/constants/messages.java b/app/src/main/java/com/widget/search/constants/messages.java new file mode 100644 index 00000000..367fb622 --- /dev/null +++ b/app/src/main/java/com/widget/search/constants/messages.java @@ -0,0 +1,10 @@ +package com.darkweb.genesissearchengine.constants; + +public class messages +{ + /*POST MESSAGES KEYS*/ + + public final static int MESSAGE_UPDATE_LOADING_TEXT =1; + public final static int MESSAGE_ON_URL_LOAD =2; + public final static int MESSAGE_PROGRESSBAR_VALIDATE =3; +} diff --git a/app/src/main/java/com/widget/search/constants/sql.java b/app/src/main/java/com/widget/search/constants/sql.java new file mode 100644 index 00000000..6b3e5c64 --- /dev/null +++ b/app/src/main/java/com/widget/search/constants/sql.java @@ -0,0 +1,12 @@ +package com.darkweb.genesissearchengine.constants; + +public class sql +{ + /*HISTORY*/ + + public static final String SQL_CLEAR_HISTORY = "delete from history where 1"; + public static final String SQL_CLEAR_BOOKMARK = "delete from bookmark where 1"; + public static final String SQL_CLEAR_TAB = "delete from tab where 1"; + + +} diff --git a/app/src/main/java/com/widget/search/constants/status.java b/app/src/main/java/com/widget/search/constants/status.java new file mode 100644 index 00000000..7eb15b78 --- /dev/null +++ b/app/src/main/java/com/widget/search/constants/status.java @@ -0,0 +1,139 @@ +package com.darkweb.genesissearchengine.constants; + +import android.content.Context; + +import com.darkweb.genesissearchengine.dataManager.dataController; +import com.darkweb.genesissearchengine.dataManager.dataEnums; + +import org.mozilla.geckoview.ContentBlocking; + +import java.util.Arrays; +import java.util.Locale; + +import static org.mozilla.geckoview.ContentBlocking.CookieBehavior.ACCEPT_FIRST_PARTY; + +public class status +{ + /*App Status*/ + + public static boolean sPaidStatus = false; + public static boolean sDeveloperBuild = false; + + /*Settings Status*/ + public static Locale mSystemLocale = null; + + public static String sSettingSearchStatus = constants.CONST_BACKEND_GENESIS_URL; + public static String sSettingRedirectStatus = strings.GENERIC_EMPTY_STR; + public static String sSettingLanguage = "en"; + public static String sSettingLanguageRegion = "Us"; + public static String sReferenceWebsites; + public static String sBridgeCustomBridge = strings.GENERIC_EMPTY_STR; + public static String sBridgeCustomType = strings.GENERIC_EMPTY_STR; + public static String sVersion = ""; + public static String sExternalWebsite = strings.GENERIC_EMPTY_STR; + public static String sBridgesDefault = strings.BRIDGES_DEFAULT; + + public static boolean sUIInteracted = false; + public static boolean sSettingEnableZoom = true; + public static boolean sSettingEnableVoiceInput = true; + public static boolean sSettingSearchHistory = false; + public static boolean sSearchSuggestionStatus = false; + public static boolean sSettingJavaStatus = true; + public static boolean sSettingPopupStatus = false; + public static boolean sClearOnExit = true; + public static boolean sSettingIsAppPaused = false; + public static boolean sSettingIsWelcomeEnabled = true; + public static boolean sSettingIsAppStarted = false; + public static boolean sSettingIsAppRunning = false; + public static boolean sSettingIsAppRedirected = false; + public static boolean sSettingIsAppRestarting = false; + public static boolean sSettingIsAppRated = false; + public static boolean sSettingFontAdjustable = true; + public static boolean sSettingFirstStart = true; + public static boolean mThemeApplying = false; + public static boolean sTabGridLayoutEnabled = true; + public static boolean sStatusDoNotTrack = true; + public static boolean sRestoreTabs = false; + public static boolean sCharacterEncoding = false; + public static boolean sShowWebFonts = true; + public static boolean sToolbarTheme = false; + public static boolean sFullScreenBrowsing = false; + public static boolean sOpenURLInNewTab = true; + public static boolean sDefaultNightMode; + public static boolean sLogThemeStyleAdvanced; + public static boolean sBridgeGatewayAuto = false; + public static boolean sBridgeGatewayManual = false; + public static boolean sVPNStatus = false; + public static boolean sVPNPermission = false; + public static boolean sBridgeStatus = false; + public static boolean sAppInstalled = false; + + public static int sTheme = enums.Theme.THEME_DEFAULT; + public static int sSettingCookieStatus = ContentBlocking.AntiTracking.DEFAULT; + public static int sShowImages = -1; + public static int sWidgetResponse = enums.WidgetResponse.NONE; + public static int sBridgeNotificationManual = 0; + public static int sSettingTrackingProtection = 0; + public static int sGlobalURLCount = 0; + + public static float sSettingFontSize = 1; + + public static boolean sDisableExpandTemp = false; + + private static void versionVerifier(Context pContext){ + status.sVersion = (String)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_STRING, Arrays.asList(keys.SETTING_VERSION,strings.GENERIC_EMPTY_STR)); + if(!status.sVersion.equals("1.0.0.1")){ + pContext.deleteDatabase(constants.CONST_DATABASE_NAME); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_CLEAR_PREFS, null); + status.sVersion = "1.0.0.1"; + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_STRING, Arrays.asList(keys.SETTING_VERSION,strings.SETTING_DEFAULT_VERSION)); + } + } + + public static void initStatus(Context pContext) + { + versionVerifier(pContext); + + status.sUIInteracted = false; + status.sSettingSearchHistory = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_SEARCH_HISTORY,true)); + status.sSearchSuggestionStatus = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_SEARCH_SUGGESTION,true)); + status.sSettingJavaStatus = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_JAVA_SCRIPT,true)); + status.sSettingPopupStatus = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_POPUP,true)); + status.sClearOnExit = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_HISTORY_CLEAR,true)); + status.sBridgeGatewayAuto = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_GATEWAY,true)); + status.sBridgeGatewayManual = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_GATEWAY_MANUAL,false)); + status.sSettingIsWelcomeEnabled = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_IS_WELCOME_ENABLED,true)); + status.sSettingIsAppRated = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.PROXY_IS_APP_RATED,false)); + status.sVPNStatus = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.VPN_ENABLED,false)); + status.sBridgeStatus = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.BRIDGE_ENABLES,false)); + status.sSettingFontAdjustable = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_FONT_ADJUSTABLE,true)); + status.sSettingFirstStart = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_FIRST_INSTALLED,true)); + status.sSettingEnableZoom = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_ZOOM,true)); + status.sSettingEnableVoiceInput = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_VOICE_INPUT,true)); + status.sSettingTrackingProtection = (int)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_INT, Arrays.asList(keys.SETTING_TRACKING_PROTECTION, ContentBlocking.AntiTracking.DEFAULT)); + status.sStatusDoNotTrack = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_DONOT_TRACK,true)); + status.sSettingCookieStatus = (int)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_INT, Arrays.asList(keys.SETTING_COOKIE_ADJUSTABLE,ACCEPT_FIRST_PARTY)); + status.sSettingFontSize = (int)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_FLOAT, Arrays.asList(keys.SETTING_FONT_SIZE,100)); + status.sSettingLanguage = (String)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_STRING, Arrays.asList(keys.SETTING_LANGUAGE,strings.SETTING_DEFAULT_LANGUAGE)); + status.sReferenceWebsites = (String)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_STRING, Arrays.asList(keys.HOME_REFERENCE_WEBSITES,strings.HOME_REFERENCE_WEBSITES_DEFAULT)); + status.sSettingLanguageRegion = (String)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_STRING, Arrays.asList(keys.SETTING_LANGUAGE_REGION,strings.SETTING_DEFAULT_LANGUAGE_REGION)); + status.sSettingSearchStatus = (String)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_STRING, Arrays.asList(keys.SETTING_SEARCH_ENGINE,constants.CONST_BACKEND_GENESIS_URL)); + status.sBridgeCustomBridge = (String)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_STRING, Arrays.asList(keys.BRIDGE_CUSTOM_BRIDGE_1,strings.BRIDGE_CUSTOM_BRIDGE_OBFS4)); + status.sBridgeCustomType = (String)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_STRING, Arrays.asList(keys.BRIDGE_CUSTOM_TYPE,strings.GENERIC_EMPTY_SPACE)); + status.sBridgesDefault = (String)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_STRING, Arrays.asList(keys.BRIDGE_DEFAULT,strings.BRIDGES_DEFAULT)); + status.sBridgeNotificationManual = (int)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_INT, Arrays.asList(keys.SETTING_NOTIFICATION_STATUS,1)); + status.sRestoreTabs = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_RESTORE_TAB,false)); + status.sCharacterEncoding = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_CHARACTER_ENCODING,false)); + status.sShowImages = (int)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_INT, Arrays.asList(keys.SETTING_SHOW_IMAGES,0)); + status.sShowWebFonts = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_SHOW_FONTS,true)); + status.sFullScreenBrowsing = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_FULL_SCREEN_BROWSIING,false)); + 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.sOpenURLInNewTab = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_OPEN_URL_IN_NEW_TAB,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.sGlobalURLCount = (int)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_INT, Arrays.asList(keys.SETTING_RATE_COUNT, 0)); + status.sAppInstalled = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_INSTALLED,false)); + } + +} diff --git a/app/src/main/java/com/widget/search/constants/strings.java b/app/src/main/java/com/widget/search/constants/strings.java new file mode 100644 index 00000000..2ac6fec6 --- /dev/null +++ b/app/src/main/java/com/widget/search/constants/strings.java @@ -0,0 +1,67 @@ +package com.darkweb.genesissearchengine.constants; + +public class strings +{ + /*Notification Manager Manager*/ + public static final String NOTIFICATION_TITLE = "Genesis Browser"; + public static final String[] NOTIFICATION_BODY = {"Genesis Browser updated successfully", + "Use Genesis Browser to enhance your privacy", + "Privacy and security enhanced, use Genesis Browser", + "Hidden web & Genesis Search Engine updated", + "Live websites updated on Genesis Search Engine", + "Access secure part of internet, Use Genesis Browser", + "Your privacy matters to us, Use Genesis browser", + "Stop tracking, use Genesis Browser"}; + + + /*History Manager*/ + public static final String HISTORY_TITLE = "history"; + public static final String HISTORY_CLEAR_HISTORY = "Clear History"; + public static final String HISTORY_NO_HISTORY_FOUND = "No History Found"; + + /*Bookmark Manager*/ + public static final String BOOKMARK_CLEAR_BOOKMARK = "Clear Bookmark"; + public static final String BOOKMARK_NO_BOOKMARK_FOUND = "No Bookmark Found"; + public static final String BOOKMARK_DEFAULT_TITLE = "New Bookmark"; + + /*Bridge Manager*/ + + public static final String BRIDGE_CUSTOM_BRIDGE_OBFS4 = "obfs4"; + public static final String BRIDGE_CUSTOM_BRIDGE_MEEK = "meek"; + public static final String BRIDGES_DEFAULT = "obfs4 78.215.187.186:45675 AE907EE5FAA5D0D27E0C83EFA6ADF8E79FCC0FF1 cert=/TRjMo+RinKaixARMjMtZZBhystaBe+aDaapPrbiITFtWx3M/AJcvpjHjO54tJqLd1+IWQ iat-mode=0\n" + + "obfs4 107.160.7.24:443 7A0904F6D182B81BEFE0DEDAFEC974494672627B cert=a5/IlZMnDvb8d92LTHMfsBIgL7QlDLPiXiLwe85uedC80mGD0QerygzmsWnMEdwG9ER9Eg iat-mode=0\n" + + "obfs4 79.136.160.201:46501 66AC975BF7CB429D057AE07FC0312C57D61BAEC1 cert=dCtn9Ya8z+R8YQikdWgC3XTAt58z5Apnm95QHrJwnhFSdnphPPEz+NMm6OawWc2srKLjJg iat-mode=0\n" + + "obfs4 94.242.249.2:58809 6AF3024788A7EA8F84E3FA3F60018B62291803E4 cert=X0sDCJLKMM/EISdGDEfGrsks41UYmScjIIXQ9AZgWFVKNKS6klcNEpdF4tNXFz6kIyk4Ug iat-mode=0\n" + + "obfs4 35.203.134.33:2224 15524C683CC872C8C8FB5B779A8D53F54F7ADCD4 cert=bXLTv0Kwt1zgPBoeVF86vC+0tYAHepR7+QMczhhTQw9hpAIhatt/Bpe6rSGY63Zh8aZ+dQ iat-mode=0\n" + + "obfs4 188.166.252.228:9443 595770328CA95E39FF5B81013880B46CA1B29546 cert=3PjhGUq3xWDMrBAzbV1eU4zPSB3GRGBpYdXQEs9hkrwC9RSZdnEe1P+cg7VgLgYTj/2MMg iat-mode=0\n" + + "obfs4 89.163.181.169:443 6A17D1E29E2807A1A4314215553079001031A7FF cert=e8JIYivx1zbYNOqq3a3+nDf/NDHoDQ/th/RVAnlVQePUIHxllG7aOku7pSwZisZ7i6ybVw iat-mode=0\n" + + "obfs4 94.242.249.2:40190 C7BE8154678E7537CCAC60B097D51A8A7EF8BCDF cert=8jw57wlMlVXCKsCnF7gCdApx7sRZLD5zPl8qdccwp0zltYG6kMYqBNm60dP8IxRH/l8OcQ iat-mode=0\n" + + "obfs4 77.81.104.251:443 115C90EBD0EB631C177560A872535772215478D9 cert=UsuF7oN4KNKviZP54JOyTCoCphrdM5gwZK4vT8GnCAcmqLUJEJxyw1dpko9a/ii6He4iZg iat-mode=0\n" + + "obfs4 5.249.146.133:80 FAF3A0073330D6AD92F3B4874B0D945562A633EF cert=TRe8bAODtjcGij7EPQaUayWEOqR99wDh2l3B4hFtCsn1JTJCph03pRZ9tx8wynpLYKWMQg iat-mode=0\n" + + "meek_lite 0.0.2.0:2 97700DFE9F483596DDA6264C4D7DF7641E1E39CE url=https://meek.azureedge.net/ front=ajax.aspnetcdn.com\n" + + "snowflake 192.0.2.3:1"; + + /*Generic*/ + + public static final String GENERIC_EMPTY_STR = ""; + public static final String GENERIC_EMPTY_SPACE = " "; + + /*Language Manager*/ + public static final String LANGUAGE_NOT_SUPPORTED = "is unsupported"; + + /*Settings Manager*/ + + public static final String SETTING_DEFAULT_LANGUAGE = "en"; + public static final String SETTING_DEFAULT_LANGUAGE_REGION = "Us"; + public static final String SETTING_DEFAULT_VERSION = "1.0.0.1"; + + /*Home Manager*/ + + public static final String HOME_BLANK_PAGE = "about:blank"; + public static final String HOME_REFERENCE_WEBSITES_DEFAULT = "[{\"mUrl\":\"https://www.wikileaks.org/wiki/Wikileaks\",\"mIcon\":\"https://www.wikileaks.org/wiki/Wikileaks/w/images/favicon.ico\",\"mHeader\":\"WikiLeaks (en)\",\"mBody\":\"WikiLeaks specializes in the publication of censored or otherwise restricted official materials involving war, and corruption\"},{\"mUrl\":\"http://p53lf57qovyuvwsc6xnrppyply3vtqm7l6pcobkmyqsiofyeznfu5uqd.onion/\",\"mIcon\":\"http://assets.p53lf57qovyuvwsc6xnrppyply3vtqm7l6pcobkmyqsiofyeznfu5uqd.onion/static/prod/v4/images/favicon-32x32.png\",\"mHeader\":\"Pro Publica\",\"mBody\":\"ProPublica is an independent, nonprofit newsroom that produces investigative journalism with moral force\"},{\"mUrl\":\"http://nzh3fv6jc6jskki3.onion/\",\"mIcon\":\"http://nzh3fv6jc6jskki3.onion/assets/images/favicon.png\",\"mHeader\":\"Rise UP | Communication Service\",\"mBody\":\"We are a project to create democratic alternatives and practiceself-determination by controlling our own secure means of communications\"},{\"mUrl\":\"http://answerszuvs3gg2l64e6hmnryudl5zgrmwm3vh65hzszdghblddvfiqd.onion/\",\"mIcon\":\"https://www.freeiconspng.com/uploads/questions-and-answers-icon-1.png\",\"mHeader\":\"Hidden Answer\",\"mBody\":\"Once you access the site, you’ll soon notice that the questions on Hidden Answers touch upon a variety of topics\"},{\"mUrl\":\"http://zerobinqmdqd236y.onion/\",\"mIcon\":\"https://icon-library.net//images/zero-icon/zero-icon-15.jpg\",\"mHeader\":\"Zero Bin\",\"mBody\":\"ZeroBin.net is a minimalist, open source online pastebin where the server has zero knowledge of pasted data\"},{\"mUrl\":\"http://kx5thpx2olielkihfyo4jgjqfb7zx7wxr3sd4xzt26ochei4m6f7tayd.onion/\",\"mIcon\":\"http://kx5thpx2olielkihfyo4jgjqfb7zx7wxr3sd4xzt26ochei4m6f7tayd.onion/img/favicon.ico\",\"mHeader\":\"Imperial Library\",\"mBody\":\"The Imperial Library of Trantor (also known as Galactic Library) is a repository of DRM-free ebooks on ePub format\"},{\"mUrl\":\"http://zqktlwiuavvvqqt4ybvgvi7tyo4hjl5xgfuvpdf6otjiycgwqbym2qad.onion/wiki/index.php/Main_Page\",\"mIcon\":\"http://zqktlwiuavvvqqt4ybvgvi7tyo4hjl5xgfuvpdf6otjiycgwqbym2qad.onion/wiki/resources/favicon.ico\",\"mHeader\":\"Hidden Wiki\",\"mBody\":\"One of the largest repository of categorized hidden web URL's\"},{\"mUrl\":\"https://www.facebookcorewwwi.onion/\",\"mIcon\":\"https://cdn1.iconfinder.com/data/icons/logotypes/32/square-facebook-512.png\",\"mHeader\":\"Facebook\",\"mBody\":\"Connect with friends and the world around you on Facebook\"},{\"mUrl\":\"https://www.bbcnewsv2vjtpsuy.onion/\",\"mIcon\":\"https://gn-web-assets.api.bbc.com/wwhp/20210105-1702-7302953dc6fd22d3eb4efd4d73bfd2a8d91bb7df/responsive/img/apple-touch/apple-touch-180.jpg\",\"mHeader\":\"BBC News\",\"mBody\":\"We’re impartial and independent, and every day we create distinctive, world class programmes and content which inform millions of people around the world\"},{\"mUrl\":\"http://archivecaslytosk.onion/\",\"mIcon\":\"https://archive.is/apple-touch-icon-144x144.png\",\"mHeader\":\"Archieve Today\",\"mBody\":\"It takes a 'snapshot' of a webpage that will always be online even if the original page disappears. It saves a text and a graphical copy of the legacy page\"},{\"mUrl\":\"http://wasabiukrxmkdgve5kynjztuovbg43uxcbcxn6y2okcrsg7gb6jdmbad.onion/\",\"mIcon\":\"http://wasabiukrxmkdgve5kynjztuovbg43uxcbcxn6y2okcrsg7gb6jdmbad.onion/images/favicon.ico\",\"mHeader\":\"Wasabi Wallet\",\"mBody\":\"Wasabi is an open-source, non-custodial, privacy-focused Bitcoin wallet for Desktop, that implements trustless CoinJoin\"},{\"mUrl\":\"http://ow24et3tetp6tvmk.onion/\",\"mIcon\":\"http://ow24et3tetp6tvmk.onion/favicon.ico\",\"mHeader\":\"Onion Wallet\",\"mBody\":\"When using Bitcoin together with Tor you are combining the best online money with the best encryption and privacy technology available\"},{\"mUrl\":\"http://piratebayztemzmv.onion/\",\"mIcon\":\"http://piratebayztemzmv.onion/images/tpb.jpg\",\"mHeader\":\"The Pirate Bay\",\"mBody\":\"The Pirate Bay allows users to search for Magnet links. These are used to reference resources available for download via peer-to-peer networks\"}]"; + + /*Message Manager*/ + + public static final String MESSAGE_PLAYSTORE_NOT_FOUND = "Playstore Not Found"; +} + diff --git a/app/src/main/res/anim/linear_out_slow_in.xml b/app/src/main/res/anim/linear_out_slow_in.xml new file mode 100644 index 00000000..e69de29b