Bug Fixes

Bug Fixes
master
msmannan00 2021-06-29 11:42:33 +05:00
parent f86075c43b
commit e77e1bfbf3
53 changed files with 2531 additions and 2495 deletions

View File

@ -83,7 +83,6 @@ dependencies {
implementation 'androidx.recyclerview:recyclerview:1.2.0' implementation 'androidx.recyclerview:recyclerview:1.2.0'
implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0' implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
implementation 'com.google.firebase:firebase-messaging:21.1.0'
implementation 'com.android.support:support-core-utils:28.0.0' implementation 'com.android.support:support-core-utils:28.0.0'
/* Default Libraries */ /* Default Libraries */
@ -101,7 +100,7 @@ dependencies {
implementation "org.mozilla.components:browser-engine-gecko:73.0.8" implementation "org.mozilla.components:browser-engine-gecko:73.0.8"
implementation "org.mozilla.components:browser-icons:73.0.9" implementation "org.mozilla.components:browser-icons:73.0.9"
implementation "org.mozilla.geckoview:geckoview:89.0.20210524222230" implementation "org.mozilla.geckoview:geckoview:89.0.20210622155641"
implementation "org.mozilla.components:concept-fetch:73.0.9" implementation "org.mozilla.components:concept-fetch:73.0.9"
implementation "org.mozilla.components:concept-base:73.0.9" implementation "org.mozilla.components:concept-base:73.0.9"
implementation "org.mozilla.components:support-utils:73.0.9" implementation "org.mozilla.components:support-utils:73.0.9"
@ -112,7 +111,7 @@ dependencies {
/* Ads Manager */ /* Ads Manager */
implementation 'com.google.android.gms:play-services-ads:20.0.0' implementation 'com.google.android.gms:play-services-ads:20.1.0'
/* Orbot Service */ /* Orbot Service */

View File

@ -17,6 +17,7 @@
android:allowBackup="true" android:allowBackup="true"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize" android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:extractNativeLibs="true" android:extractNativeLibs="true"
android:largeHeap = "false"
android:fullBackupContent="false" android:fullBackupContent="false"
android:icon="@mipmap/ic_launcher_genesis" android:icon="@mipmap/ic_launcher_genesis"
android:label="@string/app_name" android:label="@string/app_name"
@ -49,6 +50,7 @@
android:name="com.darkweb.genesissearchengine.appManager.settingManager.settingHomeManager.settingHomeController" android:name="com.darkweb.genesissearchengine.appManager.settingManager.settingHomeManager.settingHomeController"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:label="@string/SETTING_HEADER" android:label="@string/SETTING_HEADER"
android:exported="true"
android:launchMode="singleTop" android:launchMode="singleTop"
android:windowSoftInputMode="adjustPan" /> android:windowSoftInputMode="adjustPan" />
<activity <activity
@ -220,6 +222,15 @@
<action android:name="Download_Cancelled" /> <action android:name="Download_Cancelled" />
</intent-filter> </intent-filter>
</receiver> </receiver>
<receiver
android:name="org.torproject.android.service.StartTorReceiver"
android:exported="true"
tools:ignore="ExportedReceiver">
<intent-filter>
<action android:name="org.torproject.android.intent.action.START" />
</intent-filter>
</receiver>
<!-- <!--
Permissions File Provider Live Permissions File Provider Live
<provider <provider

View File

@ -19,12 +19,14 @@ import com.darkweb.genesissearchengine.dataManager.models.bookmarkRowModel;
import com.darkweb.genesissearchengine.eventObserver; import com.darkweb.genesissearchengine.eventObserver;
import com.darkweb.genesissearchengine.helperManager.helperMethod; import com.darkweb.genesissearchengine.helperManager.helperMethod;
import com.example.myapplication.R; import com.example.myapplication.R;
import java.io.ByteArrayOutputStream;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import systems.intelligo.slight.ImageLoader;
import static android.content.Context.LAYOUT_INFLATER_SERVICE; import static android.content.Context.LAYOUT_INFLATER_SERVICE;
public class bookmarkAdapter extends RecyclerView.Adapter<bookmarkAdapter.listViewHolder> public class bookmarkAdapter extends RecyclerView.Adapter<bookmarkAdapter.listViewHolder>
@ -40,7 +42,6 @@ public class bookmarkAdapter extends RecyclerView.Adapter<bookmarkAdapter.listVi
private ArrayList<String> mLongSelectedIndex = new ArrayList<>(); private ArrayList<String> mLongSelectedIndex = new ArrayList<>();
private ArrayList<Integer> mLongSelectedID = new ArrayList<>(); private ArrayList<Integer> mLongSelectedID = new ArrayList<>();
private ImageLoader imageLoader;
private AppCompatActivity mContext; private AppCompatActivity mContext;
private bookmarkAdapterView mHistroyAdapterView; private bookmarkAdapterView mHistroyAdapterView;
private Context mListHolderContext; private Context mListHolderContext;
@ -60,7 +61,6 @@ public class bookmarkAdapter extends RecyclerView.Adapter<bookmarkAdapter.listVi
this.mPassedList = pModelList; this.mPassedList = pModelList;
this.mContext = pMainContext; this.mContext = pMainContext;
this.mHistroyAdapterView = new bookmarkAdapterView(mContext); this.mHistroyAdapterView = new bookmarkAdapterView(mContext);
this.imageLoader = new ImageLoader(mContext);
initializeModelWithDate(false); initializeModelWithDate(false);
} }
@ -383,7 +383,7 @@ public class bookmarkAdapter extends RecyclerView.Adapter<bookmarkAdapter.listVi
TextView mDate; TextView mDate;
TextView mWebLogo; TextView mWebLogo;
ImageButton mRowMenu; ImageButton mRowMenu;
ImageView mLogoImage; ImageView mSelectionImage;
ImageView mFaviconLogo; ImageView mFaviconLogo;
LinearLayout mRowContainer; LinearLayout mRowContainer;
LinearLayout mDateContainer; LinearLayout mDateContainer;
@ -402,7 +402,7 @@ public class bookmarkAdapter extends RecyclerView.Adapter<bookmarkAdapter.listVi
mRowContainer = itemView.findViewById(R.id.pRowContainer); mRowContainer = itemView.findViewById(R.id.pRowContainer);
mRowMenu = itemView.findViewById(R.id.pRowMenu); mRowMenu = itemView.findViewById(R.id.pRowMenu);
mDate = itemView.findViewById(R.id.pDate); mDate = itemView.findViewById(R.id.pDate);
mLogoImage = itemView.findViewById(R.id.pLogoImage); mSelectionImage = itemView.findViewById(R.id.pLogoImage);
mWebLogo = itemView.findViewById(R.id.pWebLogo); mWebLogo = itemView.findViewById(R.id.pWebLogo);
mLoadingContainer = itemView.findViewById(R.id.pLoadingContainer); mLoadingContainer = itemView.findViewById(R.id.pLoadingContainer);
mFaviconLogo = itemView.findViewById(R.id.pFaviconLogo); mFaviconLogo = itemView.findViewById(R.id.pFaviconLogo);
@ -452,36 +452,11 @@ public class bookmarkAdapter extends RecyclerView.Adapter<bookmarkAdapter.listVi
if(model.getDescription().contains("genesishiddentechnologies.com") || model.getDescription().contains("genesis.onion")){ if(model.getDescription().contains("genesishiddentechnologies.com") || model.getDescription().contains("genesis.onion")){
mFaviconLogo.setImageDrawable(itemView.getResources().getDrawable(R.drawable.genesis)); mFaviconLogo.setImageDrawable(itemView.getResources().getDrawable(R.drawable.genesis));
}else{ }else{
new Thread(){ mEvent.invokeObserver(Arrays.asList(mFaviconLogo, "http://" + helperMethod.getDomainName(model.getDescription())), enums.etype.fetch_favicon);
public void run(){
try {
mHindTypeIconTemp.setImageDrawable(null);
mEvent.invokeObserver(Arrays.asList(mHindTypeIconTemp, "http://" + helperMethod.getDomainName(model.getDescription())), enums.etype.fetch_favicon);
while (true){
int mCounter=0;
if(mHindTypeIconTemp.isAttachedToWindow() || mHindTypeIconTemp.getDrawable()==null){
sleep(50);
mCounter+=1;
}else {
break;
}
if(mCounter>6){
break;
}
}
mContext.runOnUiThread(() -> {
Bitmap mBitmap = helperMethod.drawableToBitmap(mHindTypeIconTemp.getDrawable());
mFaviconLogo.setImageBitmap(mBitmap);
});
} catch (Exception e) {
e.printStackTrace();
}
}
}.start();
} }
mRowMenu.setOnClickListener(this::onClick); mRowMenu.setOnClickListener(this::onClick);
setItemViewOnClickListener(mRowContainer, mRowMenu, mDescription.getText().toString(), p_position, header, mRowMenu, mLogoImage, model.getID(), model.getDate()); setItemViewOnClickListener(mRowContainer, mRowMenu, mDescription.getText().toString(), p_position, header, mRowMenu, mSelectionImage, model.getID(), model.getDate());
} }
if(mLongSelectedID.size()>0){ if(mLongSelectedID.size()>0){
@ -493,9 +468,9 @@ public class bookmarkAdapter extends RecyclerView.Adapter<bookmarkAdapter.listVi
} }
if(mLongSelectedIndex.contains("https://" + model.getDescription()) && mLongSelectedID.contains(model.getID())){ if(mLongSelectedIndex.contains("https://" + model.getDescription()) && mLongSelectedID.contains(model.getID())){
mPopupWindow = (PopupWindow) mHistroyAdapterView.onTrigger(bookmarkEnums.eBookmarkViewAdapterCommands.M_SELECT_VIEW, Arrays.asList(mRowContainer, mRowMenu, mLogoImage, true, false)); mPopupWindow = (PopupWindow) mHistroyAdapterView.onTrigger(bookmarkEnums.eBookmarkViewAdapterCommands.M_SELECT_VIEW, Arrays.asList(mRowContainer, mRowMenu, mSelectionImage, true, false));
}else if(mLogoImage.getAlpha()>0){ }else if(mSelectionImage.getAlpha()>0){
mPopupWindow = (PopupWindow) mHistroyAdapterView.onTrigger(bookmarkEnums.eBookmarkViewAdapterCommands.M_CLEAR_HIGHLIGHT, Arrays.asList(mRowContainer, mRowMenu, mLogoImage, true, false)); mPopupWindow = (PopupWindow) mHistroyAdapterView.onTrigger(bookmarkEnums.eBookmarkViewAdapterCommands.M_CLEAR_HIGHLIGHT, Arrays.asList(mRowContainer, mRowMenu, mSelectionImage, true, false));
} }
mBookmarkEdit.setOnClickListener(this::onClick); mBookmarkEdit.setOnClickListener(this::onClick);

View File

@ -3,6 +3,8 @@ package com.darkweb.genesissearchengine.appManager.externalCommandManager;
import android.content.Intent; import android.content.Intent;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.appManager.activityContextManager; import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController; import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
@ -18,7 +20,9 @@ public class externalURLNavigationContoller extends AppCompatActivity {
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
Uri data = externalURLNavigationContoller.this.getIntent().getData(); Uri data = externalURLNavigationContoller.this.getIntent().getData();
if(data == null || status.sSettingIsAppStarted){ boolean mConnect = false;
if(activityContextManager.getInstance().getHomeController()!=null && (data == null || status.sSettingIsAppStarted)){
/* Close Activity */ /* Close Activity */
@ -39,6 +43,7 @@ public class externalURLNavigationContoller extends AppCompatActivity {
bringToForegroundIntent.setFlags(Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED | Intent.FLAG_ACTIVITY_NEW_TASK); bringToForegroundIntent.setFlags(Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(bringToForegroundIntent); startActivity(bringToForegroundIntent);
overridePendingTransition(R.anim.fade_in_instant, R.anim.fade_out_instant); overridePendingTransition(R.anim.fade_in_instant, R.anim.fade_out_instant);
mConnect = true;
} }
else if(status.sSettingIsAppRunning){ else if(status.sSettingIsAppRunning){
@ -66,6 +71,7 @@ public class externalURLNavigationContoller extends AppCompatActivity {
Intent launchIntent = getPackageManager().getLaunchIntentForPackage(CONST_PACKAGE_NAME); Intent launchIntent = getPackageManager().getLaunchIntentForPackage(CONST_PACKAGE_NAME);
startActivity(launchIntent); startActivity(launchIntent);
overridePendingTransition(R.anim.fade_in_instant, R.anim.fade_out_instant); overridePendingTransition(R.anim.fade_in_instant, R.anim.fade_out_instant);
mConnect = true;
/* Close Activity */ /* Close Activity */
@ -74,5 +80,8 @@ public class externalURLNavigationContoller extends AppCompatActivity {
return null; return null;
}); });
} }
if(mConnect){
new Handler().postDelayed(() -> activityContextManager.getInstance().getHomeController().onStartApplication(null), 3000);
}
} }
} }

View File

