mirror of https://github.com/LeOS-GSI/LeOS-Genesis
parent
4dfef0f5e7
commit
f396ab8aae
|
@ -28,5 +28,6 @@
|
|||
<option name="useQualifiedModuleNames" value="true" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
<option name="offlineMode" value="true" />
|
||||
</component>
|
||||
</project>
|
|
@ -34,6 +34,7 @@ import androidx.appcompat.app.AppCompatDelegate;
|
|||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.widget.NestedScrollView;
|
||||
import androidx.fragment.app.FragmentContainerView;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
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.settingHomePage.settingHomeController;
|
||||
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.constants.constants;
|
||||
import com.darkweb.genesissearchengine.constants.enums;
|
||||
|
@ -137,6 +139,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
private ConstraintLayout mInfoLandscape;
|
||||
private com.google.android.material.appbar.AppBarLayout mAppBar;
|
||||
private ProgressBar mProgressBarIndeterminate;
|
||||
private FragmentContainerView mTabFragment;
|
||||
|
||||
/*Redirection Objects*/
|
||||
private GeckoResult<Bitmap> mRenderedBitmap = null;
|
||||
|
@ -361,13 +364,14 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
mInfoPortrait = findViewById(R.id.pInfoPortrait);
|
||||
mInfoLandscape = findViewById(R.id.pInfoLandscape);
|
||||
mProgressBarIndeterminate = findViewById(R.id.pProgressBarIndeterminate);
|
||||
mTabFragment = findViewById(R.id.mTabFragment);
|
||||
|
||||
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);
|
||||
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());
|
||||
mGeckoClient.initialize(mGeckoView, new geckoViewCallback(), this,false);
|
||||
mGeckoClient.onValidateInitializeFromStartup();
|
||||
|
@ -689,7 +693,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
mSearchBarLoading = true;
|
||||
mEdittextChanged.postDelayed(postToServerRunnable, 0);
|
||||
}else{
|
||||
mEdittextChanged.postDelayed(postToServerRunnable, 500);
|
||||
mEdittextChanged.postDelayed(postToServerRunnable, 250);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -723,6 +727,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
helperMethod.hideKeyboard(homeController.this);
|
||||
}
|
||||
}
|
||||
mSearchbar.setSelection(0);
|
||||
}else {
|
||||
if(!isFocusChanging){
|
||||
if(!status.mThemeApplying){
|
||||
|
@ -758,7 +763,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
private Runnable postToServerRunnable = () -> {
|
||||
onUpdateSuggestionList(mSuggestions);
|
||||
final Handler handler = new Handler();
|
||||
handler.postDelayed(() -> mSearchBarLoading = false, 110);
|
||||
handler.postDelayed(() -> mSearchBarLoading = false, 260);
|
||||
};
|
||||
|
||||
public void onSearchBarInvoked(View view){
|
||||
|
@ -801,6 +806,26 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
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(){
|
||||
return mGeckoClient.initFreeSession(mGeckoView, this, new geckoViewCallback());
|
||||
}
|
||||
|
@ -855,8 +880,14 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
onGetThumbnail(null);
|
||||
mGeckoClient.onRedrawPixel();
|
||||
mNewTab.setPressed(true);
|
||||
helperMethod.openActivity(tabController.class, constants.CONST_LIST_HISTORY, homeController.this,true);
|
||||
}
|
||||
|
||||
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){
|
||||
|
@ -880,8 +911,17 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
mHomeViewController.initTopBarPadding();
|
||||
}
|
||||
|
||||
public void onDisableTabViewController(){
|
||||
mHomeViewController.onHideTabContainer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed(){
|
||||
if(mTabFragment.getVisibility()==View.VISIBLE){
|
||||
onResume();
|
||||
mHomeViewController.onHideTabContainer();
|
||||
return;
|
||||
}
|
||||
|
||||
mSearchbar.clearFocus();
|
||||
if(mFindBar!=null && mFindBar.getVisibility() == View.VISIBLE){
|
||||
|
@ -1134,13 +1174,13 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
initTabCount();
|
||||
|
||||
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);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
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;
|
||||
}else {
|
||||
return true;
|
||||
|
@ -1204,7 +1244,8 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
else if (menuId == R.id.menu9) {
|
||||
helperMethod.hideKeyboard(this);
|
||||
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) {
|
||||
helperMethod.hideKeyboard(this);
|
||||
|
@ -1225,7 +1266,8 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
}
|
||||
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);
|
||||
}
|
||||
else if (menuId == R.id.pMenuOpenNewTab)
|
||||
|
@ -1319,7 +1361,11 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
@Override
|
||||
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);
|
||||
}
|
||||
|
@ -1555,7 +1601,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
|||
helperMethod.openPlayStore(dataToStr(data.get(0)).split("__")[1],homeController.this);
|
||||
}
|
||||
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));
|
||||
}
|
||||
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.graphics.ColorUtils;
|
||||
import androidx.core.widget.NestedScrollView;
|
||||
import androidx.fragment.app.FragmentContainerView;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import com.darkweb.genesissearchengine.appManager.historyManager.historyRowModel;
|
||||
import com.darkweb.genesissearchengine.constants.*;
|
||||
|
@ -85,7 +86,7 @@ class homeViewController
|
|||
private View mSearchEngineBar;
|
||||
private EditText mFindText;
|
||||
private TextView mFindCount;
|
||||
private androidx.constraintlayout.widget.ConstraintLayout mTopLayout;
|
||||
private ConstraintLayout mTopLayout;
|
||||
private ImageButton mVoiceInput;
|
||||
private ImageButton mMenu;
|
||||
private ImageView mBlocker;
|
||||
|
@ -96,6 +97,7 @@ class homeViewController
|
|||
private ConstraintLayout mInfoLandscape;
|
||||
private NestedScrollView mNestedScroll;
|
||||
private ProgressBar mProgressBarIndeterminate;
|
||||
private FragmentContainerView mTabFragment;
|
||||
|
||||
/*Local Variables*/
|
||||
private Callable<String> mLogs = null;
|
||||
|
@ -103,7 +105,7 @@ class homeViewController
|
|||
private boolean isFullScreen = false;
|
||||
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.mProgressBar = progressBar;
|
||||
this.mSearchbar = searchbar;
|
||||
|
@ -135,6 +137,7 @@ class homeViewController
|
|||
this.mInfoLandscape = pInfoLandscape;
|
||||
this.mNestedScroll = pNestedScroll;
|
||||
this.mProgressBarIndeterminate = pProgressBarIndeterminate;
|
||||
this.mTabFragment = pTabFragment;
|
||||
|
||||
initSplashScreen();
|
||||
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){
|
||||
if(!pStatus){
|
||||
this.mVoiceInput.animate().setDuration(0).alpha(0).withEndAction(() -> {
|
||||
|
@ -913,13 +929,9 @@ class homeViewController
|
|||
mTopBar.setVisibility(View.GONE);
|
||||
mBannerAds.setVisibility(View.GONE);
|
||||
|
||||
//ConstraintLayout.MarginLayoutParams params = (ConstraintLayout.MarginLayoutParams) mWebviewContainer.getLayoutParams();
|
||||
//params.setMargins(0, helperMethod.pxFromDp(0), 0, 0);
|
||||
//mWebviewContainer.setLayoutParams(params);
|
||||
|
||||
//ConstraintLayout.MarginLayoutParams params1 = (ConstraintLayout.MarginLayoutParams) mWebviewContainer.getLayoutParams();
|
||||
//params1.setMargins(0, 0, 0,0);
|
||||
//mGeckoView.setLayoutParams(params1);
|
||||
NestedScrollView.MarginLayoutParams params = (NestedScrollView.MarginLayoutParams) mNestedScroll.getLayoutParams();
|
||||
params.setMargins(0, 0, 0,helperMethod.pxFromDp(60)*-1);
|
||||
mNestedScroll.setLayoutParams(params);
|
||||
|
||||
com.darkweb.genesissearchengine.constants.status.sFullScreenBrowsing = false;
|
||||
initTopBarPadding();
|
||||
|
@ -940,13 +952,9 @@ class homeViewController
|
|||
mBannerAds.setVisibility(View.GONE);
|
||||
mEvent.invokeObserver(Collections.singletonList(!isLandscape), enums.etype.on_init_ads);
|
||||
|
||||
//ConstraintLayout.MarginLayoutParams params = (ConstraintLayout.MarginLayoutParams) mWebviewContainer.getLayoutParams();
|
||||
//params.setMargins(0, 0, 0,0);
|
||||
//mWebviewContainer.setLayoutParams(params);
|
||||
|
||||
//ConstraintLayout.MarginLayoutParams params1 = (ConstraintLayout.MarginLayoutParams) mWebviewContainer.getLayoutParams();
|
||||
//params1.setMargins(0, 0, 0,helperMethod.pxFromDp(0));
|
||||
//mGeckoView.setLayoutParams(params1);
|
||||
NestedScrollView.MarginLayoutParams params = (NestedScrollView.MarginLayoutParams) mNestedScroll.getLayoutParams();
|
||||
params.setMargins(0, 0, 0,0);
|
||||
mNestedScroll.setLayoutParams(params);
|
||||
|
||||
com.darkweb.genesissearchengine.constants.status.sFullScreenBrowsing = (boolean) dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_FULL_SCREEN_BROWSIING,true));
|
||||
initTopBarPadding();
|
||||
|
|
|
@ -245,7 +245,7 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
|
|||
}
|
||||
|
||||
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 {
|
||||
Drawable mDrawable;
|
||||
Resources res = itemView.getContext().getResources();
|
||||
|
|
|
@ -2,31 +2,33 @@ package com.darkweb.genesissearchengine.appManager.tabManager;
|
|||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.ItemTouchHelper;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.SimpleItemAnimator;
|
||||
|
||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||
import com.darkweb.genesissearchengine.appManager.homeManager.geckoManager.geckoSession;
|
||||
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.dataManager.dataController;
|
||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||
import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
||||
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
|
||||
import com.example.myapplication.R;
|
||||
|
@ -36,7 +38,7 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class tabController extends AppCompatActivity
|
||||
public class tabController extends Fragment
|
||||
{
|
||||
/*Private Views*/
|
||||
private Button mTabs;
|
||||
|
@ -46,6 +48,7 @@ public class tabController extends AppCompatActivity
|
|||
private View mPopupUndo;
|
||||
private TextView mSelectionCount;
|
||||
private ImageView mBlocker;
|
||||
private View mRootView;
|
||||
|
||||
/*Private Variables*/
|
||||
|
||||
|
@ -55,24 +58,30 @@ public class tabController extends AppCompatActivity
|
|||
private tabViewController mtabViewController;
|
||||
private RecyclerView mRecycleView;
|
||||
private tabAdapter mTabAdapter;
|
||||
private ColorDrawable mBackground;
|
||||
|
||||
/*Initializations*/
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState){
|
||||
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
@SuppressLint("InflateParams") View root = inflater.inflate(R.layout.tab_view, null);
|
||||
mRootView = root;
|
||||
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.tab_view);
|
||||
return root;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
|
||||
activityContextManager.getInstance().setTabController(this);
|
||||
}
|
||||
|
||||
public void onInit(){
|
||||
initializeActivity();
|
||||
initializeViews();
|
||||
initializeLocalEventHandlers();
|
||||
initializeList();
|
||||
initSwipe();
|
||||
initializeLocalEventHandlers();
|
||||
}
|
||||
|
||||
public void initializeActivity(){
|
||||
|
@ -84,16 +93,17 @@ public class tabController extends AppCompatActivity
|
|||
}
|
||||
|
||||
public void initializeViews(){
|
||||
mRecycleView = findViewById(R.id.pRecycleView);
|
||||
mTabs = findViewById(R.id.pTabs);
|
||||
mRemoveSelection = findViewById(R.id.pRemoveSelection);
|
||||
mMenuButton = findViewById(R.id.pMenuButton);
|
||||
mClearSelection = findViewById(R.id.pClearSelection);
|
||||
mPopupUndo = findViewById(R.id.pPopupUndo);
|
||||
mSelectionCount = findViewById(R.id.pSelectionCount);
|
||||
mBlocker = findViewById(R.id.pBlocker);
|
||||
mBackground = new ColorDrawable();
|
||||
mRecycleView = mRootView.findViewById(R.id.pRecycleView);
|
||||
mTabs = mRootView.findViewById(R.id.pTabs);
|
||||
mRemoveSelection = mRootView.findViewById(R.id.pRemoveSelection);
|
||||
mMenuButton = mRootView.findViewById(R.id.pMenuButton);
|
||||
mClearSelection = mRootView.findViewById(R.id.pClearSelection);
|
||||
mPopupUndo = mRootView.findViewById(R.id.pPopupUndo);
|
||||
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")
|
||||
|
@ -106,7 +116,7 @@ public class tabController extends AppCompatActivity
|
|||
});
|
||||
}
|
||||
public void initializeList(){
|
||||
LinearLayoutManager layoutManager = new LinearLayoutManager(tabController.this);
|
||||
LinearLayoutManager layoutManager = new LinearLayoutManager(this.getContext());
|
||||
tabAdapter adapter = new tabAdapter(mListModel.getList(),new adapterCallback());
|
||||
mTabAdapter = adapter;
|
||||
layoutManager.setReverseLayout(true);
|
||||
|
@ -120,7 +130,7 @@ public class tabController extends AppCompatActivity
|
|||
mRecycleView.setItemViewCacheSize(100);
|
||||
mRecycleView.setDrawingCacheEnabled(true);
|
||||
mRecycleView.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_HIGH);
|
||||
mRecycleView.setLayoutManager(new LinearLayoutManager(tabController.this));
|
||||
mRecycleView.setLayoutManager(new LinearLayoutManager(this.getContext()));
|
||||
initTabCount();
|
||||
}
|
||||
|
||||
|
@ -146,9 +156,11 @@ public class tabController extends AppCompatActivity
|
|||
|
||||
@Override
|
||||
public void onChildDraw(@NonNull Canvas c, @NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder, float dX, float dY, int actionState, boolean isCurrentlyActive) {
|
||||
if (actionState == ItemTouchHelper.ACTION_STATE_SWIPE) {
|
||||
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.attachToRecyclerView(mRecycleView);
|
||||
|
@ -185,13 +197,13 @@ public class tabController extends AppCompatActivity
|
|||
|
||||
public void onClose(){
|
||||
onClearTabBackup();
|
||||
finish();
|
||||
// finish();
|
||||
}
|
||||
|
||||
public void onNewTabInvoked(){
|
||||
mHomeController.onNewTabBackground(true,false);
|
||||
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){
|
||||
|
@ -225,12 +237,14 @@ public class tabController extends AppCompatActivity
|
|||
}
|
||||
|
||||
public void onTabRowChanged(String pId){
|
||||
if(mListModel!=null){
|
||||
for(int mCounter=0; mCounter<mListModel.getList().size();mCounter++){
|
||||
if(mListModel.getList().get(mCounter).getSession().getSessionID().equals(pId)){
|
||||
mTabAdapter.notifyItemChanged(mCounter);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*UI Triggers*/
|
||||
|
||||
|
@ -264,7 +278,6 @@ public class tabController extends AppCompatActivity
|
|||
public void onBackPressedInvoked(View view) {
|
||||
mTabs.setPressed(true);
|
||||
onBackPressed();
|
||||
activityContextManager.getInstance().onRemoveStack(this);
|
||||
}
|
||||
|
||||
/*Tab Menu*/
|
||||
|
@ -281,28 +294,15 @@ public class tabController extends AppCompatActivity
|
|||
});
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
@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
|
||||
public void onResume()
|
||||
{
|
||||
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_RESUME);
|
||||
activityContextManager.getInstance().setCurrentActivity(this);
|
||||
status.sSettingIsAppPaused = false;
|
||||
activityContextManager.getInstance().onStack(this);
|
||||
super.onResume();
|
||||
}
|
||||
|
||||
|
@ -320,16 +320,17 @@ public class tabController extends AppCompatActivity
|
|||
super.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public void onBackPressed() {
|
||||
if(mTabAdapter!=null){
|
||||
boolean mStatus = (boolean) mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.M_SELECTION_MENU_SHOWING, null);
|
||||
if(mStatus){
|
||||
onClearTabBackup();
|
||||
onClearSelection(null);
|
||||
}else {
|
||||
super.onBackPressed();
|
||||
mHomeController.onDisableTabViewController();
|
||||
onClose();
|
||||
overridePendingTransition(R.anim.popup_anim_in, R.anim.popup_anim_out);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,30 +8,19 @@ import android.graphics.Color;
|
|||
import android.graphics.Paint;
|
||||
import android.graphics.RectF;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.ActionMenuView;
|
||||
import android.widget.Button;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.PopupWindow;
|
||||
import android.widget.TextView;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.app.AppCompatDelegate;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.ItemTouchHelper;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
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.example.myapplication.R;
|
||||
import java.util.List;
|
||||
|
@ -40,7 +29,7 @@ import static android.content.Context.LAYOUT_INFLATER_SERVICE;
|
|||
class tabViewController
|
||||
{
|
||||
/*Private Views*/
|
||||
private AppCompatActivity mContext;
|
||||
private Fragment mContext;
|
||||
private PopupWindow mTabOptionMenu = null;
|
||||
private Button mTabs;
|
||||
private ImageView mRemoveSelection;
|
||||
|
@ -49,6 +38,7 @@ class tabViewController
|
|||
private View mToastLayoutRoot;
|
||||
private TextView mSelectionCount;
|
||||
private ImageView mBlocker;
|
||||
private RecyclerView mRecycleView;
|
||||
|
||||
/*Private Local Variables*/
|
||||
private Handler mDelayHandler = new Handler();
|
||||
|
@ -56,7 +46,7 @@ class tabViewController
|
|||
|
||||
/*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.mTabs = pTabs;
|
||||
|
@ -66,6 +56,7 @@ class tabViewController
|
|||
this.mToastLayoutRoot = pToastLayoutRoot;
|
||||
this.mSelectionCount = pSelectionCount;
|
||||
this.mBlocker = pBlocker;
|
||||
this.mRecycleView = pRecycleView;
|
||||
|
||||
initPostUI();
|
||||
onHoldInteraction();
|
||||
|
@ -74,10 +65,7 @@ class tabViewController
|
|||
@SuppressLint("ClickableViewAccessibility")
|
||||
public void onHoldInteraction(){
|
||||
final Handler handler = new Handler();
|
||||
handler.postDelayed(() ->
|
||||
{
|
||||
mBlocker.setVisibility(View.GONE);
|
||||
}, 350);
|
||||
handler.postDelayed(() -> mBlocker.setVisibility(View.GONE), 350);
|
||||
}
|
||||
|
||||
private void initTabCount(int pCount){
|
||||
|
@ -85,20 +73,8 @@ class tabViewController
|
|||
}
|
||||
|
||||
private void initPostUI(){
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
Window window = mContext.getWindow();
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
|
||||
|
||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) {
|
||||
window.setStatusBarColor(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));
|
||||
}
|
||||
}
|
||||
mRecycleView.setAlpha(1);
|
||||
mContext.getView().setBackgroundColor(Color.WHITE);
|
||||
}
|
||||
|
||||
public void onOpenTabMenu(View view) {
|
||||
|
@ -162,9 +138,7 @@ class tabViewController
|
|||
|
||||
initTabCount(pTabCount);
|
||||
mDelayHandler.removeCallbacksAndMessages(null);
|
||||
mDelayHandler.postDelayed(() -> mToastLayoutRoot.animate().alpha(0).withEndAction(() -> {
|
||||
mToastLayoutRoot.setVisibility(View.GONE);
|
||||
}), 3000);
|
||||
mDelayHandler.postDelayed(() -> mToastLayoutRoot.animate().alpha(0).withEndAction(() -> mToastLayoutRoot.setVisibility(View.GONE)), 3000);
|
||||
}
|
||||
|
||||
private void onHideUndoDialog() {
|
||||
|
@ -185,16 +159,12 @@ class tabViewController
|
|||
float width = height / 3;
|
||||
|
||||
if(pDX > 0){
|
||||
mPainter.setColor(ContextCompat.getColor(mContext, R.color.c_list_item_current));
|
||||
RectF background = new RectF((float) itemView.getLeft(), (float) itemView.getTop(), pDX,(float) itemView.getBottom());
|
||||
pCanvas.drawRect(background, mPainter);
|
||||
pCanvas.drawARGB(0, 241, 243, 244);
|
||||
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);
|
||||
pCanvas.drawBitmap(icon,null,icon_dest, mPainter);
|
||||
} else {
|
||||
mPainter.setColor(ContextCompat.getColor(mContext, R.color.c_list_item_current));
|
||||
RectF background = new RectF((float) itemView.getRight() + pDX, (float) itemView.getTop(),(float) itemView.getRight(), (float) itemView.getBottom());
|
||||
pCanvas.drawRect(background, mPainter);
|
||||
pCanvas.drawARGB(0, 241, 243, 244);
|
||||
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);
|
||||
pCanvas.drawBitmap(icon,null,icon_dest, mPainter);
|
||||
|
|
|
@ -6,7 +6,7 @@ public class enums
|
|||
public enum etype{
|
||||
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,
|
||||
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,
|
||||
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) {
|
||||
throwable.printStackTrace();
|
||||
}
|
||||
activityContextManager.getInstance().getHomeController().onOpenTabReady();
|
||||
|
||||
}
|
||||
}.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){
|
||||
|
|
|
@ -11,6 +11,8 @@ import android.os.Environment;
|
|||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import org.mozilla.gecko.util.HardwareUtils;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
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);
|
||||
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)){
|
||||
dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_CLEAR_TAB, null);
|
||||
mHomeController.initTab(true);
|
||||
activityContextManager.getInstance().getTabController().finish();
|
||||
mHomeController.onDisableTabViewController();
|
||||
}
|
||||
else if(pEventType.equals(M_REQUEST_BRIDGES)){
|
||||
pluginController.getInstance().onMessageManagerInvoke(Arrays.asList(constants.CONST_BACKEND_GOOGLE_URL, this), M_BRIDGE_MAIL);
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
android:background="@color/c_background_keyboard"
|
||||
tools:context="com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController">
|
||||
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:id="@+id/pCoordinatorLayout"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -41,7 +40,7 @@
|
|||
<LinearLayout
|
||||
android:id="@+id/pTopbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/c_background"
|
||||
android:elevation="4dp"
|
||||
android:gravity="start"
|
||||
|
@ -89,13 +88,11 @@
|
|||
android:layout_marginBottom="8dp"
|
||||
android:layout_weight="1"
|
||||
android:animateLayoutChanges="true"
|
||||
android:textIsSelectable="false"
|
||||
android:requiresFadingEdge="horizontal"
|
||||
android:fadingEdgeLength="20dp"
|
||||
android:background="@xml/gx_generic_input"
|
||||
android:completionHintView="@layout/hint_view"
|
||||
android:dropDownAnchor="@id/pSearchEngineBar"
|
||||
android:ems="10"
|
||||
android:fadingEdgeLength="20dp"
|
||||
android:focusableInTouchMode="true"
|
||||
android:hint="@string/GENERAL_SEARCH_HINT"
|
||||
android:importantForAutofill="no"
|
||||
|
@ -105,12 +102,14 @@
|
|||
android:paddingEnd="15dp"
|
||||
android:popupElevation="0dp"
|
||||
android:privateImeOptions="nm"
|
||||
android:requiresFadingEdge="horizontal"
|
||||
android:selectAllOnFocus="true"
|
||||
android:text="@string/GENERAL_HOME_URL"
|
||||
android:textColor="@color/c_text_v1"
|
||||
android:textColorHighlight="@color/text_color_highlight_v3"
|
||||
android:textColorHint="@color/c_text_v2"
|
||||
android:textCursorDrawable="@xml/gx_search_cursor_state"
|
||||
android:textIsSelectable="false"
|
||||
android:textSize="16sp"
|
||||
app:hintAnimationEnabled="false"
|
||||
tools:targetApi="o">
|
||||
|
@ -196,11 +195,10 @@
|
|||
android:layout_height="match_parent"
|
||||
android:layout_gravity="fill_vertical"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_marginBottom="-60dp"
|
||||
android:isScrollContainer="true"
|
||||
android:measureAllChildren="true"
|
||||
android:background="@color/clear_alpha"
|
||||
android:fillViewport="true"
|
||||
android:isScrollContainer="true"
|
||||
android:measureAllChildren="true"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
@ -252,9 +250,9 @@
|
|||
<FrameLayout
|
||||
android:id="@+id/pSplashLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:visibility="visible"
|
||||
android:layout_height="match_parent"
|
||||
android:animateLayoutChanges="true"
|
||||
android:layout_height="match_parent">
|
||||
android:visibility="visible">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/pSplashScreen"
|
||||
|
@ -307,9 +305,9 @@
|
|||
android:layout_width="90dp"
|
||||
android:layout_height="90dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:rotationY="@integer/angle_rtl_180"
|
||||
android:layout_marginTop="100dp"
|
||||
android:contentDescription="@string/GENERAL_TODO"
|
||||
android:rotationY="@integer/angle_rtl_180"
|
||||
android:translationZ="3dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/pImageDivider"
|
||||
|
@ -389,13 +387,13 @@
|
|||
android:layout_width="90dp"
|
||||
android:layout_height="90dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:rotationY="@integer/angle_rtl_180"
|
||||
android:layout_marginTop="10dp"
|
||||
android:contentDescription="@string/GENERAL_TODO"
|
||||
android:rotationY="@integer/angle_rtl_180"
|
||||
android:translationZ="3dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/pGenesisLogo"
|
||||
app:srcCompat="@drawable/sheild_logo_bordered"
|
||||
android:contentDescription="@string/GENERAL_TODO" />
|
||||
app:srcCompat="@drawable/sheild_logo_bordered" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/pInfo2"
|
||||
|
@ -472,8 +470,8 @@
|
|||
|
||||
android:id="@+id/pInfoLandscape"
|
||||
android:layout_width="match_parent"
|
||||
android:visibility="gone"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
@ -481,11 +479,11 @@
|
|||
<ImageView
|
||||
android:id="@+id/pGenesisLogoBottom"
|
||||
android:layout_width="90dp"
|
||||
android:rotationY="@integer/angle_rtl_180"
|
||||
android:layout_height="90dp"
|
||||
android:layout_marginStart="7dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:contentDescription="@string/GENERAL_TODO"
|
||||
android:rotationY="@integer/angle_rtl_180"
|
||||
android:translationZ="3dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
@ -605,8 +603,8 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:background="#0A1727"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="15dp"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingEnd="15dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:text="@string/HOME_COPYRIGHT"
|
||||
android:textColor="#4a6868"
|
||||
|
@ -689,8 +687,8 @@
|
|||
android:layout_height="65dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginBottom="13dp"
|
||||
android:clickable="false"
|
||||
android:background="@color/clear_alpha"
|
||||
android:clickable="false"
|
||||
android:contentDescription="@string/GENERAL_TODO"
|
||||
android:focusable="false"
|
||||
android:translationZ="3dp"
|
||||
|
@ -762,4 +760,17 @@
|
|||
android:layout_width="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>
|
|
@ -49,7 +49,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
app:cardCornerRadius="11dp"
|
||||
app:cardCornerRadius="6dp"
|
||||
app:cardElevation="0dp"
|
||||
app:contentPadding="0dp">
|
||||
<com.darkweb.genesissearchengine.helperManager.TopCropImageView
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginTop="-3dp"
|
||||
android:layout_marginTop="-3.5dp"
|
||||
android:layout_marginBottom="0dp"
|
||||
android:background="@xml/gx_generic_tab_button"
|
||||
android:contentDescription="@string/GENERAL_TODO"
|
||||
|
@ -88,7 +88,7 @@
|
|||
android:id="@+id/pMenuButton"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="-6dp"
|
||||
android:layout_marginTop="-8dp"
|
||||
android:layout_marginEnd="0dp"
|
||||
android:background="@xml/gx_ripple_gray"
|
||||
android:contentDescription="@string/GENERAL_TODO"
|
||||
|
|
|
@ -5,10 +5,11 @@ buildscript {
|
|||
google()
|
||||
jcenter()
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
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"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,10 +2,13 @@ package org.torproject.android.service;
|
|||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.core.app.NotificationCompat;
|
||||
|
||||
import net.freehaven.tor.control.EventHandler;
|
||||
|
||||
import org.torproject.android.service.util.ExternalIPFetcher;
|
||||
import org.torproject.android.service.util.Prefs;
|
||||
import org.torproject.android.service.wrapper.orbotLocalConstants;
|
||||
|
||||
import java.text.NumberFormat;
|
||||
import java.util.HashMap;
|
||||
|
@ -91,8 +94,13 @@ public class TorEventHandler implements EventHandler, TorServiceConstants {
|
|||
|
||||
int iconId = R.drawable.ic_stat_tor_logo;
|
||||
|
||||
if (read > 0 || written > 0)
|
||||
if (read > 0 || written > 0){
|
||||
if(orbotLocalConstants.mIsTorInitialized){
|
||||
iconId = R.drawable.ic_stat_tor_logo;
|
||||
}else {
|
||||
iconId = R.drawable.ic_stat_starting_tor_logo;
|
||||
}
|
||||
}
|
||||
|
||||
String sb = formatCount(read) +
|
||||
" \u2193" +
|
||||
|
@ -134,8 +142,9 @@ public class TorEventHandler implements EventHandler, TorServiceConstants {
|
|||
public void circuitStatus(String status, String circID, String path) {
|
||||
|
||||
/* 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);
|
||||
}
|
||||
|
||||
if (Prefs.useDebugLogging()) {
|
||||
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 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
|
||||
snowflake 192.0.2.3:1
|
Loading…
Reference in New Issue