Bug Fixes

Bug Fixes
master
msmannan00 2021-02-03 15:54:19 +05:00
parent 4536b1a675
commit edb73b11c8
119 changed files with 6728 additions and 5440 deletions

View File

@ -28,5 +28,6 @@
<option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings>
</option>
<option name="offlineMode" value="true" />
</component>
</project>

View File

@ -86,11 +86,12 @@ android {
'src/main/res/layouts/setting',
'src/main/res/layouts/bridge',
'src/main/res/layouts/log',
'src/main/res/layouts/landing',
'src/main/res/layouts/alert',
'src/main/res/layouts/bookmark',
'src/main/res/layouts/shared',
'src/main/res/layouts/shared/listviews',
'src/main/res/layouts/other',
'src/main/res/layouts/home',
'src/main/res/custom-xml/alert',
'src/main/res/custom-xml/tab',
'src/main/res/custom-xml/images',

View File

@ -117,10 +117,14 @@
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:windowSoftInputMode="adjustPan" />
<activity
android:name="com.darkweb.genesissearchengine.appManager.homeManager.homeController"
android:name="com.darkweb.genesissearchengine.appManager.settingManager.trackingManager.settingTrackingController"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:windowSoftInputMode="adjustPan" />
<activity
android:name="com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController"
android:configChanges="keyboard|keyboardHidden|mcc|mnc|orientation|screenSize|locale|layoutDirection|smallestScreenSize|screenLayout"
android:launchMode="singleTop"
android:screenOrientation="unspecified"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan">
<intent-filter>
<category android:name="android.intent.category.LAUNCHER" />
@ -175,6 +179,7 @@
android:value="ca-app-pub-5074525529134731~2926711128" />
<service
android:stopWithTask="true"
android:name="com.darkweb.genesissearchengine.helperManager.autoFillService"
android:label="Genesis | Secure Autofill"
android:permission="android.permission.BIND_AUTOFILL_SERVICE">
@ -194,6 +199,10 @@
android:exported="false"
android:stopWithTask="true" />
<service
android:name="com.darkweb.genesissearchengine.helperManager.OnClearFromRecentService"
android:stopWithTask="true" />
<receiver android:name = "com.darkweb.genesissearchengine.helperManager.userEngagementNotification" />
<receiver

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View File

@ -2,8 +2,9 @@ package com.darkweb.genesissearchengine.appManager;
import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkController;
import com.darkweb.genesissearchengine.appManager.bridgeManager.bridgeController;
import com.darkweb.genesissearchengine.appManager.historyManager.historyController;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
import com.darkweb.genesissearchengine.appManager.orbotLogManager.orbotLogController;
import com.darkweb.genesissearchengine.appManager.settingManager.generalManager.settingGeneralController;
import com.darkweb.genesissearchengine.appManager.settingManager.settingHomePage.settingHomeController;
@ -21,6 +22,7 @@ public class activityContextManager
}
/*Private Contexts*/
private bridgeController pBridgeController;
private historyController pHistoryController;
private bookmarkController pBookmarkController;
private homeController pHomeController;
@ -53,6 +55,13 @@ public class activityContextManager
this.pBookmarkController = bookmark_controller;
}
public bridgeController getBridgeController(){
return pBridgeController;
}
public void setBridgeController(bridgeController bridge_controller){
this.pBridgeController = bridge_controller;
}
public homeController getHomeController(){
return pHomeController;
}

View File

@ -24,7 +24,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.databaseManager.databaseController;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
import com.darkweb.genesissearchengine.constants.enums;
import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.constants.sql;
@ -44,8 +44,6 @@ import java.util.List;
import java.util.Objects;
import static com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkEnums.eBookmarkViewCommands.M_VERTIFY_SELECTION_MENU;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.M_CLEAR_BOOKMARK;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.M_NOT_SUPPORTED;
public class bookmarkController extends AppCompatActivity
@ -256,7 +254,7 @@ public class bookmarkController extends AppCompatActivity
public void onOpenMultipleTabs(View view) {
ArrayList<String> m_long_selected_urk = (ArrayList<String>) mbookmarkAdapter.onTrigger(bookmarkEnums.eBookmarkAdapterCommands.GET_LONG_SELECTED_URL, null);
for(int m_counter=0;m_counter<m_long_selected_urk.size();m_counter++){
mHomeController.onOpenLinkNewTab(m_long_selected_urk.get(m_counter));
mHomeController.postNewLinkTabAnimation(m_long_selected_urk.get(m_counter));
}
onBackPressed(null);
mbookmarkAdapter.onTrigger(bookmarkEnums.eBookmarkAdapterCommands.M_CLEAR_LONG_SELECTED_URL,null);

View File

@ -12,7 +12,6 @@ import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.helpManager.helpController;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.enums;
import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.dataManager.dataController;
@ -47,6 +46,7 @@ public class bridgeController extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
activityContextManager.getInstance().setBridgeController(this);
super.onCreate(savedInstanceState);
setContentView(R.layout.bridge_settings_view);
@ -96,15 +96,38 @@ public class bridgeController extends AppCompatActivity {
@Override
public void afterTextChanged(Editable editable) {
status.sBridgeCustomBridge = mCustomPort.getText().toString();
if(!status.sBridgeCustomBridge.equals("meek") && !status.sBridgeCustomBridge.equals("obfs4") && status.sBridgeCustomBridge.length()<=5){
mBridgeModel.onTrigger(bridgeEnums.eBridgeModelCommands.M_OBFS_CHECK, null);
}
}
});
}
/* VIEW LISTENERS */
public void onOpenInfo(View view) {
helperMethod.openActivity(helpController.class, constants.CONST_LIST_HISTORY, this,true);
}
public void onOpenCustomBridgeUpdater(View view) {
pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(this), pluginEnums.eMessageManager.M_UPDATE_BRIDGES);
}
/* EXTERNAL LISTENERS */
public void onUpdateBridges(String pString) {
if(pString.length()>5){
mBridgeModel.onTrigger(bridgeEnums.eBridgeModelCommands.M_CUSTOM_BRIDGE, Collections.singletonList(pString));
mBridgeViewController.onTrigger(bridgeEnums.eBridgeViewCommands.M_INIT_VIEWS, Arrays.asList(status.sBridgeCustomBridge,250));
}else {
if(status.sBridgeCustomBridge.equals("meek")){
mBridgeModel.onTrigger(bridgeEnums.eBridgeModelCommands.M_MEEK_BRIDGE, null);
}else {
mBridgeModel.onTrigger(bridgeEnums.eBridgeModelCommands.M_OBFS_CHECK, null);
}
}
}
/* LISTENERS */
public class bridgeModelCallback implements eventObserver.eventListener{
@ -123,7 +146,7 @@ public class bridgeController extends AppCompatActivity {
super.onPause();
if(dataController.getInstance()!=null){
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_STRING, Arrays.asList(keys.BRIDGE_CUSTOM_BRIDGE_1,status.sBridgeCustomBridge));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_GATEWAY_AUTO,status.sBridgeGatewayAuto));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_GATEWAY,status.sBridgeGatewayAuto));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_GATEWAY_MANUAL,status.sBridgeGatewayManual));
}
}
@ -153,16 +176,14 @@ public class bridgeController extends AppCompatActivity {
finish();
}
public void onCustomChecked(View view) {
mBridgeViewController.onTrigger(bridgeEnums.eBridgeViewCommands.M_ENABLE_CUSTOM_BRIDGE,null);
}
public void requestBridges(View view){
mBridgeModel.onTrigger(bridgeEnums.eBridgeModelCommands.M_REQUEST_BRIDGE, null);
pluginController.getInstance().onMessageManagerInvoke(Arrays.asList(constants.CONST_BACKEND_GOOGLE_URL, this), M_BRIDGE_MAIL);
}
public void onCustomChecked(View view){
mBridgeModel.onTrigger(bridgeEnums.eBridgeModelCommands.M_CUSTOM_BRIDGE, null);
mBridgeViewController.onTrigger(bridgeEnums.eBridgeViewCommands.M_INIT_VIEWS, Arrays.asList(status.sBridgeCustomBridge,250));
}
public void onMeekChecked(View view){
mBridgeModel.onTrigger(bridgeEnums.eBridgeModelCommands.M_MEEK_BRIDGE, null);
mBridgeViewController.onTrigger(bridgeEnums.eBridgeViewCommands.M_INIT_VIEWS, Arrays.asList(status.sBridgeCustomBridge,250));

View File

@ -4,7 +4,7 @@ public class bridgeEnums
{
/*Settings Manager*/
public enum eBridgeViewCommands {
M_INIT_VIEWS
M_INIT_VIEWS, M_ENABLE_CUSTOM_BRIDGE
}
public enum eBridgeModelCommands {

View File

@ -38,8 +38,8 @@ class bridgeModel
pluginController.getInstance().onMessageManagerInvoke(Arrays.asList(constants.CONST_BACKEND_GOOGLE_URL, mContext), M_BRIDGE_MAIL);
}
public void onCustomChecked(){
status.sBridgeCustomBridge = strings.BRIDGE_CUSTOM_BRIDGE_CUSTOM;
public void onCustomChecked(String pString){
status.sBridgeCustomBridge = pString;
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_STRING, Arrays.asList(keys.BRIDGE_CUSTOM_BRIDGE_1,status.sBridgeCustomBridge));
}
@ -57,7 +57,7 @@ class bridgeModel
requestBridges();
}
else if(pCommands == bridgeEnums.eBridgeModelCommands.M_CUSTOM_BRIDGE){
onCustomChecked();
onCustomChecked((String) pData.get(0));
}
else if(pCommands == bridgeEnums.eBridgeModelCommands.M_MEEK_BRIDGE){
onMeekChecked();

View File

@ -94,37 +94,39 @@ class bridgeViewController
mCustomBridgeBlocker.setVisibility(View.VISIBLE);
}
private void onEnableCustomBridge(){
animateColor(mBridgeCustom, mBridgeCustom.getCurrentTextColor(), mContext.getResources().getColor(R.color.c_text_v1), "textColor", 200);
mBridgeCustom.setHighlightColor(Color.BLACK);
mBridgeCustom.setButtonTintList(ColorStateList.valueOf(ContextCompat.getColor(mContext, R.color.c_radio_tint)));
mBridgeObfs.setChecked(false);
mBridgeChina.setChecked(false);
mBridgeCustom.setChecked(true);
mCustomPort.animate().setDuration(200).alpha(1f);
mBridgeButton.animate().setDuration(200).alpha(1f);
mCustomBridgeBlocker.setVisibility(View.GONE);
}
private void initViews(String p_bridge, int p_duration){
resetRadioButtons(p_duration);
switch (p_bridge) {
case strings.BRIDGE_CUSTOM_BRIDGE_OBFS4:
animateColor(mBridgeObfs, mBridgeObfs.getCurrentTextColor(), mContext.getResources().getColor(R.color.c_text_v1), "textColor", p_duration);
mBridgeObfs.setHighlightColor(Color.BLACK);
mBridgeObfs.setButtonTintList(ColorStateList.valueOf(ContextCompat.getColor(mContext, R.color.c_radio_tint)));
mBridgeObfs.setChecked(true);
mBridgeChina.setChecked(false);
mBridgeCustom.setChecked(false);
break;
case strings.BRIDGE_CUSTOM_BRIDGE_MEEK:
animateColor(mBridgeChina, mBridgeChina.getCurrentTextColor(), mContext.getResources().getColor(R.color.c_text_v1), "textColor", p_duration);
mBridgeChina.setHighlightColor(Color.BLACK);
mBridgeChina.setButtonTintList(ColorStateList.valueOf(ContextCompat.getColor(mContext, R.color.c_radio_tint)));
mBridgeObfs.setChecked(false);
mBridgeChina.setChecked(true);
mBridgeCustom.setChecked(false);
break;
case strings.BRIDGE_CUSTOM_BRIDGE_CUSTOM:
animateColor(mBridgeCustom, mBridgeCustom.getCurrentTextColor(), mContext.getResources().getColor(R.color.c_text_v1), "textColor", p_duration);
mBridgeCustom.setHighlightColor(Color.BLACK);
mBridgeCustom.setButtonTintList(ColorStateList.valueOf(ContextCompat.getColor(mContext, R.color.c_radio_tint)));
mBridgeObfs.setChecked(false);
mBridgeChina.setChecked(false);
mBridgeCustom.setChecked(true);
mCustomPort.animate().setDuration(p_duration).alpha(1f);
mBridgeButton.animate().setDuration(p_duration).alpha(1f);
mCustomBridgeBlocker.setVisibility(View.GONE);
break;
if(p_bridge.equals(strings.BRIDGE_CUSTOM_BRIDGE_OBFS4)){
animateColor(mBridgeObfs, mBridgeObfs.getCurrentTextColor(), mContext.getResources().getColor(R.color.c_text_v1), "textColor", p_duration);
mBridgeObfs.setHighlightColor(Color.BLACK);
mBridgeObfs.setButtonTintList(ColorStateList.valueOf(ContextCompat.getColor(mContext, R.color.c_radio_tint)));
mBridgeObfs.setChecked(true);
mBridgeChina.setChecked(false);
mBridgeCustom.setChecked(false);
mCustomPort.setText(strings.GENERIC_EMPTY_STR);
}else if(p_bridge.equals(strings.BRIDGE_CUSTOM_BRIDGE_MEEK)){
animateColor(mBridgeChina, mBridgeChina.getCurrentTextColor(), mContext.getResources().getColor(R.color.c_text_v1), "textColor", p_duration);
mBridgeChina.setHighlightColor(Color.BLACK);
mBridgeChina.setButtonTintList(ColorStateList.valueOf(ContextCompat.getColor(mContext, R.color.c_radio_tint)));
mBridgeObfs.setChecked(false);
mBridgeChina.setChecked(true);
mBridgeCustom.setChecked(false);
mCustomPort.setText(strings.GENERIC_EMPTY_STR);
}else {
onEnableCustomBridge();
mCustomPort.setText(p_bridge.replace("\n",""));
}
}
@ -132,6 +134,9 @@ class bridgeViewController
if(p_commands == bridgeEnums.eBridgeViewCommands.M_INIT_VIEWS){
initViews((String) p_data.get(0), (int)p_data.get(1));
}
if(p_commands == bridgeEnums.eBridgeViewCommands.M_ENABLE_CUSTOM_BRIDGE){
onEnableCustomBridge();
}
}
}

View File

@ -7,7 +7,7 @@ import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkRowModel;
import com.darkweb.genesissearchengine.appManager.historyManager.historyRowModel;
import com.darkweb.genesissearchengine.appManager.homeManager.geckoSession;
import com.darkweb.genesissearchengine.appManager.homeManager.geckoManager.geckoSession;
import com.darkweb.genesissearchengine.appManager.tabManager.tabRowModel;
import com.darkweb.genesissearchengine.constants.constants;
import java.text.SimpleDateFormat;

View File

@ -5,7 +5,7 @@ import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
import com.example.myapplication.R;
public class externalNavigationController extends Activity {

View File

@ -24,7 +24,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.databaseManager.databaseController;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
import com.darkweb.genesissearchengine.constants.enums;
import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.constants.sql;
@ -294,7 +294,7 @@ public class historyController extends AppCompatActivity
public void onOpenMultipleTabs(View view) {
ArrayList<String> m_long_selected_urk = (ArrayList<String>) mHistoryAdapter.onTrigger(historyEnums.eHistoryAdapterCommands.GET_LONG_SELECTED_URL, null);
for(int m_counter=0;m_counter<m_long_selected_urk.size();m_counter++){
mHomeController.onOpenLinkNewTab(m_long_selected_urk.get(m_counter));
mHomeController.postNewLinkTabAnimation(m_long_selected_urk.get(m_counter));
}
onBackPressed(null);
mHistoryAdapter.onTrigger(historyEnums.eHistoryAdapterCommands.M_CLEAR_LONG_SELECTED_URL,null);
@ -364,7 +364,7 @@ public class historyController extends AppCompatActivity
}
else if(e_type.equals(enums.etype.url_triggered_new_tab)){
String url_temp = helperMethod.completeURL(data.get(0).toString());
mHomeController.onOpenLinkNewTab(url_temp);
mHomeController.postNewLinkTabAnimation(url_temp);
finish();
}
else if(e_type.equals(enums.etype.fetch_favicon)){

View File

@ -1,4 +1,4 @@
package com.darkweb.genesissearchengine.appManager.homeManager;
package com.darkweb.genesissearchengine.appManager.homeManager.geckoManager;
import android.content.Context;
import androidx.core.view.NestedScrollingChildHelper;

View File

@ -1,324 +1,321 @@
package com.darkweb.genesissearchengine.appManager.homeManager;
import android.content.Intent;
import android.net.Uri;
import android.os.Handler;
import android.widget.ImageView;
import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.appManager.kotlinHelperLibraries.BrowserIconManager;
import com.darkweb.genesissearchengine.constants.*;
import com.darkweb.genesissearchengine.helperManager.eventObserver;
import com.darkweb.genesissearchengine.helperManager.helperMethod;
import com.google.android.gms.ads.AdSize;
import java.io.File;
import java.util.List;
import static com.darkweb.genesissearchengine.constants.enums.etype.on_handle_external_intent;
import static org.mozilla.geckoview.GeckoSessionSettings.USER_AGENT_MODE_MOBILE;
import static org.mozilla.geckoview.StorageController.ClearFlags.AUTH_SESSIONS;
import static org.mozilla.geckoview.StorageController.ClearFlags.COOKIES;
import static org.mozilla.geckoview.StorageController.ClearFlags.DOM_STORAGES;
import static org.mozilla.geckoview.StorageController.ClearFlags.IMAGE_CACHE;
import static org.mozilla.geckoview.StorageController.ClearFlags.NETWORK_CACHE;
import static org.mozilla.geckoview.StorageController.ClearFlags.PERMISSIONS;
import static org.mozilla.geckoview.StorageController.ClearFlags.SITE_DATA;
import static org.mozilla.geckoview.StorageController.ClearFlags.SITE_SETTINGS;
import org.mozilla.geckoview.ContentBlocking;
import org.mozilla.geckoview.GeckoRuntime;
import org.mozilla.geckoview.GeckoSession;
import org.mozilla.geckoview.GeckoView;
class geckoClients
{
/*Gecko Variables*/
private geckoSession mSession = null;
private GeckoRuntime mRuntime = null;
private BrowserIconManager mIconManager;
private eventObserver.eventListener event;
private AppCompatActivity context;
/*Local Variable*/
private String mSessionID;
void initialize(GeckoView geckoView, eventObserver.eventListener event, AppCompatActivity context, boolean isForced)
{
this.context = context;
this.event = event;
mSessionID = helperMethod.createRandomID();
initRuntimeSettings(context);
if(!isForced && geckoView.getSession()!=null && geckoView.getSession().isOpen()){
mSession = (geckoSession) geckoView.getSession();
}
else {
geckoView.releaseSession();
mSession = new geckoSession(new geckoViewClientCallback(),mSessionID,context, geckoView);
mSession.open(mRuntime);
mSession.getSettings().setUseTrackingProtection(status.sStatusDoNotTrack);
mSession.getSettings().setFullAccessibilityTree(true);
mSession.getSettings().setUserAgentMode(USER_AGENT_MODE_MOBILE);
mSession.getSettings().setAllowJavascript(status.sSettingJavaStatus);
geckoView.releaseSession();
geckoView.setSession(mSession);
}
mSession.onSetInitializeFromStartup();
onUpdateFont();
}
public void onValidateInitializeFromStartup(){
mSession.onValidateInitializeFromStartup();
}
public boolean onGetInitializeFromStartup(){
return mSession.onGetInitializeFromStartup();
}
public geckoSession initFreeSession(GeckoView pGeckoView, AppCompatActivity pcontext, eventObserver.eventListener event){
this.event = event;
initRuntimeSettings(pcontext);
geckoSession mTempSession = new geckoSession(new geckoViewClientCallback(),mSessionID,context, pGeckoView);
mTempSession.open(mRuntime);
mTempSession.getSettings().setUseTrackingProtection(status.sStatusDoNotTrack);
mTempSession.getSettings().setFullAccessibilityTree(true);
mTempSession.getSettings().setUserAgentMode(USER_AGENT_MODE_MOBILE);
mTempSession.getSettings().setAllowJavascript(status.sSettingJavaStatus);
return mTempSession;
}
public void onSessionReinit(){
mSession.onSessionReinit();
}
void toogleUserAgent(){
mSession.toogleUserAgent();
}
int getUserAgent(){
return mSession.getUserAgentMode();
}
public void initRuntimeSettings(AppCompatActivity context){
if(mRuntime==null){
mRuntime = GeckoRuntime.getDefault(context);
mRuntime.getSettings().setAboutConfigEnabled(true);
mRuntime.getSettings().setAutomaticFontSizeAdjustment(false);
mRuntime.getSettings().setWebFontsEnabled(status.sShowWebFonts);
mRuntime.getSettings().setForceUserScalableEnabled(status.sSettingEnableZoom);
mRuntime.getSettings().getContentBlocking().setCookieBehavior(getCookiesBehaviour());
mRuntime.getSettings().getContentBlocking().setSafeBrowsing(ContentBlocking.SafeBrowsing.DEFAULT);
mIconManager = new BrowserIconManager();
if(status.sSettingTrackingProtection){
mRuntime.getSettings().getContentBlocking().setAntiTracking(ContentBlocking.AntiTracking.AD);
mRuntime.getSettings().getContentBlocking().setAntiTracking(ContentBlocking.AntiTracking.FINGERPRINTING);
}else {
mRuntime.getSettings().getContentBlocking().setAntiTracking(ContentBlocking.AntiTracking.STRICT);
}
}
}
public void onGetFavIcon(ImageView pImageView, String pURL){
pURL = helperMethod.completeURL(helperMethod.getDomainName(pURL));
mIconManager.onLoadIconIntoView(context,mRuntime, pImageView, pURL);
}
public void onLoadFavIcon(){
BrowserIconManager mIconManager = new BrowserIconManager();
mIconManager.onLoadIcon(context, mRuntime);
}
private int getCookiesBehaviour(){
return status.sSettingCookieStatus;
}
void updateSetting(){
mRuntime.getSettings().setRemoteDebuggingEnabled(false);
mRuntime.getSettings().setWebFontsEnabled(status.sShowWebFonts);
mRuntime.getSettings().getContentBlocking().setCookieBehavior(getCookiesBehaviour());
mRuntime.getSettings().setAutomaticFontSizeAdjustment(false);
mRuntime.getSettings().getContentBlocking().setSafeBrowsing(ContentBlocking.SafeBrowsing.DEFAULT);
mRuntime.getSettings().setWebFontsEnabled(status.sShowWebFonts);
mRuntime.getSettings().setForceUserScalableEnabled(status.sSettingEnableZoom);
mIconManager = new BrowserIconManager();
if(!status.sSettingTrackingProtection){
mRuntime.getSettings().getContentBlocking().setAntiTracking(ContentBlocking.AntiTracking.AD);
mRuntime.getSettings().getContentBlocking().setAntiTracking(ContentBlocking.AntiTracking.FINGERPRINTING);
}else {
mRuntime.getSettings().getContentBlocking().setAntiTracking(ContentBlocking.AntiTracking.STRICT);
}
mSession.getSettings().setUseTrackingProtection(status.sStatusDoNotTrack);
mSession.getSettings().setFullAccessibilityTree(true);
mSession.getSettings().setUserAgentMode(USER_AGENT_MODE_MOBILE );
mSession.getSettings().setAllowJavascript(status.sSettingJavaStatus);
onUpdateFont();
onReload();
}
void initSession(geckoSession mSession){
mSessionID = mSession.getSessionID();
this.mSession = mSession;
}
geckoSession getSession(){
return mSession;
}
void onUploadRequest(int resultCode,Intent data){
mSession.onFileUploadRequest(resultCode,data);
}
void setLoading(boolean status){
mSession.setLoading(status);
}
void loadURL(String url) {
if(mSession.onGetInitializeFromStartup()){
mSession.initURL(url);
if(url.equals("boogle.store") || url.equals(constants.CONST_GENESIS_DOMAIN_URL_SLASHED)){
try{
mSession.initURL(constants.CONST_GENESIS_DOMAIN_URL);
mSession.loadUri(constants.CONST_GENESIS_URL_CACHED);
}catch (Exception ex){
ex.printStackTrace();
}
}else if(url.contains(constants.CONST_GENESIS_HELP_URL_SUB)){
try{
mSession.initURL(constants.CONST_GENESIS_HELP_URL);
mSession.loadUri(constants.CONST_GENESIS_HELP_URL_CACHE);
}catch (Exception ex){
ex.printStackTrace();
}
}else {
mSession.loadUri(url);
}
}
}
public void onRedrawPixel(){
mSession.onRedrawPixel();
onLoadFavIcon();
}
void onClearSiteData(){
mRuntime.getStorageController().clearData(SITE_SETTINGS);
mRuntime.getStorageController().clearData(SITE_DATA);
}
void onClearSession(){
mRuntime.getStorageController().clearData(AUTH_SESSIONS);
mRuntime.getStorageController().clearData(PERMISSIONS);
}
void onClearCache(){
mRuntime.getStorageController().clearData(NETWORK_CACHE);
mRuntime.getStorageController().clearData(IMAGE_CACHE);
mRuntime.getStorageController().clearData(DOM_STORAGES);
}
void onClearCookies(){
mRuntime.getStorageController().clearData(COOKIES);
}
void onBackPressed(boolean isFinishAllowed){
mSession.goBackSession();
if(mSession.canGoBack()){
mSession.goBackSession();
}
else if(isFinishAllowed){
event.invokeObserver(null, enums.etype.back_list_empty);
}
}
boolean canGoBack(){
return mSession.canGoBack();
}
boolean isLoading(){
return mSession.isLoading();
}
Uri getUriPermission(){
return mSession.getUriPermission();
}
boolean getFullScreenStatus(){
return mSession.getFullScreenStatus();
}
void onExitFullScreen(){
mSession.exitScreen();
}
void onForwardPressed(){
if(mSession.canGoForward()){
mSession.goForwardSession();
}
}
void onStop(){
mSession.stop();
}
void onReload(){
mSession.stop();
mSession.loadUri(mSession.getCurrentURL());
}
void onReloadStatic(){
mSession.loadUri(mSession.getCurrentURL());
}
void manual_download(String url, AppCompatActivity context){
Uri downloadURL = Uri.parse(url);
File f = new File(url);
f.getName();
String downloadFile = f.getName();
/*EXTERNAL STORAGE REQUEST*/
if(helperMethod.checkPermissions(context)){
mSession.downloadRequestedFile(downloadURL,downloadFile);
}
}
void downloadFile()
{
if(helperMethod.checkPermissions(context)){
mSession.downloadRequestedFile();
}
}
/*Session Updates*/
void onUpdateFont(){
float font = (status.sSettingFontSize -100)/3+100;
mRuntime.getSettings().setFontSizeFactor(font/100);
}
public class geckoViewClientCallback implements eventObserver.eventListener{
@Override
public Object invokeObserver(List<Object> data, Object e_type)
{
if (mSessionID!=null && mSessionID.equals(data.get(1)) || e_type.equals(enums.etype.FINDER_RESULT_CALLBACK) || e_type.equals(enums.etype.ON_UPDATE_TAB_TITLE) || e_type.equals(enums.etype.on_update_favicon) ||e_type.equals(enums.etype.on_update_history) || e_type.equals(enums.etype.on_request_completed) || e_type.equals(enums.etype.on_update_suggestion) || e_type.equals(enums.etype.on_update_suggestion_url))
{
if (e_type.equals(on_handle_external_intent))
{
GeckoSession.WebResponseInfo responseInfo = (GeckoSession.WebResponseInfo)data.get(0);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndTypeAndNormalize(Uri.parse(responseInfo.uri), responseInfo.contentType);
context.startActivity(intent);
} else
{
return event.invokeObserver(data, e_type);
}
}
return null;
}
}
}
package com.darkweb.genesissearchengine.appManager.homeManager.geckoManager;
import android.content.Intent;
import android.net.Uri;
import android.widget.ImageView;
import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.appManager.kotlinHelperLibraries.BrowserIconManager;
import com.darkweb.genesissearchengine.constants.*;
import com.darkweb.genesissearchengine.helperManager.eventObserver;
import com.darkweb.genesissearchengine.helperManager.helperMethod;
import java.io.File;
import java.util.List;
import static com.darkweb.genesissearchengine.constants.enums.etype.on_handle_external_intent;
import static org.mozilla.geckoview.GeckoSessionSettings.USER_AGENT_MODE_MOBILE;
import static org.mozilla.geckoview.StorageController.ClearFlags.AUTH_SESSIONS;
import static org.mozilla.geckoview.StorageController.ClearFlags.COOKIES;
import static org.mozilla.geckoview.StorageController.ClearFlags.DOM_STORAGES;
import static org.mozilla.geckoview.StorageController.ClearFlags.IMAGE_CACHE;
import static org.mozilla.geckoview.StorageController.ClearFlags.NETWORK_CACHE;
import static org.mozilla.geckoview.StorageController.ClearFlags.PERMISSIONS;
import static org.mozilla.geckoview.StorageController.ClearFlags.SITE_DATA;
import static org.mozilla.geckoview.StorageController.ClearFlags.SITE_SETTINGS;
import org.mozilla.geckoview.ContentBlocking;
import org.mozilla.geckoview.GeckoRuntime;
import org.mozilla.geckoview.GeckoSession;
import org.mozilla.geckoview.GeckoView;
public class geckoClients
{
/*Gecko Variables*/
private geckoSession mSession = null;
private GeckoRuntime mRuntime = null;
private BrowserIconManager mIconManager;
private eventObserver.eventListener event;
private AppCompatActivity context;
/*Local Variable*/
private String mSessionID;
public void initialize(GeckoView geckoView, eventObserver.eventListener event, AppCompatActivity context, boolean isForced)
{
this.context = context;
this.event = event;
mSessionID = helperMethod.createRandomID();
initRuntimeSettings(context);
if(!isForced && geckoView.getSession()!=null && geckoView.getSession().isOpen()){
mSession = (geckoSession) geckoView.getSession();
}
else {
geckoView.releaseSession();
mSession = new geckoSession(new geckoViewClientCallback(),mSessionID,context, geckoView);
mSession.open(mRuntime);
mSession.getSettings().setUseTrackingProtection(status.sStatusDoNotTrack);
mSession.getSettings().setFullAccessibilityTree(true);
mSession.getSettings().setUserAgentMode(USER_AGENT_MODE_MOBILE);
mSession.getSettings().setAllowJavascript(status.sSettingJavaStatus);
geckoView.releaseSession();
geckoView.setSession(mSession);
}
mSession.onSetInitializeFromStartup();
onUpdateFont();
}
public void onValidateInitializeFromStartup(){
mSession.onValidateInitializeFromStartup();
}
public boolean onGetInitializeFromStartup(){
return mSession.onGetInitializeFromStartup();
}
public geckoSession initFreeSession(GeckoView pGeckoView, AppCompatActivity pcontext, eventObserver.eventListener event){
this.event = event;
initRuntimeSettings(pcontext);
geckoSession mTempSession = new geckoSession(new geckoViewClientCallback(),mSessionID,context, pGeckoView);
mTempSession.open(mRuntime);
mTempSession.getSettings().setUseTrackingProtection(status.sStatusDoNotTrack);
mTempSession.getSettings().setFullAccessibilityTree(true);
mTempSession.getSettings().setUserAgentMode(USER_AGENT_MODE_MOBILE);
mTempSession.getSettings().setAllowJavascript(status.sSettingJavaStatus);
return mTempSession;
}
public void onSessionReinit(){
mSession.onSessionReinit();
}
public void toogleUserAgent(){
mSession.toogleUserAgent();
}
public int getUserAgent(){
return mSession.getUserAgentMode();
}
public void initRuntimeSettings(AppCompatActivity context){
if(mRuntime==null){
mRuntime = GeckoRuntime.getDefault(context);
mRuntime.getSettings().setAboutConfigEnabled(true);
mRuntime.getSettings().setAutomaticFontSizeAdjustment(false);
mRuntime.getSettings().setWebFontsEnabled(status.sShowWebFonts);
mRuntime.getSettings().setForceUserScalableEnabled(status.sSettingEnableZoom);
mRuntime.getSettings().getContentBlocking().setCookieBehavior(getCookiesBehaviour());
mRuntime.getSettings().getContentBlocking().setSafeBrowsing(ContentBlocking.SafeBrowsing.DEFAULT);
mIconManager = new BrowserIconManager();
if(status.sSettingTrackingProtection == 1){
mRuntime.getSettings().getContentBlocking().setAntiTracking(ContentBlocking.AntiTracking.DEFAULT);
}else if(status.sSettingTrackingProtection == 2){
mRuntime.getSettings().getContentBlocking().setAntiTracking(ContentBlocking.AntiTracking.STRICT);
}
}
}
public void onGetFavIcon(ImageView pImageView, String pURL){
pURL = helperMethod.completeURL(helperMethod.getDomainName(pURL));
mIconManager.onLoadIconIntoView(context,mRuntime, pImageView, pURL);
}
public void onLoadFavIcon(){
BrowserIconManager mIconManager = new BrowserIconManager();
mIconManager.onLoadIcon(context, mRuntime);
}
private int getCookiesBehaviour(){
return status.sSettingCookieStatus;
}
public void updateSetting(){
mRuntime.getSettings().setRemoteDebuggingEnabled(false);
mRuntime.getSettings().setWebFontsEnabled(status.sShowWebFonts);
mRuntime.getSettings().getContentBlocking().setCookieBehavior(getCookiesBehaviour());
mRuntime.getSettings().setAutomaticFontSizeAdjustment(false);
mRuntime.getSettings().getContentBlocking().setSafeBrowsing(ContentBlocking.SafeBrowsing.DEFAULT);
mRuntime.getSettings().setWebFontsEnabled(status.sShowWebFonts);
mRuntime.getSettings().setForceUserScalableEnabled(status.sSettingEnableZoom);
mIconManager = new BrowserIconManager();
if(status.sSettingTrackingProtection == 1){
mRuntime.getSettings().getContentBlocking().setAntiTracking(ContentBlocking.AntiTracking.DEFAULT);
}else if(status.sSettingTrackingProtection == 2){
mRuntime.getSettings().getContentBlocking().setAntiTracking(ContentBlocking.AntiTracking.STRICT);
}
mSession.getSettings().setUseTrackingProtection(status.sStatusDoNotTrack);
mSession.getSettings().setFullAccessibilityTree(true);
mSession.getSettings().setUserAgentMode(USER_AGENT_MODE_MOBILE );
mSession.getSettings().setAllowJavascript(status.sSettingJavaStatus);
onUpdateFont();
onReload();
}
public void initSession(geckoSession mSession){
mSessionID = mSession.getSessionID();
this.mSession = mSession;
}
public geckoSession getSession(){
return mSession;
}
public void onUploadRequest(int resultCode,Intent data){
mSession.onFileUploadRequest(resultCode,data);
}
public void setLoading(boolean status){
mSession.setLoading(status);
}
public void loadURL(String url) {
if(mSession.onGetInitializeFromStartup()){
mSession.initURL(url);
if(url.endsWith("boogle.store") || url.endsWith(constants.CONST_GENESIS_DOMAIN_URL_SLASHED)){
try{
mSession.initURL(constants.CONST_GENESIS_DOMAIN_URL);
mSession.loadUri(constants.CONST_GENESIS_URL_CACHED);
}catch (Exception ex){
ex.printStackTrace();
}
}else if(url.contains(constants.CONST_GENESIS_HELP_URL_SUB)){
try{
mSession.initURL(constants.CONST_GENESIS_HELP_URL);
mSession.loadUri(constants.CONST_GENESIS_HELP_URL_CACHE);
}catch (Exception ex){
ex.printStackTrace();
}
}else {
mSession.loadUri(url);
}
}
}
public void onRedrawPixel(){
mSession.onRedrawPixel();
onLoadFavIcon();
}
public void onClearSiteData(){
mRuntime.getStorageController().clearData(SITE_SETTINGS);
mRuntime.getStorageController().clearData(SITE_DATA);
}
public void onClearSession(){
mRuntime.getStorageController().clearData(AUTH_SESSIONS);
mRuntime.getStorageController().clearData(PERMISSIONS);
}
public void onClearCache(){
mRuntime.getStorageController().clearData(NETWORK_CACHE);
mRuntime.getStorageController().clearData(IMAGE_CACHE);
mRuntime.getStorageController().clearData(DOM_STORAGES);
}
public void onClearCookies(){
mRuntime.getStorageController().clearData(COOKIES);
}
public void onBackPressed(boolean isFinishAllowed){
mSession.goBackSession();
if(mSession.canGoBack()){
mSession.goBackSession();
}
else if(isFinishAllowed){
event.invokeObserver(null, enums.etype.back_list_empty);
}
}
public boolean canGoBack(){
return mSession.canGoBack();
}
public boolean isLoading(){
return mSession.isLoading();
}
public Uri getUriPermission(){
return mSession.getUriPermission();
}
public boolean getFullScreenStatus(){
return mSession.getFullScreenStatus();
}
public void onExitFullScreen(){
mSession.exitScreen();
}
public void onForwardPressed(){
if(mSession.canGoForward()){
mSession.goForwardSession();
}
}
public void onStop(){
mSession.stop();
}
public void onReload(){
mSession.stop();
loadURL(mSession.getCurrentURL());
}
public void onReloadStatic(){
mSession.loadUri(mSession.getCurrentURL());
}
public void manual_download(String url, AppCompatActivity context){
Uri downloadURL = Uri.parse(url);
File f = new File(url);
f.getName();
String downloadFile = f.getName();
/*EXTERNAL STORAGE REQUEST*/
if(helperMethod.checkPermissions(context)){
mSession.downloadRequestedFile(downloadURL,downloadFile);
}
}
public void downloadFile()
{
if(helperMethod.checkPermissions(context)){
mSession.downloadRequestedFile();
}
}
/*Session Updates*/
public void onUpdateFont(){
float font = (status.sSettingFontSize -100)/3+100;
mRuntime.getSettings().setFontSizeFactor(font/100);
}
public class geckoViewClientCallback implements eventObserver.eventListener{
@Override
public Object invokeObserver(List<Object> data, Object e_type)
{
if (mSessionID!=null && mSessionID.equals(data.get(1)) || e_type.equals(enums.etype.FINDER_RESULT_CALLBACK) || e_type.equals(enums.etype.ON_UPDATE_TAB_TITLE) || e_type.equals(enums.etype.on_update_favicon) ||e_type.equals(enums.etype.on_update_history) || e_type.equals(enums.etype.on_request_completed) || e_type.equals(enums.etype.on_update_suggestion) || e_type.equals(enums.etype.on_update_suggestion_url))
{
if (e_type.equals(on_handle_external_intent))
{
GeckoSession.WebResponseInfo responseInfo = (GeckoSession.WebResponseInfo)data.get(0);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndTypeAndNormalize(Uri.parse(responseInfo.uri), responseInfo.contentType);
context.startActivity(intent);
} else
{
return event.invokeObserver(data, e_type);
}
}
return null;
}
}
}

View File

@ -1,58 +1,58 @@
package com.darkweb.genesissearchengine.appManager.homeManager;
import android.Manifest;
import android.content.pm.PackageManager;
import android.net.Uri;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import com.darkweb.genesissearchengine.constants.enums;
import com.darkweb.genesissearchengine.constants.strings;
import com.darkweb.genesissearchengine.helperManager.eventObserver;
import org.mozilla.geckoview.GeckoSession;
import java.util.Arrays;
class geckoDownloadManager
{
private Uri downloadURL;
private String downloadFile = strings.GENERIC_EMPTY_STR;
geckoDownloadManager(){
}
void downloadFile(GeckoSession.WebResponseInfo response, geckoSession session, AppCompatActivity context, eventObserver.eventListener event) {
session
.getUserAgent()
.accept(userAgent -> downloadFile(response, userAgent,context,session,event),
exception -> {
throw new IllegalStateException("Could not get UserAgent string.");
});
}
private void downloadFile(GeckoSession.WebResponseInfo response, String userAgent, AppCompatActivity context, geckoSession session, eventObserver.eventListener event) {
if (ContextCompat.checkSelfPermission(context,
Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(context,
new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},
3);
return;
}
downloadURL = Uri.parse(response.uri);
downloadFile = response.filename != null ? response.filename : downloadURL.getLastPathSegment();
event.invokeObserver(Arrays.asList(0,session.getSessionID()), enums.etype.progress_update);
event.invokeObserver(Arrays.asList(downloadFile,session.getSessionID(),downloadURL), enums.etype.download_file_popup);
}
Uri getDownloadURL(){
return downloadURL;
}
String getDownloadFile(){
return downloadFile;
}
}
package com.darkweb.genesissearchengine.appManager.homeManager.geckoManager;
import android.Manifest;
import android.content.pm.PackageManager;
import android.net.Uri;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import com.darkweb.genesissearchengine.constants.enums;
import com.darkweb.genesissearchengine.constants.strings;
import com.darkweb.genesissearchengine.helperManager.eventObserver;
import org.mozilla.geckoview.GeckoSession;
import java.util.Arrays;
class geckoDownloadManager
{
private Uri downloadURL;
private String downloadFile = strings.GENERIC_EMPTY_STR;
geckoDownloadManager(){
}
void downloadFile(GeckoSession.WebResponseInfo response, geckoSession session, AppCompatActivity context, eventObserver.eventListener event) {
session
.getUserAgent()
.accept(userAgent -> downloadFile(response, userAgent,context,session,event),
exception -> {
throw new IllegalStateException("Could not get UserAgent string.");
});
}
private void downloadFile(GeckoSession.WebResponseInfo response, String userAgent, AppCompatActivity context, geckoSession session, eventObserver.eventListener event) {
if (ContextCompat.checkSelfPermission(context,
Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(context,
new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},
3);
return;
}
downloadURL = Uri.parse(response.uri);
downloadFile = response.filename != null ? response.filename : downloadURL.getLastPathSegment();
event.invokeObserver(Arrays.asList(0,session.getSessionID()), enums.etype.progress_update);
event.invokeObserver(Arrays.asList(downloadFile,session.getSessionID(),downloadURL), enums.etype.download_file_popup);
}
Uri getDownloadURL(){
return downloadURL;
}
String getDownloadFile(){
return downloadFile;
}
}

View File

@ -1,4 +1,4 @@
package com.darkweb.genesissearchengine.appManager.homeManager;
package com.darkweb.genesissearchengine.appManager.homeManager.hintManager;
import android.annotation.SuppressLint;
import android.content.res.Resources;
@ -36,7 +36,7 @@ public class hintAdapter extends RecyclerView.Adapter<hintAdapter.listViewHolder
ImageView[] mWebIcon = new ImageView[15];
boolean mCounters=false;
hintAdapter(ArrayList<historyRowModel> pHintList, eventObserver.eventListener pEvent, AppCompatActivity pContext) {
public hintAdapter(ArrayList<historyRowModel> pHintList, eventObserver.eventListener pEvent, AppCompatActivity pContext) {
this.mHintList = new ArrayList();
int maxCounter=5;
if(pHintList.size()<maxCounter){

View File

@ -1,4 +1,4 @@
package com.darkweb.genesissearchengine.appManager.homeManager;
package com.darkweb.genesissearchengine.appManager.homeManager.hintManager;
import com.darkweb.genesissearchengine.appManager.tabManager.tabRowModel;

View File

@ -1,9 +1,8 @@
package com.darkweb.genesissearchengine.appManager.homeManager;
package com.darkweb.genesissearchengine.appManager.homeManager.homeController;
import android.content.Context;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.view.inputmethod.InputMethodManager;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

View File

@ -1,43 +1,42 @@
package com.darkweb.genesissearchengine.appManager.homeManager;
import android.util.Patterns;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.helperManager.helperMethod;
import java.net.URL;
class homeModel
{
String getSearchEngine(){
return status.sSettingSearchStatus;
}
String urlComplete(String pURL, String pSearchEngine){
if(pURL.equals("about:config")){
return pURL;
}else {
try
{
String updateUrl = helperMethod.completeURL(pURL);
URL host = new URL(updateUrl);
boolean isUrlValid = Patterns.WEB_URL.matcher(updateUrl).matches();
if(isUrlValid && host.getHost().replace("www.","").contains("."))
{
return null;
}
}
catch (Exception ex){
ex.printStackTrace();
}
String mURL = pSearchEngine.replace("$s",pURL.replaceAll(" ","+"));
return mURL;
}
}
}
package com.darkweb.genesissearchengine.appManager.homeManager.homeController;
import android.util.Patterns;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.helperManager.helperMethod;
import java.net.URL;
class homeModel
{
String getSearchEngine(){
return status.sSettingSearchStatus;
}
String urlComplete(String pURL, String pSearchEngine){
if(pURL.equals("about:config")){
return pURL;
}else {
try
{
String updateUrl = helperMethod.completeURL(pURL);
URL host = new URL(updateUrl);
boolean isUrlValid = Patterns.WEB_URL.matcher(updateUrl).matches();
if(isUrlValid && host.getHost().replace("www.","").contains("."))
{
return null;
}
}
catch (Exception ex){
ex.printStackTrace();
}
String mURL = pSearchEngine.replace("$s",pURL.replaceAll(" ","+"));
return mURL;
}
}
}

View File

@ -6,7 +6,6 @@ import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import android.view.View;
import com.darkweb.genesissearchengine.appManager.bridgeManager.bridgeController;
import com.darkweb.genesissearchengine.appManager.orbotManager.orbotController;
import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.constants.status;
@ -30,17 +29,17 @@ public class landingController extends AppIntro {
// Instead of fragments, you can also use our default slide
// Just set a title, description, background and image. AppIntro will do the rest.
CustomSlideBigText welcome = CustomSlideBigText.newInstance(R.layout.custom_slide_big_text);
CustomSlideBigText welcome = CustomSlideBigText.newInstance(R.layout.landing_view);
welcome.setTitle(getString(R.string.LANDING_HELLO));
welcome.setSubTitle(getString(R.string.LANDING_WELCOME));
addSlide(welcome);
CustomSlideBigText intro2 = CustomSlideBigText.newInstance(R.layout.custom_slide_big_text);
CustomSlideBigText intro2 = CustomSlideBigText.newInstance(R.layout.landing_view);
intro2.setTitle(getString(R.string.LANDING_BROWSE_INFO));
intro2.setSubTitle(getString(R.string.LANDING_NO_TRACKING));
addSlide(intro2);
CustomSlideBigText cs2 = CustomSlideBigText.newInstance(R.layout.custom_slide_big_text);
CustomSlideBigText cs2 = CustomSlideBigText.newInstance(R.layout.landing_view);
cs2.setTitle(getString(R.string.LANDING_BRIDGES_INFO));
cs2.showButton(getString(R.string.LANDING_MORE), new View.OnClickListener() {
@Override

View File

@ -19,26 +19,26 @@ import org.torproject.android.service.wrapper.logRowModel;
import java.util.ArrayList;
import java.util.List;
public class orbotAdapter extends RecyclerView.Adapter<orbotAdapter.listViewHolder>
public class orbotLogAdapter extends RecyclerView.Adapter<orbotLogAdapter.listViewHolder>
{
/*Private Variables*/
private ArrayList<logRowModel> mModelList;
private eventObserver.eventListener mEvent;
orbotAdapter(ArrayList<logRowModel> model_list, eventObserver.eventListener event) {
orbotLogAdapter(ArrayList<logRowModel> model_list, eventObserver.eventListener event) {
this.mModelList = model_list;
this.mEvent = event;
}
@NonNull @Override
public orbotAdapter.listViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
public orbotLogAdapter.listViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.orbot_row_view, parent, false);
return new orbotAdapter.listViewHolder(view);
return new orbotLogAdapter.listViewHolder(view);
}
@Override
public void onBindViewHolder(@NonNull orbotAdapter.listViewHolder holder, int position)
public void onBindViewHolder(@NonNull orbotLogAdapter.listViewHolder holder, int position)
{
holder.bindListView(mModelList.get(position));
}
@ -64,7 +64,7 @@ public class orbotAdapter extends RecyclerView.Adapter<orbotAdapter.listViewHold
mDescription = itemView.findViewById(R.id.pDescription);
mRowContainerInner = itemView.findViewById(R.id.pRowContainerInner);
mHeader.setText((mModelList.size() - this.getLayoutPosition() + ". " + model.getLog()));
mHeader.setText((this.getLayoutPosition() + ". " + model.getLog()));
mDescription.setText(model.getDate());
mRowContainerInner.setOnClickListener(this);
}

View File

@ -1,18 +1,17 @@
package com.darkweb.genesissearchengine.appManager.orbotLogManager;
import android.os.Bundle;
import android.util.Log;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
import android.view.animation.AnimationUtils;
import android.view.animation.LayoutAnimationController;
import android.view.ViewTreeObserver;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.widget.NestedScrollView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.helpManager.helpController;
import com.darkweb.genesissearchengine.appManager.settingManager.logManager.settingLogController;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.status;
@ -27,13 +26,15 @@ import org.torproject.android.service.wrapper.orbotLocalConstants;
import java.util.Collections;
import java.util.List;
import jp.wasabeef.recyclerview.adapters.AlphaInAnimationAdapter;
public class orbotLogController extends AppCompatActivity {
/* PRIVATE VARIABLES */
private orbotLogModel mOrbotModel;
private orbotLogViewController mOrbotViewController;
private RecyclerView mRecycleView;
private orbotAdapter mOrbotAdapter;
private orbotLogAdapter mOrbotAdapter;
private NestedScrollView mMainScroll;
private FloatingActionButton mFloatingScroller;
@ -41,6 +42,7 @@ public class orbotLogController extends AppCompatActivity {
private boolean mActivityClosed = false;
private int mLogCounter = 0;
private GestureDetector mSwipeDirectionDetector;
private boolean mIsLayoutChanging = false;
/* INITIALIZATIONS */
@ -77,39 +79,51 @@ public class orbotLogController extends AppCompatActivity {
mLogCounter = orbotLocalConstants.mTorLogsHistory.size();
mOrbotModel.setList(orbotLocalConstants.mTorLogsHistory);
LinearLayoutManager layoutManager = new LinearLayoutManager(orbotLogController.this);
orbotAdapter adapter = new orbotAdapter(mOrbotModel.getList(),new orbotLogController.orbotModelCallback());
orbotLogAdapter adapter = new orbotLogAdapter(mOrbotModel.getList(),new orbotLogController.orbotModelCallback());
mOrbotAdapter = adapter;
layoutManager.setReverseLayout(true);
LayoutAnimationController controller = AnimationUtils.loadLayoutAnimation(this, R.anim.log_layout_controller);
mRecycleView.setLayoutAnimation(controller);
mRecycleView.setAdapter(adapter);
mRecycleView.setItemViewCacheSize(100);
mRecycleView.setAdapter(new AlphaInAnimationAdapter(adapter));
mRecycleView.getItemAnimator().setAddDuration(250);
mRecycleView.getItemAnimator().setChangeDuration(250);
mRecycleView.getItemAnimator().setMoveDuration(250);
mRecycleView.getItemAnimator().setRemoveDuration(250);
mRecycleView.setNestedScrollingEnabled(false);
mRecycleView.setItemViewCacheSize(100);
mRecycleView.setDrawingCacheEnabled(true);
mRecycleView.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_HIGH);
mRecycleView.setLayoutManager(new LinearLayoutManager(orbotLogController.this));
mOrbotAdapter.notifyDataSetChanged();
}else {
logToString();
}
mOrbotViewController.onTrigger(orbotLogEnums.eOrbotLogViewCommands.M_INIT_VIEWS, null);
mRecycleView.smoothScrollToPosition(mOrbotModel.getList().size());
}
public void logToString(){
for(int mCounter=0;mCounter<orbotLocalConstants.mTorLogsHistory.size();mCounter++){
mOrbotViewController.onTrigger(orbotLogEnums.eOrbotLogViewCommands.M_UPDATE_LOGS, Collections.singletonList(orbotLocalConstants.mTorLogsHistory.get(mCounter).getLog()));
mLogCounter+=1;
}
}
/* LISTENERS */
private void onInitListener(){
mRecycleView.getViewTreeObserver().addOnGlobalLayoutListener(() -> mIsLayoutChanging = false);
mMainScroll.getViewTreeObserver().addOnScrollChangedListener(() -> {
int scrollY = mMainScroll.getScrollY();
if(scrollY>0){
if(mFloatingScroller.getAlpha()==0){
mFloatingScroller.setVisibility(View.VISIBLE);
mFloatingScroller.animate().alpha(1);
if(status.sLogListView){
if(mMainScroll.canScrollVertically(1)){
if(mFloatingScroller.getAlpha()==0){
mFloatingScroller.setVisibility(View.VISIBLE);
mFloatingScroller.animate().cancel();
mFloatingScroller.animate().alpha(1);
}
}else {
mFloatingScroller.animate().cancel();
mFloatingScroller.animate().alpha(0).withEndAction(() -> mFloatingScroller.setVisibility(View.GONE));
}
}else {
mFloatingScroller.animate().cancel();
mFloatingScroller.animate().alpha(0).withEndAction(() -> mFloatingScroller.setVisibility(View.GONE));
}
});
@ -127,6 +141,7 @@ public class orbotLogController extends AppCompatActivity {
}
public void onUpdateLogs(){
new Thread(){
public void run(){
while (true){
@ -134,29 +149,44 @@ public class orbotLogController extends AppCompatActivity {
if(mActivityClosed){
break;
}
if(orbotLocalConstants.mTorLogsHistory.size()>mLogCounter){
if(!status.sLogListView){
sleep(0);
boolean mLayoutChangeTemp = mIsLayoutChanging;
if(mIsLayoutChanging){
if(status.sLogListView){
sleep(1000);
}else {
sleep(500);
sleep(50);
}
continue;
}else {
sleep(500);
if(status.sLogListView){
sleep(500);
}else {
sleep(50);
}
if(mLayoutChangeTemp != mIsLayoutChanging){
continue;
}
}
if(orbotLocalConstants.mTorLogsHistory.size()>0){
mIsLayoutChanging = true;
runOnUiThread(() -> {
if(orbotLocalConstants.mTorLogsHistory.size()>mLogCounter){
mOrbotModel.getList().add(0,orbotLocalConstants.mTorLogsHistory.get(mLogCounter));
mOrbotModel.getList().add(orbotLocalConstants.mTorLogsHistory.get(mLogCounter));
if(!status.sLogListView){
mOrbotViewController.onTrigger(orbotLogEnums.eOrbotLogViewCommands.M_UPDATE_LOGS, Collections.singletonList(orbotLocalConstants.mTorLogsHistory.get(mLogCounter).getLog()));
mIsLayoutChanging = false;
onScrollBottom(null);
}else {
mOrbotAdapter.notifyItemInserted(0);
mOrbotAdapter.notifyItemChanged(0);
if(mOrbotAdapter!=null){
mOrbotAdapter.notifyItemInserted(mOrbotModel.getList().size()-1);
}
}
mLogCounter+=1;
}else {
mIsLayoutChanging = false;
}
mLogCounter+=1;
});
sleep(500);
}
} catch (InterruptedException e) {
e.printStackTrace();
@ -166,14 +196,29 @@ public class orbotLogController extends AppCompatActivity {
}.start();
}
public void onScrollTop(View view) {
mMainScroll.smoothScrollTo(0,0);
public void onScrollBottom(View view) {
mMainScroll.fullScroll(View.FOCUS_DOWN);
}
public void onOpenInfo(View view) {
helperMethod.openActivity(settingLogController.class, constants.CONST_LIST_HISTORY, this,true);
}
public void onClose(View view){
finish();
activityContextManager.getInstance().onRemoveStack(this);
overridePendingTransition(R.anim.push_anim_in, R.anim.push_anim_out);
mActivityClosed = true;
}
@Override
protected void onDestroy() {
super.onDestroy();
mActivityClosed = true;
}
/* Model Callback */
public class orbotModelCallback implements eventObserver.eventListener{
@Override
public Object invokeObserver(List<Object> data, Object e_type)
@ -182,15 +227,6 @@ public class orbotLogController extends AppCompatActivity {
}
}
/* Helper Methods */
public void onClose(View view){
finish();
activityContextManager.getInstance().onRemoveStack(this);
overridePendingTransition(R.anim.push_anim_in, R.anim.push_anim_out);
mActivityClosed = true;
}
/* LOCAL OVERRIDES */
@Override

View File

@ -19,10 +19,9 @@ class orbotLogModel
if(model.size()>0){
mModelList.clear();
mModelList.addAll(model);
Collections.reverse(mModelList);
}
else {
mModelList.add(0, new logRowModel(constants.CONST_LOGS_DEFAULT_MESSAGE, helperMethod.getCurrentTime()));
mModelList.add(new logRowModel(constants.CONST_LOGS_DEFAULT_MESSAGE, helperMethod.getCurrentTime()));
}
}

View File

@ -63,7 +63,7 @@ class orbotLogViewController
private void onUpdateLogs(String pLogs){
pLogs = "~ " + pLogs;
mLogs.setText(String.format("%s%s", pLogs + "\n\n", mLogs.getText()));
mLogs.setText(String.format("%s%s",mLogs.getText() ,pLogs + "\n\n"));
}
public void onTrigger(orbotLogEnums.eOrbotLogViewCommands pCommands, List<Object> pData){

View File

@ -1,5 +1,6 @@
package com.darkweb.genesissearchengine.appManager.orbotManager;
import android.content.Intent;
import android.os.Bundle;
import android.view.GestureDetector;
import android.view.MotionEvent;
@ -56,7 +57,7 @@ public class orbotController extends AppCompatActivity {
mCustomizableBridgeMenu = findViewById(R.id.pCustomizableBridgeMenu);
mOrbotViewController = new com.darkweb.genesissearchengine.appManager.orbotManager.orbotViewController(mBridgeSwitch, mVpnSwitch, this, mCustomizableBridgeMenu);
mOrbotViewController.onTrigger(orbotEnums.eOrbotViewCommands.M_INIT_UI, Arrays.asList(status.sBridgeVPNStatus,status.sBridgeStatus));
mOrbotViewController.onTrigger(orbotEnums.eOrbotViewCommands.M_INIT_UI, Arrays.asList(status.sVPNStatus,status.sBridgeStatus));
mOrbotModel = new com.darkweb.genesissearchengine.appManager.orbotManager.orbotModel(new orbotModelCallback());
}
@ -90,7 +91,7 @@ public class orbotController extends AppCompatActivity {
public void onBridgeSwitch(View view){
mOrbotModel.onTrigger(orbotEnums.eOrbotModelCommands.M_BRIDGE_SWITCH,Collections.singletonList(!mBridgeSwitch.isChecked()));
mOrbotViewController.onTrigger(orbotEnums.eOrbotViewCommands.M_UPDATE_BRIDGE_SETTINGS_VIEWS, Collections.singletonList(status.sBridgeStatus));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.BRIDGE_BRIDGE_ENABLES,status.sBridgeVPNStatus));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.BRIDGE_ENABLES,status.sBridgeStatus));
}
public void openBridgeSettings(View view){
@ -99,8 +100,8 @@ public class orbotController extends AppCompatActivity {
public void onVPNSwitch(View view){
mOrbotModel.onTrigger(orbotEnums.eOrbotModelCommands.M_VPN_SWITCH,Collections.singletonList(!mVpnSwitch.isChecked()));
mOrbotViewController.onTrigger(orbotEnums.eOrbotViewCommands.M_UPDATE_VPN,Collections.singletonList(status.sBridgeVPNStatus));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.BRIDGE_VPN_ENABLED,status.sBridgeVPNStatus));
mOrbotViewController.onTrigger(orbotEnums.eOrbotViewCommands.M_UPDATE_VPN,Collections.singletonList(status.sVPNStatus));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.VPN_ENABLED,status.sVPNStatus));
}
public void onClose(View view){

View File

@ -28,7 +28,7 @@ class orbotModel
}
public void onVPNSwitch(boolean pStatus){
status.sBridgeVPNStatus = pStatus;
status.sVPNStatus = pStatus;
pluginController.getInstance().onOrbotInvoke(Collections.singletonList(status.sBridgeStatus), pluginEnums.eOrbotManager.M_UPDATE_VPN);
}

View File

@ -7,7 +7,6 @@ import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.helpManager.helpController;
import com.darkweb.genesissearchengine.appManager.orbotLogManager.orbotLogController;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.status;
@ -51,7 +50,7 @@ public class proxyStatusController extends AppCompatActivity {
activityContextManager.getInstance().onStack(this);
mProxyStatusViewController = new proxyStatusViewController(this, mOrbotStatus, mVpnStatus, mBridgeStatus);
mProxyStatusViewController.onTrigger(proxyStatusEnums.eProxyStatusViewCommands.M_INIT_VIEWS, Arrays.asList(pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_GET_ORBOT_STATUS), status.sBridgeVPNStatus,status.sBridgeStatus));
mProxyStatusViewController.onTrigger(proxyStatusEnums.eProxyStatusViewCommands.M_INIT_VIEWS, Arrays.asList(pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_GET_ORBOT_STATUS), status.sVPNStatus,status.sBridgeStatus));
mProxyStatusModel = new proxyStatusModel(new proxyStatusModelCallback());
}
@ -60,7 +59,7 @@ public class proxyStatusController extends AppCompatActivity {
}
public void refreshOrbotStatus(View view) {
mProxyStatusViewController.onTrigger(proxyStatusEnums.eProxyStatusViewCommands.M_INIT_VIEWS, Arrays.asList(pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_GET_ORBOT_STATUS), status.sBridgeVPNStatus,status.sBridgeStatus));
mProxyStatusViewController.onTrigger(proxyStatusEnums.eProxyStatusViewCommands.M_INIT_VIEWS, Arrays.asList(pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_GET_ORBOT_STATUS), status.sVPNStatus,status.sBridgeStatus));
}
/* LISTENERS */

View File

@ -2,8 +2,6 @@ package com.darkweb.genesissearchengine.appManager.settingManager.clearManager;
import android.content.res.ColorStateList;
import android.os.Bundle;
import android.os.Debug;
import android.util.Log;
import android.view.View;
import android.widget.CheckBox;
import androidx.appcompat.app.AppCompatActivity;
@ -153,12 +151,12 @@ public class settingClearController extends AppCompatActivity {
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_SEARCH_SUGGESTION,true));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_JAVA_SCRIPT,true));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_HISTORY_CLEAR,true));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_GATEWAY_AUTO,true));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_GATEWAY,true));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_GATEWAY_MANUAL,false));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_IS_WELCOME_ENABLED,true));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.PROXY_IS_APP_RATED,false));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.BRIDGE_VPN_ENABLED,false));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.BRIDGE_BRIDGE_ENABLES,true));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.VPN_ENABLED,false));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.BRIDGE_ENABLES,true));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_FONT_ADJUSTABLE,true));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_ZOOM,true));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_VOICE_INPUT,true));

View File

@ -2,18 +2,14 @@ package com.darkweb.genesissearchengine.appManager.settingManager.generalManager
import android.content.res.Configuration;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.widget.RadioButton;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatDelegate;
import androidx.recyclerview.widget.LinearLayoutManager;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.helpManager.helpController;
import com.darkweb.genesissearchengine.appManager.languageManager.languageController;
import com.darkweb.genesissearchengine.appManager.settingManager.settingHomePage.settingHomeController;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.enums;
import com.darkweb.genesissearchengine.constants.keys;
@ -29,7 +25,6 @@ import com.google.android.material.switchmaterial.SwitchMaterial;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
public class settingGeneralController extends AppCompatActivity {
@ -44,6 +39,10 @@ public class settingGeneralController extends AppCompatActivity {
private RadioButton mThemeDefault;
private TextView mHomePageText;
/* PRIVATE LOCAL VARIABLES */
private Boolean mIsThemeChanging = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
@ -108,6 +107,18 @@ public class settingGeneralController extends AppCompatActivity {
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
mIsThemeChangable = true;
}
}else {
if(!status.sDefaultNightMode){
if(AppCompatDelegate.getDefaultNightMode() != AppCompatDelegate.MODE_NIGHT_NO){
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
mIsThemeChangable = true;
}
}else {
if(AppCompatDelegate.getDefaultNightMode() != AppCompatDelegate.MODE_NIGHT_YES){
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
mIsThemeChangable = true;
}
}
}
if(mIsThemeChangable){
@ -181,29 +192,35 @@ public class settingGeneralController extends AppCompatActivity {
}
public void onSelectTheme(View view){
if(view.getId() == R.id.pOption1){
if(status.sTheme != enums.Theme.THEME_DARK) {
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_RESET_THEME, null);
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_SET_THEME, Collections.singletonList(enums.Theme.THEME_DARK));
mSettingGeneralModel.onTrigger(settingGeneralEnums.eGeneralModel.M_SELECT_THEME, Collections.singletonList(enums.Theme.THEME_DARK));
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_UPDATE_THEME_BLOCKER, Collections.singletonList(enums.Theme.THEME_DARK));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_INT, Arrays.asList(keys.SETTING_THEME,status.sTheme));
}
}else if(view.getId() == R.id.pOption2) {
if(status.sTheme != enums.Theme.THEME_LIGHT) {
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_RESET_THEME, null);
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_SET_THEME, Collections.singletonList(enums.Theme.THEME_LIGHT));
mSettingGeneralModel.onTrigger(settingGeneralEnums.eGeneralModel.M_SELECT_THEME, Collections.singletonList(enums.Theme.THEME_LIGHT));
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_UPDATE_THEME_BLOCKER, Collections.singletonList(enums.Theme.THEME_LIGHT));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_INT, Arrays.asList(keys.SETTING_THEME,status.sTheme));
}
}else {
if(status.sTheme != enums.Theme.THEME_DEFAULT) {
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_RESET_THEME, null);
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_SET_THEME, Collections.singletonList(enums.Theme.THEME_DEFAULT));
mSettingGeneralModel.onTrigger(settingGeneralEnums.eGeneralModel.M_SELECT_THEME, Collections.singletonList(enums.Theme.THEME_DEFAULT));
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_UPDATE_THEME_BLOCKER, Collections.singletonList(enums.Theme.THEME_DEFAULT));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_INT, Arrays.asList(keys.SETTING_THEME,status.sTheme));
if(!mIsThemeChanging){
mIsThemeChanging = true;
if(view.getId() == R.id.pOption1){
if(status.sTheme != enums.Theme.THEME_DARK) {
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_RESET_THEME, null);
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_SET_THEME, Collections.singletonList(enums.Theme.THEME_DARK));
mSettingGeneralModel.onTrigger(settingGeneralEnums.eGeneralModel.M_SELECT_THEME, Collections.singletonList(enums.Theme.THEME_DARK));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_INT, Arrays.asList(keys.SETTING_THEME,status.sTheme));
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_UPDATE_THEME_BLOCKER, Collections.singletonList(enums.Theme.THEME_DARK));
mIsThemeChanging = false;
}
}else if(view.getId() == R.id.pOption2) {
if(status.sTheme != enums.Theme.THEME_LIGHT) {
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_RESET_THEME, null);
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_SET_THEME, Collections.singletonList(enums.Theme.THEME_LIGHT));
mSettingGeneralModel.onTrigger(settingGeneralEnums.eGeneralModel.M_SELECT_THEME, Collections.singletonList(enums.Theme.THEME_LIGHT));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_INT, Arrays.asList(keys.SETTING_THEME,status.sTheme));
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_UPDATE_THEME_BLOCKER, Collections.singletonList(enums.Theme.THEME_LIGHT));
mIsThemeChanging = false;
}
}else {
if(status.sTheme != enums.Theme.THEME_DEFAULT) {
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_RESET_THEME, null);
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_SET_THEME, Collections.singletonList(enums.Theme.THEME_DEFAULT));
mSettingGeneralModel.onTrigger(settingGeneralEnums.eGeneralModel.M_SELECT_THEME, Collections.singletonList(enums.Theme.THEME_DEFAULT));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_INT, Arrays.asList(keys.SETTING_THEME,status.sTheme));
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_UPDATE_THEME_BLOCKER, Collections.singletonList(enums.Theme.THEME_DEFAULT));
mIsThemeChanging = false;
}
}
}
}

View File

@ -20,6 +20,7 @@ import java.util.Collections;
import java.util.List;
import static com.darkweb.genesissearchengine.appManager.settingManager.generalManager.settingGeneralEnums.eGeneralViewCallback.M_RESET_THEME_INVOKED_BACK;
import static com.flurry.sdk.jo.v;
class settingGeneralViewController
{
@ -108,12 +109,14 @@ class settingGeneralViewController
mThemeDark.setButtonTintList(ColorStateList.valueOf(ContextCompat.getColor(mContext, R.color.c_radio_tint_default)));
mThemeLight.setButtonTintList(ColorStateList.valueOf(ContextCompat.getColor(mContext, R.color.c_radio_tint_default)));
mThemeDefault.setButtonTintList(ColorStateList.valueOf(ContextCompat.getColor(mContext, R.color.c_radio_tint_default)));
mThemeDark.setChecked(false);
mThemeLight.setChecked(false);
mThemeDefault.setChecked(false);
}
private void setThemeLight(int pTheme){
private void setTheme(int pTheme){
if(pTheme == enums.Theme.THEME_LIGHT){
mThemeLight.setButtonTintList(ColorStateList.valueOf(ContextCompat.getColor(mContext, R.color.c_radio_tint)));
mThemeLight.setChecked(true);
@ -128,7 +131,7 @@ class settingGeneralViewController
public Object onTrigger(settingGeneralEnums.eGeneralViewController pCommands, List<Object> pData){
if(pCommands.equals(settingGeneralEnums.eGeneralViewController.M_SET_THEME)){
setThemeLight((int)pData.get(0));
setTheme((int)pData.get(0));
}
else if(pCommands.equals(settingGeneralEnums.eGeneralViewController.M_RESET_THEME)){
resetThemeSelection();

View File

@ -1,6 +1,7 @@
package com.darkweb.genesissearchengine.appManager.settingManager.logManager;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
@ -98,8 +99,13 @@ public class settingLogController extends AppCompatActivity {
public void onSwitchLogUIMode(View view){
mSettingLogModel.onTrigger(settingLogEnums.eLogModel.M_SWITCH_LOG_VIEW, Collections.singletonList(!mListView.isChecked()));
mListView.toggle();
activityContextManager.getInstance().getOrbotLogController().initializeLogs();
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_LIST_VIEW, status.sLogListView));
final Handler handler = new Handler();
handler.postDelayed(() ->
{
activityContextManager.getInstance().getOrbotLogController().recreate();
}, 250);
}
public void onOpenInfo(View view) {

View File

@ -6,6 +6,7 @@ import android.widget.RadioButton;
import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.helpManager.helpController;
import com.darkweb.genesissearchengine.appManager.settingManager.trackingManager.settingTrackingController;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.constants.status;
@ -29,7 +30,6 @@ public class settingPrivacyController extends AppCompatActivity {
private settingPrivacyViewController mSettingPrivacyViewController;
private SwitchMaterial mJavaScript;
private SwitchMaterial mDoNotTrack;
private SwitchMaterial mTrackingProtection;
private SwitchMaterial mClearDataOnExit;
private ArrayList<RadioButton> mCookie = new ArrayList<>();
private boolean mSettingChanged = false;
@ -47,7 +47,6 @@ public class settingPrivacyController extends AppCompatActivity {
private void viewsInitializations() {
mJavaScript = findViewById(R.id.pJavascript);
mDoNotTrack = findViewById(R.id.pDoNotTrack);
mTrackingProtection = findViewById(R.id.pTrackingProtection);
mClearDataOnExit = findViewById(R.id.pClearDataOnExit);
mCookie.add(findViewById(R.id.pCookieRadioOption1));
mCookie.add(findViewById(R.id.pCookieRadioOption2));
@ -55,7 +54,7 @@ public class settingPrivacyController extends AppCompatActivity {
mCookie.add(findViewById(R.id.pCookieRadioOption4));
activityContextManager.getInstance().onStack(this);
mSettingPrivacyViewController = new settingPrivacyViewController(this, new settingPrivacyController.settingAccessibilityViewCallback(), mJavaScript, mDoNotTrack, mTrackingProtection, mClearDataOnExit, mCookie);
mSettingPrivacyViewController = new settingPrivacyViewController(this, new settingPrivacyController.settingAccessibilityViewCallback(), mJavaScript, mDoNotTrack, mClearDataOnExit, mCookie);
mSettingPrivacyModel = new settingPrivacyModel(new settingPrivacyController.settingAccessibilityModelCallback());
}
@ -129,13 +128,6 @@ public class settingPrivacyController extends AppCompatActivity {
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_DONOT_TRACK,status.sStatusDoNotTrack));
}
public void onTrackingProtection(View view){
mSettingChanged = true;
mSettingPrivacyModel.onTrigger(settingPrivacyEnums.ePrivacyModel.M_SET_TRACKING_PROTECTION, Collections.singletonList(!status.sSettingTrackingProtection));
mTrackingProtection.toggle();
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_TRACKING_PROTECTION,status.sSettingTrackingProtection));
}
public void onCookies(View view){
mSettingChanged = true;
mSettingPrivacyViewController.onTrigger(settingPrivacyEnums.ePrivacyViewController.M_SET_COOKIE_STATUS, Collections.singletonList(view));
@ -154,4 +146,8 @@ public class settingPrivacyController extends AppCompatActivity {
helperMethod.openActivity(helpController.class, constants.CONST_LIST_HISTORY, this,true);
}
public void onManageTracking(View view) {
helperMethod.openActivity(settingTrackingController.class, constants.CONST_LIST_HISTORY, this,true);
}
}

View File

@ -35,10 +35,6 @@ class settingPrivacyModel
status.sStatusDoNotTrack = pStatus;
}
private void onTrackingProtection(boolean pStatus){
status.sSettingTrackingProtection = pStatus;
}
private void onCookies(View pView){
if(pView.getId() == R.id.pCookieOption1){
status.sSettingCookieStatus = ACCEPT_ALL;
@ -65,9 +61,6 @@ class settingPrivacyModel
else if(pCommands.equals(settingPrivacyEnums.ePrivacyModel.M_SET_DONOT_TRACK)){
onDoNotTrack((boolean)pData.get(0));
}
else if(pCommands.equals(settingPrivacyEnums.ePrivacyModel.M_SET_TRACKING_PROTECTION)){
onTrackingProtection((boolean)pData.get(0));
}
else if(pCommands.equals(settingPrivacyEnums.ePrivacyModel.M_SET_COOKIES)){
onCookies((View) pData.get(0));
}

View File

@ -28,18 +28,16 @@ class settingPrivacyViewController
private AppCompatActivity mContext;
private SwitchMaterial mJavaScript;
private SwitchMaterial mDoNotTrack;
private SwitchMaterial mTrackingProtection;
private SwitchMaterial mClearDataOnExit;
private ArrayList<RadioButton> mCookie;
/*Initializations*/
settingPrivacyViewController(settingPrivacyController pContext, eventObserver.eventListener pEvent, SwitchMaterial pJavaScript, SwitchMaterial pDoNotTrack, SwitchMaterial pTrackingProtection, SwitchMaterial pClearDataOnExit, ArrayList<RadioButton> pCookie)
settingPrivacyViewController(settingPrivacyController pContext, eventObserver.eventListener pEvent, SwitchMaterial pJavaScript, SwitchMaterial pDoNotTrack, SwitchMaterial pClearDataOnExit, ArrayList<RadioButton> pCookie)
{
this.mEvent = pEvent;
this.mContext = pContext;
this.mJavaScript = pJavaScript;
this.mTrackingProtection = pTrackingProtection;
this.mClearDataOnExit = pClearDataOnExit;
this.mCookie = pCookie;
this.mDoNotTrack = pDoNotTrack;
@ -78,12 +76,6 @@ class settingPrivacyViewController
this.mClearDataOnExit.setChecked(false);
}
if(status.sSettingTrackingProtection){
this.mTrackingProtection.setChecked(true);
}else{
this.mTrackingProtection.setChecked(false);
}
if(status.sStatusDoNotTrack){
this.mDoNotTrack.setChecked(true);
}else{

View File

@ -15,6 +15,7 @@ import com.darkweb.genesissearchengine.appManager.settingManager.generalManager.
import com.darkweb.genesissearchengine.appManager.settingManager.notificationManager.settingNotificationController;
import com.darkweb.genesissearchengine.appManager.settingManager.privacyManager.settingPrivacyController;
import com.darkweb.genesissearchengine.appManager.settingManager.searchEngineManager.settingSearchController;
import com.darkweb.genesissearchengine.appManager.settingManager.trackingManager.settingTrackingController;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.constants.status;
@ -173,6 +174,10 @@ public class settingHomeController extends AppCompatActivity
helperMethod.openActivity(settingAdvanceController.class, constants.CONST_LIST_HISTORY, this,true);
}
public void onManageTracking(View view) {
helperMethod.openActivity(settingTrackingController.class, constants.CONST_LIST_HISTORY, this,true);
}
public void onOpenInfo(View view) {
helperMethod.openActivity(helpController.class, constants.CONST_LIST_HISTORY, this,true);
}

View File

@ -0,0 +1,120 @@
package com.darkweb.genesissearchengine.appManager.settingManager.trackingManager;
import android.os.Bundle;
import android.view.View;
import android.widget.RadioButton;
import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.helpManager.helpController;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.dataManager.dataController;
import com.darkweb.genesissearchengine.dataManager.dataEnums;
import com.darkweb.genesissearchengine.helperManager.eventObserver;
import com.darkweb.genesissearchengine.helperManager.helperMethod;
import com.darkweb.genesissearchengine.pluginManager.pluginController;
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
import com.example.myapplication.R;
import com.google.android.material.switchmaterial.SwitchMaterial;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
public class settingTrackingController extends AppCompatActivity {
/* PRIVATE VARIABLES */
private settingTrackingModel mSettingPrivacyModel;
private settingTrackingViewController mSettingPrivacyViewController;
private ArrayList<RadioButton> mTrackers = new ArrayList<>();
private boolean mSettingChanged = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
super.onCreate(savedInstanceState);
setContentView(R.layout.setting_tracking_view);
viewsInitializations();
}
private void viewsInitializations() {
mTrackers.add(findViewById(R.id.pTrackingRadioOption1));
mTrackers.add(findViewById(R.id.pTrackingRadioOption2));
mTrackers.add(findViewById(R.id.pTrackingRadioOption3));
activityContextManager.getInstance().onStack(this);
mSettingPrivacyViewController = new settingTrackingViewController(this, new settingTrackingController.settingAccessibilityViewCallback(), mTrackers);
mSettingPrivacyModel = new settingTrackingModel(new settingTrackingController.settingAccessibilityModelCallback());
}
/*View Callbacks*/
private class settingAccessibilityViewCallback implements eventObserver.eventListener{
@Override
public Object invokeObserver(List<Object> data, Object e_type)
{
return null;
}
}
/*Model Callbacks*/
private class settingAccessibilityModelCallback implements eventObserver.eventListener{
@Override
public Object invokeObserver(List<Object> data, Object e_type)
{
return null;
}
}
/* LOCAL OVERRIDES */
@Override
public void onResume()
{
if(mSettingChanged){
activityContextManager.getInstance().setCurrentActivity(this);
}
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_RESUME);
super.onResume();
}
@Override
public void onPause()
{
super.onPause();
}
@Override
public void onBackPressed() {
if(mSettingChanged){
activityContextManager.getInstance().setCurrentActivity(this);
activityContextManager.getInstance().getHomeController().initRuntimeSettings();
}
activityContextManager.getInstance().onRemoveStack(this);
finish();
}
/*UI Redirection*/
public void onClose(View view){
onBackPressed();
}
public void onTracking(View view){
mSettingChanged = true;
mSettingPrivacyViewController.onTrigger(settingTrackingEnums.eTrackingViewController.M_SET_TRACKING_STATUS, Collections.singletonList(view));
mSettingPrivacyModel.onTrigger(settingTrackingEnums.eTrackingModel.M_SET_TRACKING_PROTECTION, Collections.singletonList(view));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_INT, Arrays.asList(keys.SETTING_COOKIE_ADJUSTABLE,status.sSettingCookieStatus));
}
public void onOpenInfo(View view) {
helperMethod.openActivity(helpController.class, constants.CONST_LIST_HISTORY, this,true);
}
}

View File

@ -0,0 +1,14 @@
package com.darkweb.genesissearchengine.appManager.settingManager.trackingManager;
class settingTrackingEnums
{
/*History Manager*/
public enum eTrackingModel {
M_SET_TRACKING_PROTECTION
}
public enum eTrackingViewController {
M_SET_TRACKING_STATUS
}
}

View File

@ -0,0 +1,52 @@
package com.darkweb.genesissearchengine.appManager.settingManager.trackingManager;
import android.view.View;
import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.dataManager.dataEnums;
import com.darkweb.genesissearchengine.helperManager.eventObserver;
import com.example.myapplication.R;
import org.mozilla.geckoview.ContentBlocking;
import java.util.Arrays;
import java.util.List;
import static org.mozilla.geckoview.ContentBlocking.CookieBehavior.ACCEPT_ALL;
import static org.mozilla.geckoview.ContentBlocking.CookieBehavior.ACCEPT_FIRST_PARTY;
import static org.mozilla.geckoview.ContentBlocking.CookieBehavior.ACCEPT_NONE;
import static org.mozilla.geckoview.ContentBlocking.CookieBehavior.ACCEPT_NON_TRACKERS;
class settingTrackingModel
{
/*Variable Declaration*/
private eventObserver.eventListener mEvent;
/*Initializations*/
settingTrackingModel(eventObserver.eventListener mEvent){
this.mEvent = mEvent;
}
/*Helper Methods*/
private void onTracking(View pView){
if(pView.getId() == R.id.pTrackingOption1){
status.sSettingTrackingProtection = ContentBlocking.AntiTracking.NONE;
}
if(pView.getId() == R.id.pTrackingOption2){
status.sSettingTrackingProtection = ContentBlocking.AntiTracking.DEFAULT;
}
if(pView.getId() == R.id.pTrackingOption3){
status.sSettingTrackingProtection = ContentBlocking.AntiTracking.STRICT;
}
}
public Object onTrigger(settingTrackingEnums.eTrackingModel pCommands, List<Object> pData){
if(pCommands.equals(settingTrackingEnums.eTrackingModel.M_SET_TRACKING_PROTECTION)){
onTracking((View) pData.get(0));
}
return null;
}
}

View File

@ -0,0 +1,103 @@
package com.darkweb.genesissearchengine.appManager.settingManager.trackingManager;
import android.content.res.ColorStateList;
import android.os.Build;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.RadioButton;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatDelegate;
import androidx.core.content.ContextCompat;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.helperManager.eventObserver;
import com.example.myapplication.R;
import org.mozilla.geckoview.ContentBlocking;
import java.util.ArrayList;
import java.util.List;
class settingTrackingViewController
{
/*Private Variables*/
private AppCompatActivity mContext;
private eventObserver.eventListener mEvent;
private ArrayList<RadioButton> mTracking;
/*Initializations*/
settingTrackingViewController(AppCompatActivity pContext, eventObserver.eventListener pEvent, ArrayList<RadioButton> pTracking)
{
this.mEvent = pEvent;
this.mTracking = pTracking;
this.mContext = pContext;
initViews();
initPostUI();
}
private void initPostUI(){
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Window window = mContext.getWindow();
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) {
window.setStatusBarColor(mContext.getResources().getColor(R.color.blue_dark));
}
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 initViews(){
clearTrackersSetting();
if(status.sSettingTrackingProtection == ContentBlocking.AntiTracking.NONE){
mTracking.get(0).setButtonTintList(ColorStateList.valueOf(ContextCompat.getColor(mContext, R.color.c_radio_tint)));
mTracking.get(0).setChecked(true);
}
if(status.sSettingTrackingProtection == ContentBlocking.AntiTracking.DEFAULT){
mTracking.get(1).setButtonTintList(ColorStateList.valueOf(ContextCompat.getColor(mContext, R.color.c_radio_tint)));
mTracking.get(1).setChecked(true);
}
if(status.sSettingTrackingProtection == ContentBlocking.AntiTracking.STRICT){
mTracking.get(2).setButtonTintList(ColorStateList.valueOf(ContextCompat.getColor(mContext, R.color.c_radio_tint)));
mTracking.get(2).setChecked(true);
}
}
private void clearTrackersSetting(){
for(int mCounter=0; mCounter<mTracking.size();mCounter++){
mTracking.get(mCounter).setButtonTintList(ColorStateList.valueOf(ContextCompat.getColor(mContext, R.color.c_radio_tint_default)));
mTracking.get(mCounter).setChecked(false);
}
}
private void setCookieStatus(View pView){
clearTrackersSetting();
if(pView.getId() == R.id.pTrackingOption1){
mTracking.get(0).setButtonTintList(ColorStateList.valueOf(ContextCompat.getColor(mContext, R.color.c_radio_tint)));
mTracking.get(0).setChecked(true);
}
else if(pView.getId() == R.id.pTrackingOption2){
mTracking.get(1).setButtonTintList(ColorStateList.valueOf(ContextCompat.getColor(mContext, R.color.c_radio_tint)));
mTracking.get(1).setChecked(true);
}
else if(pView.getId() == R.id.pTrackingOption3){
mTracking.get(2).setButtonTintList(ColorStateList.valueOf(ContextCompat.getColor(mContext, R.color.c_radio_tint)));
mTracking.get(2).setChecked(true);
}
}
public Object onTrigger(settingTrackingEnums.eTrackingViewController pCommands, List<Object> pData){
if(pCommands.equals(settingTrackingEnums.eTrackingViewController.M_SET_TRACKING_STATUS)){
setCookieStatus((View)pData.get(0));
}
return null;
}
}

View File

@ -60,7 +60,6 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.tab_row_view, parent, false);
return new listViewHolder(view);
}
@Override
public void onBindViewHolder(@NonNull tabAdapter.listViewHolder holder, int position)
{
@ -248,10 +247,13 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
}else {
itemView.setVisibility(View.VISIBLE);
mLongPressMenuEnabled = false;
mItemSelectionMenuButton.animate().cancel();
mItemSelectionMenuButton.animate().setDuration(250).alpha(1);
}
}else {
itemView.setVisibility(View.VISIBLE);
mLongPressMenuEnabled = false;
mItemSelectionMenuButton.animate().setDuration(250).alpha(1);
}
}
@ -292,15 +294,24 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
break;
}
}
mModelList.remove(this.getLayoutPosition());
notifyItemRemoved(this.getLayoutPosition());
notifyItemChanged(mModelList.size()-1);
notifyItemRangeChanged(this.getLayoutPosition(), mModelList.size());
if(mModelList.size()==1){
mModelList.remove(this.getLayoutPosition());
notifyItemRemoved(this.getLayoutPosition());
notifyItemChanged(mModelList.size()-1);
notifyItemRangeChanged(this.getLayoutPosition(), mModelList.size());
}
mEvent.invokeObserver(Collections.singletonList(this.getLayoutPosition()), tabEnums.eTabAdapterCallback.ON_REMOVE_TAB_VIEW);
}
else if(v.getId() == R.id.pItemSelectionMenuButton){
onEnableLongClickMenu();
v.animate().cancel();
v.animate().setDuration(350).alpha(0);
mEvent.invokeObserver(null, tabEnums.eTabAdapterCallback.ON_SHOW_SELECTION);
}
}

View File

@ -4,6 +4,7 @@ import android.graphics.Canvas;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
@ -15,8 +16,8 @@ import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.SimpleItemAnimator;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.homeManager.geckoSession;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController;
import com.darkweb.genesissearchengine.appManager.homeManager.geckoManager.geckoSession;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
import com.darkweb.genesissearchengine.appManager.settingManager.settingHomePage.settingHomeController;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.keys;
@ -40,7 +41,7 @@ public class tabController extends AppCompatActivity
/*Private Views*/
private Button mTabs;
private ImageView mRemoveSelection;
private LinearLayout mTabsContainer;
private FrameLayout mTabsContainer;
private ImageButton mMenuButton;
private ImageButton mClearSelection;
private View mPopupUndo;
@ -152,13 +153,13 @@ public class tabController extends AppCompatActivity
}
public void onInitRemoveView(int pIndex, boolean pCreateBackup){
onRemoveTab(pIndex);
onShowUndoDialog();
if(mListModel.onGetBackup().size()>=mListModel.getList().size()){
mRecycleView.animate().setStartDelay(0).alpha(0);
mListModel.onRemoveTab(pIndex);
mListModel.getList().remove(pIndex);
if(mListModel.getList().size()<1){
mRecycleView.animate().setStartDelay(150).alpha(0);
}
initTabCount();
mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.INIT_FIRST_ROW, null);
mTabAdapter.notifyItemRangeChanged(pIndex, mTabAdapter.getItemCount() - pIndex);
}
public void initTabCount()

View File

@ -2,21 +2,10 @@ package com.darkweb.genesissearchengine.appManager.tabManager;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.se.omapi.Session;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.homeManager.geckoSession;
import com.darkweb.genesissearchengine.dataManager.dataController;
import com.darkweb.genesissearchengine.dataManager.dataEnums;
import com.darkweb.genesissearchengine.appManager.homeManager.geckoManager.geckoSession;
import com.darkweb.genesissearchengine.helperManager.helperMethod;
import org.mozilla.geckoview.GeckoSession;
import org.mozilla.geckoview.GeckoView;
import java.sql.Blob;
import java.util.Calendar;
import java.util.UUID;
public class tabRowModel
{
/*Private Variables*/

View File

@ -17,6 +17,7 @@ import android.view.Window;
import android.view.WindowManager;
import android.widget.ActionMenuView;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
@ -44,7 +45,7 @@ class tabViewController
private PopupWindow mTabOptionMenu = null;
private Button mTabs;
private ImageView mRemoveSelection;
private LinearLayout mTabsContainer;
private FrameLayout mTabsContainer;
private ImageButton mMenuButton;
private ImageButton mClearSelection;
private View mToastLayoutRoot;
@ -57,7 +58,7 @@ class tabViewController
/*Initializations*/
tabViewController(AppCompatActivity mContext, Button pTabs, ImageView pRemoveSelection, LinearLayout pTabsContainer, ImageButton pMenuButton, ImageButton pClearSelection, View pToastLayoutRoot, TextView pSelectionCount, ImageView pBlocker)
tabViewController(AppCompatActivity mContext, Button pTabs, ImageView pRemoveSelection, FrameLayout pTabsContainer, ImageButton pMenuButton, ImageButton pClearSelection, View pToastLayoutRoot, TextView pSelectionCount, ImageView pBlocker)
{
this.mContext = mContext;
this.mTabs = pTabs;

View File

@ -17,6 +17,7 @@ public class constants
/*URL CONSTANTS*/
public static final String CONST_GENESIS_URL_CACHED = "resource://android/assets/homepage/homepage.html";
public static final String CONST_GENESIS_ERROR_CACHED = "resource://android/assets/error/error.html";
public static final String CONST_GENESIS_DOMAIN_URL_SLASHED = "https://boogle.store/";
public static final String CONST_GENESIS_DOMAIN_URL = "https://boogle.store";
public static final String CONST_GENESIS_HELP_URL_CACHE = "resource://android/assets/help/help.html";

View File

@ -8,7 +8,7 @@ public class enums
on_verify_selected_url_menu,FINDER_RESULT_CALLBACK,
welcome, reload,download_folder,
url_triggered, url_triggered_new_tab,url_clear,fetch_favicon,url_clear_at,remove_from_database,is_empty,M_HOME_PAGE,M_PRELOAD_URL,ON_KEYBOARD_CLOSE,
on_close_sesson,on_long_press, on_full_screen,on_handle_external_intent,on_update_suggestion_url,progress_update,recheck_orbot,on_url_load,on_playstore_load,back_list_empty,start_proxy, ON_UPDATE_THEME,on_request_completed, on_update_history,on_update_suggestion,M_WELCOME_MESSAGE,ON_UPDATE_TITLE_BAR,ON_FIRST_PAINT, ON_LOAD_TAB_ON_RESUME, ON_SESSION_REINIT,on_page_loaded,on_load_error,download_file_popup,on_init_ads,search_update, open_new_tab
on_close_sesson,on_long_press, on_full_screen,on_handle_external_intent,on_update_suggestion_url,progress_update,recheck_orbot,on_url_load,on_playstore_load,back_list_empty,start_proxy, ON_UPDATE_THEME, M_INITIALIZE_TAB_SINGLE, M_INITIALIZE_TAB_LINK,on_request_completed, on_update_history,on_update_suggestion,M_WELCOME_MESSAGE,ON_UPDATE_TITLE_BAR,ON_FIRST_PAINT, ON_LOAD_TAB_ON_RESUME, ON_SESSION_REINIT,on_page_loaded,on_load_error,download_file_popup,on_init_ads,search_update, open_new_tab
}
/*General Enums*/

View File

@ -29,7 +29,7 @@ public class keys
public static final String SETTING_FIRST_INSTALLED = "FIRST_INSTALLED";
public static final String SETTING_JAVA_SCRIPT = "JAVA_SCRIPT";
public static final String SETTING_HISTORY_CLEAR = "HISTORY_CLEAR";
public static final String SETTING_GATEWAY_AUTO = "pref_bridges_enabled_auto";
public static final String SETTING_GATEWAY = "pref_bridges_enabled_auto";
public static final String SETTING_GATEWAY_MANUAL = "pref_bridges_enabled_manual";
public static final String SETTING_IS_BOOTSTRAPPED = "IS_BOOTSTRAPPED";
public static final String SETTING_IS_WELCOME_ENABLED = "IS_WELCOME_ENABLED";
@ -57,8 +57,8 @@ public class keys
/*Bridge Settings*/
public static final String BRIDGE_CUSTOM_BRIDGE_1 = "CLEAR_PREFS";
public static final String BRIDGE_BRIDGE_ENABLES = "S_BRIDGE_ENABLES";
public static final String BRIDGE_VPN_ENABLED = "S_VPN_ENABLED";
public static final String BRIDGE_NOTIFICATION = "BRIDGE_NOTIFICATION";
public static final String BRIDGE_ENABLES = "pref_bridges_enabled";
public static final String VPN_ENABLED = "pref_vpn";
}

View File

@ -3,6 +3,8 @@ package com.darkweb.genesissearchengine.constants;
import com.darkweb.genesissearchengine.dataManager.dataController;
import com.darkweb.genesissearchengine.dataManager.dataEnums;
import org.mozilla.geckoview.ContentBlocking;
import java.util.Arrays;
import static org.mozilla.geckoview.ContentBlocking.CookieBehavior.ACCEPT_FIRST_PARTY;
@ -12,7 +14,6 @@ public class status
/*App Status*/
public static boolean sPaidStatus = true;
public static String sAppCurrentABI = "7.0";
public static String mCurrentReloadURL = "";
public static int mNotificationID = 1001;
@ -37,7 +38,7 @@ public class status
public static boolean sSettingIsAppRated = false;
public static boolean sSettingFontAdjustable = true;
public static boolean sSettingFirstStart = true;
public static boolean sSettingTrackingProtection = true;
public static int sSettingTrackingProtection = 0;
public static boolean mThemeApplying = false;
public static boolean sStatusDoNotTrack = true;
@ -46,22 +47,22 @@ public class status
public static boolean sShowWebFonts = true;
public static boolean sToolbarTheme = false;
public static boolean sFullScreenBrowsing = false;
public static boolean sOpenURLInNewTab = false;
public static boolean sOpenURLInNewTab = true;
public static boolean sDefaultNightMode;
public static boolean sLogListView;
public static float sSettingFontSize = 1;
public static int sTheme = enums.Theme.THEME_DEFAULT;
public static int sSettingCookieStatus = ACCEPT_FIRST_PARTY;
public static int sSettingCookieStatus = ContentBlocking.AntiTracking.DEFAULT;
public static int sShowImages = -1;
/*Bridge Status*/
public static String sBridgeCustomBridge = strings.BRIDGE_CUSTOM_BRIDGE_OBFS4;
public static String sBridgeCustomBridge = strings.GENERIC_EMPTY_STR;
public static boolean sBridgeGatewayAuto = false;
public static boolean sBridgeGatewayManual = false;
public static boolean sBridgeVPNStatus = false;
public static boolean sVPNStatus = false;
public static boolean sBridgeStatus = false;
public static int sBridgeNotificationManual = 0;
@ -72,17 +73,17 @@ public class status
status.sSearchSuggestionStatus = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_SEARCH_SUGGESTION,true));
status.sSettingJavaStatus = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_JAVA_SCRIPT,true));
status.sClearOnExit = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_HISTORY_CLEAR,true));
status.sBridgeGatewayAuto = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_GATEWAY_AUTO,true));
status.sBridgeGatewayAuto = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_GATEWAY,true));
status.sBridgeGatewayManual = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_GATEWAY_MANUAL,false));
status.sSettingIsWelcomeEnabled = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_IS_WELCOME_ENABLED,true));
status.sSettingIsAppRated = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.PROXY_IS_APP_RATED,false));
status.sBridgeVPNStatus = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.BRIDGE_VPN_ENABLED,false));
status.sBridgeStatus = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.BRIDGE_BRIDGE_ENABLES,true));
status.sVPNStatus = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.VPN_ENABLED,false));
status.sBridgeStatus = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.BRIDGE_ENABLES,true));
status.sSettingFontAdjustable = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_FONT_ADJUSTABLE,true));
status.sSettingFirstStart = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_FIRST_INSTALLED,true));
status.sSettingEnableZoom = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_ZOOM,true));
status.sSettingEnableVoiceInput = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_VOICE_INPUT,true));
status.sSettingTrackingProtection = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_TRACKING_PROTECTION,true));
status.sSettingTrackingProtection = (int)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_INT, Arrays.asList(keys.SETTING_TRACKING_PROTECTION, ContentBlocking.AntiTracking.DEFAULT));
status.sStatusDoNotTrack = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_DONOT_TRACK,true));
status.sSettingCookieStatus = (int)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_INT, Arrays.asList(keys.SETTING_COOKIE_ADJUSTABLE,ACCEPT_FIRST_PARTY));
status.sSettingFontSize = (int)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_FLOAT, Arrays.asList(keys.SETTING_FONT_SIZE,100));
@ -100,7 +101,7 @@ public class status
status.sToolbarTheme = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_TOOLBAR_THEME,true));
status.sFullScreenBrowsing = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_FULL_SCREEN_BROWSIING,true));
status.sTheme = (int)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_INT, Arrays.asList(keys.SETTING_THEME,enums.Theme.THEME_DEFAULT));
status.sOpenURLInNewTab = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_OPEN_URL_IN_NEW_TAB,false));
status.sOpenURLInNewTab = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_OPEN_URL_IN_NEW_TAB,true));
status.sLogListView = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_LIST_VIEW,true));
}

View File

@ -2,11 +2,8 @@ package com.darkweb.genesissearchengine.dataManager;
import com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkRowModel;
import com.darkweb.genesissearchengine.appManager.databaseManager.databaseController;
import com.darkweb.genesissearchengine.appManager.historyManager.historyRowModel;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.constants.strings;
import java.util.ArrayList;
import java.util.List;
@ -71,22 +68,6 @@ public class bookmarkDataModel {
databaseController.getInstance().execSQL("delete from bookmark where id="+ pID,null);
}
public ArrayList<historyRowModel> getSuggestions(String pQuery){
pQuery = pQuery.toLowerCase();
ArrayList<historyRowModel> mModel = new ArrayList<>();
if(status.sSettingSearchHistory) {
for (int count = 0; count <= mBookmarks.size() - 1 && mBookmarks.size() < 500; count++) {
if (mBookmarks.get(count).getHeader().toLowerCase().contains(pQuery)) {
mModel.add(0, new historyRowModel(mBookmarks.get(count).getHeader(), mBookmarks.get(count).getDescription(), -1));
} else if (mModel.size() > 0 && mBookmarks.get(count).getDescription().toLowerCase().contains(pQuery)) {
mModel.add(mModel.size() - 1, new historyRowModel(mBookmarks.get(count).getHeader(), mBookmarks.get(count).getDescription(), -1));
}
}
}
return mModel;
}
public Object onTrigger(dataEnums.eBookmarkCommands p_commands, List<Object> pData){
if(p_commands == dataEnums.eBookmarkCommands.M_GET_BOOKMARK){
return getBookmark();
@ -94,9 +75,6 @@ public class bookmarkDataModel {
else if(p_commands == dataEnums.eBookmarkCommands.M_ADD_BOOKMARK){
addBookmark((String)pData.get(0), (String)pData.get(1));
}
else if(p_commands == dataEnums.eBookmarkCommands.M_GET_SUGGESTIONS){
return getSuggestions((String)pData.get(0));
}
else if(p_commands == dataEnums.eBookmarkCommands.M_DELETE_BOOKMARK){
deleteBookmark((int)pData.get(0));
}

View File

@ -3,10 +3,8 @@ package com.darkweb.genesissearchengine.dataManager;
import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.databaseManager.databaseController;
import com.darkweb.genesissearchengine.appManager.historyManager.historyRowModel;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.status;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@ -20,7 +18,8 @@ public class dataController
private preferenceDataModel mPreferenceModel;
private historyDataModel mHistoryModel;
private imageDataModel mImageDataModel;
private bookmarkDataModel mBookMarkDataModel;
private bookmarkDataModel mBookmarkDataModel;
private suggestionDataModel mSuggestionDataModel;
/*Private Declarations*/
@ -32,16 +31,16 @@ public class dataController
/*Initializations*/
public void initialize(AppCompatActivity app_context){
public void initialize(AppCompatActivity pAppContext){
mHistoryModel = new historyDataModel();
mTabModel = new tabDataModel();
mPreferenceModel = new preferenceDataModel(app_context);
mPreferenceModel = new preferenceDataModel(pAppContext);
mImageDataModel = new imageDataModel();
mBookMarkDataModel = new bookmarkDataModel();
mBookmarkDataModel = new bookmarkDataModel();
mSuggestionDataModel = new suggestionDataModel(pAppContext);
}
public void initializeListData(){
invokeSuggestion(dataEnums.eSuggestionCommands.M_INIT_SUGGESTION, null);
mBookMarkDataModel.initializebookmark(databaseController.getInstance().selectBookmark());
mBookmarkDataModel.initializebookmark(databaseController.getInstance().selectBookmark());
if(!status.sClearOnExit)
{
mHistoryModel.onTrigger(dataEnums.eHistoryCommands.M_INITIALIZE_HISTORY, Arrays.asList(databaseController.getInstance().selectHistory(0,constants.CONST_FETCHABLE_LIST_SIZE), databaseController.getInstance().getLargestHistoryID(),databaseController.getInstance().getLargestHistoryID()));
@ -58,49 +57,40 @@ public class dataController
}
/*Recieving History*/
public Object invokeHistory(dataEnums.eHistoryCommands p_commands, List<Object> p_data){
public Object invokeHistory(dataEnums.eHistoryCommands pCommands, List<Object> pData){
if(p_commands == dataEnums.eHistoryCommands.M_ADD_HISTORY){
mTabModel.onTrigger(dataEnums.eTabCommands.M_UPDATE_TAB, p_data);
if(pCommands == dataEnums.eHistoryCommands.M_ADD_HISTORY){
mTabModel.onTrigger(dataEnums.eTabCommands.M_UPDATE_TAB, pData);
}
if(p_commands.equals(dataEnums.eHistoryCommands.M_LOAD_MORE_HISTORY)){
if(pCommands.equals(dataEnums.eHistoryCommands.M_LOAD_MORE_HISTORY)){
int m_history_size = (int) mHistoryModel.onTrigger(dataEnums.eHistoryCommands.M_HISTORY_SIZE,null);
return mHistoryModel.onTrigger(p_commands, Collections.singletonList(databaseController.getInstance().selectHistory(m_history_size+1,constants.CONST_FETCHABLE_LIST_SIZE)));
return mHistoryModel.onTrigger(pCommands, Collections.singletonList(databaseController.getInstance().selectHistory(m_history_size+1,constants.CONST_FETCHABLE_LIST_SIZE)));
}else {
return mHistoryModel.onTrigger(p_commands, p_data);
return mHistoryModel.onTrigger(pCommands, pData);
}
}
public Object invokeSuggestions(dataEnums.eSuggestionCommands pCommands, List<Object> pData){
return mSuggestionDataModel.onTrigger(pCommands, Arrays.asList(pData.get(0), mHistoryModel.onTrigger(dataEnums.eHistoryCommands.M_GET_HISTORY, null), mBookmarkDataModel.onTrigger(dataEnums.eBookmarkCommands.M_GET_BOOKMARK, null)));
}
/*Recieving Preferences*/
public Object invokePrefs(dataEnums.ePreferencesCommands p_commands, List<Object> p_data){
return mPreferenceModel.onTrigger(p_commands, p_data);
public Object invokePrefs(dataEnums.ePreferencesCommands pCommands, List<Object> pData){
return mPreferenceModel.onTrigger(pCommands, pData);
}
/*Recieving History*/
public Object invokeBookmark(dataEnums.eBookmarkCommands p_commands, List<Object> p_data){
return mBookMarkDataModel.onTrigger(p_commands, p_data);
public Object invokeBookmark(dataEnums.eBookmarkCommands pCommands, List<Object> pData){
return mBookmarkDataModel.onTrigger(pCommands, pData);
}
public Object invokeSuggestion(dataEnums.eSuggestionCommands p_commands, List<Object> p_data){
if(dataEnums.eSuggestionCommands.M_GET_SUGGESTION.equals(p_commands)) {
ArrayList<historyRowModel> mModel = new ArrayList<>();
if(p_data!=null){
mModel.addAll((ArrayList<historyRowModel>) dataController.getInstance().invokeBookmark(dataEnums.eBookmarkCommands.M_GET_SUGGESTIONS, p_data));
dataController.getInstance().invokeHistory(dataEnums.eHistoryCommands.M_GET_SUGGESTIONS, Arrays.asList(p_data.get(0),mModel));
}
return mModel;
}else {
return null;
}
public Object invokeTab(dataEnums.eTabCommands pCommands, List<Object> pData){
return mTabModel.onTrigger(pCommands, pData);
}
public Object invokeTab(dataEnums.eTabCommands p_commands, List<Object> p_data){
return mTabModel.onTrigger(p_commands, p_data);
}
public Object invokeImage(dataEnums.eImageCommands p_commands, List<Object> p_data){
return mImageDataModel.onTrigger(p_commands, p_data);
public Object invokeImage(dataEnums.eImageCommands pCommands, List<Object> pData){
return mImageDataModel.onTrigger(pCommands, pData);
}
}

View File

@ -4,11 +4,11 @@ public class dataEnums
{
/*Settings Manager*/
public enum eHistoryCommands {
M_GET_HISTORY, M_ADD_HISTORY, M_REMOVE_HISTORY, M_CLEAR_HISTORY, M_GET_SUGGESTIONS, M_LOAD_MORE_HISTORY, M_INITIALIZE_HISTORY, M_HISTORY_SIZE
M_GET_HISTORY, M_ADD_HISTORY, M_REMOVE_HISTORY, M_CLEAR_HISTORY,M_LOAD_MORE_HISTORY ,M_INITIALIZE_HISTORY, M_HISTORY_SIZE
}
public enum eBookmarkCommands {
M_ADD_BOOKMARK, M_GET_BOOKMARK, M_DELETE_BOOKMARK, M_CLEAR_BOOKMARK, M_GET_SUGGESTIONS;
M_ADD_BOOKMARK, M_GET_BOOKMARK, M_DELETE_BOOKMARK, M_CLEAR_BOOKMARK;
}
public enum ePreferencesCommands{
@ -16,7 +16,7 @@ public class dataEnums
}
public enum eSuggestionCommands{
M_UPDATE_SUGGESTION, M_CLEAR_SUGGESTION, M_INIT_SUGGESTION, M_ADD_SUGGESTION, M_GET_SUGGESTION
M_GET_SUGGESTIONS
}
public enum eTabCommands{

View File

@ -4,7 +4,6 @@ import com.darkweb.genesissearchengine.appManager.databaseManager.databaseContro
import com.darkweb.genesissearchengine.appManager.historyManager.historyRowModel;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.constants.strings;
import com.darkweb.genesissearchengine.helperManager.helperMethod;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@ -37,11 +36,11 @@ public class historyDataModel {
}
}
private void initializeCache(ArrayList<historyRowModel> history){
for(int count=0;count<=history.size()-1;count++){
historyRowModel tempSuggestion = new historyRowModel(history.get(count).getHeader(),history.get(count).getHeader(),-1);
tempSuggestion.setURL(history.get(count).getHeader());
mHistoryCache.put(history.get(count).getID(),tempSuggestion);
private void initializeCache(ArrayList<historyRowModel> pHistory){
for(int count=0;count<=pHistory.size()-1;count++){
historyRowModel tempSuggestion = new historyRowModel(pHistory.get(count).getHeader(),pHistory.get(count).getHeader(),-1);
tempSuggestion.setURL(pHistory.get(count).getHeader());
mHistoryCache.put(pHistory.get(count).getID(),tempSuggestion);
}
}
@ -49,14 +48,14 @@ public class historyDataModel {
return mHistory;
}
private void removeDuplicateURLFromHistory(int p_id, String p_url){
private void removeDuplicateURLFromHistory(int pID, String pUrl){
for (int m_count = 0; m_count < mHistory.size(); m_count++) {
historyRowModel m_temp_model = mHistory.get(m_count);
if(m_temp_model==null)
continue;
if (m_temp_model.getDescription().equals(p_url)) {
if(m_temp_model.getID()==p_id){
if (m_temp_model.getDescription().equals(pUrl)) {
if(m_temp_model.getID()==pID){
if(m_count>0){
mHistory.remove(m_count);
mHistory.add(0, m_temp_model);
@ -79,60 +78,60 @@ public class historyDataModel {
}
}
private int addHistory(String p_url,String p_header, int p_id) {
if(p_url.length()>1500 || p_url.equals("about:blank") || p_header.equals("$TITLE")){
return p_id;
private int addHistory(String pUrl,String pHeader, int pID) {
if(pUrl.length()>1500 || pUrl.equals("about:blank") || pHeader.equals("$TITLE")){
return pID;
}
p_url = helperMethod.removeLastSlash(p_url);
p_url = helperMethod.urlWithoutPrefix(p_url);
pUrl = helperMethod.removeLastSlash(pUrl);
pUrl = helperMethod.urlWithoutPrefix(pUrl);
Object url_exists = mHistoryCache.get(p_id);
Object url_exists = mHistoryCache.get(pID);
if(url_exists!=null){
mHistoryCache.get(p_id).setHeader(p_header);
mHistoryCache.get(p_id).setURL(p_url);
mHistoryCache.get(pID).setHeader(pHeader);
mHistoryCache.get(pID).setURL(pUrl);
removeDuplicateURLFromHistory(p_id, p_url);
removeDuplicateURLFromHistory(pID, pUrl);
String[] params = new String[2];
params[0] = p_url;
params[1] = p_header;
params[0] = pUrl;
params[1] = pHeader;
String m_date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS", Locale.ENGLISH).format(Calendar.getInstance().getTime());
databaseController.getInstance().execSQL("UPDATE history SET date = '" + m_date + "' , url = ? , title = ? WHERE id="+p_id,params);
return p_id;
databaseController.getInstance().execSQL("UPDATE history SET date = '" + m_date + "' , url = ? , title = ? WHERE id="+pID,params);
return pID;
}else {
if(mHistorySize > constants.CONST_MAX_LIST_DATA_SIZE)
{
databaseController.getInstance().execSQL("DELETE FROM history WHERE id IN (SELECT id FROM History ORDER BY id ASC LIMIT "+(constants.CONST_MAX_LIST_DATA_SIZE /2)+")",null);
}
if(p_header.equals("loading")){
p_header = p_url;
if(pHeader.equals("loading")){
pHeader = pUrl;
}
String[] params = new String[2];
params[0] = p_url;
params[1] = p_header;
params[0] = pUrl;
params[1] = pHeader;
mMaxHistoryId = mMaxHistoryId +1;
mHistorySize += 1;
String m_date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS", Locale.ENGLISH).format(Calendar.getInstance().getTime());
if(!p_header.equals("loading")){
if(!pHeader.equals("loading")){
databaseController.getInstance().execSQL("INSERT INTO history(id,date,url,title) VALUES("+ mMaxHistoryId +",'" + m_date + "',?,?);",params);
}
mHistory.add(0,new historyRowModel(p_header,p_url, mMaxHistoryId));
mHistory.add(0,new historyRowModel(pHeader,pUrl, mMaxHistoryId));
mHistoryCache.put(mMaxHistoryId, mHistory.get(0));
removeDuplicateURLFromHistory(mMaxHistoryId, p_url);
removeDuplicateURLFromHistory(mMaxHistoryId, pUrl);
return mMaxHistoryId;
}
}
private void removeHistory(int p_id){
databaseController.getInstance().execSQL("DELETE FROM history WHERE id = "+p_id,null);
private void removeHistory(int pID){
databaseController.getInstance().execSQL("DELETE FROM history WHERE id = "+pID,null);
databaseController.getInstance().selectHistory(0,constants.CONST_FETCHABLE_LIST_SIZE);
mHistoryCache.remove(p_id);
mHistoryCache.remove(pID);
mHistorySize -= 1;
}
private void clearHistory(){
@ -140,215 +139,35 @@ public class historyDataModel {
mHistory.clear();
mHistoryCache.clear();
}
private boolean loadMoreHistory(ArrayList<historyRowModel> p_history){
this.mHistory.addAll(p_history);
for(int count=0;count<=p_history.size()-1;count++){
mHistoryCache.put(p_history.get(count).getID(),p_history.get(0));
private boolean loadMoreHistory(ArrayList<historyRowModel> pHistory){
this.mHistory.addAll(pHistory);
for(int count=0;count<=pHistory.size()-1;count++){
mHistoryCache.put(pHistory.get(count).getID(),pHistory.get(0));
}
return p_history.size() > 0;
return pHistory.size() > 0;
}
public ArrayList<historyRowModel> getSuggestions(String pQuery, ArrayList<historyRowModel> pList){
String mQueryOriginal = pQuery;
if(status.sSettingSearchHistory){
pQuery = pQuery.toLowerCase();
for(int count = 0; count<= mHistory.size()-1 && mHistory.size()<500; count++){
historyRowModel mTempModel = null;
if(mHistory.get(count).getHeader().toLowerCase().contains(pQuery)){
mTempModel = new historyRowModel(mHistory.get(count).getHeader(),mHistory.get(count).getDescription(),-1);
if(!pList.contains(mTempModel)){
pList.add(mTempModel);
}
}else if(mHistory.get(count).getDescription().toLowerCase().contains(pQuery)){
mTempModel = new historyRowModel(mHistory.get(count).getHeader(),mHistory.get(count).getDescription(),-1);
if(!pList.contains(mTempModel)){
pList.add(mTempModel);
}
}
}
}
ArrayList<historyRowModel> mDefaultSuggestions = initSuggestions();
for(int count = 0; count<= mDefaultSuggestions.size()-1 && mDefaultSuggestions.size()<500; count++){
if(mDefaultSuggestions.get(count).getHeader().toLowerCase().contains(pQuery)){
pList.add(new historyRowModel(mDefaultSuggestions.get(count).getHeader(),mDefaultSuggestions.get(count).getDescription(),-1));
}else if(mDefaultSuggestions.get(count).getDescription().toLowerCase().contains(pQuery)){
if(pList.size()==0){
pList.add(new historyRowModel(mDefaultSuggestions.get(count).getHeader(),mDefaultSuggestions.get(count).getDescription(),-1));
}else {
pList.add(new historyRowModel(mDefaultSuggestions.get(count).getHeader(),mDefaultSuggestions.get(count).getDescription(),-1));
}
}
}
/*Duplicate handler*/
ArrayList<String> mDuplicateHandler = new ArrayList<>();
for(int mCounter=0;mCounter<pList.size();mCounter++){
if(mDuplicateHandler.contains(pList.get(mCounter).getDescription())){
pList.remove(mCounter);
mCounter-=1;
}else {
mDuplicateHandler.add(0,pList.get(mCounter).getDescription());
}
}
if(!pQuery.equals(strings.GENERIC_EMPTY_STR) && !pQuery.equals("about:blank") && !pQuery.contains("?") && !pQuery.contains("/") && !pQuery.contains(" ") && !pQuery.contains(" ") && !pQuery.contains("\n")){
if(pList.size()<3){
int sepPos = pQuery.indexOf(".");
if (sepPos == -1) {
pList.add( 0,new historyRowModel(mQueryOriginal+".com", strings.GENERIC_EMPTY_STR,-1));
pList.add( 0,new historyRowModel(mQueryOriginal+".onion", strings.GENERIC_EMPTY_STR,-1));
}else
{
if(!pQuery.equals(pQuery.substring(0,sepPos)+".com")){
pList.add( 0,new historyRowModel(pQuery.substring(0,sepPos)+".com", strings.GENERIC_EMPTY_STR,-1));
}
if(!pQuery.equals(pQuery.substring(0,sepPos)+".onion")){
pList.add( 0,new historyRowModel(pQuery.substring(0,sepPos)+".onion", strings.GENERIC_EMPTY_STR,-1));
}
}
}
pList.add( 0,new historyRowModel(mQueryOriginal, strings.GENERIC_EMPTY_STR,-1));
}
return pList;
}
private ArrayList<historyRowModel> initSuggestions(){
ArrayList<historyRowModel> mHintList = new ArrayList<>();
mHintList.add(new historyRowModel("Duckduckgo","https://duckduckgo.com",-1 ));
mHintList.add(new historyRowModel("BBC","https://bbc.com",-1 ));
mHintList.add(new historyRowModel("Youtube","https://youtube.com",-1 ));
mHintList.add(new historyRowModel("Facebook","https://facebook.com",-1 ));
mHintList.add(new historyRowModel("Twitter","https://twitter.com",-1 ));
mHintList.add(new historyRowModel("Amazon","https://amazon.com",-1 ));
mHintList.add(new historyRowModel("IMDB","https://imdb.com",-1 ));
mHintList.add(new historyRowModel("Reddit","https://reddit.com",-1 ));
mHintList.add(new historyRowModel("Pinterest","https://pinterest.com",-1 ));
mHintList.add(new historyRowModel("EBay","https://ebay.com",-1 ));
mHintList.add(new historyRowModel("Trip Advisor","https://tripadvisor.com",-1 ));
mHintList.add(new historyRowModel("Craigslist","https://craigslist.com",-1 ));
mHintList.add(new historyRowModel("Walmart","https://walmart.com",-1 ));
mHintList.add(new historyRowModel("Instagram","https://instagram.com",-1 ));
mHintList.add(new historyRowModel("Google","https://google.com",-1 ));
mHintList.add(new historyRowModel("NY Times","https://nytimes.com",-1 ));
mHintList.add(new historyRowModel("Apple","https://apple.com",-1 ));
mHintList.add(new historyRowModel("Linkedin","https://linkedin.com",-1 ));
mHintList.add(new historyRowModel("Play.Google","https://play.google.com",-1 ));
mHintList.add(new historyRowModel("ESPN","https://espn.com",-1 ));
mHintList.add(new historyRowModel("Webmd","https://webmd.com",-1 ));
mHintList.add(new historyRowModel("CNN","https://cnn.com",-1 ));
mHintList.add(new historyRowModel("Homedepot","https://homedepot.com",-1 ));
mHintList.add(new historyRowModel("ETSY","https://etsy.com",-1 ));
mHintList.add(new historyRowModel("Netflix","https://netflix.com",-1 ));
mHintList.add(new historyRowModel("Quora","https://quora.com",-1 ));
mHintList.add(new historyRowModel("Microsoft","https://microsoft.com",-1 ));
mHintList.add(new historyRowModel("Target","https://target.com",-1 ));
mHintList.add(new historyRowModel("Merriam Webster","https://merriam-webster.com",-1 ));
mHintList.add(new historyRowModel("Forbes","https://forbes.com",-1 ));
mHintList.add(new historyRowModel("Mapquest","https://mapquest.com",-1 ));
mHintList.add(new historyRowModel("NIH","https://nih.gov",-1 ));
mHintList.add(new historyRowModel("Gamepedia","https://gamepedia.com",-1 ));
mHintList.add(new historyRowModel("Yahoo","https://yahoo.com",-1 ));
mHintList.add(new historyRowModel("Healthline","https://healthline.com",-1 ));
mHintList.add(new historyRowModel("Foxnews","https://foxnews.com",-1 ));
mHintList.add(new historyRowModel("All Recipes","https://allrecipes.com",-1 ));
mHintList.add(new historyRowModel("Quizlet","https://quizlet.com",-1 ));
mHintList.add(new historyRowModel("Weather","https://weather.com",-1 ));
mHintList.add(new historyRowModel("Bestbuy","https://bestbuy.com",-1 ));
mHintList.add(new historyRowModel("Urbandictionary","https://urbandictionary.com",-1 ));
mHintList.add(new historyRowModel("Mayoclinic","https://mayoclinic.org",-1 ));
mHintList.add(new historyRowModel("AOL","https://aol.com",-1 ));
mHintList.add(new historyRowModel("Genius","https://genius.com",-1 ));
mHintList.add(new historyRowModel("Zillow","https://zillow.com",-1 ));
mHintList.add(new historyRowModel("Usatoday","https://usatoday.com",-1 ));
mHintList.add(new historyRowModel("Glassdoor","https://glassdoor.com",-1 ));
mHintList.add(new historyRowModel("MSN","https://msn.com",-1 ));
mHintList.add(new historyRowModel("Rotten Tomatoes","https://rottentomatoes.com",-1 ));
mHintList.add(new historyRowModel("Lowes","https://lowes.com",-1 ));
mHintList.add(new historyRowModel("Dictionary","https://dictionary.com",-1 ));
mHintList.add(new historyRowModel("Business Insider","https://businessinsider.com",-1 ));
mHintList.add(new historyRowModel("US News","https://usnews.com",-1 ));
mHintList.add(new historyRowModel("Medical News Today","https://medicalnewstoday.com",-1 ));
mHintList.add(new historyRowModel("Britannica","https://britannica.com",-1 ));
mHintList.add(new historyRowModel("Washington Post","https://washingtonpost.com",-1 ));
mHintList.add(new historyRowModel("USPS","https://usps.com",-1 ));
mHintList.add(new historyRowModel("Finance Yahoo","https://finance.yahoo.com",-1 ));
mHintList.add(new historyRowModel("IRS","https://finance.irs.gov",-1 ));
mHintList.add(new historyRowModel("Yellow Pages","https://yellowpages.com",-1 ));
mHintList.add(new historyRowModel("Chase","https://chase.com",-1 ));
mHintList.add(new historyRowModel("Retail Menot","https://retailmenot.com",-1 ));
mHintList.add(new historyRowModel("Accuweather","https://accuweather.com",-1 ));
mHintList.add(new historyRowModel("Way Fair","https://wayfair.com",-1 ));
mHintList.add(new historyRowModel("GO","https://go.com",-1 ));
mHintList.add(new historyRowModel("Live","https://live.com",-1 ));
mHintList.add(new historyRowModel("Login Yahoo","https://login.yahoo.com",-1 ));
mHintList.add(new historyRowModel("Steam Community","https://steamcommunity.com",-1 ));
mHintList.add(new historyRowModel("XFinity","https://xfinity.com",-1 ));
mHintList.add(new historyRowModel("CNET","https://cnet.com",-1 ));
mHintList.add(new historyRowModel("IGN","https://ign.com",-1 ));
mHintList.add(new historyRowModel("Steam Powered","https://steampowered.com",-1 ));
mHintList.add(new historyRowModel("Macys","https://macys.com",-1 ));
mHintList.add(new historyRowModel("Wikihow","https://wikihow.com",-1 ));
mHintList.add(new historyRowModel("Mail Yahoo","https://mail.yahoo.com",-1 ));
mHintList.add(new historyRowModel("Wiktionary","https://wiktionary.com",-1 ));
mHintList.add(new historyRowModel("Cbssports","https://cbssports.com",-1 ));
mHintList.add(new historyRowModel("CNBC","https://cnbc.com",-1 ));
mHintList.add(new historyRowModel("Bank Of America","https://bankofamerica.com",-1 ));
mHintList.add(new historyRowModel("Expedia","https://expedia.com",-1 ));
mHintList.add(new historyRowModel("Wellsfargo","https://wellsfargo.com",-1 ));
mHintList.add(new historyRowModel("Groupon","https://groupon.com",-1 ));
mHintList.add(new historyRowModel("Twitch","https://twitch.com",-1 ));
mHintList.add(new historyRowModel("Khan Academy","https://khanacademy.com",-1 ));
mHintList.add(new historyRowModel("The Guardian","https://theguardian.com",-1 ));
mHintList.add(new historyRowModel("Paypal","https://paypal.com",-1 ));
mHintList.add(new historyRowModel("Spotify","https://spotify.com",-1 ));
mHintList.add(new historyRowModel("ATT","https://att.com",-1 ));
mHintList.add(new historyRowModel("NFL","https://nfl.com",-1 ));
mHintList.add(new historyRowModel("Realtor","https://realtor.com",-1 ));
mHintList.add(new historyRowModel("CA Gov","https://ca.gov",-1 ));
mHintList.add(new historyRowModel("Good Reads","https://goodreads.com",-1 ));
mHintList.add(new historyRowModel("Office","https://office.com",-1 ));
mHintList.add(new historyRowModel("UFL","https://ufl.com",-1 ));
mHintList.add(new historyRowModel("MLB","https://mlb.com",-1 ));
mHintList.add(new historyRowModel("Food Network","https://foodnetwork.com",-1 ));
mHintList.add(new historyRowModel("Apartments","https://apartments.com",-1 ));
mHintList.add(new historyRowModel("NPR","https://npr.com",-1 ));
mHintList.add(new historyRowModel("Wow Head","https://wowhead.com",-1 ));
mHintList.add(new historyRowModel("Bing","https://bing.com",-1 ));
mHintList.add(new historyRowModel("Google","https://google.com",-1 ));
mHintList.add(new historyRowModel("Genesis Search","https://genesis.onion",-1 ));
return mHintList;
}
public Object onTrigger(dataEnums.eHistoryCommands p_commands, List<Object> p_data){
if(p_commands == dataEnums.eHistoryCommands.M_GET_HISTORY){
public Object onTrigger(dataEnums.eHistoryCommands pCommands, List<Object> pData){
if(pCommands == dataEnums.eHistoryCommands.M_GET_HISTORY){
return getHistory();
}
else if(p_commands == dataEnums.eHistoryCommands.M_ADD_HISTORY){
return addHistory((String) p_data.get(0),(String) p_data.get(2), (int)p_data.get(3));
else if(pCommands == dataEnums.eHistoryCommands.M_ADD_HISTORY){
return addHistory((String) pData.get(0),(String) pData.get(2), (int)pData.get(3));
}
else if(p_commands == dataEnums.eHistoryCommands.M_REMOVE_HISTORY){
removeHistory((int) p_data.get(0));
else if(pCommands == dataEnums.eHistoryCommands.M_REMOVE_HISTORY){
removeHistory((int) pData.get(0));
}
else if(p_commands == dataEnums.eHistoryCommands.M_CLEAR_HISTORY){
else if(pCommands == dataEnums.eHistoryCommands.M_CLEAR_HISTORY){
clearHistory();
}
else if(p_commands == dataEnums.eHistoryCommands.M_GET_SUGGESTIONS){
return getSuggestions((String)p_data.get(0), (ArrayList<historyRowModel>) p_data.get(1));
else if(pCommands == dataEnums.eHistoryCommands.M_LOAD_MORE_HISTORY){
return loadMoreHistory((ArrayList<historyRowModel>) pData.get(0));
}
else if(p_commands == dataEnums.eHistoryCommands.M_LOAD_MORE_HISTORY){
return loadMoreHistory((ArrayList<historyRowModel>) p_data.get(0));
else if(pCommands == dataEnums.eHistoryCommands.M_INITIALIZE_HISTORY){
initializeHistory((ArrayList<historyRowModel>) pData.get(0), (int)pData.get(1), (int)pData.get(2));
}
else if(p_commands == dataEnums.eHistoryCommands.M_INITIALIZE_HISTORY){
initializeHistory((ArrayList<historyRowModel>) p_data.get(0), (int)p_data.get(1), (int)p_data.get(2));
}
else if(p_commands == dataEnums.eHistoryCommands.M_HISTORY_SIZE){
else if(pCommands == dataEnums.eHistoryCommands.M_HISTORY_SIZE){
return mHistory.size();
}

View File

@ -31,12 +31,6 @@ class imageDataModel
mParsedQueues = new HashMap<>();
mRequestQueue = new ArrayList<>();
mBackgroundThread();
}

View File

@ -12,8 +12,8 @@ public class preferenceDataModel {
private SharedPreferences mPrefs;
private SharedPreferences.Editor mEdit;
public preferenceDataModel(AppCompatActivity app_context){
mPrefs = PreferenceManager.getDefaultSharedPreferences(app_context);
public preferenceDataModel(AppCompatActivity pAppContext){
mPrefs = PreferenceManager.getDefaultSharedPreferences(pAppContext);
mEdit = mPrefs.edit();
}
@ -22,61 +22,61 @@ public class preferenceDataModel {
mEdit.apply();
}
void setString(String valueKey, String value){
mEdit.putString(valueKey, value);
void setString(String pValueKey, String pValue){
mEdit.putString(pValueKey, pValue);
mEdit.apply();
}
String getString(String valueKey, String valueDefault){
return mPrefs.getString(valueKey, valueDefault);
String getString(String pValueKey, String pValueDefault){
return mPrefs.getString(pValueKey, pValueDefault);
}
void setBool(String valueKey, boolean value){
mEdit.putBoolean(valueKey, value);
mEdit.apply();
}
boolean getBool(String valueKey, boolean valueDefault){
return mPrefs.getBoolean(valueKey, valueDefault);
boolean getBool(String pValueKey, boolean pValueDefault){
return mPrefs.getBoolean(pValueKey, pValueDefault);
}
void setInt(String valueKey, int value){
mEdit.putInt(valueKey, value);
mEdit.apply();
}
int getInt(String valueKey, int valueDefault){
return mPrefs.getInt(valueKey, valueDefault);
int getInt(String pValueKey, int pValueDefault){
return mPrefs.getInt(pValueKey, pValueDefault);
}
void setFloat(String valueKey, int value){
mEdit.putInt(valueKey, value);
void setFloat(String pValueKey, int pValue){
mEdit.putInt(pValueKey, pValue);
mEdit.apply();
}
int getFloat(String valueKey, int valueDefault){
return mPrefs.getInt(valueKey, valueDefault);
int getFloat(String pValueKey, int pValueDefault){
return mPrefs.getInt(pValueKey, pValueDefault);
}
public Object onTrigger(dataEnums.ePreferencesCommands p_commands, List<Object> p_data){
if(p_commands == dataEnums.ePreferencesCommands.M_GET_BOOL){
return getBool((String)p_data.get(0), (boolean)p_data.get(1));
public Object onTrigger(dataEnums.ePreferencesCommands pCommands, List<Object> pData){
if(pCommands == dataEnums.ePreferencesCommands.M_GET_BOOL){
return getBool((String)pData.get(0), (boolean)pData.get(1));
}
else if(p_commands == dataEnums.ePreferencesCommands.M_GET_INT){
return getInt((String)p_data.get(0), (int)p_data.get(1));
else if(pCommands == dataEnums.ePreferencesCommands.M_GET_INT){
return getInt((String)pData.get(0), (int)pData.get(1));
}
else if(p_commands == dataEnums.ePreferencesCommands.M_GET_STRING){
return getString((String)p_data.get(0), (String)p_data.get(1));
else if(pCommands == dataEnums.ePreferencesCommands.M_GET_STRING){
return getString((String)pData.get(0), (String)pData.get(1));
}
else if(p_commands == dataEnums.ePreferencesCommands.M_GET_FLOAT){
return getFloat((String)p_data.get(0), (int)p_data.get(1));
else if(pCommands == dataEnums.ePreferencesCommands.M_GET_FLOAT){
return getFloat((String)pData.get(0), (int)pData.get(1));
}
else if(p_commands == dataEnums.ePreferencesCommands.M_SET_BOOL){
setBool((String)p_data.get(0), (boolean)p_data.get(1));
else if(pCommands == dataEnums.ePreferencesCommands.M_SET_BOOL){
setBool((String)pData.get(0), (boolean)pData.get(1));
}
else if(p_commands == dataEnums.ePreferencesCommands.M_SET_INT){
setInt((String)p_data.get(0), (int)p_data.get(1));
else if(pCommands == dataEnums.ePreferencesCommands.M_SET_INT){
setInt((String)pData.get(0), (int)pData.get(1));
}
else if(p_commands == dataEnums.ePreferencesCommands.M_SET_STRING){
setString((String)p_data.get(0), (String)p_data.get(1));
else if(pCommands == dataEnums.ePreferencesCommands.M_SET_STRING){
setString((String)pData.get(0), (String)pData.get(1));
}
else if(p_commands == dataEnums.ePreferencesCommands.M_SET_FLOAT){
setFloat((String)p_data.get(0), (int)p_data.get(1));
else if(pCommands == dataEnums.ePreferencesCommands.M_SET_FLOAT){
setFloat((String)pData.get(0), (int)pData.get(1));
}
else if(p_commands == dataEnums.ePreferencesCommands.M_CLEAR_PREFS){
else if(pCommands == dataEnums.ePreferencesCommands.M_CLEAR_PREFS){
clearPrefs();
}

View File

@ -0,0 +1,259 @@
package com.darkweb.genesissearchengine.dataManager;
import android.content.Context;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.style.SuggestionSpan;
import android.view.textservice.SentenceSuggestionsInfo;
import android.view.textservice.SpellCheckerSession;
import android.view.textservice.SuggestionsInfo;
import android.view.textservice.TextInfo;
import android.view.textservice.TextServicesManager;
import com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkRowModel;
import com.darkweb.genesissearchengine.appManager.historyManager.historyRowModel;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.constants.strings;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;
public class suggestionDataModel implements SpellCheckerSession.SpellCheckerSessionListener {
/*Private Variables*/
private SpellCheckerSession mSpellCheckerSession;
private TextServicesManager mTextServicesManager;
/*Initializations*/
public suggestionDataModel(Context mContext){
mTextServicesManager = (TextServicesManager) mContext.getSystemService(Context.TEXT_SERVICES_MANAGER_SERVICE);
mSpellCheckerSession = mTextServicesManager.newSpellCheckerSession(null, null, this, true);
}
/*Helper Methods*/
private ArrayList<historyRowModel> getSuggestions(String pQuery, ArrayList<historyRowModel> pHistory, ArrayList<bookmarkRowModel> pBookmarks){
ArrayList<historyRowModel> mHistory = pHistory;
ArrayList<bookmarkRowModel> mBookmarks = pBookmarks;
pQuery = pQuery.toLowerCase();
ArrayList<historyRowModel> mList = new ArrayList<>();
if(status.sSettingSearchHistory) {
for (int count = 0; count <= mBookmarks.size() - 1 && mBookmarks.size() < 500; count++) {
if (mBookmarks.get(count).getHeader().toLowerCase().contains(pQuery)) {
mList.add(0, new historyRowModel(mBookmarks.get(count).getHeader(), mBookmarks.get(count).getDescription(), -1));
} else if (mList.size() > 0 && mBookmarks.get(count).getDescription().toLowerCase().contains(pQuery)) {
mList.add(mList.size() - 1, new historyRowModel(mBookmarks.get(count).getHeader(), mBookmarks.get(count).getDescription(), -1));
}
}
}
String mQueryOriginal = pQuery;
if(status.sSettingSearchHistory){
pQuery = pQuery.toLowerCase();
for(int count = 0; count<= mHistory.size()-1 && mHistory.size()<500; count++){
historyRowModel mTempModel;
if(mHistory.get(count).getHeader().toLowerCase().contains(pQuery)){
mTempModel = new historyRowModel(mHistory.get(count).getHeader(),mHistory.get(count).getDescription(),-1);
if(!mList.contains(mTempModel)){
mList.add(mTempModel);
}
}else if(mHistory.get(count).getDescription().toLowerCase().contains(pQuery)){
mTempModel = new historyRowModel(mHistory.get(count).getHeader(),mHistory.get(count).getDescription(),-1);
if(!mList.contains(mTempModel)){
mList.add(mTempModel);
}
}
}
}
ArrayList<historyRowModel> mDefaultSuggestions = initSuggestions();
for(int count = 0; count<= mDefaultSuggestions.size()-1 && mDefaultSuggestions.size()<500; count++){
if(mDefaultSuggestions.get(count).getHeader().toLowerCase().contains(pQuery)){
mList.add(new historyRowModel(mDefaultSuggestions.get(count).getHeader(),mDefaultSuggestions.get(count).getDescription(),-1));
}else if(mDefaultSuggestions.get(count).getDescription().toLowerCase().contains(pQuery)){
if(mList.size()==0){
mList.add(new historyRowModel(mDefaultSuggestions.get(count).getHeader(),mDefaultSuggestions.get(count).getDescription(),-1));
}else {
mList.add(new historyRowModel(mDefaultSuggestions.get(count).getHeader(),mDefaultSuggestions.get(count).getDescription(),-1));
}
}
}
/*Duplicate handler*/
ArrayList<String> mDuplicateHandler = new ArrayList<>();
for(int mCounter=0;mCounter<mList.size();mCounter++){
if(mDuplicateHandler.contains(mList.get(mCounter).getDescription())){
mList.remove(mCounter);
mCounter-=1;
}else {
mDuplicateHandler.add(0,mList.get(mCounter).getDescription());
}
}
if(!pQuery.equals(strings.GENERIC_EMPTY_STR) && !pQuery.equals("about:blank") && !pQuery.contains("?") && !pQuery.contains("/") && !pQuery.contains(" ") && !pQuery.contains(" ") && !pQuery.contains("\n")){
if(mList.size()<3){
int sepPos = pQuery.indexOf(".");
if (sepPos == -1) {
mList.add( 0,new historyRowModel(mQueryOriginal+".com", strings.GENERIC_EMPTY_STR,-1));
mList.add( 0,new historyRowModel(mQueryOriginal+".onion", strings.GENERIC_EMPTY_STR,-1));
}else
{
if(!pQuery.equals(pQuery.substring(0,sepPos)+".com")){
mList.add( 0,new historyRowModel(pQuery.substring(0,sepPos)+".com", strings.GENERIC_EMPTY_STR,-1));
}
if(!pQuery.equals(pQuery.substring(0,sepPos)+".onion")){
mList.add( 0,new historyRowModel(pQuery.substring(0,sepPos)+".onion", strings.GENERIC_EMPTY_STR,-1));
}
}
}
mList.add( 0,new historyRowModel(mQueryOriginal, strings.GENERIC_EMPTY_STR,-1));
}
if (Pattern.matches("[a-zA-Z]+",pQuery)){
Spannable str = new SpannableString(pQuery);
SuggestionSpan[] spanned = str.getSpans(0, pQuery.length(), SuggestionSpan.class);
for (SuggestionSpan suggestionSpan : spanned) {
mList.add(0, new historyRowModel(suggestionSpan.toString(), strings.GENERIC_EMPTY_STR, -1));
}
}
return mList;
}
private ArrayList<historyRowModel> initSuggestions(){
ArrayList<historyRowModel> mHintList = new ArrayList<>();
mHintList.add(new historyRowModel("Duckduckgo","https://duckduckgo.com",-1 ));
mHintList.add(new historyRowModel("BBC","https://bbc.com",-1 ));
mHintList.add(new historyRowModel("Youtube","https://youtube.com",-1 ));
mHintList.add(new historyRowModel("Facebook","https://facebook.com",-1 ));
mHintList.add(new historyRowModel("Twitter","https://twitter.com",-1 ));
mHintList.add(new historyRowModel("Amazon","https://amazon.com",-1 ));
mHintList.add(new historyRowModel("IMDB","https://imdb.com",-1 ));
mHintList.add(new historyRowModel("Reddit","https://reddit.com",-1 ));
mHintList.add(new historyRowModel("Pinterest","https://pinterest.com",-1 ));
mHintList.add(new historyRowModel("EBay","https://ebay.com",-1 ));
mHintList.add(new historyRowModel("Trip Advisor","https://tripadvisor.com",-1 ));
mHintList.add(new historyRowModel("Craigslist","https://craigslist.com",-1 ));
mHintList.add(new historyRowModel("Walmart","https://walmart.com",-1 ));
mHintList.add(new historyRowModel("Instagram","https://instagram.com",-1 ));
mHintList.add(new historyRowModel("Google","https://google.com",-1 ));
mHintList.add(new historyRowModel("NY Times","https://nytimes.com",-1 ));
mHintList.add(new historyRowModel("Apple","https://apple.com",-1 ));
mHintList.add(new historyRowModel("Linkedin","https://linkedin.com",-1 ));
mHintList.add(new historyRowModel("Play.Google","https://play.google.com",-1 ));
mHintList.add(new historyRowModel("ESPN","https://espn.com",-1 ));
mHintList.add(new historyRowModel("Webmd","https://webmd.com",-1 ));
mHintList.add(new historyRowModel("CNN","https://cnn.com",-1 ));
mHintList.add(new historyRowModel("Homedepot","https://homedepot.com",-1 ));
mHintList.add(new historyRowModel("ETSY","https://etsy.com",-1 ));
mHintList.add(new historyRowModel("Netflix","https://netflix.com",-1 ));
mHintList.add(new historyRowModel("Quora","https://quora.com",-1 ));
mHintList.add(new historyRowModel("Microsoft","https://microsoft.com",-1 ));
mHintList.add(new historyRowModel("Target","https://target.com",-1 ));
mHintList.add(new historyRowModel("Merriam Webster","https://merriam-webster.com",-1 ));
mHintList.add(new historyRowModel("Forbes","https://forbes.com",-1 ));
mHintList.add(new historyRowModel("Mapquest","https://mapquest.com",-1 ));
mHintList.add(new historyRowModel("NIH","https://nih.gov",-1 ));
mHintList.add(new historyRowModel("Gamepedia","https://gamepedia.com",-1 ));
mHintList.add(new historyRowModel("Yahoo","https://yahoo.com",-1 ));
mHintList.add(new historyRowModel("Healthline","https://healthline.com",-1 ));
mHintList.add(new historyRowModel("Foxnews","https://foxnews.com",-1 ));
mHintList.add(new historyRowModel("All Recipes","https://allrecipes.com",-1 ));
mHintList.add(new historyRowModel("Quizlet","https://quizlet.com",-1 ));
mHintList.add(new historyRowModel("Weather","https://weather.com",-1 ));
mHintList.add(new historyRowModel("Bestbuy","https://bestbuy.com",-1 ));
mHintList.add(new historyRowModel("Urbandictionary","https://urbandictionary.com",-1 ));
mHintList.add(new historyRowModel("Mayoclinic","https://mayoclinic.org",-1 ));
mHintList.add(new historyRowModel("AOL","https://aol.com",-1 ));
mHintList.add(new historyRowModel("Genius","https://genius.com",-1 ));
mHintList.add(new historyRowModel("Zillow","https://zillow.com",-1 ));
mHintList.add(new historyRowModel("Usatoday","https://usatoday.com",-1 ));
mHintList.add(new historyRowModel("Glassdoor","https://glassdoor.com",-1 ));
mHintList.add(new historyRowModel("MSN","https://msn.com",-1 ));
mHintList.add(new historyRowModel("Rotten Tomatoes","https://rottentomatoes.com",-1 ));
mHintList.add(new historyRowModel("Lowes","https://lowes.com",-1 ));
mHintList.add(new historyRowModel("Dictionary","https://dictionary.com",-1 ));
mHintList.add(new historyRowModel("Business Insider","https://businessinsider.com",-1 ));
mHintList.add(new historyRowModel("US News","https://usnews.com",-1 ));
mHintList.add(new historyRowModel("Medical News Today","https://medicalnewstoday.com",-1 ));
mHintList.add(new historyRowModel("Britannica","https://britannica.com",-1 ));
mHintList.add(new historyRowModel("Washington Post","https://washingtonpost.com",-1 ));
mHintList.add(new historyRowModel("USPS","https://usps.com",-1 ));
mHintList.add(new historyRowModel("Finance Yahoo","https://finance.yahoo.com",-1 ));
mHintList.add(new historyRowModel("IRS","https://finance.irs.gov",-1 ));
mHintList.add(new historyRowModel("Yellow Pages","https://yellowpages.com",-1 ));
mHintList.add(new historyRowModel("Chase","https://chase.com",-1 ));
mHintList.add(new historyRowModel("Retail Menot","https://retailmenot.com",-1 ));
mHintList.add(new historyRowModel("Accuweather","https://accuweather.com",-1 ));
mHintList.add(new historyRowModel("Way Fair","https://wayfair.com",-1 ));
mHintList.add(new historyRowModel("GO","https://go.com",-1 ));
mHintList.add(new historyRowModel("Live","https://live.com",-1 ));
mHintList.add(new historyRowModel("Login Yahoo","https://login.yahoo.com",-1 ));
mHintList.add(new historyRowModel("Steam Community","https://steamcommunity.com",-1 ));
mHintList.add(new historyRowModel("XFinity","https://xfinity.com",-1 ));
mHintList.add(new historyRowModel("CNET","https://cnet.com",-1 ));
mHintList.add(new historyRowModel("IGN","https://ign.com",-1 ));
mHintList.add(new historyRowModel("Steam Powered","https://steampowered.com",-1 ));
mHintList.add(new historyRowModel("Macys","https://macys.com",-1 ));
mHintList.add(new historyRowModel("Wikihow","https://wikihow.com",-1 ));
mHintList.add(new historyRowModel("Mail Yahoo","https://mail.yahoo.com",-1 ));
mHintList.add(new historyRowModel("Wiktionary","https://wiktionary.com",-1 ));
mHintList.add(new historyRowModel("Cbssports","https://cbssports.com",-1 ));
mHintList.add(new historyRowModel("CNBC","https://cnbc.com",-1 ));
mHintList.add(new historyRowModel("Bank Of America","https://bankofamerica.com",-1 ));
mHintList.add(new historyRowModel("Expedia","https://expedia.com",-1 ));
mHintList.add(new historyRowModel("Wellsfargo","https://wellsfargo.com",-1 ));
mHintList.add(new historyRowModel("Groupon","https://groupon.com",-1 ));
mHintList.add(new historyRowModel("Twitch","https://twitch.com",-1 ));
mHintList.add(new historyRowModel("Khan Academy","https://khanacademy.com",-1 ));
mHintList.add(new historyRowModel("The Guardian","https://theguardian.com",-1 ));
mHintList.add(new historyRowModel("Paypal","https://paypal.com",-1 ));
mHintList.add(new historyRowModel("Spotify","https://spotify.com",-1 ));
mHintList.add(new historyRowModel("ATT","https://att.com",-1 ));
mHintList.add(new historyRowModel("NFL","https://nfl.com",-1 ));
mHintList.add(new historyRowModel("Realtor","https://realtor.com",-1 ));
mHintList.add(new historyRowModel("CA Gov","https://ca.gov",-1 ));
mHintList.add(new historyRowModel("Good Reads","https://goodreads.com",-1 ));
mHintList.add(new historyRowModel("Office","https://office.com",-1 ));
mHintList.add(new historyRowModel("UFL","https://ufl.com",-1 ));
mHintList.add(new historyRowModel("MLB","https://mlb.com",-1 ));
mHintList.add(new historyRowModel("Food Network","https://foodnetwork.com",-1 ));
mHintList.add(new historyRowModel("Apartments","https://apartments.com",-1 ));
mHintList.add(new historyRowModel("NPR","https://npr.com",-1 ));
mHintList.add(new historyRowModel("Wow Head","https://wowhead.com",-1 ));
mHintList.add(new historyRowModel("Bing","https://bing.com",-1 ));
mHintList.add(new historyRowModel("Google","https://google.com",-1 ));
mHintList.add(new historyRowModel("Genesis Search","https://genesis.onion",-1 ));
return mHintList;
}
/*External Redirections*/
public Object onTrigger(dataEnums.eSuggestionCommands pCommands, List<Object> pData){
if(pCommands == dataEnums.eSuggestionCommands.M_GET_SUGGESTIONS)
{
return getSuggestions((String) pData.get(0), (ArrayList<historyRowModel>)pData.get(1), (ArrayList<bookmarkRowModel>)pData.get(2));
}
return null;
}
/*Local Overrides*/
@Override
public void onGetSuggestions(SuggestionsInfo[] results) {
}
@Override
public void onGetSentenceSuggestions(SentenceSuggestionsInfo[] results) {
}
}

View File

@ -5,7 +5,7 @@ import android.content.ContentValues;
import android.graphics.Bitmap;
import android.os.Handler;
import com.darkweb.genesissearchengine.appManager.databaseManager.databaseController;
import com.darkweb.genesissearchengine.appManager.homeManager.geckoSession;
import com.darkweb.genesissearchengine.appManager.homeManager.geckoManager.geckoSession;
import com.darkweb.genesissearchengine.appManager.tabManager.tabRowModel;
import org.mozilla.geckoview.GeckoResult;
import java.io.ByteArrayOutputStream;

View File

@ -1,4 +1,4 @@
package com.darkweb.genesissearchengine.appManager.homeManager;
package com.darkweb.genesissearchengine.helperManager;
import android.animation.ValueAnimator;
import android.animation.ValueAnimator.AnimatorUpdateListener;

View File

@ -1,6 +1,5 @@
package com.darkweb.genesissearchengine.helperManager;
import android.app.Application;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.Configuration;
@ -9,7 +8,7 @@ import android.os.Build;
import android.preference.PreferenceManager;
import android.view.ContextThemeWrapper;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
import java.util.Locale;

View File

@ -0,0 +1,36 @@
package com.darkweb.genesissearchengine.helperManager;
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import com.darkweb.genesissearchengine.constants.status;
public class OnClearFromRecentService extends Service {
@Override
public IBinder onBind(Intent intent) {
return null;
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
return START_NOT_STICKY;
}
@Override
public void onDestroy() {
status.sSettingIsAppStarted = false;
super.onDestroy();
android.os.Process.killProcess(android.os.Process.myPid());
System.exit(1);
}
@Override
public void onTaskRemoved(Intent rootIntent) {
status.sSettingIsAppStarted = false;
stopSelf();
super.onDestroy();
android.os.Process.killProcess(android.os.Process.myPid());
System.exit(1);
}
}

View File

@ -23,7 +23,7 @@ public class errorHandler
BufferedReader reader = null;
StringBuilder builder = new StringBuilder();
try {
stream = mContext.getResources().getAssets().open("error.html");
stream = mContext.getResources().getAssets().open("error/error.html");
reader = new BufferedReader(new InputStreamReader(stream));
String line;
@ -173,7 +173,7 @@ public class errorHandler
BufferedReader reader = null;
StringBuilder builder = new StringBuilder();
try {
stream = mContext.getResources().getAssets().open("error.html");
stream = mContext.getResources().getAssets().open("error/error.html");
reader = new BufferedReader(new InputStreamReader(stream));
String line;

View File

@ -1,6 +1,8 @@
package com.darkweb.genesissearchengine.helperManager;
import android.Manifest;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.annotation.SuppressLint;
import android.app.DownloadManager;
import android.content.ClipData;
@ -21,6 +23,7 @@ import android.view.Display;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewAnimationUtils;
import android.view.ViewGroup;
import android.view.animation.Animation;
import android.view.animation.RotateAnimation;
@ -166,13 +169,38 @@ public class helperMethod
}
public static void sendBridgeEmail(Context context){
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
String[] aEmailList = { "bridges@torproject.org"};
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, aEmailList);
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "get transport");
emailIntent.setType("plain/text");
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "get transport");
context.startActivity(emailIntent);
Intent selectorIntent = new Intent(Intent.ACTION_SENDTO);
selectorIntent.setData(Uri.parse("mailto:"));
final Intent emailIntent = new Intent(Intent.ACTION_SEND);
emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[]{"bridges@torproject.org"});
emailIntent.putExtra(Intent.EXTRA_SUBJECT, "get bridges");
emailIntent.putExtra(Intent.EXTRA_TEXT, "get bridges");
emailIntent.setSelector( selectorIntent );
context.startActivity(Intent.createChooser(emailIntent, "get transport"));
}
public static void onRevealView(View pView) {
int cx = pView.getWidth();
int cy = pView.getHeight();
float finalRadius = (float) Math.hypot(cx, cy);
Animator anim = ViewAnimationUtils.createCircularReveal(pView, 100, 100, 0, finalRadius);
pView.setVisibility(View.VISIBLE);
anim.start();
}
public static void onHideView(View pView) {
int cx = pView.getWidth();
int cy = pView.getHeight();
float initialRadius = (float) Math.hypot(cx, cy);
Animator anim = ViewAnimationUtils.createCircularReveal(pView, 100, 100, initialRadius, 0);
anim.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
pView.setVisibility(View.INVISIBLE);
}
});
anim.start();
}
public static void hideKeyboard(AppCompatActivity context) {

View File

@ -19,12 +19,15 @@ import androidx.appcompat.app.AppCompatActivity;
import androidx.constraintlayout.widget.ConstraintLayout;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.constants.strings;
import com.darkweb.genesissearchengine.helperManager.eventObserver;
import com.darkweb.genesissearchengine.helperManager.helperMethod;
import com.example.myapplication.R;
import com.google.android.material.switchmaterial.SwitchMaterial;
import org.mozilla.geckoview.ContentBlocking;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@ -182,7 +185,7 @@ class messageManager
}else {
((SwitchMaterial) mDialog.findViewById(R.id.pDTStatus)).setChecked(false);
}
if((boolean) mData.get(3)){
if((int) mData.get(3) != ContentBlocking.AntiTracking.NONE){
((SwitchMaterial) mDialog.findViewById(R.id.pTPStatus)).setChecked(true);
}else {
((SwitchMaterial) mDialog.findViewById(R.id.pTPStatus)).setChecked(false);
@ -216,7 +219,45 @@ class messageManager
mDialog.dismiss();
mContext.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
helperMethod.hideKeyboard(mContext);
mEvent.invokeObserver(Collections.singletonList(mData.get(0).toString().replace("genesis.onion","boogle.store")+"split"+((EditText) mDialog.findViewById(R.id.pBookmark)).getText().toString()), M_BOOKMARK);
mEvent.invokeObserver(Collections.singletonList(mData.get(0).toString().replace("genesis.onion","boogle.store")+"split"+((EditText) mDialog.findViewById(R.id.pBridgeInput)).getText().toString()), M_BOOKMARK);
});
}
private void onUpdateBridges()
{
initializeDialog(R.layout.popup_update_bridges, Gravity.CENTER);
mContext.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING);
if(!status.sBridgeCustomBridge.equals("meek") && !status.sBridgeCustomBridge.equals("obfs4")){
((EditText)mDialog.findViewById(R.id.pBridgeInput)).setText(status.sBridgeCustomBridge);
}
mDialog.setOnShowListener(dialog -> mContext.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING));
mDialog.setOnDismissListener(dialog -> {
final Handler handler = new Handler();
Runnable runnable = () -> {
helperMethod.hideKeyboard(activityContextManager.getInstance().getHomeController());
dialog.dismiss();
mContext.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
};
handler.postDelayed(runnable, 50);
});
mDialog.findViewById(R.id.pBridgeRequest).setOnClickListener(v -> {
final Handler handler = new Handler();
Runnable runnable = () -> {
try{
helperMethod.sendBridgeEmail(mContext);
}
catch (Exception ex){
onTrigger(Arrays.asList(mContext, mContext.getString(R.string.ALERT_NOT_SUPPORTED_MESSAGE)),M_NOT_SUPPORTED);
}
};
handler.postDelayed(runnable, 200);
});
mDialog.findViewById(R.id.pNext).setOnClickListener(v -> {
mDialog.dismiss();
mContext.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
helperMethod.hideKeyboard(mContext);
mEvent.invokeObserver(Collections.singletonList(((EditText)mDialog.findViewById(R.id.pBridgeInput)).getText().toString()), M_SET_BRIDGES);
});
}
@ -496,6 +537,11 @@ class messageManager
/*VERIFIED*/
openSecureConnectionPopup();
break;
case M_UPDATE_BRIDGES:
/*VERIFIED*/
onUpdateBridges();
break;
}
}
}

View File

@ -31,14 +31,15 @@ class orbotManager
public void initialize(AppCompatActivity pAppContext, eventObserver.eventListener pEvent, int pNotificationStatus){
this.mAppContext = pAppContext;
onInitNotificationStatus(pNotificationStatus);
}
private void onStartOrbot(){
orbotLocalConstants.mBridges = status.sBridgeCustomBridge;
orbotLocalConstants.mIsManualBridge = status.sBridgeGatewayManual;
Prefs.putBridgesEnabled(status.sBridgeGatewayManual |status.sBridgeGatewayAuto);
Intent mServiceIntent = new Intent(mAppContext, OrbotService.class);
Prefs.putBridgesEnabled(status.sBridgeStatus);
Intent mServiceIntent = new Intent(mAppContext.getApplicationContext(), OrbotService.class);
mServiceIntent.setAction(ACTION_START);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
mAppContext.startForegroundService(mServiceIntent);

View File

@ -2,7 +2,7 @@ package com.darkweb.genesissearchengine.pluginManager;
import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
import com.darkweb.genesissearchengine.appManager.settingManager.privacyManager.settingPrivacyController;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.enums;
@ -227,6 +227,12 @@ public class pluginController
mHomeController.initTab(true);
activityContextManager.getInstance().getTabController().finish();
}
else if(pEventType.equals(M_REQUEST_BRIDGES)){
pluginController.getInstance().onMessageManagerInvoke(Arrays.asList(constants.CONST_BACKEND_GOOGLE_URL, this), M_BRIDGE_MAIL);
}
else if(pEventType.equals(M_SET_BRIDGES)){
activityContextManager.getInstance().getBridgeController().onUpdateBridges((String) pData.get(0));
}
return null;
}
}

View File

@ -28,10 +28,10 @@ public class pluginEnums
/*Message Manager*/
public enum eMessageManager{
M_RESET, M_DATA_CLEARED, M_SECURE_CONNECTION, M_NOT_SUPPORTED, M_BRIDGE_MAIL, M_LONG_PRESS_WITH_LINK, M_LONG_PRESS_URL, M_LONG_PRESS_DOWNLOAD, M_START_ORBOT, M_DOWNLOAD_FILE, M_RATE_APP, M_REPORT_URL, M_CLEAR_BOOKMARK, M_CLEAR_HISTORY, M_BOOKMARK, M_RATE_SUCCESS, M_RATE_FAILURE, M_LANGUAGE_SUPPORT_FAILURE, M_WELCOME
M_RESET, M_DATA_CLEARED, M_SECURE_CONNECTION, M_UPDATE_BRIDGES, M_NOT_SUPPORTED, M_BRIDGE_MAIL, M_LONG_PRESS_WITH_LINK, M_LONG_PRESS_URL, M_LONG_PRESS_DOWNLOAD, M_START_ORBOT, M_DOWNLOAD_FILE, M_RATE_APP, M_REPORT_URL, M_CLEAR_BOOKMARK, M_CLEAR_HISTORY, M_BOOKMARK, M_RATE_SUCCESS, M_RATE_FAILURE, M_LANGUAGE_SUPPORT_FAILURE, M_WELCOME
}
public enum eMessageManagerCallbacks{
M_CANCEL_WELCOME, M_APP_RATED, M_DOWNLOAD_FILE_MANUAL, M_OPEN_LINK_CURRENT_TAB, M_COPY_LINK, M_OPEN_LINK_NEW_TAB, M_CLEAR_TAB, M_RATE_APPLICATION
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
}
/*Notification Manager*/

View File

@ -1,5 +1,5 @@
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:startOffset="200">
android:startOffset="0">
<alpha
android:duration="200"
android:fromAlpha="0.0"

View File

@ -2,7 +2,7 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:top="60dp">
android:top="160dp">
<shape
android:shape="rectangle" android:padding="15dp" >
<!-- you can use any color you want I used here gray color-->
@ -10,6 +10,7 @@
<corners android:radius="4dp"/>
<stroke
android:width="2dp"
android:top="160dp"
android:color="@color/c_tab_border" />
<corners android:radius="4dp" />
</shape>

View File

@ -1,5 +1,5 @@
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/c_ripple_v2">
android:color="@color/c_background_alpha">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@color/button_gray" />

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/clear_alpha">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@color/clear_alpha" />
<corners android:radius="5.5dp" />
</shape>
</item>
<item android:id="@android:id/background">
<shape android:shape="rectangle">
<gradient
android:angle="90"
android:endColor="@color/c_splash_buttons"
android:startColor="@color/c_splash_buttons"
android:type="linear" />
<corners android:radius="5.5dp" />
</shape>
</item>
</ripple>

View File

@ -12,8 +12,8 @@
<shape android:shape="rectangle">
<gradient
android:angle="90"
android:endColor="@color/c_button_background"
android:startColor="@color/c_button_background"
android:endColor="@color/c_long_button"
android:startColor="@color/c_long_button"
android:type="linear" />
<corners android:radius="5.5dp" />
</shape>

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/c_background"/>
<solid android:color="@color/c_background_alpha"/>
<stroke android:width="0dp"
android:color="@color/c_background"/>
android:color="@color/c_background_alpha"/>
<corners android:radius="5dp" />
</shape>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 52 KiB

View File

@ -53,10 +53,10 @@
android:layout_height="1dp"
android:layout_marginTop="14dp"
android:background="@color/c_view_divier_background"
app:layout_constraintTop_toBottomOf="@+id/pBookmark" />
app:layout_constraintTop_toBottomOf="@+id/pBridgeInput" />
<EditText
android:id="@+id/pBookmark"
android:id="@+id/pBridgeInput"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
@ -88,7 +88,7 @@
android:layout_height="1dp"
android:layout_marginTop="14dp"
android:background="@color/c_view_divier_background"
app:layout_constraintTop_toBottomOf="@+id/pBookmark" />
app:layout_constraintTop_toBottomOf="@+id/pBridgeInput" />
<LinearLayout
android:id="@+id/pNavigationContainer"

View File

@ -0,0 +1,138 @@
<?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">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/pMainLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@xml/hox_rounded_corner"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/pHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:paddingStart="15dp"
android:text="@string/ALERT_UPDATE_BRIDGES"
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:paddingEnd="10dp"
android:text="@string/ALERT_UPDATE_BRIDGES_INFO"
android:textAlignment="textStart"
android:paddingStart="15dp"
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:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="14dp"
android:background="@color/c_view_divier_background"
app:layout_constraintTop_toBottomOf="@+id/pBridgeInput" />
<EditText
android:id="@+id/pBridgeInput"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="10dp"
android:background="@xml/gx_generic_input"
android:ems="10"
android:elevation="3dp"
android:hint="@string/ALERT_ADD_BRIDGES_HINT"
android:importantForAutofill="no"
android:maxLines="1"
android:inputType="text"
android:padding="7dp"
android:paddingStart="11dp"
android:paddingEnd="8dp"
android:textColor="@color/c_text_v1"
android:textColorHighlight="@color/text_color_highlight_v3"
android:textColorHint="@color/c_text_v2"
android:textCursorDrawable="@xml/gx_search_cursor_state"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="@+id/pDivider"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pDescription" />
<View
android:id="@+id/pDivider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="14dp"
android:background="@color/c_view_divier_background"
app:layout_constraintTop_toBottomOf="@+id/pBridgeInput" />
<LinearLayout
android:id="@+id/pNavigationContainer"
android:layout_width="match_parent"
android:layout_height="50dp"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pDivider">
<Button
android:id="@+id/pBridgeRequest"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@xml/ax_ripple_default_round_left"
android:padding="0dp"
android:text="@string/ALERT_REQUEST_BRIDGE"
android:textAllCaps="false"
android:textColor="@color/c_button_text_v1"
android:textSize="15sp"
android:textStyle="bold" />
<View
android:id="@+id/pDividerHorizontal"
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/c_view_divier_background"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pDescription" />
<Button
android:id="@+id/pNext"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@xml/ax_ripple_default_round_right"
android:padding="0dp"
android:text="@string/ALERT_SAVE_BRIDGE"
android:textAllCaps="false"
android:textColor="@color/c_button_text_v1"
android:textSize="15sp"
android:textStyle="bold" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -366,8 +366,13 @@
android:id="@+id/pCustomPort"
android:layout_width="0dp"
android:layout_weight="11"
android:clickable="false"
android:onClick="onOpenCustomBridgeUpdater"
android:layout_height="45dp"
android:focusable="false"
android:paddingLeft="15dp"
android:cursorVisible="false"
android:singleLine="true"
android:paddingRight="15dp"
android:layout_marginStart="15dp"
android:ems="10"
@ -375,8 +380,8 @@
android:hint="@string/BRIDGE_PORT_HINT"
android:textSize="14.5sp"
android:text=""
android:autofillHints=""
android:inputType="text" />
android:inputType="none"
android:autofillHints=""/>
<Button
android:layout_marginTop="-1dp"
android:id="@+id/pBridgeButton"

View File

@ -6,7 +6,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/c_background_keyboard"
tools:context="com.darkweb.genesissearchengine.appManager.homeManager.homeController">
tools:context="com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController">
<androidx.coordinatorlayout.widget.CoordinatorLayout
@ -82,12 +82,13 @@
app:tint="@color/c_lock_tint"
tools:ignore="RtlSymmetry" />
<com.darkweb.genesissearchengine.appManager.homeManager.editTextManager
<com.darkweb.genesissearchengine.appManager.homeManager.homeController.editTextManager
android:id="@+id/pSearchInput"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginStart="-36dp"
android:layout_marginTop="8dp"
android:focusableInTouchMode = "true"
android:layout_marginEnd="18dp"
android:layout_marginBottom="8dp"
android:layout_weight="1"
@ -114,7 +115,7 @@
app:hintAnimationEnabled="false"
tools:targetApi="o">
</com.darkweb.genesissearchengine.appManager.homeManager.editTextManager>
</com.darkweb.genesissearchengine.appManager.homeManager.homeController.editTextManager>
<ImageButton
android:id="@+id/pVoiceInput"
@ -135,15 +136,17 @@
android:tint="@color/c_navigation_tint"
android:visibility="gone" />
<LinearLayout
<FrameLayout
android:id="@+id/pTabCounterContainer"
android:layout_width="40dp"
android:layout_height="match_parent"
android:clickable="true"
android:focusable="true"
android:layout_marginStart="-10dp"
android:onClick="onOpenTabViewBoundary"
android:gravity="left">
<Button
android:onClick="onOpenTabViewBoundary"
android:id="@+id/pTabCounter"
android:layout_width="22dp"
android:layout_height="22dp"
@ -153,14 +156,15 @@
android:layout_marginEnd="13dp"
android:layout_marginBottom="0dp"
android:background="@xml/gx_generic_tab_button"
android:clickable="true"
android:clickable="false"
android:focusable="false"
android:contentDescription="@string/GENERAL_TODO"
android:scaleType="fitCenter"
android:text="@string/HOME_TAB_TEXT"
android:textColor="@color/c_text_v1"
android:textSize="12.5sp"
android:tint="@color/black" />
</LinearLayout>
</FrameLayout>
<ImageButton
android:id="@+id/pMenu"
@ -205,7 +209,7 @@
android:layout_height="match_parent"
android:layout_marginBottom="0dp"
app:layout_constraintEnd_toEndOf="parent"
android:background="@color/blue"
android:background="@color/c_background"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pTopLayout">
@ -226,7 +230,7 @@
app:wrapShiftDrawable="true"
tools:progress="0" />
<com.darkweb.genesissearchengine.appManager.homeManager.NestedGeckoView
<com.darkweb.genesissearchengine.appManager.homeManager.geckoManager.NestedGeckoView
android:id="@+id/pWebView"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -235,63 +239,329 @@
android:alpha="1"
android:background="@color/clear_alpha">
</com.darkweb.genesissearchengine.appManager.homeManager.NestedGeckoView>
</com.darkweb.genesissearchengine.appManager.homeManager.geckoManager.NestedGeckoView>
</FrameLayout>
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<FrameLayout
android:id="@+id/pSplashLayout"
android:visibility="visible"
android:layout_width="match_parent"
android:animateLayoutChanges="true"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/pSplashScreen"
android:clickable="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/landing_ease_blue_splash"
android:animateLayoutChanges="true"
android:background="@color/landing_ease_blue_splash"
android:clickable="true"
android:focusable="true">
<ImageView
android:id="@+id/pTopImage"
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/pInfoPortrait"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="35dp"
android:adjustViewBounds="true"
android:background="@color/white"
android:contentDescription="@string/GENERAL_TODO"
android:scaleX="1.4"
android:scaleY="1.4"
android:src="@drawable/wall2"
android:layout_height="match_parent"
android:visibility="visible"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<ImageView
android:id="@+id/pTopImage"
android:layout_width="match_parent"
android:layout_height="0dp"
android:adjustViewBounds="true"
android:background="@color/landing_ease_blue"
android:contentDescription="@string/GENERAL_TODO"
android:scaleX="1.55"
android:scaleY="1.55"
android:src="@drawable/wall2"
android:translationY="-90dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHeight_percent="0.55"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/pImageDivider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="130dp"
android:adjustViewBounds="true"
android:contentDescription="@string/GENERAL_TODO"
android:scaleType="fitXY"
android:src="@drawable/glide"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/pGenesisLogo"
android:layout_width="90dp"
android:layout_height="90dp"
android:layout_marginStart="5dp"
android:layout_marginTop="100dp"
android:contentDescription="@string/GENERAL_TODO"
android:translationZ="3dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/pImageDivider"
app:srcCompat="@drawable/genesis_logo_bordered" />
<TextView
android:id="@+id/pInfo4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="12dp"
android:ellipsize="end"
android:gravity="start"
android:maxHeight="20dp"
android:paddingStart="5dp"
android:paddingRight="15dp"
android:text="Secured by Tor Network"
android:textAlignment="textStart"
android:textColor="#bfbfbf"
android:textFontWeight="5"
android:textSize="12.5sp"
android:textStyle="bold"
android:translationZ="30dp"
android:visibility="visible"
app:layout_constraintStart_toEndOf="@+id/pGenesisLogo"
app:layout_constraintTop_toTopOf="@+id/pGenesisLogo"
tools:ignore="UnusedAttribute" />
<TextView
android:id="@+id/pInfo5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="5dp"
android:ellipsize="end"
android:gravity="start"
android:maxHeight="20dp"
android:paddingStart="5dp"
android:paddingRight="15dp"
android:text="Builtin Onion Search Engine"
android:textAlignment="textStart"
android:textColor="#bfbfbf"
android:textFontWeight="5"
android:textSize="12.5sp"
android:textStyle="bold"
android:translationZ="30dp"
android:visibility="visible"
app:layout_constraintStart_toEndOf="@+id/pGenesisLogo"
app:layout_constraintTop_toBottomOf="@+id/pInfo4"
tools:ignore="UnusedAttribute" />
<TextView
android:id="@+id/pInfo6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="5dp"
android:ellipsize="end"
android:gravity="start"
android:maxHeight="20dp"
android:paddingStart="5dp"
android:paddingRight="15dp"
android:text="No Record and Digital Fingerprinting"
android:textAlignment="textStart"
android:textColor="#bfbfbf"
android:textFontWeight="5"
android:textSize="12.5sp"
android:textStyle="bold"
android:translationZ="30dp"
android:visibility="visible"
app:layout_constraintStart_toEndOf="@+id/pGenesisLogo"
app:layout_constraintTop_toBottomOf="@+id/pInfo5"
tools:ignore="UnusedAttribute" />
<ImageView
android:id="@+id/pGenesisSecurityLogo"
android:layout_width="90dp"
android:layout_height="90dp"
android:layout_marginStart="5dp"
android:layout_marginTop="10dp"
android:translationZ="3dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pGenesisLogo"
app:srcCompat="@drawable/sheild_logo_bordered" />
<TextView
android:id="@+id/pInfo2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="12dp"
android:ellipsize="end"
android:gravity="start"
android:maxHeight="20dp"
android:paddingStart="5dp"
android:paddingRight="15dp"
android:text="Secured by Tor Network"
android:textAlignment="textStart"
android:textColor="#bfbfbf"
android:textFontWeight="5"
android:textSize="12.5sp"
android:textStyle="bold"
android:translationZ="30dp"
android:visibility="visible"
app:layout_constraintStart_toEndOf="@+id/pGenesisLogo"
app:layout_constraintTop_toTopOf="@+id/pGenesisSecurityLogo"
tools:ignore="UnusedAttribute" />
<TextView
android:id="@+id/pInfo3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="5dp"
android:ellipsize="end"
android:gravity="start"
android:maxHeight="20dp"
android:paddingStart="5dp"
android:paddingRight="15dp"
android:text="Builtin Onion Search Engine"
android:textAlignment="textStart"
android:textColor="#bfbfbf"
android:textFontWeight="5"
android:textSize="12.5sp"
android:textStyle="bold"
android:translationZ="30dp"
android:visibility="visible"
app:layout_constraintStart_toEndOf="@+id/pGenesisLogo"
app:layout_constraintTop_toBottomOf="@+id/pInfo2"
tools:ignore="UnusedAttribute" />
<TextView
android:id="@+id/pInfo7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="5dp"
android:ellipsize="end"
android:gravity="start"
android:maxHeight="20dp"
android:paddingStart="5dp"
android:paddingRight="15dp"
android:text="No Record and Digital Fingerprinting"
android:textAlignment="textStart"
android:textColor="#bfbfbf"
android:textFontWeight="5"
android:textSize="12.5sp"
android:textStyle="bold"
android:translationZ="30dp"
android:visibility="visible"
app:layout_constraintStart_toEndOf="@+id/pGenesisLogo"
app:layout_constraintTop_toBottomOf="@+id/pInfo3"
tools:ignore="UnusedAttribute" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/pInfoLandscape"
android:layout_width="match_parent"
android:visibility="gone"
android:layout_height="match_parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/pImageDivider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="103dp"
android:adjustViewBounds="true"
android:contentDescription="@string/GENERAL_TODO"
android:src="@drawable/glide"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/pTopImage" />
<ImageView
android:id="@+id/pGenesisLogoBottom"
android:layout_width="90dp"
android:layout_height="90dp"
android:layout_marginStart="7dp"
android:layout_marginTop="15dp"
android:contentDescription="@string/GENERAL_TODO"
android:translationZ="3dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/genesis_logo_bordered" />
<Button
<TextView
android:id="@+id/pInfo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="12dp"
android:ellipsize="end"
android:gravity="start"
android:maxHeight="20dp"
android:paddingStart="5dp"
android:paddingRight="15dp"
android:text="Secured by Tor Network"
android:textAlignment="textStart"
android:textColor="#bfbfbf"
android:textFontWeight="5"
android:textSize="12.5sp"
android:textStyle="bold"
android:translationZ="30dp"
android:visibility="visible"
app:layout_constraintStart_toEndOf="@+id/pGenesisLogoBottom"
app:layout_constraintTop_toTopOf="@+id/pGenesisLogoBottom"
tools:ignore="UnusedAttribute" />
<TextView
android:id="@+id/pInfo8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="5dp"
android:ellipsize="end"
android:gravity="start"
android:maxHeight="20dp"
android:paddingStart="5dp"
android:paddingRight="15dp"
android:text="Builtin Onion Search Engine"
android:textAlignment="textStart"
android:textColor="#bfbfbf"
android:textFontWeight="5"
android:textSize="12.5sp"
android:textStyle="bold"
android:translationZ="30dp"
android:visibility="visible"
app:layout_constraintStart_toEndOf="@+id/pGenesisLogoBottom"
app:layout_constraintTop_toBottomOf="@+id/pInfo"
tools:ignore="UnusedAttribute" />
<TextView
android:id="@+id/pInfo9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="5dp"
android:ellipsize="end"
android:gravity="start"
android:maxHeight="20dp"
android:paddingStart="5dp"
android:paddingRight="15dp"
android:text="No Record and Digital Fingerprinting"
android:textAlignment="textStart"
android:textColor="#bfbfbf"
android:textFontWeight="5"
android:textSize="12.5sp"
android:textStyle="bold"
android:translationZ="30dp"
android:visibility="visible"
app:layout_constraintStart_toEndOf="@+id/pGenesisLogoBottom"
app:layout_constraintTop_toBottomOf="@+id/pInfo8"
tools:ignore="UnusedAttribute" />
</androidx.constraintlayout.widget.ConstraintLayout>
<Button
android:id="@+id/Connect"
android:layout_width="120dp"
android:layout_height="51dp"
android:layout_marginStart="20dp"
android:layout_marginBottom="20dp"
android:background="@xml/hox_rounded_corner_splash"
android:layout_marginStart="23dp"
android:layout_marginBottom="23dp"
android:background="@xml/hox_rounded_corner_splash_no_ripple"
android:onClick="onStartApplication"
android:text="@string/HOME_CONNECT"
app:layout_constraintBottom_toTopOf="@+id/pDivider1"
app:layout_constraintBottom_toTopOf="@+id/pCopyright"
app:layout_constraintStart_toStartOf="parent" />
<View
@ -299,8 +569,8 @@
android:layout_width="match_parent"
android:layout_height="3dp"
android:alpha="0.5"
android:elevation="4dp"
android:background="#264d73"
android:elevation="4dp"
app:layout_constraintBottom_toTopOf="@+id/pCopyright"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
@ -395,6 +665,7 @@
android:layout_marginTop="14dp"
android:layout_marginBottom="13dp"
android:clickable="false"
android:background="@color/clear_alpha"
android:contentDescription="@string/GENERAL_TODO"
android:focusable="false"
android:translationZ="3dp"
@ -403,166 +674,6 @@
app:layout_constraintStart_toStartOf="@+id/Connect"
app:layout_constraintTop_toBottomOf="@+id/pOrbotLogs" />
<ImageView
android:id="@+id/pGenesisLogo"
android:layout_width="90dp"
android:layout_height="90dp"
android:layout_marginStart="5dp"
android:layout_marginTop="85dp"
android:contentDescription="@string/GENERAL_TODO"
android:translationZ="3dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/pImageDivider"
app:srcCompat="@drawable/genesis_logo_bordered" />
<TextView
android:id="@+id/pInfo4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="12dp"
android:ellipsize="end"
android:gravity="start"
android:maxHeight="20dp"
android:paddingStart="5dp"
android:paddingRight="15dp"
android:text="Secured by Tor Network"
android:textAlignment="textStart"
android:textColor="#bfbfbf"
android:textFontWeight="5"
android:textSize="12.5sp"
android:textStyle="bold"
android:translationZ="30dp"
android:visibility="visible"
app:layout_constraintStart_toEndOf="@+id/pGenesisLogo"
app:layout_constraintTop_toTopOf="@+id/pGenesisLogo"
tools:ignore="UnusedAttribute" />
<TextView
android:id="@+id/pInfo5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="5dp"
android:ellipsize="end"
android:gravity="start"
android:maxHeight="20dp"
android:paddingStart="5dp"
android:paddingRight="15dp"
android:text="Builtin Onion Search Engine"
android:textAlignment="textStart"
android:textColor="#bfbfbf"
android:textFontWeight="5"
android:textSize="12.5sp"
android:textStyle="bold"
android:translationZ="30dp"
android:visibility="visible"
app:layout_constraintStart_toEndOf="@+id/pGenesisLogo"
app:layout_constraintTop_toBottomOf="@+id/pInfo4"
tools:ignore="UnusedAttribute" />
<TextView
android:id="@+id/pInfo6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="5dp"
android:ellipsize="end"
android:gravity="start"
android:maxHeight="20dp"
android:paddingStart="5dp"
android:paddingRight="15dp"
android:text="No Record and Digital Fingerprinting"
android:textAlignment="textStart"
android:textColor="#bfbfbf"
android:textFontWeight="5"
android:textSize="12.5sp"
android:textStyle="bold"
android:translationZ="30dp"
android:visibility="visible"
app:layout_constraintStart_toEndOf="@+id/pGenesisLogo"
app:layout_constraintTop_toBottomOf="@+id/pInfo5"
tools:ignore="UnusedAttribute" />
<ImageView
android:id="@+id/pGenesisLogo2"
android:layout_width="90dp"
android:layout_height="90dp"
android:layout_marginStart="5dp"
android:layout_marginTop="10dp"
android:translationZ="3dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pGenesisLogo"
app:srcCompat="@drawable/sheild_logo_bordered" />
<TextView
android:id="@+id/pInfo2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="12dp"
android:ellipsize="end"
android:gravity="start"
android:maxHeight="20dp"
android:paddingStart="5dp"
android:paddingRight="15dp"
android:text="Secured by Tor Network"
android:textAlignment="textStart"
android:textColor="#bfbfbf"
android:textFontWeight="5"
android:textSize="12.5sp"
android:textStyle="bold"
android:translationZ="30dp"
android:visibility="visible"
app:layout_constraintStart_toEndOf="@+id/pGenesisLogo"
app:layout_constraintTop_toTopOf="@+id/pGenesisLogo2"
tools:ignore="UnusedAttribute" />
<TextView
android:id="@+id/pInfo3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="5dp"
android:ellipsize="end"
android:gravity="start"
android:maxHeight="20dp"
android:paddingStart="5dp"
android:paddingRight="15dp"
android:text="Builtin Onion Search Engine"
android:textAlignment="textStart"
android:textColor="#bfbfbf"
android:textFontWeight="5"
android:textSize="12.5sp"
android:textStyle="bold"
android:translationZ="30dp"
android:visibility="visible"
app:layout_constraintStart_toEndOf="@+id/pGenesisLogo"
app:layout_constraintTop_toBottomOf="@+id/pInfo2"
tools:ignore="UnusedAttribute" />
<TextView
android:id="@+id/pInfo7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="5dp"
android:ellipsize="end"
android:gravity="start"
android:maxHeight="20dp"
android:paddingStart="5dp"
android:paddingRight="15dp"
android:text="No Record and Digital Fingerprinting"
android:textAlignment="textStart"
android:textColor="#bfbfbf"
android:textFontWeight="5"
android:textSize="12.5sp"
android:textStyle="bold"
android:translationZ="30dp"
android:visibility="visible"
app:layout_constraintStart_toEndOf="@+id/pGenesisLogo"
app:layout_constraintTop_toBottomOf="@+id/pInfo3"
tools:ignore="UnusedAttribute" />
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>
@ -616,7 +727,7 @@
<include
android:id="@+id/pSearchEngineBar"
layout="@layout/popup_search_engine"
layout="@layout/popup_search_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="59dp"

View File

@ -12,7 +12,7 @@
android:layout_marginStart="5dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="5dp"
android:layout_marginBottom="60dp"
android:layout_marginBottom="20dp"
android:background="@xml/gx_side_menu"
android:elevation="4dp"
app:layout_constraintBottom_toBottomOf="parent"
@ -30,8 +30,8 @@
<LinearLayout
android:layout_width="238dp"
android:layout_height="wrap_content"
android:layout_marginTop="1dp"
android:layout_marginStart="1dp"
android:layout_marginTop="1dp"
android:background="@color/c_ripple_v3"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
@ -102,46 +102,46 @@
android:layout_marginTop="0dp"
android:layout_marginRight="1dp"
android:background="@xml/gx_side_item"
android:onClick="onMenuItemInvoked"
android:clickable="true"
android:focusable="true"
android:onClick="onMenuItemInvoked"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:layout_width="20dp"
android:layout_marginStart="16dp"
android:layout_height="match_parent"
android:layout_marginStart="16dp"
android:contentDescription="@string/GENERAL_TODO"
android:src="@xml/ic_baseline_new_tab"
app:tint="@color/c_navigation_medium"
android:contentDescription="@string/GENERAL_TODO" />
app:tint="@color/c_navigation_medium" />
<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="50dp"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:gravity="left|center_vertical"
android:paddingStart="3dp"
android:text="@string/HOME_MENU__NEW_TABS"
android:textAllCaps="false"
android:textColor="@color/c_text_home_menu"
android:textSize="15sp"
android:layout_marginStart="10dp"
tools:ignore="RtlHardcoded,RtlSymmetry" />
</LinearLayout>
<LinearLayout
android:id="@+id/menu12"
android:background="@xml/gx_side_item"
android:onClick="onMenuItemInvoked"
android:layout_width="match_parent"
android:layout_height="52dp"
android:layout_marginLeft="1dp"
android:layout_marginTop="1dp"
android:layout_marginRight="1dp"
android:background="@xml/gx_side_item"
android:clickable="true"
android:focusable="true"
android:onClick="onMenuItemInvoked"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
@ -149,37 +149,37 @@
<ImageView
android:id="@+id/markerTab"
android:layout_width="20dp"
android:layout_marginStart="16dp"
android:layout_height="match_parent"
android:layout_marginStart="16dp"
android:contentDescription="@string/GENERAL_TODO"
android:src="@xml/ic_baseline_vpn"
app:tint="@color/c_navigation_medium"
android:contentDescription="@string/GENERAL_TODO" />
app:tint="@color/c_navigation_medium" />
<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="50dp"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:gravity="left|center_vertical"
android:paddingStart="3dp"
android:text="@string/HOME_MENU__ORBOT_LOGS"
android:textAllCaps="false"
android:textColor="@color/c_text_home_menu"
android:textSize="15sp"
android:layout_marginStart="10dp"
tools:ignore="RtlHardcoded,RtlSymmetry" />
</LinearLayout>
<LinearLayout
android:id="@+id/pMenuOpenNewTab"
android:onClick="onMenuItemInvoked"
android:background="@xml/gx_side_item"
android:layout_width="match_parent"
android:layout_height="52dp"
android:layout_marginLeft="1dp"
android:layout_marginTop="1dp"
android:layout_marginRight="1dp"
android:background="@xml/gx_side_item"
android:clickable="true"
android:focusable="true"
android:onClick="onMenuItemInvoked"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
@ -187,17 +187,17 @@
<ImageView
android:layout_width="20dp"
android:layout_height="match_parent"
android:src="@xml/ic_baseline_bookmark_menu"
app:tint="@color/c_navigation_medium"
android:layout_marginStart="16dp"
android:contentDescription="@string/GENERAL_TODO" />
android:contentDescription="@string/GENERAL_TODO"
android:src="@xml/ic_baseline_bookmark_menu"
app:tint="@color/c_navigation_medium" />
<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="50dp"
android:gravity="left|center_vertical"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:gravity="left|center_vertical"
android:paddingStart="3dp"
android:text="@string/HOME_MENU_OPEN_BOOKMARK"
android:textAllCaps="false"
@ -208,35 +208,36 @@
<LinearLayout
android:id="@+id/menu7"
android:background="@xml/gx_side_item"
android:onClick="onMenuItemInvoked"
android:layout_width="match_parent"
android:layout_height="52dp"
android:layout_marginLeft="1dp"
android:layout_marginTop="1dp"
android:layout_marginRight="1dp"
android:background="@xml/gx_side_item"
android:clickable="true"
android:focusable="true"
android:onClick="onMenuItemInvoked"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:layout_width="20dp" android:layout_height="match_parent"
android:src="@xml/ic_baseline_history"
app:tint="@color/c_navigation_medium"
android:layout_width="20dp"
android:layout_height="match_parent"
android:layout_marginStart="16dp"
android:contentDescription="@string/GENERAL_TODO" />
android:contentDescription="@string/GENERAL_TODO"
android:src="@xml/ic_baseline_history"
app:tint="@color/c_navigation_medium" />
<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="50dp"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:gravity="left|center_vertical"
android:paddingStart="3dp"
android:text="@string/HOME_MENU_HISTORY"
android:textAllCaps="false"
android:layout_marginStart="10dp"
android:textColor="@color/c_text_home_menu"
android:textSize="15sp"
tools:ignore="RtlHardcoded,RtlSymmetry" />
@ -244,15 +245,15 @@
<LinearLayout
android:id="@+id/menu8"
android:background="@xml/gx_side_item"
android:onClick="onMenuItemInvoked"
android:layout_width="match_parent"
android:layout_height="52dp"
android:layout_marginLeft="1dp"
android:layout_marginTop="1dp"
android:layout_marginRight="1dp"
android:background="@xml/gx_side_item"
android:clickable="true"
android:focusable="true"
android:onClick="onMenuItemInvoked"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
@ -260,36 +261,36 @@
<ImageView
android:layout_width="20dp"
android:layout_height="match_parent"
android:src="@xml/ic_arrow_down"
app:tint="@color/c_navigation_medium"
android:layout_marginStart="16dp"
android:contentDescription="@string/GENERAL_TODO" />
android:contentDescription="@string/GENERAL_TODO"
android:src="@xml/ic_arrow_down"
app:tint="@color/c_navigation_medium" />
<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="50dp"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:gravity="left|center_vertical"
android:paddingStart="3dp"
android:text="@string/HOME_MENU_DOWNLOAD"
android:textAllCaps="false"
android:textColor="@color/c_text_home_menu"
android:textSize="15sp"
android:layout_marginStart="10dp"
tools:ignore="RtlHardcoded,RtlSymmetry" />
</LinearLayout>
<LinearLayout
android:id="@+id/menu25"
android:background="@xml/gx_side_item"
android:onClick="onMenuItemInvoked"
android:layout_width="match_parent"
android:layout_height="52dp"
android:layout_marginLeft="1dp"
android:layout_marginTop="1dp"
android:layout_marginRight="1dp"
android:background="@xml/gx_side_item"
android:clickable="true"
android:focusable="true"
android:onClick="onMenuItemInvoked"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
@ -297,59 +298,59 @@
<ImageView
android:layout_width="20dp"
android:layout_height="match_parent"
android:src="@xml/ic_baseline_language"
app:tint="@color/c_navigation_medium"
android:layout_marginStart="16dp"
android:contentDescription="@string/GENERAL_TODO" />
android:contentDescription="@string/GENERAL_TODO"
android:src="@xml/ic_baseline_language"
app:tint="@color/c_navigation_medium" />
<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="50dp"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:gravity="left|center_vertical"
android:paddingStart="3dp"
android:text="@string/HOME_MENU_LANGUAGE"
android:textAllCaps="false"
android:textColor="@color/c_text_home_menu"
android:textSize="15sp"
android:layout_marginStart="10dp"
tools:ignore="RtlHardcoded,RtlSymmetry" />
</LinearLayout>
<LinearLayout
android:id="@+id/pMenuFind"
android:background="@xml/gx_side_item"
android:onClick="onMenuItemInvoked"
android:layout_width="match_parent"
android:layout_height="52dp"
android:layout_marginLeft="1dp"
android:layout_marginTop="1dp"
android:layout_marginRight="1dp"
android:background="@xml/gx_side_item"
android:clickable="true"
android:focusable="true"
android:onClick="onMenuItemInvoked"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:layout_width="20dp"
android:layout_marginStart="16dp"
android:layout_height="match_parent"
android:layout_marginStart="16dp"
android:contentDescription="@string/GENERAL_TODO"
android:src="@xml/ic_baseline_find"
app:tint="@color/c_navigation_medium"
android:contentDescription="@string/GENERAL_TODO" />
app:tint="@color/c_navigation_medium" />
<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="50dp"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:gravity="left|center_vertical"
android:paddingStart="3dp"
android:text="@string/HOME_MENU_FIND"
android:textAllCaps="false"
android:textColor="@color/c_text_home_menu"
android:textSize="15sp"
android:layout_marginStart="10dp"
tools:ignore="RtlHardcoded,RtlSymmetry" />
</LinearLayout>
@ -357,7 +358,6 @@
<LinearLayout
android:id="@+id/menu26"
android:layout_width="239dp"
android:paddingRight="10dp"
android:layout_height="wrap_content"
android:layout_marginLeft="1dp"
android:layout_marginTop="1dp"
@ -367,22 +367,24 @@
android:focusable="true"
android:onClick="onMenuItemInvoked"
android:orientation="horizontal"
android:paddingRight="10dp"
android:textAllCaps="false"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:layout_width="20dp"
android:layout_marginStart="16dp"
android:layout_height="match_parent"
android:layout_marginStart="16dp"
android:contentDescription="@string/GENERAL_TODO"
android:src="@xml/ic_baseline_desktop"
app:tint="@color/c_navigation_medium"
android:contentDescription="@string/GENERAL_TODO" />
app:tint="@color/c_navigation_medium" />
<TextView
android:id="@+id/menu28"
android:layout_width="0dp"
android:layout_height="50dp"
android:layout_marginStart="4dp"
android:layout_weight="4"
android:background="@color/clear_alpha"
android:clickable="false"
@ -393,7 +395,6 @@
android:text="@string/HOME_MENU_DESKTOP"
android:textAllCaps="false"
android:textColor="@color/c_text_home_menu"
android:layout_marginStart="4dp"
android:textSize="15sp"
tools:ignore="RtlHardcoded,RtlSymmetry" />
@ -416,75 +417,75 @@
<LinearLayout
android:id="@+id/menu6"
android:background="@xml/gx_side_item"
android:onClick="onMenuItemInvoked"
android:layout_width="match_parent"
android:layout_height="52dp"
android:layout_marginLeft="1dp"
android:layout_marginTop="1dp"
android:layout_marginRight="1dp"
android:background="@xml/gx_side_item"
android:clickable="true"
android:focusable="true"
android:onClick="onMenuItemInvoked"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:layout_width="20dp"
android:layout_marginStart="16dp"
android:layout_height="match_parent"
android:layout_marginStart="16dp"
android:contentDescription="@string/GENERAL_TODO"
android:src="@xml/ic_baseline_setting"
app:tint="@color/c_navigation_medium"
android:contentDescription="@string/GENERAL_TODO" />
app:tint="@color/c_navigation_medium" />
<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="50dp"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:gravity="left|center_vertical"
android:paddingStart="3dp"
android:text="@string/HOME_MENU_SETTING"
android:textAllCaps="false"
android:textColor="@color/c_text_home_menu"
android:textSize="15sp"
android:layout_marginStart="10dp"
tools:ignore="RtlHardcoded,RtlSymmetry" />
</LinearLayout>
<LinearLayout
android:id="@+id/pMenuQuit"
android:background="@xml/gx_ripple_gray_bottom"
android:onClick="onMenuItemInvoked"
android:layout_width="match_parent"
android:layout_height="52dp"
android:layout_marginLeft="1dp"
android:layout_marginTop="1dp"
android:layout_marginRight="1dp"
android:background="@xml/gx_ripple_gray_bottom"
android:clickable="true"
android:focusable="true"
android:onClick="onMenuItemInvoked"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:layout_width="20dp"
android:layout_marginStart="16dp"
android:layout_height="match_parent"
android:src="@xml/ic_baseline_quit"
android:layout_marginStart="16dp"
android:contentDescription="@string/GENERAL_TODO"
android:src="@xml/ic_baseline_quit"
app:tint="@color/c_navigation_medium" />
<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="50dp"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:gravity="left|center_vertical"
android:paddingStart="3dp"
android:text="@string/HOME_MENU_QUIT"
android:textAllCaps="false"
android:textColor="@color/c_text_home_menu"
android:textSize="15sp"
android:layout_marginStart="10dp"
tools:ignore="RtlHardcoded,RtlSymmetry" />
</LinearLayout>

View File

@ -130,7 +130,8 @@
android:layout_marginStart="10dp"
android:paddingStart="10dp"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:layout_marginBottom="25dp"
android:paddingBottom="25dp"
android:textColor="@color/c_text_v4"
android:textSize="14sp"
android:visibility="gone"
@ -141,7 +142,6 @@
android:id="@+id/pLogRecycleView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layoutAnimation="@anim/log_layout_controller"
android:nestedScrollingEnabled="false"/>
</LinearLayout>
@ -155,12 +155,12 @@
android:visibility="gone"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:onClick="onScrollTop"
android:onClick="onScrollBottom"
android:clickable="true"
android:tint="@color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:srcCompat="@xml/ic_baseline_arrow_upward"
app:srcCompat="@xml/ic_baseline_keyboard_arrow_down"
android:focusable="true"
android:contentDescription="@string/GENERAL_TODO" />

View File

@ -105,10 +105,9 @@
<LinearLayout
android:layout_width="match_parent"
android:background="@color/clear_alpha"
android:layout_marginBottom="0dp"
android:layout_marginEnd = "20dp"
android:orientation="horizontal"
android:layout_height="65dp">
android:layout_height="wrap_content">
<TextView
android:textSize="14sp"
android:layout_width="0dp"
@ -121,20 +120,25 @@
/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="15dp"
android:layout_marginTop="15dp"
android:background="@color/c_view_divier_background" />
<LinearLayout
android:layout_width="match_parent"
android:layout_marginTop="20dp"
android:layout_marginBottom="5dp"
android:orientation="horizontal"
android:layout_height="wrap_content">
<TextView
android:textSize="14sp"
android:textColor="@color/c_text_v7"
android:textSize="13.5sp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_height="50dp"
android:gravity="center_vertical"
android:layout_weight="40"
android:textColor="@color/c_text_v1"
android:background="@xml/sx_border_left"
android:paddingStart="15dp"
android:padding="10dp"
android:layout_marginStart="10dp"
android:textStyle="bold"
@ -148,7 +152,6 @@
android:layout_marginEnd = "0dp"
android:paddingEnd="0dp"
android:layout_marginBottom="0dp"
android:paddingTop="14dp"
android:paddingBottom="14dp"
android:orientation="horizontal"
android:layout_height="wrap_content"
@ -162,7 +165,7 @@
android:paddingEnd="15dp"
android:text="@string/ORBOT_PROXY_STATUS_INFO"
android:textColor="@color/c_text_v6"
android:textSize="14sp" />
android:textSize="13.5sp" />
<TextView
android:id="@+id/pOrbotStatus"
@ -179,20 +182,25 @@
tools:ignore="UseSwitchCompatOrMaterialXml" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="15dp"
android:background="@color/c_view_divier_background" />
<LinearLayout
android:layout_width="match_parent"
android:layout_marginTop="20dp"
android:layout_marginBottom="5dp"
android:orientation="horizontal"
android:layout_height="wrap_content">
<TextView
android:textSize="14sp"
android:textColor="@color/c_text_v7"
android:textSize="13.5sp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_height="50dp"
android:gravity="center_vertical"
android:layout_weight="40"
android:textColor="@color/c_text_v1"
android:background="@xml/sx_border_left"
android:paddingStart="15dp"
android:padding="10dp"
android:layout_marginStart="10dp"
android:textStyle="bold"
@ -207,13 +215,12 @@
android:layout_marginEnd = "0dp"
android:paddingEnd="0dp"
android:layout_marginBottom="0dp"
android:paddingTop="14dp"
android:paddingBottom="14dp"
android:orientation="horizontal"
android:layout_height="wrap_content"
tools:ignore="RtlSymmetry">
<TextView
android:textSize="14sp"
android:textSize="13.5sp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
@ -240,13 +247,12 @@
android:layout_marginEnd = "0dp"
android:paddingEnd="0dp"
android:layout_marginBottom="0dp"
android:paddingTop="14dp"
android:paddingBottom="14dp"
android:orientation="horizontal"
android:layout_height="wrap_content"
tools:ignore="RtlSymmetry">
<TextView
android:textSize="14sp"
android:textSize="13.5sp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
@ -280,8 +286,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/PROXY_SUB_HEADER3"
android:textColor="@color/c_text_setting_heading"
android:textSize="14sp"
android:textColor="@color/c_text_v7"
android:textSize="13.5sp"
android:textStyle="bold" />
<TextView
@ -290,7 +296,7 @@
android:layout_marginTop="10dp"
android:textColor="@color/c_text_v6"
android:text="@string/PROXY_CONNECTIVITY_SETTING_INFO"
android:textSize="14sp" />
android:textSize="13.5sp" />
</LinearLayout>
</LinearLayout>

View File

@ -349,6 +349,79 @@
</LinearLayout>
<LinearLayout
android:id="@+id/pOption8"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:background="@xml/gx_ripple_gray"
android:onClick="onManageTracking"
android:orientation="horizontal"
android:weightSum="8">
<ImageView
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:padding="10dp"
app:tint="@color/c_icon_tint"
android:layout_marginStart="5dp"
android:layout_marginEnd="5dp"
android:src="@xml/ic_baseline_privacy"
android:contentDescription="@string/GENERAL_TODO" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="6"
android:clickable="false"
android:orientation="vertical">
<Button
android:layout_width="wrap_content"
android:layout_height="20dp"
android:alpha="1"
android:background="@android:color/transparent"
android:clickable="false"
android:padding="0dp"
android:text="@string/SETTING_TRACKING"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="@color/c_text_v1"
android:textSize="15sp"
tools:ignore="RtlSymmetry" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:alpha="1"
android:background="@android:color/transparent"
android:clickable="false"
android:padding="0dp"
android:text="@string/SETTING_TRACKING_INFO"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="@color/c_text_v6"
android:textSize="13.5sp"
tools:ignore="RtlSymmetry" />
</LinearLayout>
<ImageButton
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@android:color/transparent"
android:contentDescription="@string/GENERAL_TODO"
android:clickable="false"
android:layout_marginEnd="5dp"
android:tint="@color/c_navigation_tint"
android:src="@xml/ic_arrow_right" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="0dp"
@ -585,7 +658,7 @@
android:background="@color/c_view_divier_background"/>
<LinearLayout
android:id="@+id/pOption8"
android:id="@+id/pOption9"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="10dp"
@ -663,7 +736,7 @@
android:background="@color/c_view_divier_background" />
<LinearLayout
android:id="@+id/pOption9"
android:id="@+id/pOption10"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="10dp"
@ -742,7 +815,7 @@
android:background="@color/c_view_divier_background" />
<LinearLayout
android:id="@+id/pOption10"
android:id="@+id/pOption11"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="10dp"
@ -815,7 +888,7 @@
</LinearLayout>
<LinearLayout
android:id="@+id/pOption11"
android:id="@+id/pOption12"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="10dp"
@ -888,7 +961,7 @@
</LinearLayout>
<LinearLayout
android:id="@+id/pOption12"
android:id="@+id/pOption13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="10dp"

View File

@ -622,8 +622,8 @@
android:layout_gravity="end"
android:textStyle="bold"
android:src="@xml/ic_arrow_right"
android:layout_marginEnd="17dp"
android:layout_marginStart="17dp"
android:layout_marginEnd="18dp"
android:layout_marginStart="15dp"
android:padding="15dp"
android:paddingBottom="0dp"
android:elevation="7dp"

View File

@ -85,21 +85,44 @@
android:orientation="horizontal"
android:weightSum="7">
<TextView
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:layout_weight="6"
android:alpha="1"
android:background="@android:color/transparent"
android:layout_marginStart="15dp"
android:clickable="false"
android:padding="0dp"
android:paddingStart="15dp"
android:text="@string/SETTING_ORBOT_LIST_VIEW"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="@color/c_text_v1"
android:textSize="14sp"
tools:ignore="RtlSymmetry" />
android:orientation="vertical">
<Button
android:layout_width="wrap_content"
android:layout_height="20dp"
android:alpha="1"
android:background="@android:color/transparent"
android:clickable="false"
android:padding="0dp"
android:text="@string/SETTING_ORBOT_LIST_VIEW"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="@color/c_text_v1"
android:textSize="15sp"
tools:ignore="RtlSymmetry" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:alpha="1"
android:background="@android:color/transparent"
android:clickable="false"
android:padding="0dp"
android:text="@string/SETTING_ORBOT_LIST_VIEW_INFO"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="@color/c_text_v6"
android:textSize="13.5sp"
tools:ignore="RtlSymmetry" />
</LinearLayout>
<com.google.android.material.switchmaterial.SwitchMaterial
android:layout_width="0dp"
@ -114,6 +137,11 @@
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/c_view_divier_background" />
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -85,7 +85,7 @@
android:textSize="15sp"
android:layout_width="wrap_content"
android:textStyle="bold"
android:layout_height="wrap_content"
android:layout_height="0dp"
android:layout_weight="40"
android:layout_marginTop="00dp"
android:layout_marginStart="15dp"
@ -109,6 +109,67 @@
tools:ignore="RtlSymmetry" />
</LinearLayout>
<LinearLayout
android:id="@+id/pOption2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@xml/gx_ripple_gray"
android:onClick="onManageTracking"
android:orientation="horizontal"
android:paddingTop="10dp"
android:paddingBottom="10dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1"
android:clickable="false"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="20dp"
android:alpha="1"
android:background="@android:color/transparent"
android:clickable="false"
android:padding="0dp"
android:text="@string/SETTING_TRACKING"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="@color/c_text_v1"
android:textSize="14sp"
tools:ignore="RtlSymmetry" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:alpha="1"
android:background="@android:color/transparent"
android:clickable="false"
android:padding="0dp"
android:text="@string/SETTING_TRACKING_INFO"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="@color/c_text_v6"
android:textSize="13.5sp"
tools:ignore="RtlSymmetry" />
</LinearLayout>
<ImageButton
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginEnd="15dp"
android:background="@android:color/transparent"
android:clickable="false"
android:contentDescription="@string/GENERAL_TODO"
android:src="@xml/ic_arrow_right"
android:tint="@color/c_navigation_tint" />
</LinearLayout>
<LinearLayout
android:id="@+id/pOption0"
android:layout_width="match_parent"
@ -237,71 +298,6 @@
</LinearLayout>
<LinearLayout
android:id="@+id/pOption2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:background="@xml/gx_ripple_gray"
android:orientation="horizontal"
android:onClick="onTrackingProtection"
android:weightSum="7">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="6"
android:clickable="false"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="20dp"
android:alpha="1"
android:background="@android:color/transparent"
android:clickable="false"
android:padding="0dp"
android:paddingStart="15dp"
android:text="@string/SETTING_PRIVACY_TRACKING_PROTECTION"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="@color/c_text_v1"
android:textSize="14sp"
tools:ignore="RtlSymmetry" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:alpha="1"
android:background="@android:color/transparent"
android:clickable="false"
android:padding="0dp"
android:paddingStart="15dp"
android:text="@string/SETTING_PRIVACY_TRACKING_PROTECTION_INFO"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="@color/c_text_v6"
android:textSize="13.5sp"
tools:ignore="RtlSymmetry" />
</LinearLayout>
<com.google.android.material.switchmaterial.SwitchMaterial
android:layout_width="0dp"
android:layout_height="match_parent"
android:clickable="false"
android:focusable="false"
android:id="@+id/pTrackingProtection"
android:theme="@style/SCBSwitch"
android:layout_marginEnd="10dp"
android:layout_marginTop="10dp"
android:layout_weight="1"
android:contentDescription="@string/GENERAL_TODO" />
</LinearLayout>
<LinearLayout
android:id="@+id/pOption3"
android:layout_width="match_parent"
@ -483,7 +479,6 @@
</LinearLayout>
<LinearLayout
android:id="@+id/pOption4"
android:layout_width="match_parent"

View File

@ -0,0 +1,271 @@
<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:background="@color/c_background"
tools:context="com.darkweb.genesissearchengine.appManager.settingManager.trackingManager.settingTrackingController">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="wrap_content">
<!-- Title Header -->
<LinearLayout
android:id="@+id/pHeaderContainerTop"
android:layout_width="match_parent"
android:layout_height="48dp"
android:clickable="true"
android:paddingStart="5dp"
android:elevation="8dp"
android:background="@color/c_background"
android:focusable="true"
android:orientation="horizontal"
tools:ignore="RtlSymmetry">
<ImageButton
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_marginStart="0dp"
android:layout_marginTop="1dp"
android:background="@xml/gx_ripple_default_round"
android:contentDescription="@string/GENERAL_TODO"
android:onClick="onClose"
android:src="@xml/ic_arrow_back"
android:tint="@color/c_navigation_tint" />
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:onClick="onClose"
android:layout_marginTop="-3dp"
android:gravity="center_vertical|start"
android:text="@string/SETTING_TRACKING_HEADER"
android:textColor="@color/c_text_v1"
android:textSize="17sp"
android:textStyle="bold" />
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1"/>
<ImageView
android:layout_width="47dp"
android:layout_height="match_parent"
android:padding="0dp"
android:layout_marginEnd="0dp"
android:layout_gravity="center_vertical"
android:layout_marginStart="6dp"
android:paddingStart="7dp"
android:onClick="onOpenInfo"
android:background="@xml/gx_ripple_gray_round_left"
android:contentDescription="@string/GENERAL_TODO"
android:src="@drawable/info"
app:tint="@color/c_icon_tint_light" />
</LinearLayout>
<!-- Title Header -->
<LinearLayout
android:layout_width="match_parent"
android:layout_marginTop="15dp"
android:layout_marginBottom="15dp"
android:orientation="vertical"
android:layout_height="wrap_content">
<TextView
android:textColor="@color/c_text_setting_heading"
android:textSize="15sp"
android:layout_width="wrap_content"
android:textStyle="bold"
android:layout_height="wrap_content"
android:layout_weight="40"
android:layout_marginTop="00dp"
android:layout_marginStart="15dp"
android:text="@string/SETTING_TRACKING_SUB_HEADER"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:alpha="1"
android:id="@+id/pHomePageText"
android:background="@android:color/transparent"
android:clickable="false"
android:padding="0dp"
android:paddingStart="15dp"
android:text="@string/SETTING_TRACKING_SUB_HEADER_INFO"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="@color/c_text_v6"
android:textSize="13.5sp"
tools:ignore="RtlSymmetry" />
</LinearLayout>
<LinearLayout
android:id="@+id/pOption3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="7">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="false"
android:orientation="vertical"
tools:ignore="UselessParent">
<LinearLayout
android:layout_width="match_parent"
android:layout_marginTop="10dp"
android:background="@xml/sx_border_left"
android:paddingStart="4dp"
android:layout_marginStart="15dp"
android:layout_height="wrap_content"
android:orientation="vertical"
tools:ignore="RtlSymmetry">
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="-1dp"
android:elevation="2dp"
android:background="@color/white"/>
<LinearLayout
android:id="@+id/pTrackingOption1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="13dp"
android:background="@xml/gx_ripple_gray"
android:onClick="onTracking"
android:orientation="vertical">
<RadioButton
android:id="@+id/pTrackingRadioOption1"
android:layoutDirection="rtl"
android:layout_width="match_parent"
android:paddingRight="15dp"
android:layout_marginTop="8dp"
android:clickable="false"
android:buttonTint="@color/c_radio_tint"
android:textColor="@color/c_text_v1"
android:layout_marginRight="10dp"
android:paddingLeft="15dp"
android:textSize="15sp"
android:text="@string/SETTING_PRIVACY_TRACKING_OPTION1"
tools:ignore="RtlHardcoded"
android:layout_height="wrap_content" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="-2dp"
android:paddingEnd="65dp"
android:textSize="13sp"
android:text="@string/SETTING_PRIVACY_TRACKING_OPTION1_INFO"
/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/c_view_divier_background_inner"/>
<LinearLayout
android:id="@+id/pTrackingOption2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="13dp"
android:background="@xml/gx_ripple_gray"
android:onClick="onTracking"
android:orientation="vertical">
<RadioButton
android:id="@+id/pTrackingRadioOption2"
android:layoutDirection="rtl"
android:layout_width="match_parent"
android:paddingRight="15dp"
android:layout_marginTop="8dp"
android:clickable="false"
android:buttonTint="@color/c_radio_tint"
android:textColor="@color/c_text_v1"
android:layout_marginRight="10dp"
android:paddingLeft="15dp"
android:textSize="15sp"
android:text="@string/SETTING_PRIVACY_TRACKING_OPTION2"
tools:ignore="RtlHardcoded"
android:layout_height="wrap_content" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="-2dp"
android:paddingEnd="65dp"
android:textSize="13sp"
android:text="@string/SETTING_PRIVACY_TRACKING_OPTION2_INFO"
/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/c_view_divier_background_inner"/>
<LinearLayout
android:id="@+id/pTrackingOption3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="13dp"
android:background="@xml/gx_ripple_gray"
android:onClick="onTracking"
android:orientation="vertical">
<RadioButton
android:id="@+id/pTrackingRadioOption3"
android:layoutDirection="rtl"
android:layout_width="match_parent"
android:paddingRight="15dp"
android:layout_marginTop="8dp"
android:clickable="false"
android:buttonTint="@color/c_radio_tint"
android:textColor="@color/c_text_v1"
android:layout_marginRight="10dp"
android:paddingLeft="15dp"
android:textSize="15sp"
android:text="@string/SETTING_PRIVACY_TRACKING_OPTION3"
tools:ignore="RtlHardcoded"
android:layout_height="wrap_content" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="-2dp"
android:paddingEnd="65dp"
android:textSize="13sp"
android:text="@string/SETTING_PRIVACY_TRACKING_OPTION3_INFO"
/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:elevation="4dp"
android:layout_marginTop="0.5dp"
android:background="@color/c_view_divier_background_inner"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -71,35 +71,35 @@
android:textSize="17sp"
android:textStyle="bold" />
<LinearLayout
<FrameLayout
android:id="@+id/pTabsContainer"
android:layout_width="48dp"
android:layout_width="40dp"
android:layout_height="match_parent"
android:clickable="true"
android:focusable="true"
android:layout_marginStart="-10dp"
android:onClick="onBackPressedInvoked"
android:orientation="horizontal"
android:paddingStart="5dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlSymmetry">
android:gravity="left">
<Button
android:id="@+id/pTabs"
android:layout_width="22dp"
android:layout_height="22dp"
android:layout_gravity="center"
android:layout_marginStart="14dp"
android:layout_marginTop="0.5dp"
android:layout_gravity="center_vertical"
android:layout_marginStart="12dp"
android:layout_marginTop="-1dp"
android:layout_marginEnd="13dp"
android:layout_marginBottom="0dp"
android:background="@xml/gx_generic_tab_button"
android:clickable="false"
android:focusable="false"
android:contentDescription="@string/GENERAL_TODO"
android:scaleType="fitCenter"
android:text="@string/HOME_TAB_TEXT"
android:textColor="@color/c_text_v5"
android:textSize="12.5sp" />
</LinearLayout>
android:textColor="@color/c_text_v1"
android:textSize="12.5sp"
android:tint="@color/black" />
</FrameLayout>
<ImageButton
android:id="@+id/pMenuButton"

View File

@ -20,7 +20,7 @@
<item android:id="@+id/menu13"
android:title="Top Menu"
app:showAsAction="always"
android:actionLayout="@layout/popup_menu"/>
android:actionLayout="@layout/popup_side_menu"/>
<group android:id="@+id/group_0" >
<item android:id="@+id/menu9"
android:title="Location "

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Some files were not shown because too many files have changed in this diff Show More