@ -529,48 +529,7 @@ public class historyAdapter extends RecyclerView.Adapter<historyAdapter.listView
mFaviconLogo.setImageDrawable(mWebIcon.get(model.getDescription())); mFaviconLogo.setImageDrawable(mWebIcon.get(model.getDescription()));
} }
else{ else{
new Thread(){ mEvent.invokeObserver(Arrays.asList(mFaviconLogo, "https://" + helperMethod.getDomainName(model.getDescription())), enums.etype.fetch_favicon);
public void run(){
try {
mHindTypeIconTemp.setImageDrawable(null);
mEvent.invokeObserver(Arrays.asList(mHindTypeIconTemp, "https://" + helperMethod.getDomainName(model.getDescription())), enums.etype.fetch_favicon);
while (true){
int mCounter=0;
if(mHindTypeIconTemp.isAttachedToWindow() || mHindTypeIconTemp.getDrawable()==null){
sleep(10);
mCounter+=1;
}else {
Log.i("BREAK","");
break;
}
if(mCounter>6){
break;
}
}
mContext.runOnUiThread(() -> {
mFaviconLogo.setColorFilter(null);
mFaviconLogo.clearColorFilter();
mFaviconLogo.setImageTintList(null);
mFaviconLogo.setClipToOutline(true);
mWebIcon.put(model.getDescription(),mHindTypeIconTemp.getDrawable());
if(mHindTypeIconTemp.getDrawable() != null){
mFaviconLogo.setImageDrawable(mHindTypeIconTemp.getDrawable());
}else {
Resources res = itemView.getContext().getResources();
try {
mFaviconLogo.setImageDrawable(Drawable.createFromXml(res, res.getXml(R.xml.ic_baseline_browser)));
} catch (Exception ignored) {
}
}
});
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}.start();
} }
setItemViewOnClickListener(mRowContainer, mRowMenu, mDescription.getText().toString(), p_position, header, mRowMenu, mLogoImage, model.getID(), model.getDate()); setItemViewOnClickListener(mRowContainer, mRowMenu, mDescription.getText().toString(), p_position, header, mRowMenu, mLogoImage, model.getID(), model.getDate());

View File

@ -420,12 +420,10 @@ geckoSession extends GeckoSession implements GeckoSession.MediaDelegate,GeckoSes
@UiThread @UiThread
public void onSessionStateChange(@NonNull GeckoSession session, @NonNull SessionState sessionState) { public void onSessionStateChange(@NonNull GeckoSession session, @NonNull SessionState sessionState) {
mSessionState = sessionState; try{
// if(!status.sRestoreTabs){ event.invokeObserver(Arrays.asList(mCurrentURL,mSessionID,mCurrentTitle, m_current_url_id, mTheme, sessionState.toString()), enums.etype.M_UPDATE_SESSION_STATE);
// mSessionState = null; mSessionState = sessionState;
// } }catch (Exception ignored){}
// if(mSessionState!=null)
event.invokeObserver(Arrays.asList(mCurrentURL,mSessionID,mCurrentTitle, m_current_url_id, mTheme, mSessionState.toString()), enums.etype.M_UPDATE_SESSION_STATE);
} }
public boolean onRestoreState(){ public boolean onRestoreState(){
@ -764,8 +762,8 @@ geckoSession extends GeckoSession implements GeckoSession.MediaDelegate,GeckoSes
if(var4.title!=null){ if(var4.title!=null){
title = var4.title; title = var4.title;
} }
if(var4.type!=0){ if(var4.type!=0 && var4.srcUri!=null){
if(var4.linkUri!=null){ if(1!=1 && var4.linkUri!=null){
event.invokeObserver(Arrays.asList(var4.linkUri,mSessionID,var4.srcUri,title, mTheme, mContext.get()), M_LONG_PRESS_WITH_LINK); event.invokeObserver(Arrays.asList(var4.linkUri,mSessionID,var4.srcUri,title, mTheme, mContext.get()), M_LONG_PRESS_WITH_LINK);
} }
else { else {
@ -777,7 +775,7 @@ geckoSession extends GeckoSession implements GeckoSession.MediaDelegate,GeckoSes
} }
} }
} }
else{ else if(var4.linkUri!=null){
event.invokeObserver(Arrays.asList(var4.linkUri,mSessionID,title, mTheme, mContext.get()), M_LONG_PRESS_URL); event.invokeObserver(Arrays.asList(var4.linkUri,mSessionID,title, mTheme, mContext.get()), M_LONG_PRESS_URL);
} }
} }

View File

@ -33,6 +33,8 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import static java.lang.Thread.sleep;
public class hintAdapter extends RecyclerView.Adapter<hintAdapter.listViewHolder> public class hintAdapter extends RecyclerView.Adapter<hintAdapter.listViewHolder>
{ {
/*Private Variables*/ /*Private Variables*/
@ -192,36 +194,25 @@ public class hintAdapter extends RecyclerView.Adapter<hintAdapter.listViewHolder
mPastWebIcon.put(getLayoutPosition(),mHintWebIcon.getDrawable()); mPastWebIcon.put(getLayoutPosition(),mHintWebIcon.getDrawable());
}else }else
{ {
new Thread(){ String mURLPast = mURLLink;
mPastIconFlicker.put(getLayoutPosition(),mURLPast);
public void run(){ mHindTypeIconTemp.setImageDrawable(null);
try { mEvent.invokeObserver(Arrays.asList(mHindTypeIconTemp, "https://" + helperMethod.getDomainName(model.getDescription())), enums.etype.fetch_favicon);
String mURLPast = mURLLink;
mPastIconFlicker.put(getLayoutPosition(),mURLPast);
mHindTypeIconTemp.setImageDrawable(null); mContext.runOnUiThread(() -> new Handler().postDelayed(() ->
mEvent.invokeObserver(Arrays.asList(mHindTypeIconTemp, "https://" + helperMethod.getDomainName(model.getDescription())), enums.etype.fetch_favicon); {
sleep(200); if(mHindTypeIconTemp.getDrawable() != null){
if(mURLPast.equals(mPastIconFlicker.get(getLayoutPosition()))){
mContext.runOnUiThread(() -> new Handler().postDelayed(() -> mHintWebIcon.setImageTintList(null);
{ mHintWebIcon.setImageDrawable(mHindTypeIconTemp.getDrawable());
if(mHindTypeIconTemp.getDrawable() != null){ mPastWebIcon.put(getLayoutPosition(),mHintWebIcon.getDrawable());
if(mURLPast.equals(mPastIconFlicker.get(getLayoutPosition()))){ }
mHintWebIcon.setImageTintList(null); if(getLayoutPosition() == 1){
mHintWebIcon.setImageDrawable(mHindTypeIconTemp.getDrawable()); Log.i("FUSSSS1111","FUSSSS4444");
mPastWebIcon.put(getLayoutPosition(),mHintWebIcon.getDrawable());
}
if(getLayoutPosition() == 1){
Log.i("FUSSSS1111","FUSSSS4444");
}
}
}, 200));
} catch (InterruptedException e) {
e.printStackTrace();
} }
} }
}.start(); }, 300));
} }
} }

View File

@ -633,7 +633,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba
//} //}
dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_UPDATE_PIXEL, Arrays.asList(mGeckoClient.getSession().getSessionID(), mRenderedBitmap, null, mGeckoView, false)); dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_UPDATE_PIXEL, Arrays.asList(mGeckoClient.getSession().getSessionID(), mRenderedBitmap, null, mGeckoView, false));
TouchView(mGeckoView); TouchView(mGeckoView);
TouchView(mNestedScroll); TouchView(mNestedScroll);
@ -747,6 +746,8 @@ public class homeController extends AppCompatActivity implements ComponentCallba
@SuppressLint("ClickableViewAccessibility") @SuppressLint("ClickableViewAccessibility")
private void initializeLocalEventHandlers() { private void initializeLocalEventHandlers() {
mSearchbar.setMovementMethod(null);
startService(new Intent(getBaseContext(), activityStateManager.class)); startService(new Intent(getBaseContext(), activityStateManager.class));
registerReceiver(downloadStatus,new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE)); registerReceiver(downloadStatus,new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
@ -1012,7 +1013,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} }
public void onLoadRecentTab(View view){ public void onLoadRecentTab(View view){
mHomeViewController.onHideLoadTabDialog();
tabRowModel model = (tabRowModel)dataController.getInstance().invokeTab(dataEnums.eTabCommands.GET_RECENT_TAB, null); tabRowModel model = (tabRowModel)dataController.getInstance().invokeTab(dataEnums.eTabCommands.GET_RECENT_TAB, null);
if(model!=null && !mGeckoClient.getSession().getSessionID().equals(model.getSession().getSessionID())){ if(model!=null && !mGeckoClient.getSession().getSessionID().equals(model.getSession().getSessionID())){
mHomeViewController.onUpdateSearchBar(model.getSession().getCurrentURL(),false,false,true); mHomeViewController.onUpdateSearchBar(model.getSession().getCurrentURL(),false,false,true);
@ -1069,26 +1069,29 @@ public class homeController extends AppCompatActivity implements ComponentCallba
if(!url.startsWith("data") && !url.startsWith("blob") && (mExtention == null || mExtention.equals("text/html") || mExtention.equals("application/vnd.ms-htmlhelp") || mExtention.equals("application/vnd.sun.xml.writer") || mExtention.equals("application/vnd.sun.xml.writer.global") || mExtention.equals("application/vnd.sun.xml.writer.template") || mExtention.equals("application/xhtml+xml"))){ if(!url.startsWith("data") && !url.startsWith("blob") && (mExtention == null || mExtention.equals("text/html") || mExtention.equals("application/vnd.ms-htmlhelp") || mExtention.equals("application/vnd.sun.xml.writer") || mExtention.equals("application/vnd.sun.xml.writer.global") || mExtention.equals("application/vnd.sun.xml.writer.template") || mExtention.equals("application/xhtml+xml"))){
initTabCount(M_NEW_LINK_IN_NEW_TAB, Collections.singletonList(url)); initTabCount(M_NEW_LINK_IN_NEW_TAB, Collections.singletonList(url));
}else { }else {
postNewLinkTabAnimation(url, true); //postNewLinkTabAnimation(url, true);
} }
} }
public void postNewLinkTabAnimationInBackground(String url){ public void postNewLinkTabAnimationInBackground(String url){
mAppBar.setTag(R.id.expandableBar,false); mAppBar.setTag(R.id.expandableBar,false);
geckoSession mSession = mGeckoClient.getSession();
dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_UPDATE_PIXEL, Arrays.asList(mGeckoClient.getSession().getSessionID(), mRenderedBitmap, null, mGeckoView,false)); dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_UPDATE_PIXEL, Arrays.asList(mGeckoClient.getSession().getSessionID(), mRenderedBitmap, null, mGeckoView,false));
geckoSession mSession = mGeckoClient.getSession();
mGeckoClient.initialize(mGeckoView, new geckoViewCallback(), this,true); mGeckoClient.initialize(mGeckoView, new geckoViewCallback(), this,true);
geckoSession mNewSession = mGeckoClient.getSession();
mGeckoClient.initURL(url); mGeckoClient.initURL(url);
mGeckoClient.loadURL(url, mGeckoView, homeController.this);
mGeckoClient.getSession().setURL(url); mGeckoClient.getSession().setURL(url);
onSaveCurrentTab(mGeckoClient.getSession(),false); onSaveCurrentTab(mGeckoClient.getSession(),false);
onLoadTab(mSession,false,false, false); onLoadTab(mSession,false,false, false);
mHomeViewController.progressBarReset(); mHomeViewController.progressBarReset();
mAppBar.setTag(R.id.expandableBar,true);
initTabCountForced(); initTabCountForced();
mHomeViewController.onUpdateSearchBar(mSession.getCurrentURL(),false,true, false); mHomeViewController.onUpdateSearchBar(mSession.getCurrentURL(),false,true, false);
mNewSession.loadUri(url);
mAppBar.setTag(R.id.expandableBar,true);
} }
public void onNewTab(boolean isKeyboardOpenedTemp, boolean isKeyboardOpened){ public void onNewTab(boolean isKeyboardOpenedTemp, boolean isKeyboardOpened){
@ -1401,6 +1404,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
if(status.sSettingIsAppStarted){ if(status.sSettingIsAppStarted){
mHomeViewController.onClearSelections(isKeyboardOpened); mHomeViewController.onClearSelections(isKeyboardOpened);
pluginController.getInstance().onMessageManagerInvoke(null, M_RESET);
} }
if(mAppBar!=null){ if(mAppBar!=null){
@ -1964,8 +1968,8 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} }
else if(e_type.equals(enums.etype.M_NEW_LINK_IN_NEW_TAB)) else if(e_type.equals(enums.etype.M_NEW_LINK_IN_NEW_TAB))
{ {
pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(homeController.this), M_LOAD_NEW_TAB);
postNewLinkTabAnimationInBackground(dataToStr(data.get(0))); postNewLinkTabAnimationInBackground(dataToStr(data.get(0)));
mHomeViewController.onShowLoadTabDialog();
} }
else if(e_type.equals(enums.etype.M_RESET_SUGGESTION)) else if(e_type.equals(enums.etype.M_RESET_SUGGESTION))
{ {
@ -2034,7 +2038,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mHomeViewController.closeMenu(); mHomeViewController.closeMenu();
mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(),false,true, true); mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(),false,true, true);
mSearchbar.clearFocus(); mSearchbar.clearFocus();
pluginController.getInstance().onMessageManagerInvoke(Arrays.asList(strings.GENERIC_EMPTY_STR, homeController.this), M_WELCOME); // pluginController.getInstance().onMessageManagerInvoke(Arrays.asList(strings.GENERIC_EMPTY_STR, homeController.this), M_WELCOME);
status.sUIInteracted = true; status.sUIInteracted = true;
} }
} }

View File

@ -274,33 +274,7 @@ class homeViewController
} }
} }
public void onShowLoadTabDialog() {
mPopupLoadNewTab.findViewById(R.id.pBlockerUndo).setVisibility(View.GONE);
mPopupLoadNewTab.animate().cancel();
mPopupLoadNewTab.setAlpha(0);
mPopupLoadNewTab.setVisibility(View.VISIBLE);
mPopupLoadNewTab.animate().setStartDelay(400).setDuration(250).alpha(1);
if(mTabDialogHandler!=null){
mTabDialogHandler.removeCallbacksAndMessages(null);
}
mTabDialogHandler = new Handler();
mTabDialogRunnable = this::onHideLoadTabDialog;
mTabDialogHandler.postDelayed(mTabDialogRunnable, 3500);
}
public void onHideLoadTabDialog() {
mPopupLoadNewTab.findViewById(R.id.pBlockerUndo).setVisibility(View.VISIBLE);
mPopupLoadNewTab.animate().cancel();
mPopupLoadNewTab.animate().setDuration(250).alpha(0).withEndAction(() -> {
mPopupLoadNewTab.setVisibility(View.GONE);
});
}
public void onShowTabContainer(){ public void onShowTabContainer(){
onHideLoadTabDialog();
if(mTabFragment.getAlpha()==0 || mTabFragment.getAlpha()==1){ if(mTabFragment.getAlpha()==0 || mTabFragment.getAlpha()==1){
onUpdateStatusBarTheme(null, false); onUpdateStatusBarTheme(null, false);
@ -312,7 +286,6 @@ class homeViewController
} }
public void onHideTabContainer(){ public void onHideTabContainer(){
onHideLoadTabDialog();
if(mTabFragment.getAlpha()>0 || mTabFragment.getVisibility()!=View.GONE){ if(mTabFragment.getAlpha()>0 || mTabFragment.getVisibility()!=View.GONE){
mNewTab.setPressed(false); mNewTab.setPressed(false);
new Handler().postDelayed(() -> new Handler().postDelayed(() ->
@ -386,11 +359,11 @@ class homeViewController
mSearchbar.setMovementMethod(null); mSearchbar.setMovementMethod(null);
if(status.sSettingLanguageRegion.equals("Ur")){ if(status.sSettingLanguageRegion.equals("Ur")){
mSearchbar.setPadding(helperMethod.pxFromDp(17),0,mSearchbar.getPaddingRight(),0); mSearchbar.setPadding(helperMethod.pxFromDp(17),0,mSearchbar.getPaddingRight(),3);
ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) mSearchbar.getLayoutParams(); ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) mSearchbar.getLayoutParams();
params.leftMargin = helperMethod.pxFromDp(5); params.leftMargin = helperMethod.pxFromDp(5);
}else { }else {
mSearchbar.setPadding(mSearchbar.getPaddingLeft(),0,helperMethod.pxFromDp(5),0); mSearchbar.setPadding(mSearchbar.getPaddingLeft(),0,helperMethod.pxFromDp(5),3);
ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) mSearchbar.getLayoutParams(); ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) mSearchbar.getLayoutParams();
params.rightMargin = helperMethod.pxFromDp(5); params.rightMargin = helperMethod.pxFromDp(5);
} }
@ -432,11 +405,11 @@ class homeViewController
this.mMenu.setVisibility(View.GONE); this.mMenu.setVisibility(View.GONE);
if(status.sSettingLanguageRegion.equals("Ur")){ if(status.sSettingLanguageRegion.equals("Ur")){
mSearchbar.setPadding(helperMethod.pxFromDp(45),0,mSearchbar.getPaddingRight(),0); mSearchbar.setPadding(helperMethod.pxFromDp(45),0,mSearchbar.getPaddingRight(),3);
ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) mSearchbar.getLayoutParams(); ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) mSearchbar.getLayoutParams();
params.leftMargin = helperMethod.pxFromDp(17); params.leftMargin = helperMethod.pxFromDp(17);
}else { }else {
mSearchbar.setPadding(mSearchbar.getPaddingLeft(),0,helperMethod.pxFromDp(45),0); mSearchbar.setPadding(mSearchbar.getPaddingLeft(),0,helperMethod.pxFromDp(45),3);
ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) mSearchbar.getLayoutParams(); ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) mSearchbar.getLayoutParams();
params.rightMargin = helperMethod.pxFromDp(17); params.rightMargin = helperMethod.pxFromDp(17);
} }
@ -595,8 +568,8 @@ class homeViewController
initSplashLoading(); initSplashLoading();
}); });
mGatewaySplash.animate().setDuration(350).alpha(0.4f); mGatewaySplash.animate().setDuration(350).alpha(0.4f);
mPanicButtonLandscape.animate().setDuration(200).translationXBy(helperMethod.pxFromDp(50)); mPanicButtonLandscape.animate().setDuration(170).translationXBy(helperMethod.pxFromDp(55));
mPanicButton.animate().setDuration(200).translationXBy(helperMethod.pxFromDp(50)); mPanicButton.animate().setDuration(170).translationXBy(helperMethod.pxFromDp(55));
} }
private void initSplashScreen(){ private void initSplashScreen(){
@ -625,6 +598,8 @@ class homeViewController
new Thread(){ new Thread(){
public void run(){ public void run(){
AppCompatActivity temp_context = mContext; AppCompatActivity temp_context = mContext;
int mCounter = 0;
int mCounterInternet = 0;
while (!orbotLocalConstants.mIsTorInitialized || !orbotLocalConstants.mNetworkState){ while (!orbotLocalConstants.mIsTorInitialized || !orbotLocalConstants.mNetworkState){
try try
{ {
@ -639,10 +614,20 @@ class homeViewController
}else{ }else{
orbotLocalConstants.mTorLogsStatus = "No internet connection"; orbotLocalConstants.mTorLogsStatus = "No internet connection";
startPostTask(messages.MESSAGE_UPDATE_LOADING_TEXT); startPostTask(messages.MESSAGE_UPDATE_LOADING_TEXT);
if(mCounterInternet>10){
// break;
}else {
mCounterInternet += 1;
}
} }
} }
sleep(500); sleep(500);
if(mCounter>20){
break;
}else {
mCounter+=1;
}
if(mFastConnect){ if(mFastConnect){
continue; continue;
} }
@ -1303,9 +1288,7 @@ class homeViewController
mGeckoView.setPivotY(0); mGeckoView.setPivotY(0);
ObjectAnimator scaleDown = ObjectAnimator.ofPropertyValuesHolder(mGeckoView, ObjectAnimator scaleDown = ObjectAnimator.ofPropertyValuesHolder(mGeckoView,
PropertyValuesHolder.ofFloat("scaleX", 1, 0.8f), PropertyValuesHolder.ofFloat("translationX", 0, helperMethod.pxFromDp(-50)));
PropertyValuesHolder.ofFloat("scaleY", 1, 0.8f));
mNewTabBlocker.setVisibility(View.VISIBLE); mNewTabBlocker.setVisibility(View.VISIBLE);
ObjectAnimator alpha = ObjectAnimator.ofPropertyValuesHolder(mNewTabBlocker, ObjectAnimator alpha = ObjectAnimator.ofPropertyValuesHolder(mNewTabBlocker,
PropertyValuesHolder.ofFloat("alpha", 0, 1f)); PropertyValuesHolder.ofFloat("alpha", 0, 1f));
@ -1325,8 +1308,7 @@ class homeViewController
public void onAnimationEnd(Animator animation, boolean isReverse) { public void onAnimationEnd(Animator animation, boolean isReverse) {
mEvent.invokeObserver(data, e_type); mEvent.invokeObserver(data, e_type);
ObjectAnimator scaleDown = ObjectAnimator.ofPropertyValuesHolder(mGeckoView, ObjectAnimator scaleDown = ObjectAnimator.ofPropertyValuesHolder(mGeckoView,
PropertyValuesHolder.ofFloat("scaleX", 0.8f, 1f), PropertyValuesHolder.ofFloat("translationX", 0, 0));
PropertyValuesHolder.ofFloat("scaleY", 0.8f, 1f));
scaleDown.setDuration(150); scaleDown.setDuration(150);
scaleDown.setStartDelay(0); scaleDown.setStartDelay(0);

View File

@ -151,8 +151,10 @@ public class settingGeneralController extends AppCompatActivity {
new Handler().postDelayed(() -> new Handler().postDelayed(() ->
{ {
activityContextManager.getInstance().getHomeController().onReInitTheme(); if(activityContextManager.getInstance().getHomeController() != null){
activityContextManager.getInstance().getSettingController().onReInitTheme(); activityContextManager.getInstance().getHomeController().onReInitTheme();
activityContextManager.getInstance().getSettingController().onReInitTheme();
}
}, 100); }, 100);
} }
} }

View File

@ -119,7 +119,9 @@ public class settingPrivacyController extends AppCompatActivity {
public void onBackPressed() { public void onBackPressed() {
if(mSettingChanged){ if(mSettingChanged){
activityContextManager.getInstance().setCurrentActivity(this); activityContextManager.getInstance().setCurrentActivity(this);
activityContextManager.getInstance().getHomeController().initRuntimeSettings(); if(activityContextManager.getInstance().getHomeController()!=null){
activityContextManager.getInstance().getHomeController().initRuntimeSettings();
}
} }
finish(); finish();
} }

View File

@ -204,11 +204,13 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
mModelList.remove(0); mModelList.remove(0);
mEvent.invokeObserver(Arrays.asList(0, false), tabEnums.eTabAdapterCallback.ON_REMOVE_TAB_VIEW_RETAIN_BACKUP); mEvent.invokeObserver(Arrays.asList(0, false), tabEnums.eTabAdapterCallback.ON_REMOVE_TAB_VIEW_RETAIN_BACKUP);
} }
mEvent.invokeObserver(Arrays.asList(0, true), tabEnums.eTabAdapterCallback.ON_SHOW_UNDO_POPUP);
notifyDataSetChanged(); notifyDataSetChanged();
} }
} }
private void onClearAllSelection(){ private void onClearAllSelection(){
mLongPressMenuEnabled = false;
mEvent.invokeObserver(Arrays.asList(false, mSelectedList.size()), tabEnums.eTabAdapterCallback.ON_SHOW_SELECTION_MENU); mEvent.invokeObserver(Arrays.asList(false, mSelectedList.size()), tabEnums.eTabAdapterCallback.ON_SHOW_SELECTION_MENU);
for(int mCounter=0;mCounter<mSelectedList.size();mCounter++){ for(int mCounter=0;mCounter<mSelectedList.size();mCounter++){
@ -246,9 +248,10 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
private void onSelectionClear(FrameLayout mSelectedView){ private void onSelectionClear(FrameLayout mSelectedView){
mSelectedView.animate().alpha(0).withEndAction(() -> mSelectedView.setVisibility(View.GONE)); mSelectedView.animate().alpha(0).withEndAction(() -> mSelectedView.setVisibility(View.GONE));
if(mSelectedList.size()==0){ //if(mSelectedList.size()==0){
mEvent.invokeObserver(null, tabEnums.eTabAdapterCallback.ON_HIDE_SELECTION); // mEvent.invokeObserver(null, tabEnums.eTabAdapterCallback.ON_HIDE_SELECTION);
} // mLongPressMenuEnabled = false;
//}
} }
private void onTriggerURL(tabRowModel model){ private void onTriggerURL(tabRowModel model){
@ -270,13 +273,14 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
break; break;
} }
} }
if(mSelectedList.size()<=0){
mEvent.invokeObserver(Arrays.asList(true, mSelectedList.size()), tabEnums.eTabAdapterCallback.ON_HIDE_SELECTION);
onClearAllSelection();
}
mModelList.remove(mIndex); mModelList.remove(mIndex);
if(mModelList.size()!=1){ notifyItemRemoved(mIndex);
notifyItemRemoved(mIndex); notifyItemRangeChanged(mIndex, mModelList.size());
notifyItemChanged(mModelList.size()-1);
notifyItemRangeChanged(mIndex, mModelList.size());
}
mEvent.invokeObserver(Collections.singletonList(mIndex), tabEnums.eTabAdapterCallback.M_CLEAR_BACKUP); mEvent.invokeObserver(Collections.singletonList(mIndex), tabEnums.eTabAdapterCallback.M_CLEAR_BACKUP);
mEvent.invokeObserver(Collections.singletonList(mIndex), tabEnums.eTabAdapterCallback.ON_REMOVE_TAB_VIEW); mEvent.invokeObserver(Collections.singletonList(mIndex), tabEnums.eTabAdapterCallback.ON_REMOVE_TAB_VIEW);
@ -380,7 +384,7 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
mDate.setText(model.getDate()); mDate.setText(model.getDate());
if(mURL.equals("about:blank")){ if(model.getSession().getTitle().equals("about:blank")){
mWebThumbnail.setAlpha(0f); mWebThumbnail.setAlpha(0f);
}else { }else {
new Handler().postDelayed(() -> new Handler().postDelayed(() ->
@ -460,16 +464,13 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
if(this.getLayoutPosition()==mModelList.size()-1){ if(this.getLayoutPosition()==mModelList.size()-1){
if(mSelectedList.size()>0){ if(mSelectedList.size()>0){
itemView.setVisibility(View.GONE); itemView.setVisibility(View.GONE);
mLongPressMenuEnabled = true;
}else { }else {
itemView.setVisibility(View.VISIBLE); itemView.setVisibility(View.VISIBLE);
mLongPressMenuEnabled = false;
mItemSelectionMenuButton.animate().cancel(); mItemSelectionMenuButton.animate().cancel();
mItemSelectionMenuButton.animate().setDuration(250).alpha(1); mItemSelectionMenuButton.animate().setDuration(250).alpha(1);
} }
}else { }else {
itemView.setVisibility(View.VISIBLE); itemView.setVisibility(View.VISIBLE);
mLongPressMenuEnabled = false;
mItemSelectionMenuButton.animate().setDuration(250).alpha(1); mItemSelectionMenuButton.animate().setDuration(250).alpha(1);
} }
mRemoveRow.bringToFront(); mRemoveRow.bringToFront();
@ -529,6 +530,7 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
@Override @Override
public boolean onLongClick(View v) { public boolean onLongClick(View v) {
if(v.getId() == R.id.pLoadSession){ if(v.getId() == R.id.pLoadSession){
onEnableLongClickMenu();
if(mSelectedView.getVisibility() == View.GONE){ if(mSelectedView.getVisibility() == View.GONE){
mSelectedList.add(mModelList.get(this.getLayoutPosition()).getSession().getSessionID()); mSelectedList.add(mModelList.get(this.getLayoutPosition()).getSession().getSessionID());
onSelectionCreate(mSelectedView); onSelectionCreate(mSelectedView);

View File

@ -44,7 +44,9 @@ import java.util.List;
import java.util.Objects; import java.util.Objects;
import static com.darkweb.genesissearchengine.appManager.tabManager.tabEnums.eTabViewCommands.ON_HIDE_UNDO_DIALOG_FORCED; import static com.darkweb.genesissearchengine.appManager.tabManager.tabEnums.eTabViewCommands.ON_HIDE_UNDO_DIALOG_FORCED;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.M_LOAD_NEW_TAB;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.M_RESET; import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.M_RESET;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.M_UNDO;
import static org.mozilla.gecko.util.ThreadUtils.runOnUiThread; import static org.mozilla.gecko.util.ThreadUtils.runOnUiThread;
public class tabController extends Fragment public class tabController extends Fragment
@ -81,6 +83,7 @@ public class tabController extends Fragment
private boolean mClosedByNewTab = false; private boolean mClosedByNewTab = false;
private boolean mFirstLaunch = true; private boolean mFirstLaunch = true;
boolean mScrolled = true; boolean mScrolled = true;
boolean mTouchable = true;
/*Initializations*/ /*Initializations*/
@ -140,6 +143,7 @@ public class tabController extends Fragment
if(mFirstLaunch){ if(mFirstLaunch){
mRecycleView.setAlpha(0); mRecycleView.setAlpha(0);
mFirstLaunch = false; mFirstLaunch = false;
mTouchable = true;
ObjectAnimator alpha = ObjectAnimator.ofPropertyValuesHolder(mRecycleView, PropertyValuesHolder.ofFloat("alpha", 0, 1f)); ObjectAnimator alpha = ObjectAnimator.ofPropertyValuesHolder(mRecycleView, PropertyValuesHolder.ofFloat("alpha", 0, 1f));
alpha.setDuration(300); alpha.setDuration(300);
@ -156,6 +160,7 @@ public class tabController extends Fragment
mTabAdapter.notifyDataSetChanged(); mTabAdapter.notifyDataSetChanged();
mEmptyView.animate().setStartDelay(1200).setDuration(0).alpha(1); mEmptyView.animate().setStartDelay(1200).setDuration(0).alpha(1);
}else { }else {
mTouchable = true;
initializeList(); initializeList();
mRecycleView.setAlpha(1); mRecycleView.setAlpha(1);
mEmptyView.setAlpha(1); mEmptyView.setAlpha(1);
@ -219,6 +224,13 @@ public class tabController extends Fragment
return false; return false;
}); });
mRecycleView.addOnItemTouchListener(new RecyclerView.SimpleOnItemTouchListener() {
@Override
public boolean onInterceptTouchEvent(RecyclerView view, MotionEvent e) {
return !mTouchable;
}
});
mNestedScrollView.getViewTreeObserver().addOnScrollChangedListener(() -> { mNestedScrollView.getViewTreeObserver().addOnScrollChangedListener(() -> {
float scrollY = mNestedScrollView.getScrollY(); float scrollY = mNestedScrollView.getScrollY();
@ -387,7 +399,9 @@ public class tabController extends Fragment
}, 500); }, 500);
return true; return true;
}else{ }else{
onShowUndoDialog(); if(pShowPopupOnClearAll){
onShowUndoDialog();
}
mTabAdapter.notifyItemRangeChanged(pIndex, mTabAdapter.getItemCount() - pIndex); mTabAdapter.notifyItemRangeChanged(pIndex, mTabAdapter.getItemCount() - pIndex);
mTabAdapter.notifyItemChanged(0); mTabAdapter.notifyItemChanged(0);
new Handler().postDelayed(() -> { new Handler().postDelayed(() -> {
@ -424,11 +438,11 @@ public class tabController extends Fragment
public void onRestoreTab(View view){ public void onRestoreTab(View view){
mTouchable = true;
final Handler handler = new Handler(); final Handler handler = new Handler();
handler.postDelayed(() -> handler.postDelayed(() ->
{ {
ArrayList<tabRowModel> mBackup = (ArrayList<tabRowModel>)mListModel.onTrigger(tabEnums.eModelCallback.M_LOAD_BACKUP,null); ArrayList<tabRowModel> mBackup = (ArrayList<tabRowModel>)mListModel.onTrigger(tabEnums.eModelCallback.M_LOAD_BACKUP,null);
mPopupUndo.findViewById(R.id.pBlockerUndo).setVisibility(View.VISIBLE);
mListModel.onTrigger(tabEnums.eModelCallback.M_CLEAR_BACKUP_RETAIN_DATABASE,null); mListModel.onTrigger(tabEnums.eModelCallback.M_CLEAR_BACKUP_RETAIN_DATABASE,null);
if(mRecycleView.getAlpha()==0){ if(mRecycleView.getAlpha()==0){
@ -450,7 +464,7 @@ public class tabController extends Fragment
} }
public void onShowUndoDialog(){ public void onShowUndoDialog(){
mtabViewController.onTrigger(tabEnums.eTabViewCommands.ON_SHOW_UNDO_DIALOG, Collections.singletonList(mListModel.getList().size())); pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(mHomeController), M_UNDO);
} }
public void onClearTabBackup(){ public void onClearTabBackup(){
@ -558,12 +572,11 @@ public class tabController extends Fragment
mClosedByNewTab = true; mClosedByNewTab = true;
} }
else if(pView.getId() == R.id.pCloseTab){ else if(pView.getId() == R.id.pCloseTab){
mTouchable = false;
onClearTabBackup(); onClearTabBackup();
mListModel.onTrigger(tabEnums.eModelCallback.M_CLEAR_BACKUP_RETAIN_DATABASE,null); mListModel.onTrigger(tabEnums.eModelCallback.M_CLEAR_BACKUP_RETAIN_DATABASE,null);
mRecycleView.animate().setDuration(250).alpha(0).withEndAction(() -> { mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.REMOVE_ALL, null);
mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.REMOVE_ALL, null); onClearSelection(null);
onClearSelection(null);
});
} }
else if(pView.getId() == R.id.pOpenSetting){ else if(pView.getId() == R.id.pOpenSetting){
activityContextManager.getInstance().getHomeController().onBackPressed(); activityContextManager.getInstance().getHomeController().onBackPressed();
@ -591,6 +604,7 @@ public class tabController extends Fragment
public void onPause() public void onPause()
{ {
status.sSettingIsAppPaused = true; status.sSettingIsAppPaused = true;
pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(this), M_RESET);
super.onPause(); super.onPause();
} }
@ -647,6 +661,9 @@ public class tabController extends Fragment
else if(e_type.equals(tabEnums.eTabAdapterCallback.ON_REMOVE_TAB_VIEW_RETAIN_BACKUP)){ else if(e_type.equals(tabEnums.eTabAdapterCallback.ON_REMOVE_TAB_VIEW_RETAIN_BACKUP)){
onInitRemoveView((Integer) data.get(0), false, (boolean)data.get(1)); onInitRemoveView((Integer) data.get(0), false, (boolean)data.get(1));
} }
else if(e_type.equals(tabEnums.eTabAdapterCallback.ON_SHOW_UNDO_POPUP)){
onShowUndoDialog();
}
else if(e_type.equals(tabEnums.eTabAdapterCallback.M_CLEAR_BACKUP)){ else if(e_type.equals(tabEnums.eTabAdapterCallback.M_CLEAR_BACKUP)){
onExitAndClearBackup(); onExitAndClearBackup();
} }

View File

@ -12,7 +12,7 @@ public class tabEnums
} }
public enum eTabAdapterCallback { public enum eTabAdapterCallback {
ON_HIDE_SELECTION, ON_SHOW_SELECTION, ON_CLEAR_TAB_BACKUP, ON_REMOVE_TAB, ON_INIT_TAB_COUNT, ON_BACK_PRESSED, ON_LOAD_TAB, ON_REMOVE_TAB_VIEW,ON_REMOVE_TAB_VIEW_RETAIN_BACKUP, M_CLEAR_BACKUP, ON_SHOW_SELECTION_MENU ON_HIDE_SELECTION, ON_SHOW_SELECTION, ON_CLEAR_TAB_BACKUP, ON_REMOVE_TAB, ON_INIT_TAB_COUNT, ON_BACK_PRESSED, ON_LOAD_TAB, ON_REMOVE_TAB_VIEW,ON_REMOVE_TAB_VIEW_RETAIN_BACKUP, ON_SHOW_UNDO_POPUP, M_CLEAR_BACKUP, ON_SHOW_SELECTION_MENU
} }
public enum eModelCallback { public enum eModelCallback {

View File

@ -171,41 +171,6 @@ class tabViewController
mNewTab.setFocusable(true); mNewTab.setFocusable(true);
} }
private void onShowUndoDialog(int pTabCount) {
mUndoLayout.findViewById(R.id.pBlockerUndo).setVisibility(View.GONE);
mUndoLayout.animate().cancel();
mUndoLayout.setVisibility(View.VISIBLE);
mUndoLayout.animate().cancel();
int mDuration = 220;
if(mUndoLayout.getAlpha()>0){
mUndoLayout.setTranslationY(360);
mDuration = 400;
}else {
mUndoLayout.setTranslationY(60);
}
mUndoLayout.setAlpha(0);
mUndoLayout.animate().withLayer()
.translationY(0)
.alpha(1f)
.setDuration(mDuration).start();
initTabCount(pTabCount);
mDelayHandler.removeCallbacksAndMessages(null);
mDelayHandler.postDelayed(() -> {
mUndoLayout.animate().cancel();
mUndoLayout.animate().alpha(0).withEndAction(() -> mUndoLayout.setVisibility(View.GONE));
}, 3000);
}
private void onHideUndoDialog() {
mUndoLayout.animate().cancel();
mUndoLayout.animate().alpha(0).withEndAction(() -> mUndoLayout.setVisibility(View.GONE));
}
private void onHideUndoDialogForced() { private void onHideUndoDialogForced() {
if(mUndoLayout.getAlpha()<1){ if(mUndoLayout.getAlpha()<1){
mUndoLayout.animate().cancel(); mUndoLayout.animate().cancel();
@ -283,10 +248,6 @@ class tabViewController
} }
else if(pCommands.equals(tabEnums.eTabViewCommands.ON_SHOW_SELECTION)){ else if(pCommands.equals(tabEnums.eTabViewCommands.ON_SHOW_SELECTION)){
onShowSelection(); onShowSelection();
}else if(pCommands.equals(tabEnums.eTabViewCommands.ON_SHOW_UNDO_DIALOG)){
onShowUndoDialog((int)pData.get(0));
}else if(pCommands.equals(tabEnums.eTabViewCommands.ON_HIDE_UNDO_DIALOG)){
onHideUndoDialog();
}else if(pCommands.equals(tabEnums.eTabViewCommands.ON_GENERATE_SWIPABLE_BACKGROUND)){ }else if(pCommands.equals(tabEnums.eTabViewCommands.ON_GENERATE_SWIPABLE_BACKGROUND)){
onDrawSwipableBackground((Canvas)pData.get(0), (RecyclerView.ViewHolder)pData.get(1), (float)pData.get(2), (int)pData.get(3)); onDrawSwipableBackground((Canvas)pData.get(0), (RecyclerView.ViewHolder)pData.get(1), (float)pData.get(2), (int)pData.get(3));
}else if(pCommands.equals(tabEnums.eTabViewCommands.ON_EXIT)){ }else if(pCommands.equals(tabEnums.eTabViewCommands.ON_EXIT)){

View File

@ -96,8 +96,8 @@ class imageDataModel
InputStream input = connection.getInputStream(); InputStream input = connection.getInputStream();
Bitmap myBitmap = BitmapFactory.decodeStream(input); Bitmap myBitmap = BitmapFactory.decodeStream(input);
return myBitmap; return myBitmap;
} catch (IOException e) { } catch (Exception ex) {
e.printStackTrace(); ex.printStackTrace();
return null; return null;
} }
} }

View File

@ -12,7 +12,6 @@ public class bookmarkRowModel
private String m_header; private String m_header;
private String m_description; private String m_description;
private Date m_date; private Date m_date;
private ImageView m_logo;
/*Initializations*/ /*Initializations*/
@ -31,9 +30,6 @@ public class bookmarkRowModel
public void setURL(String p_url){ public void setURL(String p_url){
this.m_description = p_url; this.m_description = p_url;
} }
public void setLogo(ImageView p_logo){
this.m_logo = p_logo;
}
public void setDate(Date p_date) { public void setDate(Date p_date) {
m_date = p_date; m_date = p_date;
} }
@ -52,9 +48,6 @@ public class bookmarkRowModel
public int getID() { public int getID() {
return m_id; return m_id;
} }
public ImageView getLogo() {
return m_logo;
}
public Date getDate() { public Date getDate() {
return m_date; return m_date;
} }

View File

@ -9,6 +9,7 @@ import com.darkweb.genesissearchengine.helperManager.helperMethod;
import org.mozilla.geckoview.GeckoSession; import org.mozilla.geckoview.GeckoSession;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;
import java.util.zip.Deflater; import java.util.zip.Deflater;
@ -38,34 +39,10 @@ public class tabRowModel
mBitmap.recycle(); mBitmap.recycle();
mBitmap = null; mBitmap = null;
} }
try { mBitmap = BitmapFactory.decodeStream(new ByteArrayInputStream(pBlob));
byte[] pBlobTemp = compress(pBlob);
int mSize = pBlobTemp.length;
mBitmap = BitmapFactory.decodeByteArray(pBlobTemp,0,mSize);
} catch (IOException e) {
e.printStackTrace();
}
} }
} }
public byte[] compress(byte[] data) throws IOException {
Deflater deflater = new Deflater();
deflater.setInput(data);
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(data.length);
deflater.finish();
byte[] buffer = new byte[1024];
while (!deflater.finished()) {
int count = deflater.deflate(buffer); // returns the generated code... index
outputStream.write(buffer, 0, count);
}
outputStream.close();
byte[] output = outputStream.toByteArray();
return output;
}
/*Helper Method*/ /*Helper Method*/
public geckoSession getSession() public geckoSession getSession()
@ -97,7 +74,7 @@ public class tabRowModel
return mId; return mId;
} }
public void setmBitmap(Bitmap pBitmap) { public void decodeByteArraysetmBitmap(Bitmap pBitmap) {
mBitmap = null; mBitmap = null;
mBitmap = pBitmap; mBitmap = pBitmap;
} }

View File

@ -2,6 +2,8 @@ package com.darkweb.genesissearchengine.dataManager;
import android.content.ContentValues; import android.content.ContentValues;
import android.database.Cursor; import android.database.Cursor;
import android.util.Log;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.appManager.activityContextManager; import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.dataManager.models.bookmarkRowModel; import com.darkweb.genesissearchengine.dataManager.models.bookmarkRowModel;
@ -97,28 +99,36 @@ public class sqlCipherDataModel
private void execSQL(String query,Object params,boolean pContentValues) private void execSQL(String query,Object params,boolean pContentValues)
{ {
if(params==null) try {
{ if(params==null)
sDatabaseInstance.execSQL(query); {
} sDatabaseInstance.execSQL(query);
else }
{ else
sDatabaseInstance.execSQL(query,(String[])params); {
sDatabaseInstance.execSQL(query,(String[])params);
}
}catch (Exception ex){
Log.i("Memory Error", "Memory Full");
} }
} }
private void execSQL(String query,Object params,boolean pContentValues,String whereClause, String[] whereArgs) private void execSQL(String query,Object params,boolean pContentValues,String whereClause, String[] whereArgs)
{ {
if(params==null) try {
{ if(params==null)
sDatabaseInstance.execSQL(query); {
} sDatabaseInstance.execSQL(query);
else if(pContentValues){ }
sDatabaseInstance.update(query, (ContentValues)params, whereClause, whereArgs); else if(pContentValues){
} sDatabaseInstance.update(query, (ContentValues)params, whereClause, whereArgs);
else }
{ else
sDatabaseInstance.execSQL(query,(String[])params); {
sDatabaseInstance.execSQL(query,(String[])params);
}
}catch (Exception ex){
Log.i("Memory Error", "Memory Full");
} }
} }
@ -221,7 +231,7 @@ public class sqlCipherDataModel
execSQL((String)pData.get(0), pData.get(1), false); execSQL((String)pData.get(0), pData.get(1), false);
} }
else if(pCommands == dataEnums.eSqlCipherCommands.M_EXEC_SQL_USING_CONTENT){ else if(pCommands == dataEnums.eSqlCipherCommands.M_EXEC_SQL_USING_CONTENT){
execSQL((String)pData.get(0), pData.get(1), true, (String)pData.get(3), (String[])pData.get(4)); execSQL((String)pData.get(0), pData.get(1), true, (String)pData.get(2), (String[])pData.get(3));
} }
else if(pCommands == dataEnums.eSqlCipherCommands.M_SELECT_BOOKMARK){ else if(pCommands == dataEnums.eSqlCipherCommands.M_SELECT_BOOKMARK){
return selectBookmark(); return selectBookmark();

View File

@ -4,6 +4,8 @@ import android.annotation.SuppressLint;
import android.content.ContentValues; import android.content.ContentValues;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.graphics.BitmapFactory; import android.graphics.BitmapFactory;
import android.os.AsyncTask;
import android.os.Handler;
import android.util.Log; import android.util.Log;
import android.widget.ImageView; import android.widget.ImageView;
import com.darkweb.genesissearchengine.appManager.activityContextManager; import com.darkweb.genesissearchengine.appManager.activityContextManager;
@ -12,6 +14,8 @@ import com.darkweb.genesissearchengine.dataManager.models.tabRowModel;
import com.darkweb.genesissearchengine.constants.enums; import com.darkweb.genesissearchengine.constants.enums;
import com.darkweb.genesissearchengine.constants.strings; import com.darkweb.genesissearchengine.constants.strings;
import com.darkweb.genesissearchengine.eventObserver; import com.darkweb.genesissearchengine.eventObserver;
import com.darkweb.genesissearchengine.helperManager.helperMethod;
import org.mozilla.geckoview.GeckoResult; import org.mozilla.geckoview.GeckoResult;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
@ -22,6 +26,8 @@ import java.util.Calendar;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import static java.lang.Thread.sleep;
@SuppressLint("CommitPrefEdits") @SuppressLint("CommitPrefEdits")
class tabDataModel class tabDataModel
{ {
@ -236,54 +242,67 @@ class tabDataModel
} }
} }
// int isLoading = 0;
public void updatePixels(String pSessionID, GeckoResult<Bitmap> pBitmapManager, ImageView pImageView, boolean pOpenTabView){ public void updatePixels(String pSessionID, GeckoResult<Bitmap> pBitmapManager, ImageView pImageView, boolean pOpenTabView){
updatePixelThread mThread = new updatePixelThread();
new Thread(){ mThread.pBitmapManager = pBitmapManager;
public void run(){ mThread.pImageView = pImageView;
try { mThread.pOpenTabView = pOpenTabView;
Log.i("FIZZAHFUCK3","asd : "); mThread.pSessionID = pSessionID;
for(int counter = 0; counter< mTabs.size(); counter++) { mThread.execute();
int finalCounter = counter;
if (mTabs.get(counter).getSession().getSessionID().equals(pSessionID)) {
Bitmap mBitmap = pBitmapManager.poll(10000);
ByteArrayOutputStream out = new ByteArrayOutputStream();
mBitmap.compress(Bitmap.CompressFormat.PNG, 20, out);
Bitmap decoded = BitmapFactory.decodeStream(new ByteArrayInputStream(out.toByteArray()));
Bitmap emptyBitmap = Bitmap.createBitmap(decoded.getWidth(), decoded.getHeight(), decoded.getConfig());
if (!decoded.sameAs(emptyBitmap)) {
mTabs.get(finalCounter).setmBitmap(decoded);
if(pImageView!=null){
activityContextManager.getInstance().getHomeController().runOnUiThread(() -> pImageView.setImageBitmap(mBitmap));
}
byte[] mThumbnail = out.toByteArray();
ContentValues mContentValues = new ContentValues();
mContentValues.put("mThumbnail", mThumbnail);
mExternalEvents.invokeObserver(Arrays.asList("tab",mContentValues, "mid = ?", new String[]{mTabs.get(finalCounter).getmId()}), dataEnums.eTabCallbackCommands.M_EXEC_SQL_USING_CONTENT);
}
}
}
Log.i("FIZZAHFUCK4","asd : ");
} catch (Exception ex) {
Log.i("FIZZAHFUCK2","asd : " + ex.getMessage());
ex.printStackTrace();
} catch (Throwable throwable) {
throwable.printStackTrace();
}
if(pOpenTabView){
activityContextManager.getInstance().getHomeController().onLoadFirstElement();
}
}
}.start();
} }
@SuppressLint("StaticFieldLeak")
private class updatePixelThread extends AsyncTask<String, String, String> {
public String pSessionID;
public GeckoResult<Bitmap> pBitmapManager;
public ImageView pImageView;
public boolean pOpenTabView;
@Override
protected void onPreExecute() {
}
@Override
protected String doInBackground(String... strings) {
try {
for(int counter = 0; counter< mTabs.size(); counter++) {
int finalCounter = counter;
if (mTabs.get(counter).getSession().getSessionID().equals(pSessionID)) {
Bitmap mBitmap = pBitmapManager.poll(10000);
ByteArrayOutputStream out = new ByteArrayOutputStream();
mBitmap.compress(Bitmap.CompressFormat.JPEG, 40, out);
mTabs.get(finalCounter).decodeByteArraysetmBitmap(mBitmap);
Bitmap decoded = BitmapFactory.decodeStream(new ByteArrayInputStream(out.toByteArray()));
Bitmap emptyBitmap = Bitmap.createBitmap(decoded.getWidth(), decoded.getHeight(), decoded.getConfig());
if (!decoded.sameAs(emptyBitmap)) {
if(pImageView!=null){
activityContextManager.getInstance().getHomeController().runOnUiThread(() -> pImageView.setImageBitmap(mBitmap));
}
ContentValues mContentValues = new ContentValues();
mContentValues.put("mThumbnail", out.toByteArray());
mExternalEvents.invokeObserver(Arrays.asList("tab",mContentValues, "mid = ?", new String[]{mTabs.get(finalCounter).getmId()}), dataEnums.eTabCallbackCommands.M_EXEC_SQL_USING_CONTENT);
}
break;
}
}
} catch (Throwable ex) {
ex.printStackTrace();
}
if(pOpenTabView){
activityContextManager.getInstance().getHomeController().onLoadFirstElement();
}
return "";
}
@Override
protected void onPostExecute(String bitmap) {
}
}
public ArrayList<ArrayList<String>> getSuggestions(String pQuery){ public ArrayList<ArrayList<String>> getSuggestions(String pQuery){
ArrayList<ArrayList<String>> mModel = new ArrayList<>(); ArrayList<ArrayList<String>> mModel = new ArrayList<>();
for(int count = 0; count<= mTabs.size()-1 && mTabs.size()<500; count++){ for(int count = 0; count<= mTabs.size()-1 && mTabs.size()<500; count++){

View File

@ -70,6 +70,7 @@ import java.net.SocketException;
import java.net.URI; import java.net.URI;
import java.net.URL; import java.net.URL;
import java.net.URLConnection; import java.net.URLConnection;
import java.nio.ByteBuffer;
import java.security.Key; import java.security.Key;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
@ -242,16 +243,16 @@ public class helperMethod
mColor = Color.argb(255, 0, 153, 54); mColor = Color.argb(255, 0, 153, 54);
} }
if (url.contains("https://")) if (url.startsWith("https://"))
{ {
SpannableString ss = new SpannableString(url); SpannableString ss = new SpannableString(url);
ss.setSpan(new ForegroundColorSpan(mColor), 0, 8, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); ss.setSpan(new ForegroundColorSpan(mColor), 0, 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
ss.setSpan(new ForegroundColorSpan(Color.GRAY), 5, 8, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); ss.setSpan(new ForegroundColorSpan(Color.GRAY), 5, 8, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
return ss; return ss;
} else if (url.contains("http://")) } else if (url.startsWith("http://"))
{ {
SpannableString ss = new SpannableString(url); SpannableString ss = new SpannableString(url);
ss.setSpan(new ForegroundColorSpan(mColor), 0, 7, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); ss.setSpan(new ForegroundColorSpan(mColor), 0, 4, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
ss.setSpan(new ForegroundColorSpan(Color.GRAY), 4, 7, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); ss.setSpan(new ForegroundColorSpan(Color.GRAY), 4, 7, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
return ss; return ss;
} else } else
@ -361,12 +362,14 @@ public class helperMethod
} }
public static void hideKeyboard(AppCompatActivity context) { public static void hideKeyboard(AppCompatActivity context) {
View view = context.findViewById(android.R.id.content); if(context!=null){
if (view != null) View view = context.findViewById(android.R.id.content);
{ if (view != null)
InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); {
assert imm != null; InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(view.getWindowToken(), 0); assert imm != null;
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
}
} }
} }
@ -769,9 +772,11 @@ public class helperMethod
} }
public static void showToastMessage(String message,Context context){ public static void showToastMessage(String message,Context context){
Toast toast=Toast.makeText(context.getApplicationContext(),message,Toast.LENGTH_SHORT); if(context!=null){
toast.setGravity(Gravity.CENTER_HORIZONTAL|Gravity.BOTTOM, 0, 0); Toast toast=Toast.makeText(context.getApplicationContext(),message,Toast.LENGTH_SHORT);
toast.show(); toast.setGravity(Gravity.CENTER_HORIZONTAL|Gravity.BOTTOM, 0, 0);
toast.show();
}
} }
public static boolean checkPermissions(AppCompatActivity context) { public static boolean checkPermissions(AppCompatActivity context) {

View File

@ -24,6 +24,7 @@ public class adManager
private eventObserver.eventListener mEvent; private eventObserver.eventListener mEvent;
private WeakReference<AdView> mBannerAds; private WeakReference<AdView> mBannerAds;
private boolean mPaidStatus; private boolean mPaidStatus;
private int mRequestCount = 0;
private boolean bannerAdsLoading = false; private boolean bannerAdsLoading = false;
private boolean bannerAdsLoaded = false; private boolean bannerAdsLoaded = false;
@ -90,8 +91,12 @@ public class adManager
public void onAdFailedToLoad(@NonNull LoadAdError var1) { public void onAdFailedToLoad(@NonNull LoadAdError var1) {
new Handler().postDelayed(() -> new Handler().postDelayed(() ->
{ {
initializeBannerAds(); if(mRequestCount<2){
}, 10000); mRequestCount+=1;
initializeBannerAds();
}
}, 30000);
} }
}); });
} }

View File

@ -25,7 +25,7 @@ public class analyticManager
private void initialize() private void initialize()
{ {
new FlurryAgent.Builder() .withLogEnabled(true) .build(mAppContext.get().getApplicationContext(), "4C4K4T5ND9RJKT4H47GQ"); new FlurryAgent.Builder() .withLogEnabled(false) .build(mAppContext.get().getApplicationContext(), "4C4K4T5ND9RJKT4H47GQ");
} }
/*External Triggers*/ /*External Triggers*/

View File

@ -272,7 +272,7 @@ public class downloadReciever extends AsyncTask<String, Integer, String> {
mStream.close(); mStream.close();
}catch (Exception ex){ }catch (Exception ex){
if(mRequestCode!=200){ if(mRequestCode!=200){
pluginController.getInstance().onMessageManagerInvoke(Arrays.asList(Collections.singletonList(mRequestCode), activityContextManager.getInstance().getHomeController()), pluginEnums.eMessageManager.M_DOWNLOAD_FAILURE); mEvent.invokeObserver(Collections.singletonList(mRequestCode), M_DOWNLOAD_FAILURE);
onCancel(); onCancel();
} }
} }

View File

@ -48,7 +48,13 @@ public class messageManager
/*Initializations*/ /*Initializations*/
private void onClearReference(){ private void onClearReference(){
mContext = null; if(mContext != null){
mContext.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
mContext = null;
}
if(mDialog!=null){
mDialog.dismiss();
}
} }
private void initializeDialog(int pLayout, int pGravity){ private void initializeDialog(int pLayout, int pGravity){
@ -73,7 +79,7 @@ public class messageManager
mDialog.setContentView(pLayout); mDialog.setContentView(pLayout);
ColorDrawable back = new ColorDrawable(Color.TRANSPARENT); ColorDrawable back = new ColorDrawable(Color.TRANSPARENT);
InsetDrawable inset = new InsetDrawable(back, helperMethod.pxFromDp(15),0,helperMethod.pxFromDp(15),0); InsetDrawable inset = new InsetDrawable(back, helperMethod.pxFromDp(10),0,helperMethod.pxFromDp(10),0);
mDialog.getWindow().setBackgroundDrawable(inset); mDialog.getWindow().setBackgroundDrawable(inset);
mDialog.getWindow().setLayout(helperMethod.pxFromDp(350), -1); mDialog.getWindow().setLayout(helperMethod.pxFromDp(350), -1);
mDialog.getWindow().setLayout(ConstraintLayout.LayoutParams.MATCH_PARENT, ConstraintLayout.LayoutParams.WRAP_CONTENT); mDialog.getWindow().setLayout(ConstraintLayout.LayoutParams.MATCH_PARENT, ConstraintLayout.LayoutParams.WRAP_CONTENT);
@ -143,7 +149,7 @@ public class messageManager
} }
catch (Exception ex) catch (Exception ex)
{ {
onTrigger(Arrays.asList(mContext, mContext.getString(R.string.ALERT_NOT_SUPPORTED_MESSAGE)),M_NOT_SUPPORTED); onTrigger(Arrays.asList(mContext.getString(R.string.ALERT_NOT_SUPPORTED_MESSAGE), mContext),M_NOT_SUPPORTED);
onClearReference(); onClearReference();
} }
}; };
@ -181,7 +187,13 @@ public class messageManager
Runnable runnable = () -> mDialog.dismiss(); Runnable runnable = () -> mDialog.dismiss();
initializeDialog(R.layout.popup_download_failure, Gravity.BOTTOM); initializeDialog(R.layout.popup_download_failure, Gravity.BOTTOM);
((TextView)mDialog.findViewById(R.id.pDescription)).setText(("Request denied Error " + mData.get(0))); String mMessage;
if(mData == null || mData.get(0) == null || (mData.get(0)).equals("0")){
mMessage = "\"Unknown\"";
}else {
mMessage = (String) mData.get(0);
}
((TextView)mDialog.findViewById(R.id.pDescription)).setText(("Request denied Error " + mMessage));
mDialog.findViewById(R.id.pDismiss).setOnClickListener(v -> mDialog.dismiss()); mDialog.findViewById(R.id.pDismiss).setOnClickListener(v -> mDialog.dismiss());
mDialog.setOnDismissListener(dialog -> { mDialog.setOnDismissListener(dialog -> {
@ -214,6 +226,48 @@ public class messageManager
handler.postDelayed(runnable, 1500); handler.postDelayed(runnable, 1500);
} }
private void popupLoadNewTab()
{
final Handler handler = new Handler();
Runnable runnable = () -> mDialog.dismiss();
initializeDialog(R.layout.popup_load_new_tab, Gravity.BOTTOM);
mDialog.getWindow().setDimAmount(0.3f);
mDialog.findViewById(R.id.pRestore).setOnClickListener(v -> {
mEvent.invokeObserver(null, M_UNDO_SESSION);
mDialog.dismiss();
handler.removeCallbacks(runnable);
});
mDialog.setOnDismissListener(dialog -> {
handler.removeCallbacks(runnable);
onClearReference();
});
handler.postDelayed(runnable, 1500);
}
private void popupUndo()
{
final Handler handler = new Handler();
Runnable runnable = () -> mDialog.dismiss();
initializeDialog(R.layout.popup_undo, Gravity.BOTTOM);
mDialog.getWindow().setDimAmount(0.3f);
mDialog.findViewById(R.id.pUndo).setOnClickListener(v -> {
mEvent.invokeObserver(null, M_UNDO_TAB);
mDialog.dismiss();
handler.removeCallbacks(runnable);
});
mDialog.setOnDismissListener(dialog -> {
handler.removeCallbacks(runnable);
onClearReference();
});
handler.postDelayed(runnable, 1500);
}
private void maxTabReached() private void maxTabReached()
{ {
final Handler handler = new Handler(); final Handler handler = new Handler();
@ -238,8 +292,17 @@ public class messageManager
private void notSupportMessage() private void notSupportMessage()
{ {
initializeDialog(R.layout.popup_not_supported, Gravity.BOTTOM); initializeDialog(R.layout.popup_not_supported, Gravity.BOTTOM);
mDialog.findViewById(R.id.pDismiss).setOnClickListener(v -> mDialog.dismiss()); mDialog.findViewById(R.id.pDismiss).setOnClickListener(view -> mDialog.dismiss());
mDialog.setOnDismissListener(dialog -> onClearReference()); mDialog.setOnDismissListener(dialog -> onClearReference());
final Handler handler = new Handler();
Runnable runnable = () -> {
if(mDialog!=null){
mDialog.dismiss();
onClearReference();
}
};
handler.postDelayed(runnable, 2500);
} }
private void onPanic(){ private void onPanic(){
@ -329,22 +392,19 @@ public class messageManager
mDialog.setOnDismissListener(dialog -> { mDialog.setOnDismissListener(dialog -> {
final Handler handler = new Handler(); final Handler handler = new Handler();
Runnable runnable = () -> { Runnable runnable = () -> {
helperMethod.hideKeyboard(activityContextManager.getInstance().getHomeController()); helperMethod.hideKeyboard(mContext);
dialog.dismiss(); dialog.dismiss();
mContext.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
onClearReference(); onClearReference();
}; };
handler.postDelayed(runnable, 50); handler.postDelayed(runnable, 50);
}); });
mDialog.findViewById(R.id.pDismiss).setOnClickListener(v -> { mDialog.findViewById(R.id.pDismiss).setOnClickListener(v -> {
mDialog.dismiss(); mDialog.dismiss();
mContext.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE); helperMethod.hideKeyboard(mContext);
helperMethod.hideKeyboard(activityContextManager.getInstance().getHomeController());
}); });
mDialog.findViewById(R.id.pNext).setOnClickListener(v -> { mDialog.findViewById(R.id.pNext).setOnClickListener(v -> {
mDialog.dismiss(); mDialog.dismiss();
mContext.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
helperMethod.hideKeyboard(mContext); helperMethod.hideKeyboard(mContext);
mEvent.invokeObserver(Collections.singletonList(mData.get(0).toString().replace("genesis.onion","genesishiddentechnologies.com")+"split"+((EditText) mDialog.findViewById(R.id.pBridgeInput)).getText().toString()), M_BOOKMARK); mEvent.invokeObserver(Collections.singletonList(mData.get(0).toString().replace("genesis.onion","genesishiddentechnologies.com")+"split"+((EditText) mDialog.findViewById(R.id.pBridgeInput)).getText().toString()), M_BOOKMARK);
}); });
@ -366,9 +426,8 @@ public class messageManager
mDialog.setOnDismissListener(dialog -> { mDialog.setOnDismissListener(dialog -> {
final Handler handler = new Handler(); final Handler handler = new Handler();
Runnable runnable = () -> { Runnable runnable = () -> {
helperMethod.hideKeyboard(activityContextManager.getInstance().getHomeController()); helperMethod.hideKeyboard(mContext);
dialog.dismiss(); dialog.dismiss();
mContext.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
onClearReference(); onClearReference();
}; };
handler.postDelayed(runnable, 50); handler.postDelayed(runnable, 50);
@ -506,8 +565,13 @@ public class messageManager
}); });
} }
private void downloadFileLongPress() private void
downloadFileLongPress()
{ {
if(mData==null || mData.size()<1){
return;
}
String title = mData.get(2).toString(); String title = mData.get(2).toString();
if(title.length()>0){ if(title.length()>0){
@ -518,20 +582,28 @@ public class messageManager
((TextView) mDialog.findViewById(R.id.pDescription)).setText((title + mData.get(0).toString())); ((TextView) mDialog.findViewById(R.id.pDescription)).setText((title + mData.get(0).toString()));
mDialog.findViewById(R.id.pDismiss).setOnClickListener(v -> mDialog.dismiss()); mDialog.findViewById(R.id.pDismiss).setOnClickListener(v -> mDialog.dismiss());
mDialog.findViewById(R.id.pOption1).setOnClickListener(v -> { mDialog.findViewById(R.id.pOption1).setOnClickListener(v -> {
mEvent.invokeObserver(Collections.singletonList(mData.get(0)), M_DOWNLOAD_FILE_MANUAL); if(mData!=null){
mDialog.dismiss(); mEvent.invokeObserver(Collections.singletonList(mData.get(0)), M_DOWNLOAD_FILE_MANUAL);
mDialog.dismiss();
}
}); });
mDialog.findViewById(R.id.pOption2).setOnClickListener(v -> { mDialog.findViewById(R.id.pOption2).setOnClickListener(v -> {
mEvent.invokeObserver(Collections.singletonList(mData.get(0)), M_OPEN_LINK_NEW_TAB); if(mData!=null){
mDialog.dismiss(); mEvent.invokeObserver(Collections.singletonList(mData.get(0)), M_OPEN_LINK_NEW_TAB);
mDialog.dismiss();
}
}); });
mDialog.findViewById(R.id.pOption3).setOnClickListener(v -> { mDialog.findViewById(R.id.pOption3).setOnClickListener(v -> {
mEvent.invokeObserver(Collections.singletonList(mData.get(0)), M_OPEN_LINK_CURRENT_TAB); if(mData!=null){
mDialog.dismiss(); mEvent.invokeObserver(Collections.singletonList(mData.get(0)), M_OPEN_LINK_CURRENT_TAB);
mDialog.dismiss();
}
}); });
mDialog.findViewById(R.id.pOption4).setOnClickListener(v -> { mDialog.findViewById(R.id.pOption4).setOnClickListener(v -> {
mEvent.invokeObserver(Collections.singletonList(mData.get(0)), M_COPY_LINK); if(mData!=null){
mDialog.dismiss(); mEvent.invokeObserver(Collections.singletonList(mData.get(0)), M_COPY_LINK);
mDialog.dismiss();
}
}); });
mDialog.setOnDismissListener(dialog -> onClearReference()); mDialog.setOnDismissListener(dialog -> onClearReference());
} }
@ -544,16 +616,22 @@ public class messageManager
((TextView) mDialog.findViewById(R.id.pDescription)).setText((title + mData.get(0))); ((TextView) mDialog.findViewById(R.id.pDescription)).setText((title + mData.get(0)));
mDialog.findViewById(R.id.pDismiss).setOnClickListener(v -> mDialog.dismiss()); mDialog.findViewById(R.id.pDismiss).setOnClickListener(v -> mDialog.dismiss());
mDialog.findViewById(R.id.pOption1).setOnClickListener(v -> { mDialog.findViewById(R.id.pOption1).setOnClickListener(v -> {
mEvent.invokeObserver(Collections.singletonList(mData.get(0)), M_OPEN_LINK_NEW_TAB); if(mData!=null){
mDialog.dismiss(); mEvent.invokeObserver(Collections.singletonList(mData.get(0)), M_OPEN_LINK_NEW_TAB);
mDialog.dismiss();
}
}); });
mDialog.findViewById(R.id.pOption2).setOnClickListener(v -> { mDialog.findViewById(R.id.pOption2).setOnClickListener(v -> {
mEvent.invokeObserver(Collections.singletonList(mData.get(0)), M_OPEN_LINK_CURRENT_TAB); if(mData!=null){
mDialog.dismiss(); mEvent.invokeObserver(Collections.singletonList(mData.get(0)), M_OPEN_LINK_CURRENT_TAB);
mDialog.dismiss();
}
}); });
mDialog.findViewById(R.id.pOption3).setOnClickListener(v -> { mDialog.findViewById(R.id.pOption3).setOnClickListener(v -> {
mEvent.invokeObserver(Collections.singletonList(mData.get(0)), M_COPY_LINK); if(mData!=null){
mDialog.dismiss(); mEvent.invokeObserver(Collections.singletonList(mData.get(0)), M_COPY_LINK);
mDialog.dismiss();
}
}); });
mDialog.setOnDismissListener(dialog -> onClearReference()); mDialog.setOnDismissListener(dialog -> onClearReference());
} }
@ -580,32 +658,46 @@ public class messageManager
((TextView) mDialog.findViewById(R.id.pHeader)).setText(mTitle); ((TextView) mDialog.findViewById(R.id.pHeader)).setText(mTitle);
((TextView) mDialog.findViewById(R.id.pDescription)).setText((data_local)); ((TextView) mDialog.findViewById(R.id.pDescription)).setText((data_local));
mDialog.findViewById(R.id.pOption1).setOnClickListener(v -> { mDialog.findViewById(R.id.pOption1).setOnClickListener(v -> {
mEvent.invokeObserver(Collections.singletonList(url), M_OPEN_LINK_NEW_TAB); if(mData!=null){
mDialog.dismiss(); mEvent.invokeObserver(Collections.singletonList(url), M_OPEN_LINK_NEW_TAB);
mDialog.dismiss();
}
}); });
mDialog.findViewById(R.id.pOption2).setOnClickListener(v -> { mDialog.findViewById(R.id.pOption2).setOnClickListener(v -> {
mEvent.invokeObserver(Collections.singletonList(url), M_OPEN_LINK_CURRENT_TAB); if(mData!=null){
mDialog.dismiss(); mEvent.invokeObserver(Collections.singletonList(url), M_OPEN_LINK_CURRENT_TAB);
mDialog.dismiss();
}
}); });
mDialog.findViewById(R.id.pOption3).setOnClickListener(v -> { mDialog.findViewById(R.id.pOption3).setOnClickListener(v -> {
mEvent.invokeObserver(Collections.singletonList(url), M_COPY_LINK); if(mData!=null){
mDialog.dismiss(); mEvent.invokeObserver(Collections.singletonList(url), M_COPY_LINK);
mDialog.dismiss();
}
}); });
mDialog.findViewById(R.id.pOption4).setOnClickListener(v -> { mDialog.findViewById(R.id.pOption4).setOnClickListener(v -> {
mEvent.invokeObserver(Collections.singletonList(file), M_OPEN_LINK_NEW_TAB); if(mData!=null){
mDialog.dismiss(); mEvent.invokeObserver(Collections.singletonList(file), M_OPEN_LINK_NEW_TAB);
mDialog.dismiss();
}
}); });
mDialog.findViewById(R.id.pOption5).setOnClickListener(v -> { mDialog.findViewById(R.id.pOption5).setOnClickListener(v -> {
mEvent.invokeObserver(Collections.singletonList(file), M_OPEN_LINK_CURRENT_TAB); if(mData!=null){
mDialog.dismiss(); mEvent.invokeObserver(Collections.singletonList(file), M_OPEN_LINK_CURRENT_TAB);
mDialog.dismiss();
}
}); });
mDialog.findViewById(R.id.pOption6).setOnClickListener(v -> { mDialog.findViewById(R.id.pOption6).setOnClickListener(v -> {
mEvent.invokeObserver(Collections.singletonList(file), M_COPY_LINK); if(mData!=null){
mDialog.dismiss(); mEvent.invokeObserver(Collections.singletonList(file), M_COPY_LINK);
mDialog.dismiss();
}
}); });
mDialog.findViewById(R.id.pOption7).setOnClickListener(v -> { mDialog.findViewById(R.id.pOption7).setOnClickListener(v -> {
mEvent.invokeObserver(Collections.singletonList(file), M_DOWNLOAD_FILE_MANUAL); if(mData!=null){
mDialog.dismiss(); mEvent.invokeObserver(Collections.singletonList(file), M_DOWNLOAD_FILE_MANUAL);
mDialog.dismiss();
}
}); });
mDialog.setOnDismissListener(dialog -> onClearReference()); mDialog.setOnDismissListener(dialog -> onClearReference());
} }
@ -696,11 +788,6 @@ public class messageManager
rateApp(); rateApp();
break; break;
case M_DOWNLOAD_FILE :
/*VERIFIED*/
//downloadFileLongPress();
break;
case M_LONG_PRESS_DOWNLOAD : case M_LONG_PRESS_DOWNLOAD :
/*VERIFIED*/ /*VERIFIED*/
downloadFileLongPress(); downloadFileLongPress();
@ -780,6 +867,16 @@ public class messageManager
/*VERIFIED*/ /*VERIFIED*/
orbotLoading(); orbotLoading();
break; break;
case M_LOAD_NEW_TAB:
/*VERIFIED*/
popupLoadNewTab();
break;
case M_UNDO:
/*VERIFIED*/
popupUndo();
break;
} }
} }
} }

