diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/activityContextManager.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/activityContextManager.java index 7e4f23f1..6c893f9d 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/activityContextManager.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/activityContextManager.java @@ -11,6 +11,8 @@ import com.darkweb.genesissearchengine.appManager.orbotLogManager.orbotLogContro import com.darkweb.genesissearchengine.appManager.settingManager.generalManager.settingGeneralController; import com.darkweb.genesissearchengine.appManager.settingManager.settingHomePage.settingHomeController; import com.darkweb.genesissearchengine.appManager.tabManager.tabController; +import com.darkweb.genesissearchengine.helperManager.theme; + import java.lang.ref.WeakReference; import java.util.ArrayList; @@ -168,6 +170,16 @@ public class activityContextManager }catch (Exception ignored){} } + public void onResetTheme(){ + for(int mCounter=0;mCounter mHelpAdapter.onTrigger(helpEnums.eHelpAdapter.M_INIT_FILTER, Collections.singletonList(mSearchInput.getText().toString())); + if(mHelpAdapter!=null){ + postToServerRunnable = () -> mHelpAdapter.onTrigger(helpEnums.eHelpAdapter.M_INIT_FILTER, Collections.singletonList(mSearchInput.getText().toString())); + } mSearchInput.addTextChangedListener(new TextWatcher() { diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/historyManager/historyController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/historyManager/historyController.java index d5538d12..eefd8a91 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/historyManager/historyController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/historyManager/historyController.java @@ -88,6 +88,7 @@ public class historyController extends AppCompatActivity public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); super.onConfigurationChanged(newConfig); + activityContextManager.getInstance().onResetTheme(); theme.getInstance().onConfigurationChanged(this); } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/geckoManager/geckoClients.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/geckoManager/geckoClients.java index f1e3d4a6..299dcb6a 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/geckoManager/geckoClients.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/geckoManager/geckoClients.java @@ -384,24 +384,28 @@ public class geckoClients @Override public Object invokeObserver(List data, Object e_type) { - if(e_type.equals(enums.etype.SESSION_ID)){ - return mSession.getSessionID(); - } - else if (mSessionID!=null && mSessionID.equals(data.get(1)) || e_type.equals(enums.etype.FINDER_RESULT_CALLBACK) || e_type.equals(enums.etype.ON_UPDATE_TAB_TITLE) || e_type.equals(enums.etype.on_update_favicon) ||e_type.equals(enums.etype.on_update_history) || e_type.equals(enums.etype.on_request_completed) || e_type.equals(enums.etype.on_update_suggestion) || e_type.equals(enums.etype.on_update_suggestion_url)) - { - if (e_type.equals(on_handle_external_intent)) + if(mSession!=null && mSession.isClosed()){ + return null; + }else if(mSession!=null) { + if(e_type.equals(enums.etype.SESSION_ID)){ + return mSession.getSessionID(); + } + else if (mSessionID!=null && mSessionID.equals(data.get(1)) || e_type.equals(enums.etype.FINDER_RESULT_CALLBACK) || e_type.equals(enums.etype.ON_UPDATE_TAB_TITLE) || e_type.equals(enums.etype.on_update_favicon) ||e_type.equals(enums.etype.on_update_history) || e_type.equals(enums.etype.on_request_completed) || e_type.equals(enums.etype.on_update_suggestion) || e_type.equals(enums.etype.on_update_suggestion_url)) { - try { - WebResponse responseInfo = (WebResponse)data.get(0); - Intent intent = new Intent(Intent.ACTION_VIEW); - intent.setDataAndTypeAndNormalize(Uri.parse(responseInfo.uri), responseInfo.headers.get("Content-Type")); - activityContextManager.getInstance().getHomeController().startActivity(intent); - }catch (Exception ex){ - Log.i("ex","ex"); + if (e_type.equals(on_handle_external_intent)) + { + try { + WebResponse responseInfo = (WebResponse)data.get(0); + Intent intent = new Intent(Intent.ACTION_VIEW); + intent.setDataAndTypeAndNormalize(Uri.parse(responseInfo.uri), responseInfo.headers.get("Content-Type")); + activityContextManager.getInstance().getHomeController().startActivity(intent); + }catch (Exception ex){ + Log.i("ex","ex"); + } + } else + { + return event.invokeObserver(data, e_type); } - } else - { - return event.invokeObserver(data, e_type); } } return null; diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/geckoManager/geckoSession.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/geckoManager/geckoSession.java index c8802aa3..57cea63e 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/geckoManager/geckoSession.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/geckoManager/geckoSession.java @@ -113,6 +113,7 @@ public class geckoSession extends GeckoSession implements GeckoSession.MediaDele private boolean isFirstPaintExecuted = false; private boolean mIsProgressBarChanging = false; private Handler mFindHandler; + private boolean mClosed = false; geckoSession(eventObserver.eventListener event,String mSessionID,AppCompatActivity mContext, GeckoView pGeckoView){ @@ -562,7 +563,7 @@ public class geckoSession extends GeckoSession implements GeckoSession.MediaDele @UiThread public void onCloseRequest(@NonNull GeckoSession var1) { - if(!canGoBack()){ + if(!canGoBack() && !mClosed){ event.invokeObserver(Arrays.asList(mCurrentURL,mSessionID,mCurrentTitle), enums.etype.back_list_empty); } } @@ -570,33 +571,37 @@ public class geckoSession extends GeckoSession implements GeckoSession.MediaDele int mCrashCount = 0; @UiThread public void onCrash(@NonNull GeckoSession session) { - String mSessionID = (String) event.invokeObserver(null, enums.etype.SESSION_ID); - if(mSessionID.equals(getSessionID())){ - if(mCrashCount<=5){ - final Handler handler = new Handler(); - handler.postDelayed(() -> { - if(!session.isOpen()){ - event.invokeObserver(Arrays.asList(mCurrentURL,mSessionID,mCurrentTitle, m_current_url_id, mTheme, this), enums.etype.M_OPEN_SESSION); - } - }, mCrashCount*500); + if(!mClosed){ + String mSessionID = (String) event.invokeObserver(null, enums.etype.SESSION_ID); + if(mSessionID.equals(getSessionID())){ + if(mCrashCount<=5){ + final Handler handler = new Handler(); + handler.postDelayed(() -> { + if(!session.isOpen()){ + event.invokeObserver(Arrays.asList(mCurrentURL,mSessionID,mCurrentTitle, m_current_url_id, mTheme, this), enums.etype.M_OPEN_SESSION); + } + }, mCrashCount*500); + } + mCrashCount+=1; } - mCrashCount+=1; } } @UiThread public void onKill(@NonNull GeckoSession session) { - String mSessionID = (String) event.invokeObserver(null, enums.etype.SESSION_ID); - if(mSessionID.equals(getSessionID())){ - if(mCrashCount<=5){ - final Handler handler = new Handler(); - handler.postDelayed(() -> { - if(!session.isOpen()){ - event.invokeObserver(Arrays.asList(mCurrentURL,mSessionID,mCurrentTitle, m_current_url_id, mTheme, this), enums.etype.M_OPEN_SESSION); - } - }, mCrashCount*500); + if(!mClosed){ + String mSessionID = (String) event.invokeObserver(null, enums.etype.SESSION_ID); + if(mSessionID.equals(getSessionID())){ + if(mCrashCount<=5){ + final Handler handler = new Handler(); + handler.postDelayed(() -> { + if(!session.isOpen()){ + event.invokeObserver(Arrays.asList(mCurrentURL,mSessionID,mCurrentTitle, m_current_url_id, mTheme, this), enums.etype.M_OPEN_SESSION); + } + }, mCrashCount*500); + } + mCrashCount+=1; } - mCrashCount+=1; } } @@ -700,6 +705,10 @@ public class geckoSession extends GeckoSession implements GeckoSession.MediaDele private boolean createAndSaveFileFromBase64Url(String url) { try{ + if(!url.startsWith("data") && !url.startsWith("blob")){ + return false; + } + File path = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS); String filetype; @@ -855,7 +864,7 @@ public class geckoSession extends GeckoSession implements GeckoSession.MediaDele return mCanGoBack; } - boolean wasPreviousErrorPage(){ + public boolean wasPreviousErrorPage(){ return mPreviousErrorPage; } @@ -883,6 +892,16 @@ public class geckoSession extends GeckoSession implements GeckoSession.MediaDele event.invokeObserver(Arrays.asList(null,mSessionID), enums.etype.on_close_sesson); } + public void closeSessionInstant(){ + mSessionID = "-1"; + mClosed = true; + close(); + } + + public boolean isClosed(){ + return mClosed; + } + GeckoResult mFinder = null; public void findInPage(String pQuery, int pDirection){ mFinder = null; diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeController.java index 72b2d87e..16e4a207 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeController.java @@ -76,6 +76,8 @@ import com.darkweb.genesissearchengine.pluginManager.pluginEnums; import com.darkweb.genesissearchengine.widget.progressBar.AnimatedProgressBar; import com.example.myapplication.R; import com.google.android.gms.ads.AdView; + +import org.mozilla.geckoview.ContentBlocking; import org.mozilla.geckoview.GeckoResult; import org.mozilla.geckoview.GeckoSession; import org.torproject.android.service.OrbotService; @@ -104,6 +106,7 @@ import static com.darkweb.genesissearchengine.constants.enums.etype.open_new_tab import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.*; import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManagerCallbacks.M_RATE_APPLICATION; import static java.lang.Character.isLetter; +import static org.mozilla.geckoview.ContentBlocking.CookieBehavior.ACCEPT_FIRST_PARTY; public class homeController extends AppCompatActivity implements ComponentCallbacks2 { @@ -127,6 +130,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba private TextView mLoadingText; private AdView mBannerAds = null; private ImageButton mGatewaySplash; + private ImageButton mPanicButton; private LinearLayout mTopBar; private ImageView mBackSplash; private Button mConnectButton; @@ -433,13 +437,14 @@ public class homeController extends AppCompatActivity implements ComponentCallba mNewTabBlocker = findViewById(R.id.pNewTabBlocker); mCoordinatorLayout = findViewById(R.id.pCoordinatorLayout); mImageDivider = findViewById(R.id.pImageDivider); + mPanicButton = findViewById(R.id.pPanicButton); mGeckoView.setSaveEnabled(false); mGeckoView.setSaveFromParentEnabled(false); mGeckoView.setAutofillEnabled(true); mGeckoClient = new geckoClients(); - mHomeViewController.initialization(new homeViewCallback(),this,mNewTab, mWebViewContainer, mLoadingText, mProgressBar, mSearchbar, mSplashScreen, mLoadingIcon, mBannerAds, mGatewaySplash, mTopBar, mGeckoView, mBackSplash, mConnectButton, mFindBar, mFindText, mFindCount, mTopLayout, mVoiceInput, mMenu, mNestedScroll, mBlocker, mBlockerFullSceen, mSearchEngineBar, mCopyright, mHintListView, mAppBar, mOrbotLogManager, mInfoLandscape, mInfoPortrait, mProgressBarIndeterminate, mTabFragment, mTopBarContainer, mSearchLock, mPopupLoadNewTab, mTopBarHider, mNewTabBlocker, mCoordinatorLayout, mImageDivider); + mHomeViewController.initialization(new homeViewCallback(),this,mNewTab, mWebViewContainer, mLoadingText, mProgressBar, mSearchbar, mSplashScreen, mLoadingIcon, mBannerAds, mGatewaySplash, mTopBar, mGeckoView, mBackSplash, mConnectButton, mFindBar, mFindText, mFindCount, mTopLayout, mVoiceInput, mMenu, mNestedScroll, mBlocker, mBlockerFullSceen, mSearchEngineBar, mCopyright, mHintListView, mAppBar, mOrbotLogManager, mInfoLandscape, mInfoPortrait, mProgressBarIndeterminate, mTabFragment, mTopBarContainer, mSearchLock, mPopupLoadNewTab, mTopBarHider, mNewTabBlocker, mCoordinatorLayout, mImageDivider, mPanicButton); mGeckoView.onSetHomeEvent(new nestedGeckoViewCallback()); mGeckoClient.initialize(mGeckoView, new geckoViewCallback(), this,false); mGeckoClient.onValidateInitializeFromStartup(mGeckoView, homeController.this); @@ -1211,10 +1216,12 @@ public class homeController extends AppCompatActivity implements ComponentCallba if(activityContextManager.getInstance().getTabController().isSelectionOpened()){ activityContextManager.getInstance().getTabController().onClearSelection(null); }else { + boolean mStatus = activityContextManager.getInstance().getTabController().onBackPressed(); onResumeDump(); - mHomeViewController.onHideTabContainer(); activityContextManager.getInstance().getTabController().onPostExit(); - activityContextManager.getInstance().getTabController().onBackPressed(); + if(!mStatus){ + mHomeViewController.onHideTabContainer(); + } } return; } @@ -1368,7 +1375,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba pluginController.getInstance().onNotificationInvoke(null, pluginEnums.eNotificationManager.M_CLEAR_NOTIFICATION ); if(!status.mThemeApplying){ - activityContextManager.getInstance().onClearStack(); + //activityContextManager.getInstance().onClearStack(); } initWidget(); initTabCountForced(); @@ -1380,6 +1387,12 @@ public class homeController extends AppCompatActivity implements ComponentCallba pluginController.getInstance().onMessageManagerInvoke(null, M_RESET); } + if(status.sSettingIsAppStarted && !status.mThemeApplying){ + if(mGeckoClient.getSession().wasPreviousErrorPage()){ + mGeckoClient.onReload(mGeckoView, this); + } + } + status.mThemeApplying = false; super.onResume(); @@ -1747,6 +1760,60 @@ public class homeController extends AppCompatActivity implements ComponentCallba helperMethod.openActivity(orbotLogController.class, constants.CONST_LIST_HISTORY, homeController.this,true); } + public void panicExit(View view) { + pluginController.getInstance().onMessageManagerInvoke(null, M_RESET); + pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(homeController.this), M_PANIC_RESET); + } + + public void panicExitInvoked() { + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_SEARCH_HISTORY,true)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_SEARCH_SUGGESTION,true)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_JAVA_SCRIPT,true)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_HISTORY_CLEAR,true)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_GATEWAY,true)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_GATEWAY_MANUAL,false)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.VPN_ENABLED,false)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.BRIDGE_ENABLES,false)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_FONT_ADJUSTABLE,true)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_ZOOM,true)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_VOICE_INPUT,true)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_INT, Arrays.asList(keys.SETTING_TRACKING_PROTECTION, ContentBlocking.AntiTracking.DEFAULT)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_DONOT_TRACK,true)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_INT, Arrays.asList(keys.SETTING_COOKIE_ADJUSTABLE,ACCEPT_FIRST_PARTY)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_FLOAT, Arrays.asList(keys.SETTING_FONT_SIZE,100)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_STRING, Arrays.asList(keys.SETTING_LANGUAGE, strings.SETTING_DEFAULT_LANGUAGE)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_STRING, Arrays.asList(keys.SETTING_LANGUAGE_REGION,strings.SETTING_DEFAULT_LANGUAGE_REGION)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_STRING, Arrays.asList(keys.SETTING_SEARCH_ENGINE,constants.CONST_BACKEND_GENESIS_URL)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_STRING, Arrays.asList(keys.BRIDGE_CUSTOM_BRIDGE_1,strings.BRIDGE_CUSTOM_BRIDGE_OBFS4)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_INT, Arrays.asList(keys.SETTING_NOTIFICATION_STATUS,1)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_RESTORE_TAB,false)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_CHARACTER_ENCODING,false)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_INT, Arrays.asList(keys.SETTING_SHOW_IMAGES,0)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_SHOW_FONTS,true)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_TOOLBAR_THEME,true)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_FULL_SCREEN_BROWSIING,true)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_INT, Arrays.asList(keys.SETTING_THEME, enums.Theme.THEME_DEFAULT)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_LIST_VIEW,true)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_SHOW_TAB_GRID,true)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_OPEN_URL_IN_NEW_TAB,true)); + dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_STRING, Arrays.asList(keys.BRIDGE_CUSTOM_TYPE,strings.BRIDGE_CUSTOM_BRIDGE_OBFS4)); + + status.sSettingIsAppStarted = false; + finishAndRemoveTask(); + + new Thread(){ + public void run(){ + try { + sleep(1000); + android.os.Process.killProcess(android.os.Process.myPid()); + System.exit(1); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + }.start(); + } + public class nestedGeckoViewCallback implements eventObserver.eventListener{ @Override diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeViewController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeViewController.java index 2fa800f1..f3522efc 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeViewController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeViewController.java @@ -106,6 +106,7 @@ class homeViewController private ImageView mNewTabBlocker; private CoordinatorLayout mCoordinatorLayout; private ImageView mImageDivider; + private ImageButton mPanicButton; /*Local Variables*/ private Callable mLogs = null; @@ -115,7 +116,7 @@ class homeViewController private Handler mTabDialogHandler = null; private Runnable mTabDialogRunnable = null; - void initialization(eventObserver.eventListener event, AppCompatActivity context, Button mNewTab, ConstraintLayout webviewContainer, TextView loadingText, AnimatedProgressBar progressBar, editTextManager searchbar, ConstraintLayout splashScreen, ImageView loading, AdView banner_ads, ImageButton gateway_splash, LinearLayout top_bar, GeckoView gecko_view, ImageView backsplash, Button connect_button, View pFindBar, EditText pFindText, TextView pFindCount, androidx.constraintlayout.widget.ConstraintLayout pTopLayout, ImageButton pVoiceInput, ImageButton pMenu, androidx.core.widget.NestedScrollView pNestedScroll, ImageView pBlocker, ImageView pBlockerFullSceen, View mSearchEngineBar, TextView pCopyright, RecyclerView pHistListView, com.google.android.material.appbar.AppBarLayout pAppBar, ImageButton pOrbotLogManager, ConstraintLayout pInfoLandscape, ConstraintLayout pInfoPortrait, ProgressBar pProgressBarIndeterminate, FragmentContainerView pTabFragment, LinearLayout pTopBarContainer, ImageView pSearchLock, View pPopupLoadNewTab, ImageView pTopBarHider, ImageView pNewTabBlocker, CoordinatorLayout mCoordinatorLayout, ImageView pImageDivider){ + void initialization(eventObserver.eventListener event, AppCompatActivity context, Button mNewTab, ConstraintLayout webviewContainer, TextView loadingText, AnimatedProgressBar progressBar, editTextManager searchbar, ConstraintLayout splashScreen, ImageView loading, AdView banner_ads, ImageButton gateway_splash, LinearLayout top_bar, GeckoView gecko_view, ImageView backsplash, Button connect_button, View pFindBar, EditText pFindText, TextView pFindCount, androidx.constraintlayout.widget.ConstraintLayout pTopLayout, ImageButton pVoiceInput, ImageButton pMenu, androidx.core.widget.NestedScrollView pNestedScroll, ImageView pBlocker, ImageView pBlockerFullSceen, View mSearchEngineBar, TextView pCopyright, RecyclerView pHistListView, com.google.android.material.appbar.AppBarLayout pAppBar, ImageButton pOrbotLogManager, ConstraintLayout pInfoLandscape, ConstraintLayout pInfoPortrait, ProgressBar pProgressBarIndeterminate, FragmentContainerView pTabFragment, LinearLayout pTopBarContainer, ImageView pSearchLock, View pPopupLoadNewTab, ImageView pTopBarHider, ImageView pNewTabBlocker, CoordinatorLayout mCoordinatorLayout, ImageView pImageDivider, ImageButton pPanicButton){ this.mContext = context; this.mProgressBar = progressBar; this.mSearchbar = searchbar; @@ -154,6 +155,7 @@ class homeViewController this.mNewTabBlocker = pNewTabBlocker; this.mCoordinatorLayout = mCoordinatorLayout; this.mImageDivider = pImageDivider; + this.mPanicButton = pPanicButton; initSplashScreen(); createUpdateUiHandler(); @@ -520,6 +522,7 @@ class homeViewController mConnectButton.setEnabled(false); mSplashScreen.setEnabled(false); mOrbotLogManager.setEnabled(false); + mPanicButton.setEnabled(false); final Handler handler = new Handler(); handler.postDelayed(() -> @@ -532,6 +535,7 @@ class homeViewController initSplashLoading(); }); mGatewaySplash.animate().setDuration(350).alpha(0.4f); + mPanicButton.animate().setDuration(250).alpha(0f); } private void initSplashScreen(){ @@ -626,6 +630,8 @@ class homeViewController mBlocker.setVisibility(View.GONE); mGatewaySplash.setVisibility(View.GONE); mConnectButton.setVisibility(View.GONE); + mPanicButton.setVisibility(View.GONE); + mEvent.invokeObserver(null, enums.etype.M_CACHE_UPDATE_TAB); mEvent.invokeObserver(null, enums.etype.M_SPLASH_DISABLE); })); diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/languageManager/languageController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/languageManager/languageController.java index dca46ede..6c583bf1 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/languageManager/languageController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/languageManager/languageController.java @@ -67,6 +67,7 @@ public class languageController extends AppCompatActivity { public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); super.onConfigurationChanged(newConfig); + activityContextManager.getInstance().onResetTheme(); theme.getInstance().onConfigurationChanged(this); } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/orbotLogManager/orbotLogController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/orbotLogManager/orbotLogController.java index 0b581627..87f41b1d 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/orbotLogManager/orbotLogController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/orbotLogManager/orbotLogController.java @@ -67,9 +67,10 @@ public class orbotLogController extends AppCompatActivity { @Override public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); - super.onConfigurationChanged(newConfig); - theme.getInstance().onConfigurationChanged(this); + activityContextManager.getInstance().onResetTheme(); + + super.onConfigurationChanged(newConfig); } public void viewsInitializations() { diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/orbotManager/orbotController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/orbotManager/orbotController.java index 2ec39530..f51c92ce 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/orbotManager/orbotController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/orbotManager/orbotController.java @@ -53,6 +53,10 @@ public class orbotController extends AppCompatActivity { super.onCreate(savedInstanceState); setContentView(R.layout.orbot_settings_view); + if(!status.mThemeApplying){ + activityContextManager.getInstance().onStack(this); + } + viewsInitializations(); onInitListener(); } @@ -60,9 +64,10 @@ public class orbotController extends AppCompatActivity { @Override public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); - super.onConfigurationChanged(newConfig); - theme.getInstance().onConfigurationChanged(this); + activityContextManager.getInstance().onResetTheme(); + + super.onConfigurationChanged(newConfig); } public void viewsInitializations() { @@ -137,9 +142,6 @@ public class orbotController extends AppCompatActivity { { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_RESUME); activityContextManager.getInstance().setCurrentActivity(this); - mOrbotViewController.onTrigger(orbotEnums.eOrbotViewCommands.M_INIT_POST_UI,null); - - activityContextManager.getInstance().onStack(this); super.onResume(); } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/proxyStatusManager/proxyStatusController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/proxyStatusManager/proxyStatusController.java index 05e1311d..5354c221 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/proxyStatusManager/proxyStatusController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/proxyStatusManager/proxyStatusController.java @@ -50,6 +50,7 @@ public class proxyStatusController extends AppCompatActivity { public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); super.onConfigurationChanged(newConfig); + activityContextManager.getInstance().onResetTheme(); theme.getInstance().onConfigurationChanged(this); } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/accessibilityManager/settingAccessibilityController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/accessibilityManager/settingAccessibilityController.java index 52f3a4d3..97df1f95 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/accessibilityManager/settingAccessibilityController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/accessibilityManager/settingAccessibilityController.java @@ -60,6 +60,7 @@ public class settingAccessibilityController extends AppCompatActivity { public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); super.onConfigurationChanged(newConfig); + activityContextManager.getInstance().onResetTheme(); theme.getInstance().onConfigurationChanged(this); } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/advanceManager/settingAdvanceController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/advanceManager/settingAdvanceController.java index c7f513bc..f166a9c6 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/advanceManager/settingAdvanceController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/advanceManager/settingAdvanceController.java @@ -56,6 +56,7 @@ public class settingAdvanceController extends AppCompatActivity { public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); super.onConfigurationChanged(newConfig); + activityContextManager.getInstance().onResetTheme(); theme.getInstance().onConfigurationChanged(this); } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/clearManager/settingClearController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/clearManager/settingClearController.java index aa8ed0d3..5a8e5de4 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/clearManager/settingClearController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/clearManager/settingClearController.java @@ -57,6 +57,7 @@ public class settingClearController extends AppCompatActivity { public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); super.onConfigurationChanged(newConfig); + activityContextManager.getInstance().onResetTheme(); theme.getInstance().onConfigurationChanged(this); } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/generalManager/settingGeneralController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/generalManager/settingGeneralController.java index eaa1d71d..e5ff41fc 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/generalManager/settingGeneralController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/generalManager/settingGeneralController.java @@ -63,6 +63,10 @@ public class settingGeneralController extends AppCompatActivity { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); super.onConfigurationChanged(newConfig); + if(!mIsThemeChanging){ + //activityContextManager.getInstance().onResetTheme(); + } + theme.getInstance().onConfigurationChanged(this); } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/logManager/settingLogController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/logManager/settingLogController.java index 4565f2df..493550e9 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/logManager/settingLogController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/logManager/settingLogController.java @@ -47,6 +47,7 @@ public class settingLogController extends AppCompatActivity { public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); super.onConfigurationChanged(newConfig); + activityContextManager.getInstance().onResetTheme(); theme.getInstance().onConfigurationChanged(this); } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/notificationManager/settingNotificationController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/notificationManager/settingNotificationController.java index 16eabaab..f87a535f 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/notificationManager/settingNotificationController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/notificationManager/settingNotificationController.java @@ -46,6 +46,7 @@ public class settingNotificationController extends AppCompatActivity { public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); super.onConfigurationChanged(newConfig); + activityContextManager.getInstance().onResetTheme(); theme.getInstance().onConfigurationChanged(this); } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/privacyManager/settingPrivacyController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/privacyManager/settingPrivacyController.java index 324af9f7..d1b71fac 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/privacyManager/settingPrivacyController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/privacyManager/settingPrivacyController.java @@ -53,6 +53,7 @@ public class settingPrivacyController extends AppCompatActivity { public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); super.onConfigurationChanged(newConfig); + activityContextManager.getInstance().onResetTheme(); theme.getInstance().onConfigurationChanged(this); } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/searchEngineManager/settingSearchController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/searchEngineManager/settingSearchController.java index 44fad3e2..4790e6b1 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/searchEngineManager/settingSearchController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/searchEngineManager/settingSearchController.java @@ -48,6 +48,7 @@ public class settingSearchController extends AppCompatActivity { public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); super.onConfigurationChanged(newConfig); + activityContextManager.getInstance().onResetTheme(); theme.getInstance().onConfigurationChanged(this); } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/settingHomePage/settingHomeController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/settingHomePage/settingHomeController.java index 1c68d68b..e708d860 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/settingHomePage/settingHomeController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/settingHomePage/settingHomeController.java @@ -69,6 +69,7 @@ public class settingHomeController extends AppCompatActivity public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); super.onConfigurationChanged(newConfig); + activityContextManager.getInstance().onResetTheme(); theme.getInstance().onConfigurationChanged(this); } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/trackingManager/settingTrackingController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/trackingManager/settingTrackingController.java index 0012d256..7e38ca0f 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/trackingManager/settingTrackingController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/settingManager/trackingManager/settingTrackingController.java @@ -51,6 +51,7 @@ public class settingTrackingController extends AppCompatActivity { public void onConfigurationChanged(@NonNull Configuration newConfig) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); super.onConfigurationChanged(newConfig); + activityContextManager.getInstance().onResetTheme(); theme.getInstance().onConfigurationChanged(this); } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabController.java index 29a70159..a9774419 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabController.java @@ -317,7 +317,8 @@ public class tabController extends Fragment public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) { int position = viewHolder.getAdapterPosition(); - onExitAndClearBackup(); + onClearTabBackup(); + mListModel.onTrigger(tabEnums.eModelCallback.M_CLEAR_BACKUP_RETAIN_DATABASE,null); boolean mStatus = onInitRemoveView(position, true, true); if(mStatus){ mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.NOTIFY_SWIPE, Collections.singletonList(position)); @@ -378,7 +379,7 @@ public class tabController extends Fragment new Handler().postDelayed(() -> { onSwipeBounce(0); }, 400); - return false; + return true; }else{ onShowUndoDialog(); mTabAdapter.notifyItemRangeChanged(pIndex, mTabAdapter.getItemCount() - pIndex); @@ -446,8 +447,8 @@ public class tabController extends Fragment public void onClearTabBackup(){ ArrayList mBackupIndex = (ArrayList)mListModel.onTrigger(tabEnums.eModelCallback.M_GET_BACKUP,null); for(int mCounter=0;mCounter { mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.REMOVE_ALL, null); onClearSelection(null); - - onClearTabBackup(); - mListModel.onTrigger(tabEnums.eModelCallback.M_CLEAR_BACKUP_RETAIN_DATABASE,null); }); } else if(pView.getId() == R.id.pOpenSetting){ @@ -586,7 +584,7 @@ public class tabController extends Fragment } - public void onBackPressed() { + public boolean onBackPressed() { if(mTabAdapter!=null){ boolean mStatus = (boolean) mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.M_SELECTION_MENU_SHOWING, null); onClearTabBackup(); @@ -594,8 +592,10 @@ public class tabController extends Fragment if(!mStatus){ mHomeController.onDisableTabViewController(); onClose(); + return true; } } + return false; } /*Event Observer*/ diff --git a/app/src/main/java/com/darkweb/genesissearchengine/dataManager/tabDataModel.java b/app/src/main/java/com/darkweb/genesissearchengine/dataManager/tabDataModel.java index 530c7758..b027ce1c 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/dataManager/tabDataModel.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/dataManager/tabDataModel.java @@ -100,6 +100,7 @@ class tabDataModel void closeTab(geckoSession mSession,Object pID) { mSession.stop(); mSession.close(); + if(pID == null){ String mID = strings.GENERIC_EMPTY_STR; for(int counter = 0; counter< mTabs.size(); counter++){ diff --git a/app/src/main/java/com/darkweb/genesissearchengine/helperManager/ProxySelector.java b/app/src/main/java/com/darkweb/genesissearchengine/helperManager/ProxySelector.java index 37696897..0ebfafb6 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/helperManager/ProxySelector.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/helperManager/ProxySelector.java @@ -14,14 +14,6 @@ import java.util.List; public class ProxySelector { public static URLConnection openConnectionWithProxy(final URI uri) throws IOException { - final java.net.ProxySelector ps = java.net.ProxySelector.getDefault(); - Proxy proxy = Proxy.NO_PROXY; - if (ps != null) { - final List proxies = ps.select(uri); - if (proxies != null && !proxies.isEmpty()) { - proxy = proxies.get(0); - } - } return uri.toURL().openConnection(ProxySettings.getProxy()); } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/helperManager/ProxySettings.java b/app/src/main/java/com/darkweb/genesissearchengine/helperManager/ProxySettings.java index 59ba1e02..2b50c847 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/helperManager/ProxySettings.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/helperManager/ProxySettings.java @@ -7,11 +7,11 @@ import ch.boye.httpclientandroidlib.HttpHost; public class ProxySettings { private static final String TOR_PROXY_ADDRESS = "127.0.0.1"; - private static final int TOR_PROXY_PORT = 9050; + private static final int TOR_PROXY_PORT = 1080; public static Proxy getProxy() { // TODO make configurable - return new Proxy(Proxy.Type.SOCKS, new InetSocketAddress(TOR_PROXY_ADDRESS, TOR_PROXY_PORT)); + return new Proxy(Proxy.Type.HTTP, new InetSocketAddress(TOR_PROXY_ADDRESS, TOR_PROXY_PORT)); } public static HttpHost getProxyHost() { diff --git a/app/src/main/java/com/darkweb/genesissearchengine/helperManager/theme.java b/app/src/main/java/com/darkweb/genesissearchengine/helperManager/theme.java index e8ee7f86..8b1ae772 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/helperManager/theme.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/helperManager/theme.java @@ -22,10 +22,10 @@ public class theme { public void onConfigurationChanged(AppCompatActivity pContext){ boolean sDefaultNightMode = (pContext.getApplicationContext().getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES; - if(status.sDefaultNightMode != sDefaultNightMode){ + // if(status.sDefaultNightMode != sDefaultNightMode){ setupThemeLocal(pContext, sDefaultNightMode); pContext.recreate(); - } + // } } public void setupThemeLocal(Context context, boolean sDefaultNightMode) { diff --git a/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/messageManager.java b/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/messageManager.java index 798567c1..aadac78b 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/messageManager.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/messageManager.java @@ -222,6 +222,16 @@ class messageManager mDialog.setOnDismissListener(dialog -> onClearReference()); } + private void onPanic(){ + initializeDialog(R.layout.popup_panic, Gravity.BOTTOM); + mDialog.findViewById(R.id.pDismiss).setOnClickListener(v -> mDialog.dismiss()); + mDialog.setOnDismissListener(dialog -> onClearReference()); + mDialog.findViewById(R.id.pNext).setOnClickListener(v -> { + mDialog.dismiss(); + mEvent.invokeObserver(null, M_PANIC_RESET); + }); + } + private void dataClearedSuccessfully() { initializeDialog(R.layout.popup_data_cleared, Gravity.BOTTOM); @@ -632,6 +642,11 @@ class messageManager notSupportMessage(); break; + case M_PANIC_RESET: + /*VERIFIED*/ + onPanic(); + break; + case M_DATA_CLEARED: /*VERIFIED*/ dataClearedSuccessfully(); diff --git a/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/orbotManager.java b/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/orbotManager.java index 04912183..6614055c 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/orbotManager.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/orbotManager.java @@ -169,6 +169,10 @@ class orbotManager { String logs = orbotLocalConstants.mTorLogsStatus; + if(orbotLocalConstants.mTorLogsStatus.equals("No internet connection")){ + return "Warning | " + orbotLocalConstants.mTorLogsStatus; + } + if(!logs.contains("Bootstrapped") && !mLogsStarted){ logs = "Initializing Bootstrap"; mLogsStarted = true; diff --git a/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/pluginController.java b/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/pluginController.java index 653eed7d..927a2625 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/pluginController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/pluginController.java @@ -198,6 +198,9 @@ public class pluginController { ((homeController)mHomeController.get()).onLoadURL(pData.get(0).toString()); } + else if(pEventType.equals(M_PANIC_RESET)){ + activityContextManager.getInstance().getHomeController().panicExitInvoked(); + } else if(pEventType.equals(M_DOWNLOAD_SINGLE)){ activityContextManager.getInstance().getHomeController().onManualDownloadFileName((String)pData.get(2),(String)pData.get(0)); } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/pluginEnums.java b/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/pluginEnums.java index ec276f61..bc9ba9ee 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/pluginEnums.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/pluginEnums.java @@ -28,7 +28,7 @@ public class pluginEnums /*Message Manager*/ public enum eMessageManager{ - M_RESET, M_DATA_CLEARED, M_SECURE_CONNECTION, M_POPUP_BLOCKED, M_MAX_TAB_REACHED,M_DOWNLOAD_SINGLE, M_UPDATE_BRIDGES, M_NEW_IDENTITY, M_NOT_SUPPORTED, M_BRIDGE_MAIL, M_LONG_PRESS_WITH_LINK, M_LONG_PRESS_URL, M_LONG_PRESS_DOWNLOAD, M_START_ORBOT, M_DOWNLOAD_FILE, M_RATE_APP, M_REPORT_URL, M_CLEAR_BOOKMARK, M_CLEAR_HISTORY, M_BOOKMARK, M_RATE_SUCCESS, M_RATE_FAILURE, M_LANGUAGE_SUPPORT_FAILURE, M_WELCOME + M_RESET, M_DATA_CLEARED, M_SECURE_CONNECTION, M_POPUP_BLOCKED, M_PANIC, M_MAX_TAB_REACHED,M_DOWNLOAD_SINGLE, M_UPDATE_BRIDGES, M_NEW_IDENTITY, M_NOT_SUPPORTED, M_BRIDGE_MAIL, M_LONG_PRESS_WITH_LINK, M_LONG_PRESS_URL, M_LONG_PRESS_DOWNLOAD, M_START_ORBOT, M_DOWNLOAD_FILE, M_RATE_APP, M_REPORT_URL, M_CLEAR_BOOKMARK, M_CLEAR_HISTORY, M_BOOKMARK, M_PANIC_RESET, M_RATE_SUCCESS, M_RATE_FAILURE, M_LANGUAGE_SUPPORT_FAILURE, M_WELCOME } public enum eMessageManagerCallbacks{ M_CANCEL_WELCOME, M_APP_RATED, M_DOWNLOAD_FILE_MANUAL, M_OPEN_LINK_CURRENT_TAB, M_COPY_LINK, M_REQUEST_BRIDGES, M_SET_BRIDGES, M_OPEN_LINK_NEW_TAB, M_CLEAR_TAB, M_RATE_APPLICATION, M_OPEN_PRIVACY diff --git a/app/src/main/res/custom-xml/home/xml/hox_rounded_corner_splash_right.xml b/app/src/main/res/custom-xml/home/xml/hox_rounded_corner_splash_right.xml new file mode 100644 index 00000000..05379af8 --- /dev/null +++ b/app/src/main/res/custom-xml/home/xml/hox_rounded_corner_splash_right.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable-hdpi/reset.png b/app/src/main/res/drawable-hdpi/reset.png new file mode 100644 index 00000000..8c5009d7 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/reset.png differ diff --git a/app/src/main/res/layouts/alert/layout/popup_panic.xml b/app/src/main/res/layouts/alert/layout/popup_panic.xml new file mode 100644 index 00000000..b7e16a2e --- /dev/null +++ b/app/src/main/res/layouts/alert/layout/popup_panic.xml @@ -0,0 +1,109 @@ + + + + + + + + + + + + + +