mirror of https://github.com/LeOS-GSI/LeOS-Genesis
parent
30a8bd0fcc
commit
ad6da782b3
|
@ -278,7 +278,7 @@ class bookmarkViewController
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onLongPressMenu(View pView) {
|
private void onLongPressMenu(View pView) {
|
||||||
mPopupWindow = helperMethod.onCreateMenu(pView, R.layout.history_bookmark_menu);
|
mPopupWindow = helperMethod.onCreateMenu(pView, R.layout.history_bookmark_menu, status.sSettingLanguageRegion);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onDrawSwipableBackground(Canvas pCanvas, RecyclerView.ViewHolder pViewHolder, float pDX, int pActionState) {
|
private void onDrawSwipableBackground(Canvas pCanvas, RecyclerView.ViewHolder pViewHolder, float pDX, int pActionState) {
|
||||||
|
|
|
@ -62,9 +62,8 @@ public class bridgeController extends AppCompatActivity {
|
||||||
@Override
|
@Override
|
||||||
public void onConfigurationChanged(@NonNull Configuration newConfig) {
|
public void onConfigurationChanged(@NonNull Configuration newConfig) {
|
||||||
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
|
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
|
||||||
if(newConfig.uiMode != getResources().getConfiguration().uiMode){
|
if(activityThemeManager.getInstance().onInitTheme(this)){
|
||||||
activityContextManager.getInstance().onResetTheme();
|
activityContextManager.getInstance().onResetTheme();
|
||||||
activityThemeManager.getInstance().onConfigurationChanged(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
super.onConfigurationChanged(newConfig);
|
super.onConfigurationChanged(newConfig);
|
||||||
|
@ -135,7 +134,7 @@ public class bridgeController extends AppCompatActivity {
|
||||||
public void onUpdateBridges(String pBridge, String pType) {
|
public void onUpdateBridges(String pBridge, String pType) {
|
||||||
if(pBridge.length()>5){
|
if(pBridge.length()>5){
|
||||||
mBridgeModel.onTrigger(bridgeEnums.eBridgeModelCommands.M_CUSTOM_BRIDGE, Arrays.asList(pBridge, pType));
|
mBridgeModel.onTrigger(bridgeEnums.eBridgeModelCommands.M_CUSTOM_BRIDGE, Arrays.asList(pBridge, pType));
|
||||||
mBridgeViewController.onTrigger(bridgeEnums.eBridgeViewCommands.M_INIT_VIEWS, Arrays.asList(status.sBridgeCustomBridge,250, status.sBridgeCustomType));
|
mBridgeViewController.onTrigger(bridgeEnums.eBridgeViewCommands.M_INIT_VIEWS, Arrays.asList(status.sBridgeCustomBridge,250));
|
||||||
}else {
|
}else {
|
||||||
if(status.sBridgeCustomBridge.equals("meek")){
|
if(status.sBridgeCustomBridge.equals("meek")){
|
||||||
mBridgeModel.onTrigger(bridgeEnums.eBridgeModelCommands.M_MEEK_BRIDGE, null);
|
mBridgeModel.onTrigger(bridgeEnums.eBridgeModelCommands.M_MEEK_BRIDGE, null);
|
||||||
|
|
|
@ -18,9 +18,9 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.appcompat.app.AppCompatDelegate;
|
import androidx.appcompat.app.AppCompatDelegate;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
|
||||||
import com.darkweb.genesissearchengine.constants.strings;
|
import com.darkweb.genesissearchengine.constants.strings;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
|
import com.darkweb.genesissearchengine.helperManager.sharedUIMethod;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -51,21 +51,7 @@ class bridgeViewController
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initPostUI(){
|
private void initPostUI(){
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
sharedUIMethod.updateStatusBar(mContext);
|
||||||
Window window = mContext.getWindow();
|
|
||||||
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
|
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) {
|
|
||||||
window.setStatusBarColor(ContextCompat.getColor(mContext, R.color.blue_dark));
|
|
||||||
mContext.getWindow().setStatusBarColor(ContextCompat.getColor(mContext, R.color.landing_ease_blue));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if(AppCompatDelegate.getDefaultNightMode() == AppCompatDelegate.MODE_NIGHT_NO){
|
|
||||||
mContext.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
|
||||||
}
|
|
||||||
mContext.getWindow().setStatusBarColor(ContextCompat.getColor(mContext, R.color.c_background));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void animateColor(TextView p_view, int p_from, int p_to, String p_command, int p_duration){
|
private void animateColor(TextView p_view, int p_from, int p_to, String p_command, int p_duration){
|
||||||
|
@ -107,7 +93,7 @@ class bridgeViewController
|
||||||
mCustomBridgeBlocker.setVisibility(View.GONE);
|
mCustomBridgeBlocker.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initViews(String p_bridge, int p_duration, String pType){
|
private void initViews(String p_bridge, int p_duration){
|
||||||
resetRadioButtons(p_duration);
|
resetRadioButtons(p_duration);
|
||||||
if(p_bridge.equals(strings.BRIDGE_CUSTOM_BRIDGE_OBFS4)){
|
if(p_bridge.equals(strings.BRIDGE_CUSTOM_BRIDGE_OBFS4)){
|
||||||
animateColor(mBridgeObfs, mBridgeObfs.getCurrentTextColor(), mContext.getResources().getColor(R.color.c_text_v1), "textColor", p_duration);
|
animateColor(mBridgeObfs, mBridgeObfs.getCurrentTextColor(), mContext.getResources().getColor(R.color.c_text_v1), "textColor", p_duration);
|
||||||
|
@ -127,13 +113,13 @@ class bridgeViewController
|
||||||
mCustomPort.setText(strings.GENERIC_EMPTY_STR);
|
mCustomPort.setText(strings.GENERIC_EMPTY_STR);
|
||||||
}else {
|
}else {
|
||||||
onEnableCustomBridge();
|
onEnableCustomBridge();
|
||||||
mCustomPort.setText(("(Type) " + pType + " ➔ " + "(Config) "+p_bridge.replace("\n","")));
|
mCustomPort.setText(("(Config) ➔ "+p_bridge.replace("\n","")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onTrigger(bridgeEnums.eBridgeViewCommands p_commands, List<Object> p_data){
|
public void onTrigger(bridgeEnums.eBridgeViewCommands p_commands, List<Object> p_data){
|
||||||
if(p_commands == bridgeEnums.eBridgeViewCommands.M_INIT_VIEWS){
|
if(p_commands == bridgeEnums.eBridgeViewCommands.M_INIT_VIEWS){
|
||||||
initViews((String) p_data.get(0), (int)p_data.get(1), (String) p_data.get(2));
|
initViews((String) p_data.get(0), (int)p_data.get(1));
|
||||||
}
|
}
|
||||||
if(p_commands == bridgeEnums.eBridgeViewCommands.M_ENABLE_CUSTOM_BRIDGE){
|
if(p_commands == bridgeEnums.eBridgeViewCommands.M_ENABLE_CUSTOM_BRIDGE){
|
||||||
onEnableCustomBridge();
|
onEnableCustomBridge();
|
||||||
|
|
|
@ -11,7 +11,7 @@ import com.darkweb.genesissearchengine.dataManager.dataController;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
|
|
||||||
import org.torproject.android.service.wrapper.orbotLocalConstants;
|
import org.torproject.android.proxy.wrapper.orbotLocalConstants;
|
||||||
|
|
||||||
public class externalShortcutController extends AppCompatActivity {
|
public class externalShortcutController extends AppCompatActivity {
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,8 @@ import androidx.coordinatorlayout.widget.CoordinatorLayout;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.recyclerview.widget.ItemTouchHelper;
|
import androidx.recyclerview.widget.ItemTouchHelper;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.constants.strings;
|
import com.darkweb.genesissearchengine.constants.strings;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
|
@ -268,7 +270,7 @@ class historyViewController
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onLongPressMenu(View pView) {
|
private void onLongPressMenu(View pView) {
|
||||||
mPopupWindow = helperMethod.onCreateMenu(pView, R.layout.history_bookmark_menu);
|
mPopupWindow = helperMethod.onCreateMenu(pView, R.layout.history_bookmark_menu, status.sSettingLanguageRegion);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onDrawSwipableBackground(Canvas pCanvas, RecyclerView.ViewHolder pViewHolder, float pDX, int pActionState) {
|
private void onDrawSwipableBackground(Canvas pCanvas, RecyclerView.ViewHolder pViewHolder, float pDX, int pActionState) {
|
||||||
|
|
|
@ -77,7 +77,8 @@ import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessage
|
||||||
import static org.mozilla.geckoview.GeckoSessionSettings.USER_AGENT_MODE_DESKTOP;
|
import static org.mozilla.geckoview.GeckoSessionSettings.USER_AGENT_MODE_DESKTOP;
|
||||||
import static org.mozilla.geckoview.GeckoSessionSettings.USER_AGENT_MODE_MOBILE;
|
import static org.mozilla.geckoview.GeckoSessionSettings.USER_AGENT_MODE_MOBILE;
|
||||||
|
|
||||||
public class geckoSession extends GeckoSession implements GeckoSession.MediaDelegate,GeckoSession.ScrollDelegate,GeckoSession.PermissionDelegate,GeckoSession.ProgressDelegate, GeckoSession.HistoryDelegate,GeckoSession.NavigationDelegate,GeckoSession.ContentDelegate
|
public class
|
||||||
|
geckoSession extends GeckoSession implements GeckoSession.MediaDelegate,GeckoSession.ScrollDelegate,GeckoSession.PermissionDelegate,GeckoSession.ProgressDelegate, GeckoSession.HistoryDelegate,GeckoSession.NavigationDelegate,GeckoSession.ContentDelegate
|
||||||
{
|
{
|
||||||
private eventObserver.eventListener event;
|
private eventObserver.eventListener event;
|
||||||
|
|
||||||
|
@ -128,6 +129,7 @@ public class geckoSession extends GeckoSession implements GeckoSession.MediaDele
|
||||||
setScrollDelegate(this);
|
setScrollDelegate(this);
|
||||||
mDownloadManager = new geckoDownloadManager();
|
mDownloadManager = new geckoDownloadManager();
|
||||||
setPromptDelegate(new geckoPromptView(mContext));
|
setPromptDelegate(new geckoPromptView(mContext));
|
||||||
|
setSelectionActionDelegate(new selectionActionDelegate(mContext, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onDestroy(){
|
public void onDestroy(){
|
||||||
|
@ -408,12 +410,10 @@ public class geckoSession extends GeckoSession implements GeckoSession.MediaDele
|
||||||
if(var2.equals("https://genesishiddentechnologies.com") || var2.startsWith(CONST_GENESIS_URL_CACHED) || var2.startsWith(CONST_GENESIS_URL_CACHED_DARK)){
|
if(var2.equals("https://genesishiddentechnologies.com") || var2.startsWith(CONST_GENESIS_URL_CACHED) || var2.startsWith(CONST_GENESIS_URL_CACHED_DARK)){
|
||||||
if(var2.startsWith(CONST_GENESIS_URL_CACHED_DARK) && (status.sTheme == enums.Theme.THEME_LIGHT || helperMethod.isDayMode(mContext.get()))){
|
if(var2.startsWith(CONST_GENESIS_URL_CACHED_DARK) && (status.sTheme == enums.Theme.THEME_LIGHT || helperMethod.isDayMode(mContext.get()))){
|
||||||
isPageLoading = false;
|
isPageLoading = false;
|
||||||
//stop();
|
|
||||||
event.invokeObserver(null, enums.etype.M_CHANGE_HOME_THEME);
|
event.invokeObserver(null, enums.etype.M_CHANGE_HOME_THEME);
|
||||||
}
|
}
|
||||||
else if(var2.startsWith(CONST_GENESIS_URL_CACHED) && (status.sTheme != enums.Theme.THEME_LIGHT && !helperMethod.isDayMode(mContext.get()))){
|
else if(var2.startsWith(CONST_GENESIS_URL_CACHED) && (status.sTheme != enums.Theme.THEME_LIGHT && !helperMethod.isDayMode(mContext.get()))){
|
||||||
isPageLoading = false;
|
isPageLoading = false;
|
||||||
//stop();
|
|
||||||
event.invokeObserver(null, enums.etype.M_CHANGE_HOME_THEME);
|
event.invokeObserver(null, enums.etype.M_CHANGE_HOME_THEME);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,447 @@
|
||||||
|
package com.darkweb.genesissearchengine.appManager.homeManager.geckoManager;
|
||||||
|
|
||||||
|
import android.annotation.TargetApi;
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.content.ActivityNotFoundException;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.pm.PackageManager;
|
||||||
|
import android.graphics.Matrix;
|
||||||
|
import android.graphics.Rect;
|
||||||
|
import android.graphics.RectF;
|
||||||
|
import android.os.Build;
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.annotation.UiThread;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.ActionMode;
|
||||||
|
import android.view.Menu;
|
||||||
|
import android.view.MenuItem;
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
|
|
||||||
|
import org.mozilla.gecko.util.ThreadUtils;
|
||||||
|
import org.mozilla.geckoview.GeckoSession;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class that implements a basic SelectionActionDelegate. This class is used by GeckoView by
|
||||||
|
* default if the consumer does not explicitly set a SelectionActionDelegate.
|
||||||
|
*
|
||||||
|
* To provide custom actions, extend this class and override the following methods,
|
||||||
|
*
|
||||||
|
* 1) Override {@link #getAllActions} to include custom action IDs in the returned array. This
|
||||||
|
* array must include all actions, available or not, and must not change over the class lifetime.
|
||||||
|
*
|
||||||
|
* 2) Override {@link #isActionAvailable} to return whether a custom action is currently available.
|
||||||
|
*
|
||||||
|
* 3) Override {@link #prepareAction} to set custom title and/or icon for a custom action.
|
||||||
|
*
|
||||||
|
* 4) Override {@link #performAction} to perform a custom action when used.
|
||||||
|
*/
|
||||||
|
@UiThread
|
||||||
|
public class selectionActionDelegate implements ActionMode.Callback,
|
||||||
|
GeckoSession.SelectionActionDelegate {
|
||||||
|
private static final String LOGTAG = "BasicSelectionAction";
|
||||||
|
|
||||||
|
protected static final String ACTION_PROCESS_TEXT = Intent.ACTION_PROCESS_TEXT;
|
||||||
|
|
||||||
|
private static final String[] FLOATING_TOOLBAR_ACTIONS = new String[] {
|
||||||
|
ACTION_CUT, ACTION_COPY, ACTION_PASTE, ACTION_SELECT_ALL, ACTION_PROCESS_TEXT, "SEARCH"
|
||||||
|
};
|
||||||
|
private static final String[] FIXED_TOOLBAR_ACTIONS = new String[] {
|
||||||
|
ACTION_SELECT_ALL, ACTION_CUT, ACTION_COPY, ACTION_PASTE,"SEARCH"
|
||||||
|
};
|
||||||
|
|
||||||
|
protected final @NonNull Activity mActivity;
|
||||||
|
protected final boolean mUseFloatingToolbar;
|
||||||
|
protected final @NonNull Matrix mTempMatrix = new Matrix();
|
||||||
|
protected final @NonNull RectF mTempRect = new RectF();
|
||||||
|
|
||||||
|
private boolean mExternalActionsEnabled;
|
||||||
|
|
||||||
|
protected @Nullable ActionMode mActionMode;
|
||||||
|
protected @Nullable GeckoSession mSession;
|
||||||
|
protected @Nullable Selection mSelection;
|
||||||
|
protected boolean mRepopulatedMenu;
|
||||||
|
|
||||||
|
@TargetApi(Build.VERSION_CODES.M)
|
||||||
|
private class Callback2Wrapper extends ActionMode.Callback2 {
|
||||||
|
@Override
|
||||||
|
public boolean onCreateActionMode(final ActionMode actionMode, final Menu menu) {
|
||||||
|
return selectionActionDelegate.this.onCreateActionMode(actionMode, menu);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onPrepareActionMode(final ActionMode actionMode, final Menu menu) {
|
||||||
|
return selectionActionDelegate.this.onPrepareActionMode(actionMode, menu);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onActionItemClicked(final ActionMode actionMode, final MenuItem menuItem) {
|
||||||
|
return selectionActionDelegate.this.onActionItemClicked(actionMode, menuItem);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroyActionMode(final ActionMode actionMode) {
|
||||||
|
selectionActionDelegate.this.onDestroyActionMode(actionMode);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onGetContentRect(final ActionMode mode, final View view, final Rect outRect) {
|
||||||
|
super.onGetContentRect(mode, view, outRect);
|
||||||
|
selectionActionDelegate.this.onGetContentRect(mode, view, outRect);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("checkstyle:javadocmethod")
|
||||||
|
public selectionActionDelegate(final @NonNull Activity activity) {
|
||||||
|
this(activity, Build.VERSION.SDK_INT >= 23);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("checkstyle:javadocmethod")
|
||||||
|
public selectionActionDelegate(final @NonNull Activity activity,
|
||||||
|
final boolean useFloatingToolbar) {
|
||||||
|
mActivity = activity;
|
||||||
|
mUseFloatingToolbar = useFloatingToolbar;
|
||||||
|
mExternalActionsEnabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set whether to include text actions from other apps in the floating toolbar.
|
||||||
|
*
|
||||||
|
* @param enable True if external actions should be enabled.
|
||||||
|
*/
|
||||||
|
public void enableExternalActions(final boolean enable) {
|
||||||
|
ThreadUtils.assertOnUiThread();
|
||||||
|
mExternalActionsEnabled = enable;
|
||||||
|
|
||||||
|
if (mActionMode != null) {
|
||||||
|
mActionMode.invalidate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get whether text actions from other apps are enabled.
|
||||||
|
*
|
||||||
|
* @return True if external actions are enabled.
|
||||||
|
*/
|
||||||
|
public boolean areExternalActionsEnabled() {
|
||||||
|
return mExternalActionsEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return list of all actions in proper order, regardless of their availability at present.
|
||||||
|
* Override to add to or remove from the default set.
|
||||||
|
*
|
||||||
|
* @return Array of action IDs in proper order.
|
||||||
|
*/
|
||||||
|
protected @NonNull String[] getAllActions() {
|
||||||
|
return mUseFloatingToolbar ? FLOATING_TOOLBAR_ACTIONS
|
||||||
|
: FIXED_TOOLBAR_ACTIONS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return whether an action is presently available. Override to indicate
|
||||||
|
* availability for custom actions.
|
||||||
|
*
|
||||||
|
* @param id Action ID.
|
||||||
|
* @return True if the action is presently available.
|
||||||
|
*/
|
||||||
|
protected boolean isActionAvailable(final @NonNull String id) {
|
||||||
|
if (mSelection == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mExternalActionsEnabled && !mSelection.text.isEmpty() &&
|
||||||
|
ACTION_PROCESS_TEXT.equals(id)) {
|
||||||
|
final PackageManager pm = mActivity.getPackageManager();
|
||||||
|
return pm.resolveActivity(getProcessTextIntent(),
|
||||||
|
PackageManager.MATCH_DEFAULT_ONLY) != null;
|
||||||
|
}
|
||||||
|
if(id.equals("SEARCH")){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return mSelection.isActionAvailable(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides access to whether there are text selection actions available. Override to indicate
|
||||||
|
* availability for custom actions.
|
||||||
|
*
|
||||||
|
* @return True if there are text selection actions available.
|
||||||
|
*/
|
||||||
|
public boolean isActionAvailable() {
|
||||||
|
if (mSelection == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return isActionAvailable(ACTION_PROCESS_TEXT) ||
|
||||||
|
!mSelection.availableActions.isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prepare a menu item corresponding to a certain action. Override to prepare
|
||||||
|
* menu item for custom action.
|
||||||
|
*
|
||||||
|
* @param id Action ID.
|
||||||
|
* @param item New menu item to prepare.
|
||||||
|
*/
|
||||||
|
protected void prepareAction(final @NonNull String id, final @NonNull MenuItem item) {
|
||||||
|
|
||||||
|
switch (id) {
|
||||||
|
case ACTION_CUT:
|
||||||
|
item.setTitle(android.R.string.cut);
|
||||||
|
break;
|
||||||
|
case ACTION_COPY:
|
||||||
|
item.setTitle(android.R.string.copy);
|
||||||
|
break;
|
||||||
|
case "SEARCH":
|
||||||
|
item.setTitle("Search");
|
||||||
|
break;
|
||||||
|
case ACTION_PASTE:
|
||||||
|
item.setTitle(android.R.string.paste);
|
||||||
|
break;
|
||||||
|
case ACTION_SELECT_ALL:
|
||||||
|
item.setTitle(android.R.string.selectAll);
|
||||||
|
break;
|
||||||
|
case ACTION_PROCESS_TEXT:
|
||||||
|
throw new IllegalStateException("Unexpected action");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform the specified action. Override to perform custom actions.
|
||||||
|
*
|
||||||
|
* @param id Action ID.
|
||||||
|
* @param item Nenu item for the action.
|
||||||
|
* @return True if the action was performed.
|
||||||
|
*/
|
||||||
|
protected boolean performAction(final @NonNull String id, final @NonNull MenuItem item) {
|
||||||
|
if (ACTION_PROCESS_TEXT.equals(id)) {
|
||||||
|
try {
|
||||||
|
mActivity.startActivity(item.getIntent());
|
||||||
|
} catch (final ActivityNotFoundException e) {
|
||||||
|
Log.e(LOGTAG, "Cannot perform action", e);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mSelection == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (id.equals("SEARCH")) {
|
||||||
|
activityContextManager.getInstance().getHomeController().onSearchString(mSelection.text);
|
||||||
|
mActionMode.finish();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
mSelection.execute(id);
|
||||||
|
|
||||||
|
// Android behavior is to clear selection on copy.
|
||||||
|
if (ACTION_COPY.equals(id)) {
|
||||||
|
if (mUseFloatingToolbar) {
|
||||||
|
clearSelection();
|
||||||
|
} else {
|
||||||
|
mActionMode.finish();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the current selection object. This object should not be stored as it does not update
|
||||||
|
* when the selection becomes invalid. Stale actions are ignored.
|
||||||
|
*
|
||||||
|
* @return The {@link GeckoSession.SelectionActionDelegate.Selection} attached to the current
|
||||||
|
* action menu. <code>null</code> if no action menu is active.
|
||||||
|
*/
|
||||||
|
public @Nullable Selection getSelection() {
|
||||||
|
return mSelection;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear the current selection, if possible.
|
||||||
|
*/
|
||||||
|
public void clearSelection() {
|
||||||
|
if (mSelection == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isActionAvailable(ACTION_COLLAPSE_TO_END)) {
|
||||||
|
mSelection.collapseToEnd();
|
||||||
|
} else if (isActionAvailable(ACTION_UNSELECT)) {
|
||||||
|
mSelection.unselect();
|
||||||
|
} else {
|
||||||
|
mSelection.hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Intent getProcessTextIntent() {
|
||||||
|
final Intent intent = new Intent(Intent.ACTION_PROCESS_TEXT);
|
||||||
|
intent.addCategory(Intent.CATEGORY_DEFAULT);
|
||||||
|
intent.setType("text/plain");
|
||||||
|
intent.putExtra(Intent.EXTRA_PROCESS_TEXT, mSelection.text);
|
||||||
|
// TODO: implement ability to replace text in Gecko for editable selection (bug 1453137).
|
||||||
|
intent.putExtra(Intent.EXTRA_PROCESS_TEXT_READONLY, true);
|
||||||
|
return intent;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onCreateActionMode(final ActionMode actionMode, final Menu menu) {
|
||||||
|
ThreadUtils.assertOnUiThread();
|
||||||
|
final String[] allActions = getAllActions();
|
||||||
|
for (final String actionId : allActions) {
|
||||||
|
if (isActionAvailable(actionId)) {
|
||||||
|
if (!mUseFloatingToolbar && (
|
||||||
|
Build.VERSION.SDK_INT == 22 || Build.VERSION.SDK_INT == 23)) {
|
||||||
|
// Android bug where onPrepareActionMode is not called initially.
|
||||||
|
onPrepareActionMode(actionMode, menu);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onPrepareActionMode(final ActionMode actionMode, final Menu menu) {
|
||||||
|
ThreadUtils.assertOnUiThread();
|
||||||
|
final String[] allActions = getAllActions();
|
||||||
|
boolean changed = false;
|
||||||
|
|
||||||
|
// Whether we are repopulating an existing menu.
|
||||||
|
mRepopulatedMenu = menu.size() != 0;
|
||||||
|
|
||||||
|
// For each action, see if it's available at present, and if necessary,
|
||||||
|
// add to or remove from menu.
|
||||||
|
for (int i = 0; i < allActions.length; i++) {
|
||||||
|
final String actionId = allActions[i];
|
||||||
|
final int menuId = i + Menu.FIRST;
|
||||||
|
|
||||||
|
if (ACTION_PROCESS_TEXT.equals(actionId)) {
|
||||||
|
if (mExternalActionsEnabled && !mSelection.text.isEmpty()) {
|
||||||
|
menu.addIntentOptions(menuId, menuId, menuId,
|
||||||
|
mActivity.getComponentName(),
|
||||||
|
/* specifiec */ null, getProcessTextIntent(),
|
||||||
|
/* flags */ 0, /* items */ null);
|
||||||
|
changed = true;
|
||||||
|
} else if (menu.findItem(menuId) != null) {
|
||||||
|
menu.removeGroup(menuId);
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isActionAvailable(actionId)) {
|
||||||
|
if (menu.findItem(menuId) == null) {
|
||||||
|
prepareAction(actionId, menu.add(/* group */ Menu.NONE, menuId,
|
||||||
|
menuId, /* title */ ""));
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
} else if (menu.findItem(menuId) != null) {
|
||||||
|
menu.removeItem(menuId);
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return changed;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onActionItemClicked(final ActionMode actionMode, final MenuItem menuItem) {
|
||||||
|
ThreadUtils.assertOnUiThread();
|
||||||
|
MenuItem realMenuItem = null;
|
||||||
|
if (mRepopulatedMenu) {
|
||||||
|
// When we repopulate an existing menu, Android can sometimes give us an old,
|
||||||
|
// deleted MenuItem. Find the current MenuItem that corresponds to the old one.
|
||||||
|
final Menu menu = actionMode.getMenu();
|
||||||
|
final int size = menu.size();
|
||||||
|
for (int i = 0; i < size; i++) {
|
||||||
|
final MenuItem item = menu.getItem(i);
|
||||||
|
if (item == menuItem || (item.getItemId() == menuItem.getItemId() &&
|
||||||
|
item.getTitle().equals(menuItem.getTitle()))) {
|
||||||
|
realMenuItem = item;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
realMenuItem = menuItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (realMenuItem == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
final String[] allActions = getAllActions();
|
||||||
|
return performAction(allActions[realMenuItem.getItemId() - Menu.FIRST], realMenuItem);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroyActionMode(final ActionMode actionMode) {
|
||||||
|
ThreadUtils.assertOnUiThread();
|
||||||
|
if (!mUseFloatingToolbar) {
|
||||||
|
clearSelection();
|
||||||
|
}
|
||||||
|
mSession = null;
|
||||||
|
mSelection = null;
|
||||||
|
mActionMode = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("checkstyle:javadocmethod")
|
||||||
|
public void onGetContentRect(final @Nullable ActionMode mode, final @Nullable View view,
|
||||||
|
final @NonNull Rect outRect) {
|
||||||
|
ThreadUtils.assertOnUiThread();
|
||||||
|
if (mSelection == null || mSelection.clientRect == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
mSession.getClientToScreenMatrix(mTempMatrix);
|
||||||
|
mTempMatrix.mapRect(mTempRect, mSelection.clientRect);
|
||||||
|
mTempRect.roundOut(outRect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TargetApi(Build.VERSION_CODES.M)
|
||||||
|
@Override
|
||||||
|
public void onShowActionRequest(final GeckoSession session, final Selection selection) {
|
||||||
|
ThreadUtils.assertOnUiThread();
|
||||||
|
mSession = session;
|
||||||
|
mSelection = selection;
|
||||||
|
|
||||||
|
if (mActionMode != null) {
|
||||||
|
if (isActionAvailable()) {
|
||||||
|
mActionMode.invalidate();
|
||||||
|
} else {
|
||||||
|
mActionMode.finish();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mUseFloatingToolbar) {
|
||||||
|
mActionMode = mActivity.startActionMode(new Callback2Wrapper(),
|
||||||
|
ActionMode.TYPE_FLOATING);
|
||||||
|
} else {
|
||||||
|
mActionMode = mActivity.startActionMode(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onHideAction(final GeckoSession session, final int reason) {
|
||||||
|
ThreadUtils.assertOnUiThread();
|
||||||
|
if (mActionMode == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (reason) {
|
||||||
|
case HIDE_REASON_ACTIVE_SCROLL:
|
||||||
|
case HIDE_REASON_ACTIVE_SELECTION:
|
||||||
|
case HIDE_REASON_INVISIBLE_SELECTION:
|
||||||
|
if (mUseFloatingToolbar) {
|
||||||
|
// Hide the floating toolbar when scrolling/selecting.
|
||||||
|
mActionMode.finish();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case HIDE_REASON_NO_SELECTION:
|
||||||
|
mActionMode.finish();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.homeManager.homeController;
|
package com.darkweb.genesissearchengine.appManager.homeManager.homeController;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.app.Activity;
|
import android.app.ActivityOptions;
|
||||||
import android.app.DownloadManager;
|
import android.app.DownloadManager;
|
||||||
import android.content.ActivityNotFoundException;
|
import android.content.ActivityNotFoundException;
|
||||||
import android.content.BroadcastReceiver;
|
import android.content.BroadcastReceiver;
|
||||||
|
@ -78,8 +78,10 @@ import org.mozilla.geckoview.GeckoResult;
|
||||||
import org.mozilla.geckoview.GeckoSession;
|
import org.mozilla.geckoview.GeckoSession;
|
||||||
import org.torproject.android.proxy.OrbotService;
|
import org.torproject.android.proxy.OrbotService;
|
||||||
import org.torproject.android.proxy.util.Prefs;
|
import org.torproject.android.proxy.util.Prefs;
|
||||||
import org.torproject.android.service.wrapper.LocaleHelper;
|
import org.torproject.android.proxy.wrapper.LocaleHelper;
|
||||||
import org.torproject.android.service.wrapper.orbotLocalConstants;
|
import org.torproject.android.proxy.wrapper.orbotLocalConstants;
|
||||||
|
|
||||||
|
import java.io.StringWriter;
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
@ -91,6 +93,7 @@ import java.util.Locale;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
|
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
|
||||||
|
import static android.content.Intent.FLAG_ACTIVITY_NO_ANIMATION;
|
||||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_HELP_URL_CACHE;
|
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_HELP_URL_CACHE;
|
||||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_HELP_URL_CACHE_DARK;
|
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_HELP_URL_CACHE_DARK;
|
||||||
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_URL_CACHED;
|
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_URL_CACHED;
|
||||||
|
@ -192,6 +195,19 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.home_view);
|
setContentView(R.layout.home_view);
|
||||||
|
|
||||||
|
Thread.setDefaultUncaughtExceptionHandler((t, e) -> {
|
||||||
|
status.sSettingIsAppStarted = false;
|
||||||
|
finishAndRemoveTask();
|
||||||
|
|
||||||
|
Intent intent = new Intent(this, homeController.class);
|
||||||
|
intent.addFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_NO_ANIMATION);
|
||||||
|
intent.putExtra("crash",true);
|
||||||
|
this.startActivity(intent);
|
||||||
|
this.finish();
|
||||||
|
|
||||||
|
Runtime.getRuntime().exit(0);
|
||||||
|
});
|
||||||
|
|
||||||
initPreFixes();
|
initPreFixes();
|
||||||
activityContextManager.getInstance().setHomeController(this);
|
activityContextManager.getInstance().setHomeController(this);
|
||||||
pluginController.getInstance().initializeAllServices(this);
|
pluginController.getInstance().initializeAllServices(this);
|
||||||
|
@ -279,6 +295,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
initSuggestionView(new ArrayList<>(), strings.GENERIC_EMPTY_STR);
|
initSuggestionView(new ArrayList<>(), strings.GENERIC_EMPTY_STR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void onLoadTabFromTabController(){
|
public void onLoadTabFromTabController(){
|
||||||
|
|
||||||
Object mTempModel = dataController.getInstance().invokeTab(dataEnums.eTabCommands.GET_CURRENT_TAB, null);
|
Object mTempModel = dataController.getInstance().invokeTab(dataEnums.eTabCommands.GET_CURRENT_TAB, null);
|
||||||
|
@ -323,8 +340,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
mHomeViewController.onUpdateSearchBar(model.getSession().getCurrentURL(), false, false, false);
|
mHomeViewController.onUpdateSearchBar(model.getSession().getCurrentURL(), false, false, false);
|
||||||
}
|
}
|
||||||
onLoadTab(model.getSession(),false,true);
|
onLoadTab(model.getSession(),false,true);
|
||||||
//onLoadURL(model.getSession().getCurrentURL());
|
|
||||||
//mGeckoClient.onReload(mGeckoView, this);
|
|
||||||
}else {
|
}else {
|
||||||
onNewIntent(getIntent());
|
onNewIntent(getIntent());
|
||||||
onOpenLinkNewTab(helperMethod.getDomainName(mHomeModel.getSearchEngine()));
|
onOpenLinkNewTab(helperMethod.getDomainName(mHomeModel.getSearchEngine()));
|
||||||
|
@ -366,7 +381,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initLocalLanguage() {
|
private void initLocalLanguage() {
|
||||||
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this),pluginEnums.eLangManager.M_SET_LANGUAGE);
|
pluginController.getInstance().onLanguageInvoke(Arrays.asList(this, status.sSettingLanguage, status.sSettingLanguageRegion, status.mThemeApplying),pluginEnums.eLangManager.M_SET_LANGUAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -464,6 +479,13 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
|
|
||||||
public void initPreFixes() {
|
public void initPreFixes() {
|
||||||
try {
|
try {
|
||||||
|
if(getIntent().getBooleanExtra("crash", false)){
|
||||||
|
new Handler().postDelayed(() ->
|
||||||
|
{
|
||||||
|
pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(homeController.this), M_APPLICATION_CRASH);
|
||||||
|
}, 2000);
|
||||||
|
}
|
||||||
|
|
||||||
if(!status.mThemeApplying){
|
if(!status.mThemeApplying){
|
||||||
orbotLocalConstants.mTorLogsStatus = strings.GENERIC_EMPTY_STR;
|
orbotLocalConstants.mTorLogsStatus = strings.GENERIC_EMPTY_STR;
|
||||||
}
|
}
|
||||||
|
@ -547,6 +569,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
mGeckoClient.initialize(mGeckoView, new geckoViewCallback(), this,false);
|
mGeckoClient.initialize(mGeckoView, new geckoViewCallback(), this,false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void onLoadURL(String url){
|
public void onLoadURL(String url){
|
||||||
if(mGeckoView.getSession()!=null && !mGeckoView.getSession().isOpen()){
|
if(mGeckoView.getSession()!=null && !mGeckoView.getSession().isOpen()){
|
||||||
mGeckoView.getSession().open(mGeckoClient.getmRuntime());
|
mGeckoView.getSession().open(mGeckoClient.getmRuntime());
|
||||||
|
@ -698,7 +721,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_DESTROY);
|
pluginController.getInstance().onOrbotInvoke(Collections.singletonList(status.mThemeApplying), pluginEnums.eOrbotManager.M_DESTROY);
|
||||||
mBackSplash.setImageDrawable(null);
|
mBackSplash.setImageDrawable(null);
|
||||||
mBackSplash.setBackground(null);
|
mBackSplash.setBackground(null);
|
||||||
|
|
||||||
|
@ -965,6 +988,14 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
onLoadURL(url);
|
onLoadURL(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onSearchString(String pString){
|
||||||
|
String validated_url = mHomeModel.urlComplete(pString, mHomeModel.getSearchEngine());
|
||||||
|
pString = validated_url;
|
||||||
|
|
||||||
|
mHomeViewController.onUpdateSearchBar(pString,false,true, false);
|
||||||
|
onLoadURL(pString);
|
||||||
|
}
|
||||||
|
|
||||||
public void onSuggestionInvoked(View view){
|
public void onSuggestionInvoked(View view){
|
||||||
String mVal = ((TextView)view.findViewById(R.id.pURL)).getText().toString();
|
String mVal = ((TextView)view.findViewById(R.id.pURL)).getText().toString();
|
||||||
if(mVal.equals(strings.GENERIC_EMPTY_STR)){
|
if(mVal.equals(strings.GENERIC_EMPTY_STR)){
|
||||||
|
@ -1382,7 +1413,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
isFocusChanging = false;
|
isFocusChanging = false;
|
||||||
isSuggestionSearchOpened = false;
|
isSuggestionSearchOpened = false;
|
||||||
mSearchbar.requestFocus();
|
mSearchbar.requestFocus();
|
||||||
mSearchbar.setText(helperMethod.urlDesigner(mSearchBarPreviousText, this, mSearchbar.getCurrentTextColor()));
|
mSearchbar.setText(helperMethod.urlDesigner(mSearchBarPreviousText, this, mSearchbar.getCurrentTextColor(), status.sTheme));
|
||||||
mSearchbar.selectAll();
|
mSearchbar.selectAll();
|
||||||
mHomeViewController.initSearchBarFocus(true, isKeyboardOpened);
|
mHomeViewController.initSearchBarFocus(true, isKeyboardOpened);
|
||||||
}
|
}
|
||||||
|
@ -1451,7 +1482,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
isFocusChanging = false;
|
isFocusChanging = false;
|
||||||
isSuggestionSearchOpened = false;
|
isSuggestionSearchOpened = false;
|
||||||
mSearchbar.requestFocus();
|
mSearchbar.requestFocus();
|
||||||
mSearchbar.setText(helperMethod.urlDesigner(mSearchBarPreviousText, this, mSearchbar.getCurrentTextColor()));
|
mSearchbar.setText(helperMethod.urlDesigner(mSearchBarPreviousText, this, mSearchbar.getCurrentTextColor(), status.sTheme));
|
||||||
mSearchbar.selectAll();
|
mSearchbar.selectAll();
|
||||||
mHomeViewController.initSearchBarFocus(true, isKeyboardOpened);
|
mHomeViewController.initSearchBarFocus(true, isKeyboardOpened);
|
||||||
}
|
}
|
||||||
|
@ -1536,7 +1567,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onStartApplication(View view){
|
public void onStartApplication(View view){
|
||||||
pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_START_ORBOT);
|
pluginController.getInstance().onOrbotInvoke(Arrays.asList(status.sBridgeCustomBridge, status.sBridgeGatewayManual, status.sBridgeCustomType, status.sBridgeStatus, status.sShowImages, status.sClearOnExit, (String)dataController.getInstance().invokeBridges(dataEnums.eBridgeWebsiteCommands.M_FETCH, null)), pluginEnums.eOrbotManager.M_START_ORBOT);
|
||||||
onInvokeProxyLoading();
|
onInvokeProxyLoading();
|
||||||
mHomeViewController.initHomePage();
|
mHomeViewController.initHomePage();
|
||||||
}
|
}
|
||||||
|
@ -1709,7 +1740,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
}
|
}
|
||||||
else if (menuId == R.id.pMenuQuit)
|
else if (menuId == R.id.pMenuQuit)
|
||||||
{
|
{
|
||||||
pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_DESTROY);
|
pluginController.getInstance().onOrbotInvoke(Collections.singletonList(status.mThemeApplying), pluginEnums.eOrbotManager.M_DESTROY);
|
||||||
|
|
||||||
new Handler().postDelayed(() ->
|
new Handler().postDelayed(() ->
|
||||||
{
|
{
|
||||||
|
@ -1852,6 +1883,8 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_OPEN_URL_IN_NEW_TAB,true));
|
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_OPEN_URL_IN_NEW_TAB,true));
|
||||||
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_POPUP,true));
|
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_POPUP,true));
|
||||||
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_STRING, Arrays.asList(keys.BRIDGE_CUSTOM_TYPE,strings.BRIDGE_CUSTOM_BRIDGE_OBFS4));
|
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_STRING, Arrays.asList(keys.BRIDGE_CUSTOM_TYPE,strings.BRIDGE_CUSTOM_BRIDGE_OBFS4));
|
||||||
|
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.BRIDGE_ENABLES,false));
|
||||||
|
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_GATEWAY_MANUAL,false));
|
||||||
|
|
||||||
|
|
||||||
dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_CLEAR_TAB, null);
|
dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_CLEAR_TAB, null);
|
||||||
|
@ -1869,15 +1902,14 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(this), M_DATA_CLEARED);
|
pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(this), M_DATA_CLEARED);
|
||||||
activityContextManager.getInstance().getHomeController().onClearSettings();
|
activityContextManager.getInstance().getHomeController().onClearSettings();
|
||||||
|
|
||||||
|
|
||||||
status.sSettingIsAppStarted = false;
|
status.sSettingIsAppStarted = false;
|
||||||
finishAndRemoveTask();
|
finishAndRemoveTask();
|
||||||
|
|
||||||
Intent intent = new Intent(this, homeController.class);
|
Intent intent = new Intent(this, homeController.class);
|
||||||
intent.addFlags(FLAG_ACTIVITY_NEW_TASK);
|
intent.addFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_NO_ANIMATION);
|
||||||
this.startActivity(intent);
|
this.startActivity(intent);
|
||||||
overridePendingTransition(R.anim.popup_anim_in, R.anim.popup_anim_out);
|
overridePendingTransition(R.anim.popup_scale_in, R.anim.popup_scale_out);
|
||||||
((Activity) this).finish();
|
this.finish();
|
||||||
|
|
||||||
Runtime.getRuntime().exit(0);
|
Runtime.getRuntime().exit(0);
|
||||||
|
|
||||||
|
@ -2214,7 +2246,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(e_type.equals(enums.etype.on_load_error)){
|
else if(e_type.equals(enums.etype.on_load_error)){
|
||||||
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(homeController.this), pluginEnums.eLangManager.M_SET_LANGUAGE);
|
pluginController.getInstance().onLanguageInvoke(Arrays.asList(homeController.this, status.sSettingLanguage, status.sSettingLanguageRegion, status.mThemeApplying), pluginEnums.eLangManager.M_SET_LANGUAGE);
|
||||||
initLocalLanguage();
|
initLocalLanguage();
|
||||||
mHomeViewController.onPageFinished();
|
mHomeViewController.onPageFinished();
|
||||||
mGeckoClient.onRedrawPixel(homeController.this);
|
mGeckoClient.onRedrawPixel(homeController.this);
|
||||||
|
|
|
@ -48,7 +48,7 @@ import com.example.myapplication.R;
|
||||||
import com.google.android.gms.ads.AdView;
|
import com.google.android.gms.ads.AdView;
|
||||||
import com.google.android.material.appbar.AppBarLayout;
|
import com.google.android.material.appbar.AppBarLayout;
|
||||||
import org.mozilla.geckoview.GeckoView;
|
import org.mozilla.geckoview.GeckoView;
|
||||||
import org.torproject.android.service.wrapper.orbotLocalConstants;
|
import org.torproject.android.proxy.wrapper.orbotLocalConstants;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -493,7 +493,7 @@ class homeViewController
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||||
ColorAnimator oneToTwo = new ColorAnimator(ContextCompat.getColor(mContext, R.color.landing_ease_blue), ContextCompat.getColor(mContext, R.color.green_dark_v2));
|
ColorAnimator oneToTwo = new ColorAnimator(ContextCompat.getColor(mContext, R.color.landing_ease_blue), ContextCompat.getColor(mContext, R.color.green_dark_v2));
|
||||||
|
|
||||||
int mDelay = 1350;
|
int mDelay = 500;
|
||||||
if(status.mThemeApplying || mInstant){
|
if(status.mThemeApplying || mInstant){
|
||||||
mDelay = 0;
|
mDelay = 0;
|
||||||
}
|
}
|
||||||
|
@ -503,8 +503,8 @@ class homeViewController
|
||||||
animator.addUpdateListener(animation ->
|
animator.addUpdateListener(animation ->
|
||||||
{
|
{
|
||||||
float v = (float) animation.getAnimatedValue();
|
float v = (float) animation.getAnimatedValue();
|
||||||
mContext.getWindow().setStatusBarColor(oneToTwo.with(v));
|
mSplashScreen.setAlpha(1-v);
|
||||||
mContext.getWindow().setStatusBarColor(oneToTwo.with(v));
|
mContext.getWindow().setStatusBarColor(oneToTwo.with(v*1f));
|
||||||
mContext.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
mContext.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
||||||
});
|
});
|
||||||
animator.addListener(new AnimatorListenerAdapter() {
|
animator.addListener(new AnimatorListenerAdapter() {
|
||||||
|
@ -526,7 +526,6 @@ class homeViewController
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
animator.start();
|
animator.start();
|
||||||
}else {
|
}else {
|
||||||
mContext.getWindow().setStatusBarColor(ContextCompat.getColor(mContext, R.color.c_background));
|
mContext.getWindow().setStatusBarColor(ContextCompat.getColor(mContext, R.color.c_background));
|
||||||
|
@ -651,8 +650,12 @@ class homeViewController
|
||||||
onClearSelections(false);
|
onClearSelections(false);
|
||||||
mGeckoView.requestFocus();
|
mGeckoView.requestFocus();
|
||||||
mProgressBarIndeterminate.animate().cancel();
|
mProgressBarIndeterminate.animate().cancel();
|
||||||
mProgressBarIndeterminate.animate().setStartDelay(750).setDuration(250).alpha(0).withEndAction(() -> {
|
mProgressBarIndeterminate.animate().setStartDelay(350).setDuration(250).alpha(0).withEndAction(() -> {
|
||||||
mSplashScreen.animate().setDuration(250).setStartDelay(300).alpha(0).withEndAction(() -> {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||||
|
initStatusBarColor(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
mSplashScreen.animate().setDuration(0).setStartDelay(1000).alpha(0).withEndAction(() -> {
|
||||||
mProgressBarIndeterminate.setVisibility(View.GONE);
|
mProgressBarIndeterminate.setVisibility(View.GONE);
|
||||||
mSplashScreen.setClickable(false);
|
mSplashScreen.setClickable(false);
|
||||||
mSplashScreen.setFocusable(false);
|
mSplashScreen.setFocusable(false);
|
||||||
|
@ -671,9 +674,6 @@ class homeViewController
|
||||||
});
|
});
|
||||||
mEvent.invokeObserver(null, enums.etype.M_WELCOME_MESSAGE);
|
mEvent.invokeObserver(null, enums.etype.M_WELCOME_MESSAGE);
|
||||||
mOrbotLogManager.setClickable(false);
|
mOrbotLogManager.setClickable(false);
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
|
||||||
initStatusBarColor(false);
|
|
||||||
}
|
|
||||||
status.sSettingIsAppRestarting = true;
|
status.sSettingIsAppRestarting = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1161,7 +1161,7 @@ class homeViewController
|
||||||
|
|
||||||
if(url.length()<=300){
|
if(url.length()<=300){
|
||||||
url = removeEndingSlash(url);
|
url = removeEndingSlash(url);
|
||||||
mSearchbar.setText(helperMethod.urlDesigner(url, mContext, mSearchbar.getCurrentTextColor()));
|
mSearchbar.setText(helperMethod.urlDesigner(url, mContext, mSearchbar.getCurrentTextColor(), status.sTheme));
|
||||||
mSearchbar.selectAll();
|
mSearchbar.selectAll();
|
||||||
|
|
||||||
if(isTextSelected){
|
if(isTextSelected){
|
||||||
|
@ -1224,6 +1224,7 @@ class homeViewController
|
||||||
}
|
}
|
||||||
|
|
||||||
mProgressBar.setVisibility(View.VISIBLE);
|
mProgressBar.setVisibility(View.VISIBLE);
|
||||||
|
mProgressBar.setAlpha(1);
|
||||||
mProgressBar.animate().cancel();
|
mProgressBar.animate().cancel();
|
||||||
|
|
||||||
if(value != mProgressBar.getProgress()){
|
if(value != mProgressBar.getProgress()){
|
||||||
|
@ -1234,8 +1235,6 @@ class homeViewController
|
||||||
}
|
}
|
||||||
if(value >= 100 || value<=0){
|
if(value >= 100 || value<=0){
|
||||||
mProgressBar.animate().alpha(0).setStartDelay(200).withEndAction(() -> mProgressBar.setProgress(0));
|
mProgressBar.animate().alpha(0).setStartDelay(200).withEndAction(() -> mProgressBar.setProgress(0));
|
||||||
}else {
|
|
||||||
mProgressBar.setAlpha(1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -154,7 +154,7 @@ public class languageController extends AppCompatActivity {
|
||||||
getIntent().putExtra("activity_restarted",((LinearLayoutManager) Objects.requireNonNull(mRecycleView.getLayoutManager())).findFirstCompletelyVisibleItemPosition());
|
getIntent().putExtra("activity_restarted",((LinearLayoutManager) Objects.requireNonNull(mRecycleView.getLayoutManager())).findFirstCompletelyVisibleItemPosition());
|
||||||
helperMethod.restartActivity(getIntent(), this);
|
helperMethod.restartActivity(getIntent(), this);
|
||||||
overridePendingTransition(R.anim.fade_in_lang, R.anim.fade_out_lang);
|
overridePendingTransition(R.anim.fade_in_lang, R.anim.fade_out_lang);
|
||||||
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_SET_LANGUAGE);
|
pluginController.getInstance().onLanguageInvoke(Arrays.asList(this, status.sSettingLanguage, status.sSettingLanguageRegion, status.sTheme), pluginEnums.eLangManager.M_SET_LANGUAGE);
|
||||||
|
|
||||||
if(activityContextManager.getInstance().getSettingController()!=null && !activityContextManager.getInstance().getSettingController().isDestroyed()){
|
if(activityContextManager.getInstance().getSettingController()!=null && !activityContextManager.getInstance().getSettingController().isDestroyed()){
|
||||||
activityContextManager.getInstance().getSettingController().onRedrawXML();
|
activityContextManager.getInstance().getSettingController().onRedrawXML();
|
||||||
|
@ -209,7 +209,7 @@ public class languageController extends AppCompatActivity {
|
||||||
mLanguageViewController.onTrigger(languageEnums.eLanguagevViewController.M_UPDATE_BLOCKER, Collections.singletonList(true));
|
mLanguageViewController.onTrigger(languageEnums.eLanguagevViewController.M_UPDATE_BLOCKER, Collections.singletonList(true));
|
||||||
}
|
}
|
||||||
else if(e_type.equals(languageEnums.eLanguageAdapterCallback.M_SYSTEM_LANGUAGE_SUPPORT_INFO)){
|
else if(e_type.equals(languageEnums.eLanguageAdapterCallback.M_SYSTEM_LANGUAGE_SUPPORT_INFO)){
|
||||||
return pluginController.getInstance().onLanguageInvoke(null, M_SUPPORTED_SYSTEM_LANGUAGE_INFO);
|
return pluginController.getInstance().onLanguageInvoke(Collections.singletonList(status.sSettingLanguage), M_SUPPORTED_SYSTEM_LANGUAGE_INFO);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ import com.darkweb.genesissearchengine.appManager.tabManager.tabEnums;
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
import com.darkweb.genesissearchengine.constants.constants;
|
||||||
import com.darkweb.genesissearchengine.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
import org.torproject.android.service.wrapper.logRowModel;
|
import org.torproject.android.proxy.wrapper.logRowModel;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,8 @@ import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||||
|
|
||||||
import org.torproject.android.service.wrapper.logRowModel;
|
import org.torproject.android.proxy.wrapper.logRowModel;
|
||||||
import org.torproject.android.service.wrapper.orbotLocalConstants;
|
import org.torproject.android.proxy.wrapper.orbotLocalConstants;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
|
@ -2,7 +2,7 @@ package com.darkweb.genesissearchengine.appManager.orbotLogManager;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
import com.darkweb.genesissearchengine.constants.constants;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import org.torproject.android.service.wrapper.logRowModel;
|
import org.torproject.android.proxy.wrapper.logRowModel;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
|
@ -60,9 +60,8 @@ public class orbotController extends AppCompatActivity {
|
||||||
public void onConfigurationChanged(@NonNull Configuration newConfig) {
|
public void onConfigurationChanged(@NonNull Configuration newConfig) {
|
||||||
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
|
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
|
||||||
|
|
||||||
if(newConfig.uiMode != getResources().getConfiguration().uiMode){
|
if(activityThemeManager.getInstance().onInitTheme(this)){
|
||||||
activityContextManager.getInstance().onResetTheme();
|
activityContextManager.getInstance().onResetTheme();
|
||||||
activityThemeManager.getInstance().onConfigurationChanged(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
super.onConfigurationChanged(newConfig);
|
super.onConfigurationChanged(newConfig);
|
||||||
|
@ -152,7 +151,6 @@ public class orbotController extends AppCompatActivity {
|
||||||
public boolean inSignatureArea(MotionEvent ev) {
|
public boolean inSignatureArea(MotionEvent ev) {
|
||||||
float mEventY = ev.getY();
|
float mEventY = ev.getY();
|
||||||
float mEventX = ev.getX();
|
float mEventX = ev.getX();
|
||||||
Log.i("FUCKSSSS", helperMethod.getScreenWidth(this)-ev.getX() + "----" + ev.getX());
|
|
||||||
return mEventY>helperMethod.pxFromDp(500) || mEventX>helperMethod.getScreenWidth(this)-helperMethod.pxFromDp(80);
|
return mEventY>helperMethod.pxFromDp(500) || mEventX>helperMethod.getScreenWidth(this)-helperMethod.pxFromDp(80);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,9 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.orbotManager;
|
package com.darkweb.genesissearchengine.appManager.orbotManager;
|
||||||
|
|
||||||
import android.os.Build;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.Window;
|
|
||||||
import android.view.WindowManager;
|
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.appcompat.app.AppCompatDelegate;
|
import com.darkweb.genesissearchengine.helperManager.sharedUIMethod;
|
||||||
import androidx.core.content.ContextCompat;
|
|
||||||
import com.example.myapplication.R;
|
|
||||||
import com.google.android.material.switchmaterial.SwitchMaterial;
|
import com.google.android.material.switchmaterial.SwitchMaterial;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -34,21 +29,7 @@ class orbotViewController
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initPostUI(){
|
private void initPostUI(){
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
sharedUIMethod.updateStatusBar(mContext);
|
||||||
Window window = mContext.getWindow();
|
|
||||||
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
|
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) {
|
|
||||||
window.setStatusBarColor(mContext.getResources().getColor(R.color.blue_dark));
|
|
||||||
mContext.getWindow().setStatusBarColor(ContextCompat.getColor(mContext, R.color.landing_ease_blue));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if(AppCompatDelegate.getDefaultNightMode() == AppCompatDelegate.MODE_NIGHT_NO){
|
|
||||||
mContext.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
|
|
||||||
}
|
|
||||||
mContext.getWindow().setStatusBarColor(ContextCompat.getColor(mContext, R.color.c_background));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void bridgeSettingsStatus(boolean pStatus){
|
private void bridgeSettingsStatus(boolean pStatus){
|
||||||
|
|
|
@ -128,12 +128,8 @@ public class settingAdvanceController extends AppCompatActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBackPressed() {
|
public void onBackPressed() {
|
||||||
if(mIsChanged){
|
onClose(null);
|
||||||
pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_UPDATE_PRIVACY);
|
|
||||||
activityContextManager.getInstance().getHomeController().initRuntimeSettings();
|
|
||||||
}
|
|
||||||
activityContextManager.getInstance().onRemoveStack(this);
|
activityContextManager.getInstance().onRemoveStack(this);
|
||||||
finish();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*UI Redirection*/
|
/*UI Redirection*/
|
||||||
|
@ -146,7 +142,7 @@ public class settingAdvanceController extends AppCompatActivity {
|
||||||
|
|
||||||
public void onClose(View view){
|
public void onClose(View view){
|
||||||
if(mIsChanged){
|
if(mIsChanged){
|
||||||
pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_UPDATE_PRIVACY);
|
pluginController.getInstance().onOrbotInvoke(Arrays.asList(status.sShowImages, status.sClearOnExit), pluginEnums.eOrbotManager.M_UPDATE_PRIVACY);
|
||||||
activityContextManager.getInstance().getHomeController().initRuntimeSettings();
|
activityContextManager.getInstance().getHomeController().initRuntimeSettings();
|
||||||
}
|
}
|
||||||
finish();
|
finish();
|
||||||
|
|
|
@ -11,6 +11,7 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.appcompat.app.AppCompatDelegate;
|
import androidx.appcompat.app.AppCompatDelegate;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
|
import com.darkweb.genesissearchengine.appManager.bridgeManager.bridgeEnums;
|
||||||
import com.darkweb.genesissearchengine.appManager.helpManager.helpController;
|
import com.darkweb.genesissearchengine.appManager.helpManager.helpController;
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
import com.darkweb.genesissearchengine.constants.constants;
|
||||||
import com.darkweb.genesissearchengine.constants.enums;
|
import com.darkweb.genesissearchengine.constants.enums;
|
||||||
|
@ -216,6 +217,9 @@ public class settingClearController extends AppCompatActivity {
|
||||||
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_POPUP,true));
|
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_POPUP,true));
|
||||||
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_STRING, Arrays.asList(keys.BRIDGE_CUSTOM_TYPE,strings.BRIDGE_CUSTOM_BRIDGE_OBFS4));
|
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_STRING, Arrays.asList(keys.BRIDGE_CUSTOM_TYPE,strings.BRIDGE_CUSTOM_BRIDGE_OBFS4));
|
||||||
|
|
||||||
|
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.BRIDGE_ENABLES,false));
|
||||||
|
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_GATEWAY_MANUAL,false));
|
||||||
|
|
||||||
if(mIsThemeChangable) {
|
if(mIsThemeChangable) {
|
||||||
status.mThemeApplying = true;
|
status.mThemeApplying = true;
|
||||||
onBackPressed();
|
onBackPressed();
|
||||||
|
|
|
@ -69,7 +69,7 @@ public class settingHomeController extends AppCompatActivity
|
||||||
@Override
|
@Override
|
||||||
public void onConfigurationChanged(@NonNull Configuration newConfig) {
|
public void onConfigurationChanged(@NonNull Configuration newConfig) {
|
||||||
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
|
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
|
||||||
if(activityThemeManager.getInstance().onInitTheme(this)){
|
if(activityThemeManager.getInstance().onInitTheme(this) && !status.mThemeApplying){
|
||||||
activityContextManager.getInstance().onResetTheme();
|
activityContextManager.getInstance().onResetTheme();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -83,11 +83,17 @@ public class constants
|
||||||
public static final String CONST_NOTIFICATION_TITLE = "Genesis Browser";
|
public static final String CONST_NOTIFICATION_TITLE = "Genesis Browser";
|
||||||
public static final int CONST_NOTIFICATION_ID_VALUE = 1;
|
public static final int CONST_NOTIFICATION_ID_VALUE = 1;
|
||||||
public static final int CONST_NOTIFICATION_REQUEST_CODE = 0;
|
public static final int CONST_NOTIFICATION_REQUEST_CODE = 0;
|
||||||
|
public static final int mUserEngagementNotificationID = 1001;
|
||||||
|
|
||||||
/*Language CONSTANTS*/
|
/*Language CONSTANTS*/
|
||||||
|
|
||||||
public static final String CONST_LANGUAGE_DEFAULT_LANG = "default";
|
public static final String CONST_LANGUAGE_DEFAULT_LANG = "default";
|
||||||
|
|
||||||
|
/*DOWNLOAD CONSTANTS*/
|
||||||
|
|
||||||
|
public static final String CONST_DOWNLOAD_COMMAND = "N_COMMAND";
|
||||||
|
public static final String CONST_DOWNLOAD_INTENT_KEY = "N_ID";
|
||||||
|
|
||||||
/*Helper CONSTANTS*/
|
/*Helper CONSTANTS*/
|
||||||
|
|
||||||
public static final String CONST_HELP_MODEL_HEADER = "mHeader";
|
public static final String CONST_HELP_MODEL_HEADER = "mHeader";
|
||||||
|
@ -95,6 +101,7 @@ public class constants
|
||||||
public static final String CONST_HELP_MODEL_ICON = "mIcon";
|
public static final String CONST_HELP_MODEL_ICON = "mIcon";
|
||||||
|
|
||||||
/*ENCRYPTION KEY*/
|
/*ENCRYPTION KEY*/
|
||||||
|
|
||||||
public static final String CONST_ENCRYPTION_KEY = "Zr4u7x!A%D*F-JaNdRgUkXp2s5v8y/B?";
|
public static final String CONST_ENCRYPTION_KEY = "Zr4u7x!A%D*F-JaNdRgUkXp2s5v8y/B?";
|
||||||
public static final String CONST_ENCRYPTION_KEY_DATABASE = "Zr4u7x!!A%D*F-JaNdsS@@gUbbp^^5v8y/B?";
|
public static final String CONST_ENCRYPTION_KEY_DATABASE = "Zr4u7x!!A%D*F-JaNdsS@@gUbbp^^5v8y/B?";
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,7 @@ public class status
|
||||||
/*App Status*/
|
/*App Status*/
|
||||||
|
|
||||||
public static boolean sPaidStatus = false;
|
public static boolean sPaidStatus = false;
|
||||||
public static boolean sDeveloperBuild = true;
|
public static boolean sDeveloperBuild = false;
|
||||||
public static int mNotificationID = 1001;
|
|
||||||
|
|
||||||
/*Settings Status*/
|
/*Settings Status*/
|
||||||
public static Locale mSystemLocale = null;
|
public static Locale mSystemLocale = null;
|
||||||
|
|
|
@ -125,6 +125,12 @@ public class dataController
|
||||||
return mReferenceWebsiteDataModel.onTrigger(pCommands, null);
|
return mReferenceWebsiteDataModel.onTrigger(pCommands, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*Trigger Bridges*/
|
||||||
|
|
||||||
|
public Object invokeBridges(dataEnums.eBridgeWebsiteCommands pCommands, List<Object> pData){
|
||||||
|
return mBridgeWebsiteDataModel.onTrigger(pCommands, null);
|
||||||
|
}
|
||||||
|
|
||||||
/*Trigger Preferences*/
|
/*Trigger Preferences*/
|
||||||
|
|
||||||
public Object invokePrefs(dataEnums.ePreferencesCommands pCommands, List<Object> pData){
|
public Object invokePrefs(dataEnums.ePreferencesCommands pCommands, List<Object> pData){
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
package com.darkweb.genesissearchengine;
|
package com.darkweb.genesissearchengine;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.constants.enums;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class eventObserver
|
public class eventObserver
|
||||||
|
|
|
@ -4,12 +4,10 @@ import android.Manifest;
|
||||||
import android.animation.Animator;
|
import android.animation.Animator;
|
||||||
import android.animation.AnimatorListenerAdapter;
|
import android.animation.AnimatorListenerAdapter;
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.app.ActivityManager;
|
|
||||||
import android.app.DownloadManager;
|
import android.app.DownloadManager;
|
||||||
import android.content.ActivityNotFoundException;
|
import android.content.ActivityNotFoundException;
|
||||||
import android.content.ClipData;
|
import android.content.ClipData;
|
||||||
import android.content.ClipboardManager;
|
import android.content.ClipboardManager;
|
||||||
import android.content.ComponentName;
|
|
||||||
import android.content.ContentResolver;
|
import android.content.ContentResolver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
@ -25,7 +23,6 @@ import android.graphics.drawable.Drawable;
|
||||||
import android.graphics.drawable.TransitionDrawable;
|
import android.graphics.drawable.TransitionDrawable;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Environment;
|
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Vibrator;
|
import android.os.Vibrator;
|
||||||
import android.text.SpannableString;
|
import android.text.SpannableString;
|
||||||
|
@ -36,10 +33,8 @@ import android.view.Gravity;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewAnimationUtils;
|
import android.view.ViewAnimationUtils;
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.view.animation.Animation;
|
import android.view.animation.Animation;
|
||||||
import android.view.animation.AnimationUtils;
|
|
||||||
import android.view.animation.RotateAnimation;
|
import android.view.animation.RotateAnimation;
|
||||||
import android.view.inputmethod.InputMethodManager;
|
import android.view.inputmethod.InputMethodManager;
|
||||||
import android.webkit.MimeTypeMap;
|
import android.webkit.MimeTypeMap;
|
||||||
|
@ -53,16 +48,10 @@ import androidx.core.app.ShareCompat;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.core.content.FileProvider;
|
import androidx.core.content.FileProvider;
|
||||||
import androidx.core.graphics.ColorUtils;
|
import androidx.core.graphics.ColorUtils;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
|
||||||
import com.darkweb.genesissearchengine.appManager.homeManager.FakeLauncherActivity;
|
|
||||||
import com.darkweb.genesissearchengine.constants.enums;
|
import com.darkweb.genesissearchengine.constants.enums;
|
||||||
import com.darkweb.genesissearchengine.constants.keys;
|
import com.darkweb.genesissearchengine.constants.keys;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
|
|
||||||
import org.xmlpull.v1.XmlPullParserException;
|
import org.xmlpull.v1.XmlPullParserException;
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
@ -77,7 +66,6 @@ import java.net.URLConnection;
|
||||||
import java.security.Key;
|
import java.security.Key;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Base64;
|
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -86,7 +74,6 @@ import java.util.UUID;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import javax.crypto.Cipher;
|
import javax.crypto.Cipher;
|
||||||
import javax.net.ssl.HttpsURLConnection;
|
import javax.net.ssl.HttpsURLConnection;
|
||||||
import static android.content.Context.LAYOUT_INFLATER_SERVICE;
|
import static android.content.Context.LAYOUT_INFLATER_SERVICE;
|
||||||
|
@ -216,10 +203,10 @@ public class helperMethod
|
||||||
return size.x;
|
return size.x;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static SpannableString urlDesigner(String url, Context pContext, int pDefColor){
|
public static SpannableString urlDesigner(String url, Context pContext, int pDefColor, int pTheme){
|
||||||
|
|
||||||
int mColor = 0;
|
int mColor = 0;
|
||||||
if(status.sTheme == enums.Theme.THEME_DARK){
|
if(pTheme == enums.Theme.THEME_DARK){
|
||||||
mColor = Color.argb(255, 0, 204, 71);
|
mColor = Color.argb(255, 0, 204, 71);
|
||||||
}else {
|
}else {
|
||||||
mColor = Color.argb(255, 0, 153, 54);
|
mColor = Color.argb(255, 0, 153, 54);
|
||||||
|
@ -790,7 +777,7 @@ public class helperMethod
|
||||||
return month + "/" + year + " | " + hour + ":" + minute + ":" + second;
|
return month + "/" + year + " | " + hour + ":" + minute + ":" + second;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static PopupWindow onCreateMenu(View p_view, int p_layout) {
|
public static PopupWindow onCreateMenu(View p_view, int p_layout, String pSettingLanguageRegion) {
|
||||||
PopupWindow popupWindow;
|
PopupWindow popupWindow;
|
||||||
|
|
||||||
LayoutInflater layoutInflater
|
LayoutInflater layoutInflater
|
||||||
|
@ -809,7 +796,7 @@ public class helperMethod
|
||||||
popupWindow.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
popupWindow.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||||
popupWindow.setAnimationStyle(R.style.popup_window_animation);
|
popupWindow.setAnimationStyle(R.style.popup_window_animation);
|
||||||
|
|
||||||
if(status.sSettingLanguageRegion.equals("Ur")){
|
if(pSettingLanguageRegion.equals("Ur")){
|
||||||
popupWindow.showAtLocation(p_view, Gravity.TOP|Gravity.START,0,0);
|
popupWindow.showAtLocation(p_view, Gravity.TOP|Gravity.START,0,0);
|
||||||
}else {
|
}else {
|
||||||
popupWindow.showAtLocation(p_view, Gravity.TOP|Gravity.END,0,0);
|
popupWindow.showAtLocation(p_view, Gravity.TOP|Gravity.END,0,0);
|
||||||
|
|
|
@ -80,9 +80,7 @@ public class adManager
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onAdFailedToLoad(@NonNull LoadAdError var1) {
|
public void onAdFailedToLoad(@NonNull LoadAdError var1) {
|
||||||
Log.i("sadsa","");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
package com.darkweb.genesissearchengine.pluginManager.analyticPluginManager;
|
package com.darkweb.genesissearchengine.pluginManager.analyticPluginManager;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
|
||||||
import com.darkweb.genesissearchengine.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
|
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
|
||||||
import com.flurry.android.FlurryAgent;
|
import com.flurry.android.FlurryAgent;
|
||||||
|
@ -14,17 +12,20 @@ public class analyticManager
|
||||||
/*Private Variables*/
|
/*Private Variables*/
|
||||||
|
|
||||||
private WeakReference<AppCompatActivity> mAppContext;
|
private WeakReference<AppCompatActivity> mAppContext;
|
||||||
|
private boolean mIsDeveloperBuild;
|
||||||
|
|
||||||
/*Initializations*/
|
/*Initializations*/
|
||||||
|
|
||||||
public analyticManager(WeakReference<AppCompatActivity> pAppContext, eventObserver.eventListener pEvent){
|
public analyticManager(WeakReference<AppCompatActivity> pAppContext, eventObserver.eventListener pEvent, boolean pIsDeveloperBuild){
|
||||||
this.mAppContext = pAppContext;
|
this.mAppContext = pAppContext;
|
||||||
|
this.mIsDeveloperBuild = pIsDeveloperBuild;
|
||||||
|
|
||||||
initialize();
|
initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initialize()
|
private void initialize()
|
||||||
{
|
{
|
||||||
if(status.sDeveloperBuild){
|
if(mIsDeveloperBuild){
|
||||||
new FlurryAgent.Builder() .withLogEnabled(true) .build(mAppContext.get().getApplicationContext(), "4C4K4T5ND9RJKT4H47GQ");
|
new FlurryAgent.Builder() .withLogEnabled(true) .build(mAppContext.get().getApplicationContext(), "4C4K4T5ND9RJKT4H47GQ");
|
||||||
}else {
|
}else {
|
||||||
new FlurryAgent.Builder() .withLogEnabled(true) .build(mAppContext.get().getApplicationContext(), "5RQYRV23928K6DXH8VWV");
|
new FlurryAgent.Builder() .withLogEnabled(true) .build(mAppContext.get().getApplicationContext(), "5RQYRV23928K6DXH8VWV");
|
||||||
|
@ -43,6 +44,7 @@ public class analyticManager
|
||||||
public void onTrigger(List<Object> pData, pluginEnums.eAnalyticManager pEventType) {
|
public void onTrigger(List<Object> pData, pluginEnums.eAnalyticManager pEventType) {
|
||||||
if(pEventType.equals(pluginEnums.eAnalyticManager.M_LOG_EVENT))
|
if(pEventType.equals(pluginEnums.eAnalyticManager.M_LOG_EVENT))
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,7 +112,7 @@ public class downloadReciever extends AsyncTask<String, Integer, String> {
|
||||||
.addAction(R.drawable.ic_download, "Cancel",pendingIntent)
|
.addAction(R.drawable.ic_download, "Cancel",pendingIntent)
|
||||||
.setSmallIcon(android.R.drawable.stat_sys_download);
|
.setSmallIcon(android.R.drawable.stat_sys_download);
|
||||||
|
|
||||||
build.setOngoing(Prefs.persistNotifications());
|
// build.setOngoing(Prefs.persistNotifications());
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
NotificationChannel channel = new NotificationChannel(mID + "",
|
NotificationChannel channel = new NotificationChannel(mID + "",
|
||||||
|
|
|
@ -4,10 +4,10 @@ import android.content.res.Configuration;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
|
||||||
import com.darkweb.genesissearchengine.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
|
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
|
@ -21,37 +21,37 @@ public class langManager {
|
||||||
|
|
||||||
/*Initializations*/
|
/*Initializations*/
|
||||||
|
|
||||||
public langManager(AppCompatActivity pAppContext, eventObserver.eventListener pEvent, Locale pLanguage, Locale pSystemLocale) {
|
public langManager(AppCompatActivity pAppContext, eventObserver.eventListener pEvent, Locale pLanguage, Locale pSystemLocale, String pSettingLanguage, String pSettingRegionLanguage, boolean pThemeApplying) {
|
||||||
this.mEvent = pEvent;
|
this.mEvent = pEvent;
|
||||||
this.mLanguage = pLanguage;
|
this.mLanguage = pLanguage;
|
||||||
this.mSystemLocale = pSystemLocale;
|
this.mSystemLocale = pSystemLocale;
|
||||||
|
|
||||||
onInitLanguage(pAppContext);
|
onInitLanguage(pAppContext, pSettingLanguage, pSettingRegionLanguage, pThemeApplying);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean initLocale(){
|
private boolean initLocale(Boolean pThemeApplying){
|
||||||
if(!status.mThemeApplying){
|
if(!pThemeApplying){
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||||
Locale mSystemLocale = Resources.getSystem().getConfiguration().getLocales().get(0);
|
Locale mSystemLocale = Resources.getSystem().getConfiguration().getLocales().get(0);
|
||||||
if(mSystemLocale!=status.mSystemLocale || !mSystemLocale.getLanguage().equals(mLanguage.getLanguage()) ){
|
if(mSystemLocale!=mSystemLocale || !mSystemLocale.getLanguage().equals(mLanguage.getLanguage()) ){
|
||||||
status.mSystemLocale = mSystemLocale;
|
mEvent.invokeObserver(Collections.singletonList(mSystemLocale), pluginEnums.eLangManager.M_UPDATE_LOCAL);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Locale mSystemLocale = Resources.getSystem().getConfiguration().locale;
|
Locale mSystemLocale = Resources.getSystem().getConfiguration().locale;
|
||||||
if(mSystemLocale!=status.mSystemLocale || !mSystemLocale.getLanguage().equals(mLanguage.getLanguage())){
|
if(mSystemLocale!=mSystemLocale || !mSystemLocale.getLanguage().equals(mLanguage.getLanguage())){
|
||||||
status.mSystemLocale = mSystemLocale;
|
mEvent.invokeObserver(Collections.singletonList(mSystemLocale), pluginEnums.eLangManager.M_UPDATE_LOCAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onInitLanguage(AppCompatActivity pAppContext) {
|
private void onInitLanguage(AppCompatActivity pAppContext, String pSettingLanguage, String pSettingRegionLanguage, Boolean pThemeApplying) {
|
||||||
if(status.sSettingLanguage.equals("default")){
|
if(pSettingLanguage.equals("default")){
|
||||||
if(!mLanguage.getLanguage().equals(Resources.getSystem().getConfiguration().locale.getLanguage()) || !mLanguage.getCountry().equals(Resources.getSystem().getConfiguration().locale.getCountry()))
|
if(!mLanguage.getLanguage().equals(Resources.getSystem().getConfiguration().locale.getLanguage()) || !mLanguage.getCountry().equals(Resources.getSystem().getConfiguration().locale.getCountry()))
|
||||||
{
|
{
|
||||||
if(mSystemLocale==null){
|
if(mSystemLocale==null){
|
||||||
initLocale();
|
initLocale(pThemeApplying);
|
||||||
}
|
}
|
||||||
String mSystemLangugage = mSystemLocale.toString();
|
String mSystemLangugage = mSystemLocale.toString();
|
||||||
if(mSystemLangugage.equals("en_US") || mSystemLangugage.equals("de_DE") || mSystemLangugage.equals("ur_UR") || mSystemLangugage.equals("ur_PK") || mSystemLangugage.equals("ca_ES") || mSystemLangugage.equals("zh_CN") || mSystemLangugage.equals("ch_CZ") || mSystemLangugage.equals("nl_NL") || mSystemLangugage.equals("fr_FR") || mSystemLangugage.equals("el_GR") || mSystemLangugage.equals("hu_HU") || mSystemLangugage.equals("in_ID") || mSystemLangugage.equals("it_IT") || mSystemLangugage.equals("ja_JP") || mSystemLangugage.equals("ko_KR") || mSystemLangugage.equals("pt_PT") || mSystemLangugage.equals("ro_RO") || mSystemLangugage.equals("ru_RU") || mSystemLangugage.equals("th_TH") || mSystemLangugage.equals("tr_TR") || mSystemLangugage.equals("uk_UA") || mSystemLangugage.equals("vi_VN")){
|
if(mSystemLangugage.equals("en_US") || mSystemLangugage.equals("de_DE") || mSystemLangugage.equals("ur_UR") || mSystemLangugage.equals("ur_PK") || mSystemLangugage.equals("ca_ES") || mSystemLangugage.equals("zh_CN") || mSystemLangugage.equals("ch_CZ") || mSystemLangugage.equals("nl_NL") || mSystemLangugage.equals("fr_FR") || mSystemLangugage.equals("el_GR") || mSystemLangugage.equals("hu_HU") || mSystemLangugage.equals("in_ID") || mSystemLangugage.equals("it_IT") || mSystemLangugage.equals("ja_JP") || mSystemLangugage.equals("ko_KR") || mSystemLangugage.equals("pt_PT") || mSystemLangugage.equals("ro_RO") || mSystemLangugage.equals("ru_RU") || mSystemLangugage.equals("th_TH") || mSystemLangugage.equals("tr_TR") || mSystemLangugage.equals("uk_UA") || mSystemLangugage.equals("vi_VN")){
|
||||||
|
@ -69,7 +69,7 @@ public class langManager {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
mLanguage = new Locale(status.sSettingLanguage, status.sSettingLanguageRegion);
|
mLanguage = new Locale(pSettingLanguage, pSettingRegionLanguage);
|
||||||
}
|
}
|
||||||
|
|
||||||
Locale.setDefault(mLanguage);
|
Locale.setDefault(mLanguage);
|
||||||
|
@ -81,16 +81,16 @@ public class langManager {
|
||||||
|
|
||||||
/*Helper Methods*/
|
/*Helper Methods*/
|
||||||
|
|
||||||
private void onCreate(AppCompatActivity pActivity) {
|
private void onCreate(AppCompatActivity pActivity, String pSettingLanguage, String pSettingRegionLanguage, Boolean pThemeApplying) {
|
||||||
onInitLanguage(pActivity);
|
onInitLanguage(pActivity, pSettingLanguage, pSettingRegionLanguage, pThemeApplying);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onResume(AppCompatActivity pActivity) {
|
private void onResume(AppCompatActivity pActivity, String pSettingLanguage, String pSettingRegionLanguage, Boolean pThemeApplying) {
|
||||||
onInitLanguage(pActivity);
|
onInitLanguage(pActivity, pSettingLanguage, pSettingRegionLanguage, pThemeApplying);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getSupportedSystemLanguageInfo() {
|
private String getSupportedSystemLanguageInfo(String pSettingLanguage) {
|
||||||
if(status.sSettingLanguage.equals("default")){
|
if(pSettingLanguage.equals("default")){
|
||||||
Locale mSystemLocale = Resources.getSystem().getConfiguration().locale;
|
Locale mSystemLocale = Resources.getSystem().getConfiguration().locale;
|
||||||
String mSystemLangugage = mSystemLocale.toString();
|
String mSystemLangugage = mSystemLocale.toString();
|
||||||
|
|
||||||
|
@ -109,20 +109,20 @@ public class langManager {
|
||||||
public Object onTrigger(List<Object> pData, pluginEnums.eLangManager pEventType) {
|
public Object onTrigger(List<Object> pData, pluginEnums.eLangManager pEventType) {
|
||||||
if(pEventType.equals(pluginEnums.eLangManager.M_ACTIVITY_CREATED))
|
if(pEventType.equals(pluginEnums.eLangManager.M_ACTIVITY_CREATED))
|
||||||
{
|
{
|
||||||
onCreate((AppCompatActivity) pData.get(0));
|
onCreate((AppCompatActivity) pData.get(0), (String)pData.get(1), (String)pData.get(2), (boolean)pData.get(3));
|
||||||
}
|
}
|
||||||
else if(pEventType.equals(pluginEnums.eLangManager.M_RESUME))
|
else if(pEventType.equals(pluginEnums.eLangManager.M_RESUME))
|
||||||
{
|
{
|
||||||
initLocale();
|
initLocale((boolean)pData.get(3));
|
||||||
onResume((AppCompatActivity) pData.get(0));
|
onResume((AppCompatActivity) pData.get(0), (String)pData.get(1), (String)pData.get(2), (boolean)pData.get(3));
|
||||||
}
|
}
|
||||||
else if(pEventType.equals(pluginEnums.eLangManager.M_SET_LANGUAGE))
|
else if(pEventType.equals(pluginEnums.eLangManager.M_SET_LANGUAGE))
|
||||||
{
|
{
|
||||||
onInitLanguage((AppCompatActivity) pData.get(0));
|
onInitLanguage((AppCompatActivity) pData.get(0), (String) pData.get(1), (String) pData.get(2), (boolean)pData.get(3));
|
||||||
}
|
}
|
||||||
else if(pEventType.equals(pluginEnums.eLangManager.M_SUPPORTED_SYSTEM_LANGUAGE_INFO))
|
else if(pEventType.equals(pluginEnums.eLangManager.M_SUPPORTED_SYSTEM_LANGUAGE_INFO))
|
||||||
{
|
{
|
||||||
return getSupportedSystemLanguageInfo();
|
return getSupportedSystemLanguageInfo((String) pData.get(0));
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ import android.graphics.drawable.InsetDrawable;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
|
import android.view.View;
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
|
@ -19,7 +20,6 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
import com.darkweb.genesissearchengine.constants.constants;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
|
||||||
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 com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
|
@ -260,6 +260,12 @@ public class messageManager
|
||||||
mDialog.setOnDismissListener(dialog -> onClearReference());
|
mDialog.setOnDismissListener(dialog -> onClearReference());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void applicationCrashed()
|
||||||
|
{
|
||||||
|
initializeDialog(R.layout.application_crash, Gravity.BOTTOM);
|
||||||
|
mDialog.findViewById(R.id.pDismiss).setOnClickListener(v -> mDialog.dismiss());
|
||||||
|
mDialog.setOnDismissListener(dialog -> onClearReference());
|
||||||
|
}
|
||||||
|
|
||||||
private void openSecureConnectionPopup()
|
private void openSecureConnectionPopup()
|
||||||
{
|
{
|
||||||
|
@ -327,11 +333,14 @@ public class messageManager
|
||||||
|
|
||||||
private void onUpdateBridges()
|
private void onUpdateBridges()
|
||||||
{
|
{
|
||||||
|
String mCustomBridge = (String) mEvent.invokeObserver(null, M_CUSTOM_BRIDGE);
|
||||||
|
String mBridgeType = (String) mEvent.invokeObserver(null, M_BRIDGE_TYPE);
|
||||||
|
|
||||||
initializeDialog(R.layout.popup_update_bridges, Gravity.CENTER);
|
initializeDialog(R.layout.popup_update_bridges, Gravity.CENTER);
|
||||||
mContext.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING);
|
mContext.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING);
|
||||||
if(!status.sBridgeCustomBridge.equals("meek") && !status.sBridgeCustomBridge.equals("obfs4")){
|
if(!mCustomBridge.equals("meek") && !mCustomBridge.equals("obfs4")){
|
||||||
((EditText)mDialog.findViewById(R.id.pBridgeInput)).setText(status.sBridgeCustomBridge);
|
((EditText)mDialog.findViewById(R.id.pBridgeInput)).setText(mCustomBridge);
|
||||||
((EditText)mDialog.findViewById(R.id.pBridgeType)).setText(status.sBridgeCustomType);
|
((EditText)mDialog.findViewById(R.id.pBridgeType)).setText(mBridgeType);
|
||||||
}
|
}
|
||||||
|
|
||||||
mDialog.setOnShowListener(dialog -> mContext.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING));
|
mDialog.setOnShowListener(dialog -> mContext.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING));
|
||||||
|
@ -358,11 +367,41 @@ public class messageManager
|
||||||
handler.postDelayed(runnable, 200);
|
handler.postDelayed(runnable, 200);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
mDialog.findViewById(R.id.mClear).setOnClickListener(v -> {
|
||||||
|
EditText mBridges = mDialog.findViewById(R.id.pBridgeInput);
|
||||||
|
TextView mTextView = mDialog.findViewById(R.id.pDescriptionError);
|
||||||
|
|
||||||
|
mBridges.setText(strings.GENERIC_EMPTY_STR);
|
||||||
|
mTextView.animate().setDuration(250).alpha(0);
|
||||||
|
});
|
||||||
|
|
||||||
mDialog.findViewById(R.id.pNext).setOnClickListener(v -> {
|
mDialog.findViewById(R.id.pNext).setOnClickListener(v -> {
|
||||||
|
String mBridges = ((EditText)mDialog.findViewById(R.id.pBridgeInput)).getText().toString();
|
||||||
|
|
||||||
|
boolean mBridgeTypeExist = !mBridges.contains("obfs3") && !mBridges.contains("obfs4") && !mBridges.contains("fle") && !mBridges.contains("meek");
|
||||||
|
boolean mBridgeSize = mBridges.length()<10 || !mBridges.contains(".") || !mBridges.contains(" ");
|
||||||
|
|
||||||
|
if(mBridgeTypeExist || mBridgeSize){
|
||||||
|
TextView mTextView = mDialog.findViewById(R.id.pDescriptionError);
|
||||||
|
if(mTextView.getAlpha()==0 || mTextView.getAlpha()==1 || mTextView.getVisibility()!=View.VISIBLE){
|
||||||
|
mTextView.setAlpha(0);
|
||||||
|
|
||||||
|
mTextView.setVisibility(View.VISIBLE);
|
||||||
|
mTextView.animate().setDuration(250).alpha(1);
|
||||||
|
if(mBridgeTypeExist){
|
||||||
|
mTextView.setText("➔ Invalid bridge string");
|
||||||
|
}
|
||||||
|
else if(mBridgeSize){
|
||||||
|
mTextView.setText("➔ Invalid bridge type");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
mDialog.dismiss();
|
mDialog.dismiss();
|
||||||
mContext.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
mContext.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||||
helperMethod.hideKeyboard(mContext);
|
helperMethod.hideKeyboard(mContext);
|
||||||
mEvent.invokeObserver(Arrays.asList(((EditText)mDialog.findViewById(R.id.pBridgeInput)).getText().toString(), ((EditText)mDialog.findViewById(R.id.pBridgeType)).getText().toString()), M_SET_BRIDGES);
|
mEvent.invokeObserver(Arrays.asList(mBridges, ((EditText)mDialog.findViewById(R.id.pBridgeType)).getText().toString()), M_SET_BRIDGES);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -675,6 +714,11 @@ public class messageManager
|
||||||
dataClearedSuccessfully();
|
dataClearedSuccessfully();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case M_APPLICATION_CRASH:
|
||||||
|
/*VERIFIED*/
|
||||||
|
applicationCrashed();
|
||||||
|
break;
|
||||||
|
|
||||||
case M_SECURE_CONNECTION:
|
case M_SECURE_CONNECTION:
|
||||||
/*VERIFIED*/
|
/*VERIFIED*/
|
||||||
openSecureConnectionPopup();
|
openSecureConnectionPopup();
|
||||||
|
|
|
@ -10,21 +10,19 @@ import android.content.Intent ;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import androidx.core.app.NotificationCompat;
|
import androidx.core.app.NotificationCompat;
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
|
||||||
import com.darkweb.genesissearchengine.constants.strings;
|
import com.darkweb.genesissearchengine.constants.strings;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
import static com.darkweb.genesissearchengine.constants.constants.mUserEngagementNotificationID;
|
||||||
|
|
||||||
public class localEngagementManager extends BroadcastReceiver {
|
public class localEngagementManager extends BroadcastReceiver {
|
||||||
|
|
||||||
|
|
||||||
public void onReceive (Context context , Intent intent) {
|
public void onReceive (Context context , Intent intent) {
|
||||||
try{
|
try{
|
||||||
final int NOTIFY_ID = status.mNotificationID;
|
final int NOTIFY_ID = mUserEngagementNotificationID;
|
||||||
String pTitle = strings.NOTIFICATION_TITLE;
|
String pTitle = strings.NOTIFICATION_TITLE;
|
||||||
String pBody = strings.NOTIFICATION_BODY[new Random().nextInt(strings.NOTIFICATION_BODY.length)];
|
String pBody = strings.NOTIFICATION_BODY[new Random().nextInt(strings.NOTIFICATION_BODY.length)];
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class notifictionManager
|
||||||
|
|
||||||
private void onNotificationClear(){
|
private void onNotificationClear(){
|
||||||
NotificationManager notificationManager = (NotificationManager) mAppContext.get().getSystemService(Context.NOTIFICATION_SERVICE);
|
NotificationManager notificationManager = (NotificationManager) mAppContext.get().getSystemService(Context.NOTIFICATION_SERVICE);
|
||||||
notificationManager.cancel(status.mNotificationID);
|
notificationManager.cancel(mUserEngagementNotificationID);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onCreateUserEngagementNotification(int pDelay){
|
private void onCreateUserEngagementNotification(int pDelay){
|
||||||
|
|
|
@ -6,11 +6,14 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||||
import org.mozilla.gecko.PrefsHelper;
|
import org.mozilla.gecko.PrefsHelper;
|
||||||
import org.torproject.android.proxy.OrbotService;
|
import org.torproject.android.proxy.OrbotService;
|
||||||
import org.torproject.android.proxy.util.Prefs;
|
import org.torproject.android.proxy.util.Prefs;
|
||||||
import org.torproject.android.service.wrapper.orbotLocalConstants;
|
import org.torproject.android.proxy.wrapper.orbotLocalConstants;
|
||||||
|
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.darkweb.genesissearchengine.constants.*;
|
|
||||||
|
import com.darkweb.genesissearchengine.constants.constants;
|
||||||
|
import com.darkweb.genesissearchengine.constants.keys;
|
||||||
|
import com.darkweb.genesissearchengine.constants.strings;
|
||||||
import com.darkweb.genesissearchengine.eventObserver;
|
import com.darkweb.genesissearchengine.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
|
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
|
||||||
|
|
||||||
|
@ -43,11 +46,12 @@ public class orbotManager
|
||||||
this.mAppContext = null;
|
this.mAppContext = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onStartOrbot(){
|
private void onStartOrbot(String pBridgeCustomBridge, boolean pBridgeGatewayManual, String pBridgeCustomType, boolean pBridgeStatus, int pShowImages, boolean mClearOnExit, String pBridgesDefault){
|
||||||
orbotLocalConstants.mBridges = status.sBridgeCustomBridge;
|
orbotLocalConstants.mBridges = pBridgeCustomBridge;
|
||||||
orbotLocalConstants.mIsManualBridge = status.sBridgeGatewayManual;
|
orbotLocalConstants.mIsManualBridge = pBridgeGatewayManual;
|
||||||
orbotLocalConstants.mManualBridgeType = status.sBridgeCustomType;
|
orbotLocalConstants.mManualBridgeType = pBridgeCustomType;
|
||||||
Prefs.putBridgesEnabled(status.sBridgeStatus);
|
orbotLocalConstants.mBridgesDefault = pBridgesDefault;
|
||||||
|
Prefs.putBridgesEnabled(pBridgeStatus);
|
||||||
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);
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
|
@ -59,7 +63,7 @@ public class orbotManager
|
||||||
mAppContext.get().startService(mServiceIntent);
|
mAppContext.get().startService(mServiceIntent);
|
||||||
}
|
}
|
||||||
|
|
||||||
initializeProxy();
|
initializeProxy(pShowImages, mClearOnExit);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*Helper Methods*/
|
/*Helper Methods*/
|
||||||
|
@ -93,29 +97,15 @@ public class orbotManager
|
||||||
/*Proxy Manager*/
|
/*Proxy Manager*/
|
||||||
|
|
||||||
private void onSetProxy(String url){
|
private void onSetProxy(String url){
|
||||||
/* if(url.contains("genesishiddentechnologies.com")){
|
|
||||||
PrefsHelper.setPref(keys.PROXY_TYPE, 0);
|
|
||||||
PrefsHelper.setPref(keys.PROXY_SOCKS,null);
|
|
||||||
PrefsHelper.setPref(keys.PROXY_SOCKS_PORT, null);
|
|
||||||
PrefsHelper.setPref(keys.PROXY_SOCKS_VERSION,null);
|
|
||||||
PrefsHelper.setPref(keys.PROXY_SOCKS_REMOTE_DNS,null);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
PrefsHelper.setPref(keys.PROXY_TYPE, 1);
|
|
||||||
PrefsHelper.setPref(keys.PROXY_SOCKS,constants.CONST_PROXY_SOCKS);
|
|
||||||
PrefsHelper.setPref(keys.PROXY_SOCKS_PORT, 9050);
|
|
||||||
PrefsHelper.setPref(keys.PROXY_SOCKS_VERSION,constants.CONST_PROXY_SOCKS_VERSION);
|
|
||||||
PrefsHelper.setPref(keys.PROXY_SOCKS_REMOTE_DNS,constants.CONST_PROXY_SOCKS_REMOTE_DNS);
|
|
||||||
} */
|
|
||||||
|
|
||||||
PrefsHelper.setPref(keys.PROXY_TYPE, 1);
|
PrefsHelper.setPref(keys.PROXY_TYPE, 1);
|
||||||
PrefsHelper.setPref(keys.PROXY_SOCKS,constants.CONST_PROXY_SOCKS);
|
PrefsHelper.setPref(keys.PROXY_SOCKS, constants.CONST_PROXY_SOCKS);
|
||||||
PrefsHelper.setPref(keys.PROXY_SOCKS_PORT, 9050);
|
PrefsHelper.setPref(keys.PROXY_SOCKS_PORT, 9050);
|
||||||
PrefsHelper.setPref(keys.PROXY_SOCKS_VERSION,constants.CONST_PROXY_SOCKS_VERSION);
|
PrefsHelper.setPref(keys.PROXY_SOCKS_VERSION,constants.CONST_PROXY_SOCKS_VERSION);
|
||||||
PrefsHelper.setPref(keys.PROXY_SOCKS_REMOTE_DNS,constants.CONST_PROXY_SOCKS_REMOTE_DNS);
|
PrefsHelper.setPref(keys.PROXY_SOCKS_REMOTE_DNS,constants.CONST_PROXY_SOCKS_REMOTE_DNS);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initializeProxy()
|
private void initializeProxy(int pShowImages, boolean mClearOnExit)
|
||||||
{
|
{
|
||||||
PrefsHelper.setPref(keys.PROXY_TYPE, 0);
|
PrefsHelper.setPref(keys.PROXY_TYPE, 0);
|
||||||
PrefsHelper.setPref(keys.PROXY_SOCKS,null);
|
PrefsHelper.setPref(keys.PROXY_SOCKS,null);
|
||||||
|
@ -138,25 +128,26 @@ public class orbotManager
|
||||||
PrefsHelper.setPref("browser.cache.memory.enable",true);
|
PrefsHelper.setPref("browser.cache.memory.enable",true);
|
||||||
PrefsHelper.setPref("browser.cache.disk.capacity",1000);
|
PrefsHelper.setPref("browser.cache.disk.capacity",1000);
|
||||||
|
|
||||||
onUpdatePrivacyPreferences();
|
onUpdatePrivacyPreferences(pShowImages, mClearOnExit);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onUpdatePrivacyPreferences()
|
private void onUpdatePrivacyPreferences(int pShowImages, boolean mClearOnExit)
|
||||||
{
|
{
|
||||||
PrefsHelper.setPref(keys.PROXY_IMAGE, status.sShowImages);
|
PrefsHelper.setPref(keys.PROXY_IMAGE, pShowImages);
|
||||||
|
PrefsHelper.setPref("privacy.clearOnShutdown.cache",mClearOnExit);
|
||||||
|
PrefsHelper.setPref("privacy.clearOnShutdown.downloads",mClearOnExit);
|
||||||
|
PrefsHelper.setPref("privacy.clearOnShutdown.formdata",mClearOnExit);
|
||||||
|
PrefsHelper.setPref("privacy.clearOnShutdown.history",mClearOnExit);
|
||||||
|
PrefsHelper.setPref("privacy.clearOnShutdown.offlineApps",mClearOnExit);
|
||||||
|
PrefsHelper.setPref("privacy.clearOnShutdown.passwords",mClearOnExit);
|
||||||
|
PrefsHelper.setPref("privacy.clearOnShutdown.sessions",mClearOnExit);
|
||||||
|
PrefsHelper.setPref("privacy.clearOnShutdown.siteSettings",mClearOnExit);
|
||||||
|
|
||||||
PrefsHelper.setPref("browser.display.show_image_placeholders",true);
|
PrefsHelper.setPref("browser.display.show_image_placeholders",true);
|
||||||
PrefsHelper.setPref("browser.cache.disk.enable",false);
|
PrefsHelper.setPref("browser.cache.disk.enable",false);
|
||||||
PrefsHelper.setPref("browser.cache.memory.enable",true);
|
PrefsHelper.setPref("browser.cache.memory.enable",true);
|
||||||
PrefsHelper.setPref("browser.cache.disk.capacity",0);
|
PrefsHelper.setPref("browser.cache.disk.capacity",0);
|
||||||
PrefsHelper.setPref("privacy.resistFingerprinting",true);
|
PrefsHelper.setPref("privacy.resistFingerprinting",true);
|
||||||
PrefsHelper.setPref("privacy.clearOnShutdown.cache",status.sClearOnExit);
|
|
||||||
PrefsHelper.setPref("privacy.clearOnShutdown.downloads",status.sClearOnExit);
|
|
||||||
PrefsHelper.setPref("privacy.clearOnShutdown.formdata",status.sClearOnExit);
|
|
||||||
PrefsHelper.setPref("privacy.clearOnShutdown.history",status.sClearOnExit);
|
|
||||||
PrefsHelper.setPref("privacy.clearOnShutdown.offlineApps",status.sClearOnExit);
|
|
||||||
PrefsHelper.setPref("privacy.clearOnShutdown.passwords",status.sClearOnExit);
|
|
||||||
PrefsHelper.setPref("privacy.clearOnShutdown.sessions",status.sClearOnExit);
|
|
||||||
PrefsHelper.setPref("privacy.clearOnShutdown.siteSettings",status.sClearOnExit);
|
|
||||||
PrefsHelper.setPref("privacy.donottrackheader.enabled",false);
|
PrefsHelper.setPref("privacy.donottrackheader.enabled",false);
|
||||||
PrefsHelper.setPref("privacy.donottrackheader.value",1);
|
PrefsHelper.setPref("privacy.donottrackheader.value",1);
|
||||||
PrefsHelper.setPref("network.http.sendRefererHeader", 0);
|
PrefsHelper.setPref("network.http.sendRefererHeader", 0);
|
||||||
|
@ -176,6 +167,10 @@ public class orbotManager
|
||||||
return "Warning | " + orbotLocalConstants.mTorLogsStatus;
|
return "Warning | " + orbotLocalConstants.mTorLogsStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if(orbotLocalConstants.mTorLogsStatus.startsWith("Invalid Configuration")){
|
||||||
|
return orbotLocalConstants.mTorLogsStatus;
|
||||||
|
}
|
||||||
|
|
||||||
if(!logs.contains("Bootstrapped") && !mLogsStarted){
|
if(!logs.contains("Bootstrapped") && !mLogsStarted){
|
||||||
logs = "Initializing Bootstrap";
|
logs = "Initializing Bootstrap";
|
||||||
mLogsStarted = true;
|
mLogsStarted = true;
|
||||||
|
@ -202,8 +197,8 @@ public class orbotManager
|
||||||
return OrbotService.getServiceObject().getProxyStatus();
|
return OrbotService.getServiceObject().getProxyStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onDestroy(){
|
private void onDestroy(boolean pThemeApplying){
|
||||||
if(!status.mThemeApplying) {
|
if(pThemeApplying) {
|
||||||
OrbotService.getServiceObject().onDestroy();
|
OrbotService.getServiceObject().onDestroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -233,11 +228,11 @@ public class orbotManager
|
||||||
}
|
}
|
||||||
else if(pEventType.equals(pluginEnums.eOrbotManager.M_UPDATE_PRIVACY))
|
else if(pEventType.equals(pluginEnums.eOrbotManager.M_UPDATE_PRIVACY))
|
||||||
{
|
{
|
||||||
onUpdatePrivacyPreferences();
|
onUpdatePrivacyPreferences((int) pData.get(0),(boolean) pData.get(1));
|
||||||
}
|
}
|
||||||
else if(pEventType.equals(pluginEnums.eOrbotManager.M_START_ORBOT))
|
else if(pEventType.equals(pluginEnums.eOrbotManager.M_START_ORBOT))
|
||||||
{
|
{
|
||||||
onStartOrbot();
|
onStartOrbot((String) pData.get(0),(boolean) pData.get(1),(String) pData.get(2),(boolean) pData.get(3),(int) pData.get(4),(boolean) pData.get(5),(String) pData.get(6));
|
||||||
}
|
}
|
||||||
else if(pEventType.equals(pluginEnums.eOrbotManager.M_IS_ORBOT_RUNNING))
|
else if(pEventType.equals(pluginEnums.eOrbotManager.M_IS_ORBOT_RUNNING))
|
||||||
{
|
{
|
||||||
|
@ -273,7 +268,7 @@ public class orbotManager
|
||||||
}
|
}
|
||||||
else if(pEventType.equals(pluginEnums.eOrbotManager.M_DESTROY))
|
else if(pEventType.equals(pluginEnums.eOrbotManager.M_DESTROY))
|
||||||
{
|
{
|
||||||
onDestroy();
|
onDestroy((boolean) pData.get(0));
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,8 @@ import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eAdManagerCallbacks.M_SHOW_LOADED_ADS;
|
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eAdManagerCallbacks.M_SHOW_LOADED_ADS;
|
||||||
|
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eLangManager.M_ACTIVITY_CREATED;
|
||||||
|
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eLangManager.M_RESUME;
|
||||||
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.*;
|
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.*;
|
||||||
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManagerCallbacks.*;
|
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManagerCallbacks.*;
|
||||||
|
|
||||||
|
@ -59,7 +61,7 @@ public class pluginController
|
||||||
}
|
}
|
||||||
|
|
||||||
public void preInitialize(homeController context){
|
public void preInitialize(homeController context){
|
||||||
mLangManager = new langManager(context,new langCallback(), new Locale(status.sSettingLanguage), status.mSystemLocale);
|
mLangManager = new langManager(context,new langCallback(), new Locale(status.sSettingLanguage), status.mSystemLocale, status.sSettingLanguage, status.sSettingLanguageRegion, status.mThemeApplying);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initialize(){
|
public void initialize(){
|
||||||
|
@ -79,7 +81,7 @@ public class pluginController
|
||||||
|
|
||||||
mNotificationManager = new notifictionManager(mHomeController,new notificationCallback());
|
mNotificationManager = new notifictionManager(mHomeController,new notificationCallback());
|
||||||
mAdManager = new adManager(new admobCallback(), ((homeController)mHomeController.get()).getBannerAd(), status.sPaidStatus);
|
mAdManager = new adManager(new admobCallback(), ((homeController)mHomeController.get()).getBannerAd(), status.sPaidStatus);
|
||||||
mAnalyticsManager = new analyticManager(mHomeController,new analyticCallback());
|
mAnalyticsManager = new analyticManager(mHomeController,new analyticCallback(), status.sDeveloperBuild);
|
||||||
mMessageManager = new messageManager(new messageCallback());
|
mMessageManager = new messageManager(new messageCallback());
|
||||||
mOrbotManager = orbotManager.getInstance();
|
mOrbotManager = orbotManager.getInstance();
|
||||||
mDownloadManager = new downloadManager(mHomeController,new downloadCallback());
|
mDownloadManager = new downloadManager(mHomeController,new downloadCallback());
|
||||||
|
@ -187,6 +189,11 @@ public class pluginController
|
||||||
if(mLangManager==null){
|
if(mLangManager==null){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(pEventType.equals(M_RESUME) || pEventType.equals(M_ACTIVITY_CREATED)){
|
||||||
|
return mLangManager.onTrigger(Arrays.asList(pData.get(0), status.sSettingLanguage, status.sSettingLanguageRegion, status.mThemeApplying), pEventType);
|
||||||
|
}
|
||||||
|
|
||||||
return mLangManager.onTrigger(pData, pEventType);
|
return mLangManager.onTrigger(pData, pEventType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,6 +201,9 @@ public class pluginController
|
||||||
@Override
|
@Override
|
||||||
public Object invokeObserver(List<Object> data, Object event_type)
|
public Object invokeObserver(List<Object> data, Object event_type)
|
||||||
{
|
{
|
||||||
|
if(event_type.equals(pluginEnums.eLangManager.M_UPDATE_LOCAL)){
|
||||||
|
status.mSystemLocale = (Locale)data.get(0);
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -261,6 +271,12 @@ public class pluginController
|
||||||
else if(pEventType.equals(M_APP_RATED)){
|
else if(pEventType.equals(M_APP_RATED)){
|
||||||
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.PROXY_IS_APP_RATED,true));
|
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.PROXY_IS_APP_RATED,true));
|
||||||
}
|
}
|
||||||
|
else if(pEventType.equals(M_CUSTOM_BRIDGE)){
|
||||||
|
return status.sBridgeCustomBridge;
|
||||||
|
}
|
||||||
|
else if(pEventType.equals(M_BRIDGE_TYPE)){
|
||||||
|
return status.sBridgeCustomType;
|
||||||
|
}
|
||||||
else if(pEventType.equals(M_DOWNLOAD_FILE)){
|
else if(pEventType.equals(M_DOWNLOAD_FILE)){
|
||||||
((homeController)mHomeController.get()).onDownloadFile();
|
((homeController)mHomeController.get()).onDownloadFile();
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ public class pluginEnums
|
||||||
|
|
||||||
/*Lanuage Manager*/
|
/*Lanuage Manager*/
|
||||||
public enum eLangManager{
|
public enum eLangManager{
|
||||||
M_SET_LANGUAGE, M_ACTIVITY_CREATED, M_RESUME, M_SUPPORTED_SYSTEM_LANGUAGE_INFO, M_INIT_LOCALE
|
M_SET_LANGUAGE, M_ACTIVITY_CREATED, M_RESUME, M_SUPPORTED_SYSTEM_LANGUAGE_INFO, M_INIT_LOCALE, M_UPDATE_LOCAL
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum eLangManagerCallbacks{
|
public enum eLangManagerCallbacks{
|
||||||
|
@ -28,10 +28,10 @@ public class pluginEnums
|
||||||
|
|
||||||
/*Message Manager*/
|
/*Message Manager*/
|
||||||
public enum eMessageManager{
|
public enum eMessageManager{
|
||||||
M_RESET, M_DATA_CLEARED, M_SECURE_CONNECTION, M_POPUP_BLOCKED, M_PANIC, M_MAX_TAB_REACHED,M_DOWNLOAD_SINGLE, M_UPDATE_BRIDGES, M_NEW_IDENTITY, M_NOT_SUPPORTED, M_BRIDGE_MAIL, M_LONG_PRESS_WITH_LINK, M_LONG_PRESS_URL, M_LONG_PRESS_DOWNLOAD, M_START_ORBOT, M_DOWNLOAD_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_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_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
|
||||||
}
|
}
|
||||||
|
|
||||||
/*Download Manager*/
|
/*Download Manager*/
|
||||||
|
|
|
@ -7,13 +7,15 @@ import com.darkweb.genesissearchengine.pluginManager.pluginController;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
|
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
|
import static com.darkweb.genesissearchengine.constants.constants.*;
|
||||||
|
|
||||||
public class downloadNotificationReciever extends BroadcastReceiver {
|
public class downloadNotificationReciever extends BroadcastReceiver {
|
||||||
public void onReceive (Context context , Intent intent) {
|
public void onReceive (Context context , Intent intent) {
|
||||||
int mCommand = intent.getExtras().getInt("N_COMMAND");
|
int mCommand = intent.getExtras().getInt(CONST_DOWNLOAD_COMMAND);
|
||||||
if(mCommand==1){
|
if(mCommand==1){
|
||||||
pluginController.getInstance().onDownloadInvoke(Collections.singletonList(intent.getExtras().getInt("N_ID")), pluginEnums.eDownloadManager.M_TRIGGER);
|
pluginController.getInstance().onDownloadInvoke(Collections.singletonList(intent.getExtras().getInt(CONST_DOWNLOAD_INTENT_KEY)), pluginEnums.eDownloadManager.M_TRIGGER);
|
||||||
}else if(mCommand==0 || mCommand==2) {
|
}else if(mCommand==0 || mCommand==2) {
|
||||||
pluginController.getInstance().onDownloadInvoke(Collections.singletonList(intent.getExtras().getInt("N_ID")), pluginEnums.eDownloadManager.M_CANCEL);
|
pluginController.getInstance().onDownloadInvoke(Collections.singletonList(intent.getExtras().getInt(CONST_DOWNLOAD_INTENT_KEY)), pluginEnums.eDownloadManager.M_CANCEL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:fillAfter="true"
|
||||||
|
android:fillEnabled="true">
|
||||||
|
|
||||||
|
<scale
|
||||||
|
android:duration="200"
|
||||||
|
android:fromXScale="0.95"
|
||||||
|
android:fromYScale="0.95"
|
||||||
|
android:pivotX="50%"
|
||||||
|
android:pivotY="50%"
|
||||||
|
android:toXScale="1"
|
||||||
|
android:toYScale="1"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<alpha android:fromAlpha="0"
|
||||||
|
android:toAlpha="1.0"
|
||||||
|
android:interpolator="@android:anim/accelerate_interpolator"
|
||||||
|
android:duration="200"
|
||||||
|
android:repeatCount="0"/>
|
||||||
|
</set>
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:fillAfter="true"
|
||||||
|
android:fillEnabled="true">
|
||||||
|
|
||||||
|
<scale
|
||||||
|
android:duration="250"
|
||||||
|
android:fromXScale="1"
|
||||||
|
android:fromYScale="1"
|
||||||
|
android:pivotX="50%"
|
||||||
|
android:pivotY="50%"
|
||||||
|
android:toXScale="0.95"
|
||||||
|
android:toYScale="0.95"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<alpha android:fromAlpha="1.0"
|
||||||
|
android:toAlpha="0.0"
|
||||||
|
android:interpolator="@android:anim/accelerate_interpolator"
|
||||||
|
android:duration="250"
|
||||||
|
android:repeatCount="0"/>
|
||||||
|
</set>
|
|
@ -10,7 +10,7 @@
|
||||||
<intent
|
<intent
|
||||||
android:action="erase"
|
android:action="erase"
|
||||||
android:targetPackage="com.darkweb.genesissearchengine.production"
|
android:targetPackage="com.darkweb.genesissearchengine.production"
|
||||||
android:targetClass="com.darkweb.genesissearchengine.appManager.externalNavigationManager.externalShortcuts">
|
android:targetClass="com.darkweb.genesissearchengine.appManager.externalCommandManager.externalShortcutController">
|
||||||
<extra android:name="shortcut" android:value="open" />
|
<extra android:name="shortcut" android:value="open" />
|
||||||
</intent>
|
</intent>
|
||||||
</shortcut>
|
</shortcut>
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
<intent
|
<intent
|
||||||
android:action="erase"
|
android:action="erase"
|
||||||
android:targetPackage="com.darkweb.genesissearchengine.production"
|
android:targetPackage="com.darkweb.genesissearchengine.production"
|
||||||
android:targetClass="com.darkweb.genesissearchengine.appManager.externalNavigationManager.externalShortcuts">
|
android:targetClass="com.darkweb.genesissearchengine.appManager.externalCommandManager.externalShortcutController">
|
||||||
<extra android:name="shortcut" android:value="erase_and_open" />
|
<extra android:name="shortcut" android:value="erase_and_open" />
|
||||||
</intent>
|
</intent>
|
||||||
</shortcut>
|
</shortcut>
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
<intent
|
<intent
|
||||||
android:action="erase"
|
android:action="erase"
|
||||||
android:targetPackage="com.darkweb.genesissearchengine.production"
|
android:targetPackage="com.darkweb.genesissearchengine.production"
|
||||||
android:targetClass="com.darkweb.genesissearchengine.appManager.externalNavigationManager.externalShortcuts">
|
android:targetClass="com.darkweb.genesissearchengine.appManager.externalCommandManager.externalShortcutController">
|
||||||
<extra android:name="shortcut" android:value="erase" />
|
<extra android:name="shortcut" android:value="erase" />
|
||||||
</intent>
|
</intent>
|
||||||
</shortcut>
|
</shortcut>
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:color="@color/c_long_button">
|
||||||
|
<item android:id="@android:id/background">
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<gradient
|
||||||
|
android:angle="90"
|
||||||
|
android:endColor="@color/c_long_button"
|
||||||
|
android:startColor="@color/c_long_button"
|
||||||
|
android:type="linear" />
|
||||||
|
<corners android:radius="5.5dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</ripple>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<vector android:height="24dp" android:tint="#3C5C7E"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M21.67,18.17l-5.3,-5.3h-0.99l-2.54,2.54v0.99l5.3,5.3c0.39,0.39 1.02,0.39 1.41,0l2.12,-2.12C22.06,19.2 22.06,18.56 21.67,18.17z"/>
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M17.34,10.19l1.41,-1.41l2.12,2.12c1.17,-1.17 1.17,-3.07 0,-4.24l-3.54,-3.54l-1.41,1.41V1.71L15.22,1l-3.54,3.54l0.71,0.71h2.83l-1.41,1.41l1.06,1.06l-2.89,2.89L7.85,6.48V5.06L4.83,2.04L2,4.87l3.03,3.03h1.41l4.13,4.13l-0.85,0.85H7.6l-5.3,5.3c-0.39,0.39 -0.39,1.02 0,1.41l2.12,2.12c0.39,0.39 1.02,0.39 1.41,0l5.3,-5.3v-2.12l5.15,-5.15L17.34,10.19z"/>
|
||||||
|
</vector>
|
|
@ -0,0 +1,97 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginBottom="20dp">
|
||||||
|
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="15dp"
|
||||||
|
android:layout_marginEnd="15dp"
|
||||||
|
app:cardCornerRadius="5.5dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/pMainLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@xml/hox_rounded_corner">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/pHeader"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:paddingStart="15dp"
|
||||||
|
android:paddingEnd="15dp"
|
||||||
|
android:text="@string/ALERT_CRASH"
|
||||||
|
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
|
||||||
|
android:id="@+id/pDescription"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:alpha="0.6"
|
||||||
|
android:paddingStart="15dp"
|
||||||
|
android:paddingEnd="15dp"
|
||||||
|
android:text="@string/ALERT_CRASH_INFO"
|
||||||
|
android:textAlignment="textStart"
|
||||||
|
android:textColor="@color/c_alert_text"
|
||||||
|
android:textSize="13sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/pHeader"
|
||||||
|
tools:ignore="SmallSp" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/pDivider"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginTop="25dp"
|
||||||
|
android:background="@color/c_view_divier_background"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/pDescription" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/pNavigationContainer"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginTop="25dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/pDescription">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/pDismiss"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@xml/ax_ripple_default_round_bottom"
|
||||||
|
android:padding="0dp"
|
||||||
|
android:paddingStart="15dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:text="@string/ALERT_DISMISS"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textColor="@color/holo_gray"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -22,8 +22,8 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:paddingEnd="15dp"
|
|
||||||
android:paddingStart="15dp"
|
android:paddingStart="15dp"
|
||||||
|
android:paddingEnd="15dp"
|
||||||
android:text="@string/ALERT_UPDATE_BRIDGES"
|
android:text="@string/ALERT_UPDATE_BRIDGES"
|
||||||
android:textAlignment="textStart"
|
android:textAlignment="textStart"
|
||||||
android:textColor="@color/c_text_setting_heading_v2"
|
android:textColor="@color/c_text_setting_heading_v2"
|
||||||
|
@ -38,8 +38,8 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:alpha="0.6"
|
android:alpha="0.6"
|
||||||
android:paddingEnd="15dp"
|
|
||||||
android:paddingStart="15dp"
|
android:paddingStart="15dp"
|
||||||
|
android:paddingEnd="15dp"
|
||||||
android:text="@string/ALERT_UPDATE_BRIDGES_INFO"
|
android:text="@string/ALERT_UPDATE_BRIDGES_INFO"
|
||||||
android:textAlignment="textStart"
|
android:textAlignment="textStart"
|
||||||
android:textColor="@color/c_alert_text"
|
android:textColor="@color/c_alert_text"
|
||||||
|
@ -49,20 +49,39 @@
|
||||||
app:layout_constraintTop_toBottomOf="@+id/pHeader"
|
app:layout_constraintTop_toBottomOf="@+id/pHeader"
|
||||||
tools:ignore="SmallSp" />
|
tools:ignore="SmallSp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/pDescriptionError"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:alpha="0.6"
|
||||||
|
android:paddingStart="15dp"
|
||||||
|
android:paddingEnd="15dp"
|
||||||
|
android:text="➔ Invalid Bridges ( Try Again )"
|
||||||
|
android:textAlignment="textStart"
|
||||||
|
android:textColor="@color/c_button_warning"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:visibility="invisible"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/pBridgeType"
|
||||||
|
tools:ignore="SmallSp" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/pBridgeInput"
|
android:id="@+id/pBridgeInput"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="15dp"
|
||||||
android:layout_marginEnd="10dp"
|
android:layout_marginEnd="48dp"
|
||||||
android:background="@xml/gx_generic_input"
|
android:background="@xml/gx_generic_input"
|
||||||
android:ems="10"
|
|
||||||
android:elevation="3dp"
|
android:elevation="3dp"
|
||||||
android:hint="@string/ALERT_ADD_BRIDGES_HINT"
|
android:ems="10"
|
||||||
|
android:hint="@string/ALERT_ADD_BRIDGES_HINT_V1"
|
||||||
android:importantForAutofill="no"
|
android:importantForAutofill="no"
|
||||||
android:maxLines="1"
|
|
||||||
android:inputType="text"
|
android:inputType="text"
|
||||||
|
android:maxLines="1"
|
||||||
android:padding="7dp"
|
android:padding="7dp"
|
||||||
android:paddingStart="11dp"
|
android:paddingStart="11dp"
|
||||||
android:paddingEnd="8dp"
|
android:paddingEnd="8dp"
|
||||||
|
@ -71,7 +90,7 @@
|
||||||
android:textColorHint="@color/c_text_v2"
|
android:textColorHint="@color/c_text_v2"
|
||||||
android:textCursorDrawable="@xml/gx_search_cursor_state"
|
android:textCursorDrawable="@xml/gx_search_cursor_state"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/pDivider"
|
app:layout_constraintEnd_toStartOf="@+id/mClear"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/pDescription" />
|
app:layout_constraintTop_toBottomOf="@+id/pDescription" />
|
||||||
|
|
||||||
|
@ -82,10 +101,11 @@
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:layout_marginTop="15dp"
|
android:layout_marginTop="15dp"
|
||||||
android:layout_marginEnd="10dp"
|
android:layout_marginEnd="10dp"
|
||||||
|
android:visibility="gone"
|
||||||
android:background="@xml/gx_generic_input"
|
android:background="@xml/gx_generic_input"
|
||||||
android:elevation="3dp"
|
android:elevation="3dp"
|
||||||
android:ems="10"
|
android:ems="10"
|
||||||
android:hint="@string/ALERT_ADD_BRIDGES_TYPE_HINT"
|
android:hint="@string/ALERT_ADD_BRIDGES_TYPE_HINT_V1"
|
||||||
android:importantForAutofill="no"
|
android:importantForAutofill="no"
|
||||||
android:inputType="text"
|
android:inputType="text"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
|
@ -101,15 +121,30 @@
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/pBridgeInput" />
|
app:layout_constraintTop_toBottomOf="@+id/pBridgeInput" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/mClear"
|
||||||
|
android:layout_width="33dp"
|
||||||
|
android:layout_height="33dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="9dp"
|
||||||
|
android:layout_marginBottom="4dp"
|
||||||
|
android:elevation="3dp"
|
||||||
|
android:background="@xml/hox_rounded_corner_splash"
|
||||||
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
|
android:src="@xml/ic_baseline_cross"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/pDescriptionError"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/pDescription" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/pDivider"
|
android:id="@+id/pDivider"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:layout_marginTop="15dp"
|
android:layout_marginTop="10dp"
|
||||||
android:background="@color/c_view_divier_background"
|
android:background="@color/c_view_divier_background"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/pBridgeType" />
|
app:layout_constraintTop_toBottomOf="@+id/pDescriptionError" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/pNavigationContainer"
|
android:id="@+id/pNavigationContainer"
|
||||||
|
|
|
@ -59,13 +59,10 @@
|
||||||
android:layout_weight="1"/>
|
android:layout_weight="1"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="47dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="40dp"
|
||||||
android:padding="0dp"
|
android:paddingStart="8dp"
|
||||||
android:layout_marginEnd="0dp"
|
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginStart="6dp"
|
|
||||||
android:paddingStart="3dp"
|
|
||||||
android:onClick="onOpenInfo"
|
android:onClick="onOpenInfo"
|
||||||
android:background="@xml/gx_ripple_gray_round_left"
|
android:background="@xml/gx_ripple_gray_round_left"
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
|
@ -356,7 +353,6 @@
|
||||||
android:textCursorDrawable="@xml/gx_search_cursor_state"
|
android:textCursorDrawable="@xml/gx_search_cursor_state"
|
||||||
android:id="@+id/pCustomPort"
|
android:id="@+id/pCustomPort"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:textColor="@color/c_text_v1"
|
|
||||||
android:layout_weight="11"
|
android:layout_weight="11"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:onClick="onOpenCustomBridgeUpdater"
|
android:onClick="onOpenCustomBridgeUpdater"
|
||||||
|
@ -369,7 +365,8 @@
|
||||||
android:layout_marginStart="15dp"
|
android:layout_marginStart="15dp"
|
||||||
android:ems="10"
|
android:ems="10"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:textColorHint="@color/c_button_text"
|
android:textColor="@color/c_text_v1"
|
||||||
|
android:textColorHint="@color/c_text_v2"
|
||||||
android:hint="@string/BRIDGE_PORT_HINT"
|
android:hint="@string/BRIDGE_PORT_HINT"
|
||||||
android:textSize="14.5sp"
|
android:textSize="14.5sp"
|
||||||
android:text=""
|
android:text=""
|
||||||
|
@ -381,10 +378,10 @@
|
||||||
android:textSize="13sp"
|
android:textSize="13sp"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_weight="4"
|
android:layout_weight="4"
|
||||||
android:textColor="@color/c_button_text"
|
android:textColor="@color/white"
|
||||||
android:onClick="requestBridges"
|
android:onClick="requestBridges"
|
||||||
android:layout_height="45dp"
|
android:layout_height="45dp"
|
||||||
android:background="@xml/hox_rounded_corner_suggestion_settings"
|
android:background="@xml/hox_rounded_corner_bridge_settings"
|
||||||
android:layout_marginStart="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:text="@string/BRIDGE_REQUEST" />
|
android:text="@string/BRIDGE_REQUEST" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -462,9 +462,9 @@
|
||||||
android:background="@xml/hox_rounded_corner_splash_right"
|
android:background="@xml/hox_rounded_corner_splash_right"
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
android:onClick="panicExit"
|
android:onClick="panicExit"
|
||||||
android:padding="5dp"
|
android:padding="6dp"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:src="@xml/ic_baseline_error_home_v1"
|
android:src="@xml/ic_baseline_repair"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
|
|
@ -55,16 +55,13 @@
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="47dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="40dp"
|
||||||
|
android:paddingStart="8dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginStart="6dp"
|
android:onClick="onOpenInfo"
|
||||||
android:layout_marginEnd="0dp"
|
|
||||||
android:background="@xml/gx_ripple_gray_round_left"
|
android:background="@xml/gx_ripple_gray_round_left"
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
android:onClick="onOpenInfo"
|
|
||||||
android:padding="0dp"
|
|
||||||
android:paddingStart="3dp"
|
|
||||||
android:src="@xml/ic_info"
|
android:src="@xml/ic_info"
|
||||||
app:tint="@color/c_icon_tint_light" />
|
app:tint="@color/c_icon_tint_light" />
|
||||||
|
|
||||||
|
|
|
@ -51,13 +51,10 @@
|
||||||
android:layout_weight="1"/>
|
android:layout_weight="1"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="47dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="40dp"
|
||||||
android:padding="0dp"
|
android:paddingStart="8dp"
|
||||||
android:layout_marginEnd="0dp"
|
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginStart="6dp"
|
|
||||||
android:paddingStart="7dp"
|
|
||||||
android:onClick="onOpenInfo"
|
android:onClick="onOpenInfo"
|
||||||
android:background="@xml/gx_ripple_gray_round_left"
|
android:background="@xml/gx_ripple_gray_round_left"
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
|
@ -237,12 +234,12 @@
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:layout_marginBottom="0dp"
|
android:layout_marginBottom="0dp"
|
||||||
android:onClick="onClose"
|
android:clickable="false"
|
||||||
|
android:focusable="false"
|
||||||
android:paddingTop="2dp"
|
android:paddingTop="2dp"
|
||||||
android:layout_marginTop="-3dp"
|
android:layout_marginTop="-3dp"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:src="@xml/ic_gear"
|
android:src="@xml/ic_gear"
|
||||||
android:background="?attr/selectableItemBackgroundBorderless"
|
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
app:tint="@color/c_navigation_tint" />
|
app:tint="@color/c_navigation_tint" />
|
||||||
|
|
||||||
|
@ -251,6 +248,7 @@
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="40"
|
android:layout_weight="40"
|
||||||
|
android:layout_marginTop="1dp"
|
||||||
android:textColor="@color/c_text_v1"
|
android:textColor="@color/c_text_v1"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:text="@string/ORBOT_SETTING_CUSTOM_BRIDGE"
|
android:text="@string/ORBOT_SETTING_CUSTOM_BRIDGE"
|
||||||
|
@ -261,7 +259,7 @@
|
||||||
android:layout_height="30dp"
|
android:layout_height="30dp"
|
||||||
android:layout_marginStart="20dp"
|
android:layout_marginStart="20dp"
|
||||||
android:layout_marginBottom="0dp"
|
android:layout_marginBottom="0dp"
|
||||||
android:layout_marginTop="-5dp"
|
android:layout_marginTop="-4dp"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:padding="2dp"
|
android:padding="2dp"
|
||||||
|
|
|
@ -50,16 +50,14 @@
|
||||||
android:layout_weight="1" />
|
android:layout_weight="1" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="45dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="45dp"
|
android:layout_height="40dp"
|
||||||
|
android:paddingStart="8dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginStart="6dp"
|
|
||||||
android:layout_marginEnd="4dp"
|
|
||||||
android:background="@xml/gx_ripple_default_round"
|
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
|
||||||
android:onClick="onOpenInfo"
|
android:onClick="onOpenInfo"
|
||||||
android:padding="9dp"
|
android:background="@xml/gx_ripple_gray_round_left"
|
||||||
android:src="@xml/ic_gear"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
|
android:src="@xml/ic_info"
|
||||||
app:tint="@color/c_icon_tint_light" />
|
app:tint="@color/c_icon_tint_light" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -60,13 +60,10 @@
|
||||||
android:layout_weight="1"/>
|
android:layout_weight="1"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="47dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="40dp"
|
||||||
android:padding="0dp"
|
android:paddingStart="8dp"
|
||||||
android:layout_marginEnd="0dp"
|
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginStart="6dp"
|
|
||||||
android:paddingStart="7dp"
|
|
||||||
android:onClick="onOpenInfo"
|
android:onClick="onOpenInfo"
|
||||||
android:background="@xml/gx_ripple_gray_round_left"
|
android:background="@xml/gx_ripple_gray_round_left"
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
|
|
|
@ -59,13 +59,10 @@
|
||||||
android:layout_weight="1"/>
|
android:layout_weight="1"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="47dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="40dp"
|
||||||
android:padding="0dp"
|
android:paddingStart="8dp"
|
||||||
android:layout_marginEnd="0dp"
|
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginStart="6dp"
|
|
||||||
android:paddingStart="7dp"
|
|
||||||
android:onClick="onOpenInfo"
|
android:onClick="onOpenInfo"
|
||||||
android:background="@xml/gx_ripple_gray_round_left"
|
android:background="@xml/gx_ripple_gray_round_left"
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
|
|
|
@ -59,16 +59,13 @@
|
||||||
android:layout_weight="1" />
|
android:layout_weight="1" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="47dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="40dp"
|
||||||
|
android:paddingStart="8dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginStart="6dp"
|
android:onClick="onOpenInfo"
|
||||||
android:layout_marginEnd="0dp"
|
|
||||||
android:background="@xml/gx_ripple_gray_round_left"
|
android:background="@xml/gx_ripple_gray_round_left"
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
android:onClick="onOpenInfo"
|
|
||||||
android:padding="0dp"
|
|
||||||
android:paddingStart="7dp"
|
|
||||||
android:src="@xml/ic_info"
|
android:src="@xml/ic_info"
|
||||||
app:tint="@color/c_icon_tint_light" />
|
app:tint="@color/c_icon_tint_light" />
|
||||||
|
|
||||||
|
|
|
@ -60,13 +60,10 @@
|
||||||
android:layout_weight="1"/>
|
android:layout_weight="1"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="47dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="40dp"
|
||||||
android:padding="0dp"
|
android:paddingStart="8dp"
|
||||||
android:layout_marginEnd="0dp"
|
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginStart="6dp"
|
|
||||||
android:paddingStart="7dp"
|
|
||||||
android:onClick="onOpenInfo"
|
android:onClick="onOpenInfo"
|
||||||
android:background="@xml/gx_ripple_gray_round_left"
|
android:background="@xml/gx_ripple_gray_round_left"
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
|
|
|
@ -58,13 +58,10 @@
|
||||||
android:layout_weight="1"/>
|
android:layout_weight="1"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="47dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="40dp"
|
||||||
android:padding="0dp"
|
android:paddingStart="8dp"
|
||||||
android:layout_marginEnd="0dp"
|
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginStart="6dp"
|
|
||||||
android:paddingStart="7dp"
|
|
||||||
android:onClick="onOpenInfo"
|
android:onClick="onOpenInfo"
|
||||||
android:background="@xml/gx_ripple_gray_round_left"
|
android:background="@xml/gx_ripple_gray_round_left"
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
|
|
|
@ -57,13 +57,10 @@
|
||||||
android:layout_weight="1"/>
|
android:layout_weight="1"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="47dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="40dp"
|
||||||
android:padding="0dp"
|
android:paddingStart="8dp"
|
||||||
android:layout_marginEnd="0dp"
|
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginStart="6dp"
|
|
||||||
android:paddingStart="7dp"
|
|
||||||
android:onClick="onOpenInfo"
|
android:onClick="onOpenInfo"
|
||||||
android:background="@xml/gx_ripple_gray_round_left"
|
android:background="@xml/gx_ripple_gray_round_left"
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
|
|
|
@ -58,13 +58,10 @@
|
||||||
android:layout_weight="1"/>
|
android:layout_weight="1"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="47dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="40dp"
|
||||||
android:padding="0dp"
|
android:paddingStart="8dp"
|
||||||
android:layout_marginEnd="0dp"
|
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginStart="6dp"
|
|
||||||
android:paddingStart="7dp"
|
|
||||||
android:onClick="onOpenInfo"
|
android:onClick="onOpenInfo"
|
||||||
android:background="@xml/gx_ripple_gray_round_left"
|
android:background="@xml/gx_ripple_gray_round_left"
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
|
|
|
@ -58,13 +58,10 @@
|
||||||
android:layout_weight="1"/>
|
android:layout_weight="1"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="47dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="40dp"
|
||||||
android:padding="0dp"
|
android:paddingStart="8dp"
|
||||||
android:layout_marginEnd="0dp"
|
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginStart="6dp"
|
|
||||||
android:paddingStart="7dp"
|
|
||||||
android:onClick="onOpenInfo"
|
android:onClick="onOpenInfo"
|
||||||
android:background="@xml/gx_ripple_gray_round_left"
|
android:background="@xml/gx_ripple_gray_round_left"
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
|
|
|
@ -60,18 +60,16 @@
|
||||||
android:layout_weight="1"/>
|
android:layout_weight="1"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="47dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="40dp"
|
||||||
android:padding="0dp"
|
android:paddingStart="8dp"
|
||||||
android:layout_marginEnd="0dp"
|
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginStart="6dp"
|
|
||||||
android:paddingStart="7dp"
|
|
||||||
android:onClick="onOpenInfo"
|
android:onClick="onOpenInfo"
|
||||||
android:background="@xml/gx_ripple_gray_round_left"
|
android:background="@xml/gx_ripple_gray_round_left"
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
android:src="@xml/ic_info"
|
android:src="@xml/ic_info"
|
||||||
app:tint="@color/c_icon_tint_light" />
|
app:tint="@color/c_icon_tint_light" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- Title Header -->
|
<!-- Title Header -->
|
||||||
|
|
|
@ -58,15 +58,11 @@
|
||||||
android:layout_weight="1"/>
|
android:layout_weight="1"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="47dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="40dp"
|
||||||
android:padding="0dp"
|
android:paddingStart="8dp"
|
||||||
android:layout_marginEnd="0dp"
|
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginStart="6dp"
|
|
||||||
android:paddingStart="7dp"
|
|
||||||
android:onClick="onOpenInfo"
|
android:onClick="onOpenInfo"
|
||||||
android:autoMirrored="true"
|
|
||||||
android:background="@xml/gx_ripple_gray_round_left"
|
android:background="@xml/gx_ripple_gray_round_left"
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
android:src="@xml/ic_info"
|
android:src="@xml/ic_info"
|
||||||
|
|
|
@ -83,5 +83,6 @@
|
||||||
<color name="c_list_remove_back">#0f0f0f</color>
|
<color name="c_list_remove_back">#0f0f0f</color>
|
||||||
<color name="c_list_alpha_black">#90000000</color>
|
<color name="c_list_alpha_black">#90000000</color>
|
||||||
<color name="c_ripple_light">#d9d9d9</color>
|
<color name="c_ripple_light">#d9d9d9</color>
|
||||||
|
<color name="green_dark_v2">#1c1b21</color>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -130,7 +130,7 @@
|
||||||
<color name="green_button">#00b33c</color>
|
<color name="green_button">#00b33c</color>
|
||||||
<color name="green_dark">#212d45</color>
|
<color name="green_dark">#212d45</color>
|
||||||
<color name="green_dark_v1">#0A1727</color>
|
<color name="green_dark_v1">#0A1727</color>
|
||||||
<color name="green_dark_v2">#f0f5ff</color>
|
<color name="green_dark_v2">#fafcff</color>
|
||||||
<color name="dark_purple">#ffffff</color>
|
<color name="dark_purple">#ffffff</color>
|
||||||
<color name="warning">#ffc107</color>
|
<color name="warning">#ffc107</color>
|
||||||
<color name="connectors">#ffffff</color>
|
<color name="connectors">#ffffff</color>
|
||||||
|
|
|
@ -210,8 +210,8 @@
|
||||||
<!-- Alerts -->
|
<!-- Alerts -->
|
||||||
<string name="ALERT_UPDATE_BRIDGES" translatable="true">Provide a Bridge I know</string>
|
<string name="ALERT_UPDATE_BRIDGES" translatable="true">Provide a Bridge I know</string>
|
||||||
<string name="ALERT_UPDATE_BRIDGES_INFO" translatable="true">Enter bridge information from a trusted source</string>
|
<string name="ALERT_UPDATE_BRIDGES_INFO" translatable="true">Enter bridge information from a trusted source</string>
|
||||||
<string name="ALERT_ADD_BRIDGES_HINT" translatable="true">bridge string (obfs4 212.21.66.66:20621 ...)</string>
|
<string name="ALERT_ADD_BRIDGES_HINT_V1" translatable="true">bridge string (obfs4 212.21.66.66:20621 ...)</string>
|
||||||
<string name="ALERT_ADD_BRIDGES_TYPE_HINT" translatable="true">bridge type (obfs4, meek, ...)</string>
|
<string name="ALERT_ADD_BRIDGES_TYPE_HINT_V1" translatable="true">bridge type (obfs4, meek, ...)</string>
|
||||||
<string name="ALERT_REQUEST_BRIDGE" translatable="true">Request</string>
|
<string name="ALERT_REQUEST_BRIDGE" translatable="true">Request</string>
|
||||||
<string name="ALERT_SAVE_BRIDGE" translatable="true">Done</string>
|
<string name="ALERT_SAVE_BRIDGE" translatable="true">Done</string>
|
||||||
|
|
||||||
|
@ -295,6 +295,9 @@
|
||||||
<string name="ALERT_DATA_CLEARED_INFO_SHORTCUT" translatable="true">Private data cleared successfully. Application will close in a moment. Now you can safely continue browsing</string>
|
<string name="ALERT_DATA_CLEARED_INFO_SHORTCUT" translatable="true">Private data cleared successfully. Application will close in a moment. Now you can safely continue browsing</string>
|
||||||
<string name="ALERT_DATA_CLEARED_BUTTON" translatable="true">Closing Genesis Please Wait ...</string>
|
<string name="ALERT_DATA_CLEARED_BUTTON" translatable="true">Closing Genesis Please Wait ...</string>
|
||||||
|
|
||||||
|
<string name="ALERT_CRASH" translatable="true">Unexpected Error</string>
|
||||||
|
<string name="ALERT_CRASH_INFO" translatable="true">Application crashed due to unexpected error. We are looking into the issue mean while you can continue with this application</string>
|
||||||
|
|
||||||
<!-- Privacy Policy -->
|
<!-- Privacy Policy -->
|
||||||
<string name="PRIVACY_HEADER" translatable="true">Privacy Policy</string>
|
<string name="PRIVACY_HEADER" translatable="true">Privacy Policy</string>
|
||||||
<string name="PRIVACY_DESCRIPTION" translatable="true">We don\'t collect information and thats our privacy in a nutshell</string>
|
<string name="PRIVACY_DESCRIPTION" translatable="true">We don\'t collect information and thats our privacy in a nutshell</string>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* Version */
|
/* Version */
|
||||||
project.ext.vname = 'Build | Dark-Origin 1.0'
|
project.ext.vname = 'Build | Dark-Origin 1.0'
|
||||||
project.ext.vcode = 40
|
project.ext.vcode = 45
|
||||||
project.ext.buildType = 'release'
|
project.ext.buildType = 'release'
|
||||||
|
|
||||||
/* dimension */
|
/* dimension */
|
||||||
|
|
|
@ -47,9 +47,9 @@ import net.freehaven.tor.control.TorControlConnection;
|
||||||
|
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.torproject.android.service.R;
|
import org.torproject.android.service.R;
|
||||||
import org.torproject.android.service.wrapper.localHelperMethod;
|
import org.torproject.android.proxy.wrapper.localHelperMethod;
|
||||||
import org.torproject.android.service.wrapper.logRowModel;
|
import org.torproject.android.proxy.wrapper.logRowModel;
|
||||||
import org.torproject.android.service.wrapper.orbotLocalConstants;
|
import org.torproject.android.proxy.wrapper.orbotLocalConstants;
|
||||||
import org.torproject.android.service.util.CustomShell;
|
import org.torproject.android.service.util.CustomShell;
|
||||||
import org.torproject.android.service.util.CustomTorResourceInstaller;
|
import org.torproject.android.service.util.CustomTorResourceInstaller;
|
||||||
import org.torproject.android.service.util.DummyActivity;
|
import org.torproject.android.service.util.DummyActivity;
|
||||||
|
@ -71,6 +71,8 @@ import java.io.IOException;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.io.PrintStream;
|
import java.io.PrintStream;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
|
import java.io.Reader;
|
||||||
|
import java.io.StringReader;
|
||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
@ -1721,8 +1723,10 @@ public class OrbotService extends VpnService implements TorServiceConstants, Orb
|
||||||
alBridges = new ArrayList<>();
|
alBridges = new ArrayList<>();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
BufferedReader in =
|
BufferedReader in =
|
||||||
new BufferedReader(new InputStreamReader(getResources().openRawResource(R.raw.bridges), "UTF-8"));
|
new BufferedReader(new InputStreamReader(getResources().openRawResource(R.raw.bridges), "UTF-8"));
|
||||||
|
|
||||||
String str;
|
String str;
|
||||||
|
|
||||||
while ((str = in.readLine()) != null) {
|
while ((str = in.readLine()) != null) {
|
||||||
|
@ -1759,19 +1763,28 @@ public class OrbotService extends VpnService implements TorServiceConstants, Orb
|
||||||
|
|
||||||
|
|
||||||
if(orbotLocalConstants.mIsManualBridge){
|
if(orbotLocalConstants.mIsManualBridge){
|
||||||
List<String> mList = Arrays.asList(orbotLocalConstants.mBridges.split("\n "));
|
List<String> mList = Arrays.asList(orbotLocalConstants.mBridges.split("\n"));
|
||||||
alBridges.clear();
|
alBridges.clear();
|
||||||
|
|
||||||
for(int e=0;e<mList.size();e++){
|
for(int e=0;e<mList.size();e++){
|
||||||
if(mList.get(e).length()<5){
|
if(mList.get(e).length()<5){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
List<String> mListTemp = Arrays.asList(mList.get(e).split(" "));
|
String mBridge = mList.get(e);
|
||||||
|
mBridge = mBridge.replace("\u00a0"," ");
|
||||||
|
mBridge = mBridge.trim();
|
||||||
|
|
||||||
int mIndex = 0;
|
int mIndex = 0;
|
||||||
while(mListTemp.get(mIndex).length()<3){
|
while (mBridge.charAt(mIndex) == ' '){
|
||||||
mIndex+=1;
|
mIndex+=2;
|
||||||
}
|
}
|
||||||
alBridges.add(new Bridge(mList.get(e).replace(mListTemp.get(mIndex),"") , orbotLocalConstants.mManualBridgeType));
|
mBridge = mBridge.substring(mIndex);
|
||||||
|
|
||||||
|
String mBridgeType = mBridge.split(" ")[0];
|
||||||
|
mBridge = mBridge.replaceAll((mBridgeType + " ") , "");
|
||||||
|
|
||||||
|
mBridge = mBridge.trim();
|
||||||
|
alBridges.add(new Bridge(mBridge ,mBridgeType));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ public class StartTorReceiver extends BroadcastReceiver implements TorServiceCon
|
||||||
if (packageName != null) {
|
if (packageName != null) {
|
||||||
startTorIntent.putExtra(OrbotService.EXTRA_PACKAGE_NAME, packageName);
|
startTorIntent.putExtra(OrbotService.EXTRA_PACKAGE_NAME, packageName);
|
||||||
}
|
}
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && Prefs.persistNotifications()) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
context.startForegroundService(startTorIntent);
|
context.startForegroundService(startTorIntent);
|
||||||
} else {
|
} else {
|
||||||
context.startService(startTorIntent);
|
context.startService(startTorIntent);
|
||||||
|
|
|
@ -7,7 +7,7 @@ import net.freehaven.tor.control.EventHandler;
|
||||||
import org.torproject.android.proxy.util.ExternalIPFetcher;
|
import org.torproject.android.proxy.util.ExternalIPFetcher;
|
||||||
import org.torproject.android.proxy.util.Prefs;
|
import org.torproject.android.proxy.util.Prefs;
|
||||||
import org.torproject.android.service.R;
|
import org.torproject.android.service.R;
|
||||||
import org.torproject.android.service.wrapper.orbotLocalConstants;
|
import org.torproject.android.proxy.wrapper.orbotLocalConstants;
|
||||||
|
|
||||||
import java.text.NumberFormat;
|
import java.text.NumberFormat;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
|
@ -4,7 +4,7 @@ import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
|
|
||||||
import org.torproject.android.proxy.OrbotConstants;
|
import org.torproject.android.proxy.OrbotConstants;
|
||||||
import org.torproject.android.service.wrapper.orbotLocalConstants;
|
import org.torproject.android.proxy.wrapper.orbotLocalConstants;
|
||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.torproject.android.service.wrapper;
|
package org.torproject.android.proxy.wrapper;
|
||||||
|
|
||||||
import android.annotation.TargetApi;
|
import android.annotation.TargetApi;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
|
@ -1,6 +1,5 @@
|
||||||
package org.torproject.android.service.wrapper;
|
package org.torproject.android.proxy.wrapper;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
|
||||||
public class localHelperMethod
|
public class localHelperMethod
|
|
@ -1,4 +1,4 @@
|
||||||
package org.torproject.android.service.wrapper;
|
package org.torproject.android.proxy.wrapper;
|
||||||
|
|
||||||
public class logRowModel {
|
public class logRowModel {
|
||||||
/*Private Variables*/
|
/*Private Variables*/
|
|
@ -1,4 +1,4 @@
|
||||||
package org.torproject.android.service.wrapper;
|
package org.torproject.android.proxy.wrapper;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
Loading…
Reference in New Issue