View File

@ -1,8 +1,12 @@
package com.darkweb.genesissearchengine.pluginManager.orbotPluginManager; package com.darkweb.genesissearchengine.pluginManager.orbotPluginManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Build; import android.os.Build;
import android.os.Handler; import android.os.Handler;
import android.os.IBinder;
import android.view.View; import android.view.View;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
@ -62,19 +66,35 @@ public class orbotManager
orbotLocalConstants.mManualBridgeType = pBridgeCustomType; orbotLocalConstants.mManualBridgeType = pBridgeCustomType;
orbotLocalConstants.mBridgesDefault = pBridgesDefault; orbotLocalConstants.mBridgesDefault = pBridgesDefault;
Prefs.putBridgesEnabled(pBridgeStatus); Prefs.putBridgesEnabled(pBridgeStatus);
bindService();
initializeProxy(pShowImages, mClearOnExit);
}
private void bindService(){
ServiceConnection mServerConn = new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName name, IBinder binder) {
}
@Override
public void onServiceDisconnected(ComponentName name) {
}
};
Intent mServiceIntent = new Intent(mAppContext.get().getApplicationContext(), OrbotService.class); Intent mServiceIntent = new Intent(mAppContext.get().getApplicationContext(), OrbotService.class);
mServiceIntent.setAction(ACTION_START); mServiceIntent.setAction(ACTION_START);
mAppContext.get().bindService(mServiceIntent, mServerConn, Context.BIND_AUTO_CREATE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
mAppContext.get().stopService(mServiceIntent); mAppContext.get().stopService(mServiceIntent);
mAppContext.get().startForegroundService(mServiceIntent); mAppContext.get().startForegroundService(mServiceIntent);
} }
else else
{ {
mAppContext.get().stopService(mServiceIntent);
mAppContext.get().startService(mServiceIntent); mAppContext.get().startService(mServiceIntent);
} }
initializeProxy(pShowImages, mClearOnExit);
} }
/*Helper Methods*/ /*Helper Methods*/
@ -116,19 +136,7 @@ public class orbotManager
} }
private void onRestartProxy(){ private void onRestartProxy(){
bindService();
Intent mServiceIntent = new Intent(mAppContext.get().getApplicationContext(), OrbotService.class);
mServiceIntent.setAction(ACTION_START);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
mAppContext.get().stopService(mServiceIntent);
mAppContext.get().startForegroundService(mServiceIntent);
}
else
{
mAppContext.get().stopService(mServiceIntent);
mAppContext.get().startService(mServiceIntent);
}
} }
private void initializeProxy(int pShowImages, boolean mClearOnExit) private void initializeProxy(int pShowImages, boolean mClearOnExit)

View File

@ -155,7 +155,7 @@ public class pluginController
{ {
if(event_type.equals(enums.etype.M_DOWNLOAD_FAILURE)) if(event_type.equals(enums.etype.M_DOWNLOAD_FAILURE))
{ {
mMessageManager.onTrigger(Arrays.asList(Collections.singletonList(pData.get(0).toString()), mHomeController.get()),M_DOWNLOAD_FAILURE); mMessageManager.onTrigger(Arrays.asList(pData.get(0).toString(), mHomeController.get()),M_DOWNLOAD_FAILURE);
} }
return null; return null;
} }
@ -303,6 +303,12 @@ public class pluginController
else if(pEventType.equals(M_SET_BRIDGES)){ else if(pEventType.equals(M_SET_BRIDGES)){
activityContextManager.getInstance().getBridgeController().onUpdateBridges((String) pData.get(0), (String) pData.get(1)); activityContextManager.getInstance().getBridgeController().onUpdateBridges((String) pData.get(0), (String) pData.get(1));
} }
else if(pEventType.equals(M_UNDO_SESSION)){
activityContextManager.getInstance().getHomeController().onLoadRecentTab(null);
}
else if(pEventType.equals(M_UNDO_TAB)){
activityContextManager.getInstance().getTabController().onRestoreTab(null);
}
return null; return null;
} }
} }

View File

@ -28,10 +28,10 @@ public class pluginEnums
/*Message Manager*/ /*Message Manager*/
public enum eMessageManager{ public enum eMessageManager{
M_RESET, M_DATA_CLEARED, M_APPLICATION_CRASH, M_SECURE_CONNECTION, M_POPUP_BLOCKED, M_PANIC, M_MAX_TAB_REACHED, M_ORBOT_LOADING,M_DOWNLOAD_SINGLE, M_UPDATE_BRIDGES, M_NEW_IDENTITY, M_NOT_SUPPORTED, M_BRIDGE_MAIL, M_LONG_PRESS_WITH_LINK, M_LONG_PRESS_URL, M_LONG_PRESS_DOWNLOAD, M_START_ORBOT, M_DOWNLOAD_FAILURE, M_DOWNLOAD_FILE, M_RATE_APP, M_REPORT_URL, M_CLEAR_BOOKMARK, M_CLEAR_HISTORY, M_BOOKMARK, M_PANIC_RESET, M_RATE_SUCCESS, M_RATE_FAILURE, M_LANGUAGE_SUPPORT_FAILURE, M_WELCOME M_RESET, M_DATA_CLEARED, M_APPLICATION_CRASH, M_SECURE_CONNECTION, M_POPUP_BLOCKED, M_PANIC, M_MAX_TAB_REACHED, M_ORBOT_LOADING, M_LOAD_NEW_TAB, M_UNDO,M_DOWNLOAD_SINGLE, M_UPDATE_BRIDGES, M_NEW_IDENTITY, M_NOT_SUPPORTED, M_BRIDGE_MAIL, M_LONG_PRESS_WITH_LINK, M_LONG_PRESS_URL, M_LONG_PRESS_DOWNLOAD, M_START_ORBOT, M_DOWNLOAD_FAILURE, M_DOWNLOAD_FILE, M_RATE_APP, M_REPORT_URL, M_CLEAR_BOOKMARK, M_CLEAR_HISTORY, M_BOOKMARK, M_PANIC_RESET, M_RATE_SUCCESS, M_RATE_FAILURE, M_LANGUAGE_SUPPORT_FAILURE, M_WELCOME
} }
public enum eMessageManagerCallbacks{ public enum eMessageManagerCallbacks{
M_CANCEL_WELCOME, M_APP_RATED, M_DOWNLOAD_FILE_MANUAL, M_OPEN_LINK_CURRENT_TAB, M_COPY_LINK, M_REQUEST_BRIDGES, M_SET_BRIDGES, M_OPEN_LINK_NEW_TAB, M_CLEAR_TAB, M_RATE_APPLICATION, M_OPEN_PRIVACY, M_CUSTOM_BRIDGE, M_BRIDGE_TYPE M_CANCEL_WELCOME, M_APP_RATED, M_DOWNLOAD_FILE_MANUAL, M_OPEN_LINK_CURRENT_TAB, M_COPY_LINK, M_REQUEST_BRIDGES, M_SET_BRIDGES, M_OPEN_LINK_NEW_TAB, M_CLEAR_TAB, M_RATE_APPLICATION, M_OPEN_PRIVACY, M_UNDO_SESSION, M_UNDO_TAB, M_CUSTOM_BRIDGE, M_BRIDGE_TYPE
} }
/*Download Manager*/ /*Download Manager*/

View File

@ -6,7 +6,7 @@
<translate <translate
android:duration="250" android:duration="250"
android:fromXDelta="0%" android:fromXDelta="0%"
android:fromYDelta="-8%" android:fromYDelta="-13%"
android:toXDelta="0%" android:toXDelta="0%"
android:toYDelta="0%" android:toYDelta="0%"
/> />

View File

@ -8,7 +8,7 @@
android:fromXDelta="0%" android:fromXDelta="0%"
android:fromYDelta="0%" android:fromYDelta="0%"
android:toXDelta="0%" android:toXDelta="0%"
android:toYDelta="-8%" android:toYDelta="-10%"
/> />
<alpha android:fromAlpha="1.0" <alpha android:fromAlpha="1.0"

View File

@ -15,7 +15,11 @@
android:endColor="#264d73" android:endColor="#264d73"
android:startColor="#264d73" android:startColor="#264d73"
android:type="linear" /> android:type="linear" />
<corners android:radius="5.5dp" /> <corners
android:bottomLeftRadius="8dp"
android:bottomRightRadius="8dp"
android:topLeftRadius="8dp"
android:topRightRadius="8dp"/>
</shape> </shape>
</item> </item>
</ripple> </ripple>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 MiB

View File

@ -11,8 +11,8 @@
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/pMainLayout" android:id="@+id/pMainLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="60dp" android:layout_height="55dp"
android:layout_marginBottom="15dp" android:layout_marginBottom="10dp"
android:background="@xml/ax_background_inverted" android:background="@xml/ax_background_inverted"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"

View File

@ -11,8 +11,8 @@
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/pMainLayout" android:id="@+id/pMainLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="60dp" android:layout_height="55dp"
android:layout_marginBottom="15dp" android:layout_marginBottom="10dp"
android:background="@xml/ax_background_inverted" android:background="@xml/ax_background_inverted"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"

View File

@ -3,18 +3,15 @@
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/pToastLayoutRoot" android:id="@+id/pToastLayoutRoot"
android:translationZ="5dp"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_marginStart="15dp"
android:layout_marginEnd="15dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/pMainLayout" android:id="@+id/pMainLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="60dp" android:layout_height="55dp"
android:layout_marginBottom="25dp" android:layout_marginBottom="10dp"
android:background="@xml/ax_load_new_tab" android:background="@xml/ax_load_new_tab"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@ -30,7 +27,7 @@
android:paddingEnd="15dp" android:paddingEnd="15dp"
android:text="@string/ALERT_OPEN_NEW_TAB" android:text="@string/ALERT_OPEN_NEW_TAB"
android:textAlignment="textStart" android:textAlignment="textStart"
android:textColor="@color/c_alert_text_inverted" android:textColor="@color/c_alert_text_inverted_v1"
android:textSize="14sp" android:textSize="14sp"
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
@ -39,7 +36,7 @@
tools:ignore="SmallSp" /> tools:ignore="SmallSp" />
<Button <Button
android:id="@+id/pDismiss" android:id="@+id/pRestore"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
@ -47,7 +44,6 @@
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
android:layout_weight="1" android:layout_weight="1"
android:background="@xml/ax_ripple_default_round" android:background="@xml/ax_ripple_default_round"
android:onClick="onLoadRecentTab"
android:padding="0dp" android:padding="0dp"
android:text="@string/ALERT_OPEN_NEW_TAB_LOAD" android:text="@string/ALERT_OPEN_NEW_TAB_LOAD"
android:textAllCaps="false" android:textAllCaps="false"
@ -58,21 +54,6 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/pBlockerUndo"
android:layout_width="match_parent"
android:layout_height="55dp"
android:clickable="true"
android:contentDescription="@string/GENERAL_TODO"
android:focusable="true"
android:focusableInTouchMode="true"
android:translationZ="211dp"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/pMainLayout" />
<View <View
android:id="@+id/view4" android:id="@+id/view4"
android:layout_width="1dp" android:layout_width="1dp"
@ -80,7 +61,7 @@
android:layout_marginEnd="10dp" android:layout_marginEnd="10dp"
android:background="#3973ac" android:background="#3973ac"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/pDismiss" app:layout_constraintEnd_toStartOf="@+id/pRestore"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />

View File

@ -11,8 +11,8 @@
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/pMainLayout" android:id="@+id/pMainLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="60dp" android:layout_height="55dp"
android:layout_marginBottom="15dp" android:layout_marginBottom="10dp"
android:background="@xml/ax_background_inverted" android:background="@xml/ax_background_inverted"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"

View File

@ -2,85 +2,72 @@
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/pToastLayoutRoot"
android:translationZ="5dp"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:id="@+id/pMainLayout" android:id="@+id/pMainLayout"
android:layout_height="wrap_content" android:layout_width="match_parent"
android:background="@xml/hox_rounded_corner" android:layout_height="60dp"
android:layout_marginBottom="25dp"
android:background="@xml/ax_background_inverted"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintStart_toStartOf="parent">
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/pHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:paddingEnd="15dp"
android:paddingStart="15dp"
android:text="@string/ALERT_NOT_SUPPORTED"
android:textAlignment="textStart"
android:textColor="@color/c_text_setting_heading_v2"
android:textSize="17sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
android:id="@+id/pDescription" android:id="@+id/pDescription"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="5dp" android:layout_marginStart="10dp"
android:paddingEnd="15dp" android:alpha="0.8"
android:paddingStart="15dp" android:paddingStart="15dp"
android:text="@string/ALERT_NOT_SUPPORTED_INFO" android:paddingEnd="15dp"
android:text="@string/ALERT_NOT_SUPPORTED"
android:textAlignment="textStart" android:textAlignment="textStart"
android:textColor="@color/c_alert_text" android:textColor="@color/c_alert_text_inverted"
android:textSize="13sp" android:textSize="14sp"
android:alpha="0.6" android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="@+id/pMainLayout"
app:layout_constraintTop_toBottomOf="@+id/pHeader" app:layout_constraintTop_toTopOf="parent"
tools:ignore="SmallSp" /> tools:ignore="SmallSp" />
<Button
android:id="@+id/pDismiss"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
android:layout_marginBottom="10dp"
android:layout_weight="1"
android:background="@xml/ax_ripple_default_round"
android:onClick="onRestoreTab"
android:padding="0dp"
android:text="@string/ALERT_DISMISS"
android:textAllCaps="false"
android:textColor="@color/c_button_text_v1_inverted"
android:textSize="15sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View <View
android:id="@+id/pDivider" android:id="@+id/view6"
android:layout_width="match_parent" android:layout_width="1dp"
android:layout_height="1dp" android:layout_height="30dp"
android:layout_marginTop="25dp" android:layout_marginEnd="10dp"
android:background="@color/c_view_divier_background" android:background="@color/c_border_background_divider"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toStartOf="@+id/pDismiss"
app:layout_constraintTop_toBottomOf="@+id/pDescription" /> app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:id="@+id/pNavigationContainer"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pDivider"
android:orientation="horizontal">
<Button
android:id="@+id/pDismiss"
android:textColor="@color/c_button_text_v1"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:padding="0dp"
android:background="@xml/ax_ripple_default_round_bottom"
android:textSize="15sp"
android:textAllCaps="false"
android:layout_weight="1"
android:textStyle="bold"
android:text="@string/ALERT_DISMISS" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -5,17 +5,15 @@
android:id="@+id/pToastLayoutRoot" android:id="@+id/pToastLayoutRoot"
android:translationZ="5dp" android:translationZ="5dp"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_marginStart="15dp"
android:layout_marginEnd="15dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/pMainLayout" android:id="@+id/pMainLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="60dp" android:layout_height="55dp"
android:layout_marginBottom="25dp" android:layout_marginBottom="10dp"
android:background="@xml/ax_background_inverted" android:background="@xml/ax_load_new_tab"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"> app:layout_constraintStart_toStartOf="parent">
@ -39,7 +37,7 @@
tools:ignore="SmallSp" /> tools:ignore="SmallSp" />
<Button <Button
android:id="@+id/pDismiss" android:id="@+id/pUndo"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
@ -58,20 +56,6 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/pBlockerUndo"
android:layout_width="match_parent"
android:layout_height="55dp"
android:clickable="true"
android:contentDescription="@string/GENERAL_TODO"
android:focusable="true"
android:focusableInTouchMode="true"
android:translationZ="211dp"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/pMainLayout" />
<View <View
android:id="@+id/view6" android:id="@+id/view6"
@ -80,7 +64,7 @@
android:layout_marginEnd="10dp" android:layout_marginEnd="10dp"
android:background="@color/c_border_background_divider" android:background="@color/c_border_background_divider"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/pDismiss" app:layout_constraintEnd_toStartOf="@+id/pUndo"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -54,7 +54,7 @@
android:layout_width="37dp" android:layout_width="37dp"
android:layout_height="37dp" android:layout_height="37dp"
android:layout_marginTop="-1dp" android:layout_marginTop="-1dp"
android:background="@color/button_gray" android:src="@xml/ic_baseline_browser"
android:contentDescription="@string/GENERAL_TODO" android:contentDescription="@string/GENERAL_TODO"
android:textAlignment="center" android:textAlignment="center"
android:textColor="@color/white" android:textColor="@color/white"

View File

@ -104,7 +104,7 @@
android:fadingEdgeLength="20dp" android:fadingEdgeLength="20dp"
android:hint="@string/BOOKMARK_SETTING_HEADER_NAME_HINT" android:hint="@string/BOOKMARK_SETTING_HEADER_NAME_HINT"
android:inputType="text" android:inputType="text"
android:digits="0,1,2,3,4,5,6,7,8,9,*,qwertzuiopa sdfghjklyxcvbnm,_,-" android:digits="0,1,2,3,4,5,6,7,8,9,*,qwertzuiopa sdfghjklyxcvbnmQWERTYUIOPLKJHGFDSAZXCVBNM|+-,_,-"
android:maxLines="1" android:maxLines="1"
android:paddingStart="18dp" android:paddingStart="18dp"
android:paddingEnd="15dp" android:paddingEnd="15dp"

View File

@ -75,10 +75,10 @@
<ImageButton <ImageButton
android:id="@+id/pSearchLogo" android:id="@+id/pSearchLogo"
android:layout_width="31dp" android:layout_width="33dp"
android:layout_height="31dp" android:layout_height="33dp"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginStart="15dp" android:layout_marginStart="14dp"
android:background="@xml/gx_ripple_default_round" android:background="@xml/gx_ripple_default_round"
android:contentDescription="@string/GENERAL_TODO" android:contentDescription="@string/GENERAL_TODO"
android:onClick="onLockSecure" android:onClick="onLockSecure"
@ -89,11 +89,21 @@
app:tint="@color/c_lock_tint" app:tint="@color/c_lock_tint"
tools:ignore="RtlSymmetry" /> tools:ignore="RtlSymmetry" />
<View
android:id="@+id/pSearchDivider"
android:layout_width="1px"
android:translationZ="1dp"
android:layout_height="20dp"
android:layout_marginLeft="3dp"
android:layout_gravity="center_vertical"
android:background="@color/c_text_v6"
tools:ignore="RtlSymmetry" />
<com.darkweb.genesissearchengine.appManager.homeManager.homeController.editTextManager <com.darkweb.genesissearchengine.appManager.homeManager.homeController.editTextManager
android:id="@+id/pSearchInput" android:id="@+id/pSearchInput"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginStart="-36dp" android:layout_marginStart="-41dp"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:imeOptions="flagNoExtractUi" android:imeOptions="flagNoExtractUi"
android:layout_marginEnd="5dp" android:layout_marginEnd="5dp"
@ -111,8 +121,9 @@
android:importantForAutofill="no" android:importantForAutofill="no"
android:inputType="textNoSuggestions" android:inputType="textNoSuggestions"
android:maxLines="1" android:maxLines="1"
android:paddingStart="38dp" android:paddingStart="52dp"
android:paddingEnd="15dp" android:paddingEnd="15dp"
android:paddingBottom="2dp"
android:popupElevation="0dp" android:popupElevation="0dp"
android:requiresFadingEdge="horizontal" android:requiresFadingEdge="horizontal"
android:selectAllOnFocus="true" android:selectAllOnFocus="true"
@ -856,7 +867,7 @@
android:id="@+id/pPopupLoadNewTab" android:id="@+id/pPopupLoadNewTab"
layout="@layout/popup_load_new_tab" layout="@layout/popup_load_new_tab"
android:alpha="0" android:alpha="0"
android:translationZ="0dp" android:elevation="5dp"
android:visibility="gone" /> android:visibility="gone" />
<androidx.fragment.app.FragmentContainerView <androidx.fragment.app.FragmentContainerView

View File

@ -54,7 +54,7 @@
android:layout_width="37dp" android:layout_width="37dp"
android:layout_height="37dp" android:layout_height="37dp"
android:layout_marginTop="-1dp" android:layout_marginTop="-1dp"
android:background="@color/button_gray" android:src="@xml/ic_baseline_browser"
android:contentDescription="@string/GENERAL_TODO" android:contentDescription="@string/GENERAL_TODO"
android:textAlignment="center" android:textAlignment="center"
android:textColor="@color/white" android:textColor="@color/white"

View File

@ -221,7 +221,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/clear_alpha" android:background="@color/clear_alpha"
android:translationZ="2dp" android:translationZ="112dp"
android:clickable="true" android:clickable="true"
android:focusable="true" android:focusable="true"
android:contentDescription="@string/GENERAL_TODO" /> android:contentDescription="@string/GENERAL_TODO" />

View File

@ -57,6 +57,7 @@
<color name="c_profile_radial_inner">#2c2b31</color> <color name="c_profile_radial_inner">#2c2b31</color>
<color name="c_profile_radial_outer">#2c2b31</color> <color name="c_profile_radial_outer">#2c2b31</color>
<color name="c_edittext_background">#3c3946</color> <color name="c_edittext_background">#3c3946</color>
<color name="c_border_background_dark">#2c2b31</color>
<color name="c_edittext_background_error">#660b0b</color> <color name="c_edittext_background_error">#660b0b</color>
<color name="c_edittext_background_dark">#24222a</color> <color name="c_edittext_background_dark">#24222a</color>
<color name="c_menu_drop_shadow_05">#00000000</color> <color name="c_menu_drop_shadow_05">#00000000</color>
@ -73,6 +74,7 @@
<color name="c_home_side">#28282a</color> <color name="c_home_side">#28282a</color>
<color name="c_alert_text">#ffffff</color> <color name="c_alert_text">#ffffff</color>
<color name="c_alert_text_inverted">#242B64</color> <color name="c_alert_text_inverted">#242B64</color>
<color name="c_alert_text_inverted_v1">#ffffff</color>
<color name="c_long_button">#3c3946</color> <color name="c_long_button">#3c3946</color>
<color name="c_button_warning">#f65555</color> <color name="c_button_warning">#f65555</color>
<color name="c_rateus_warning">#b3b3b3</color> <color name="c_rateus_warning">#b3b3b3</color>

View File

@ -40,6 +40,7 @@
<color name="c_checkbox_tint">#3385ff</color> <color name="c_checkbox_tint">#3385ff</color>
<color name="c_checkbox_tint_default">#3385ff</color> <color name="c_checkbox_tint_default">#3385ff</color>
<color name="c_border_background">#f9f9f9</color> <color name="c_border_background">#f9f9f9</color>
<color name="c_border_background_dark">#e2e7e9</color>
<color name="c_border_background_divider">#f7f7f7</color> <color name="c_border_background_divider">#f7f7f7</color>
<color name="c_security_popup_background">#f5fff5</color> <color name="c_security_popup_background">#f5fff5</color>
<color name="c_security_popup_divider">#e0ffe0</color> <color name="c_security_popup_divider">#e0ffe0</color>
@ -83,6 +84,7 @@
<color name="c_menu_drop_shadow_25">#25e6e6e6</color> <color name="c_menu_drop_shadow_25">#25e6e6e6</color>
<color name="c_alert_text">#212d45</color> <color name="c_alert_text">#212d45</color>
<color name="c_alert_text_inverted">#ffffff</color> <color name="c_alert_text_inverted">#ffffff</color>
<color name="c_alert_text_inverted_v1">#ffffff</color>
<color name="c_long_button">#7591bd</color> <color name="c_long_button">#7591bd</color>
<color name="c_ripple_light">#e6e6e6</color> <color name="c_ripple_light">#e6e6e6</color>

View File

@ -1,6 +1,6 @@
/* Version */ /* Version */
project.ext.vname = 'Build | Dark-Origin 1.4.2' project.ext.vname = 'Build | Dark-Origin 1.4.4'
project.ext.vcode = 75 project.ext.vcode = 85
project.ext.buildType = 'release' project.ext.buildType = 'release'
/* dimension */ /* dimension */

View File

@ -512,9 +512,42 @@ public class OrbotService extends VpnService implements TorServiceConstants, Orb
super.onCreate(); super.onCreate();
try { try {
if (Build.VERSION.SDK_INT <= 25) {
Intent notificationIntent = new Intent(this, OrbotService.class);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0,
notificationIntent, 0);
Notification notification = new NotificationCompat.Builder(this)
.setSmallIcon(R.mipmap.ic_stat_tor_logo)
.setContentTitle("Starting Genesis")
.setContentIntent(pendingIntent).build();
startForeground(11337, notification);
}else if(Build.VERSION.SDK_INT == 26){
String id = "_channel_01";
int importance = NotificationManager.IMPORTANCE_LOW;
NotificationChannel mChannel = new NotificationChannel(id, "notification", importance);
mChannel.enableLights(true);
Notification notification = new Notification.Builder(getApplicationContext(), id)
.setSmallIcon(R.mipmap.ic_stat_tor_logo)
.setContentTitle("Starting Genesis")
.build();
NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
if (mNotificationManager != null) {
mNotificationManager.createNotificationChannel(mChannel);
mNotificationManager.notify(11337, notification);
}
startForeground(11337, notification);
}
mHandler = new Handler(); mHandler = new Handler();
appBinHome = getFilesDir();//getDir(TorServiceConstants.DIRECTORY_TOR_BINARY, Application.MODE_PRIVATE); appBinHome = getFilesDir();
if (!appBinHome.exists()) if (!appBinHome.exists())
appBinHome.mkdirs(); appBinHome.mkdirs();