mirror of https://github.com/LeOS-GSI/LeOS-Genesis
parent
4dfef0f5e7
commit
f396ab8aae
|
@ -28,5 +28,6 @@
|
||||||
<option name="useQualifiedModuleNames" value="true" />
|
<option name="useQualifiedModuleNames" value="true" />
|
||||||
</GradleProjectSettings>
|
</GradleProjectSettings>
|
||||||
</option>
|
</option>
|
||||||
|
<option name="offlineMode" value="true" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
|
@ -34,6 +34,7 @@ import androidx.appcompat.app.AppCompatDelegate;
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.core.widget.NestedScrollView;
|
import androidx.core.widget.NestedScrollView;
|
||||||
|
import androidx.fragment.app.FragmentContainerView;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
|
@ -52,6 +53,7 @@ import com.darkweb.genesissearchengine.appManager.orbotManager.orbotController;
|
||||||
import com.darkweb.genesissearchengine.appManager.settingManager.searchEngineManager.settingSearchController;
|
import com.darkweb.genesissearchengine.appManager.settingManager.searchEngineManager.settingSearchController;
|
||||||
import com.darkweb.genesissearchengine.appManager.settingManager.settingHomePage.settingHomeController;
|
import com.darkweb.genesissearchengine.appManager.settingManager.settingHomePage.settingHomeController;
|
||||||
import com.darkweb.genesissearchengine.appManager.tabManager.tabController;
|
import com.darkweb.genesissearchengine.appManager.tabManager.tabController;
|
||||||
|
import com.darkweb.genesissearchengine.appManager.tabManager.tabEnums;
|
||||||
import com.darkweb.genesissearchengine.appManager.tabManager.tabRowModel;
|
import com.darkweb.genesissearchengine.appManager.tabManager.tabRowModel;
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
import com.darkweb.genesissearchengine.constants.constants;
|
||||||
import com.darkweb.genesissearchengine.constants.enums;
|
import com.darkweb.genesissearchengine.constants.enums;
|
||||||
|
@ -137,6 +139,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
private ConstraintLayout mInfoLandscape;
|
private ConstraintLayout mInfoLandscape;
|
||||||
private com.google.android.material.appbar.AppBarLayout mAppBar;
|
private com.google.android.material.appbar.AppBarLayout mAppBar;
|
||||||
private ProgressBar mProgressBarIndeterminate;
|
private ProgressBar mProgressBarIndeterminate;
|
||||||
|
private FragmentContainerView mTabFragment;
|
||||||
|
|
||||||
/*Redirection Objects*/
|
/*Redirection Objects*/
|
||||||
private GeckoResult<Bitmap> mRenderedBitmap = null;
|
private GeckoResult<Bitmap> mRenderedBitmap = null;
|
||||||
|
@ -361,13 +364,14 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
mInfoPortrait = findViewById(R.id.pInfoPortrait);
|
mInfoPortrait = findViewById(R.id.pInfoPortrait);
|
||||||
mInfoLandscape = findViewById(R.id.pInfoLandscape);
|
mInfoLandscape = findViewById(R.id.pInfoLandscape);
|
||||||
mProgressBarIndeterminate = findViewById(R.id.pProgressBarIndeterminate);
|
mProgressBarIndeterminate = findViewById(R.id.pProgressBarIndeterminate);
|
||||||
|
mTabFragment = findViewById(R.id.mTabFragment);
|
||||||
|
|
||||||
mGeckoView.setSaveEnabled(false);
|
mGeckoView.setSaveEnabled(false);
|
||||||
mGeckoView.setSaveFromParentEnabled(false);
|
mGeckoView.setSaveFromParentEnabled(false);
|
||||||
mGeckoView.setAutofillEnabled(true);
|
mGeckoView.setAutofillEnabled(true);
|
||||||
|
|
||||||
mGeckoClient = new geckoClients();
|
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);
|
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);
|
||||||
mGeckoView.onSetHomeEvent(new nestedGeckoViewCallback());
|
mGeckoView.onSetHomeEvent(new nestedGeckoViewCallback());
|
||||||
mGeckoClient.initialize(mGeckoView, new geckoViewCallback(), this,false);
|
mGeckoClient.initialize(mGeckoView, new geckoViewCallback(), this,false);
|
||||||
mGeckoClient.onValidateInitializeFromStartup();
|
mGeckoClient.onValidateInitializeFromStartup();
|
||||||
|
@ -689,7 +693,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
mSearchBarLoading = true;
|
mSearchBarLoading = true;
|
||||||
mEdittextChanged.postDelayed(postToServerRunnable, 0);
|
mEdittextChanged.postDelayed(postToServerRunnable, 0);
|
||||||
}else{
|
}else{
|
||||||
mEdittextChanged.postDelayed(postToServerRunnable, 500);
|
mEdittextChanged.postDelayed(postToServerRunnable, 250);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -723,6 +727,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
helperMethod.hideKeyboard(homeController.this);
|
helperMethod.hideKeyboard(homeController.this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mSearchbar.setSelection(0);
|
||||||
}else {
|
}else {
|
||||||
if(!isFocusChanging){
|
if(!isFocusChanging){
|
||||||
if(!status.mThemeApplying){
|
if(!status.mThemeApplying){
|
||||||
|
@ -758,7 +763,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
private Runnable postToServerRunnable = () -> {
|
private Runnable postToServerRunnable = () -> {
|
||||||
onUpdateSuggestionList(mSuggestions);
|
onUpdateSuggestionList(mSuggestions);
|
||||||
final Handler handler = new Handler();
|
final Handler handler = new Handler();
|
||||||
handler.postDelayed(() -> mSearchBarLoading = false, 110);
|
handler.postDelayed(() -> mSearchBarLoading = false, 260);
|
||||||
};
|
};
|
||||||
|
|
||||||
public void onSearchBarInvoked(View view){
|
public void onSearchBarInvoked(View view){
|
||||||
|
@ -801,6 +806,26 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
mHomeViewController.onUpdateLogo();
|
mHomeViewController.onUpdateLogo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*TAB CONTROLLER EVENTS*/
|
||||||
|
public void onMenuTrigger(View pView){
|
||||||
|
activityContextManager.getInstance().getTabController().onMenuTrigger(pView);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void openTabMenu(View view) {
|
||||||
|
activityContextManager.getInstance().getTabController().openTabMenu(view);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onRemoveSelection(View view) {
|
||||||
|
activityContextManager.getInstance().getTabController().onRemoveSelection(view);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onRestoreTab(View view){
|
||||||
|
activityContextManager.getInstance().getTabController().onRestoreTab(view);
|
||||||
|
}
|
||||||
|
public void onClearSelection(View view){
|
||||||
|
activityContextManager.getInstance().getTabController().onClearSelection(view);
|
||||||
|
}
|
||||||
|
|
||||||
public geckoSession onNewTabInit(){
|
public geckoSession onNewTabInit(){
|
||||||
return mGeckoClient.initFreeSession(mGeckoView, this, new geckoViewCallback());
|
return mGeckoClient.initFreeSession(mGeckoView, this, new geckoViewCallback());
|
||||||
}
|
}
|
||||||
|
@ -855,8 +880,14 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
onGetThumbnail(null);
|
onGetThumbnail(null);
|
||||||
mGeckoClient.onRedrawPixel();
|
mGeckoClient.onRedrawPixel();
|
||||||
mNewTab.setPressed(true);
|
mNewTab.setPressed(true);
|
||||||
helperMethod.openActivity(tabController.class, constants.CONST_LIST_HISTORY, homeController.this,true);
|
}
|
||||||
overridePendingTransition(R.anim.popup_anim_in, R.anim.popup_anim_out);
|
|
||||||
|
public void onOpenTabReady(){
|
||||||
|
runOnUiThread(() -> {
|
||||||
|
activityContextManager.getInstance().getTabController().onInit();
|
||||||
|
mHomeViewController.onShowTabContainer();
|
||||||
|
overridePendingTransition(R.anim.popup_anim_in, R.anim.popup_anim_out);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onLockSecure(View view){
|
public void onLockSecure(View view){
|
||||||
|
@ -880,8 +911,17 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
mHomeViewController.initTopBarPadding();
|
mHomeViewController.initTopBarPadding();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onDisableTabViewController(){
|
||||||
|
mHomeViewController.onHideTabContainer();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBackPressed(){
|
public void onBackPressed(){
|
||||||
|
if(mTabFragment.getVisibility()==View.VISIBLE){
|
||||||
|
onResume();
|
||||||
|
mHomeViewController.onHideTabContainer();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
mSearchbar.clearFocus();
|
mSearchbar.clearFocus();
|
||||||
if(mFindBar!=null && mFindBar.getVisibility() == View.VISIBLE){
|
if(mFindBar!=null && mFindBar.getVisibility() == View.VISIBLE){
|
||||||
|
@ -1134,13 +1174,13 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
initTabCount();
|
initTabCount();
|
||||||
|
|
||||||
if(model!=null){
|
if(model!=null){
|
||||||
if(activityContextManager.getInstance().getTabController()==null || activityContextManager.getInstance().getTabController()!=null && (activityContextManager.getInstance().getTabController().isDestroyed())){
|
if(activityContextManager.getInstance().getTabController()==null || activityContextManager.getInstance().getTabController()!=null && mTabFragment.getVisibility()==View.VISIBLE){
|
||||||
onLoadTab(model.getSession(),true);
|
onLoadTab(model.getSession(),true);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(activityContextManager.getInstance().getTabController()==null || activityContextManager.getInstance().getTabController()!=null && (activityContextManager.getInstance().getTabController().isDestroyed())){
|
if(activityContextManager.getInstance().getTabController()==null || activityContextManager.getInstance().getTabController()!=null && mTabFragment.getVisibility()==View.VISIBLE){
|
||||||
return false;
|
return false;
|
||||||
}else {
|
}else {
|
||||||
return true;
|
return true;
|
||||||
|
@ -1204,7 +1244,8 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
else if (menuId == R.id.menu9) {
|
else if (menuId == R.id.menu9) {
|
||||||
helperMethod.hideKeyboard(this);
|
helperMethod.hideKeyboard(this);
|
||||||
mGeckoClient.onRedrawPixel();
|
mGeckoClient.onRedrawPixel();
|
||||||
helperMethod.openActivity(tabController.class, constants.CONST_LIST_HISTORY, homeController.this,true);
|
activityContextManager.getInstance().getTabController().onInit();
|
||||||
|
mHomeViewController.onShowTabContainer();
|
||||||
}
|
}
|
||||||
else if (menuId == R.id.menu8) {
|
else if (menuId == R.id.menu8) {
|
||||||
helperMethod.hideKeyboard(this);
|
helperMethod.hideKeyboard(this);
|
||||||
|
@ -1225,7 +1266,8 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
}
|
}
|
||||||
else if (menuId == R.id.pMenuOpenRecentTab)
|
else if (menuId == R.id.pMenuOpenRecentTab)
|
||||||
{
|
{
|
||||||
helperMethod.openActivity(tabController.class, constants.CONST_LIST_HISTORY, homeController.this,true);
|
activityContextManager.getInstance().getTabController().onInit();
|
||||||
|
mHomeViewController.onShowTabContainer();
|
||||||
overridePendingTransition(R.anim.popup_anim_in, R.anim.popup_anim_out);
|
overridePendingTransition(R.anim.popup_anim_in, R.anim.popup_anim_out);
|
||||||
}
|
}
|
||||||
else if (menuId == R.id.pMenuOpenNewTab)
|
else if (menuId == R.id.pMenuOpenNewTab)
|
||||||
|
@ -1319,7 +1361,11 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
@Override
|
@Override
|
||||||
public Object invokeObserver(List<Object> data, Object e_type)
|
public Object invokeObserver(List<Object> data, Object e_type)
|
||||||
{
|
{
|
||||||
if(e_type.equals(enums.etype.download_folder))
|
if(e_type.equals(enums.etype.M_INIT_TAB_COUNT))
|
||||||
|
{
|
||||||
|
initTabCount();
|
||||||
|
}
|
||||||
|
else if(e_type.equals(enums.etype.download_folder))
|
||||||
{
|
{
|
||||||
onOpenDownloadFolder(null);
|
onOpenDownloadFolder(null);
|
||||||
}
|
}
|
||||||
|
@ -1555,7 +1601,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
helperMethod.openPlayStore(dataToStr(data.get(0)).split("__")[1],homeController.this);
|
helperMethod.openPlayStore(dataToStr(data.get(0)).split("__")[1],homeController.this);
|
||||||
}
|
}
|
||||||
else if(e_type.equals(enums.etype.ON_UPDATE_TAB_TITLE)){
|
else if(e_type.equals(enums.etype.ON_UPDATE_TAB_TITLE)){
|
||||||
if(activityContextManager.getInstance().getTabController()!=null && !activityContextManager.getInstance().getTabController().isDestroyed())
|
if(activityContextManager.getInstance().getTabController()!=null && mTabFragment.getVisibility()==View.VISIBLE)
|
||||||
activityContextManager.getInstance().getTabController().onTabRowChanged((String) data.get(1));
|
activityContextManager.getInstance().getTabController().onTabRowChanged((String) data.get(1));
|
||||||
}
|
}
|
||||||
else if(e_type.equals(enums.etype.FINDER_RESULT_CALLBACK)){
|
else if(e_type.equals(enums.etype.FINDER_RESULT_CALLBACK)){
|
||||||
|
|
|
@ -36,6 +36,7 @@ import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.core.graphics.ColorUtils;
|
import androidx.core.graphics.ColorUtils;
|
||||||
import androidx.core.widget.NestedScrollView;
|
import androidx.core.widget.NestedScrollView;
|
||||||
|
import androidx.fragment.app.FragmentContainerView;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import com.darkweb.genesissearchengine.appManager.historyManager.historyRowModel;
|
import com.darkweb.genesissearchengine.appManager.historyManager.historyRowModel;
|
||||||
import com.darkweb.genesissearchengine.constants.*;
|
import com.darkweb.genesissearchengine.constants.*;
|
||||||
|
@ -85,7 +86,7 @@ class homeViewController
|
||||||
private View mSearchEngineBar;
|
private View mSearchEngineBar;
|
||||||
private EditText mFindText;
|
private EditText mFindText;
|
||||||
private TextView mFindCount;
|
private TextView mFindCount;
|
||||||
private androidx.constraintlayout.widget.ConstraintLayout mTopLayout;
|
private ConstraintLayout mTopLayout;
|
||||||
private ImageButton mVoiceInput;
|
private ImageButton mVoiceInput;
|
||||||
private ImageButton mMenu;
|
private ImageButton mMenu;
|
||||||
private ImageView mBlocker;
|
private ImageView mBlocker;
|
||||||
|
@ -96,6 +97,7 @@ class homeViewController
|
||||||
private ConstraintLayout mInfoLandscape;
|
private ConstraintLayout mInfoLandscape;
|
||||||
private NestedScrollView mNestedScroll;
|
private NestedScrollView mNestedScroll;
|
||||||
private ProgressBar mProgressBarIndeterminate;
|
private ProgressBar mProgressBarIndeterminate;
|
||||||
|
private FragmentContainerView mTabFragment;
|
||||||
|
|
||||||
/*Local Variables*/
|
/*Local Variables*/
|
||||||
private Callable<String> mLogs = null;
|
private Callable<String> mLogs = null;
|
||||||
|
@ -103,7 +105,7 @@ class homeViewController
|
||||||
private boolean isFullScreen = false;
|
private boolean isFullScreen = false;
|
||||||
private MovementMethod mSearchBarMovementMethod = null;
|
private MovementMethod mSearchBarMovementMethod = 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){
|
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){
|
||||||
this.mContext = context;
|
this.mContext = context;
|
||||||
this.mProgressBar = progressBar;
|
this.mProgressBar = progressBar;
|
||||||
this.mSearchbar = searchbar;
|
this.mSearchbar = searchbar;
|
||||||
|
@ -135,6 +137,7 @@ class homeViewController
|
||||||
this.mInfoLandscape = pInfoLandscape;
|
this.mInfoLandscape = pInfoLandscape;
|
||||||
this.mNestedScroll = pNestedScroll;
|
this.mNestedScroll = pNestedScroll;
|
||||||
this.mProgressBarIndeterminate = pProgressBarIndeterminate;
|
this.mProgressBarIndeterminate = pProgressBarIndeterminate;
|
||||||
|
this.mTabFragment = pTabFragment;
|
||||||
|
|
||||||
initSplashScreen();
|
initSplashScreen();
|
||||||
createUpdateUiHandler();
|
createUpdateUiHandler();
|
||||||
|
@ -184,6 +187,19 @@ class homeViewController
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onShowTabContainer(){
|
||||||
|
if(mTabFragment.getAlpha()==0 || mTabFragment.getAlpha()==1){
|
||||||
|
mTabFragment.setVisibility(View.VISIBLE);
|
||||||
|
mTabFragment.animate().setDuration(250).alpha(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onHideTabContainer(){
|
||||||
|
if(mTabFragment.getAlpha()==1){
|
||||||
|
mTabFragment.animate().setDuration(250).alpha(0).withEndAction(() -> mTabFragment.setVisibility(View.GONE));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void initSearchBarFocus(boolean pStatus){
|
public void initSearchBarFocus(boolean pStatus){
|
||||||
if(!pStatus){
|
if(!pStatus){
|
||||||
this.mVoiceInput.animate().setDuration(0).alpha(0).withEndAction(() -> {
|
this.mVoiceInput.animate().setDuration(0).alpha(0).withEndAction(() -> {
|
||||||
|
@ -913,13 +929,9 @@ class homeViewController
|
||||||
mTopBar.setVisibility(View.GONE);
|
mTopBar.setVisibility(View.GONE);
|
||||||
mBannerAds.setVisibility(View.GONE);
|
mBannerAds.setVisibility(View.GONE);
|
||||||
|
|
||||||
//ConstraintLayout.MarginLayoutParams params = (ConstraintLayout.MarginLayoutParams) mWebviewContainer.getLayoutParams();
|
NestedScrollView.MarginLayoutParams params = (NestedScrollView.MarginLayoutParams) mNestedScroll.getLayoutParams();
|
||||||
//params.setMargins(0, helperMethod.pxFromDp(0), 0, 0);
|
params.setMargins(0, 0, 0,helperMethod.pxFromDp(60)*-1);
|
||||||
//mWebviewContainer.setLayoutParams(params);
|
mNestedScroll.setLayoutParams(params);
|
||||||
|
|
||||||
//ConstraintLayout.MarginLayoutParams params1 = (ConstraintLayout.MarginLayoutParams) mWebviewContainer.getLayoutParams();
|
|
||||||
//params1.setMargins(0, 0, 0,0);
|
|
||||||
//mGeckoView.setLayoutParams(params1);
|
|
||||||
|
|
||||||
com.darkweb.genesissearchengine.constants.status.sFullScreenBrowsing = false;
|
com.darkweb.genesissearchengine.constants.status.sFullScreenBrowsing = false;
|
||||||
initTopBarPadding();
|
initTopBarPadding();
|
||||||
|
@ -940,13 +952,9 @@ class homeViewController
|
||||||
mBannerAds.setVisibility(View.GONE);
|
mBannerAds.setVisibility(View.GONE);
|
||||||
mEvent.invokeObserver(Collections.singletonList(!isLandscape), enums.etype.on_init_ads);
|
mEvent.invokeObserver(Collections.singletonList(!isLandscape), enums.etype.on_init_ads);
|
||||||
|
|
||||||
//ConstraintLayout.MarginLayoutParams params = (ConstraintLayout.MarginLayoutParams) mWebviewContainer.getLayoutParams();
|
NestedScrollView.MarginLayoutParams params = (NestedScrollView.MarginLayoutParams) mNestedScroll.getLayoutParams();
|
||||||
//params.setMargins(0, 0, 0,0);
|
params.setMargins(0, 0, 0,0);
|
||||||
//mWebviewContainer.setLayoutParams(params);
|
mNestedScroll.setLayoutParams(params);
|
||||||
|
|
||||||
//ConstraintLayout.MarginLayoutParams params1 = (ConstraintLayout.MarginLayoutParams) mWebviewContainer.getLayoutParams();
|
|
||||||
//params1.setMargins(0, 0, 0,helperMethod.pxFromDp(0));
|
|
||||||
//mGeckoView.setLayoutParams(params1);
|
|
||||||
|
|
||||||
com.darkweb.genesissearchengine.constants.status.sFullScreenBrowsing = (boolean) dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_FULL_SCREEN_BROWSIING,true));
|
com.darkweb.genesissearchengine.constants.status.sFullScreenBrowsing = (boolean) dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_FULL_SCREEN_BROWSIING,true));
|
||||||
initTopBarPadding();
|
initTopBarPadding();
|
||||||
|
|
|
@ -245,7 +245,7 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
|
||||||
}
|
}
|
||||||
|
|
||||||
if(model.getSession().equals(mModelList.get(0).getSession())){
|
if(model.getSession().equals(mModelList.get(0).getSession())){
|
||||||
itemView.setBackgroundColor(ContextCompat.getColor(activityContextManager.getInstance().getTabController(), R.color.c_list_item_current));
|
itemView.setBackgroundColor(ContextCompat.getColor(activityContextManager.getInstance().getHomeController(), R.color.c_list_item_current));
|
||||||
}else {
|
}else {
|
||||||
Drawable mDrawable;
|
Drawable mDrawable;
|
||||||
Resources res = itemView.getContext().getResources();
|
Resources res = itemView.getContext().getResources();
|
||||||
|
|
|
@ -2,31 +2,33 @@ package com.darkweb.genesissearchengine.appManager.tabManager;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.graphics.Paint;
|
||||||
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.recyclerview.widget.ItemTouchHelper;
|
import androidx.recyclerview.widget.ItemTouchHelper;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import androidx.recyclerview.widget.SimpleItemAnimator;
|
import androidx.recyclerview.widget.SimpleItemAnimator;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
import com.darkweb.genesissearchengine.appManager.homeManager.geckoManager.geckoSession;
|
import com.darkweb.genesissearchengine.appManager.homeManager.geckoManager.geckoSession;
|
||||||
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
|
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
|
||||||
import com.darkweb.genesissearchengine.appManager.settingManager.settingHomePage.settingHomeController;
|
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
|
||||||
import com.darkweb.genesissearchengine.constants.keys;
|
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
import com.darkweb.genesissearchengine.dataManager.dataController;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
|
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
|
@ -36,7 +38,7 @@ import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
public class tabController extends AppCompatActivity
|
public class tabController extends Fragment
|
||||||
{
|
{
|
||||||
/*Private Views*/
|
/*Private Views*/
|
||||||
private Button mTabs;
|
private Button mTabs;
|
||||||
|
@ -46,6 +48,7 @@ public class tabController extends AppCompatActivity
|
||||||
private View mPopupUndo;
|
private View mPopupUndo;
|
||||||
private TextView mSelectionCount;
|
private TextView mSelectionCount;
|
||||||
private ImageView mBlocker;
|
private ImageView mBlocker;
|
||||||
|
private View mRootView;
|
||||||
|
|
||||||
/*Private Variables*/
|
/*Private Variables*/
|
||||||
|
|
||||||
|
@ -55,24 +58,30 @@ public class tabController extends AppCompatActivity
|
||||||
private tabViewController mtabViewController;
|
private tabViewController mtabViewController;
|
||||||
private RecyclerView mRecycleView;
|
private RecyclerView mRecycleView;
|
||||||
private tabAdapter mTabAdapter;
|
private tabAdapter mTabAdapter;
|
||||||
|
private ColorDrawable mBackground;
|
||||||
|
|
||||||
/*Initializations*/
|
/*Initializations*/
|
||||||
|
|
||||||
@Override
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
protected void onCreate(Bundle savedInstanceState){
|
@SuppressLint("InflateParams") View root = inflater.inflate(R.layout.tab_view, null);
|
||||||
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
|
mRootView = root;
|
||||||
|
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.tab_view);
|
return root;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public void onActivityCreated(Bundle savedInstanceState) {
|
||||||
protected void onStart() {
|
super.onActivityCreated(savedInstanceState);
|
||||||
super.onStart();
|
|
||||||
|
activityContextManager.getInstance().setTabController(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onInit(){
|
||||||
initializeActivity();
|
initializeActivity();
|
||||||
initializeViews();
|
initializeViews();
|
||||||
|
initializeLocalEventHandlers();
|
||||||
initializeList();
|
initializeList();
|
||||||
initSwipe();
|
initSwipe();
|
||||||
initializeLocalEventHandlers();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initializeActivity(){
|
public void initializeActivity(){
|
||||||
|
@ -84,16 +93,17 @@ public class tabController extends AppCompatActivity
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initializeViews(){
|
public void initializeViews(){
|
||||||
mRecycleView = findViewById(R.id.pRecycleView);
|
mBackground = new ColorDrawable();
|
||||||
mTabs = findViewById(R.id.pTabs);
|
mRecycleView = mRootView.findViewById(R.id.pRecycleView);
|
||||||
mRemoveSelection = findViewById(R.id.pRemoveSelection);
|
mTabs = mRootView.findViewById(R.id.pTabs);
|
||||||
mMenuButton = findViewById(R.id.pMenuButton);
|
mRemoveSelection = mRootView.findViewById(R.id.pRemoveSelection);
|
||||||
mClearSelection = findViewById(R.id.pClearSelection);
|
mMenuButton = mRootView.findViewById(R.id.pMenuButton);
|
||||||
mPopupUndo = findViewById(R.id.pPopupUndo);
|
mClearSelection = mRootView.findViewById(R.id.pClearSelection);
|
||||||
mSelectionCount = findViewById(R.id.pSelectionCount);
|
mPopupUndo = mRootView.findViewById(R.id.pPopupUndo);
|
||||||
mBlocker = findViewById(R.id.pBlocker);
|
mSelectionCount = mRootView.findViewById(R.id.pSelectionCount);
|
||||||
|
mBlocker = mRootView.findViewById(R.id.pBlocker);
|
||||||
|
|
||||||
mtabViewController = new tabViewController(this, mTabs, mRemoveSelection, mMenuButton, mClearSelection, mPopupUndo, mSelectionCount, mBlocker);
|
mtabViewController = new tabViewController(this, mTabs, mRemoveSelection, mMenuButton, mClearSelection, mPopupUndo, mSelectionCount, mBlocker, mRecycleView);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("ClickableViewAccessibility")
|
@SuppressLint("ClickableViewAccessibility")
|
||||||
|
@ -106,7 +116,7 @@ public class tabController extends AppCompatActivity
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
public void initializeList(){
|
public void initializeList(){
|
||||||
LinearLayoutManager layoutManager = new LinearLayoutManager(tabController.this);
|
LinearLayoutManager layoutManager = new LinearLayoutManager(this.getContext());
|
||||||
tabAdapter adapter = new tabAdapter(mListModel.getList(),new adapterCallback());
|
tabAdapter adapter = new tabAdapter(mListModel.getList(),new adapterCallback());
|
||||||
mTabAdapter = adapter;
|
mTabAdapter = adapter;
|
||||||
layoutManager.setReverseLayout(true);
|
layoutManager.setReverseLayout(true);
|
||||||
|
@ -120,7 +130,7 @@ public class tabController extends AppCompatActivity
|
||||||
mRecycleView.setItemViewCacheSize(100);
|
mRecycleView.setItemViewCacheSize(100);
|
||||||
mRecycleView.setDrawingCacheEnabled(true);
|
mRecycleView.setDrawingCacheEnabled(true);
|
||||||
mRecycleView.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_HIGH);
|
mRecycleView.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_HIGH);
|
||||||
mRecycleView.setLayoutManager(new LinearLayoutManager(tabController.this));
|
mRecycleView.setLayoutManager(new LinearLayoutManager(this.getContext()));
|
||||||
initTabCount();
|
initTabCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,8 +156,10 @@ public class tabController extends AppCompatActivity
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onChildDraw(@NonNull Canvas c, @NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder, float dX, float dY, int actionState, boolean isCurrentlyActive) {
|
public void onChildDraw(@NonNull Canvas c, @NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder, float dX, float dY, int actionState, boolean isCurrentlyActive) {
|
||||||
Canvas mCanvas = (Canvas) mtabViewController.onTrigger(tabEnums.eTabViewCommands.ON_GENERATE_SWIPABLE_BACKGROUND, Arrays.asList(c, viewHolder, dX, actionState));
|
if (actionState == ItemTouchHelper.ACTION_STATE_SWIPE) {
|
||||||
super.onChildDraw(mCanvas, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive);
|
Canvas mCanvas = (Canvas) mtabViewController.onTrigger(tabEnums.eTabViewCommands.ON_GENERATE_SWIPABLE_BACKGROUND, Arrays.asList(c, viewHolder, dX, actionState));
|
||||||
|
super.onChildDraw(mCanvas, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
ItemTouchHelper itemTouchHelper = new ItemTouchHelper(simpleItemTouchCallback);
|
ItemTouchHelper itemTouchHelper = new ItemTouchHelper(simpleItemTouchCallback);
|
||||||
|
@ -185,13 +197,13 @@ public class tabController extends AppCompatActivity
|
||||||
|
|
||||||
public void onClose(){
|
public void onClose(){
|
||||||
onClearTabBackup();
|
onClearTabBackup();
|
||||||
finish();
|
// finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onNewTabInvoked(){
|
public void onNewTabInvoked(){
|
||||||
mHomeController.onNewTabBackground(true,false);
|
mHomeController.onNewTabBackground(true,false);
|
||||||
onClose();
|
onClose();
|
||||||
overridePendingTransition(R.anim.popup_anim_in, R.anim.popup_anim_out);
|
// overridePendingTransition(R.anim.popup_anim_in, R.anim.popup_anim_out);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onRestoreTab(View view){
|
public void onRestoreTab(View view){
|
||||||
|
@ -225,9 +237,11 @@ public class tabController extends AppCompatActivity
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onTabRowChanged(String pId){
|
public void onTabRowChanged(String pId){
|
||||||
for(int mCounter=0; mCounter<mListModel.getList().size();mCounter++){
|
if(mListModel!=null){
|
||||||
if(mListModel.getList().get(mCounter).getSession().getSessionID().equals(pId)){
|
for(int mCounter=0; mCounter<mListModel.getList().size();mCounter++){
|
||||||
mTabAdapter.notifyItemChanged(mCounter);
|
if(mListModel.getList().get(mCounter).getSession().getSessionID().equals(pId)){
|
||||||
|
mTabAdapter.notifyItemChanged(mCounter);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -264,7 +278,6 @@ public class tabController extends AppCompatActivity
|
||||||
public void onBackPressedInvoked(View view) {
|
public void onBackPressedInvoked(View view) {
|
||||||
mTabs.setPressed(true);
|
mTabs.setPressed(true);
|
||||||
onBackPressed();
|
onBackPressed();
|
||||||
activityContextManager.getInstance().onRemoveStack(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*Tab Menu*/
|
/*Tab Menu*/
|
||||||
|
@ -281,28 +294,15 @@ public class tabController extends AppCompatActivity
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if(pView.getId() == R.id.pOpenSetting){
|
else if(pView.getId() == R.id.pOpenSetting){
|
||||||
helperMethod.openActivity(settingHomeController.class, constants.CONST_LIST_HISTORY, this,true);
|
// helperMethod.openActivity(settingHomeController.class, constants.CONST_LIST_HISTORY, this,true);
|
||||||
}
|
}
|
||||||
mtabViewController.onTrigger(tabEnums.eTabViewCommands.M_DISMISS_MENU, null);
|
mtabViewController.onTrigger(tabEnums.eTabViewCommands.M_DISMISS_MENU, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onTrimMemory(int level)
|
|
||||||
{
|
|
||||||
if(status.sSettingIsAppPaused && (level==80 || level==15))
|
|
||||||
{
|
|
||||||
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.HOME_LOW_MEMORY,true));
|
|
||||||
onClose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResume()
|
public void onResume()
|
||||||
{
|
{
|
||||||
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_RESUME);
|
|
||||||
activityContextManager.getInstance().setCurrentActivity(this);
|
|
||||||
status.sSettingIsAppPaused = false;
|
status.sSettingIsAppPaused = false;
|
||||||
activityContextManager.getInstance().onStack(this);
|
|
||||||
super.onResume();
|
super.onResume();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -320,16 +320,17 @@ public class tabController extends AppCompatActivity
|
||||||
super.onPause();
|
super.onPause();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBackPressed() {
|
public void onBackPressed() {
|
||||||
boolean mStatus = (boolean) mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.M_SELECTION_MENU_SHOWING, null);
|
if(mTabAdapter!=null){
|
||||||
if(mStatus){
|
boolean mStatus = (boolean) mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.M_SELECTION_MENU_SHOWING, null);
|
||||||
onClearTabBackup();
|
if(mStatus){
|
||||||
onClearSelection(null);
|
onClearTabBackup();
|
||||||
}else {
|
onClearSelection(null);
|
||||||
super.onBackPressed();
|
}else {
|
||||||
onClose();
|
mHomeController.onDisableTabViewController();
|
||||||
overridePendingTransition(R.anim.popup_anim_in, R.anim.popup_anim_out);
|
onClose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,30 +8,19 @@ import android.graphics.Color;
|
||||||
import android.graphics.Paint;
|
import android.graphics.Paint;
|
||||||
import android.graphics.RectF;
|
import android.graphics.RectF;
|
||||||
import android.graphics.drawable.ColorDrawable;
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.os.Build;
|
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.view.Gravity;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.Window;
|
|
||||||
import android.view.WindowManager;
|
|
||||||
import android.widget.ActionMenuView;
|
import android.widget.ActionMenuView;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.FrameLayout;
|
|
||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.PopupWindow;
|
import android.widget.PopupWindow;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.appcompat.app.AppCompatDelegate;
|
|
||||||
import androidx.core.content.ContextCompat;
|
|
||||||
import androidx.recyclerview.widget.ItemTouchHelper;
|
import androidx.recyclerview.widget.ItemTouchHelper;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.constants.strings;
|
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -40,7 +29,7 @@ import static android.content.Context.LAYOUT_INFLATER_SERVICE;
|
||||||
class tabViewController
|
class tabViewController
|
||||||
{
|
{
|
||||||
/*Private Views*/
|
/*Private Views*/
|
||||||
private AppCompatActivity mContext;
|
private Fragment mContext;
|
||||||
private PopupWindow mTabOptionMenu = null;
|
private PopupWindow mTabOptionMenu = null;
|
||||||
private Button mTabs;
|
private Button mTabs;
|
||||||
private ImageView mRemoveSelection;
|
private ImageView mRemoveSelection;
|
||||||
|
@ -49,6 +38,7 @@ class tabViewController
|
||||||
private View mToastLayoutRoot;
|
private View mToastLayoutRoot;
|
||||||
private TextView mSelectionCount;
|
private TextView mSelectionCount;
|
||||||
private ImageView mBlocker;
|
private ImageView mBlocker;
|
||||||
|
private RecyclerView mRecycleView;
|
||||||
|
|
||||||
/*Private Local Variables*/
|
/*Private Local Variables*/
|
||||||
private Handler mDelayHandler = new Handler();
|
private Handler mDelayHandler = new Handler();
|
||||||
|
@ -56,7 +46,7 @@ class tabViewController
|
||||||
|
|
||||||
/*Initializations*/
|
/*Initializations*/
|
||||||
|
|
||||||
tabViewController(AppCompatActivity mContext, Button pTabs, ImageView pRemoveSelection, ImageButton pMenuButton, ImageButton pClearSelection, View pToastLayoutRoot, TextView pSelectionCount, ImageView pBlocker)
|
tabViewController(Fragment mContext, Button pTabs, ImageView pRemoveSelection, ImageButton pMenuButton, ImageButton pClearSelection, View pToastLayoutRoot, TextView pSelectionCount, ImageView pBlocker, RecyclerView pRecycleView)
|
||||||
{
|
{
|
||||||
this.mContext = mContext;
|
this.mContext = mContext;
|
||||||
this.mTabs = pTabs;
|
this.mTabs = pTabs;
|
||||||
|
@ -66,6 +56,7 @@ class tabViewController
|
||||||
this.mToastLayoutRoot = pToastLayoutRoot;
|
this.mToastLayoutRoot = pToastLayoutRoot;
|
||||||
this.mSelectionCount = pSelectionCount;
|
this.mSelectionCount = pSelectionCount;
|
||||||
this.mBlocker = pBlocker;
|
this.mBlocker = pBlocker;
|
||||||
|
this.mRecycleView = pRecycleView;
|
||||||
|
|
||||||
initPostUI();
|
initPostUI();
|
||||||
onHoldInteraction();
|
onHoldInteraction();
|
||||||
|
@ -74,10 +65,7 @@ class tabViewController
|
||||||
@SuppressLint("ClickableViewAccessibility")
|
@SuppressLint("ClickableViewAccessibility")
|
||||||
public void onHoldInteraction(){
|
public void onHoldInteraction(){
|
||||||
final Handler handler = new Handler();
|
final Handler handler = new Handler();
|
||||||
handler.postDelayed(() ->
|
handler.postDelayed(() -> mBlocker.setVisibility(View.GONE), 350);
|
||||||
{
|
|
||||||
mBlocker.setVisibility(View.GONE);
|
|
||||||
}, 350);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initTabCount(int pCount){
|
private void initTabCount(int pCount){
|
||||||
|
@ -85,20 +73,8 @@ class tabViewController
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initPostUI(){
|
private void initPostUI(){
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
mRecycleView.setAlpha(1);
|
||||||
Window window = mContext.getWindow();
|
mContext.getView().setBackgroundColor(Color.WHITE);
|
||||||
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
|
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) {
|
|
||||||
window.setStatusBarColor(ContextCompat.getColor(mContext, R.color.c_text_v3));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if(AppCompatDelegate.getDefaultNightMode() == AppCompatDelegate.MODE_NIGHT_NO){
|
|
||||||
mContext.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
|
||||||
}
|
|
||||||
mContext.getWindow().setStatusBarColor(ContextCompat.getColor(mContext, R.color.c_background));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onOpenTabMenu(View view) {
|
public void onOpenTabMenu(View view) {
|
||||||
|
@ -162,9 +138,7 @@ class tabViewController
|
||||||
|
|
||||||
initTabCount(pTabCount);
|
initTabCount(pTabCount);
|
||||||
mDelayHandler.removeCallbacksAndMessages(null);
|
mDelayHandler.removeCallbacksAndMessages(null);
|
||||||
mDelayHandler.postDelayed(() -> mToastLayoutRoot.animate().alpha(0).withEndAction(() -> {
|
mDelayHandler.postDelayed(() -> mToastLayoutRoot.animate().alpha(0).withEndAction(() -> mToastLayoutRoot.setVisibility(View.GONE)), 3000);
|
||||||
mToastLayoutRoot.setVisibility(View.GONE);
|
|
||||||
}), 3000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onHideUndoDialog() {
|
private void onHideUndoDialog() {
|
||||||
|
@ -185,16 +159,12 @@ class tabViewController
|
||||||
float width = height / 3;
|
float width = height / 3;
|
||||||
|
|
||||||
if(pDX > 0){
|
if(pDX > 0){
|
||||||
mPainter.setColor(ContextCompat.getColor(mContext, R.color.c_list_item_current));
|
pCanvas.drawARGB(0, 241, 243, 244);
|
||||||
RectF background = new RectF((float) itemView.getLeft(), (float) itemView.getTop(), pDX,(float) itemView.getBottom());
|
|
||||||
pCanvas.drawRect(background, mPainter);
|
|
||||||
icon = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.dustbin);
|
icon = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.dustbin);
|
||||||
RectF icon_dest = new RectF((float) itemView.getLeft() + width ,(float) itemView.getTop() + width,(float) itemView.getLeft()+ 2*width,(float)itemView.getBottom() - width);
|
RectF icon_dest = new RectF((float) itemView.getLeft() + width ,(float) itemView.getTop() + width,(float) itemView.getLeft()+ 2*width,(float)itemView.getBottom() - width);
|
||||||
pCanvas.drawBitmap(icon,null,icon_dest, mPainter);
|
pCanvas.drawBitmap(icon,null,icon_dest, mPainter);
|
||||||
} else {
|
} else {
|
||||||
mPainter.setColor(ContextCompat.getColor(mContext, R.color.c_list_item_current));
|
pCanvas.drawARGB(0, 241, 243, 244);
|
||||||
RectF background = new RectF((float) itemView.getRight() + pDX, (float) itemView.getTop(),(float) itemView.getRight(), (float) itemView.getBottom());
|
|
||||||
pCanvas.drawRect(background, mPainter);
|
|
||||||
icon = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.dustbin);
|
icon = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.dustbin);
|
||||||
RectF icon_dest = new RectF((float) itemView.getRight() - 2*width ,(float) itemView.getTop() + width,(float) itemView.getRight() - width,(float)itemView.getBottom() - width);
|
RectF icon_dest = new RectF((float) itemView.getRight() - 2*width ,(float) itemView.getTop() + width,(float) itemView.getRight() - width,(float)itemView.getBottom() - width);
|
||||||
pCanvas.drawBitmap(icon,null,icon_dest, mPainter);
|
pCanvas.drawBitmap(icon,null,icon_dest, mPainter);
|
||||||
|
|
|
@ -6,7 +6,7 @@ public class enums
|
||||||
public enum etype{
|
public enum etype{
|
||||||
on_update_favicon,ON_UPDATE_TAB_TITLE, ON_LOAD_REQUEST,GECKO_SCROLL_CHANGED,ON_UPDATE_SEARCH_BAR,M_ON_MAIL,
|
on_update_favicon,ON_UPDATE_TAB_TITLE, ON_LOAD_REQUEST,GECKO_SCROLL_CHANGED,ON_UPDATE_SEARCH_BAR,M_ON_MAIL,
|
||||||
on_verify_selected_url_menu,FINDER_RESULT_CALLBACK,
|
on_verify_selected_url_menu,FINDER_RESULT_CALLBACK,
|
||||||
welcome, reload,download_folder,M_ON_BANNER_UPDATE,
|
welcome, reload,download_folder,M_ON_BANNER_UPDATE,M_INIT_TAB_COUNT,
|
||||||
url_triggered, url_triggered_new_tab,url_clear,fetch_favicon, fetch_thumbnail,url_clear_at,remove_from_database,is_empty,M_HOME_PAGE,M_PRELOAD_URL,ON_KEYBOARD_CLOSE,
|
url_triggered, url_triggered_new_tab,url_clear,fetch_favicon, fetch_thumbnail,url_clear_at,remove_from_database,is_empty,M_HOME_PAGE,M_PRELOAD_URL,ON_KEYBOARD_CLOSE,
|
||||||
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_INITIALIZE_TAB_SINGLE, M_INITIALIZE_TAB_LINK,on_request_completed, on_update_history,on_update_suggestion,M_WELCOME_MESSAGE,ON_UPDATE_TITLE_BAR,ON_FIRST_PAINT, ON_LOAD_TAB_ON_RESUME, ON_SESSION_REINIT,on_page_loaded,on_load_error,download_file_popup,on_init_ads,search_update, open_new_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_INITIALIZE_TAB_SINGLE, M_INITIALIZE_TAB_LINK,on_request_completed, on_update_history,on_update_suggestion,M_WELCOME_MESSAGE,ON_UPDATE_TITLE_BAR,ON_FIRST_PAINT, ON_LOAD_TAB_ON_RESUME, ON_SESSION_REINIT,on_page_loaded,on_load_error,download_file_popup,on_init_ads,search_update, open_new_tab
|
||||||
}
|
}
|
||||||
|
|
|
@ -217,60 +217,10 @@ class tabDataModel
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
throwable.printStackTrace();
|
throwable.printStackTrace();
|
||||||
}
|
}
|
||||||
|
activityContextManager.getInstance().getHomeController().onOpenTabReady();
|
||||||
|
|
||||||
}
|
}
|
||||||
}.start();
|
}.start();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*int e=0;
|
|
||||||
e=1;
|
|
||||||
for(int counter = 0; counter< mTabs.size(); counter++){
|
|
||||||
if(mTabs.get(counter).getSession().getSessionID().equals(pSessionID))
|
|
||||||
{
|
|
||||||
final Handler handler = new Handler();
|
|
||||||
int finalCounter = counter;
|
|
||||||
int finalCounter1 = counter;
|
|
||||||
new Thread(){
|
|
||||||
public void run(){
|
|
||||||
try {
|
|
||||||
int mCounter=0;
|
|
||||||
|
|
||||||
while (mCounter<=20){
|
|
||||||
|
|
||||||
|
|
||||||
activityContextManager.getInstance().getHomeController().runOnUiThread(() -> {
|
|
||||||
Bitmap mBitmap = null;
|
|
||||||
try {
|
|
||||||
mBitmap = pBitmapManager.poll(0);
|
|
||||||
} catch (Throwable throwable) {
|
|
||||||
throwable.printStackTrace();
|
|
||||||
isLoading = 2;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
mTabs.get(finalCounter).setmBitmap(mBitmap);
|
|
||||||
if(pImageView!=null){
|
|
||||||
pImageView.setImageBitmap(mBitmap);
|
|
||||||
}
|
|
||||||
|
|
||||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
|
||||||
mBitmap.compress(Bitmap.CompressFormat.PNG, 100, bos);
|
|
||||||
byte[] mThumbnail = bos.toByteArray();
|
|
||||||
|
|
||||||
ContentValues mContentValues = new ContentValues();
|
|
||||||
mContentValues.put("mThumbnail", mThumbnail);
|
|
||||||
|
|
||||||
databaseController.getInstance().execTab("tab",mContentValues, mTabs.get(finalCounter1).getmId());
|
|
||||||
isLoading = 3;
|
|
||||||
});
|
|
||||||
mCounter++;
|
|
||||||
}
|
|
||||||
} catch (Throwable throwable) {
|
|
||||||
throwable.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}.start();
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<ArrayList<String>> getSuggestions(String pQuery){
|
public ArrayList<ArrayList<String>> getSuggestions(String pQuery){
|
||||||
|
|
|
@ -11,6 +11,8 @@ import android.os.Environment;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import org.mozilla.gecko.util.HardwareUtils;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
public class downloadFileService extends IntentService
|
public class downloadFileService extends IntentService
|
||||||
|
@ -56,5 +58,29 @@ public class downloadFileService extends IntentService
|
||||||
Intent intent = new Intent(android.provider.Settings.ACTION_MANAGE_APPLICATIONS_SETTINGS);
|
Intent intent = new Intent(android.provider.Settings.ACTION_MANAGE_APPLICATIONS_SETTINGS);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
final String uri = fn[0];
|
||||||
|
final String filename = fn[1];
|
||||||
|
final String mimeType = "mimeType";
|
||||||
|
|
||||||
|
final DownloadManager.Request request = new DownloadManager.Request(Uri.parse(uri));
|
||||||
|
request.setMimeType(mimeType);
|
||||||
|
|
||||||
|
try {
|
||||||
|
request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, filename);
|
||||||
|
} catch (IllegalStateException e) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
request.allowScanningByMediaScanner();
|
||||||
|
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
|
||||||
|
|
||||||
|
try {
|
||||||
|
DownloadManager manager = (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE);
|
||||||
|
manager.enqueue(request);
|
||||||
|
} catch (RuntimeException ignored) {
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -225,7 +225,7 @@ public class pluginController
|
||||||
else if(pEventType.equals(M_CLEAR_TAB)){
|
else if(pEventType.equals(M_CLEAR_TAB)){
|
||||||
dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_CLEAR_TAB, null);
|
dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_CLEAR_TAB, null);
|
||||||
mHomeController.initTab(true);
|
mHomeController.initTab(true);
|
||||||
activityContextManager.getInstance().getTabController().finish();
|
mHomeController.onDisableTabViewController();
|
||||||
}
|
}
|
||||||
else if(pEventType.equals(M_REQUEST_BRIDGES)){
|
else if(pEventType.equals(M_REQUEST_BRIDGES)){
|
||||||
pluginController.getInstance().onMessageManagerInvoke(Arrays.asList(constants.CONST_BACKEND_GOOGLE_URL, this), M_BRIDGE_MAIL);
|
pluginController.getInstance().onMessageManagerInvoke(Arrays.asList(constants.CONST_BACKEND_GOOGLE_URL, this), M_BRIDGE_MAIL);
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
android:background="@color/c_background_keyboard"
|
android:background="@color/c_background_keyboard"
|
||||||
tools:context="com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController">
|
tools:context="com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController">
|
||||||
|
|
||||||
|
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
android:id="@+id/pCoordinatorLayout"
|
android:id="@+id/pCoordinatorLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -41,7 +40,7 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/pTopbar"
|
android:id="@+id/pTopbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="60dp"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/c_background"
|
android:background="@color/c_background"
|
||||||
android:elevation="4dp"
|
android:elevation="4dp"
|
||||||
android:gravity="start"
|
android:gravity="start"
|
||||||
|
@ -89,13 +88,11 @@
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:animateLayoutChanges="true"
|
android:animateLayoutChanges="true"
|
||||||
android:textIsSelectable="false"
|
|
||||||
android:requiresFadingEdge="horizontal"
|
|
||||||
android:fadingEdgeLength="20dp"
|
|
||||||
android:background="@xml/gx_generic_input"
|
android:background="@xml/gx_generic_input"
|
||||||
android:completionHintView="@layout/hint_view"
|
android:completionHintView="@layout/hint_view"
|
||||||
android:dropDownAnchor="@id/pSearchEngineBar"
|
android:dropDownAnchor="@id/pSearchEngineBar"
|
||||||
android:ems="10"
|
android:ems="10"
|
||||||
|
android:fadingEdgeLength="20dp"
|
||||||
android:focusableInTouchMode="true"
|
android:focusableInTouchMode="true"
|
||||||
android:hint="@string/GENERAL_SEARCH_HINT"
|
android:hint="@string/GENERAL_SEARCH_HINT"
|
||||||
android:importantForAutofill="no"
|
android:importantForAutofill="no"
|
||||||
|
@ -105,12 +102,14 @@
|
||||||
android:paddingEnd="15dp"
|
android:paddingEnd="15dp"
|
||||||
android:popupElevation="0dp"
|
android:popupElevation="0dp"
|
||||||
android:privateImeOptions="nm"
|
android:privateImeOptions="nm"
|
||||||
|
android:requiresFadingEdge="horizontal"
|
||||||
android:selectAllOnFocus="true"
|
android:selectAllOnFocus="true"
|
||||||
android:text="@string/GENERAL_HOME_URL"
|
android:text="@string/GENERAL_HOME_URL"
|
||||||
android:textColor="@color/c_text_v1"
|
android:textColor="@color/c_text_v1"
|
||||||
android:textColorHighlight="@color/text_color_highlight_v3"
|
android:textColorHighlight="@color/text_color_highlight_v3"
|
||||||
android:textColorHint="@color/c_text_v2"
|
android:textColorHint="@color/c_text_v2"
|
||||||
android:textCursorDrawable="@xml/gx_search_cursor_state"
|
android:textCursorDrawable="@xml/gx_search_cursor_state"
|
||||||
|
android:textIsSelectable="false"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
app:hintAnimationEnabled="false"
|
app:hintAnimationEnabled="false"
|
||||||
tools:targetApi="o">
|
tools:targetApi="o">
|
||||||
|
@ -196,11 +195,10 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="fill_vertical"
|
android:layout_gravity="fill_vertical"
|
||||||
android:layout_marginTop="0dp"
|
android:layout_marginTop="0dp"
|
||||||
android:layout_marginBottom="-60dp"
|
|
||||||
android:isScrollContainer="true"
|
|
||||||
android:measureAllChildren="true"
|
|
||||||
android:background="@color/clear_alpha"
|
android:background="@color/clear_alpha"
|
||||||
android:fillViewport="true"
|
android:fillViewport="true"
|
||||||
|
android:isScrollContainer="true"
|
||||||
|
android:measureAllChildren="true"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
@ -252,9 +250,9 @@
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/pSplashLayout"
|
android:id="@+id/pSplashLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:visibility="visible"
|
android:layout_height="match_parent"
|
||||||
android:animateLayoutChanges="true"
|
android:animateLayoutChanges="true"
|
||||||
android:layout_height="match_parent">
|
android:visibility="visible">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/pSplashScreen"
|
android:id="@+id/pSplashScreen"
|
||||||
|
@ -307,9 +305,9 @@
|
||||||
android:layout_width="90dp"
|
android:layout_width="90dp"
|
||||||
android:layout_height="90dp"
|
android:layout_height="90dp"
|
||||||
android:layout_marginStart="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:rotationY="@integer/angle_rtl_180"
|
|
||||||
android:layout_marginTop="100dp"
|
android:layout_marginTop="100dp"
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
|
android:rotationY="@integer/angle_rtl_180"
|
||||||
android:translationZ="3dp"
|
android:translationZ="3dp"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="@+id/pImageDivider"
|
app:layout_constraintTop_toTopOf="@+id/pImageDivider"
|
||||||
|
@ -389,13 +387,13 @@
|
||||||
android:layout_width="90dp"
|
android:layout_width="90dp"
|
||||||
android:layout_height="90dp"
|
android:layout_height="90dp"
|
||||||
android:layout_marginStart="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:rotationY="@integer/angle_rtl_180"
|
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
|
android:rotationY="@integer/angle_rtl_180"
|
||||||
android:translationZ="3dp"
|
android:translationZ="3dp"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/pGenesisLogo"
|
app:layout_constraintTop_toBottomOf="@+id/pGenesisLogo"
|
||||||
app:srcCompat="@drawable/sheild_logo_bordered"
|
app:srcCompat="@drawable/sheild_logo_bordered" />
|
||||||
android:contentDescription="@string/GENERAL_TODO" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/pInfo2"
|
android:id="@+id/pInfo2"
|
||||||
|
@ -472,8 +470,8 @@
|
||||||
|
|
||||||
android:id="@+id/pInfoLandscape"
|
android:id="@+id/pInfoLandscape"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:visibility="gone"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
@ -481,11 +479,11 @@
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/pGenesisLogoBottom"
|
android:id="@+id/pGenesisLogoBottom"
|
||||||
android:layout_width="90dp"
|
android:layout_width="90dp"
|
||||||
android:rotationY="@integer/angle_rtl_180"
|
|
||||||
android:layout_height="90dp"
|
android:layout_height="90dp"
|
||||||
android:layout_marginStart="7dp"
|
android:layout_marginStart="7dp"
|
||||||
android:layout_marginTop="15dp"
|
android:layout_marginTop="15dp"
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
|
android:rotationY="@integer/angle_rtl_180"
|
||||||
android:translationZ="3dp"
|
android:translationZ="3dp"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
@ -561,7 +559,7 @@
|
||||||
tools:ignore="UnusedAttribute" />
|
tools:ignore="UnusedAttribute" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/Connect"
|
android:id="@+id/Connect"
|
||||||
android:layout_width="120dp"
|
android:layout_width="120dp"
|
||||||
android:layout_height="51dp"
|
android:layout_height="51dp"
|
||||||
|
@ -605,8 +603,8 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="#0A1727"
|
android:background="#0A1727"
|
||||||
android:paddingStart="15dp"
|
android:paddingStart="15dp"
|
||||||
android:paddingEnd="15dp"
|
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="10dp"
|
||||||
|
android:paddingEnd="15dp"
|
||||||
android:paddingBottom="10dp"
|
android:paddingBottom="10dp"
|
||||||
android:text="@string/HOME_COPYRIGHT"
|
android:text="@string/HOME_COPYRIGHT"
|
||||||
android:textColor="#4a6868"
|
android:textColor="#4a6868"
|
||||||
|
@ -689,8 +687,8 @@
|
||||||
android:layout_height="65dp"
|
android:layout_height="65dp"
|
||||||
android:layout_marginTop="14dp"
|
android:layout_marginTop="14dp"
|
||||||
android:layout_marginBottom="13dp"
|
android:layout_marginBottom="13dp"
|
||||||
android:clickable="false"
|
|
||||||
android:background="@color/clear_alpha"
|
android:background="@color/clear_alpha"
|
||||||
|
android:clickable="false"
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
android:focusable="false"
|
android:focusable="false"
|
||||||
android:translationZ="3dp"
|
android:translationZ="3dp"
|
||||||
|
@ -762,4 +760,17 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
<androidx.fragment.app.FragmentContainerView
|
||||||
|
android:id="@+id/mTabFragment"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:name="com.darkweb.genesissearchengine.appManager.tabManager.tabController"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:background="@color/c_background"
|
||||||
|
android:alpha="0"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -49,7 +49,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
app:cardCornerRadius="11dp"
|
app:cardCornerRadius="6dp"
|
||||||
app:cardElevation="0dp"
|
app:cardElevation="0dp"
|
||||||
app:contentPadding="0dp">
|
app:contentPadding="0dp">
|
||||||
<com.darkweb.genesissearchengine.helperManager.TopCropImageView
|
<com.darkweb.genesissearchengine.helperManager.TopCropImageView
|
||||||
|
|
|
@ -74,7 +74,7 @@
|
||||||
android:layout_width="40dp"
|
android:layout_width="40dp"
|
||||||
android:layout_height="40dp"
|
android:layout_height="40dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginTop="-3dp"
|
android:layout_marginTop="-3.5dp"
|
||||||
android:layout_marginBottom="0dp"
|
android:layout_marginBottom="0dp"
|
||||||
android:background="@xml/gx_generic_tab_button"
|
android:background="@xml/gx_generic_tab_button"
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
android:id="@+id/pMenuButton"
|
android:id="@+id/pMenuButton"
|
||||||
android:layout_width="35dp"
|
android:layout_width="35dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginTop="-6dp"
|
android:layout_marginTop="-8dp"
|
||||||
android:layout_marginEnd="0dp"
|
android:layout_marginEnd="0dp"
|
||||||
android:background="@xml/gx_ripple_gray"
|
android:background="@xml/gx_ripple_gray"
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
|
|
|
@ -5,10 +5,11 @@ buildscript {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
jcenter()
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
|
mavenCentral()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:4.1.2'
|
classpath 'com.android.tools.build:gradle:4.1.2'
|
||||||
classpath 'com.google.gms:google-services:4.3.4'
|
classpath 'com.google.gms:google-services:4.3.5'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,8 +48,8 @@ dependencies {
|
||||||
implementation 'org.torproject:tor-android-binary:0.4.4.6'
|
implementation 'org.torproject:tor-android-binary:0.4.4.6'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
implementation 'info.pluggabletransports.aptds:apt-dispatch-library:1.0.9'
|
implementation 'info.pluggabletransports.aptds:apt-dispatch-library:1.0.9'
|
||||||
implementation 'info.pluggabletransports.aptds:apt-meek-obfs4-legacy:1.0.9'
|
implementation 'info.pluggabletransports.aptds:apt-meek-obfs4-legacy:1.0.9'
|
||||||
**/
|
**/
|
||||||
implementation 'info.pluggabletransports.aptds:jsocksAndroid:1.0.4'
|
implementation 'info.pluggabletransports.aptds:jsocksAndroid:1.0.4'
|
||||||
|
|
||||||
|
@ -65,4 +65,4 @@ dependencies {
|
||||||
implementation 'info.guardianproject:jtorctl:0.4'
|
implementation 'info.guardianproject:jtorctl:0.4'
|
||||||
|
|
||||||
implementation 'com.github.tladesignz:IPtProxy:0.5.2'
|
implementation 'com.github.tladesignz:IPtProxy:0.5.2'
|
||||||
}
|
}
|
|
@ -2,10 +2,13 @@ package org.torproject.android.service;
|
||||||
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
|
import androidx.core.app.NotificationCompat;
|
||||||
|
|
||||||
import net.freehaven.tor.control.EventHandler;
|
import net.freehaven.tor.control.EventHandler;
|
||||||
|
|
||||||
import org.torproject.android.service.util.ExternalIPFetcher;
|
import org.torproject.android.service.util.ExternalIPFetcher;
|
||||||
import org.torproject.android.service.util.Prefs;
|
import org.torproject.android.service.util.Prefs;
|
||||||
|
import org.torproject.android.service.wrapper.orbotLocalConstants;
|
||||||
|
|
||||||
import java.text.NumberFormat;
|
import java.text.NumberFormat;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -91,8 +94,13 @@ public class TorEventHandler implements EventHandler, TorServiceConstants {
|
||||||
|
|
||||||
int iconId = R.drawable.ic_stat_tor_logo;
|
int iconId = R.drawable.ic_stat_tor_logo;
|
||||||
|
|
||||||
if (read > 0 || written > 0)
|
if (read > 0 || written > 0){
|
||||||
iconId = R.drawable.ic_stat_tor_logo;
|
if(orbotLocalConstants.mIsTorInitialized){
|
||||||
|
iconId = R.drawable.ic_stat_tor_logo;
|
||||||
|
}else {
|
||||||
|
iconId = R.drawable.ic_stat_starting_tor_logo;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String sb = formatCount(read) +
|
String sb = formatCount(read) +
|
||||||
" \u2193" +
|
" \u2193" +
|
||||||
|
@ -134,8 +142,9 @@ public class TorEventHandler implements EventHandler, TorServiceConstants {
|
||||||
public void circuitStatus(String status, String circID, String path) {
|
public void circuitStatus(String status, String circID, String path) {
|
||||||
|
|
||||||
/* once the first circuit is complete, then announce that Orbot is on*/
|
/* once the first circuit is complete, then announce that Orbot is on*/
|
||||||
if (mService.getCurrentStatus() == STATUS_STARTING && TextUtils.equals(status, "BUILT"))
|
if (mService.getCurrentStatus() == STATUS_STARTING && TextUtils.equals(status, "BUILT")) {
|
||||||
mService.sendCallbackStatus(STATUS_ON);
|
mService.sendCallbackStatus(STATUS_ON);
|
||||||
|
}
|
||||||
|
|
||||||
if (Prefs.useDebugLogging()) {
|
if (Prefs.useDebugLogging()) {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
|
@ -5,3 +5,4 @@ obfs4 37.218.240.34:40035 88CD36D45A35271963EF82E511C8827A24730913 cert=eGXYfWOD
|
||||||
obfs4 37.218.245.14:38224 D9A82D2F9C2F65A18407B1D2B764F130847F8B5D cert=bjRaMrr1BRiAW8IE9U5z27fQaYgOhX1UCmOpg2pFpoMvo6ZgQMzLsaTzzQNTlm7hNcb+Sg iat-mode=0
|
obfs4 37.218.245.14:38224 D9A82D2F9C2F65A18407B1D2B764F130847F8B5D cert=bjRaMrr1BRiAW8IE9U5z27fQaYgOhX1UCmOpg2pFpoMvo6ZgQMzLsaTzzQNTlm7hNcb+Sg iat-mode=0
|
||||||
obfs4 85.31.186.98:443 011F2599C0E9B27EE74B353155E244813763C3E5 cert=ayq0XzCwhpdysn5o0EyDUbmSOx3X/oTEbzDMvczHOdBJKlvIdHHLJGkZARtT4dcBFArPPg iat-mode=0
|
obfs4 85.31.186.98:443 011F2599C0E9B27EE74B353155E244813763C3E5 cert=ayq0XzCwhpdysn5o0EyDUbmSOx3X/oTEbzDMvczHOdBJKlvIdHHLJGkZARtT4dcBFArPPg iat-mode=0
|
||||||
meek_lite 0.0.2.0:2 97700DFE9F483596DDA6264C4D7DF7641E1E39CE url=https://meek.azureedge.net/ front=ajax.aspnetcdn.com
|
meek_lite 0.0.2.0:2 97700DFE9F483596DDA6264C4D7DF7641E1E39CE url=https://meek.azureedge.net/ front=ajax.aspnetcdn.com
|
||||||
|
snowflake 192.0.2.3:1
|
Loading…
Reference in New Issue