mirror of https://github.com/LeOS-GSI/LeOS-Genesis
bug fixes
parent
ed0c04e917
commit
64be476170
|
@ -2,6 +2,7 @@ apply plugin: 'com.android.application'
|
||||||
apply from: 'variables.gradle'
|
apply from: 'variables.gradle'
|
||||||
|
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven'
|
||||||
|
apply plugin: 'io.fabric'
|
||||||
|
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
|
@ -12,6 +13,7 @@ ext {
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
url "https://maven.mozilla.org/maven2/"
|
url "https://maven.mozilla.org/maven2/"
|
||||||
|
maven { url 'https://maven.fabric.io/public' }
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
google()
|
google()
|
||||||
|
@ -19,6 +21,7 @@ repositories {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion project.ext.compileSdkVersion
|
compileSdkVersion project.ext.compileSdkVersion
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
@ -96,13 +99,16 @@ dependencies {
|
||||||
implementation 'com.android.support:appcompat-v7:28.0.0'
|
implementation 'com.android.support:appcompat-v7:28.0.0'
|
||||||
|
|
||||||
/*Firefox ABI Splits*/
|
/*Firefox ABI Splits*/
|
||||||
//implementation "org.mozilla.geckoview:geckoview-${geckoviewChannel}:${geckoviewVersion}"
|
x86Implementation "org.mozilla.geckoview:geckoview-${geckoviewChannel}:${geckoviewVersion}"
|
||||||
//x86_64Implementation "org.mozilla.geckoview:geckoview-x86_64:68.0.20190711090008"
|
x86_64Implementation "org.mozilla.geckoview:geckoview-${geckoviewChannel}:${geckoviewVersion}"
|
||||||
//armImplementation "org.mozilla.geckoview:geckoview-armeabi-v7a:68.0.20190711090008"
|
armImplementation "org.mozilla.geckoview:geckoview-${geckoviewChannel}:${geckoviewVersion}"
|
||||||
aarch64Implementation "org.mozilla.geckoview:geckoview-${geckoviewChannel}:${geckoviewVersion}"
|
aarch64Implementation "org.mozilla.geckoview:geckoview-${geckoviewChannel}:${geckoviewVersion}"
|
||||||
|
|
||||||
/*Alert Dialog*/
|
/*Alert Dialog*/
|
||||||
implementation 'com.crowdfire.cfalertdialog:cfalertdialog:1.1.0'
|
implementation 'com.crowdfire.cfalertdialog:cfalertdialog:1.1.0'
|
||||||
|
implementation('com.crashlytics.sdk.android:crashlytics:2.10.1@aar') {
|
||||||
|
transitive = true;
|
||||||
|
}
|
||||||
|
|
||||||
/*Onion Proxy*/
|
/*Onion Proxy*/
|
||||||
implementation 'com.github.jehy:Tor-Onion-Proxy-Library:0.0.7'
|
implementation 'com.github.jehy:Tor-Onion-Proxy-Library:0.0.7'
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
package="com.example.myapplication">
|
package="com.example.myapplication">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||||
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||||
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
|
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
|
||||||
|
@ -20,9 +21,11 @@
|
||||||
<activity
|
<activity
|
||||||
android:name="com.darkweb.genesissearchengine.appManager.setting_manager.setting_controller"
|
android:name="com.darkweb.genesissearchengine.appManager.setting_manager.setting_controller"
|
||||||
android:windowSoftInputMode="adjustNothing"
|
android:windowSoftInputMode="adjustNothing"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
android:label="@string/title_activity_setting_controller">
|
android:label="@string/title_activity_setting_controller">
|
||||||
</activity>
|
</activity>
|
||||||
<activity android:name="com.darkweb.genesissearchengine.appManager.list_manager.list_controller"
|
<activity android:name="com.darkweb.genesissearchengine.appManager.list_manager.list_controller"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
android:windowSoftInputMode="adjustNothing">
|
android:windowSoftInputMode="adjustNothing">
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ import android.content.ActivityNotFoundException;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Environment;
|
import android.os.Environment;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
@ -380,9 +381,11 @@ class geckoClients
|
||||||
|
|
||||||
void downloadFile()
|
void downloadFile()
|
||||||
{
|
{
|
||||||
home_model.getInstance().getHomeInstance().startService(DownloadFileService.getDownloadService(home_model.getInstance().getHomeInstance(), url.toString()+"__"+downloadFile, Environment.DIRECTORY_DOWNLOADS));
|
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
localNotification.getInstance().createNotification("Downloading | " + downloadFile,"Starting Download");
|
localNotification.getInstance().createNotification("Downloading | " + downloadFile,"Starting Download");
|
||||||
}
|
}
|
||||||
|
home_model.getInstance().getHomeInstance().startService(DownloadFileService.getDownloadService(home_model.getInstance().getHomeInstance(), url.toString()+"__"+downloadFile, Environment.DIRECTORY_DOWNLOADS));
|
||||||
|
}
|
||||||
|
|
||||||
private class ExampleContentBlockingDelegate
|
private class ExampleContentBlockingDelegate
|
||||||
implements ContentBlocking.Delegate {
|
implements ContentBlocking.Delegate {
|
||||||
|
|
|
@ -51,9 +51,9 @@ public class home_controller extends AppCompatActivity
|
||||||
setContentView(R.layout.home_view);
|
setContentView(R.layout.home_view);
|
||||||
initializeAppModel();
|
initializeAppModel();
|
||||||
preference_manager.getInstance().initialize();
|
preference_manager.getInstance().initialize();
|
||||||
|
initializeCrashlytics();
|
||||||
|
|
||||||
status.initStatus();
|
status.initStatus();
|
||||||
initializeCrashlytics();
|
|
||||||
initializeConnections();
|
initializeConnections();
|
||||||
initializeWebView();
|
initializeWebView();
|
||||||
initializeLocalEventHandlers();
|
initializeLocalEventHandlers();
|
||||||
|
@ -70,6 +70,7 @@ public class home_controller extends AppCompatActivity
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
//initializeCrashlytics();
|
||||||
initializeAppModel();
|
initializeAppModel();
|
||||||
setContentView(R.layout.invalid_setup_view);
|
setContentView(R.layout.invalid_setup_view);
|
||||||
message_manager.getInstance().abiError(Build.SUPPORTED_ABIS[0]);
|
message_manager.getInstance().abiError(Build.SUPPORTED_ABIS[0]);
|
||||||
|
@ -160,7 +161,7 @@ public class home_controller extends AppCompatActivity
|
||||||
|
|
||||||
public void initializeCrashlytics()
|
public void initializeCrashlytics()
|
||||||
{
|
{
|
||||||
fabricManager.getInstance().init();
|
fabricManager.getInstance().init(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initializeWebView()
|
public void initializeWebView()
|
||||||
|
|
|
@ -2,17 +2,22 @@ package com.darkweb.genesissearchengine.appManager.home_activity;
|
||||||
|
|
||||||
import android.util.Patterns;
|
import android.util.Patterns;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.inputmethod.EditorInfo;
|
import android.view.inputmethod.EditorInfo;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import com.darkweb.genesissearchengine.appManager.list_manager.list_controller;
|
import com.darkweb.genesissearchengine.appManager.list_manager.list_controller;
|
||||||
import com.darkweb.genesissearchengine.appManager.setting_manager.setting_controller;
|
import com.darkweb.genesissearchengine.appManager.setting_manager.setting_controller;
|
||||||
|
import com.darkweb.genesissearchengine.appManager.setting_manager.setting_model;
|
||||||
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.status;
|
import com.darkweb.genesissearchengine.constants.status;
|
||||||
|
import com.darkweb.genesissearchengine.dataManager.preference_manager;
|
||||||
import com.darkweb.genesissearchengine.helperMethod;
|
import com.darkweb.genesissearchengine.helperMethod;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.fabricManager;
|
import com.darkweb.genesissearchengine.pluginManager.fabricManager;
|
||||||
import com.darkweb.genesissearchengine.pluginManager.message_manager;
|
import com.darkweb.genesissearchengine.pluginManager.message_manager;
|
||||||
|
import com.darkweb.genesissearchengine.pluginManager.orbot_manager;
|
||||||
import com.example.myapplication.R;
|
import com.example.myapplication.R;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -93,12 +98,12 @@ public class home_ehandler
|
||||||
appContoller.onReload();
|
appContoller.onReload();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onMenuButtonPressed(View view)
|
void onMenuButtonPressed(View view)
|
||||||
{
|
{
|
||||||
appContoller.openMenu(view);
|
appContoller.openMenu(view);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onHomeButtonPressed()
|
void onHomeButtonPressed()
|
||||||
{
|
{
|
||||||
appContoller.stopHiddenView(true,false);
|
appContoller.stopHiddenView(true,false);
|
||||||
fabricManager.getInstance().sendEvent("HOME BUTTON PRESSSED : ");
|
fabricManager.getInstance().sendEvent("HOME BUTTON PRESSSED : ");
|
||||||
|
@ -107,25 +112,25 @@ public class home_ehandler
|
||||||
helperMethod.hideKeyboard();
|
helperMethod.hideKeyboard();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onFloatingButtonPressed()
|
void onFloatingButtonPressed()
|
||||||
{
|
{
|
||||||
fabricManager.getInstance().sendEvent("FLOATING BUTTON PRESSSED : ");
|
fabricManager.getInstance().sendEvent("FLOATING BUTTON PRESSSED : ");
|
||||||
message_manager.getInstance().reportURL();
|
message_manager.getInstance().reportURL();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onBackPressed()
|
void onBackPressed()
|
||||||
{
|
{
|
||||||
fabricManager.getInstance().sendEvent("BACK BUTTON PRESSSED : ");
|
fabricManager.getInstance().sendEvent("BACK BUTTON PRESSSED : ");
|
||||||
appContoller.onBackPressedView();
|
appContoller.onBackPressedView();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onMenuPressed(int menuId)
|
void onMenuPressed(int menuId)
|
||||||
{
|
{
|
||||||
if (menuId == R.id.menu1) {
|
if (menuId == R.id.menu1) {
|
||||||
helperMethod.openActivity(list_controller.class,constants.list_history);
|
helperMethod.openActivity(list_controller.class,constants.list_history);
|
||||||
}
|
}
|
||||||
else if (menuId == R.id.menu2) {
|
else if (menuId == R.id.menu2) {
|
||||||
helperMethod.openActivity(setting_controller.class,constants.list_history);
|
switchSearchEngine();
|
||||||
}
|
}
|
||||||
else if (menuId == R.id.menu3) {
|
else if (menuId == R.id.menu3) {
|
||||||
helperMethod.openActivity(setting_controller.class,constants.list_history);
|
helperMethod.openActivity(setting_controller.class,constants.list_history);
|
||||||
|
@ -157,5 +162,29 @@ public class home_ehandler
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void switchSearchEngine()
|
||||||
|
{
|
||||||
|
setting_model.getInstance().search_status = "Google";
|
||||||
|
preference_manager.getInstance().setString(keys.search_engine, setting_model.getInstance().search_status);
|
||||||
|
|
||||||
|
|
||||||
|
if(status.search_status.equals("Google"))
|
||||||
|
{
|
||||||
|
preference_manager.getInstance().setString(keys.search_engine,"Darkweb");
|
||||||
|
status.search_status = "Darkweb";
|
||||||
|
home_model.getInstance().getHomeInstance().initSearchEngine();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(orbot_manager.getInstance().initOrbot("https://google.com"))
|
||||||
|
{
|
||||||
|
preference_manager.getInstance().setString(keys.search_engine,"Google");
|
||||||
|
status.search_status = "Google";
|
||||||
|
home_model.getInstance().getHomeInstance().initSearchEngine();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.darkweb.genesissearchengine.appManager.home_activity;
|
package com.darkweb.genesissearchengine.appManager.home_activity;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
|
import android.content.pm.ActivityInfo;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
|
@ -15,6 +16,7 @@ import android.webkit.WebView;
|
||||||
import android.widget.*;
|
import android.widget.*;
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
import androidx.core.view.MenuCompat;
|
import androidx.core.view.MenuCompat;
|
||||||
|
import com.darkweb.genesissearchengine.appManager.setting_manager.setting_model;
|
||||||
import com.darkweb.genesissearchengine.constants.*;
|
import com.darkweb.genesissearchengine.constants.*;
|
||||||
import com.darkweb.genesissearchengine.dataManager.preference_manager;
|
import com.darkweb.genesissearchengine.dataManager.preference_manager;
|
||||||
import com.darkweb.genesissearchengine.helperMethod;
|
import com.darkweb.genesissearchengine.helperMethod;
|
||||||
|
@ -164,11 +166,23 @@ public class viewController
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
boolean isFirstInstall = preference_manager.getInstance().getBool(keys.hasOrbotInstalled,true);
|
boolean isFirstInstall = preference_manager.getInstance().getBool(keys.hasOrbotInstalled,true);
|
||||||
|
boolean isHidden = (status.search_status.equals(enums.searchEngine.Google.toString()) || status.search_status.equals(enums.searchEngine.Bing.toString()));
|
||||||
while (!status.isTorInitialized && (isFirstInstall || status.search_status.equals(enums.searchEngine.Google.toString()) || status.search_status.equals(enums.searchEngine.Bing.toString())))
|
while (!status.isTorInitialized && (isFirstInstall || status.search_status.equals(enums.searchEngine.Google.toString()) || status.search_status.equals(enums.searchEngine.Bing.toString())))
|
||||||
{
|
{
|
||||||
startPostTask(messages.UPDATE_LOADING_TEXT);
|
startPostTask(messages.UPDATE_LOADING_TEXT);
|
||||||
sleep(100);
|
sleep(100);
|
||||||
}
|
}
|
||||||
|
if(isHidden)
|
||||||
|
{
|
||||||
|
if(!isFirstInstall)
|
||||||
|
{
|
||||||
|
startPostTask(messages.LOAD_COMPLETED);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
startPostTask(messages.INSTALL_COMPLETED);
|
||||||
|
}
|
||||||
|
}
|
||||||
preference_manager.getInstance().setBool(keys.hasOrbotInstalled,false);
|
preference_manager.getInstance().setBool(keys.hasOrbotInstalled,false);
|
||||||
startPostTask(messages.DISABLE_SPLASH_SCREEN);
|
startPostTask(messages.DISABLE_SPLASH_SCREEN);
|
||||||
}
|
}
|
||||||
|
@ -196,7 +210,15 @@ public class viewController
|
||||||
@Override
|
@Override
|
||||||
public void handleMessage(Message msg)
|
public void handleMessage(Message msg)
|
||||||
{
|
{
|
||||||
if(msg.what == messages.UPDATE_LOADING_TEXT)
|
if(msg.what == messages.INSTALL_COMPLETED)
|
||||||
|
{
|
||||||
|
loadingText.setText("Installed Successfully | Starting Search");
|
||||||
|
}
|
||||||
|
else if(msg.what == messages.LOAD_COMPLETED)
|
||||||
|
{
|
||||||
|
loadingText.setText("Loading Successfully | Starting Search");
|
||||||
|
}
|
||||||
|
else if(msg.what == messages.UPDATE_LOADING_TEXT)
|
||||||
{
|
{
|
||||||
loadingText.setText(orbot_manager.getInstance().getLogs());
|
loadingText.setText(orbot_manager.getInstance().getLogs());
|
||||||
}
|
}
|
||||||
|
@ -436,6 +458,17 @@ public class viewController
|
||||||
home_model.getInstance().getHomeInstance().onMenuOptionSelected(item);
|
home_model.getInstance().getHomeInstance().onMenuOptionSelected(item);
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
MenuItem item = popup.getMenu().findItem(R.id.menu2);
|
||||||
|
|
||||||
|
if(status.search_status.equals("Google"))
|
||||||
|
{
|
||||||
|
item.setTitle("Switch | Secure Darkweb");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
item.setTitle("Switch | Secure Google");
|
||||||
|
}
|
||||||
|
|
||||||
popup.show();
|
popup.show();
|
||||||
view.bringToFront();
|
view.bringToFront();
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,7 @@ class setting_view_controller
|
||||||
|
|
||||||
private void initJavascript()
|
private void initJavascript()
|
||||||
{
|
{
|
||||||
|
setting_model.getInstance().java_status = java_status;
|
||||||
if (java_status)
|
if (java_status)
|
||||||
{
|
{
|
||||||
javascript.setSelection(0);
|
javascript.setSelection(0);
|
||||||
|
@ -57,6 +58,7 @@ class setting_view_controller
|
||||||
|
|
||||||
private void initHistory()
|
private void initHistory()
|
||||||
{
|
{
|
||||||
|
setting_model.getInstance().history_status = history_status;
|
||||||
if (history_status)
|
if (history_status)
|
||||||
{
|
{
|
||||||
history.setSelection(0);
|
history.setSelection(0);
|
||||||
|
@ -71,6 +73,8 @@ class setting_view_controller
|
||||||
private void initSearchEngine()
|
private void initSearchEngine()
|
||||||
{
|
{
|
||||||
String myString = preference_manager.getInstance().getString(keys.search_engine, strings.darkweb);
|
String myString = preference_manager.getInstance().getString(keys.search_engine, strings.darkweb);
|
||||||
|
setting_model.getInstance().search_status = myString;
|
||||||
|
|
||||||
ArrayAdapter myAdap = (ArrayAdapter) search.getAdapter();
|
ArrayAdapter myAdap = (ArrayAdapter) search.getAdapter();
|
||||||
int spinnerPosition = myAdap.getPosition(myString);
|
int spinnerPosition = myAdap.getPosition(myString);
|
||||||
search.setSelection(spinnerPosition);
|
search.setSelection(spinnerPosition);
|
||||||
|
@ -85,14 +89,17 @@ class setting_view_controller
|
||||||
{
|
{
|
||||||
status.search_status = setting_model.getInstance().search_status;
|
status.search_status = setting_model.getInstance().search_status;
|
||||||
home_model.getInstance().getHomeInstance().initSearchEngine();
|
home_model.getInstance().getHomeInstance().initSearchEngine();
|
||||||
|
preference_manager.getInstance().setString(keys.search_engine, setting_model.getInstance().search_status);
|
||||||
}
|
}
|
||||||
else if(status.java_status != setting_model.getInstance().java_status)
|
else if(status.java_status != setting_model.getInstance().java_status)
|
||||||
{
|
{
|
||||||
status.java_status = setting_model.getInstance().java_status;
|
status.java_status = setting_model.getInstance().java_status;
|
||||||
home_model.getInstance().getHomeInstance().onReInitGeckoView();
|
home_model.getInstance().getHomeInstance().onReInitGeckoView();
|
||||||
|
preference_manager.getInstance().setBool(keys.java_script, status.java_status);
|
||||||
}
|
}
|
||||||
|
|
||||||
status.history_status = setting_model.getInstance().history_status;
|
status.history_status = setting_model.getInstance().history_status;
|
||||||
|
preference_manager.getInstance().setBool(keys.history_clear, status.history_status);
|
||||||
|
|
||||||
setting_model.getInstance().getSettingInstance().finish();
|
setting_model.getInstance().getSettingInstance().finish();
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,13 @@ public class settings_ehandler
|
||||||
|
|
||||||
private void onJavaScriptListener(int position)
|
private void onJavaScriptListener(int position)
|
||||||
{
|
{
|
||||||
if(position==1 && setting_model.getInstance().java_status)
|
if(position==0 && setting_model.getInstance().java_status)
|
||||||
{
|
{
|
||||||
setting_model.getInstance().java_status = false;
|
setting_model.getInstance().java_status = false;
|
||||||
preference_manager.getInstance().setBool(keys.java_script, false);
|
|
||||||
}
|
}
|
||||||
else if(!setting_model.getInstance().java_status)
|
else if(!setting_model.getInstance().java_status)
|
||||||
{
|
{
|
||||||
setting_model.getInstance().java_status = true;
|
setting_model.getInstance().java_status = true;
|
||||||
preference_manager.getInstance().setBool(keys.java_script, true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,21 +41,18 @@ public class settings_ehandler
|
||||||
if(!setting_model.getInstance().search_status.equals(parentView.getItemAtPosition(position).toString()))
|
if(!setting_model.getInstance().search_status.equals(parentView.getItemAtPosition(position).toString()))
|
||||||
{
|
{
|
||||||
setting_model.getInstance().search_status = parentView.getItemAtPosition(position).toString();
|
setting_model.getInstance().search_status = parentView.getItemAtPosition(position).toString();
|
||||||
preference_manager.getInstance().setString(keys.search_engine, setting_model.getInstance().search_status);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onHistoryListener(int position)
|
private void onHistoryListener(int position)
|
||||||
{
|
{
|
||||||
if(position==1 && setting_model.getInstance().history_status)
|
if(position==0 && setting_model.getInstance().history_status)
|
||||||
{
|
{
|
||||||
setting_model.getInstance().history_status = false;
|
setting_model.getInstance().history_status = false;
|
||||||
preference_manager.getInstance().setBool(keys.history_clear, false);
|
|
||||||
}
|
}
|
||||||
else if(!setting_model.getInstance().history_status)
|
else if(!setting_model.getInstance().history_status)
|
||||||
{
|
{
|
||||||
setting_model.getInstance().history_status = true;
|
setting_model.getInstance().history_status = true;
|
||||||
preference_manager.getInstance().setBool(keys.history_clear, true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,4 +10,6 @@ public class messages
|
||||||
public final static int UPDATE_LOADING_TEXT =5;
|
public final static int UPDATE_LOADING_TEXT =5;
|
||||||
public final static int SHOW_ADS =6;
|
public final static int SHOW_ADS =6;
|
||||||
public final static int DOWNLOAD_NOTIFICATION =7;
|
public final static int DOWNLOAD_NOTIFICATION =7;
|
||||||
|
public final static int INSTALL_COMPLETED =8;
|
||||||
|
public final static int LOAD_COMPLETED =9;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
package com.darkweb.genesissearchengine.pluginManager;
|
package com.darkweb.genesissearchengine.pluginManager;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import com.crashlytics.android.Crashlytics;
|
||||||
|
import com.darkweb.genesissearchengine.appManager.home_activity.home_model;
|
||||||
|
import io.fabric.sdk.android.Fabric;
|
||||||
|
|
||||||
public class fabricManager
|
public class fabricManager
|
||||||
{
|
{
|
||||||
/*Private Variables*/
|
/*Private Variables*/
|
||||||
|
@ -17,17 +22,17 @@ public class fabricManager
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init()
|
public void init(Context context)
|
||||||
{
|
{
|
||||||
//Fabric.with(home_model.getInstance().getAppContext(), new Crashlytics());
|
Fabric.with(context, new Crashlytics());
|
||||||
//analyticmanager.getInstance().initialize(home_model.getInstance().getAppContext());
|
analyticmanager.getInstance().initialize(home_model.getInstance().getAppContext());
|
||||||
//analyticmanager.getInstance().logUser();
|
analyticmanager.getInstance().logUser();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*Helper Methods*/
|
/*Helper Methods*/
|
||||||
|
|
||||||
public void sendEvent(String value)
|
public void sendEvent(String value)
|
||||||
{
|
{
|
||||||
analyticmanager.getInstance().sendEvent(value);
|
//analyticmanager.getInstance().sendEvent(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,7 +166,7 @@ public class orbot_manager {
|
||||||
return "Loading Please Wait";
|
return "Loading Please Wait";
|
||||||
}
|
}
|
||||||
Logs=Logs.replace("FAILED","Securing");
|
Logs=Logs.replace("FAILED","Securing");
|
||||||
return Logs;
|
return "Installing | " + Logs;
|
||||||
}
|
}
|
||||||
return "Loading Please Wait";
|
return "Loading Please Wait";
|
||||||
}
|
}
|
||||||
|
|
|
@ -174,6 +174,8 @@
|
||||||
android:layout_marginStart="0dp"
|
android:layout_marginStart="0dp"
|
||||||
android:paddingBottom="19dp"
|
android:paddingBottom="19dp"
|
||||||
android:paddingTop="19dp"
|
android:paddingTop="19dp"
|
||||||
|
android:paddingLeft="8dp"
|
||||||
|
android:paddingRight="8dp"
|
||||||
android:layout_marginEnd="0dp"
|
android:layout_marginEnd="0dp"
|
||||||
android:id="@+id/menu"
|
android:id="@+id/menu"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
|
@ -230,9 +232,10 @@
|
||||||
android:layout_width="35dp"
|
android:layout_width="35dp"
|
||||||
android:layout_height="35dp"
|
android:layout_height="35dp"
|
||||||
app:srcCompat="@drawable/icon_loading"
|
app:srcCompat="@drawable/icon_loading"
|
||||||
android:id="@+id/imageView_loading_back" app:layout_constraintStart_toStartOf="parent"
|
android:id="@+id/imageView_loading_back"
|
||||||
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintStart_toEndOf="@+id/backsplash"
|
||||||
app:layout_constraintTop_toTopOf="parent"/>
|
app:layout_constraintEnd_toStartOf="@+id/backsplash"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/loadingText" android:layout_marginBottom="25dp"/>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
|
|
|
@ -3,6 +3,12 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
tools:context="example.javatpoint.com.optionmenu.MainActivity">
|
tools:context="example.javatpoint.com.optionmenu.MainActivity">
|
||||||
|
|
||||||
|
<group android:id="@+id/group_0" >
|
||||||
|
<item android:id="@+id/menu2"
|
||||||
|
android:title="Switch | Secure Google"
|
||||||
|
app:showAsAction="always"
|
||||||
|
android:icon="@android:drawable/btn_star"/>
|
||||||
|
</group>
|
||||||
<item android:id="@+id/menu0"
|
<item android:id="@+id/menu0"
|
||||||
android:title="Downloads"
|
android:title="Downloads"
|
||||||
app:showAsAction="always"
|
app:showAsAction="always"
|
||||||
|
@ -11,10 +17,6 @@
|
||||||
android:title="History"
|
android:title="History"
|
||||||
app:showAsAction="always"
|
app:showAsAction="always"
|
||||||
android:icon="@android:drawable/btn_star"/>
|
android:icon="@android:drawable/btn_star"/>
|
||||||
<item android:id="@+id/menu2"
|
|
||||||
android:title="Manager Search Engine"
|
|
||||||
app:showAsAction="always"
|
|
||||||
android:icon="@android:drawable/btn_star"/>
|
|
||||||
<item android:id="@+id/menu3"
|
<item android:id="@+id/menu3"
|
||||||
android:title="Settings"
|
android:title="Settings"
|
||||||
app:showAsAction="always"
|
app:showAsAction="always"
|
||||||
|
|
|
@ -2,12 +2,11 @@ buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
jcenter()
|
||||||
maven { url 'https://jitpack.io' }
|
|
||||||
maven { url 'https://maven.fabric.io/public' }
|
maven { url 'https://maven.fabric.io/public' }
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.4.2'
|
classpath 'com.android.tools.build:gradle:3.4.2'
|
||||||
classpath 'io.fabric.tools:gradle:1.29.0'
|
classpath 'io.fabric.tools:gradle:1.31.0'
|
||||||
classpath 'com.google.gms:google-services:4.3.0'
|
classpath 'com.google.gms:google-services:4.3.0'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue