|
@ -28,5 +28,6 @@
|
||||||
<option name="useQualifiedModuleNames" value="true" />
|
<option name="useQualifiedModuleNames" value="true" />
|
||||||
</GradleProjectSettings>
|
</GradleProjectSettings>
|
||||||
</option>
|
</option>
|
||||||
|
<option name="offlineMode" value="true" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
|
@ -86,11 +86,12 @@ android {
|
||||||
'src/main/res/layouts/setting',
|
'src/main/res/layouts/setting',
|
||||||
'src/main/res/layouts/bridge',
|
'src/main/res/layouts/bridge',
|
||||||
'src/main/res/layouts/log',
|
'src/main/res/layouts/log',
|
||||||
|
'src/main/res/layouts/landing',
|
||||||
'src/main/res/layouts/alert',
|
'src/main/res/layouts/alert',
|
||||||
'src/main/res/layouts/bookmark',
|
'src/main/res/layouts/bookmark',
|
||||||
'src/main/res/layouts/shared',
|
'src/main/res/layouts/shared',
|
||||||
'src/main/res/layouts/shared/listviews',
|
'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/alert',
|
||||||
'src/main/res/custom-xml/tab',
|
'src/main/res/custom-xml/tab',
|
||||||
'src/main/res/custom-xml/images',
|
'src/main/res/custom-xml/images',
|
||||||
|
|
|
@ -117,10 +117,14 @@
|
||||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
|
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
|
||||||
android:windowSoftInputMode="adjustPan" />
|
android:windowSoftInputMode="adjustPan" />
|
||||||
<activity
|
<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:configChanges="keyboard|keyboardHidden|mcc|mnc|orientation|screenSize|locale|layoutDirection|smallestScreenSize|screenLayout"
|
||||||
android:launchMode="singleTop"
|
android:launchMode="singleTop"
|
||||||
android:screenOrientation="unspecified"
|
android:screenOrientation="portrait"
|
||||||
android:windowSoftInputMode="adjustPan">
|
android:windowSoftInputMode="adjustPan">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
|
@ -175,6 +179,7 @@
|
||||||
android:value="ca-app-pub-5074525529134731~2926711128" />
|
android:value="ca-app-pub-5074525529134731~2926711128" />
|
||||||
|
|
||||||
<service
|
<service
|
||||||
|
android:stopWithTask="true"
|
||||||
android:name="com.darkweb.genesissearchengine.helperManager.autoFillService"
|
android:name="com.darkweb.genesissearchengine.helperManager.autoFillService"
|
||||||
android:label="Genesis | Secure Autofill"
|
android:label="Genesis | Secure Autofill"
|
||||||
android:permission="android.permission.BIND_AUTOFILL_SERVICE">
|
android:permission="android.permission.BIND_AUTOFILL_SERVICE">
|
||||||
|
@ -194,6 +199,10 @@
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:stopWithTask="true" />
|
android:stopWithTask="true" />
|
||||||
|
|
||||||
|
<service
|
||||||
|
android:name="com.darkweb.genesissearchengine.helperManager.OnClearFromRecentService"
|
||||||
|
android:stopWithTask="true" />
|
||||||
|
|
||||||
<receiver android:name = "com.darkweb.genesissearchengine.helperManager.userEngagementNotification" />
|
<receiver android:name = "com.darkweb.genesissearchengine.helperManager.userEngagementNotification" />
|
||||||
|
|
||||||
<receiver
|
<receiver
|
||||||
|
|
After Width: | Height: | Size: 108 KiB |
After Width: | Height: | Size: 50 KiB |
|
@ -2,8 +2,9 @@ package com.darkweb.genesissearchengine.appManager;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkController;
|
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.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.orbotLogManager.orbotLogController;
|
||||||
import com.darkweb.genesissearchengine.appManager.settingManager.generalManager.settingGeneralController;
|
import com.darkweb.genesissearchengine.appManager.settingManager.generalManager.settingGeneralController;
|
||||||
import com.darkweb.genesissearchengine.appManager.settingManager.settingHomePage.settingHomeController;
|
import com.darkweb.genesissearchengine.appManager.settingManager.settingHomePage.settingHomeController;
|
||||||
|
@ -21,6 +22,7 @@ public class activityContextManager
|
||||||
}
|
}
|
||||||
|
|
||||||
/*Private Contexts*/
|
/*Private Contexts*/
|
||||||
|
private bridgeController pBridgeController;
|
||||||
private historyController pHistoryController;
|
private historyController pHistoryController;
|
||||||
private bookmarkController pBookmarkController;
|
private bookmarkController pBookmarkController;
|
||||||
private homeController pHomeController;
|
private homeController pHomeController;
|
||||||
|
@ -53,6 +55,13 @@ public class activityContextManager
|
||||||
this.pBookmarkController = bookmark_controller;
|
this.pBookmarkController = bookmark_controller;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bridgeController getBridgeController(){
|
||||||
|
return pBridgeController;
|
||||||
|
}
|
||||||
|
public void setBridgeController(bridgeController bridge_controller){
|
||||||
|
this.pBridgeController = bridge_controller;
|
||||||
|
}
|
||||||
|
|
||||||
public homeController getHomeController(){
|
public homeController getHomeController(){
|
||||||
return pHomeController;
|
return pHomeController;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
import com.darkweb.genesissearchengine.appManager.databaseManager.databaseController;
|
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.enums;
|
||||||
import com.darkweb.genesissearchengine.constants.keys;
|
import com.darkweb.genesissearchengine.constants.keys;
|
||||||
import com.darkweb.genesissearchengine.constants.sql;
|
import com.darkweb.genesissearchengine.constants.sql;
|
||||||
|
@ -44,8 +44,6 @@ import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import static com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkEnums.eBookmarkViewCommands.M_VERTIFY_SELECTION_MENU;
|
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
|
public class bookmarkController extends AppCompatActivity
|
||||||
|
@ -256,7 +254,7 @@ public class bookmarkController extends AppCompatActivity
|
||||||
public void onOpenMultipleTabs(View view) {
|
public void onOpenMultipleTabs(View view) {
|
||||||
ArrayList<String> m_long_selected_urk = (ArrayList<String>) mbookmarkAdapter.onTrigger(bookmarkEnums.eBookmarkAdapterCommands.GET_LONG_SELECTED_URL, null);
|
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++){
|
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);
|
onBackPressed(null);
|
||||||
mbookmarkAdapter.onTrigger(bookmarkEnums.eBookmarkAdapterCommands.M_CLEAR_LONG_SELECTED_URL,null);
|
mbookmarkAdapter.onTrigger(bookmarkEnums.eBookmarkAdapterCommands.M_CLEAR_LONG_SELECTED_URL,null);
|
||||||
|
|
|
@ -12,7 +12,6 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
import com.darkweb.genesissearchengine.appManager.helpManager.helpController;
|
import com.darkweb.genesissearchengine.appManager.helpManager.helpController;
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
import com.darkweb.genesissearchengine.constants.constants;
|
||||||
import com.darkweb.genesissearchengine.constants.enums;
|
|
||||||
import com.darkweb.genesissearchengine.constants.keys;
|
import com.darkweb.genesissearchengine.constants.keys;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
import com.darkweb.genesissearchengine.dataManager.dataController;
|
||||||
|
@ -47,6 +46,7 @@ public class bridgeController extends AppCompatActivity {
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
|
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
|
||||||
|
activityContextManager.getInstance().setBridgeController(this);
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.bridge_settings_view);
|
setContentView(R.layout.bridge_settings_view);
|
||||||
|
|
||||||
|
@ -96,15 +96,38 @@ public class bridgeController extends AppCompatActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterTextChanged(Editable editable) {
|
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) {
|
public void onOpenInfo(View view) {
|
||||||
helperMethod.openActivity(helpController.class, constants.CONST_LIST_HISTORY, this,true);
|
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 */
|
/* LISTENERS */
|
||||||
|
|
||||||
public class bridgeModelCallback implements eventObserver.eventListener{
|
public class bridgeModelCallback implements eventObserver.eventListener{
|
||||||
|
@ -123,7 +146,7 @@ public class bridgeController extends AppCompatActivity {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
if(dataController.getInstance()!=null){
|
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_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));
|
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();
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onCustomChecked(View view) {
|
||||||
|
mBridgeViewController.onTrigger(bridgeEnums.eBridgeViewCommands.M_ENABLE_CUSTOM_BRIDGE,null);
|
||||||
|
}
|
||||||
|
|
||||||
public void requestBridges(View view){
|
public void requestBridges(View view){
|
||||||
mBridgeModel.onTrigger(bridgeEnums.eBridgeModelCommands.M_REQUEST_BRIDGE, null);
|
mBridgeModel.onTrigger(bridgeEnums.eBridgeModelCommands.M_REQUEST_BRIDGE, null);
|
||||||
pluginController.getInstance().onMessageManagerInvoke(Arrays.asList(constants.CONST_BACKEND_GOOGLE_URL, this), M_BRIDGE_MAIL);
|
pluginController.getInstance().onMessageManagerInvoke(Arrays.asList(constants.CONST_BACKEND_GOOGLE_URL, this), M_BRIDGE_MAIL);
|
||||||
}
|
}
|
||||||
|
|
||||||
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){
|
public void onMeekChecked(View view){
|
||||||
mBridgeModel.onTrigger(bridgeEnums.eBridgeModelCommands.M_MEEK_BRIDGE, null);
|
mBridgeModel.onTrigger(bridgeEnums.eBridgeModelCommands.M_MEEK_BRIDGE, null);
|
||||||
mBridgeViewController.onTrigger(bridgeEnums.eBridgeViewCommands.M_INIT_VIEWS, Arrays.asList(status.sBridgeCustomBridge,250));
|
mBridgeViewController.onTrigger(bridgeEnums.eBridgeViewCommands.M_INIT_VIEWS, Arrays.asList(status.sBridgeCustomBridge,250));
|
||||||
|
|
|
@ -4,7 +4,7 @@ public class bridgeEnums
|
||||||
{
|
{
|
||||||
/*Settings Manager*/
|
/*Settings Manager*/
|
||||||
public enum eBridgeViewCommands {
|
public enum eBridgeViewCommands {
|
||||||
M_INIT_VIEWS
|
M_INIT_VIEWS, M_ENABLE_CUSTOM_BRIDGE
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum eBridgeModelCommands {
|
public enum eBridgeModelCommands {
|
||||||
|
|
|
@ -38,8 +38,8 @@ class bridgeModel
|
||||||
pluginController.getInstance().onMessageManagerInvoke(Arrays.asList(constants.CONST_BACKEND_GOOGLE_URL, mContext), M_BRIDGE_MAIL);
|
pluginController.getInstance().onMessageManagerInvoke(Arrays.asList(constants.CONST_BACKEND_GOOGLE_URL, mContext), M_BRIDGE_MAIL);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onCustomChecked(){
|
public void onCustomChecked(String pString){
|
||||||
status.sBridgeCustomBridge = strings.BRIDGE_CUSTOM_BRIDGE_CUSTOM;
|
status.sBridgeCustomBridge = pString;
|
||||||
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_STRING, Arrays.asList(keys.BRIDGE_CUSTOM_BRIDGE_1,status.sBridgeCustomBridge));
|
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_STRING, Arrays.asList(keys.BRIDGE_CUSTOM_BRIDGE_1,status.sBridgeCustomBridge));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ class bridgeModel
|
||||||
requestBridges();
|
requestBridges();
|
||||||
}
|
}
|
||||||
else if(pCommands == bridgeEnums.eBridgeModelCommands.M_CUSTOM_BRIDGE){
|
else if(pCommands == bridgeEnums.eBridgeModelCommands.M_CUSTOM_BRIDGE){
|
||||||
onCustomChecked();
|
onCustomChecked((String) pData.get(0));
|
||||||
}
|
}
|
||||||
else if(pCommands == bridgeEnums.eBridgeModelCommands.M_MEEK_BRIDGE){
|
else if(pCommands == bridgeEnums.eBridgeModelCommands.M_MEEK_BRIDGE){
|
||||||
onMeekChecked();
|
onMeekChecked();
|
||||||
|
|
|
@ -94,37 +94,39 @@ class bridgeViewController
|
||||||
mCustomBridgeBlocker.setVisibility(View.VISIBLE);
|
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){
|
private void initViews(String p_bridge, int p_duration){
|
||||||
resetRadioButtons(p_duration);
|
resetRadioButtons(p_duration);
|
||||||
switch (p_bridge) {
|
if(p_bridge.equals(strings.BRIDGE_CUSTOM_BRIDGE_OBFS4)){
|
||||||
case strings.BRIDGE_CUSTOM_BRIDGE_OBFS4:
|
animateColor(mBridgeObfs, mBridgeObfs.getCurrentTextColor(), mContext.getResources().getColor(R.color.c_text_v1), "textColor", p_duration);
|
||||||
animateColor(mBridgeObfs, mBridgeObfs.getCurrentTextColor(), mContext.getResources().getColor(R.color.c_text_v1), "textColor", p_duration);
|
mBridgeObfs.setHighlightColor(Color.BLACK);
|
||||||
mBridgeObfs.setHighlightColor(Color.BLACK);
|
mBridgeObfs.setButtonTintList(ColorStateList.valueOf(ContextCompat.getColor(mContext, R.color.c_radio_tint)));
|
||||||
mBridgeObfs.setButtonTintList(ColorStateList.valueOf(ContextCompat.getColor(mContext, R.color.c_radio_tint)));
|
mBridgeObfs.setChecked(true);
|
||||||
mBridgeObfs.setChecked(true);
|
mBridgeChina.setChecked(false);
|
||||||
mBridgeChina.setChecked(false);
|
mBridgeCustom.setChecked(false);
|
||||||
mBridgeCustom.setChecked(false);
|
mCustomPort.setText(strings.GENERIC_EMPTY_STR);
|
||||||
break;
|
}else if(p_bridge.equals(strings.BRIDGE_CUSTOM_BRIDGE_MEEK)){
|
||||||
case strings.BRIDGE_CUSTOM_BRIDGE_MEEK:
|
animateColor(mBridgeChina, mBridgeChina.getCurrentTextColor(), mContext.getResources().getColor(R.color.c_text_v1), "textColor", p_duration);
|
||||||
animateColor(mBridgeChina, mBridgeChina.getCurrentTextColor(), mContext.getResources().getColor(R.color.c_text_v1), "textColor", p_duration);
|
mBridgeChina.setHighlightColor(Color.BLACK);
|
||||||
mBridgeChina.setHighlightColor(Color.BLACK);
|
mBridgeChina.setButtonTintList(ColorStateList.valueOf(ContextCompat.getColor(mContext, R.color.c_radio_tint)));
|
||||||
mBridgeChina.setButtonTintList(ColorStateList.valueOf(ContextCompat.getColor(mContext, R.color.c_radio_tint)));
|
mBridgeObfs.setChecked(false);
|
||||||
mBridgeObfs.setChecked(false);
|
mBridgeChina.setChecked(true);
|
||||||
mBridgeChina.setChecked(true);
|
mBridgeCustom.setChecked(false);
|
||||||
mBridgeCustom.setChecked(false);
|
mCustomPort.setText(strings.GENERIC_EMPTY_STR);
|
||||||
break;
|
}else {
|
||||||
case strings.BRIDGE_CUSTOM_BRIDGE_CUSTOM:
|
onEnableCustomBridge();
|
||||||
animateColor(mBridgeCustom, mBridgeCustom.getCurrentTextColor(), mContext.getResources().getColor(R.color.c_text_v1), "textColor", p_duration);
|
mCustomPort.setText(p_bridge.replace("\n",""));
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,6 +134,9 @@ class bridgeViewController
|
||||||
if(p_commands == bridgeEnums.eBridgeViewCommands.M_INIT_VIEWS){
|
if(p_commands == bridgeEnums.eBridgeViewCommands.M_INIT_VIEWS){
|
||||||
initViews((String) p_data.get(0), (int)p_data.get(1));
|
initViews((String) p_data.get(0), (int)p_data.get(1));
|
||||||
}
|
}
|
||||||
|
if(p_commands == bridgeEnums.eBridgeViewCommands.M_ENABLE_CUSTOM_BRIDGE){
|
||||||
|
onEnableCustomBridge();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
import com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkRowModel;
|
import com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkRowModel;
|
||||||
import com.darkweb.genesissearchengine.appManager.historyManager.historyRowModel;
|
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.appManager.tabManager.tabRowModel;
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
import com.darkweb.genesissearchengine.constants.constants;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
|
|
@ -5,7 +5,7 @@ import android.content.Intent;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
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;
|
import com.example.myapplication.R;
|
||||||
|
|
||||||
public class externalNavigationController extends Activity {
|
public class externalNavigationController extends Activity {
|
||||||
|
|
|
@ -24,7 +24,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
import com.darkweb.genesissearchengine.appManager.databaseManager.databaseController;
|
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.enums;
|
||||||
import com.darkweb.genesissearchengine.constants.keys;
|
import com.darkweb.genesissearchengine.constants.keys;
|
||||||
import com.darkweb.genesissearchengine.constants.sql;
|
import com.darkweb.genesissearchengine.constants.sql;
|
||||||
|
@ -294,7 +294,7 @@ public class historyController extends AppCompatActivity
|
||||||
public void onOpenMultipleTabs(View view) {
|
public void onOpenMultipleTabs(View view) {
|
||||||
ArrayList<String> m_long_selected_urk = (ArrayList<String>) mHistoryAdapter.onTrigger(historyEnums.eHistoryAdapterCommands.GET_LONG_SELECTED_URL, null);
|
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++){
|
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);
|
onBackPressed(null);
|
||||||
mHistoryAdapter.onTrigger(historyEnums.eHistoryAdapterCommands.M_CLEAR_LONG_SELECTED_URL,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)){
|
else if(e_type.equals(enums.etype.url_triggered_new_tab)){
|
||||||
String url_temp = helperMethod.completeURL(data.get(0).toString());
|
String url_temp = helperMethod.completeURL(data.get(0).toString());
|
||||||
mHomeController.onOpenLinkNewTab(url_temp);
|
mHomeController.postNewLinkTabAnimation(url_temp);
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
else if(e_type.equals(enums.etype.fetch_favicon)){
|
else if(e_type.equals(enums.etype.fetch_favicon)){
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.homeManager;
|
package com.darkweb.genesissearchengine.appManager.homeManager.geckoManager;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import androidx.core.view.NestedScrollingChildHelper;
|
import androidx.core.view.NestedScrollingChildHelper;
|
|
@ -1,324 +1,321 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.homeManager;
|
package com.darkweb.genesissearchengine.appManager.homeManager.geckoManager;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Handler;
|
import android.widget.ImageView;
|
||||||
import android.widget.ImageView;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import com.darkweb.genesissearchengine.appManager.kotlinHelperLibraries.BrowserIconManager;
|
||||||
import com.darkweb.genesissearchengine.appManager.kotlinHelperLibraries.BrowserIconManager;
|
import com.darkweb.genesissearchengine.constants.*;
|
||||||
import com.darkweb.genesissearchengine.constants.*;
|
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
|
||||||
import com.google.android.gms.ads.AdSize;
|
import java.io.File;
|
||||||
|
import java.util.List;
|
||||||
import java.io.File;
|
import static com.darkweb.genesissearchengine.constants.enums.etype.on_handle_external_intent;
|
||||||
import java.util.List;
|
import static org.mozilla.geckoview.GeckoSessionSettings.USER_AGENT_MODE_MOBILE;
|
||||||
import static com.darkweb.genesissearchengine.constants.enums.etype.on_handle_external_intent;
|
import static org.mozilla.geckoview.StorageController.ClearFlags.AUTH_SESSIONS;
|
||||||
import static org.mozilla.geckoview.GeckoSessionSettings.USER_AGENT_MODE_MOBILE;
|
import static org.mozilla.geckoview.StorageController.ClearFlags.COOKIES;
|
||||||
import static org.mozilla.geckoview.StorageController.ClearFlags.AUTH_SESSIONS;
|
import static org.mozilla.geckoview.StorageController.ClearFlags.DOM_STORAGES;
|
||||||
import static org.mozilla.geckoview.StorageController.ClearFlags.COOKIES;
|
import static org.mozilla.geckoview.StorageController.ClearFlags.IMAGE_CACHE;
|
||||||
import static org.mozilla.geckoview.StorageController.ClearFlags.DOM_STORAGES;
|
import static org.mozilla.geckoview.StorageController.ClearFlags.NETWORK_CACHE;
|
||||||
import static org.mozilla.geckoview.StorageController.ClearFlags.IMAGE_CACHE;
|
import static org.mozilla.geckoview.StorageController.ClearFlags.PERMISSIONS;
|
||||||
import static org.mozilla.geckoview.StorageController.ClearFlags.NETWORK_CACHE;
|
import static org.mozilla.geckoview.StorageController.ClearFlags.SITE_DATA;
|
||||||
import static org.mozilla.geckoview.StorageController.ClearFlags.PERMISSIONS;
|
import static org.mozilla.geckoview.StorageController.ClearFlags.SITE_SETTINGS;
|
||||||
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.ContentBlocking;
|
import org.mozilla.geckoview.GeckoSession;
|
||||||
import org.mozilla.geckoview.GeckoRuntime;
|
import org.mozilla.geckoview.GeckoView;
|
||||||
import org.mozilla.geckoview.GeckoSession;
|
|
||||||
import org.mozilla.geckoview.GeckoView;
|
public class geckoClients
|
||||||
|
{
|
||||||
class geckoClients
|
/*Gecko Variables*/
|
||||||
{
|
|
||||||
/*Gecko Variables*/
|
private geckoSession mSession = null;
|
||||||
|
private GeckoRuntime mRuntime = null;
|
||||||
private geckoSession mSession = null;
|
private BrowserIconManager mIconManager;
|
||||||
private GeckoRuntime mRuntime = null;
|
private eventObserver.eventListener event;
|
||||||
private BrowserIconManager mIconManager;
|
private AppCompatActivity context;
|
||||||
private eventObserver.eventListener event;
|
|
||||||
private AppCompatActivity context;
|
/*Local Variable*/
|
||||||
|
|
||||||
/*Local Variable*/
|
private String mSessionID;
|
||||||
|
|
||||||
private String mSessionID;
|
public void initialize(GeckoView geckoView, eventObserver.eventListener event, AppCompatActivity context, boolean isForced)
|
||||||
|
{
|
||||||
void initialize(GeckoView geckoView, eventObserver.eventListener event, AppCompatActivity context, boolean isForced)
|
this.context = context;
|
||||||
{
|
this.event = event;
|
||||||
this.context = context;
|
mSessionID = helperMethod.createRandomID();
|
||||||
this.event = event;
|
initRuntimeSettings(context);
|
||||||
mSessionID = helperMethod.createRandomID();
|
|
||||||
initRuntimeSettings(context);
|
if(!isForced && geckoView.getSession()!=null && geckoView.getSession().isOpen()){
|
||||||
|
mSession = (geckoSession) geckoView.getSession();
|
||||||
if(!isForced && geckoView.getSession()!=null && geckoView.getSession().isOpen()){
|
}
|
||||||
mSession = (geckoSession) geckoView.getSession();
|
else {
|
||||||
}
|
geckoView.releaseSession();
|
||||||
else {
|
mSession = new geckoSession(new geckoViewClientCallback(),mSessionID,context, geckoView);
|
||||||
geckoView.releaseSession();
|
mSession.open(mRuntime);
|
||||||
mSession = new geckoSession(new geckoViewClientCallback(),mSessionID,context, geckoView);
|
mSession.getSettings().setUseTrackingProtection(status.sStatusDoNotTrack);
|
||||||
mSession.open(mRuntime);
|
mSession.getSettings().setFullAccessibilityTree(true);
|
||||||
mSession.getSettings().setUseTrackingProtection(status.sStatusDoNotTrack);
|
mSession.getSettings().setUserAgentMode(USER_AGENT_MODE_MOBILE);
|
||||||
mSession.getSettings().setFullAccessibilityTree(true);
|
mSession.getSettings().setAllowJavascript(status.sSettingJavaStatus);
|
||||||
mSession.getSettings().setUserAgentMode(USER_AGENT_MODE_MOBILE);
|
geckoView.releaseSession();
|
||||||
mSession.getSettings().setAllowJavascript(status.sSettingJavaStatus);
|
geckoView.setSession(mSession);
|
||||||
geckoView.releaseSession();
|
}
|
||||||
geckoView.setSession(mSession);
|
mSession.onSetInitializeFromStartup();
|
||||||
}
|
|
||||||
mSession.onSetInitializeFromStartup();
|
|
||||||
|
onUpdateFont();
|
||||||
|
}
|
||||||
onUpdateFont();
|
|
||||||
}
|
public void onValidateInitializeFromStartup(){
|
||||||
|
mSession.onValidateInitializeFromStartup();
|
||||||
public void onValidateInitializeFromStartup(){
|
}
|
||||||
mSession.onValidateInitializeFromStartup();
|
|
||||||
}
|
public boolean onGetInitializeFromStartup(){
|
||||||
|
return mSession.onGetInitializeFromStartup();
|
||||||
public boolean onGetInitializeFromStartup(){
|
}
|
||||||
return mSession.onGetInitializeFromStartup();
|
|
||||||
}
|
public geckoSession initFreeSession(GeckoView pGeckoView, AppCompatActivity pcontext, eventObserver.eventListener event){
|
||||||
|
this.event = event;
|
||||||
public geckoSession initFreeSession(GeckoView pGeckoView, AppCompatActivity pcontext, eventObserver.eventListener event){
|
initRuntimeSettings(pcontext);
|
||||||
this.event = event;
|
geckoSession mTempSession = new geckoSession(new geckoViewClientCallback(),mSessionID,context, pGeckoView);
|
||||||
initRuntimeSettings(pcontext);
|
mTempSession.open(mRuntime);
|
||||||
geckoSession mTempSession = new geckoSession(new geckoViewClientCallback(),mSessionID,context, pGeckoView);
|
mTempSession.getSettings().setUseTrackingProtection(status.sStatusDoNotTrack);
|
||||||
mTempSession.open(mRuntime);
|
mTempSession.getSettings().setFullAccessibilityTree(true);
|
||||||
mTempSession.getSettings().setUseTrackingProtection(status.sStatusDoNotTrack);
|
mTempSession.getSettings().setUserAgentMode(USER_AGENT_MODE_MOBILE);
|
||||||
mTempSession.getSettings().setFullAccessibilityTree(true);
|
mTempSession.getSettings().setAllowJavascript(status.sSettingJavaStatus);
|
||||||
mTempSession.getSettings().setUserAgentMode(USER_AGENT_MODE_MOBILE);
|
return mTempSession;
|
||||||
mTempSession.getSettings().setAllowJavascript(status.sSettingJavaStatus);
|
}
|
||||||
return mTempSession;
|
|
||||||
}
|
public void onSessionReinit(){
|
||||||
|
mSession.onSessionReinit();
|
||||||
public void onSessionReinit(){
|
}
|
||||||
mSession.onSessionReinit();
|
|
||||||
}
|
public void toogleUserAgent(){
|
||||||
|
mSession.toogleUserAgent();
|
||||||
void toogleUserAgent(){
|
}
|
||||||
mSession.toogleUserAgent();
|
|
||||||
}
|
public int getUserAgent(){
|
||||||
|
return mSession.getUserAgentMode();
|
||||||
int getUserAgent(){
|
}
|
||||||
return mSession.getUserAgentMode();
|
|
||||||
}
|
public void initRuntimeSettings(AppCompatActivity context){
|
||||||
|
if(mRuntime==null){
|
||||||
public void initRuntimeSettings(AppCompatActivity context){
|
mRuntime = GeckoRuntime.getDefault(context);
|
||||||
if(mRuntime==null){
|
mRuntime.getSettings().setAboutConfigEnabled(true);
|
||||||
mRuntime = GeckoRuntime.getDefault(context);
|
mRuntime.getSettings().setAutomaticFontSizeAdjustment(false);
|
||||||
mRuntime.getSettings().setAboutConfigEnabled(true);
|
mRuntime.getSettings().setWebFontsEnabled(status.sShowWebFonts);
|
||||||
mRuntime.getSettings().setAutomaticFontSizeAdjustment(false);
|
mRuntime.getSettings().setForceUserScalableEnabled(status.sSettingEnableZoom);
|
||||||
mRuntime.getSettings().setWebFontsEnabled(status.sShowWebFonts);
|
mRuntime.getSettings().getContentBlocking().setCookieBehavior(getCookiesBehaviour());
|
||||||
mRuntime.getSettings().setForceUserScalableEnabled(status.sSettingEnableZoom);
|
mRuntime.getSettings().getContentBlocking().setSafeBrowsing(ContentBlocking.SafeBrowsing.DEFAULT);
|
||||||
mRuntime.getSettings().getContentBlocking().setCookieBehavior(getCookiesBehaviour());
|
mIconManager = new BrowserIconManager();
|
||||||
mRuntime.getSettings().getContentBlocking().setSafeBrowsing(ContentBlocking.SafeBrowsing.DEFAULT);
|
|
||||||
mIconManager = new BrowserIconManager();
|
if(status.sSettingTrackingProtection == 1){
|
||||||
if(status.sSettingTrackingProtection){
|
mRuntime.getSettings().getContentBlocking().setAntiTracking(ContentBlocking.AntiTracking.DEFAULT);
|
||||||
mRuntime.getSettings().getContentBlocking().setAntiTracking(ContentBlocking.AntiTracking.AD);
|
}else if(status.sSettingTrackingProtection == 2){
|
||||||
mRuntime.getSettings().getContentBlocking().setAntiTracking(ContentBlocking.AntiTracking.FINGERPRINTING);
|
mRuntime.getSettings().getContentBlocking().setAntiTracking(ContentBlocking.AntiTracking.STRICT);
|
||||||
}else {
|
}
|
||||||
mRuntime.getSettings().getContentBlocking().setAntiTracking(ContentBlocking.AntiTracking.STRICT);
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
public void onGetFavIcon(ImageView pImageView, String pURL){
|
||||||
|
pURL = helperMethod.completeURL(helperMethod.getDomainName(pURL));
|
||||||
public void onGetFavIcon(ImageView pImageView, String pURL){
|
mIconManager.onLoadIconIntoView(context,mRuntime, pImageView, pURL);
|
||||||
pURL = helperMethod.completeURL(helperMethod.getDomainName(pURL));
|
}
|
||||||
mIconManager.onLoadIconIntoView(context,mRuntime, pImageView, pURL);
|
|
||||||
}
|
public void onLoadFavIcon(){
|
||||||
|
BrowserIconManager mIconManager = new BrowserIconManager();
|
||||||
public void onLoadFavIcon(){
|
mIconManager.onLoadIcon(context, mRuntime);
|
||||||
BrowserIconManager mIconManager = new BrowserIconManager();
|
}
|
||||||
mIconManager.onLoadIcon(context, mRuntime);
|
|
||||||
}
|
private int getCookiesBehaviour(){
|
||||||
|
return status.sSettingCookieStatus;
|
||||||
private int getCookiesBehaviour(){
|
}
|
||||||
return status.sSettingCookieStatus;
|
|
||||||
}
|
public void updateSetting(){
|
||||||
|
mRuntime.getSettings().setRemoteDebuggingEnabled(false);
|
||||||
void updateSetting(){
|
mRuntime.getSettings().setWebFontsEnabled(status.sShowWebFonts);
|
||||||
mRuntime.getSettings().setRemoteDebuggingEnabled(false);
|
mRuntime.getSettings().getContentBlocking().setCookieBehavior(getCookiesBehaviour());
|
||||||
mRuntime.getSettings().setWebFontsEnabled(status.sShowWebFonts);
|
mRuntime.getSettings().setAutomaticFontSizeAdjustment(false);
|
||||||
mRuntime.getSettings().getContentBlocking().setCookieBehavior(getCookiesBehaviour());
|
mRuntime.getSettings().getContentBlocking().setSafeBrowsing(ContentBlocking.SafeBrowsing.DEFAULT);
|
||||||
mRuntime.getSettings().setAutomaticFontSizeAdjustment(false);
|
mRuntime.getSettings().setWebFontsEnabled(status.sShowWebFonts);
|
||||||
mRuntime.getSettings().getContentBlocking().setSafeBrowsing(ContentBlocking.SafeBrowsing.DEFAULT);
|
mRuntime.getSettings().setForceUserScalableEnabled(status.sSettingEnableZoom);
|
||||||
mRuntime.getSettings().setWebFontsEnabled(status.sShowWebFonts);
|
mIconManager = new BrowserIconManager();
|
||||||
mRuntime.getSettings().setForceUserScalableEnabled(status.sSettingEnableZoom);
|
|
||||||
mIconManager = new BrowserIconManager();
|
if(status.sSettingTrackingProtection == 1){
|
||||||
if(!status.sSettingTrackingProtection){
|
mRuntime.getSettings().getContentBlocking().setAntiTracking(ContentBlocking.AntiTracking.DEFAULT);
|
||||||
mRuntime.getSettings().getContentBlocking().setAntiTracking(ContentBlocking.AntiTracking.AD);
|
}else if(status.sSettingTrackingProtection == 2){
|
||||||
mRuntime.getSettings().getContentBlocking().setAntiTracking(ContentBlocking.AntiTracking.FINGERPRINTING);
|
mRuntime.getSettings().getContentBlocking().setAntiTracking(ContentBlocking.AntiTracking.STRICT);
|
||||||
}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().setUseTrackingProtection(status.sStatusDoNotTrack);
|
mSession.getSettings().setAllowJavascript(status.sSettingJavaStatus);
|
||||||
mSession.getSettings().setFullAccessibilityTree(true);
|
onUpdateFont();
|
||||||
mSession.getSettings().setUserAgentMode(USER_AGENT_MODE_MOBILE );
|
onReload();
|
||||||
mSession.getSettings().setAllowJavascript(status.sSettingJavaStatus);
|
}
|
||||||
onUpdateFont();
|
|
||||||
onReload();
|
public void initSession(geckoSession mSession){
|
||||||
}
|
mSessionID = mSession.getSessionID();
|
||||||
|
this.mSession = mSession;
|
||||||
void initSession(geckoSession mSession){
|
}
|
||||||
mSessionID = mSession.getSessionID();
|
|
||||||
this.mSession = mSession;
|
public geckoSession getSession(){
|
||||||
}
|
return mSession;
|
||||||
|
}
|
||||||
geckoSession getSession(){
|
|
||||||
return mSession;
|
public void onUploadRequest(int resultCode,Intent data){
|
||||||
}
|
mSession.onFileUploadRequest(resultCode,data);
|
||||||
|
}
|
||||||
void onUploadRequest(int resultCode,Intent data){
|
public void setLoading(boolean status){
|
||||||
mSession.onFileUploadRequest(resultCode,data);
|
mSession.setLoading(status);
|
||||||
}
|
}
|
||||||
void setLoading(boolean status){
|
|
||||||
mSession.setLoading(status);
|
public void loadURL(String url) {
|
||||||
}
|
if(mSession.onGetInitializeFromStartup()){
|
||||||
|
mSession.initURL(url);
|
||||||
void loadURL(String url) {
|
if(url.endsWith("boogle.store") || url.endsWith(constants.CONST_GENESIS_DOMAIN_URL_SLASHED)){
|
||||||
if(mSession.onGetInitializeFromStartup()){
|
try{
|
||||||
mSession.initURL(url);
|
mSession.initURL(constants.CONST_GENESIS_DOMAIN_URL);
|
||||||
if(url.equals("boogle.store") || url.equals(constants.CONST_GENESIS_DOMAIN_URL_SLASHED)){
|
mSession.loadUri(constants.CONST_GENESIS_URL_CACHED);
|
||||||
try{
|
}catch (Exception ex){
|
||||||
mSession.initURL(constants.CONST_GENESIS_DOMAIN_URL);
|
ex.printStackTrace();
|
||||||
mSession.loadUri(constants.CONST_GENESIS_URL_CACHED);
|
}
|
||||||
}catch (Exception ex){
|
}else if(url.contains(constants.CONST_GENESIS_HELP_URL_SUB)){
|
||||||
ex.printStackTrace();
|
try{
|
||||||
}
|
mSession.initURL(constants.CONST_GENESIS_HELP_URL);
|
||||||
}else if(url.contains(constants.CONST_GENESIS_HELP_URL_SUB)){
|
mSession.loadUri(constants.CONST_GENESIS_HELP_URL_CACHE);
|
||||||
try{
|
}catch (Exception ex){
|
||||||
mSession.initURL(constants.CONST_GENESIS_HELP_URL);
|
ex.printStackTrace();
|
||||||
mSession.loadUri(constants.CONST_GENESIS_HELP_URL_CACHE);
|
}
|
||||||
}catch (Exception ex){
|
}else {
|
||||||
ex.printStackTrace();
|
mSession.loadUri(url);
|
||||||
}
|
}
|
||||||
}else {
|
}
|
||||||
mSession.loadUri(url);
|
}
|
||||||
}
|
|
||||||
}
|
public void onRedrawPixel(){
|
||||||
}
|
mSession.onRedrawPixel();
|
||||||
|
onLoadFavIcon();
|
||||||
public void onRedrawPixel(){
|
}
|
||||||
mSession.onRedrawPixel();
|
|
||||||
onLoadFavIcon();
|
public void onClearSiteData(){
|
||||||
}
|
mRuntime.getStorageController().clearData(SITE_SETTINGS);
|
||||||
|
mRuntime.getStorageController().clearData(SITE_DATA);
|
||||||
void onClearSiteData(){
|
}
|
||||||
mRuntime.getStorageController().clearData(SITE_SETTINGS);
|
|
||||||
mRuntime.getStorageController().clearData(SITE_DATA);
|
public void onClearSession(){
|
||||||
}
|
mRuntime.getStorageController().clearData(AUTH_SESSIONS);
|
||||||
|
mRuntime.getStorageController().clearData(PERMISSIONS);
|
||||||
void onClearSession(){
|
}
|
||||||
mRuntime.getStorageController().clearData(AUTH_SESSIONS);
|
|
||||||
mRuntime.getStorageController().clearData(PERMISSIONS);
|
public void onClearCache(){
|
||||||
}
|
mRuntime.getStorageController().clearData(NETWORK_CACHE);
|
||||||
|
mRuntime.getStorageController().clearData(IMAGE_CACHE);
|
||||||
void onClearCache(){
|
mRuntime.getStorageController().clearData(DOM_STORAGES);
|
||||||
mRuntime.getStorageController().clearData(NETWORK_CACHE);
|
}
|
||||||
mRuntime.getStorageController().clearData(IMAGE_CACHE);
|
|
||||||
mRuntime.getStorageController().clearData(DOM_STORAGES);
|
public void onClearCookies(){
|
||||||
}
|
mRuntime.getStorageController().clearData(COOKIES);
|
||||||
|
}
|
||||||
void onClearCookies(){
|
|
||||||
mRuntime.getStorageController().clearData(COOKIES);
|
public void onBackPressed(boolean isFinishAllowed){
|
||||||
}
|
mSession.goBackSession();
|
||||||
|
if(mSession.canGoBack()){
|
||||||
void onBackPressed(boolean isFinishAllowed){
|
mSession.goBackSession();
|
||||||
mSession.goBackSession();
|
}
|
||||||
if(mSession.canGoBack()){
|
else if(isFinishAllowed){
|
||||||
mSession.goBackSession();
|
event.invokeObserver(null, enums.etype.back_list_empty);
|
||||||
}
|
}
|
||||||
else if(isFinishAllowed){
|
}
|
||||||
event.invokeObserver(null, enums.etype.back_list_empty);
|
|
||||||
}
|
public boolean canGoBack(){
|
||||||
}
|
return mSession.canGoBack();
|
||||||
|
}
|
||||||
boolean canGoBack(){
|
|
||||||
return mSession.canGoBack();
|
public boolean isLoading(){
|
||||||
}
|
return mSession.isLoading();
|
||||||
|
}
|
||||||
boolean isLoading(){
|
|
||||||
return mSession.isLoading();
|
public Uri getUriPermission(){
|
||||||
}
|
return mSession.getUriPermission();
|
||||||
|
}
|
||||||
Uri getUriPermission(){
|
|
||||||
return mSession.getUriPermission();
|
public boolean getFullScreenStatus(){
|
||||||
}
|
return mSession.getFullScreenStatus();
|
||||||
|
}
|
||||||
boolean getFullScreenStatus(){
|
|
||||||
return mSession.getFullScreenStatus();
|
public void onExitFullScreen(){
|
||||||
}
|
mSession.exitScreen();
|
||||||
|
}
|
||||||
void onExitFullScreen(){
|
|
||||||
mSession.exitScreen();
|
public void onForwardPressed(){
|
||||||
}
|
if(mSession.canGoForward()){
|
||||||
|
mSession.goForwardSession();
|
||||||
void onForwardPressed(){
|
}
|
||||||
if(mSession.canGoForward()){
|
}
|
||||||
mSession.goForwardSession();
|
|
||||||
}
|
|
||||||
}
|
public void onStop(){
|
||||||
|
mSession.stop();
|
||||||
|
}
|
||||||
void onStop(){
|
|
||||||
mSession.stop();
|
public void onReload(){
|
||||||
}
|
mSession.stop();
|
||||||
|
loadURL(mSession.getCurrentURL());
|
||||||
void onReload(){
|
}
|
||||||
mSession.stop();
|
|
||||||
mSession.loadUri(mSession.getCurrentURL());
|
public void onReloadStatic(){
|
||||||
}
|
mSession.loadUri(mSession.getCurrentURL());
|
||||||
|
}
|
||||||
void onReloadStatic(){
|
|
||||||
mSession.loadUri(mSession.getCurrentURL());
|
public void manual_download(String url, AppCompatActivity context){
|
||||||
}
|
Uri downloadURL = Uri.parse(url);
|
||||||
|
File f = new File(url);
|
||||||
void manual_download(String url, AppCompatActivity context){
|
f.getName();
|
||||||
Uri downloadURL = Uri.parse(url);
|
String downloadFile = f.getName();
|
||||||
File f = new File(url);
|
|
||||||
f.getName();
|
/*EXTERNAL STORAGE REQUEST*/
|
||||||
String downloadFile = f.getName();
|
if(helperMethod.checkPermissions(context)){
|
||||||
|
mSession.downloadRequestedFile(downloadURL,downloadFile);
|
||||||
/*EXTERNAL STORAGE REQUEST*/
|
}
|
||||||
if(helperMethod.checkPermissions(context)){
|
}
|
||||||
mSession.downloadRequestedFile(downloadURL,downloadFile);
|
|
||||||
}
|
public void downloadFile()
|
||||||
}
|
{
|
||||||
|
if(helperMethod.checkPermissions(context)){
|
||||||
void downloadFile()
|
mSession.downloadRequestedFile();
|
||||||
{
|
}
|
||||||
if(helperMethod.checkPermissions(context)){
|
}
|
||||||
mSession.downloadRequestedFile();
|
|
||||||
}
|
/*Session Updates*/
|
||||||
}
|
|
||||||
|
public void onUpdateFont(){
|
||||||
/*Session Updates*/
|
float font = (status.sSettingFontSize -100)/3+100;
|
||||||
|
mRuntime.getSettings().setFontSizeFactor(font/100);
|
||||||
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)
|
||||||
public class geckoViewClientCallback implements eventObserver.eventListener{
|
{
|
||||||
@Override
|
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))
|
||||||
public Object invokeObserver(List<Object> data, Object e_type)
|
{
|
||||||
{
|
if (e_type.equals(on_handle_external_intent))
|
||||||
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))
|
{
|
||||||
{
|
GeckoSession.WebResponseInfo responseInfo = (GeckoSession.WebResponseInfo)data.get(0);
|
||||||
if (e_type.equals(on_handle_external_intent))
|
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||||
{
|
intent.setDataAndTypeAndNormalize(Uri.parse(responseInfo.uri), responseInfo.contentType);
|
||||||
GeckoSession.WebResponseInfo responseInfo = (GeckoSession.WebResponseInfo)data.get(0);
|
context.startActivity(intent);
|
||||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
} else
|
||||||
intent.setDataAndTypeAndNormalize(Uri.parse(responseInfo.uri), responseInfo.contentType);
|
{
|
||||||
context.startActivity(intent);
|
return event.invokeObserver(data, e_type);
|
||||||
} else
|
}
|
||||||
{
|
}
|
||||||
return event.invokeObserver(data, e_type);
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,58 +1,58 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.homeManager;
|
package com.darkweb.genesissearchengine.appManager.homeManager.geckoManager;
|
||||||
|
|
||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.core.app.ActivityCompat;
|
import androidx.core.app.ActivityCompat;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import com.darkweb.genesissearchengine.constants.enums;
|
import com.darkweb.genesissearchengine.constants.enums;
|
||||||
import com.darkweb.genesissearchengine.constants.strings;
|
import com.darkweb.genesissearchengine.constants.strings;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
||||||
import org.mozilla.geckoview.GeckoSession;
|
import org.mozilla.geckoview.GeckoSession;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
class geckoDownloadManager
|
class geckoDownloadManager
|
||||||
{
|
{
|
||||||
private Uri downloadURL;
|
private Uri downloadURL;
|
||||||
private String downloadFile = strings.GENERIC_EMPTY_STR;
|
private String downloadFile = strings.GENERIC_EMPTY_STR;
|
||||||
|
|
||||||
geckoDownloadManager(){
|
geckoDownloadManager(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void downloadFile(GeckoSession.WebResponseInfo response, geckoSession session, AppCompatActivity context, eventObserver.eventListener event) {
|
void downloadFile(GeckoSession.WebResponseInfo response, geckoSession session, AppCompatActivity context, eventObserver.eventListener event) {
|
||||||
session
|
session
|
||||||
.getUserAgent()
|
.getUserAgent()
|
||||||
.accept(userAgent -> downloadFile(response, userAgent,context,session,event),
|
.accept(userAgent -> downloadFile(response, userAgent,context,session,event),
|
||||||
exception -> {
|
exception -> {
|
||||||
throw new IllegalStateException("Could not get UserAgent string.");
|
throw new IllegalStateException("Could not get UserAgent string.");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void downloadFile(GeckoSession.WebResponseInfo response, String userAgent, AppCompatActivity context, geckoSession session, eventObserver.eventListener event) {
|
private void downloadFile(GeckoSession.WebResponseInfo response, String userAgent, AppCompatActivity context, geckoSession session, eventObserver.eventListener event) {
|
||||||
if (ContextCompat.checkSelfPermission(context,
|
if (ContextCompat.checkSelfPermission(context,
|
||||||
Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
|
Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
|
||||||
ActivityCompat.requestPermissions(context,
|
ActivityCompat.requestPermissions(context,
|
||||||
new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},
|
new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},
|
||||||
3);
|
3);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
downloadURL = Uri.parse(response.uri);
|
downloadURL = Uri.parse(response.uri);
|
||||||
downloadFile = response.filename != null ? response.filename : downloadURL.getLastPathSegment();
|
downloadFile = response.filename != null ? response.filename : downloadURL.getLastPathSegment();
|
||||||
|
|
||||||
event.invokeObserver(Arrays.asList(0,session.getSessionID()), enums.etype.progress_update);
|
event.invokeObserver(Arrays.asList(0,session.getSessionID()), enums.etype.progress_update);
|
||||||
event.invokeObserver(Arrays.asList(downloadFile,session.getSessionID(),downloadURL), enums.etype.download_file_popup);
|
event.invokeObserver(Arrays.asList(downloadFile,session.getSessionID(),downloadURL), enums.etype.download_file_popup);
|
||||||
}
|
}
|
||||||
|
|
||||||
Uri getDownloadURL(){
|
Uri getDownloadURL(){
|
||||||
return downloadURL;
|
return downloadURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
String getDownloadFile(){
|
String getDownloadFile(){
|
||||||
return downloadFile;
|
return downloadFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.homeManager;
|
package com.darkweb.genesissearchengine.appManager.homeManager.hintManager;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
|
@ -36,7 +36,7 @@ public class hintAdapter extends RecyclerView.Adapter<hintAdapter.listViewHolder
|
||||||
ImageView[] mWebIcon = new ImageView[15];
|
ImageView[] mWebIcon = new ImageView[15];
|
||||||
|
|
||||||
boolean mCounters=false;
|
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();
|
this.mHintList = new ArrayList();
|
||||||
int maxCounter=5;
|
int maxCounter=5;
|
||||||
if(pHintList.size()<maxCounter){
|
if(pHintList.size()<maxCounter){
|
|
@ -1,4 +1,4 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.homeManager;
|
package com.darkweb.genesissearchengine.appManager.homeManager.hintManager;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.appManager.tabManager.tabRowModel;
|
import com.darkweb.genesissearchengine.appManager.tabManager.tabRowModel;
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.homeManager;
|
package com.darkweb.genesissearchengine.appManager.homeManager.homeController;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
import android.view.inputmethod.InputMethodManager;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
|
@ -1,43 +1,42 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.homeManager;
|
package com.darkweb.genesissearchengine.appManager.homeManager.homeController;
|
||||||
|
|
||||||
import android.util.Patterns;
|
import android.util.Patterns;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
|
||||||
|
import java.net.URL;
|
||||||
import java.net.URL;
|
|
||||||
|
class homeModel
|
||||||
class homeModel
|
{
|
||||||
{
|
|
||||||
|
String getSearchEngine(){
|
||||||
String getSearchEngine(){
|
return status.sSettingSearchStatus;
|
||||||
return status.sSettingSearchStatus;
|
}
|
||||||
}
|
|
||||||
|
String urlComplete(String pURL, String pSearchEngine){
|
||||||
String urlComplete(String pURL, String pSearchEngine){
|
if(pURL.equals("about:config")){
|
||||||
if(pURL.equals("about:config")){
|
return pURL;
|
||||||
return pURL;
|
}else {
|
||||||
}else {
|
try
|
||||||
try
|
{
|
||||||
{
|
String updateUrl = helperMethod.completeURL(pURL);
|
||||||
String updateUrl = helperMethod.completeURL(pURL);
|
URL host = new URL(updateUrl);
|
||||||
URL host = new URL(updateUrl);
|
boolean isUrlValid = Patterns.WEB_URL.matcher(updateUrl).matches();
|
||||||
boolean isUrlValid = Patterns.WEB_URL.matcher(updateUrl).matches();
|
if(isUrlValid && host.getHost().replace("www.","").contains("."))
|
||||||
if(isUrlValid && host.getHost().replace("www.","").contains("."))
|
{
|
||||||
{
|
return null;
|
||||||
return null;
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
catch (Exception ex){
|
||||||
catch (Exception ex){
|
ex.printStackTrace();
|
||||||
ex.printStackTrace();
|
}
|
||||||
}
|
|
||||||
|
String mURL = pSearchEngine.replace("$s",pURL.replaceAll(" ","+"));
|
||||||
String mURL = pSearchEngine.replace("$s",pURL.replaceAll(" ","+"));
|
return mURL;
|
||||||
return mURL;
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
|
|
@ -6,7 +6,6 @@ import androidx.annotation.Nullable;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.appManager.bridgeManager.bridgeController;
|
|
||||||
import com.darkweb.genesissearchengine.appManager.orbotManager.orbotController;
|
import com.darkweb.genesissearchengine.appManager.orbotManager.orbotController;
|
||||||
import com.darkweb.genesissearchengine.constants.keys;
|
import com.darkweb.genesissearchengine.constants.keys;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
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
|
// Instead of fragments, you can also use our default slide
|
||||||
// Just set a title, description, background and image. AppIntro will do the rest.
|
// 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.setTitle(getString(R.string.LANDING_HELLO));
|
||||||
welcome.setSubTitle(getString(R.string.LANDING_WELCOME));
|
welcome.setSubTitle(getString(R.string.LANDING_WELCOME));
|
||||||
addSlide(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.setTitle(getString(R.string.LANDING_BROWSE_INFO));
|
||||||
intro2.setSubTitle(getString(R.string.LANDING_NO_TRACKING));
|
intro2.setSubTitle(getString(R.string.LANDING_NO_TRACKING));
|
||||||
addSlide(intro2);
|
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.setTitle(getString(R.string.LANDING_BRIDGES_INFO));
|
||||||
cs2.showButton(getString(R.string.LANDING_MORE), new View.OnClickListener() {
|
cs2.showButton(getString(R.string.LANDING_MORE), new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -19,26 +19,26 @@ import org.torproject.android.service.wrapper.logRowModel;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class orbotAdapter extends RecyclerView.Adapter<orbotAdapter.listViewHolder>
|
public class orbotLogAdapter extends RecyclerView.Adapter<orbotLogAdapter.listViewHolder>
|
||||||
{
|
{
|
||||||
/*Private Variables*/
|
/*Private Variables*/
|
||||||
|
|
||||||
private ArrayList<logRowModel> mModelList;
|
private ArrayList<logRowModel> mModelList;
|
||||||
private eventObserver.eventListener mEvent;
|
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.mModelList = model_list;
|
||||||
this.mEvent = event;
|
this.mEvent = event;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull @Override
|
@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);
|
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
|
@Override
|
||||||
public void onBindViewHolder(@NonNull orbotAdapter.listViewHolder holder, int position)
|
public void onBindViewHolder(@NonNull orbotLogAdapter.listViewHolder holder, int position)
|
||||||
{
|
{
|
||||||
holder.bindListView(mModelList.get(position));
|
holder.bindListView(mModelList.get(position));
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ public class orbotAdapter extends RecyclerView.Adapter<orbotAdapter.listViewHold
|
||||||
mDescription = itemView.findViewById(R.id.pDescription);
|
mDescription = itemView.findViewById(R.id.pDescription);
|
||||||
mRowContainerInner = itemView.findViewById(R.id.pRowContainerInner);
|
mRowContainerInner = itemView.findViewById(R.id.pRowContainerInner);
|
||||||
|
|
||||||
mHeader.setText((mModelList.size() - this.getLayoutPosition() + ". " + model.getLog()));
|
mHeader.setText((this.getLayoutPosition() + ". " + model.getLog()));
|
||||||
mDescription.setText(model.getDate());
|
mDescription.setText(model.getDate());
|
||||||
mRowContainerInner.setOnClickListener(this);
|
mRowContainerInner.setOnClickListener(this);
|
||||||
}
|
}
|
|
@ -1,18 +1,17 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.orbotLogManager;
|
package com.darkweb.genesissearchengine.appManager.orbotLogManager;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.GestureDetector;
|
import android.view.GestureDetector;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.animation.AnimationUtils;
|
import android.view.ViewTreeObserver;
|
||||||
import android.view.animation.LayoutAnimationController;
|
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.core.widget.NestedScrollView;
|
import androidx.core.widget.NestedScrollView;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
import com.darkweb.genesissearchengine.appManager.helpManager.helpController;
|
|
||||||
import com.darkweb.genesissearchengine.appManager.settingManager.logManager.settingLogController;
|
import com.darkweb.genesissearchengine.appManager.settingManager.logManager.settingLogController;
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
import com.darkweb.genesissearchengine.constants.constants;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
|
@ -27,13 +26,15 @@ import org.torproject.android.service.wrapper.orbotLocalConstants;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import jp.wasabeef.recyclerview.adapters.AlphaInAnimationAdapter;
|
||||||
|
|
||||||
public class orbotLogController extends AppCompatActivity {
|
public class orbotLogController extends AppCompatActivity {
|
||||||
|
|
||||||
/* PRIVATE VARIABLES */
|
/* PRIVATE VARIABLES */
|
||||||
private orbotLogModel mOrbotModel;
|
private orbotLogModel mOrbotModel;
|
||||||
private orbotLogViewController mOrbotViewController;
|
private orbotLogViewController mOrbotViewController;
|
||||||
private RecyclerView mRecycleView;
|
private RecyclerView mRecycleView;
|
||||||
private orbotAdapter mOrbotAdapter;
|
private orbotLogAdapter mOrbotAdapter;
|
||||||
private NestedScrollView mMainScroll;
|
private NestedScrollView mMainScroll;
|
||||||
private FloatingActionButton mFloatingScroller;
|
private FloatingActionButton mFloatingScroller;
|
||||||
|
|
||||||
|
@ -41,6 +42,7 @@ public class orbotLogController extends AppCompatActivity {
|
||||||
private boolean mActivityClosed = false;
|
private boolean mActivityClosed = false;
|
||||||
private int mLogCounter = 0;
|
private int mLogCounter = 0;
|
||||||
private GestureDetector mSwipeDirectionDetector;
|
private GestureDetector mSwipeDirectionDetector;
|
||||||
|
private boolean mIsLayoutChanging = false;
|
||||||
|
|
||||||
/* INITIALIZATIONS */
|
/* INITIALIZATIONS */
|
||||||
|
|
||||||
|
@ -77,39 +79,51 @@ public class orbotLogController extends AppCompatActivity {
|
||||||
mLogCounter = orbotLocalConstants.mTorLogsHistory.size();
|
mLogCounter = orbotLocalConstants.mTorLogsHistory.size();
|
||||||
mOrbotModel.setList(orbotLocalConstants.mTorLogsHistory);
|
mOrbotModel.setList(orbotLocalConstants.mTorLogsHistory);
|
||||||
LinearLayoutManager layoutManager = new LinearLayoutManager(orbotLogController.this);
|
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;
|
mOrbotAdapter = adapter;
|
||||||
layoutManager.setReverseLayout(true);
|
layoutManager.setReverseLayout(true);
|
||||||
|
|
||||||
LayoutAnimationController controller = AnimationUtils.loadLayoutAnimation(this, R.anim.log_layout_controller);
|
|
||||||
mRecycleView.setLayoutAnimation(controller);
|
|
||||||
|
|
||||||
mRecycleView.setAdapter(adapter);
|
mRecycleView.setAdapter(new AlphaInAnimationAdapter(adapter));
|
||||||
mRecycleView.setItemViewCacheSize(100);
|
mRecycleView.getItemAnimator().setAddDuration(250);
|
||||||
|
mRecycleView.getItemAnimator().setChangeDuration(250);
|
||||||
|
mRecycleView.getItemAnimator().setMoveDuration(250);
|
||||||
|
mRecycleView.getItemAnimator().setRemoveDuration(250);
|
||||||
mRecycleView.setNestedScrollingEnabled(false);
|
mRecycleView.setNestedScrollingEnabled(false);
|
||||||
mRecycleView.setItemViewCacheSize(100);
|
|
||||||
mRecycleView.setDrawingCacheEnabled(true);
|
|
||||||
mRecycleView.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_HIGH);
|
|
||||||
mRecycleView.setLayoutManager(new LinearLayoutManager(orbotLogController.this));
|
mRecycleView.setLayoutManager(new LinearLayoutManager(orbotLogController.this));
|
||||||
mOrbotAdapter.notifyDataSetChanged();
|
mOrbotAdapter.notifyDataSetChanged();
|
||||||
|
}else {
|
||||||
|
logToString();
|
||||||
}
|
}
|
||||||
mOrbotViewController.onTrigger(orbotLogEnums.eOrbotLogViewCommands.M_INIT_VIEWS, null);
|
mOrbotViewController.onTrigger(orbotLogEnums.eOrbotLogViewCommands.M_INIT_VIEWS, null);
|
||||||
mRecycleView.smoothScrollToPosition(mOrbotModel.getList().size());
|
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 */
|
/* LISTENERS */
|
||||||
|
|
||||||
private void onInitListener(){
|
private void onInitListener(){
|
||||||
|
|
||||||
|
mRecycleView.getViewTreeObserver().addOnGlobalLayoutListener(() -> mIsLayoutChanging = false);
|
||||||
|
|
||||||
mMainScroll.getViewTreeObserver().addOnScrollChangedListener(() -> {
|
mMainScroll.getViewTreeObserver().addOnScrollChangedListener(() -> {
|
||||||
int scrollY = mMainScroll.getScrollY();
|
if(status.sLogListView){
|
||||||
if(scrollY>0){
|
if(mMainScroll.canScrollVertically(1)){
|
||||||
if(mFloatingScroller.getAlpha()==0){
|
if(mFloatingScroller.getAlpha()==0){
|
||||||
mFloatingScroller.setVisibility(View.VISIBLE);
|
mFloatingScroller.setVisibility(View.VISIBLE);
|
||||||
mFloatingScroller.animate().alpha(1);
|
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(){
|
public void onUpdateLogs(){
|
||||||
|
|
||||||
new Thread(){
|
new Thread(){
|
||||||
public void run(){
|
public void run(){
|
||||||
while (true){
|
while (true){
|
||||||
|
@ -134,29 +149,44 @@ public class orbotLogController extends AppCompatActivity {
|
||||||
if(mActivityClosed){
|
if(mActivityClosed){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(orbotLocalConstants.mTorLogsHistory.size()>mLogCounter){
|
boolean mLayoutChangeTemp = mIsLayoutChanging;
|
||||||
if(!status.sLogListView){
|
if(mIsLayoutChanging){
|
||||||
sleep(0);
|
if(status.sLogListView){
|
||||||
|
sleep(1000);
|
||||||
}else {
|
}else {
|
||||||
sleep(500);
|
sleep(50);
|
||||||
}
|
}
|
||||||
|
continue;
|
||||||
}else {
|
}else {
|
||||||
sleep(500);
|
if(status.sLogListView){
|
||||||
|
sleep(500);
|
||||||
|
}else {
|
||||||
|
sleep(50);
|
||||||
|
}
|
||||||
|
if(mLayoutChangeTemp != mIsLayoutChanging){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(orbotLocalConstants.mTorLogsHistory.size()>0){
|
if(orbotLocalConstants.mTorLogsHistory.size()>0){
|
||||||
|
mIsLayoutChanging = true;
|
||||||
runOnUiThread(() -> {
|
runOnUiThread(() -> {
|
||||||
if(orbotLocalConstants.mTorLogsHistory.size()>mLogCounter){
|
if(orbotLocalConstants.mTorLogsHistory.size()>mLogCounter){
|
||||||
mOrbotModel.getList().add(0,orbotLocalConstants.mTorLogsHistory.get(mLogCounter));
|
mOrbotModel.getList().add(orbotLocalConstants.mTorLogsHistory.get(mLogCounter));
|
||||||
if(!status.sLogListView){
|
if(!status.sLogListView){
|
||||||
mOrbotViewController.onTrigger(orbotLogEnums.eOrbotLogViewCommands.M_UPDATE_LOGS, Collections.singletonList(orbotLocalConstants.mTorLogsHistory.get(mLogCounter).getLog()));
|
mOrbotViewController.onTrigger(orbotLogEnums.eOrbotLogViewCommands.M_UPDATE_LOGS, Collections.singletonList(orbotLocalConstants.mTorLogsHistory.get(mLogCounter).getLog()));
|
||||||
|
mIsLayoutChanging = false;
|
||||||
|
onScrollBottom(null);
|
||||||
}else {
|
}else {
|
||||||
mOrbotAdapter.notifyItemInserted(0);
|
if(mOrbotAdapter!=null){
|
||||||
mOrbotAdapter.notifyItemChanged(0);
|
mOrbotAdapter.notifyItemInserted(mOrbotModel.getList().size()-1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
mLogCounter+=1;
|
}else {
|
||||||
|
mIsLayoutChanging = false;
|
||||||
}
|
}
|
||||||
|
mLogCounter+=1;
|
||||||
});
|
});
|
||||||
|
sleep(500);
|
||||||
}
|
}
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -166,14 +196,29 @@ public class orbotLogController extends AppCompatActivity {
|
||||||
}.start();
|
}.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onScrollTop(View view) {
|
public void onScrollBottom(View view) {
|
||||||
mMainScroll.smoothScrollTo(0,0);
|
mMainScroll.fullScroll(View.FOCUS_DOWN);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onOpenInfo(View view) {
|
public void onOpenInfo(View view) {
|
||||||
helperMethod.openActivity(settingLogController.class, constants.CONST_LIST_HISTORY, this,true);
|
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{
|
public class orbotModelCallback implements eventObserver.eventListener{
|
||||||
@Override
|
@Override
|
||||||
public Object invokeObserver(List<Object> data, Object e_type)
|
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 */
|
/* LOCAL OVERRIDES */
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -19,10 +19,9 @@ class orbotLogModel
|
||||||
if(model.size()>0){
|
if(model.size()>0){
|
||||||
mModelList.clear();
|
mModelList.clear();
|
||||||
mModelList.addAll(model);
|
mModelList.addAll(model);
|
||||||
Collections.reverse(mModelList);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
mModelList.add(0, new logRowModel(constants.CONST_LOGS_DEFAULT_MESSAGE, helperMethod.getCurrentTime()));
|
mModelList.add(new logRowModel(constants.CONST_LOGS_DEFAULT_MESSAGE, helperMethod.getCurrentTime()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ class orbotLogViewController
|
||||||
|
|
||||||
private void onUpdateLogs(String pLogs){
|
private void onUpdateLogs(String pLogs){
|
||||||
pLogs = "~ " + 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){
|
public void onTrigger(orbotLogEnums.eOrbotLogViewCommands pCommands, List<Object> pData){
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.orbotManager;
|
package com.darkweb.genesissearchengine.appManager.orbotManager;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.GestureDetector;
|
import android.view.GestureDetector;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
|
@ -56,7 +57,7 @@ public class orbotController extends AppCompatActivity {
|
||||||
mCustomizableBridgeMenu = findViewById(R.id.pCustomizableBridgeMenu);
|
mCustomizableBridgeMenu = findViewById(R.id.pCustomizableBridgeMenu);
|
||||||
|
|
||||||
mOrbotViewController = new com.darkweb.genesissearchengine.appManager.orbotManager.orbotViewController(mBridgeSwitch, mVpnSwitch, this, mCustomizableBridgeMenu);
|
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());
|
mOrbotModel = new com.darkweb.genesissearchengine.appManager.orbotManager.orbotModel(new orbotModelCallback());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,7 +91,7 @@ public class orbotController extends AppCompatActivity {
|
||||||
public void onBridgeSwitch(View view){
|
public void onBridgeSwitch(View view){
|
||||||
mOrbotModel.onTrigger(orbotEnums.eOrbotModelCommands.M_BRIDGE_SWITCH,Collections.singletonList(!mBridgeSwitch.isChecked()));
|
mOrbotModel.onTrigger(orbotEnums.eOrbotModelCommands.M_BRIDGE_SWITCH,Collections.singletonList(!mBridgeSwitch.isChecked()));
|
||||||
mOrbotViewController.onTrigger(orbotEnums.eOrbotViewCommands.M_UPDATE_BRIDGE_SETTINGS_VIEWS, Collections.singletonList(status.sBridgeStatus));
|
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){
|
public void openBridgeSettings(View view){
|
||||||
|
@ -99,8 +100,8 @@ public class orbotController extends AppCompatActivity {
|
||||||
|
|
||||||
public void onVPNSwitch(View view){
|
public void onVPNSwitch(View view){
|
||||||
mOrbotModel.onTrigger(orbotEnums.eOrbotModelCommands.M_VPN_SWITCH,Collections.singletonList(!mVpnSwitch.isChecked()));
|
mOrbotModel.onTrigger(orbotEnums.eOrbotModelCommands.M_VPN_SWITCH,Collections.singletonList(!mVpnSwitch.isChecked()));
|
||||||
mOrbotViewController.onTrigger(orbotEnums.eOrbotViewCommands.M_UPDATE_VPN,Collections.singletonList(status.sBridgeVPNStatus));
|
mOrbotViewController.onTrigger(orbotEnums.eOrbotViewCommands.M_UPDATE_VPN,Collections.singletonList(status.sVPNStatus));
|
||||||
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.BRIDGE_VPN_ENABLED,status.sBridgeVPNStatus));
|
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.VPN_ENABLED,status.sVPNStatus));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClose(View view){
|
public void onClose(View view){
|
||||||
|
|
|
@ -28,7 +28,7 @@ class orbotModel
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onVPNSwitch(boolean pStatus){
|
public void onVPNSwitch(boolean pStatus){
|
||||||
status.sBridgeVPNStatus = pStatus;
|
status.sVPNStatus = pStatus;
|
||||||
pluginController.getInstance().onOrbotInvoke(Collections.singletonList(status.sBridgeStatus), pluginEnums.eOrbotManager.M_UPDATE_VPN);
|
pluginController.getInstance().onOrbotInvoke(Collections.singletonList(status.sBridgeStatus), pluginEnums.eOrbotManager.M_UPDATE_VPN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@ import android.widget.TextView;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
import com.darkweb.genesissearchengine.appManager.helpManager.helpController;
|
|
||||||
import com.darkweb.genesissearchengine.appManager.orbotLogManager.orbotLogController;
|
import com.darkweb.genesissearchengine.appManager.orbotLogManager.orbotLogController;
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
import com.darkweb.genesissearchengine.constants.constants;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
|
@ -51,7 +50,7 @@ public class proxyStatusController extends AppCompatActivity {
|
||||||
|
|
||||||
activityContextManager.getInstance().onStack(this);
|
activityContextManager.getInstance().onStack(this);
|
||||||
mProxyStatusViewController = new proxyStatusViewController(this, mOrbotStatus, mVpnStatus, mBridgeStatus);
|
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());
|
mProxyStatusModel = new proxyStatusModel(new proxyStatusModelCallback());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +59,7 @@ public class proxyStatusController extends AppCompatActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void refreshOrbotStatus(View view) {
|
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 */
|
/* LISTENERS */
|
||||||
|
|
|
@ -2,8 +2,6 @@ package com.darkweb.genesissearchengine.appManager.settingManager.clearManager;
|
||||||
|
|
||||||
import android.content.res.ColorStateList;
|
import android.content.res.ColorStateList;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Debug;
|
|
||||||
import android.util.Log;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
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_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_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_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_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.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.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.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.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_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_ZOOM,true));
|
||||||
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_VOICE_INPUT,true));
|
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_VOICE_INPUT,true));
|
||||||
|
|
|
@ -2,18 +2,14 @@ package com.darkweb.genesissearchengine.appManager.settingManager.generalManager
|
||||||
|
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.RadioButton;
|
import android.widget.RadioButton;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.appcompat.app.AppCompatDelegate;
|
import androidx.appcompat.app.AppCompatDelegate;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
import com.darkweb.genesissearchengine.appManager.helpManager.helpController;
|
import com.darkweb.genesissearchengine.appManager.helpManager.helpController;
|
||||||
import com.darkweb.genesissearchengine.appManager.languageManager.languageController;
|
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.constants;
|
||||||
import com.darkweb.genesissearchengine.constants.enums;
|
import com.darkweb.genesissearchengine.constants.enums;
|
||||||
import com.darkweb.genesissearchengine.constants.keys;
|
import com.darkweb.genesissearchengine.constants.keys;
|
||||||
|
@ -29,7 +25,6 @@ import com.google.android.material.switchmaterial.SwitchMaterial;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
public class settingGeneralController extends AppCompatActivity {
|
public class settingGeneralController extends AppCompatActivity {
|
||||||
|
|
||||||
|
@ -44,6 +39,10 @@ public class settingGeneralController extends AppCompatActivity {
|
||||||
private RadioButton mThemeDefault;
|
private RadioButton mThemeDefault;
|
||||||
private TextView mHomePageText;
|
private TextView mHomePageText;
|
||||||
|
|
||||||
|
/* PRIVATE LOCAL VARIABLES */
|
||||||
|
|
||||||
|
private Boolean mIsThemeChanging = false;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
|
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);
|
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
|
||||||
mIsThemeChangable = true;
|
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){
|
if(mIsThemeChangable){
|
||||||
|
@ -181,29 +192,35 @@ public class settingGeneralController extends AppCompatActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onSelectTheme(View view){
|
public void onSelectTheme(View view){
|
||||||
if(view.getId() == R.id.pOption1){
|
if(!mIsThemeChanging){
|
||||||
if(status.sTheme != enums.Theme.THEME_DARK) {
|
mIsThemeChanging = true;
|
||||||
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_RESET_THEME, null);
|
if(view.getId() == R.id.pOption1){
|
||||||
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_SET_THEME, Collections.singletonList(enums.Theme.THEME_DARK));
|
if(status.sTheme != enums.Theme.THEME_DARK) {
|
||||||
mSettingGeneralModel.onTrigger(settingGeneralEnums.eGeneralModel.M_SELECT_THEME, Collections.singletonList(enums.Theme.THEME_DARK));
|
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_RESET_THEME, null);
|
||||||
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_UPDATE_THEME_BLOCKER, Collections.singletonList(enums.Theme.THEME_DARK));
|
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_SET_THEME, Collections.singletonList(enums.Theme.THEME_DARK));
|
||||||
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_INT, Arrays.asList(keys.SETTING_THEME,status.sTheme));
|
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));
|
||||||
}else if(view.getId() == R.id.pOption2) {
|
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_UPDATE_THEME_BLOCKER, Collections.singletonList(enums.Theme.THEME_DARK));
|
||||||
if(status.sTheme != enums.Theme.THEME_LIGHT) {
|
mIsThemeChanging = false;
|
||||||
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_RESET_THEME, null);
|
}
|
||||||
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_SET_THEME, Collections.singletonList(enums.Theme.THEME_LIGHT));
|
}else if(view.getId() == R.id.pOption2) {
|
||||||
mSettingGeneralModel.onTrigger(settingGeneralEnums.eGeneralModel.M_SELECT_THEME, Collections.singletonList(enums.Theme.THEME_LIGHT));
|
if(status.sTheme != enums.Theme.THEME_LIGHT) {
|
||||||
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_UPDATE_THEME_BLOCKER, Collections.singletonList(enums.Theme.THEME_LIGHT));
|
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_RESET_THEME, null);
|
||||||
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_INT, Arrays.asList(keys.SETTING_THEME,status.sTheme));
|
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));
|
||||||
}else {
|
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_INT, Arrays.asList(keys.SETTING_THEME,status.sTheme));
|
||||||
if(status.sTheme != enums.Theme.THEME_DEFAULT) {
|
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_UPDATE_THEME_BLOCKER, Collections.singletonList(enums.Theme.THEME_LIGHT));
|
||||||
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_RESET_THEME, null);
|
mIsThemeChanging = false;
|
||||||
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));
|
}else {
|
||||||
mSettingGeneralViewController.onTrigger(settingGeneralEnums.eGeneralViewController.M_UPDATE_THEME_BLOCKER, Collections.singletonList(enums.Theme.THEME_DEFAULT));
|
if(status.sTheme != enums.Theme.THEME_DEFAULT) {
|
||||||
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_INT, Arrays.asList(keys.SETTING_THEME,status.sTheme));
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static com.darkweb.genesissearchengine.appManager.settingManager.generalManager.settingGeneralEnums.eGeneralViewCallback.M_RESET_THEME_INVOKED_BACK;
|
import static com.darkweb.genesissearchengine.appManager.settingManager.generalManager.settingGeneralEnums.eGeneralViewCallback.M_RESET_THEME_INVOKED_BACK;
|
||||||
|
import static com.flurry.sdk.jo.v;
|
||||||
|
|
||||||
class settingGeneralViewController
|
class settingGeneralViewController
|
||||||
{
|
{
|
||||||
|
@ -108,12 +109,14 @@ class settingGeneralViewController
|
||||||
mThemeDark.setButtonTintList(ColorStateList.valueOf(ContextCompat.getColor(mContext, R.color.c_radio_tint_default)));
|
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)));
|
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)));
|
mThemeDefault.setButtonTintList(ColorStateList.valueOf(ContextCompat.getColor(mContext, R.color.c_radio_tint_default)));
|
||||||
|
|
||||||
mThemeDark.setChecked(false);
|
mThemeDark.setChecked(false);
|
||||||
mThemeLight.setChecked(false);
|
mThemeLight.setChecked(false);
|
||||||
mThemeDefault.setChecked(false);
|
mThemeDefault.setChecked(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setThemeLight(int pTheme){
|
private void setTheme(int pTheme){
|
||||||
|
|
||||||
if(pTheme == enums.Theme.THEME_LIGHT){
|
if(pTheme == enums.Theme.THEME_LIGHT){
|
||||||
mThemeLight.setButtonTintList(ColorStateList.valueOf(ContextCompat.getColor(mContext, R.color.c_radio_tint)));
|
mThemeLight.setButtonTintList(ColorStateList.valueOf(ContextCompat.getColor(mContext, R.color.c_radio_tint)));
|
||||||
mThemeLight.setChecked(true);
|
mThemeLight.setChecked(true);
|
||||||
|
@ -128,7 +131,7 @@ class settingGeneralViewController
|
||||||
|
|
||||||
public Object onTrigger(settingGeneralEnums.eGeneralViewController pCommands, List<Object> pData){
|
public Object onTrigger(settingGeneralEnums.eGeneralViewController pCommands, List<Object> pData){
|
||||||
if(pCommands.equals(settingGeneralEnums.eGeneralViewController.M_SET_THEME)){
|
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)){
|
else if(pCommands.equals(settingGeneralEnums.eGeneralViewController.M_RESET_THEME)){
|
||||||
resetThemeSelection();
|
resetThemeSelection();
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.settingManager.logManager;
|
package com.darkweb.genesissearchengine.appManager.settingManager.logManager;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
|
@ -98,8 +99,13 @@ public class settingLogController extends AppCompatActivity {
|
||||||
public void onSwitchLogUIMode(View view){
|
public void onSwitchLogUIMode(View view){
|
||||||
mSettingLogModel.onTrigger(settingLogEnums.eLogModel.M_SWITCH_LOG_VIEW, Collections.singletonList(!mListView.isChecked()));
|
mSettingLogModel.onTrigger(settingLogEnums.eLogModel.M_SWITCH_LOG_VIEW, Collections.singletonList(!mListView.isChecked()));
|
||||||
mListView.toggle();
|
mListView.toggle();
|
||||||
activityContextManager.getInstance().getOrbotLogController().initializeLogs();
|
|
||||||
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_LIST_VIEW, status.sLogListView));
|
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) {
|
public void onOpenInfo(View view) {
|
||||||
|
|
|
@ -6,6 +6,7 @@ import android.widget.RadioButton;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
import com.darkweb.genesissearchengine.appManager.helpManager.helpController;
|
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.constants;
|
||||||
import com.darkweb.genesissearchengine.constants.keys;
|
import com.darkweb.genesissearchengine.constants.keys;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
|
@ -29,7 +30,6 @@ public class settingPrivacyController extends AppCompatActivity {
|
||||||
private settingPrivacyViewController mSettingPrivacyViewController;
|
private settingPrivacyViewController mSettingPrivacyViewController;
|
||||||
private SwitchMaterial mJavaScript;
|
private SwitchMaterial mJavaScript;
|
||||||
private SwitchMaterial mDoNotTrack;
|
private SwitchMaterial mDoNotTrack;
|
||||||
private SwitchMaterial mTrackingProtection;
|
|
||||||
private SwitchMaterial mClearDataOnExit;
|
private SwitchMaterial mClearDataOnExit;
|
||||||
private ArrayList<RadioButton> mCookie = new ArrayList<>();
|
private ArrayList<RadioButton> mCookie = new ArrayList<>();
|
||||||
private boolean mSettingChanged = false;
|
private boolean mSettingChanged = false;
|
||||||
|
@ -47,7 +47,6 @@ public class settingPrivacyController extends AppCompatActivity {
|
||||||
private void viewsInitializations() {
|
private void viewsInitializations() {
|
||||||
mJavaScript = findViewById(R.id.pJavascript);
|
mJavaScript = findViewById(R.id.pJavascript);
|
||||||
mDoNotTrack = findViewById(R.id.pDoNotTrack);
|
mDoNotTrack = findViewById(R.id.pDoNotTrack);
|
||||||
mTrackingProtection = findViewById(R.id.pTrackingProtection);
|
|
||||||
mClearDataOnExit = findViewById(R.id.pClearDataOnExit);
|
mClearDataOnExit = findViewById(R.id.pClearDataOnExit);
|
||||||
mCookie.add(findViewById(R.id.pCookieRadioOption1));
|
mCookie.add(findViewById(R.id.pCookieRadioOption1));
|
||||||
mCookie.add(findViewById(R.id.pCookieRadioOption2));
|
mCookie.add(findViewById(R.id.pCookieRadioOption2));
|
||||||
|
@ -55,7 +54,7 @@ public class settingPrivacyController extends AppCompatActivity {
|
||||||
mCookie.add(findViewById(R.id.pCookieRadioOption4));
|
mCookie.add(findViewById(R.id.pCookieRadioOption4));
|
||||||
|
|
||||||
activityContextManager.getInstance().onStack(this);
|
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());
|
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));
|
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){
|
public void onCookies(View view){
|
||||||
mSettingChanged = true;
|
mSettingChanged = true;
|
||||||
mSettingPrivacyViewController.onTrigger(settingPrivacyEnums.ePrivacyViewController.M_SET_COOKIE_STATUS, Collections.singletonList(view));
|
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);
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,10 +35,6 @@ class settingPrivacyModel
|
||||||
status.sStatusDoNotTrack = pStatus;
|
status.sStatusDoNotTrack = pStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onTrackingProtection(boolean pStatus){
|
|
||||||
status.sSettingTrackingProtection = pStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void onCookies(View pView){
|
private void onCookies(View pView){
|
||||||
if(pView.getId() == R.id.pCookieOption1){
|
if(pView.getId() == R.id.pCookieOption1){
|
||||||
status.sSettingCookieStatus = ACCEPT_ALL;
|
status.sSettingCookieStatus = ACCEPT_ALL;
|
||||||
|
@ -65,9 +61,6 @@ class settingPrivacyModel
|
||||||
else if(pCommands.equals(settingPrivacyEnums.ePrivacyModel.M_SET_DONOT_TRACK)){
|
else if(pCommands.equals(settingPrivacyEnums.ePrivacyModel.M_SET_DONOT_TRACK)){
|
||||||
onDoNotTrack((boolean)pData.get(0));
|
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)){
|
else if(pCommands.equals(settingPrivacyEnums.ePrivacyModel.M_SET_COOKIES)){
|
||||||
onCookies((View) pData.get(0));
|
onCookies((View) pData.get(0));
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,18 +28,16 @@ class settingPrivacyViewController
|
||||||
private AppCompatActivity mContext;
|
private AppCompatActivity mContext;
|
||||||
private SwitchMaterial mJavaScript;
|
private SwitchMaterial mJavaScript;
|
||||||
private SwitchMaterial mDoNotTrack;
|
private SwitchMaterial mDoNotTrack;
|
||||||
private SwitchMaterial mTrackingProtection;
|
|
||||||
private SwitchMaterial mClearDataOnExit;
|
private SwitchMaterial mClearDataOnExit;
|
||||||
private ArrayList<RadioButton> mCookie;
|
private ArrayList<RadioButton> mCookie;
|
||||||
|
|
||||||
/*Initializations*/
|
/*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.mEvent = pEvent;
|
||||||
this.mContext = pContext;
|
this.mContext = pContext;
|
||||||
this.mJavaScript = pJavaScript;
|
this.mJavaScript = pJavaScript;
|
||||||
this.mTrackingProtection = pTrackingProtection;
|
|
||||||
this.mClearDataOnExit = pClearDataOnExit;
|
this.mClearDataOnExit = pClearDataOnExit;
|
||||||
this.mCookie = pCookie;
|
this.mCookie = pCookie;
|
||||||
this.mDoNotTrack = pDoNotTrack;
|
this.mDoNotTrack = pDoNotTrack;
|
||||||
|
@ -78,12 +76,6 @@ class settingPrivacyViewController
|
||||||
this.mClearDataOnExit.setChecked(false);
|
this.mClearDataOnExit.setChecked(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(status.sSettingTrackingProtection){
|
|
||||||
this.mTrackingProtection.setChecked(true);
|
|
||||||
}else{
|
|
||||||
this.mTrackingProtection.setChecked(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(status.sStatusDoNotTrack){
|
if(status.sStatusDoNotTrack){
|
||||||
this.mDoNotTrack.setChecked(true);
|
this.mDoNotTrack.setChecked(true);
|
||||||
}else{
|
}else{
|
||||||
|
|
|
@ -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.notificationManager.settingNotificationController;
|
||||||
import com.darkweb.genesissearchengine.appManager.settingManager.privacyManager.settingPrivacyController;
|
import com.darkweb.genesissearchengine.appManager.settingManager.privacyManager.settingPrivacyController;
|
||||||
import com.darkweb.genesissearchengine.appManager.settingManager.searchEngineManager.settingSearchController;
|
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.constants;
|
||||||
import com.darkweb.genesissearchengine.constants.keys;
|
import com.darkweb.genesissearchengine.constants.keys;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
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);
|
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) {
|
public void onOpenInfo(View view) {
|
||||||
helperMethod.openActivity(helpController.class, constants.CONST_LIST_HISTORY, this,true);
|
helperMethod.openActivity(helpController.class, constants.CONST_LIST_HISTORY, this,true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -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
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -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);
|
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.tab_row_view, parent, false);
|
||||||
return new listViewHolder(view);
|
return new listViewHolder(view);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(@NonNull tabAdapter.listViewHolder holder, int position)
|
public void onBindViewHolder(@NonNull tabAdapter.listViewHolder holder, int position)
|
||||||
{
|
{
|
||||||
|
@ -248,10 +247,13 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
|
||||||
}else {
|
}else {
|
||||||
itemView.setVisibility(View.VISIBLE);
|
itemView.setVisibility(View.VISIBLE);
|
||||||
mLongPressMenuEnabled = false;
|
mLongPressMenuEnabled = false;
|
||||||
|
mItemSelectionMenuButton.animate().cancel();
|
||||||
|
mItemSelectionMenuButton.animate().setDuration(250).alpha(1);
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
itemView.setVisibility(View.VISIBLE);
|
itemView.setVisibility(View.VISIBLE);
|
||||||
mLongPressMenuEnabled = false;
|
mLongPressMenuEnabled = false;
|
||||||
|
mItemSelectionMenuButton.animate().setDuration(250).alpha(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -292,15 +294,24 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mModelList.remove(this.getLayoutPosition());
|
mModelList.remove(this.getLayoutPosition());
|
||||||
notifyItemRemoved(this.getLayoutPosition());
|
notifyItemRemoved(this.getLayoutPosition());
|
||||||
notifyItemChanged(mModelList.size()-1);
|
notifyItemChanged(mModelList.size()-1);
|
||||||
notifyItemRangeChanged(this.getLayoutPosition(), mModelList.size());
|
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);
|
mEvent.invokeObserver(Collections.singletonList(this.getLayoutPosition()), tabEnums.eTabAdapterCallback.ON_REMOVE_TAB_VIEW);
|
||||||
}
|
}
|
||||||
else if(v.getId() == R.id.pItemSelectionMenuButton){
|
else if(v.getId() == R.id.pItemSelectionMenuButton){
|
||||||
onEnableLongClickMenu();
|
onEnableLongClickMenu();
|
||||||
|
v.animate().cancel();
|
||||||
|
v.animate().setDuration(350).alpha(0);
|
||||||
mEvent.invokeObserver(null, tabEnums.eTabAdapterCallback.ON_SHOW_SELECTION);
|
mEvent.invokeObserver(null, tabEnums.eTabAdapterCallback.ON_SHOW_SELECTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import android.graphics.Canvas;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
import android.widget.FrameLayout;
|
||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
|
@ -15,8 +16,8 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import androidx.recyclerview.widget.SimpleItemAnimator;
|
import androidx.recyclerview.widget.SimpleItemAnimator;
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
import com.darkweb.genesissearchengine.appManager.homeManager.geckoSession;
|
import com.darkweb.genesissearchengine.appManager.homeManager.geckoManager.geckoSession;
|
||||||
import com.darkweb.genesissearchengine.appManager.homeManager.homeController;
|
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
|
||||||
import com.darkweb.genesissearchengine.appManager.settingManager.settingHomePage.settingHomeController;
|
import com.darkweb.genesissearchengine.appManager.settingManager.settingHomePage.settingHomeController;
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
import com.darkweb.genesissearchengine.constants.constants;
|
||||||
import com.darkweb.genesissearchengine.constants.keys;
|
import com.darkweb.genesissearchengine.constants.keys;
|
||||||
|
@ -40,7 +41,7 @@ public class tabController extends AppCompatActivity
|
||||||
/*Private Views*/
|
/*Private Views*/
|
||||||
private Button mTabs;
|
private Button mTabs;
|
||||||
private ImageView mRemoveSelection;
|
private ImageView mRemoveSelection;
|
||||||
private LinearLayout mTabsContainer;
|
private FrameLayout mTabsContainer;
|
||||||
private ImageButton mMenuButton;
|
private ImageButton mMenuButton;
|
||||||
private ImageButton mClearSelection;
|
private ImageButton mClearSelection;
|
||||||
private View mPopupUndo;
|
private View mPopupUndo;
|
||||||
|
@ -152,13 +153,13 @@ public class tabController extends AppCompatActivity
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onInitRemoveView(int pIndex, boolean pCreateBackup){
|
public void onInitRemoveView(int pIndex, boolean pCreateBackup){
|
||||||
onRemoveTab(pIndex);
|
mListModel.onRemoveTab(pIndex);
|
||||||
onShowUndoDialog();
|
mListModel.getList().remove(pIndex);
|
||||||
if(mListModel.onGetBackup().size()>=mListModel.getList().size()){
|
if(mListModel.getList().size()<1){
|
||||||
mRecycleView.animate().setStartDelay(0).alpha(0);
|
mRecycleView.animate().setStartDelay(150).alpha(0);
|
||||||
}
|
}
|
||||||
initTabCount();
|
initTabCount();
|
||||||
mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.INIT_FIRST_ROW, null);
|
mTabAdapter.notifyItemRangeChanged(pIndex, mTabAdapter.getItemCount() - pIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initTabCount()
|
public void initTabCount()
|
||||||
|
|
|
@ -2,21 +2,10 @@ package com.darkweb.genesissearchengine.appManager.tabManager;
|
||||||
|
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
import android.se.omapi.Session;
|
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.homeManager.geckoManager.geckoSession;
|
||||||
import com.darkweb.genesissearchengine.appManager.homeManager.geckoSession;
|
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
|
|
||||||
import org.mozilla.geckoview.GeckoSession;
|
|
||||||
import org.mozilla.geckoview.GeckoView;
|
|
||||||
|
|
||||||
import java.sql.Blob;
|
|
||||||
import java.util.Calendar;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
public class tabRowModel
|
public class tabRowModel
|
||||||
{
|
{
|
||||||
/*Private Variables*/
|
/*Private Variables*/
|
||||||
|
|
|
@ -17,6 +17,7 @@ import android.view.Window;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.widget.ActionMenuView;
|
import android.widget.ActionMenuView;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
import android.widget.FrameLayout;
|
||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
|
@ -44,7 +45,7 @@ class tabViewController
|
||||||
private PopupWindow mTabOptionMenu = null;
|
private PopupWindow mTabOptionMenu = null;
|
||||||
private Button mTabs;
|
private Button mTabs;
|
||||||
private ImageView mRemoveSelection;
|
private ImageView mRemoveSelection;
|
||||||
private LinearLayout mTabsContainer;
|
private FrameLayout mTabsContainer;
|
||||||
private ImageButton mMenuButton;
|
private ImageButton mMenuButton;
|
||||||
private ImageButton mClearSelection;
|
private ImageButton mClearSelection;
|
||||||
private View mToastLayoutRoot;
|
private View mToastLayoutRoot;
|
||||||
|
@ -57,7 +58,7 @@ class tabViewController
|
||||||
|
|
||||||
/*Initializations*/
|
/*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.mContext = mContext;
|
||||||
this.mTabs = pTabs;
|
this.mTabs = pTabs;
|
||||||
|
|
|
@ -17,6 +17,7 @@ public class constants
|
||||||
/*URL CONSTANTS*/
|
/*URL CONSTANTS*/
|
||||||
|
|
||||||
public static final String CONST_GENESIS_URL_CACHED = "resource://android/assets/homepage/homepage.html";
|
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_SLASHED = "https://boogle.store/";
|
||||||
public static final String CONST_GENESIS_DOMAIN_URL = "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";
|
public static final String CONST_GENESIS_HELP_URL_CACHE = "resource://android/assets/help/help.html";
|
||||||
|
|
|
@ -8,7 +8,7 @@ public class enums
|
||||||
on_verify_selected_url_menu,FINDER_RESULT_CALLBACK,
|
on_verify_selected_url_menu,FINDER_RESULT_CALLBACK,
|
||||||
welcome, reload,download_folder,
|
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,
|
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*/
|
/*General Enums*/
|
||||||
|
|
|
@ -29,7 +29,7 @@ public class keys
|
||||||
public static final String SETTING_FIRST_INSTALLED = "FIRST_INSTALLED";
|
public static final String SETTING_FIRST_INSTALLED = "FIRST_INSTALLED";
|
||||||
public static final String SETTING_JAVA_SCRIPT = "JAVA_SCRIPT";
|
public static final String SETTING_JAVA_SCRIPT = "JAVA_SCRIPT";
|
||||||
public static final String SETTING_HISTORY_CLEAR = "HISTORY_CLEAR";
|
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_GATEWAY_MANUAL = "pref_bridges_enabled_manual";
|
||||||
public static final String SETTING_IS_BOOTSTRAPPED = "IS_BOOTSTRAPPED";
|
public static final String SETTING_IS_BOOTSTRAPPED = "IS_BOOTSTRAPPED";
|
||||||
public static final String SETTING_IS_WELCOME_ENABLED = "IS_WELCOME_ENABLED";
|
public static final String SETTING_IS_WELCOME_ENABLED = "IS_WELCOME_ENABLED";
|
||||||
|
@ -57,8 +57,8 @@ public class keys
|
||||||
/*Bridge Settings*/
|
/*Bridge Settings*/
|
||||||
|
|
||||||
public static final String BRIDGE_CUSTOM_BRIDGE_1 = "CLEAR_PREFS";
|
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_NOTIFICATION = "BRIDGE_NOTIFICATION";
|
||||||
|
public static final String BRIDGE_ENABLES = "pref_bridges_enabled";
|
||||||
|
public static final String VPN_ENABLED = "pref_vpn";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,8 @@ package com.darkweb.genesissearchengine.constants;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataController;
|
import com.darkweb.genesissearchengine.dataManager.dataController;
|
||||||
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
import com.darkweb.genesissearchengine.dataManager.dataEnums;
|
||||||
|
|
||||||
|
import org.mozilla.geckoview.ContentBlocking;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
import static org.mozilla.geckoview.ContentBlocking.CookieBehavior.ACCEPT_FIRST_PARTY;
|
import static org.mozilla.geckoview.ContentBlocking.CookieBehavior.ACCEPT_FIRST_PARTY;
|
||||||
|
@ -12,7 +14,6 @@ public class status
|
||||||
/*App Status*/
|
/*App Status*/
|
||||||
|
|
||||||
public static boolean sPaidStatus = true;
|
public static boolean sPaidStatus = true;
|
||||||
public static String sAppCurrentABI = "7.0";
|
|
||||||
public static String mCurrentReloadURL = "";
|
public static String mCurrentReloadURL = "";
|
||||||
public static int mNotificationID = 1001;
|
public static int mNotificationID = 1001;
|
||||||
|
|
||||||
|
@ -37,7 +38,7 @@ public class status
|
||||||
public static boolean sSettingIsAppRated = false;
|
public static boolean sSettingIsAppRated = false;
|
||||||
public static boolean sSettingFontAdjustable = true;
|
public static boolean sSettingFontAdjustable = true;
|
||||||
public static boolean sSettingFirstStart = true;
|
public static boolean sSettingFirstStart = true;
|
||||||
public static boolean sSettingTrackingProtection = true;
|
public static int sSettingTrackingProtection = 0;
|
||||||
public static boolean mThemeApplying = false;
|
public static boolean mThemeApplying = false;
|
||||||
|
|
||||||
public static boolean sStatusDoNotTrack = true;
|
public static boolean sStatusDoNotTrack = true;
|
||||||
|
@ -46,22 +47,22 @@ public class status
|
||||||
public static boolean sShowWebFonts = true;
|
public static boolean sShowWebFonts = true;
|
||||||
public static boolean sToolbarTheme = false;
|
public static boolean sToolbarTheme = false;
|
||||||
public static boolean sFullScreenBrowsing = false;
|
public static boolean sFullScreenBrowsing = false;
|
||||||
public static boolean sOpenURLInNewTab = false;
|
public static boolean sOpenURLInNewTab = true;
|
||||||
public static boolean sDefaultNightMode;
|
public static boolean sDefaultNightMode;
|
||||||
public static boolean sLogListView;
|
public static boolean sLogListView;
|
||||||
|
|
||||||
public static float sSettingFontSize = 1;
|
public static float sSettingFontSize = 1;
|
||||||
|
|
||||||
public static int sTheme = enums.Theme.THEME_DEFAULT;
|
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;
|
public static int sShowImages = -1;
|
||||||
|
|
||||||
/*Bridge Status*/
|
/*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 sBridgeGatewayAuto = false;
|
||||||
public static boolean sBridgeGatewayManual = false;
|
public static boolean sBridgeGatewayManual = false;
|
||||||
public static boolean sBridgeVPNStatus = false;
|
public static boolean sVPNStatus = false;
|
||||||
public static boolean sBridgeStatus = false;
|
public static boolean sBridgeStatus = false;
|
||||||
public static int sBridgeNotificationManual = 0;
|
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.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.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.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.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.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.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.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_BRIDGE_ENABLES,true));
|
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.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.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.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.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.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.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));
|
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.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.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.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));
|
status.sLogListView = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_LIST_VIEW,true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,8 @@ package com.darkweb.genesissearchengine.dataManager;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkRowModel;
|
import com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkRowModel;
|
||||||
import com.darkweb.genesissearchengine.appManager.databaseManager.databaseController;
|
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.constants;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
|
||||||
import com.darkweb.genesissearchengine.constants.strings;
|
import com.darkweb.genesissearchengine.constants.strings;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -71,22 +68,6 @@ public class bookmarkDataModel {
|
||||||
databaseController.getInstance().execSQL("delete from bookmark where id="+ pID,null);
|
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){
|
public Object onTrigger(dataEnums.eBookmarkCommands p_commands, List<Object> pData){
|
||||||
if(p_commands == dataEnums.eBookmarkCommands.M_GET_BOOKMARK){
|
if(p_commands == dataEnums.eBookmarkCommands.M_GET_BOOKMARK){
|
||||||
return getBookmark();
|
return getBookmark();
|
||||||
|
@ -94,9 +75,6 @@ public class bookmarkDataModel {
|
||||||
else if(p_commands == dataEnums.eBookmarkCommands.M_ADD_BOOKMARK){
|
else if(p_commands == dataEnums.eBookmarkCommands.M_ADD_BOOKMARK){
|
||||||
addBookmark((String)pData.get(0), (String)pData.get(1));
|
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){
|
else if(p_commands == dataEnums.eBookmarkCommands.M_DELETE_BOOKMARK){
|
||||||
deleteBookmark((int)pData.get(0));
|
deleteBookmark((int)pData.get(0));
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,10 +3,8 @@ package com.darkweb.genesissearchengine.dataManager;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
import com.darkweb.genesissearchengine.appManager.databaseManager.databaseController;
|
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.constants;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -20,7 +18,8 @@ public class dataController
|
||||||
private preferenceDataModel mPreferenceModel;
|
private preferenceDataModel mPreferenceModel;
|
||||||
private historyDataModel mHistoryModel;
|
private historyDataModel mHistoryModel;
|
||||||
private imageDataModel mImageDataModel;
|
private imageDataModel mImageDataModel;
|
||||||
private bookmarkDataModel mBookMarkDataModel;
|
private bookmarkDataModel mBookmarkDataModel;
|
||||||
|
private suggestionDataModel mSuggestionDataModel;
|
||||||
|
|
||||||
/*Private Declarations*/
|
/*Private Declarations*/
|
||||||
|
|
||||||
|
@ -32,16 +31,16 @@ public class dataController
|
||||||
|
|
||||||
/*Initializations*/
|
/*Initializations*/
|
||||||
|
|
||||||
public void initialize(AppCompatActivity app_context){
|
public void initialize(AppCompatActivity pAppContext){
|
||||||
mHistoryModel = new historyDataModel();
|
mHistoryModel = new historyDataModel();
|
||||||
mTabModel = new tabDataModel();
|
mTabModel = new tabDataModel();
|
||||||
mPreferenceModel = new preferenceDataModel(app_context);
|
mPreferenceModel = new preferenceDataModel(pAppContext);
|
||||||
mImageDataModel = new imageDataModel();
|
mImageDataModel = new imageDataModel();
|
||||||
mBookMarkDataModel = new bookmarkDataModel();
|
mBookmarkDataModel = new bookmarkDataModel();
|
||||||
|
mSuggestionDataModel = new suggestionDataModel(pAppContext);
|
||||||
}
|
}
|
||||||
public void initializeListData(){
|
public void initializeListData(){
|
||||||
invokeSuggestion(dataEnums.eSuggestionCommands.M_INIT_SUGGESTION, null);
|
mBookmarkDataModel.initializebookmark(databaseController.getInstance().selectBookmark());
|
||||||
mBookMarkDataModel.initializebookmark(databaseController.getInstance().selectBookmark());
|
|
||||||
if(!status.sClearOnExit)
|
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()));
|
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*/
|
/*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){
|
if(pCommands == dataEnums.eHistoryCommands.M_ADD_HISTORY){
|
||||||
mTabModel.onTrigger(dataEnums.eTabCommands.M_UPDATE_TAB, p_data);
|
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);
|
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 {
|
}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*/
|
/*Recieving Preferences*/
|
||||||
public Object invokePrefs(dataEnums.ePreferencesCommands p_commands, List<Object> p_data){
|
public Object invokePrefs(dataEnums.ePreferencesCommands pCommands, List<Object> pData){
|
||||||
return mPreferenceModel.onTrigger(p_commands, p_data);
|
return mPreferenceModel.onTrigger(pCommands, pData);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*Recieving History*/
|
/*Recieving History*/
|
||||||
public Object invokeBookmark(dataEnums.eBookmarkCommands p_commands, List<Object> p_data){
|
public Object invokeBookmark(dataEnums.eBookmarkCommands pCommands, List<Object> pData){
|
||||||
return mBookMarkDataModel.onTrigger(p_commands, p_data);
|
return mBookmarkDataModel.onTrigger(pCommands, pData);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object invokeSuggestion(dataEnums.eSuggestionCommands p_commands, List<Object> p_data){
|
public Object invokeTab(dataEnums.eTabCommands pCommands, List<Object> pData){
|
||||||
if(dataEnums.eSuggestionCommands.M_GET_SUGGESTION.equals(p_commands)) {
|
return mTabModel.onTrigger(pCommands, pData);
|
||||||
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 p_commands, List<Object> p_data){
|
public Object invokeImage(dataEnums.eImageCommands pCommands, List<Object> pData){
|
||||||
return mTabModel.onTrigger(p_commands, p_data);
|
return mImageDataModel.onTrigger(pCommands, pData);
|
||||||
}
|
|
||||||
|
|
||||||
public Object invokeImage(dataEnums.eImageCommands p_commands, List<Object> p_data){
|
|
||||||
return mImageDataModel.onTrigger(p_commands, p_data);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,11 +4,11 @@ public class dataEnums
|
||||||
{
|
{
|
||||||
/*Settings Manager*/
|
/*Settings Manager*/
|
||||||
public enum eHistoryCommands {
|
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 {
|
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{
|
public enum ePreferencesCommands{
|
||||||
|
@ -16,7 +16,7 @@ public class dataEnums
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum eSuggestionCommands{
|
public enum eSuggestionCommands{
|
||||||
M_UPDATE_SUGGESTION, M_CLEAR_SUGGESTION, M_INIT_SUGGESTION, M_ADD_SUGGESTION, M_GET_SUGGESTION
|
M_GET_SUGGESTIONS
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum eTabCommands{
|
public enum eTabCommands{
|
||||||
|
|
|
@ -4,7 +4,6 @@ import com.darkweb.genesissearchengine.appManager.databaseManager.databaseContro
|
||||||
import com.darkweb.genesissearchengine.appManager.historyManager.historyRowModel;
|
import com.darkweb.genesissearchengine.appManager.historyManager.historyRowModel;
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
import com.darkweb.genesissearchengine.constants.constants;
|
||||||
import com.darkweb.genesissearchengine.constants.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.constants.strings;
|
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -37,11 +36,11 @@ public class historyDataModel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initializeCache(ArrayList<historyRowModel> history){
|
private void initializeCache(ArrayList<historyRowModel> pHistory){
|
||||||
for(int count=0;count<=history.size()-1;count++){
|
for(int count=0;count<=pHistory.size()-1;count++){
|
||||||
historyRowModel tempSuggestion = new historyRowModel(history.get(count).getHeader(),history.get(count).getHeader(),-1);
|
historyRowModel tempSuggestion = new historyRowModel(pHistory.get(count).getHeader(),pHistory.get(count).getHeader(),-1);
|
||||||
tempSuggestion.setURL(history.get(count).getHeader());
|
tempSuggestion.setURL(pHistory.get(count).getHeader());
|
||||||
mHistoryCache.put(history.get(count).getID(),tempSuggestion);
|
mHistoryCache.put(pHistory.get(count).getID(),tempSuggestion);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,14 +48,14 @@ public class historyDataModel {
|
||||||
return mHistory;
|
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++) {
|
for (int m_count = 0; m_count < mHistory.size(); m_count++) {
|
||||||
historyRowModel m_temp_model = mHistory.get(m_count);
|
historyRowModel m_temp_model = mHistory.get(m_count);
|
||||||
if(m_temp_model==null)
|
if(m_temp_model==null)
|
||||||
continue;
|
continue;
|
||||||
if (m_temp_model.getDescription().equals(p_url)) {
|
if (m_temp_model.getDescription().equals(pUrl)) {
|
||||||
if(m_temp_model.getID()==p_id){
|
if(m_temp_model.getID()==pID){
|
||||||
if(m_count>0){
|
if(m_count>0){
|
||||||
mHistory.remove(m_count);
|
mHistory.remove(m_count);
|
||||||
mHistory.add(0, m_temp_model);
|
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) {
|
private int addHistory(String pUrl,String pHeader, int pID) {
|
||||||
if(p_url.length()>1500 || p_url.equals("about:blank") || p_header.equals("$TITLE")){
|
if(pUrl.length()>1500 || pUrl.equals("about:blank") || pHeader.equals("$TITLE")){
|
||||||
return p_id;
|
return pID;
|
||||||
}
|
}
|
||||||
|
|
||||||
p_url = helperMethod.removeLastSlash(p_url);
|
pUrl = helperMethod.removeLastSlash(pUrl);
|
||||||
p_url = helperMethod.urlWithoutPrefix(p_url);
|
pUrl = helperMethod.urlWithoutPrefix(pUrl);
|
||||||
|
|
||||||
Object url_exists = mHistoryCache.get(p_id);
|
Object url_exists = mHistoryCache.get(pID);
|
||||||
if(url_exists!=null){
|
if(url_exists!=null){
|
||||||
mHistoryCache.get(p_id).setHeader(p_header);
|
mHistoryCache.get(pID).setHeader(pHeader);
|
||||||
mHistoryCache.get(p_id).setURL(p_url);
|
mHistoryCache.get(pID).setURL(pUrl);
|
||||||
|
|
||||||
removeDuplicateURLFromHistory(p_id, p_url);
|
removeDuplicateURLFromHistory(pID, pUrl);
|
||||||
|
|
||||||
String[] params = new String[2];
|
String[] params = new String[2];
|
||||||
params[0] = p_url;
|
params[0] = pUrl;
|
||||||
params[1] = p_header;
|
params[1] = pHeader;
|
||||||
String m_date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS", Locale.ENGLISH).format(Calendar.getInstance().getTime());
|
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);
|
databaseController.getInstance().execSQL("UPDATE history SET date = '" + m_date + "' , url = ? , title = ? WHERE id="+pID,params);
|
||||||
return p_id;
|
return pID;
|
||||||
}else {
|
}else {
|
||||||
if(mHistorySize > constants.CONST_MAX_LIST_DATA_SIZE)
|
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);
|
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")){
|
if(pHeader.equals("loading")){
|
||||||
p_header = p_url;
|
pHeader = pUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] params = new String[2];
|
String[] params = new String[2];
|
||||||
params[0] = p_url;
|
params[0] = pUrl;
|
||||||
params[1] = p_header;
|
params[1] = pHeader;
|
||||||
|
|
||||||
mMaxHistoryId = mMaxHistoryId +1;
|
mMaxHistoryId = mMaxHistoryId +1;
|
||||||
mHistorySize += 1;
|
mHistorySize += 1;
|
||||||
|
|
||||||
String m_date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS", Locale.ENGLISH).format(Calendar.getInstance().getTime());
|
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);
|
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));
|
mHistoryCache.put(mMaxHistoryId, mHistory.get(0));
|
||||||
removeDuplicateURLFromHistory(mMaxHistoryId, p_url);
|
removeDuplicateURLFromHistory(mMaxHistoryId, pUrl);
|
||||||
return mMaxHistoryId;
|
return mMaxHistoryId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void removeHistory(int p_id){
|
private void removeHistory(int pID){
|
||||||
databaseController.getInstance().execSQL("DELETE FROM history WHERE id = "+p_id,null);
|
databaseController.getInstance().execSQL("DELETE FROM history WHERE id = "+pID,null);
|
||||||
databaseController.getInstance().selectHistory(0,constants.CONST_FETCHABLE_LIST_SIZE);
|
databaseController.getInstance().selectHistory(0,constants.CONST_FETCHABLE_LIST_SIZE);
|
||||||
mHistoryCache.remove(p_id);
|
mHistoryCache.remove(pID);
|
||||||
mHistorySize -= 1;
|
mHistorySize -= 1;
|
||||||
}
|
}
|
||||||
private void clearHistory(){
|
private void clearHistory(){
|
||||||
|
@ -140,215 +139,35 @@ public class historyDataModel {
|
||||||
mHistory.clear();
|
mHistory.clear();
|
||||||
mHistoryCache.clear();
|
mHistoryCache.clear();
|
||||||
}
|
}
|
||||||
private boolean loadMoreHistory(ArrayList<historyRowModel> p_history){
|
private boolean loadMoreHistory(ArrayList<historyRowModel> pHistory){
|
||||||
this.mHistory.addAll(p_history);
|
this.mHistory.addAll(pHistory);
|
||||||
for(int count=0;count<=p_history.size()-1;count++){
|
for(int count=0;count<=pHistory.size()-1;count++){
|
||||||
mHistoryCache.put(p_history.get(count).getID(),p_history.get(0));
|
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){
|
public Object onTrigger(dataEnums.eHistoryCommands pCommands, List<Object> pData){
|
||||||
|
if(pCommands == dataEnums.eHistoryCommands.M_GET_HISTORY){
|
||||||
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){
|
|
||||||
return getHistory();
|
return getHistory();
|
||||||
}
|
}
|
||||||
else if(p_commands == dataEnums.eHistoryCommands.M_ADD_HISTORY){
|
else if(pCommands == dataEnums.eHistoryCommands.M_ADD_HISTORY){
|
||||||
return addHistory((String) p_data.get(0),(String) p_data.get(2), (int)p_data.get(3));
|
return addHistory((String) pData.get(0),(String) pData.get(2), (int)pData.get(3));
|
||||||
}
|
}
|
||||||
else if(p_commands == dataEnums.eHistoryCommands.M_REMOVE_HISTORY){
|
else if(pCommands == dataEnums.eHistoryCommands.M_REMOVE_HISTORY){
|
||||||
removeHistory((int) p_data.get(0));
|
removeHistory((int) pData.get(0));
|
||||||
}
|
}
|
||||||
else if(p_commands == dataEnums.eHistoryCommands.M_CLEAR_HISTORY){
|
else if(pCommands == dataEnums.eHistoryCommands.M_CLEAR_HISTORY){
|
||||||
clearHistory();
|
clearHistory();
|
||||||
}
|
}
|
||||||
else if(p_commands == dataEnums.eHistoryCommands.M_GET_SUGGESTIONS){
|
else if(pCommands == dataEnums.eHistoryCommands.M_LOAD_MORE_HISTORY){
|
||||||
return getSuggestions((String)p_data.get(0), (ArrayList<historyRowModel>) p_data.get(1));
|
return loadMoreHistory((ArrayList<historyRowModel>) pData.get(0));
|
||||||
}
|
}
|
||||||
else if(p_commands == dataEnums.eHistoryCommands.M_LOAD_MORE_HISTORY){
|
else if(pCommands == dataEnums.eHistoryCommands.M_INITIALIZE_HISTORY){
|
||||||
return loadMoreHistory((ArrayList<historyRowModel>) p_data.get(0));
|
initializeHistory((ArrayList<historyRowModel>) pData.get(0), (int)pData.get(1), (int)pData.get(2));
|
||||||
}
|
}
|
||||||
else if(p_commands == dataEnums.eHistoryCommands.M_INITIALIZE_HISTORY){
|
else if(pCommands == dataEnums.eHistoryCommands.M_HISTORY_SIZE){
|
||||||
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){
|
|
||||||
return mHistory.size();
|
return mHistory.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,12 +31,6 @@ class imageDataModel
|
||||||
mParsedQueues = new HashMap<>();
|
mParsedQueues = new HashMap<>();
|
||||||
mRequestQueue = new ArrayList<>();
|
mRequestQueue = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mBackgroundThread();
|
mBackgroundThread();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,8 @@ public class preferenceDataModel {
|
||||||
private SharedPreferences mPrefs;
|
private SharedPreferences mPrefs;
|
||||||
private SharedPreferences.Editor mEdit;
|
private SharedPreferences.Editor mEdit;
|
||||||
|
|
||||||
public preferenceDataModel(AppCompatActivity app_context){
|
public preferenceDataModel(AppCompatActivity pAppContext){
|
||||||
mPrefs = PreferenceManager.getDefaultSharedPreferences(app_context);
|
mPrefs = PreferenceManager.getDefaultSharedPreferences(pAppContext);
|
||||||
mEdit = mPrefs.edit();
|
mEdit = mPrefs.edit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,61 +22,61 @@ public class preferenceDataModel {
|
||||||
mEdit.apply();
|
mEdit.apply();
|
||||||
}
|
}
|
||||||
|
|
||||||
void setString(String valueKey, String value){
|
void setString(String pValueKey, String pValue){
|
||||||
mEdit.putString(valueKey, value);
|
mEdit.putString(pValueKey, pValue);
|
||||||
mEdit.apply();
|
mEdit.apply();
|
||||||
}
|
}
|
||||||
String getString(String valueKey, String valueDefault){
|
String getString(String pValueKey, String pValueDefault){
|
||||||
return mPrefs.getString(valueKey, valueDefault);
|
return mPrefs.getString(pValueKey, pValueDefault);
|
||||||
}
|
}
|
||||||
void setBool(String valueKey, boolean value){
|
void setBool(String valueKey, boolean value){
|
||||||
mEdit.putBoolean(valueKey, value);
|
mEdit.putBoolean(valueKey, value);
|
||||||
mEdit.apply();
|
mEdit.apply();
|
||||||
}
|
}
|
||||||
boolean getBool(String valueKey, boolean valueDefault){
|
boolean getBool(String pValueKey, boolean pValueDefault){
|
||||||
return mPrefs.getBoolean(valueKey, valueDefault);
|
return mPrefs.getBoolean(pValueKey, pValueDefault);
|
||||||
}
|
}
|
||||||
void setInt(String valueKey, int value){
|
void setInt(String valueKey, int value){
|
||||||
mEdit.putInt(valueKey, value);
|
mEdit.putInt(valueKey, value);
|
||||||
mEdit.apply();
|
mEdit.apply();
|
||||||
}
|
}
|
||||||
int getInt(String valueKey, int valueDefault){
|
int getInt(String pValueKey, int pValueDefault){
|
||||||
return mPrefs.getInt(valueKey, valueDefault);
|
return mPrefs.getInt(pValueKey, pValueDefault);
|
||||||
}
|
}
|
||||||
void setFloat(String valueKey, int value){
|
void setFloat(String pValueKey, int pValue){
|
||||||
mEdit.putInt(valueKey, value);
|
mEdit.putInt(pValueKey, pValue);
|
||||||
mEdit.apply();
|
mEdit.apply();
|
||||||
}
|
}
|
||||||
int getFloat(String valueKey, int valueDefault){
|
int getFloat(String pValueKey, int pValueDefault){
|
||||||
return mPrefs.getInt(valueKey, valueDefault);
|
return mPrefs.getInt(pValueKey, pValueDefault);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object onTrigger(dataEnums.ePreferencesCommands p_commands, List<Object> p_data){
|
public Object onTrigger(dataEnums.ePreferencesCommands pCommands, List<Object> pData){
|
||||||
if(p_commands == dataEnums.ePreferencesCommands.M_GET_BOOL){
|
if(pCommands == dataEnums.ePreferencesCommands.M_GET_BOOL){
|
||||||
return getBool((String)p_data.get(0), (boolean)p_data.get(1));
|
return getBool((String)pData.get(0), (boolean)pData.get(1));
|
||||||
}
|
}
|
||||||
else if(p_commands == dataEnums.ePreferencesCommands.M_GET_INT){
|
else if(pCommands == dataEnums.ePreferencesCommands.M_GET_INT){
|
||||||
return getInt((String)p_data.get(0), (int)p_data.get(1));
|
return getInt((String)pData.get(0), (int)pData.get(1));
|
||||||
}
|
}
|
||||||
else if(p_commands == dataEnums.ePreferencesCommands.M_GET_STRING){
|
else if(pCommands == dataEnums.ePreferencesCommands.M_GET_STRING){
|
||||||
return getString((String)p_data.get(0), (String)p_data.get(1));
|
return getString((String)pData.get(0), (String)pData.get(1));
|
||||||
}
|
}
|
||||||
else if(p_commands == dataEnums.ePreferencesCommands.M_GET_FLOAT){
|
else if(pCommands == dataEnums.ePreferencesCommands.M_GET_FLOAT){
|
||||||
return getFloat((String)p_data.get(0), (int)p_data.get(1));
|
return getFloat((String)pData.get(0), (int)pData.get(1));
|
||||||
}
|
}
|
||||||
else if(p_commands == dataEnums.ePreferencesCommands.M_SET_BOOL){
|
else if(pCommands == dataEnums.ePreferencesCommands.M_SET_BOOL){
|
||||||
setBool((String)p_data.get(0), (boolean)p_data.get(1));
|
setBool((String)pData.get(0), (boolean)pData.get(1));
|
||||||
}
|
}
|
||||||
else if(p_commands == dataEnums.ePreferencesCommands.M_SET_INT){
|
else if(pCommands == dataEnums.ePreferencesCommands.M_SET_INT){
|
||||||
setInt((String)p_data.get(0), (int)p_data.get(1));
|
setInt((String)pData.get(0), (int)pData.get(1));
|
||||||
}
|
}
|
||||||
else if(p_commands == dataEnums.ePreferencesCommands.M_SET_STRING){
|
else if(pCommands == dataEnums.ePreferencesCommands.M_SET_STRING){
|
||||||
setString((String)p_data.get(0), (String)p_data.get(1));
|
setString((String)pData.get(0), (String)pData.get(1));
|
||||||
}
|
}
|
||||||
else if(p_commands == dataEnums.ePreferencesCommands.M_SET_FLOAT){
|
else if(pCommands == dataEnums.ePreferencesCommands.M_SET_FLOAT){
|
||||||
setFloat((String)p_data.get(0), (int)p_data.get(1));
|
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();
|
clearPrefs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -5,7 +5,7 @@ import android.content.ContentValues;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import com.darkweb.genesissearchengine.appManager.databaseManager.databaseController;
|
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 com.darkweb.genesissearchengine.appManager.tabManager.tabRowModel;
|
||||||
import org.mozilla.geckoview.GeckoResult;
|
import org.mozilla.geckoview.GeckoResult;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.homeManager;
|
package com.darkweb.genesissearchengine.helperManager;
|
||||||
|
|
||||||
import android.animation.ValueAnimator;
|
import android.animation.ValueAnimator;
|
||||||
import android.animation.ValueAnimator.AnimatorUpdateListener;
|
import android.animation.ValueAnimator.AnimatorUpdateListener;
|
|
@ -1,6 +1,5 @@
|
||||||
package com.darkweb.genesissearchengine.helperManager;
|
package com.darkweb.genesissearchengine.helperManager;
|
||||||
|
|
||||||
import android.app.Application;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
|
@ -9,7 +8,7 @@ import android.os.Build;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import android.view.ContextThemeWrapper;
|
import android.view.ContextThemeWrapper;
|
||||||
|
|
||||||
import com.darkweb.genesissearchengine.appManager.homeManager.homeController;
|
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
|
||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
|
@ -23,7 +23,7 @@ public class errorHandler
|
||||||
BufferedReader reader = null;
|
BufferedReader reader = null;
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
try {
|
try {
|
||||||
stream = mContext.getResources().getAssets().open("error.html");
|
stream = mContext.getResources().getAssets().open("error/error.html");
|
||||||
reader = new BufferedReader(new InputStreamReader(stream));
|
reader = new BufferedReader(new InputStreamReader(stream));
|
||||||
|
|
||||||
String line;
|
String line;
|
||||||
|
@ -173,7 +173,7 @@ public class errorHandler
|
||||||
BufferedReader reader = null;
|
BufferedReader reader = null;
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
try {
|
try {
|
||||||
stream = mContext.getResources().getAssets().open("error.html");
|
stream = mContext.getResources().getAssets().open("error/error.html");
|
||||||
reader = new BufferedReader(new InputStreamReader(stream));
|
reader = new BufferedReader(new InputStreamReader(stream));
|
||||||
|
|
||||||
String line;
|
String line;
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package com.darkweb.genesissearchengine.helperManager;
|
package com.darkweb.genesissearchengine.helperManager;
|
||||||
|
|
||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
|
import android.animation.Animator;
|
||||||
|
import android.animation.AnimatorListenerAdapter;
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.app.DownloadManager;
|
import android.app.DownloadManager;
|
||||||
import android.content.ClipData;
|
import android.content.ClipData;
|
||||||
|
@ -21,6 +23,7 @@ import android.view.Display;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.view.ViewAnimationUtils;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.animation.Animation;
|
import android.view.animation.Animation;
|
||||||
import android.view.animation.RotateAnimation;
|
import android.view.animation.RotateAnimation;
|
||||||
|
@ -166,13 +169,38 @@ public class helperMethod
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void sendBridgeEmail(Context context){
|
public static void sendBridgeEmail(Context context){
|
||||||
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
|
Intent selectorIntent = new Intent(Intent.ACTION_SENDTO);
|
||||||
String[] aEmailList = { "bridges@torproject.org"};
|
selectorIntent.setData(Uri.parse("mailto:"));
|
||||||
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, aEmailList);
|
|
||||||
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "get transport");
|
final Intent emailIntent = new Intent(Intent.ACTION_SEND);
|
||||||
emailIntent.setType("plain/text");
|
emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[]{"bridges@torproject.org"});
|
||||||
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "get transport");
|
emailIntent.putExtra(Intent.EXTRA_SUBJECT, "get bridges");
|
||||||
context.startActivity(emailIntent);
|
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) {
|
public static void hideKeyboard(AppCompatActivity context) {
|
||||||
|
|
|
@ -19,12 +19,15 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
import com.darkweb.genesissearchengine.constants.constants;
|
||||||
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
import com.darkweb.genesissearchengine.constants.strings;
|
import com.darkweb.genesissearchengine.constants.strings;
|
||||||
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
import com.darkweb.genesissearchengine.helperManager.eventObserver;
|
||||||
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
import com.darkweb.genesissearchengine.helperManager.helperMethod;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
import com.google.android.material.switchmaterial.SwitchMaterial;
|
import com.google.android.material.switchmaterial.SwitchMaterial;
|
||||||
|
|
||||||
|
import org.mozilla.geckoview.ContentBlocking;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -182,7 +185,7 @@ class messageManager
|
||||||
}else {
|
}else {
|
||||||
((SwitchMaterial) mDialog.findViewById(R.id.pDTStatus)).setChecked(false);
|
((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);
|
((SwitchMaterial) mDialog.findViewById(R.id.pTPStatus)).setChecked(true);
|
||||||
}else {
|
}else {
|
||||||
((SwitchMaterial) mDialog.findViewById(R.id.pTPStatus)).setChecked(false);
|
((SwitchMaterial) mDialog.findViewById(R.id.pTPStatus)).setChecked(false);
|
||||||
|
@ -216,7 +219,45 @@ class messageManager
|
||||||
mDialog.dismiss();
|
mDialog.dismiss();
|
||||||
mContext.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
mContext.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||||
helperMethod.hideKeyboard(mContext);
|
helperMethod.hideKeyboard(mContext);
|
||||||
mEvent.invokeObserver(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*/
|
/*VERIFIED*/
|
||||||
openSecureConnectionPopup();
|
openSecureConnectionPopup();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case M_UPDATE_BRIDGES:
|
||||||
|
/*VERIFIED*/
|
||||||
|
onUpdateBridges();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,14 +31,15 @@ class orbotManager
|
||||||
|
|
||||||
public void initialize(AppCompatActivity pAppContext, eventObserver.eventListener pEvent, int pNotificationStatus){
|
public void initialize(AppCompatActivity pAppContext, eventObserver.eventListener pEvent, int pNotificationStatus){
|
||||||
this.mAppContext = pAppContext;
|
this.mAppContext = pAppContext;
|
||||||
|
|
||||||
onInitNotificationStatus(pNotificationStatus);
|
onInitNotificationStatus(pNotificationStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onStartOrbot(){
|
private void onStartOrbot(){
|
||||||
orbotLocalConstants.mBridges = status.sBridgeCustomBridge;
|
orbotLocalConstants.mBridges = status.sBridgeCustomBridge;
|
||||||
orbotLocalConstants.mIsManualBridge = status.sBridgeGatewayManual;
|
orbotLocalConstants.mIsManualBridge = status.sBridgeGatewayManual;
|
||||||
Prefs.putBridgesEnabled(status.sBridgeGatewayManual |status.sBridgeGatewayAuto);
|
Prefs.putBridgesEnabled(status.sBridgeStatus);
|
||||||
Intent mServiceIntent = new Intent(mAppContext, OrbotService.class);
|
Intent mServiceIntent = new Intent(mAppContext.getApplicationContext(), OrbotService.class);
|
||||||
mServiceIntent.setAction(ACTION_START);
|
mServiceIntent.setAction(ACTION_START);
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
mAppContext.startForegroundService(mServiceIntent);
|
mAppContext.startForegroundService(mServiceIntent);
|
||||||
|
|
|
@ -2,7 +2,7 @@ package com.darkweb.genesissearchengine.pluginManager;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
import com.darkweb.genesissearchengine.appManager.activityContextManager;
|
||||||
import com.darkweb.genesissearchengine.appManager.homeManager.homeController;
|
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
|
||||||
import com.darkweb.genesissearchengine.appManager.settingManager.privacyManager.settingPrivacyController;
|
import com.darkweb.genesissearchengine.appManager.settingManager.privacyManager.settingPrivacyController;
|
||||||
import com.darkweb.genesissearchengine.constants.constants;
|
import com.darkweb.genesissearchengine.constants.constants;
|
||||||
import com.darkweb.genesissearchengine.constants.enums;
|
import com.darkweb.genesissearchengine.constants.enums;
|
||||||
|
@ -227,6 +227,12 @@ public class pluginController
|
||||||
mHomeController.initTab(true);
|
mHomeController.initTab(true);
|
||||||
activityContextManager.getInstance().getTabController().finish();
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,10 +28,10 @@ public class pluginEnums
|
||||||
|
|
||||||
/*Message Manager*/
|
/*Message Manager*/
|
||||||
public enum eMessageManager{
|
public enum eMessageManager{
|
||||||
M_RESET, M_DATA_CLEARED, M_SECURE_CONNECTION, M_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{
|
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*/
|
/*Notification Manager*/
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:startOffset="200">
|
android:startOffset="0">
|
||||||
<alpha
|
<alpha
|
||||||
android:duration="200"
|
android:duration="200"
|
||||||
android:fromAlpha="0.0"
|
android:fromAlpha="0.0"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:state_pressed="true"
|
<item android:state_pressed="true"
|
||||||
android:top="60dp">
|
android:top="160dp">
|
||||||
<shape
|
<shape
|
||||||
android:shape="rectangle" android:padding="15dp" >
|
android:shape="rectangle" android:padding="15dp" >
|
||||||
<!-- you can use any color you want I used here gray color-->
|
<!-- you can use any color you want I used here gray color-->
|
||||||
|
@ -10,6 +10,7 @@
|
||||||
<corners android:radius="4dp"/>
|
<corners android:radius="4dp"/>
|
||||||
<stroke
|
<stroke
|
||||||
android:width="2dp"
|
android:width="2dp"
|
||||||
|
android:top="160dp"
|
||||||
android:color="@color/c_tab_border" />
|
android:color="@color/c_tab_border" />
|
||||||
<corners android:radius="4dp" />
|
<corners android:radius="4dp" />
|
||||||
</shape>
|
</shape>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
<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">
|
<item android:id="@android:id/mask">
|
||||||
<shape android:shape="rectangle">
|
<shape android:shape="rectangle">
|
||||||
<solid android:color="@color/button_gray" />
|
<solid android:color="@color/button_gray" />
|
||||||
|
|
|
@ -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>
|
|
@ -12,8 +12,8 @@
|
||||||
<shape android:shape="rectangle">
|
<shape android:shape="rectangle">
|
||||||
<gradient
|
<gradient
|
||||||
android:angle="90"
|
android:angle="90"
|
||||||
android:endColor="@color/c_button_background"
|
android:endColor="@color/c_long_button"
|
||||||
android:startColor="@color/c_button_background"
|
android:startColor="@color/c_long_button"
|
||||||
android:type="linear" />
|
android:type="linear" />
|
||||||
<corners android:radius="5.5dp" />
|
<corners android:radius="5.5dp" />
|
||||||
</shape>
|
</shape>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
<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"
|
<stroke android:width="0dp"
|
||||||
android:color="@color/c_background"/>
|
android:color="@color/c_background_alpha"/>
|
||||||
|
|
||||||
<corners android:radius="5dp" />
|
<corners android:radius="5dp" />
|
||||||
</shape>
|
</shape>
|
||||||
|
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 52 KiB |
|
@ -53,10 +53,10 @@
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:layout_marginTop="14dp"
|
android:layout_marginTop="14dp"
|
||||||
android:background="@color/c_view_divier_background"
|
android:background="@color/c_view_divier_background"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/pBookmark" />
|
app:layout_constraintTop_toBottomOf="@+id/pBridgeInput" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/pBookmark"
|
android:id="@+id/pBridgeInput"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:layout_marginTop="14dp"
|
android:layout_marginTop="14dp"
|
||||||
android:background="@color/c_view_divier_background"
|
android:background="@color/c_view_divier_background"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/pBookmark" />
|
app:layout_constraintTop_toBottomOf="@+id/pBridgeInput" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/pNavigationContainer"
|
android:id="@+id/pNavigationContainer"
|
||||||
|
|
|
@ -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>
|
|
@ -366,8 +366,13 @@
|
||||||
android:id="@+id/pCustomPort"
|
android:id="@+id/pCustomPort"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_weight="11"
|
android:layout_weight="11"
|
||||||
|
android:clickable="false"
|
||||||
|
android:onClick="onOpenCustomBridgeUpdater"
|
||||||
android:layout_height="45dp"
|
android:layout_height="45dp"
|
||||||
|
android:focusable="false"
|
||||||
android:paddingLeft="15dp"
|
android:paddingLeft="15dp"
|
||||||
|
android:cursorVisible="false"
|
||||||
|
android:singleLine="true"
|
||||||
android:paddingRight="15dp"
|
android:paddingRight="15dp"
|
||||||
android:layout_marginStart="15dp"
|
android:layout_marginStart="15dp"
|
||||||
android:ems="10"
|
android:ems="10"
|
||||||
|
@ -375,8 +380,8 @@
|
||||||
android:hint="@string/BRIDGE_PORT_HINT"
|
android:hint="@string/BRIDGE_PORT_HINT"
|
||||||
android:textSize="14.5sp"
|
android:textSize="14.5sp"
|
||||||
android:text=""
|
android:text=""
|
||||||
android:autofillHints=""
|
android:inputType="none"
|
||||||
android:inputType="text" />
|
android:autofillHints=""/>
|
||||||
<Button
|
<Button
|
||||||
android:layout_marginTop="-1dp"
|
android:layout_marginTop="-1dp"
|
||||||
android:id="@+id/pBridgeButton"
|
android:id="@+id/pBridgeButton"
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/c_background_keyboard"
|
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
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
|
@ -82,12 +82,13 @@
|
||||||
app:tint="@color/c_lock_tint"
|
app:tint="@color/c_lock_tint"
|
||||||
tools:ignore="RtlSymmetry" />
|
tools:ignore="RtlSymmetry" />
|
||||||
|
|
||||||
<com.darkweb.genesissearchengine.appManager.homeManager.editTextManager
|
<com.darkweb.genesissearchengine.appManager.homeManager.homeController.editTextManager
|
||||||
android:id="@+id/pSearchInput"
|
android:id="@+id/pSearchInput"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginStart="-36dp"
|
android:layout_marginStart="-36dp"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
|
android:focusableInTouchMode = "true"
|
||||||
android:layout_marginEnd="18dp"
|
android:layout_marginEnd="18dp"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
@ -114,7 +115,7 @@
|
||||||
app:hintAnimationEnabled="false"
|
app:hintAnimationEnabled="false"
|
||||||
tools:targetApi="o">
|
tools:targetApi="o">
|
||||||
|
|
||||||
</com.darkweb.genesissearchengine.appManager.homeManager.editTextManager>
|
</com.darkweb.genesissearchengine.appManager.homeManager.homeController.editTextManager>
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/pVoiceInput"
|
android:id="@+id/pVoiceInput"
|
||||||
|
@ -135,15 +136,17 @@
|
||||||
android:tint="@color/c_navigation_tint"
|
android:tint="@color/c_navigation_tint"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<LinearLayout
|
<FrameLayout
|
||||||
android:id="@+id/pTabCounterContainer"
|
android:id="@+id/pTabCounterContainer"
|
||||||
android:layout_width="40dp"
|
android:layout_width="40dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
android:layout_marginStart="-10dp"
|
android:layout_marginStart="-10dp"
|
||||||
|
android:onClick="onOpenTabViewBoundary"
|
||||||
android:gravity="left">
|
android:gravity="left">
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:onClick="onOpenTabViewBoundary"
|
|
||||||
android:id="@+id/pTabCounter"
|
android:id="@+id/pTabCounter"
|
||||||
android:layout_width="22dp"
|
android:layout_width="22dp"
|
||||||
android:layout_height="22dp"
|
android:layout_height="22dp"
|
||||||
|
@ -153,14 +156,15 @@
|
||||||
android:layout_marginEnd="13dp"
|
android:layout_marginEnd="13dp"
|
||||||
android:layout_marginBottom="0dp"
|
android:layout_marginBottom="0dp"
|
||||||
android:background="@xml/gx_generic_tab_button"
|
android:background="@xml/gx_generic_tab_button"
|
||||||
android:clickable="true"
|
android:clickable="false"
|
||||||
|
android:focusable="false"
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:text="@string/HOME_TAB_TEXT"
|
android:text="@string/HOME_TAB_TEXT"
|
||||||
android:textColor="@color/c_text_v1"
|
android:textColor="@color/c_text_v1"
|
||||||
android:textSize="12.5sp"
|
android:textSize="12.5sp"
|
||||||
android:tint="@color/black" />
|
android:tint="@color/black" />
|
||||||
</LinearLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/pMenu"
|
android:id="@+id/pMenu"
|
||||||
|
@ -205,7 +209,7 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginBottom="0dp"
|
android:layout_marginBottom="0dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:background="@color/blue"
|
android:background="@color/c_background"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/pTopLayout">
|
app:layout_constraintTop_toBottomOf="@+id/pTopLayout">
|
||||||
|
|
||||||
|
@ -226,7 +230,7 @@
|
||||||
app:wrapShiftDrawable="true"
|
app:wrapShiftDrawable="true"
|
||||||
tools:progress="0" />
|
tools:progress="0" />
|
||||||
|
|
||||||
<com.darkweb.genesissearchengine.appManager.homeManager.NestedGeckoView
|
<com.darkweb.genesissearchengine.appManager.homeManager.geckoManager.NestedGeckoView
|
||||||
android:id="@+id/pWebView"
|
android:id="@+id/pWebView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -235,63 +239,329 @@
|
||||||
android:alpha="1"
|
android:alpha="1"
|
||||||
android:background="@color/clear_alpha">
|
android:background="@color/clear_alpha">
|
||||||
|
|
||||||
</com.darkweb.genesissearchengine.appManager.homeManager.NestedGeckoView>
|
</com.darkweb.genesissearchengine.appManager.homeManager.geckoManager.NestedGeckoView>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/pSplashLayout"
|
android:id="@+id/pSplashLayout"
|
||||||
|
android:visibility="visible"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:animateLayoutChanges="true"
|
android:animateLayoutChanges="true"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/pSplashScreen"
|
android:id="@+id/pSplashScreen"
|
||||||
android:clickable="true"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/landing_ease_blue_splash"
|
|
||||||
android:animateLayoutChanges="true"
|
android:animateLayoutChanges="true"
|
||||||
|
android:background="@color/landing_ease_blue_splash"
|
||||||
|
android:clickable="true"
|
||||||
android:focusable="true">
|
android:focusable="true">
|
||||||
|
|
||||||
<ImageView
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/pTopImage"
|
android:id="@+id/pInfoPortrait"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginTop="35dp"
|
android:visibility="visible"
|
||||||
android:adjustViewBounds="true"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:background="@color/white"
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
|
||||||
android:scaleX="1.4"
|
<ImageView
|
||||||
android:scaleY="1.4"
|
android:id="@+id/pTopImage"
|
||||||
android:src="@drawable/wall2"
|
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_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/pImageDivider"
|
android:id="@+id/pGenesisLogoBottom"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="90dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="90dp"
|
||||||
android:layout_marginTop="103dp"
|
android:layout_marginStart="7dp"
|
||||||
android:adjustViewBounds="true"
|
android:layout_marginTop="15dp"
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
android:src="@drawable/glide"
|
android:translationZ="3dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="@+id/pTopImage" />
|
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:id="@+id/Connect"
|
||||||
android:layout_width="120dp"
|
android:layout_width="120dp"
|
||||||
android:layout_height="51dp"
|
android:layout_height="51dp"
|
||||||
android:layout_marginStart="20dp"
|
android:layout_marginStart="23dp"
|
||||||
android:layout_marginBottom="20dp"
|
android:layout_marginBottom="23dp"
|
||||||
android:background="@xml/hox_rounded_corner_splash"
|
android:background="@xml/hox_rounded_corner_splash_no_ripple"
|
||||||
android:onClick="onStartApplication"
|
android:onClick="onStartApplication"
|
||||||
android:text="@string/HOME_CONNECT"
|
android:text="@string/HOME_CONNECT"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/pDivider1"
|
app:layout_constraintBottom_toTopOf="@+id/pCopyright"
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
@ -299,8 +569,8 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="3dp"
|
android:layout_height="3dp"
|
||||||
android:alpha="0.5"
|
android:alpha="0.5"
|
||||||
android:elevation="4dp"
|
|
||||||
android:background="#264d73"
|
android:background="#264d73"
|
||||||
|
android:elevation="4dp"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/pCopyright"
|
app:layout_constraintBottom_toTopOf="@+id/pCopyright"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
@ -395,6 +665,7 @@
|
||||||
android:layout_marginTop="14dp"
|
android:layout_marginTop="14dp"
|
||||||
android:layout_marginBottom="13dp"
|
android:layout_marginBottom="13dp"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
|
android:background="@color/clear_alpha"
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
android:focusable="false"
|
android:focusable="false"
|
||||||
android:translationZ="3dp"
|
android:translationZ="3dp"
|
||||||
|
@ -403,166 +674,6 @@
|
||||||
app:layout_constraintStart_toStartOf="@+id/Connect"
|
app:layout_constraintStart_toStartOf="@+id/Connect"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/pOrbotLogs" />
|
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>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
@ -616,7 +727,7 @@
|
||||||
|
|
||||||
<include
|
<include
|
||||||
android:id="@+id/pSearchEngineBar"
|
android:id="@+id/pSearchEngineBar"
|
||||||
layout="@layout/popup_search_engine"
|
layout="@layout/popup_search_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginTop="59dp"
|
android:layout_marginTop="59dp"
|
|
@ -12,7 +12,7 @@
|
||||||
android:layout_marginStart="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_marginEnd="5dp"
|
android:layout_marginEnd="5dp"
|
||||||
android:layout_marginBottom="60dp"
|
android:layout_marginBottom="20dp"
|
||||||
android:background="@xml/gx_side_menu"
|
android:background="@xml/gx_side_menu"
|
||||||
android:elevation="4dp"
|
android:elevation="4dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
@ -30,8 +30,8 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="238dp"
|
android:layout_width="238dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="1dp"
|
|
||||||
android:layout_marginStart="1dp"
|
android:layout_marginStart="1dp"
|
||||||
|
android:layout_marginTop="1dp"
|
||||||
android:background="@color/c_ripple_v3"
|
android:background="@color/c_ripple_v3"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
@ -102,46 +102,46 @@
|
||||||
android:layout_marginTop="0dp"
|
android:layout_marginTop="0dp"
|
||||||
android:layout_marginRight="1dp"
|
android:layout_marginRight="1dp"
|
||||||
android:background="@xml/gx_side_item"
|
android:background="@xml/gx_side_item"
|
||||||
android:onClick="onMenuItemInvoked"
|
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
android:onClick="onMenuItemInvoked"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
android:src="@xml/ic_baseline_new_tab"
|
android:src="@xml/ic_baseline_new_tab"
|
||||||
app:tint="@color/c_navigation_medium"
|
app:tint="@color/c_navigation_medium" />
|
||||||
android:contentDescription="@string/GENERAL_TODO" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_weight="1"
|
||||||
android:gravity="left|center_vertical"
|
android:gravity="left|center_vertical"
|
||||||
android:paddingStart="3dp"
|
android:paddingStart="3dp"
|
||||||
android:text="@string/HOME_MENU__NEW_TABS"
|
android:text="@string/HOME_MENU__NEW_TABS"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textColor="@color/c_text_home_menu"
|
android:textColor="@color/c_text_home_menu"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/menu12"
|
android:id="@+id/menu12"
|
||||||
android:background="@xml/gx_side_item"
|
|
||||||
android:onClick="onMenuItemInvoked"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="52dp"
|
android:layout_height="52dp"
|
||||||
android:layout_marginLeft="1dp"
|
android:layout_marginLeft="1dp"
|
||||||
android:layout_marginTop="1dp"
|
android:layout_marginTop="1dp"
|
||||||
android:layout_marginRight="1dp"
|
android:layout_marginRight="1dp"
|
||||||
|
android:background="@xml/gx_side_item"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
android:onClick="onMenuItemInvoked"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
@ -149,37 +149,37 @@
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/markerTab"
|
android:id="@+id/markerTab"
|
||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
android:src="@xml/ic_baseline_vpn"
|
android:src="@xml/ic_baseline_vpn"
|
||||||
app:tint="@color/c_navigation_medium"
|
app:tint="@color/c_navigation_medium" />
|
||||||
android:contentDescription="@string/GENERAL_TODO" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_weight="1"
|
||||||
android:gravity="left|center_vertical"
|
android:gravity="left|center_vertical"
|
||||||
android:paddingStart="3dp"
|
android:paddingStart="3dp"
|
||||||
android:text="@string/HOME_MENU__ORBOT_LOGS"
|
android:text="@string/HOME_MENU__ORBOT_LOGS"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textColor="@color/c_text_home_menu"
|
android:textColor="@color/c_text_home_menu"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/pMenuOpenNewTab"
|
android:id="@+id/pMenuOpenNewTab"
|
||||||
android:onClick="onMenuItemInvoked"
|
|
||||||
android:background="@xml/gx_side_item"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="52dp"
|
android:layout_height="52dp"
|
||||||
android:layout_marginLeft="1dp"
|
android:layout_marginLeft="1dp"
|
||||||
android:layout_marginTop="1dp"
|
android:layout_marginTop="1dp"
|
||||||
android:layout_marginRight="1dp"
|
android:layout_marginRight="1dp"
|
||||||
|
android:background="@xml/gx_side_item"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
android:onClick="onMenuItemInvoked"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
@ -187,17 +187,17 @@
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:src="@xml/ic_baseline_bookmark_menu"
|
|
||||||
app:tint="@color/c_navigation_medium"
|
|
||||||
android:layout_marginStart="16dp"
|
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
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:gravity="left|center_vertical"
|
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="left|center_vertical"
|
||||||
android:paddingStart="3dp"
|
android:paddingStart="3dp"
|
||||||
android:text="@string/HOME_MENU_OPEN_BOOKMARK"
|
android:text="@string/HOME_MENU_OPEN_BOOKMARK"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
|
@ -208,35 +208,36 @@
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/menu7"
|
android:id="@+id/menu7"
|
||||||
android:background="@xml/gx_side_item"
|
|
||||||
android:onClick="onMenuItemInvoked"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="52dp"
|
android:layout_height="52dp"
|
||||||
android:layout_marginLeft="1dp"
|
android:layout_marginLeft="1dp"
|
||||||
android:layout_marginTop="1dp"
|
android:layout_marginTop="1dp"
|
||||||
android:layout_marginRight="1dp"
|
android:layout_marginRight="1dp"
|
||||||
|
android:background="@xml/gx_side_item"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
android:onClick="onMenuItemInvoked"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="20dp" android:layout_height="match_parent"
|
android:layout_width="20dp"
|
||||||
android:src="@xml/ic_baseline_history"
|
android:layout_height="match_parent"
|
||||||
app:tint="@color/c_navigation_medium"
|
|
||||||
android:layout_marginStart="16dp"
|
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
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_weight="1"
|
||||||
android:gravity="left|center_vertical"
|
android:gravity="left|center_vertical"
|
||||||
android:paddingStart="3dp"
|
android:paddingStart="3dp"
|
||||||
android:text="@string/HOME_MENU_HISTORY"
|
android:text="@string/HOME_MENU_HISTORY"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:textColor="@color/c_text_home_menu"
|
android:textColor="@color/c_text_home_menu"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||||
|
@ -244,15 +245,15 @@
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/menu8"
|
android:id="@+id/menu8"
|
||||||
android:background="@xml/gx_side_item"
|
|
||||||
android:onClick="onMenuItemInvoked"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="52dp"
|
android:layout_height="52dp"
|
||||||
android:layout_marginLeft="1dp"
|
android:layout_marginLeft="1dp"
|
||||||
android:layout_marginTop="1dp"
|
android:layout_marginTop="1dp"
|
||||||
android:layout_marginRight="1dp"
|
android:layout_marginRight="1dp"
|
||||||
|
android:background="@xml/gx_side_item"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
android:onClick="onMenuItemInvoked"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
@ -260,36 +261,36 @@
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:src="@xml/ic_arrow_down"
|
|
||||||
app:tint="@color/c_navigation_medium"
|
|
||||||
android:layout_marginStart="16dp"
|
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
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_weight="1"
|
||||||
android:gravity="left|center_vertical"
|
android:gravity="left|center_vertical"
|
||||||
android:paddingStart="3dp"
|
android:paddingStart="3dp"
|
||||||
android:text="@string/HOME_MENU_DOWNLOAD"
|
android:text="@string/HOME_MENU_DOWNLOAD"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textColor="@color/c_text_home_menu"
|
android:textColor="@color/c_text_home_menu"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/menu25"
|
android:id="@+id/menu25"
|
||||||
android:background="@xml/gx_side_item"
|
|
||||||
android:onClick="onMenuItemInvoked"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="52dp"
|
android:layout_height="52dp"
|
||||||
android:layout_marginLeft="1dp"
|
android:layout_marginLeft="1dp"
|
||||||
android:layout_marginTop="1dp"
|
android:layout_marginTop="1dp"
|
||||||
android:layout_marginRight="1dp"
|
android:layout_marginRight="1dp"
|
||||||
|
android:background="@xml/gx_side_item"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
android:onClick="onMenuItemInvoked"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
@ -297,59 +298,59 @@
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:src="@xml/ic_baseline_language"
|
|
||||||
app:tint="@color/c_navigation_medium"
|
|
||||||
android:layout_marginStart="16dp"
|
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
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_weight="1"
|
||||||
android:gravity="left|center_vertical"
|
android:gravity="left|center_vertical"
|
||||||
android:paddingStart="3dp"
|
android:paddingStart="3dp"
|
||||||
android:text="@string/HOME_MENU_LANGUAGE"
|
android:text="@string/HOME_MENU_LANGUAGE"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textColor="@color/c_text_home_menu"
|
android:textColor="@color/c_text_home_menu"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/pMenuFind"
|
android:id="@+id/pMenuFind"
|
||||||
android:background="@xml/gx_side_item"
|
|
||||||
android:onClick="onMenuItemInvoked"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="52dp"
|
android:layout_height="52dp"
|
||||||
android:layout_marginLeft="1dp"
|
android:layout_marginLeft="1dp"
|
||||||
android:layout_marginTop="1dp"
|
android:layout_marginTop="1dp"
|
||||||
android:layout_marginRight="1dp"
|
android:layout_marginRight="1dp"
|
||||||
|
android:background="@xml/gx_side_item"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
android:onClick="onMenuItemInvoked"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
android:src="@xml/ic_baseline_find"
|
android:src="@xml/ic_baseline_find"
|
||||||
app:tint="@color/c_navigation_medium"
|
app:tint="@color/c_navigation_medium" />
|
||||||
android:contentDescription="@string/GENERAL_TODO" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_weight="1"
|
||||||
android:gravity="left|center_vertical"
|
android:gravity="left|center_vertical"
|
||||||
android:paddingStart="3dp"
|
android:paddingStart="3dp"
|
||||||
android:text="@string/HOME_MENU_FIND"
|
android:text="@string/HOME_MENU_FIND"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textColor="@color/c_text_home_menu"
|
android:textColor="@color/c_text_home_menu"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -357,7 +358,6 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/menu26"
|
android:id="@+id/menu26"
|
||||||
android:layout_width="239dp"
|
android:layout_width="239dp"
|
||||||
android:paddingRight="10dp"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="1dp"
|
android:layout_marginLeft="1dp"
|
||||||
android:layout_marginTop="1dp"
|
android:layout_marginTop="1dp"
|
||||||
|
@ -367,22 +367,24 @@
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:onClick="onMenuItemInvoked"
|
android:onClick="onMenuItemInvoked"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
|
android:paddingRight="10dp"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
android:src="@xml/ic_baseline_desktop"
|
android:src="@xml/ic_baseline_desktop"
|
||||||
app:tint="@color/c_navigation_medium"
|
app:tint="@color/c_navigation_medium" />
|
||||||
android:contentDescription="@string/GENERAL_TODO" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/menu28"
|
android:id="@+id/menu28"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
android:layout_weight="4"
|
android:layout_weight="4"
|
||||||
android:background="@color/clear_alpha"
|
android:background="@color/clear_alpha"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
|
@ -393,7 +395,6 @@
|
||||||
android:text="@string/HOME_MENU_DESKTOP"
|
android:text="@string/HOME_MENU_DESKTOP"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textColor="@color/c_text_home_menu"
|
android:textColor="@color/c_text_home_menu"
|
||||||
android:layout_marginStart="4dp"
|
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||||
|
|
||||||
|
@ -416,75 +417,75 @@
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/menu6"
|
android:id="@+id/menu6"
|
||||||
android:background="@xml/gx_side_item"
|
|
||||||
android:onClick="onMenuItemInvoked"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="52dp"
|
android:layout_height="52dp"
|
||||||
android:layout_marginLeft="1dp"
|
android:layout_marginLeft="1dp"
|
||||||
android:layout_marginTop="1dp"
|
android:layout_marginTop="1dp"
|
||||||
android:layout_marginRight="1dp"
|
android:layout_marginRight="1dp"
|
||||||
|
android:background="@xml/gx_side_item"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
android:onClick="onMenuItemInvoked"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
android:src="@xml/ic_baseline_setting"
|
android:src="@xml/ic_baseline_setting"
|
||||||
app:tint="@color/c_navigation_medium"
|
app:tint="@color/c_navigation_medium" />
|
||||||
android:contentDescription="@string/GENERAL_TODO" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_weight="1"
|
||||||
android:gravity="left|center_vertical"
|
android:gravity="left|center_vertical"
|
||||||
android:paddingStart="3dp"
|
android:paddingStart="3dp"
|
||||||
android:text="@string/HOME_MENU_SETTING"
|
android:text="@string/HOME_MENU_SETTING"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textColor="@color/c_text_home_menu"
|
android:textColor="@color/c_text_home_menu"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/pMenuQuit"
|
android:id="@+id/pMenuQuit"
|
||||||
android:background="@xml/gx_ripple_gray_bottom"
|
|
||||||
android:onClick="onMenuItemInvoked"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="52dp"
|
android:layout_height="52dp"
|
||||||
android:layout_marginLeft="1dp"
|
android:layout_marginLeft="1dp"
|
||||||
android:layout_marginTop="1dp"
|
android:layout_marginTop="1dp"
|
||||||
android:layout_marginRight="1dp"
|
android:layout_marginRight="1dp"
|
||||||
|
android:background="@xml/gx_ripple_gray_bottom"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
android:onClick="onMenuItemInvoked"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="20dp"
|
android:layout_width="20dp"
|
||||||
android:layout_marginStart="16dp"
|
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:src="@xml/ic_baseline_quit"
|
android:layout_marginStart="16dp"
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
|
android:src="@xml/ic_baseline_quit"
|
||||||
app:tint="@color/c_navigation_medium" />
|
app:tint="@color/c_navigation_medium" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginStart="10dp"
|
||||||
|
android:layout_weight="1"
|
||||||
android:gravity="left|center_vertical"
|
android:gravity="left|center_vertical"
|
||||||
android:paddingStart="3dp"
|
android:paddingStart="3dp"
|
||||||
android:text="@string/HOME_MENU_QUIT"
|
android:text="@string/HOME_MENU_QUIT"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textColor="@color/c_text_home_menu"
|
android:textColor="@color/c_text_home_menu"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -130,7 +130,8 @@
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:paddingStart="10dp"
|
android:paddingStart="10dp"
|
||||||
android:paddingTop="5dp"
|
android:paddingTop="5dp"
|
||||||
android:paddingBottom="5dp"
|
android:layout_marginBottom="25dp"
|
||||||
|
android:paddingBottom="25dp"
|
||||||
android:textColor="@color/c_text_v4"
|
android:textColor="@color/c_text_v4"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
@ -141,7 +142,6 @@
|
||||||
android:id="@+id/pLogRecycleView"
|
android:id="@+id/pLogRecycleView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layoutAnimation="@anim/log_layout_controller"
|
|
||||||
android:nestedScrollingEnabled="false"/>
|
android:nestedScrollingEnabled="false"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -155,12 +155,12 @@
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
android:onClick="onScrollTop"
|
android:onClick="onScrollBottom"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:tint="@color/white"
|
android:tint="@color/white"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="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:focusable="true"
|
||||||
android:contentDescription="@string/GENERAL_TODO" />
|
android:contentDescription="@string/GENERAL_TODO" />
|
||||||
|
|
||||||
|
|
|
@ -105,10 +105,9 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:background="@color/clear_alpha"
|
android:background="@color/clear_alpha"
|
||||||
android:layout_marginBottom="0dp"
|
|
||||||
android:layout_marginEnd = "20dp"
|
android:layout_marginEnd = "20dp"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_height="65dp">
|
android:layout_height="wrap_content">
|
||||||
<TextView
|
<TextView
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
@ -121,20 +120,25 @@
|
||||||
/>
|
/>
|
||||||
</LinearLayout>
|
</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
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:layout_marginBottom="5dp"
|
android:layout_marginBottom="5dp"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
<TextView
|
<TextView
|
||||||
android:textSize="14sp"
|
android:textColor="@color/c_text_v7"
|
||||||
|
android:textSize="13.5sp"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="50dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
android:layout_weight="40"
|
android:layout_weight="40"
|
||||||
android:textColor="@color/c_text_v1"
|
|
||||||
android:background="@xml/sx_border_left"
|
|
||||||
android:paddingStart="15dp"
|
|
||||||
android:padding="10dp"
|
android:padding="10dp"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
|
@ -148,7 +152,6 @@
|
||||||
android:layout_marginEnd = "0dp"
|
android:layout_marginEnd = "0dp"
|
||||||
android:paddingEnd="0dp"
|
android:paddingEnd="0dp"
|
||||||
android:layout_marginBottom="0dp"
|
android:layout_marginBottom="0dp"
|
||||||
android:paddingTop="14dp"
|
|
||||||
android:paddingBottom="14dp"
|
android:paddingBottom="14dp"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -162,7 +165,7 @@
|
||||||
android:paddingEnd="15dp"
|
android:paddingEnd="15dp"
|
||||||
android:text="@string/ORBOT_PROXY_STATUS_INFO"
|
android:text="@string/ORBOT_PROXY_STATUS_INFO"
|
||||||
android:textColor="@color/c_text_v6"
|
android:textColor="@color/c_text_v6"
|
||||||
android:textSize="14sp" />
|
android:textSize="13.5sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/pOrbotStatus"
|
android:id="@+id/pOrbotStatus"
|
||||||
|
@ -179,20 +182,25 @@
|
||||||
tools:ignore="UseSwitchCompatOrMaterialXml" />
|
tools:ignore="UseSwitchCompatOrMaterialXml" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginStart="15dp"
|
||||||
|
android:background="@color/c_view_divier_background" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:layout_marginBottom="5dp"
|
android:layout_marginBottom="5dp"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:textSize="14sp"
|
android:textColor="@color/c_text_v7"
|
||||||
|
android:textSize="13.5sp"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="50dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
android:layout_weight="40"
|
android:layout_weight="40"
|
||||||
android:textColor="@color/c_text_v1"
|
|
||||||
android:background="@xml/sx_border_left"
|
|
||||||
android:paddingStart="15dp"
|
|
||||||
android:padding="10dp"
|
android:padding="10dp"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
|
@ -207,13 +215,12 @@
|
||||||
android:layout_marginEnd = "0dp"
|
android:layout_marginEnd = "0dp"
|
||||||
android:paddingEnd="0dp"
|
android:paddingEnd="0dp"
|
||||||
android:layout_marginBottom="0dp"
|
android:layout_marginBottom="0dp"
|
||||||
android:paddingTop="14dp"
|
|
||||||
android:paddingBottom="14dp"
|
android:paddingBottom="14dp"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
tools:ignore="RtlSymmetry">
|
tools:ignore="RtlSymmetry">
|
||||||
<TextView
|
<TextView
|
||||||
android:textSize="14sp"
|
android:textSize="13.5sp"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
@ -240,13 +247,12 @@
|
||||||
android:layout_marginEnd = "0dp"
|
android:layout_marginEnd = "0dp"
|
||||||
android:paddingEnd="0dp"
|
android:paddingEnd="0dp"
|
||||||
android:layout_marginBottom="0dp"
|
android:layout_marginBottom="0dp"
|
||||||
android:paddingTop="14dp"
|
|
||||||
android:paddingBottom="14dp"
|
android:paddingBottom="14dp"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
tools:ignore="RtlSymmetry">
|
tools:ignore="RtlSymmetry">
|
||||||
<TextView
|
<TextView
|
||||||
android:textSize="14sp"
|
android:textSize="13.5sp"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
@ -280,8 +286,8 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/PROXY_SUB_HEADER3"
|
android:text="@string/PROXY_SUB_HEADER3"
|
||||||
android:textColor="@color/c_text_setting_heading"
|
android:textColor="@color/c_text_v7"
|
||||||
android:textSize="14sp"
|
android:textSize="13.5sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -290,7 +296,7 @@
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:textColor="@color/c_text_v6"
|
android:textColor="@color/c_text_v6"
|
||||||
android:text="@string/PROXY_CONNECTIVITY_SETTING_INFO"
|
android:text="@string/PROXY_CONNECTIVITY_SETTING_INFO"
|
||||||
android:textSize="14sp" />
|
android:textSize="13.5sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -349,6 +349,79 @@
|
||||||
|
|
||||||
</LinearLayout>
|
</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
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
|
@ -585,7 +658,7 @@
|
||||||
android:background="@color/c_view_divier_background"/>
|
android:background="@color/c_view_divier_background"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/pOption8"
|
android:id="@+id/pOption9"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="10dp"
|
||||||
|
@ -663,7 +736,7 @@
|
||||||
android:background="@color/c_view_divier_background" />
|
android:background="@color/c_view_divier_background" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/pOption9"
|
android:id="@+id/pOption10"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="10dp"
|
||||||
|
@ -742,7 +815,7 @@
|
||||||
android:background="@color/c_view_divier_background" />
|
android:background="@color/c_view_divier_background" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/pOption10"
|
android:id="@+id/pOption11"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="10dp"
|
||||||
|
@ -815,7 +888,7 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/pOption11"
|
android:id="@+id/pOption12"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="10dp"
|
||||||
|
@ -888,7 +961,7 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/pOption12"
|
android:id="@+id/pOption13"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="10dp"
|
||||||
|
|
|
@ -622,8 +622,8 @@
|
||||||
android:layout_gravity="end"
|
android:layout_gravity="end"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:src="@xml/ic_arrow_right"
|
android:src="@xml/ic_arrow_right"
|
||||||
android:layout_marginEnd="17dp"
|
android:layout_marginEnd="18dp"
|
||||||
android:layout_marginStart="17dp"
|
android:layout_marginStart="15dp"
|
||||||
android:padding="15dp"
|
android:padding="15dp"
|
||||||
android:paddingBottom="0dp"
|
android:paddingBottom="0dp"
|
||||||
android:elevation="7dp"
|
android:elevation="7dp"
|
||||||
|
|
|
@ -85,21 +85,44 @@
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:weightSum="7">
|
android:weightSum="7">
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="6"
|
android:layout_weight="6"
|
||||||
android:alpha="1"
|
android:layout_marginStart="15dp"
|
||||||
android:background="@android:color/transparent"
|
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:padding="0dp"
|
android:orientation="vertical">
|
||||||
android:paddingStart="15dp"
|
|
||||||
android:text="@string/SETTING_ORBOT_LIST_VIEW"
|
<Button
|
||||||
android:textAlignment="textStart"
|
android:layout_width="wrap_content"
|
||||||
android:textAllCaps="false"
|
android:layout_height="20dp"
|
||||||
android:textColor="@color/c_text_v1"
|
android:alpha="1"
|
||||||
android:textSize="14sp"
|
android:background="@android:color/transparent"
|
||||||
tools:ignore="RtlSymmetry" />
|
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
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
@ -114,6 +137,11 @@
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="@color/c_view_divier_background" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="40"
|
android:layout_weight="40"
|
||||||
android:layout_marginTop="00dp"
|
android:layout_marginTop="00dp"
|
||||||
android:layout_marginStart="15dp"
|
android:layout_marginStart="15dp"
|
||||||
|
@ -109,6 +109,67 @@
|
||||||
tools:ignore="RtlSymmetry" />
|
tools:ignore="RtlSymmetry" />
|
||||||
</LinearLayout>
|
</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
|
<LinearLayout
|
||||||
android:id="@+id/pOption0"
|
android:id="@+id/pOption0"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -237,71 +298,6 @@
|
||||||
|
|
||||||
</LinearLayout>
|
</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
|
<LinearLayout
|
||||||
android:id="@+id/pOption3"
|
android:id="@+id/pOption3"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -483,7 +479,6 @@
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/pOption4"
|
android:id="@+id/pOption4"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -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>
|
|
@ -71,35 +71,35 @@
|
||||||
android:textSize="17sp"
|
android:textSize="17sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<LinearLayout
|
<FrameLayout
|
||||||
android:id="@+id/pTabsContainer"
|
android:id="@+id/pTabsContainer"
|
||||||
android:layout_width="48dp"
|
android:layout_width="40dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
android:layout_marginStart="-10dp"
|
||||||
android:onClick="onBackPressedInvoked"
|
android:onClick="onBackPressedInvoked"
|
||||||
android:orientation="horizontal"
|
android:gravity="left">
|
||||||
android:paddingStart="5dp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
tools:ignore="RtlSymmetry">
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/pTabs"
|
android:id="@+id/pTabs"
|
||||||
android:layout_width="22dp"
|
android:layout_width="22dp"
|
||||||
android:layout_height="22dp"
|
android:layout_height="22dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_marginStart="14dp"
|
android:layout_marginStart="12dp"
|
||||||
android:layout_marginTop="0.5dp"
|
android:layout_marginTop="-1dp"
|
||||||
|
android:layout_marginEnd="13dp"
|
||||||
|
android:layout_marginBottom="0dp"
|
||||||
android:background="@xml/gx_generic_tab_button"
|
android:background="@xml/gx_generic_tab_button"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
|
android:focusable="false"
|
||||||
android:contentDescription="@string/GENERAL_TODO"
|
android:contentDescription="@string/GENERAL_TODO"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:text="@string/HOME_TAB_TEXT"
|
android:text="@string/HOME_TAB_TEXT"
|
||||||
android:textColor="@color/c_text_v5"
|
android:textColor="@color/c_text_v1"
|
||||||
android:textSize="12.5sp" />
|
android:textSize="12.5sp"
|
||||||
</LinearLayout>
|
android:tint="@color/black" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/pMenuButton"
|
android:id="@+id/pMenuButton"
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<item android:id="@+id/menu13"
|
<item android:id="@+id/menu13"
|
||||||
android:title="Top Menu"
|
android:title="Top Menu"
|
||||||
app:showAsAction="always"
|
app:showAsAction="always"
|
||||||
android:actionLayout="@layout/popup_menu"/>
|
android:actionLayout="@layout/popup_side_menu"/>
|
||||||
<group android:id="@+id/group_0" >
|
<group android:id="@+id/group_0" >
|
||||||
<item android:id="@+id/menu9"
|
<item android:id="@+id/menu9"
|
||||||
android:title="Location "
|
android:title="Location "
|
||||||
|
|
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 2.1 KiB |