bug fixes

master
Genesis 2021-06-22 10:48:26 +05:00
parent f7384e8b53
commit f86075c43b
47 changed files with 1129 additions and 165 deletions

View File

@ -134,6 +134,7 @@ dependencies {
implementation 'androidx.recyclerview:recyclerview:1.1.0' implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0' implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
implementation 'com.google.android.material:material:1.2.1' implementation 'com.google.android.material:material:1.2.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
} }
/* Automated APK Generation */ /* Automated APK Generation */

View File

@ -2,7 +2,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
package="com.example.myapplication"> package="com.example.myapplication">
<!-- Permissions --> <!-- Permissions -->
<uses-permission android:name="android.permission.READ_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" />
@ -15,19 +14,21 @@
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /> <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<application <application
android:requestLegacyExternalStorage="true"
android:allowBackup="true" android:allowBackup="true"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize" android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:fullBackupContent="false"
android:extractNativeLibs="true" android:extractNativeLibs="true"
android:fullBackupContent="false"
android:icon="@mipmap/ic_launcher_genesis" android:icon="@mipmap/ic_launcher_genesis"
android:label="@string/app_name" android:label="@string/app_name"
android:networkSecurityConfig="@xml/gx_network_security_config" android:networkSecurityConfig="@xml/gx_network_security_config"
android:requestLegacyExternalStorage="true"
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/AppTheme" android:theme="@style/AppTheme"
android:usesCleartextTraffic="true" android:usesCleartextTraffic="true"
tools:targetApi="n"> tools:targetApi="n">
<activity android:name="com.darkweb.genesissearchengine.appManager.bookmarkManager.BookmarkSettings.bookmarkSettingController"></activity>
<receiver android:name="com.widget.Genesis.widgetManager.widgetController"> <receiver android:name="com.widget.Genesis.widgetManager.widgetController">
<intent-filter> <intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
@ -55,7 +56,7 @@
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.bookmarkManager.bookmarkController" android:name="com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkHome.bookmarkController"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:windowSoftInputMode="adjustPan" /> android:windowSoftInputMode="adjustPan" />
<activity <activity
@ -84,8 +85,8 @@
android:windowSoftInputMode="adjustPan" /> android:windowSoftInputMode="adjustPan" />
<activity <activity
android:name="com.darkweb.genesissearchengine.appManager.settingManager.notificationManager.settingNotificationController" android:name="com.darkweb.genesissearchengine.appManager.settingManager.notificationManager.settingNotificationController"
android:launchMode="singleTop"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:launchMode="singleTop"
android:windowSoftInputMode="adjustPan" /> android:windowSoftInputMode="adjustPan" />
<activity <activity
android:name="com.darkweb.genesissearchengine.appManager.settingManager.privacyManager.settingPrivacyController" android:name="com.darkweb.genesissearchengine.appManager.settingManager.privacyManager.settingPrivacyController"
@ -125,8 +126,10 @@
android:launchMode="singleTop" android:launchMode="singleTop"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan"> android:windowSoftInputMode="adjustPan">
<meta-data android:name="android.app.shortcuts" <meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" /> android:resource="@xml/shortcuts" />
<intent-filter> <intent-filter>
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
@ -144,13 +147,12 @@
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
</intent-filter> </intent-filter>
</activity> </activity>
<activity
<activity android:name="com.darkweb.genesissearchengine.appManager.externalCommandManager.externalShortcutController" android:name="com.darkweb.genesissearchengine.appManager.externalCommandManager.externalShortcutController"
android:launchMode="singleTop"/> android:launchMode="singleTop" />
<activity
<activity android:name="com.darkweb.genesissearchengine.appManager.externalCommandManager.externalURLNavigationContoller" android:name="com.darkweb.genesissearchengine.appManager.externalCommandManager.externalURLNavigationContoller"
android:launchMode="singleTask" android:launchMode="singleTask">
>
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />
@ -191,19 +193,16 @@
<meta-data <meta-data
android:name="io.fabric.ApiKey" android:name="io.fabric.ApiKey"
android:value="be76c64dae2519d4ab8daaed88298da14c7c294f" /> android:value="be76c64dae2519d4ab8daaed88298da14c7c294f" /> <!-- Live Build -->
<!-- -->
<!-- Live Build --> <meta-data
<!-- --> <meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID" android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-5074525529134731~4717329156" /> android:value="ca-app-pub-5074525529134731~4717329156" /> <!-- Development Build -->
<!--
<meta-data
<!-- Development Build -->
<!-- <meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID" android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-6985886044951738~4177628900" /> --> android:value="ca-app-pub-6985886044951738~4177628900" />
-->
<service <service
android:name="com.darkweb.genesissearchengine.pluginManager.downloadPluginManager.downloadService" android:name="com.darkweb.genesissearchengine.pluginManager.downloadPluginManager.downloadService"
android:enabled="true" android:enabled="true"
@ -221,8 +220,8 @@
<action android:name="Download_Cancelled" /> <action android:name="Download_Cancelled" />
</intent-filter> </intent-filter>
</receiver> </receiver>
<!--
<!-- Permissions File Provider Live Permissions File Provider Live
<provider <provider
android:name="androidx.core.content.FileProvider" android:name="androidx.core.content.FileProvider"
android:authorities="com.darkweb.genesissearchengine.production.provider" android:authorities="com.darkweb.genesissearchengine.production.provider"
@ -232,9 +231,7 @@
android:name="android.support.FILE_PROVIDER_PATHS" android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths" /> android:resource="@xml/provider_paths" />
</provider> </provider>
--> -->
<!-- Permissions File Provider Dev --> <!-- Permissions File Provider Dev -->
<provider <provider
android:name="androidx.core.content.FileProvider" android:name="androidx.core.content.FileProvider"
@ -245,28 +242,22 @@
android:name="android.support.FILE_PROVIDER_PATHS" android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths" /> android:resource="@xml/provider_paths" />
</provider> </provider>
<provider <provider
android:name="com.darkweb.genesissearchengine.libs.providers.HSContentProvider" android:name="com.darkweb.genesissearchengine.libs.providers.HSContentProvider"
android:authorities="org.torproject.android.ui.hiddenservices.providers.genesis" android:authorities="org.torproject.android.ui.hiddenservices.providers.genesis"
android:exported="false" /> android:exported="false" />
<provider <provider
android:name="com.darkweb.genesissearchengine.libs.providers.OnionServiceContentProvider" android:name="com.darkweb.genesissearchengine.libs.providers.OnionServiceContentProvider"
android:authorities="org.torproject.android.ui.v3onionservice.genesis" android:authorities="org.torproject.android.ui.v3onionservice.genesis"
android:exported="false" /> android:exported="false" />
<provider <provider
android:authorities="org.torproject.android.ui.v3onionservice.genesis.clientauth"
android:name="com.darkweb.genesissearchengine.libs.providers.ClientAuthContentProviderGenesis" android:name="com.darkweb.genesissearchengine.libs.providers.ClientAuthContentProviderGenesis"
android:exported="false"/> android:authorities="org.torproject.android.ui.v3onionservice.genesis.clientauth"
android:exported="false" />
<provider <provider
android:name="com.darkweb.genesissearchengine.libs.providers.CookieContentProvider" android:name="com.darkweb.genesissearchengine.libs.providers.CookieContentProvider"
android:authorities="org.torproject.android.ui.hiddenservices.providers.genesis.cookie" android:authorities="org.torproject.android.ui.hiddenservices.providers.genesis.cookie"
android:exported="false" /> android:exported="false" />
<provider <provider
android:name="androidx.core.content.FileProvider" android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider" android:authorities="${applicationId}.fileprovider"
@ -286,8 +277,6 @@
<action android:name="android.net.VpnService" /> <action android:name="android.net.VpnService" />
</intent-filter> </intent-filter>
</service> </service>
</application> </application>
</manifest> </manifest>

View File

@ -3,7 +3,7 @@ package com.darkweb.genesissearchengine.appManager;
import android.content.Context; import android.content.Context;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkController; import com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkHome.bookmarkController;
import com.darkweb.genesissearchengine.appManager.bridgeManager.bridgeController; 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.homeController; import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;

View File

@ -0,0 +1,175 @@
package com.darkweb.genesissearchengine.appManager.bookmarkManager.BookmarkSettings;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import android.content.res.Configuration;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.activityThemeManager;
import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.eventObserver;
import com.darkweb.genesissearchengine.pluginManager.pluginController;
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
import com.example.myapplication.R;
import org.mozilla.geckoview.GeckoSession;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
public class bookmarkSettingController extends AppCompatActivity {
/* Private Variables */
private bookmarkSettingModel mBookmarkSettingModel;
private bookmarkSettingViewController mBookmarkSettingViewController;
/* UI Variables */
private EditText mBookmarName;
private EditText mBookmarURL;
private TextView mBookmarkNameError;
private TextView mBookmarkURLError;
/* Initializations */
@Override
protected void onCreate(Bundle savedInstanceState) {
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
activityContextManager.getInstance().onStack(this);
super.onCreate(savedInstanceState);
setContentView(R.layout.bookmark_setting_view);
initializeViews();
initializeModels();
initializeLocalEventHandlers();
}
private void initializeViews() {
mBookmarName = findViewById(R.id.pBookmarkName);
mBookmarURL = findViewById(R.id.pBookmarkURL);
mBookmarkNameError = findViewById(R.id.pBookmarkNameError);
mBookmarkURLError = findViewById(R.id.pBookmarkURLError);
}
private void initializeLocalEventHandlers() {
TextWatcher mTextWatcher = new TextWatcher() {
@Override
public void afterTextChanged(Editable s) {
String mBookmarkName = (String) mBookmarkSettingViewController.onTrigger(bookmarkSettingEnums.eBookmarkSettingViewCommands.M_GET_BOOKMARK_NAME);
String mBookmarkURL = (String) mBookmarkSettingViewController.onTrigger(bookmarkSettingEnums.eBookmarkSettingViewCommands.M_GET_BOOKMARK_URL);
mBookmarkSettingModel.onTrigger(bookmarkSettingEnums.eBookmarkSettingModelCommands.M_VALIDATE_FORM, Arrays.asList(mBookmarkName, mBookmarkURL));
}
@Override
public void beforeTextChanged(CharSequence s, int start,int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start,int before, int count) {
}
};
mBookmarName.addTextChangedListener(mTextWatcher);
mBookmarURL.addTextChangedListener(mTextWatcher);
}
public void initializeModels(){
String mBookmarkName = getIntent().getStringExtra(keys.BOOKMARK_SETTING_NAME);
String mBookmarkURL = getIntent().getStringExtra(keys.BOOKMARK_SETTING_URL);
int mBookmarkID = getIntent().getIntExtra(keys.BOOKMARK_SETTING_ID, -1);
mBookmarkSettingViewController = new bookmarkSettingViewController(this, new bookmarkSettingViewCallback(), mBookmarName, mBookmarURL, mBookmarkNameError, mBookmarkURLError);
mBookmarkSettingViewController.onTrigger(bookmarkSettingEnums.eBookmarkSettingViewCommands.M_INITIALIZE, Arrays.asList(mBookmarkName,mBookmarkURL));
mBookmarkSettingModel = new bookmarkSettingModel(this, new bookmarkSettingModelCallback(), mBookmarkID);
}
/* Local Override */
@Override
public void onConfigurationChanged(@NonNull Configuration newConfig) {
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
super.onConfigurationChanged(newConfig);
if(newConfig.uiMode != getResources().getConfiguration().uiMode){
activityContextManager.getInstance().onResetTheme();
activityThemeManager.getInstance().onConfigurationChanged(this);
}
}
@Override
public void onResume()
{
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_RESUME);
activityContextManager.getInstance().setCurrentActivity(this);
super.onResume();
}
@Override
protected void onDestroy() {
activityContextManager.getInstance().onRemoveStack(this);
super.onDestroy();
}
@Override
public void onBackPressed() {
onClose(null);
}
/* UI Redirection */
public void onClose(View view){
finish();
}
public void onUpdateBookmark(View view) {
String mBookmarkName = (String) mBookmarkSettingViewController.onTrigger(bookmarkSettingEnums.eBookmarkSettingViewCommands.M_GET_BOOKMARK_NAME);
String mBookmarkURL = (String) mBookmarkSettingViewController.onTrigger(bookmarkSettingEnums.eBookmarkSettingViewCommands.M_GET_BOOKMARK_URL);
mBookmarkSettingModel.onTrigger(bookmarkSettingEnums.eBookmarkSettingModelCommands.M_UPDATE_BOOKMARK, Arrays.asList(mBookmarkName, mBookmarkURL));
}
/* UI Callbacks */
private class bookmarkSettingViewCallback implements eventObserver.eventListener{
@Override
public Object invokeObserver(List<Object> data, Object e_type)
{
return null;
}
}
private class bookmarkSettingModelCallback implements eventObserver.eventListener{
@Override
public Object invokeObserver(List<Object> pData, Object pType)
{
if(pType.equals(bookmarkSettingEnums.eBookmarkSettingModelCallbackCommands.M_BOOKMARK_NAME_VALIDATION_ERROR)){
mBookmarkSettingViewController.onTrigger(bookmarkSettingEnums.eBookmarkSettingViewCommands.M_BOOKMARK_NAME_VALIDATION_ERROR, pData);
}
else if(pType.equals(bookmarkSettingEnums.eBookmarkSettingModelCallbackCommands.M_BOOKMARK_URL_VALIDATION_ERROR)){
mBookmarkSettingViewController.onTrigger(bookmarkSettingEnums.eBookmarkSettingViewCommands.M_BOOKMARK_URL_VALIDATION_ERROR, pData);
}
else if(pType.equals(bookmarkSettingEnums.eBookmarkSettingModelCallbackCommands.M_CLEAR_FORM)){
mBookmarkSettingViewController.onTrigger(bookmarkSettingEnums.eBookmarkSettingViewCommands.M_CLEAR_FORM);
}
else if(pType.equals(bookmarkSettingEnums.eBookmarkSettingModelCallbackCommands.M_CLOSE)){
onClose(null);
}
return null;
}
}
}

View File

@ -0,0 +1,20 @@
package com.darkweb.genesissearchengine.appManager.bookmarkManager.BookmarkSettings;
public class bookmarkSettingEnums
{
public enum eBookmarkSettingViewCommands {
M_INITIALIZE, M_GET_BOOKMARK_NAME, M_GET_BOOKMARK_URL, M_BOOKMARK_NAME_VALIDATION_ERROR, M_BOOKMARK_URL_VALIDATION_ERROR, M_CLEAR_FORM
}
public enum eBookmarkSettingModelCommands {
M_GET_BOOKMARK_ID, M_UPDATE_BOOKMARK, M_CLOSE, M_VALIDATE_FORM
}
public enum eBookmarkSettingViewAdapterCommands {
}
public enum eBookmarkSettingModelCallbackCommands {
M_CLEAR_FORM, M_BOOKMARK_NAME_VALIDATION_ERROR, M_BOOKMARK_URL_VALIDATION_ERROR,M_CLOSE
}
}

View File

@ -0,0 +1,79 @@
package com.darkweb.genesissearchengine.appManager.bookmarkManager.BookmarkSettings;
import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.constants.strings;
import com.darkweb.genesissearchengine.dataManager.dataController;
import com.darkweb.genesissearchengine.dataManager.dataEnums;
import com.darkweb.genesissearchengine.eventObserver;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import static com.darkweb.genesissearchengine.constants.strings.BOOKMARK_SETTING_VALIDATION_ERROR_1;
import static com.darkweb.genesissearchengine.constants.strings.BOOKMARK_SETTING_VALIDATION_ERROR_2;
class bookmarkSettingModel
{
/* Private Variables */
private AppCompatActivity mContext;
private eventObserver.eventListener mEvent;
private int mBookmarkID;
public bookmarkSettingModel(AppCompatActivity pContext, eventObserver.eventListener pEvent, int pBookmarkID){
this.mContext = pContext;
this.mEvent = pEvent;
this.mBookmarkID = pBookmarkID;
}
/* Helper Methods */
private int getBookarkID(){
return mBookmarkID;
}
private void onUpdateBookmark(String pBookmarkName, String pBookmarkURL){
boolean status = validateForm(pBookmarkName, pBookmarkURL);
if(status){
dataController.getInstance().invokeBookmark(dataEnums.eBookmarkCommands.M_UPDATE_BOOKMARK, Arrays.asList(pBookmarkName, pBookmarkURL, mBookmarkID));
mEvent.invokeObserver(null, bookmarkSettingEnums.eBookmarkSettingModelCallbackCommands.M_CLOSE);
}
}
private boolean validateForm(String pBookmarkName, String pBookmarkURL){
mEvent.invokeObserver(null, bookmarkSettingEnums.eBookmarkSettingModelCallbackCommands.M_CLEAR_FORM);
boolean mStatus = true;
if(pBookmarkName.equals(strings.GENERIC_EMPTY_STR)){
mEvent.invokeObserver(Arrays.asList(BOOKMARK_SETTING_VALIDATION_ERROR_1, false), bookmarkSettingEnums.eBookmarkSettingModelCallbackCommands.M_BOOKMARK_NAME_VALIDATION_ERROR);
mStatus = false;
}else {
mEvent.invokeObserver(Arrays.asList(BOOKMARK_SETTING_VALIDATION_ERROR_1, true), bookmarkSettingEnums.eBookmarkSettingModelCallbackCommands.M_BOOKMARK_NAME_VALIDATION_ERROR);
}
if(pBookmarkURL.equals(strings.GENERIC_EMPTY_STR)){
mEvent.invokeObserver(Arrays.asList(strings.BOOKMARK_SETTING_VALIDATION_ERROR_2, false), bookmarkSettingEnums.eBookmarkSettingModelCallbackCommands.M_BOOKMARK_URL_VALIDATION_ERROR);
mStatus = false;
}else {
mEvent.invokeObserver(Arrays.asList(BOOKMARK_SETTING_VALIDATION_ERROR_2, true), bookmarkSettingEnums.eBookmarkSettingModelCallbackCommands.M_BOOKMARK_URL_VALIDATION_ERROR);
}
return mStatus;
}
/* Event Observer */
public Object onTrigger(bookmarkSettingEnums.eBookmarkSettingModelCommands pCommands, List<Object> pData){
if(bookmarkSettingEnums.eBookmarkSettingModelCommands.M_GET_BOOKMARK_ID.equals(pCommands)){
return getBookarkID();
}
if(bookmarkSettingEnums.eBookmarkSettingModelCommands.M_UPDATE_BOOKMARK.equals(pCommands)){
onUpdateBookmark((String) pData.get(0), (String) pData.get(1));
}
if(bookmarkSettingEnums.eBookmarkSettingModelCommands.M_VALIDATE_FORM.equals(pCommands)){
validateForm((String) pData.get(0), (String) pData.get(1));
}
return null;
}
}

View File

@ -0,0 +1,131 @@
package com.darkweb.genesissearchengine.appManager.bookmarkManager.BookmarkSettings;
import android.widget.EditText;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.appManager.settingManager.settingHomeManager.settingHomeEnums;
import com.darkweb.genesissearchengine.eventObserver;
import com.darkweb.genesissearchengine.helperManager.helperMethod;
import com.darkweb.genesissearchengine.helperManager.sharedUIMethod;
import com.example.myapplication.R;
import org.xmlpull.v1.XmlPullParserException;
import java.io.IOException;
import java.util.List;
import static com.darkweb.genesissearchengine.appManager.bookmarkManager.BookmarkSettings.bookmarkSettingEnums.eBookmarkSettingModelCallbackCommands.M_BOOKMARK_NAME_VALIDATION_ERROR;
import static com.darkweb.genesissearchengine.appManager.bookmarkManager.BookmarkSettings.bookmarkSettingEnums.eBookmarkSettingModelCallbackCommands.M_BOOKMARK_URL_VALIDATION_ERROR;
class bookmarkSettingViewController
{
/* Private Variables */
private AppCompatActivity mContext;
private eventObserver.eventListener mEvent;
/* UI Variables */
private EditText mBookmarName;
private EditText mBookmarURL;
private TextView mBookmarkNameError;
private TextView mBookmarkURLError;
/* Initializations */
bookmarkSettingViewController(AppCompatActivity pContext, eventObserver.eventListener pEvent,EditText pBookmarName,EditText pBookmarURL, TextView pBookmarkNameError, TextView pBookmarkURLError)
{
this.mContext = pContext;
this.mEvent = pEvent;
this.mBookmarName = pBookmarName;
this.mBookmarURL = pBookmarURL;
this.mBookmarkNameError = pBookmarkNameError;
this.mBookmarkURLError = pBookmarkURLError;
initPostUI();
}
private void initPostUI(){
sharedUIMethod.updateStatusBar(mContext);
}
private void initializeBookmark(String pBookmarkName, String pBookmarkURL){
mBookmarName.setText(pBookmarkName);
mBookmarURL.setText(pBookmarkURL);
}
private String getBookmarkName(){
return mBookmarName.getText().toString();
}
private String getBookmarkURL(){
return mBookmarURL.getText().toString();
}
private void mBookmarkNameValidationError(bookmarkSettingEnums.eBookmarkSettingViewCommands pCommands, String pMessage, boolean pStatus){
try {
if(pCommands.equals(bookmarkSettingEnums.eBookmarkSettingViewCommands.M_BOOKMARK_NAME_VALIDATION_ERROR)){
if(!pStatus){
mBookmarName.setBackground(helperMethod.getDrawableXML(mContext, R.xml.gx_generic_input_error));
mBookmarkNameError.animate().setDuration(150).alpha(1);
mBookmarkNameError.setText(pMessage);
}else {
mBookmarName.setBackground(helperMethod.getDrawableXML(mContext, R.xml.gx_generic_input));
mBookmarkNameError.animate().setDuration(150).alpha(0);
mBookmarkNameError.setText(pMessage);
}
}
if(pCommands.equals(bookmarkSettingEnums.eBookmarkSettingViewCommands.M_BOOKMARK_URL_VALIDATION_ERROR)){
if(!pStatus){
mBookmarURL.setBackground(helperMethod.getDrawableXML(mContext, R.xml.gx_generic_input_error));
mBookmarkURLError.animate().setDuration(150).alpha(1);
mBookmarkURLError.setText(pMessage);
}else {
mBookmarURL.setBackground(helperMethod.getDrawableXML(mContext, R.xml.gx_generic_input));
mBookmarkURLError.animate().setDuration(150).alpha(0);
mBookmarkURLError.setText(pMessage);
}
}
} catch (Exception ignored) {
}
}
private void onClearForm(){
try {
mBookmarName.setBackground(helperMethod.getDrawableXML(mContext, R.xml.gx_generic_input));
mBookmarURL.setBackground(helperMethod.getDrawableXML(mContext, R.xml.gx_generic_input));
} catch (Exception ignored) {
}
}
/* Event Observer */
public Object onTrigger(bookmarkSettingEnums.eBookmarkSettingViewCommands pCommands, List<Object> pData){
if(bookmarkSettingEnums.eBookmarkSettingViewCommands.M_INITIALIZE.equals(pCommands)){
initializeBookmark((String)pData.get(0), (String) pData.get(1));
}
if(pCommands.equals(bookmarkSettingEnums.eBookmarkSettingViewCommands.M_BOOKMARK_NAME_VALIDATION_ERROR) || pCommands.equals(bookmarkSettingEnums.eBookmarkSettingViewCommands.M_BOOKMARK_URL_VALIDATION_ERROR)){
mBookmarkNameValidationError(pCommands, (String)pData.get(0), (boolean)pData.get(1));
}
return null;
}
public Object onTrigger(bookmarkSettingEnums.eBookmarkSettingViewCommands pCommands){
if(bookmarkSettingEnums.eBookmarkSettingViewCommands.M_GET_BOOKMARK_NAME.equals(pCommands)){
return getBookmarkName();
}
else if(bookmarkSettingEnums.eBookmarkSettingViewCommands.M_GET_BOOKMARK_URL.equals(pCommands)){
return getBookmarkURL();
}
else if(bookmarkSettingEnums.eBookmarkSettingViewCommands.M_CLEAR_FORM.equals(pCommands)){
onClearForm();
}
return null;
}
}

View File

@ -1,4 +1,4 @@
package com.darkweb.genesissearchengine.appManager.bookmarkManager; package com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkHome;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.content.Context; import android.content.Context;
@ -19,7 +19,6 @@ import com.darkweb.genesissearchengine.dataManager.models.bookmarkRowModel;
import com.darkweb.genesissearchengine.eventObserver; import com.darkweb.genesissearchengine.eventObserver;
import com.darkweb.genesissearchengine.helperManager.helperMethod; import com.darkweb.genesissearchengine.helperManager.helperMethod;
import com.example.myapplication.R; import com.example.myapplication.R;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
@ -158,7 +157,7 @@ public class bookmarkAdapter extends RecyclerView.Adapter<bookmarkAdapter.listVi
@Override @Override
public listViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { public listViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
mListHolderContext = parent.getContext(); mListHolderContext = parent.getContext();
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.history_bookmark_row_view, parent, false); View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.bookmark_row_view, parent, false);
return new listViewHolder(view); return new listViewHolder(view);
} }
@ -377,7 +376,7 @@ public class bookmarkAdapter extends RecyclerView.Adapter<bookmarkAdapter.listVi
/*View Holder Extensions*/ /*View Holder Extensions*/
class listViewHolder extends RecyclerView.ViewHolder class listViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener
{ {
TextView mHeader; TextView mHeader;
TextView mDescription; TextView mDescription;
@ -390,6 +389,7 @@ public class bookmarkAdapter extends RecyclerView.Adapter<bookmarkAdapter.listVi
LinearLayout mDateContainer; LinearLayout mDateContainer;
LinearLayout mLoadingContainer; LinearLayout mLoadingContainer;
ImageView mHindTypeIconTemp; ImageView mHindTypeIconTemp;
ImageButton mBookmarkEdit;
listViewHolder(View itemView) { listViewHolder(View itemView) {
super(itemView); super(itemView);
@ -406,6 +406,7 @@ public class bookmarkAdapter extends RecyclerView.Adapter<bookmarkAdapter.listVi
mWebLogo = itemView.findViewById(R.id.pWebLogo); mWebLogo = itemView.findViewById(R.id.pWebLogo);
mLoadingContainer = itemView.findViewById(R.id.pLoadingContainer); mLoadingContainer = itemView.findViewById(R.id.pLoadingContainer);
mFaviconLogo = itemView.findViewById(R.id.pFaviconLogo); mFaviconLogo = itemView.findViewById(R.id.pFaviconLogo);
mBookmarkEdit = itemView.findViewById(R.id.pBookmarkEdit);
mHindTypeIconTemp = new ImageView(mContext); mHindTypeIconTemp = new ImageView(mContext);
if(model.getID() == -1){ if(model.getID() == -1){
@ -442,7 +443,11 @@ public class bookmarkAdapter extends RecyclerView.Adapter<bookmarkAdapter.listVi
mHeader.setText(model.getHeader()); mHeader.setText(model.getHeader());
mWebLogo.setText((helperMethod.getDomainName(model.getHeader()).toUpperCase().charAt(0)+"")); mWebLogo.setText((helperMethod.getDomainName(model.getHeader()).toUpperCase().charAt(0)+""));
String header = model.getHeader(); String header = model.getHeader();
mDescription.setText(("https://"+model.getDescription())); mDescription.setText(model.getDescription());
if(!model.getDescription().startsWith("http://") && !model.getDescription().startsWith("https://"))
{
mDescription.setText("https://" + mDescription.getText().toString());
}
if(model.getDescription().contains("genesishiddentechnologies.com") || model.getDescription().contains("genesis.onion")){ if(model.getDescription().contains("genesishiddentechnologies.com") || model.getDescription().contains("genesis.onion")){
mFaviconLogo.setImageDrawable(itemView.getResources().getDrawable(R.drawable.genesis)); mFaviconLogo.setImageDrawable(itemView.getResources().getDrawable(R.drawable.genesis));
@ -475,6 +480,7 @@ public class bookmarkAdapter extends RecyclerView.Adapter<bookmarkAdapter.listVi
}.start(); }.start();
} }
mRowMenu.setOnClickListener(this::onClick);
setItemViewOnClickListener(mRowContainer, mRowMenu, mDescription.getText().toString(), p_position, header, mRowMenu, mLogoImage, model.getID(), model.getDate()); setItemViewOnClickListener(mRowContainer, mRowMenu, mDescription.getText().toString(), p_position, header, mRowMenu, mLogoImage, model.getID(), model.getDate());
} }
@ -491,6 +497,15 @@ public class bookmarkAdapter extends RecyclerView.Adapter<bookmarkAdapter.listVi
}else if(mLogoImage.getAlpha()>0){ }else if(mLogoImage.getAlpha()>0){
mPopupWindow = (PopupWindow) mHistroyAdapterView.onTrigger(bookmarkEnums.eBookmarkViewAdapterCommands.M_CLEAR_HIGHLIGHT, Arrays.asList(mRowContainer, mRowMenu, mLogoImage, true, false)); mPopupWindow = (PopupWindow) mHistroyAdapterView.onTrigger(bookmarkEnums.eBookmarkViewAdapterCommands.M_CLEAR_HIGHLIGHT, Arrays.asList(mRowContainer, mRowMenu, mLogoImage, true, false));
} }
mBookmarkEdit.setOnClickListener(this::onClick);
}
@Override
public void onClick(View view) {
if(view.getId() == R.id.pBookmarkEdit){
mEvent.invokeObserver(Arrays.asList(mHeader.getText(), mDescription.getText(), mModelList.get(getLayoutPosition()).getID()), enums.etype.M_OPEN_BOOKMARK_SETTING);
}
} }
} }

View File

@ -1,4 +1,4 @@
package com.darkweb.genesissearchengine.appManager.bookmarkManager; package com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkHome;
import android.graphics.Color; import android.graphics.Color;
import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.ColorDrawable;

View File

@ -1,6 +1,7 @@
package com.darkweb.genesissearchengine.appManager.bookmarkManager; package com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkHome;
import android.content.Context; import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.graphics.Canvas; import android.graphics.Canvas;
import android.graphics.Rect; import android.graphics.Rect;
@ -23,6 +24,7 @@ import androidx.recyclerview.widget.ItemTouchHelper;
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.bookmarkManager.BookmarkSettings.bookmarkSettingController;
import com.darkweb.genesissearchengine.dataManager.models.bookmarkRowModel; import com.darkweb.genesissearchengine.dataManager.models.bookmarkRowModel;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.editTextManager; import com.darkweb.genesissearchengine.appManager.homeManager.homeController.editTextManager;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController; import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
@ -43,7 +45,7 @@ import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.List; 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.bookmarkHome.bookmarkEnums.eBookmarkViewCommands.M_VERTIFY_SELECTION_MENU;
import static com.darkweb.genesissearchengine.constants.sql.SQL_CLEAR_BOOKMARK; import static com.darkweb.genesissearchengine.constants.sql.SQL_CLEAR_BOOKMARK;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.M_CLEAR_BOOKMARK; import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.M_CLEAR_BOOKMARK;
@ -54,10 +56,10 @@ public class bookmarkController extends AppCompatActivity
private bookmarkModel mbookmarkModel; private bookmarkModel mbookmarkModel;
private homeController mHomeController; private homeController mHomeController;
private activityContextManager mContextManager;
private bookmarkAdapter mbookmarkAdapter; private bookmarkAdapter mbookmarkAdapter;
private LinearLayout mHeaderContainer; private LinearLayout mHeaderContainer;
private TextView mTitle; private TextView mTitle;
/*Private Views*/ /*Private Views*/
private ImageView mEmptyListNotification; private ImageView mEmptyListNotification;
@ -96,10 +98,9 @@ public class bookmarkController extends AppCompatActivity
public void initializeListModel(){ public void initializeListModel(){
mbookmarkModel = new bookmarkModel(); mbookmarkModel = new bookmarkModel();
mContextManager = activityContextManager.getInstance();
mHomeController = activityContextManager.getInstance().getHomeController(); mHomeController = activityContextManager.getInstance().getHomeController();
mContextManager.setBookmarkController(this);
} }
public void initializeViews(){ public void initializeViews(){
mEmptyListNotification = findViewById(R.id.pEmptyListNotification); mEmptyListNotification = findViewById(R.id.pEmptyListNotification);
mSearchInput = findViewById(R.id.pSearchInput); mSearchInput = findViewById(R.id.pSearchInput);
@ -248,6 +249,10 @@ public class bookmarkController extends AppCompatActivity
activityContextManager.getInstance().setCurrentActivity(this); activityContextManager.getInstance().setCurrentActivity(this);
status.sSettingIsAppPaused = false; status.sSettingIsAppPaused = false;
activityContextManager.getInstance().onStack(this); activityContextManager.getInstance().onStack(this);
if(mbookmarkAdapter!=null){
mbookmarkAdapter.notifyDataSetChanged();
}
super.onResume(); super.onResume();
} }
@ -271,7 +276,7 @@ public class bookmarkController extends AppCompatActivity
} }
} }
/*External XML Listeners*/ /* UI Redirection */
public void onBackPressed(View view){ public void onBackPressed(View view){
onBackPressed(); onBackPressed();
@ -323,6 +328,13 @@ public class bookmarkController extends AppCompatActivity
mRecycleView.setAlpha(0); mRecycleView.setAlpha(0);
} }
public void onOpenBookmarkSetting() {
Intent intent = new Intent(getApplicationContext(), bookmarkSettingController.class);
startActivity(intent);
}
/*Event Observer*/
public class edittextManagerCallback implements eventObserver.eventListener { public class edittextManagerCallback implements eventObserver.eventListener {
@Override @Override
@ -335,8 +347,6 @@ public class bookmarkController extends AppCompatActivity
} }
} }
/*Event Observer*/
public class adapterCallback implements eventObserver.eventListener{ public class adapterCallback implements eventObserver.eventListener{
@Override @Override
public Object invokeObserver(List<Object> data, Object e_type) public Object invokeObserver(List<Object> data, Object e_type)
@ -370,6 +380,13 @@ public class bookmarkController extends AppCompatActivity
else if(e_type.equals(enums.etype.on_verify_selected_url_menu)){ else if(e_type.equals(enums.etype.on_verify_selected_url_menu)){
mbookmarkViewController.onTrigger(M_VERTIFY_SELECTION_MENU, data); mbookmarkViewController.onTrigger(M_VERTIFY_SELECTION_MENU, data);
} }
else if(e_type.equals(enums.etype.M_OPEN_BOOKMARK_SETTING)){
Intent intent = new Intent(getApplicationContext(), bookmarkSettingController.class);
intent.putExtra(keys.BOOKMARK_SETTING_NAME, (String) data.get(0));
intent.putExtra(keys.BOOKMARK_SETTING_URL, (String) data.get(1));
intent.putExtra(keys.BOOKMARK_SETTING_ID, (int) data.get(2));
startActivity(intent);
}
return null; return null;
} }
} }

View File

@ -1,4 +1,4 @@
package com.darkweb.genesissearchengine.appManager.bookmarkManager; package com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkHome;
public class bookmarkEnums public class bookmarkEnums
{ {

View File

@ -1,4 +1,4 @@
package com.darkweb.genesissearchengine.appManager.bookmarkManager; package com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkHome;
import com.darkweb.genesissearchengine.dataManager.models.bookmarkRowModel; import com.darkweb.genesissearchengine.dataManager.models.bookmarkRowModel;
@ -17,13 +17,13 @@ class bookmarkModel
mModelList = model; mModelList = model;
} }
private void removeFromMainList(int index) private void removeFromList(int index)
{ {
mModelList.remove(index); mModelList.remove(index);
} }
void onManualClear(int index){ void onManualClear(int index){
removeFromMainList(index); removeFromList(index);
} }
void clearList(){ void clearList(){

View File

@ -1,4 +1,4 @@
package com.darkweb.genesissearchengine.appManager.bookmarkManager; package com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkHome;
import android.content.Context; import android.content.Context;
import android.graphics.Bitmap; import android.graphics.Bitmap;
@ -7,7 +7,6 @@ import android.graphics.Canvas;
import android.graphics.Paint; import android.graphics.Paint;
import android.graphics.RectF; import android.graphics.RectF;
import android.os.Build; import android.os.Build;
import android.os.Handler;
import android.view.View; import android.view.View;
import android.view.Window; import android.view.Window;
import android.view.WindowManager; import android.view.WindowManager;
@ -29,15 +28,11 @@ import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.ItemTouchHelper; import androidx.recyclerview.widget.ItemTouchHelper;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.darkweb.genesissearchengine.constants.enums;
import com.darkweb.genesissearchengine.constants.status; import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.constants.strings; import com.darkweb.genesissearchengine.constants.strings;
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 com.example.myapplication.R; import com.example.myapplication.R;
import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;

View File

@ -192,7 +192,7 @@ public class geckoClients
mSession.getSettings().setUserAgentMode(USER_AGENT_MODE_MOBILE ); mSession.getSettings().setUserAgentMode(USER_AGENT_MODE_MOBILE );
mSession.getSettings().setAllowJavascript(status.sSettingJavaStatus); mSession.getSettings().setAllowJavascript(status.sSettingJavaStatus);
onUpdateFont(); onUpdateFont();
onReload(mNestedGeckoView, pcontext); onReload(mNestedGeckoView, pcontext,false);
} }
public void resetSession(){ public void resetSession(){
@ -308,7 +308,7 @@ public class geckoClients
public void onBackPressed(boolean isFinishAllowed, int mTabSize, NestedGeckoView mNestedGeckoView, AppCompatActivity pcontext){ public void onBackPressed(boolean isFinishAllowed, int mTabSize, NestedGeckoView mNestedGeckoView, AppCompatActivity pcontext){
if(mSession.canGoBack()){ if(mSession.canGoBack()){
mSession.goBackSession(); mSession.goBackSession();
mSession.onUpdateBannerAdvert(); //mSession.onUpdateBannerAdvert();
} }
else if(isFinishAllowed){ else if(isFinishAllowed){
if(mSession.getRemovableFromBackPressed() && mTabSize>1){ if(mSession.getRemovableFromBackPressed() && mTabSize>1){
@ -362,12 +362,12 @@ public class geckoClients
mSession.stop(); mSession.stop();
} }
public void onReload(NestedGeckoView mNestedGeckoView, AppCompatActivity pcontext){ public void onReload(NestedGeckoView mNestedGeckoView, AppCompatActivity pcontext, boolean isThemeCall){
mSession.stop(); mSession.stop();
String url = mSession.getCurrentURL(); String url = mSession.getCurrentURL();
if(url.startsWith("https://genesishiddentechnologies.com/?pG") || url.startsWith("https://genesishiddentechnologies.com?pG") || url.endsWith("genesishiddentechnologies.com") || url.contains(constants.CONST_GENESIS_HELP_URL_SUB) || url.contains(constants.CONST_GENESIS_HELP_URL_CACHE) || url.contains(constants.CONST_GENESIS_HELP_URL_CACHE_DARK)){ if(url.startsWith("https://genesishiddentechnologies.com/?pG") || url.startsWith("https://genesishiddentechnologies.com?pG") || url.endsWith("genesishiddentechnologies.com") || url.contains(constants.CONST_GENESIS_HELP_URL_SUB) || url.contains(constants.CONST_GENESIS_HELP_URL_CACHE) || url.contains(constants.CONST_GENESIS_HELP_URL_CACHE_DARK)){
loadURL(mSession.getCurrentURL(), mNestedGeckoView, pcontext); loadURL(mSession.getCurrentURL(), mNestedGeckoView, pcontext);
}else{ }else if(!isThemeCall){
mSession.reload(); mSession.reload();
} }
} }

View File

@ -29,6 +29,7 @@ import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.NotificationCompat; import androidx.core.app.NotificationCompat;
import androidx.core.content.FileProvider; import androidx.core.content.FileProvider;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
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.status; import com.darkweb.genesissearchengine.constants.status;
@ -74,6 +75,7 @@ import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_URL_CACHED_DARK; import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_URL_CACHED_DARK;
import static com.darkweb.genesissearchengine.constants.enums.etype.M_DEFAULT_BROWSER; import static com.darkweb.genesissearchengine.constants.enums.etype.M_DEFAULT_BROWSER;
import static com.darkweb.genesissearchengine.constants.enums.etype.M_RATE_COUNT; import static com.darkweb.genesissearchengine.constants.enums.etype.M_RATE_COUNT;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.M_APPLICATION_CRASH;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.M_LONG_PRESS_URL; import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.M_LONG_PRESS_URL;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.M_LONG_PRESS_WITH_LINK; import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.M_LONG_PRESS_WITH_LINK;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManagerCallbacks.M_RATE_APPLICATION; import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManagerCallbacks.M_RATE_APPLICATION;
@ -1081,8 +1083,18 @@ geckoSession extends GeckoSession implements GeckoSession.MediaDelegate,GeckoSes
goBack(); goBack();
try { try {
if (mHistoryList!=null && mHistoryList.size()>=1) if (mHistoryList!=null && mHistoryList.size()>=1){
event.invokeObserver(Arrays.asList(mHistoryList.get(mHistoryList.getCurrentIndex()-1).getUri(),mSessionID,mCurrentTitle, m_current_url_id, mTheme, this), enums.etype.ON_UPDATE_SEARCH_BAR); if(mHistoryList.getCurrentIndex()-1>=0 && mHistoryList.getCurrentIndex()-1<mHistoryList.size()){
String mURL = mHistoryList.get(mHistoryList.getCurrentIndex()-1).getUri();
if(mURL.startsWith("resource://")){
new Handler().postDelayed(() ->
{
event.invokeObserver(Arrays.asList(mCurrentURL,mSessionID,mCurrentTitle, false), enums.etype.M_ON_BANNER_UPDATE);
}, 0);
}
}
event.invokeObserver(Arrays.asList(mCurrentURL,mSessionID,mCurrentTitle, m_current_url_id), enums.etype.ON_FIRST_PAINT);
}
}catch (Exception ignored){} }catch (Exception ignored){}
} }

View File

@ -44,7 +44,7 @@ import androidx.fragment.app.FragmentContainerView;
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.bookmarkManager.bookmarkController; import com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkHome.bookmarkController;
import com.darkweb.genesissearchengine.appManager.historyManager.historyController; import com.darkweb.genesissearchengine.appManager.historyManager.historyController;
import com.darkweb.genesissearchengine.dataManager.models.historyRowModel; import com.darkweb.genesissearchengine.dataManager.models.historyRowModel;
import com.darkweb.genesissearchengine.appManager.homeManager.geckoManager.NestedGeckoView; import com.darkweb.genesissearchengine.appManager.homeManager.geckoManager.NestedGeckoView;
@ -95,12 +95,12 @@ import java.util.Objects;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK; import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
import static android.content.Intent.FLAG_ACTIVITY_NO_ANIMATION; import static android.content.Intent.FLAG_ACTIVITY_NO_ANIMATION;
import static androidx.appcompat.app.AppCompatDelegate.setDefaultNightMode;
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_HELP_URL_CACHE; import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_HELP_URL_CACHE;
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_HELP_URL_CACHE_DARK; import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_HELP_URL_CACHE_DARK;
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_URL_CACHED; import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_URL_CACHED;
import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_URL_CACHED_DARK; import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_URL_CACHED_DARK;
import static com.darkweb.genesissearchengine.constants.enums.etype.GECKO_SCROLL_DOWN; import static com.darkweb.genesissearchengine.constants.enums.etype.GECKO_SCROLL_DOWN;
import static com.darkweb.genesissearchengine.constants.enums.etype.GECKO_SCROLL_DOWN_MOVE;
import static com.darkweb.genesissearchengine.constants.enums.etype.GECKO_SCROLL_UP_MOVE; import static com.darkweb.genesissearchengine.constants.enums.etype.GECKO_SCROLL_UP_MOVE;
import static com.darkweb.genesissearchengine.constants.enums.etype.M_INITIALIZE_TAB_LINK; import static com.darkweb.genesissearchengine.constants.enums.etype.M_INITIALIZE_TAB_LINK;
import static com.darkweb.genesissearchengine.constants.enums.etype.M_INITIALIZE_TAB_SINGLE; import static com.darkweb.genesissearchengine.constants.enums.etype.M_INITIALIZE_TAB_SINGLE;
@ -204,19 +204,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.home_view); setContentView(R.layout.home_view);
/* Thread.setDefaultUncaughtExceptionHandler((t, e) -> {
status.sSettingIsAppStarted = false;
finishAndRemoveTask();
Intent intent = new Intent(this, homeController.class);
intent.addFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_NO_ANIMATION);
intent.putExtra("crash",true);
this.startActivity(intent);
this.finish();
Runtime.getRuntime().exit(0);
}); */
initPreFixes(); initPreFixes();
activityContextManager.getInstance().setHomeController(this); activityContextManager.getInstance().setHomeController(this);
pluginController.getInstance().initializeAllServices(this); pluginController.getInstance().initializeAllServices(this);
@ -594,8 +581,9 @@ public class homeController extends AppCompatActivity implements ComponentCallba
dataController.getInstance().invokeTab(dataEnums.eTabCommands.MOVE_TAB_TO_TOP, Collections.singletonList(mTempSession)); dataController.getInstance().invokeTab(dataEnums.eTabCommands.MOVE_TAB_TO_TOP, Collections.singletonList(mTempSession));
} }
if(mTempSession.isOpen()){ if(mTempSession.isOpen() ){
if(mTempSession.getSessionID().equals(mGeckoClient.getSession().getSessionID())){ Log.i("SUPERFUCKKKKK", "SUPERFUCKKKKK : " + (mTempSession.getSessionID()==null) + " -- " + (mGeckoClient == null) + " -- " + (mGeckoClient.getSession().getSessionID() == null));
if(mGeckoClient.getSession()!=null && mTempSession.getSessionID().equals(mGeckoClient.getSession().getSessionID())){
return; return;
} }
} }
@ -1177,11 +1165,10 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} }
public void onOpenTabViewBoundary(View view){ public void onOpenTabViewBoundary(View view){
onInvokePixelGenerator();
if(mScrollHandler!=null){ if(mScrollHandler!=null){
mScrollHandler.removeCallbacksAndMessages(null); // mScrollHandler.removeCallbacksAndMessages(null);
} }
onInvokePixelGenerator(); // onInvokePixelGenerator();
mNewTab.setPressed(true); mNewTab.setPressed(true);
onOpenTabReady(); onOpenTabReady();
} }
@ -1441,7 +1428,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
if(status.sSettingIsAppStarted && !status.mThemeApplying){ if(status.sSettingIsAppStarted && !status.mThemeApplying){
if(mGeckoClient.getSession().wasPreviousErrorPage()){ if(mGeckoClient.getSession().wasPreviousErrorPage()){
pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_NEW_CIRCUIT); pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_NEW_CIRCUIT);
mGeckoClient.onReload(mGeckoView, this); mGeckoClient.onReload(mGeckoView, this, false);
} }
} }
@ -1735,7 +1722,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
{ {
pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_NEW_CIRCUIT); pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_NEW_CIRCUIT);
pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(this), M_NEW_IDENTITY); pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(this), M_NEW_IDENTITY);
mGeckoClient.onReload(mGeckoView, this); mGeckoClient.onReload(mGeckoView, this, false);
} }
else if (menuId == R.id.pMenuOpenCurrentTab) else if (menuId == R.id.pMenuOpenCurrentTab)
{ {
@ -1810,7 +1797,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
if (menuId == R.id.menu26 || menuId == R.id.menu27) { if (menuId == R.id.menu26 || menuId == R.id.menu27) {
helperMethod.hideKeyboard(this); helperMethod.hideKeyboard(this);
mGeckoClient.toogleUserAgent(); mGeckoClient.toogleUserAgent();
mGeckoClient.onReload(mGeckoView, homeController.this); mGeckoClient.onReload(mGeckoView, homeController.this, false);
} }
if(menuId == R.id.menu25){ if(menuId == R.id.menu25){
helperMethod.hideKeyboard(this); helperMethod.hideKeyboard(this);
@ -1824,14 +1811,14 @@ public class homeController extends AppCompatActivity implements ComponentCallba
if(status.mThemeApplying){ if(status.mThemeApplying){
if(status.sTheme == enums.Theme.THEME_DARK){ if(status.sTheme == enums.Theme.THEME_DARK){
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES); setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
}else if(status.sTheme == enums.Theme.THEME_LIGHT){ }else if(status.sTheme == enums.Theme.THEME_LIGHT){
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO); setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
}else { }else {
if(!status.sDefaultNightMode){ if(!status.sDefaultNightMode){
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO); setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
}else { }else {
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES); setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
} }
} }
} }
@ -1861,7 +1848,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
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.VPN_ENABLED,false)); dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.BRIDGE_VPN_ENABLED,false));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.BRIDGE_ENABLES,false)); dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.BRIDGE_ENABLES,false));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_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));
@ -2196,7 +2183,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
public void onInvokePixelGenerator(){ public void onInvokePixelGenerator(){
if(mTabFragment==null || mTabFragment.getVisibility()==View.VISIBLE){ if(mNewTab.isPressed() || mTabFragment==null || mTabFragment.getVisibility()==View.VISIBLE){
return; return;
} }
@ -2209,9 +2196,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
try{ try{
mRenderedBitmap = mGeckoView.capturePixels(); mRenderedBitmap = mGeckoView.capturePixels();
}catch (Exception ex){ }catch (Exception ignored){}
Log.i("FIZZAHFUCK1","asd : " + ex.getMessage());
}
new Handler().postDelayed(() -> new Handler().postDelayed(() ->
{ {
if(mTabFragment!=null && mGeckoClient.getSession()!=null){ if(mTabFragment!=null && mGeckoClient.getSession()!=null){
@ -2250,6 +2235,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
else if(e_type.equals(enums.etype.M_ON_BANNER_UPDATE)){ else if(e_type.equals(enums.etype.M_ON_BANNER_UPDATE)){
Object mAdvertResponse = pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED); Object mAdvertResponse = pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED);
if(mAdvertResponse != null){ if(mAdvertResponse != null){
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), true);
mHomeViewController.updateBannerAdvertStatus((boolean)data.get(3), (boolean)mAdvertResponse); mHomeViewController.updateBannerAdvertStatus((boolean)data.get(3), (boolean)mAdvertResponse);
} }
} }
@ -2300,7 +2286,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_IS_BOOTSTRAPPED,true)); dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_IS_BOOTSTRAPPED,true));
mHomeViewController.onPageFinished(); mHomeViewController.onPageFinished();
mGeckoClient.onRedrawPixel(homeController.this); mGeckoClient.onRedrawPixel(homeController.this);
mHomeViewController.onFullScreen(true);
} }
else if(e_type.equals(M_RATE_APPLICATION)){ else if(e_type.equals(M_RATE_APPLICATION)){
if(!status.sSettingIsAppRated){ if(!status.sSettingIsAppRated){
@ -2379,6 +2364,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} }
else if(e_type.equals(enums.etype.M_UPDATE_PIXEL_BACKGROUND)){ else if(e_type.equals(enums.etype.M_UPDATE_PIXEL_BACKGROUND)){
onInvokePixelGenerator(); onInvokePixelGenerator();
mHomeViewController.onFullScreen(true);
} }
else if(e_type.equals(enums.etype.M_INIT_PADDING)){ else if(e_type.equals(enums.etype.M_INIT_PADDING)){
mHomeViewController.initTopBarPadding(); mHomeViewController.initTopBarPadding();
@ -2400,7 +2386,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
else if(e_type.equals(enums.etype.M_NEW_IDENTITY_MESSAGED)){ else if(e_type.equals(enums.etype.M_NEW_IDENTITY_MESSAGED)){
pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_NEW_CIRCUIT); pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_NEW_CIRCUIT);
pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(homeController.this), M_NEW_IDENTITY); pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(homeController.this), M_NEW_IDENTITY);
mGeckoClient.onReload(mGeckoView, homeController.this); mGeckoClient.onReload(mGeckoView, homeController.this, false);
} }
return null; return null;
} }

View File

@ -595,8 +595,8 @@ class homeViewController
initSplashLoading(); initSplashLoading();
}); });
mGatewaySplash.animate().setDuration(350).alpha(0.4f); mGatewaySplash.animate().setDuration(350).alpha(0.4f);
mPanicButton.animate().setDuration(250).alpha(0f); mPanicButtonLandscape.animate().setDuration(200).translationXBy(helperMethod.pxFromDp(50));
mPanicButtonLandscape.animate().setDuration(250).alpha(0f); mPanicButton.animate().setDuration(200).translationXBy(helperMethod.pxFromDp(50));
} }
private void initSplashScreen(){ private void initSplashScreen(){
@ -930,10 +930,12 @@ class homeViewController
mBannerAds.setVisibility(View.GONE); mBannerAds.setVisibility(View.GONE);
} }
} }
onFullScreen(false);
} }
void updateBannerAdvertStatus(boolean status, boolean pIsAdvertLoaded){ void updateBannerAdvertStatus(boolean status, boolean pIsAdvertLoaded){
if(status && pIsAdvertLoaded){ Object mCurrentURL = mEvent.invokeObserver(null, enums.etype.M_GET_CURRENT_URL);
if(status && pIsAdvertLoaded && !((String)mCurrentURL).contains("genesis")){
if(mBannerAds.getAlpha()==0){ if(mBannerAds.getAlpha()==0){
mBannerAds.animate().cancel(); mBannerAds.animate().cancel();
mBannerAds.setAlpha(0); mBannerAds.setAlpha(0);
@ -941,19 +943,20 @@ class homeViewController
mBannerAds.setVisibility(View.VISIBLE); mBannerAds.setVisibility(View.VISIBLE);
} }
onSetBannerAdMargin(true,true); onSetBannerAdMargin(true,true);
}else{ } /* else if(mBannerAds.getVisibility() != View.VISIBLE){
if(mBannerAds.getAlpha()==1){ if(mBannerAds.getAlpha()==1){
mBannerAds.animate().cancel(); mBannerAds.animate().cancel();
mBannerAds.animate().alpha(0).withEndAction(() -> mBannerAds.setVisibility(View.GONE)); mBannerAds.animate().alpha(0).withEndAction(() -> mBannerAds.setVisibility(View.GONE));
} }
onSetBannerAdMargin(false,true); onSetBannerAdMargin(false,true);
} } */
} }
private Handler searchBarUpdateHandler = new Handler(); private Handler searchBarUpdateHandler = new Handler();
private String handlerLocalUrl = ""; private String handlerLocalUrl = "";
void onUpdateSearchBar(String url,boolean showProtocol, boolean pClearText, boolean pBypassFocus){ void onUpdateSearchBar(String url,boolean showProtocol, boolean pClearText, boolean pBypassFocus){
if(url.endsWith("genesisconfigurenewidentity.com/")){ if(url.endsWith("genesisconfigurenewidentity.com/")){
return; return;
} }
@ -1397,7 +1400,10 @@ class homeViewController
} }
if(pStatus){ if(pStatus){
onProgressBarUpdate(100, false); if(mProgressBar.getAlpha()>0){
onProgressBarUpdate(100, false);
}
this.mBlockerFullSceen.setVisibility(View.VISIBLE); this.mBlockerFullSceen.setVisibility(View.VISIBLE);
this.mBlockerFullSceen.setAlpha(0f); this.mBlockerFullSceen.setAlpha(0f);
this.mBlockerFullSceen.animate().setStartDelay(0).setDuration(200).alpha(1).withEndAction(() -> { this.mBlockerFullSceen.animate().setStartDelay(0).setDuration(200).alpha(1).withEndAction(() -> {

View File

@ -21,14 +21,12 @@ import java.util.Collections;
public class landingController extends AppIntro { public class landingController extends AppIntro {
private landingViewController mLauncherViewController; private landingViewController mLandingViewController;
@Override @Override
protected void onCreate(@Nullable Bundle savedInstanceState) { protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
// Instead of fragments, you can also use our default slide
// Just set a title, description, background and image. AppIntro will do the rest.
CustomSlideBigText welcome = CustomSlideBigText.newInstance(R.layout.landing_view); 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));
@ -49,20 +47,16 @@ public class landingController extends AppIntro {
}); });
addSlide(cs2); addSlide(cs2);
// OPTIONAL METHODS
// Override bar/separator color.
setBarColor(getResources().getColor(R.color.landing_ease_blue)); setBarColor(getResources().getColor(R.color.landing_ease_blue));
setSeparatorColor(getResources().getColor(R.color.headerblack)); setSeparatorColor(getResources().getColor(R.color.headerblack));
// Hide Skip/Done button.
showSkipButton(false); showSkipButton(false);
setProgressButtonEnabled(true); setProgressButtonEnabled(true);
initConnections(); initConnections();
} }
private void initConnections(){ private void initConnections(){
mLauncherViewController = new landingViewController(this,null); mLandingViewController = new landingViewController(this,null);
} }

View File

@ -11,6 +11,7 @@ import com.example.myapplication.R;
class landingViewController class landingViewController
{ {
/*Private Variables*/ /*Private Variables*/
private AppCompatActivity mContext; private AppCompatActivity mContext;
/*Initializations*/ /*Initializations*/
@ -23,16 +24,6 @@ class landingViewController
} }
private void initPostUI(){ private void initPostUI(){
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { mContext.getWindow().setStatusBarColor(ContextCompat.getColor(mContext, R.color.landing_ease_blue));
Window window = mContext.getWindow();
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) {
mContext.getWindow().setStatusBarColor(ContextCompat.getColor(mContext, R.color.landing_ease_blue));
}
else {
mContext.getWindow().setStatusBarColor(ContextCompat.getColor(mContext, R.color.landing_ease_blue));
}
}
} }
} }

View File

@ -2,7 +2,6 @@ package com.darkweb.genesissearchengine.appManager.orbotManager;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.os.Bundle; import android.os.Bundle;
import android.util.Log;
import android.view.MotionEvent; import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.widget.LinearLayout; import android.widget.LinearLayout;
@ -107,7 +106,7 @@ 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.sVPNStatus)); mOrbotViewController.onTrigger(orbotEnums.eOrbotViewCommands.M_UPDATE_VPN,Collections.singletonList(status.sVPNStatus));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.VPN_ENABLED,status.sVPNStatus)); dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.BRIDGE_VPN_ENABLED,status.sVPNStatus));
} }
public void onClose(View view){ public void onClose(View view){

View File

@ -11,7 +11,6 @@ import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatDelegate; import androidx.appcompat.app.AppCompatDelegate;
import androidx.core.content.ContextCompat; import androidx.core.content.ContextCompat;
import com.darkweb.genesissearchengine.appManager.activityContextManager; import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.bridgeManager.bridgeEnums;
import com.darkweb.genesissearchengine.appManager.helpManager.helpController; import com.darkweb.genesissearchengine.appManager.helpManager.helpController;
import com.darkweb.genesissearchengine.constants.constants; import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.enums; import com.darkweb.genesissearchengine.constants.enums;
@ -190,7 +189,7 @@ public class settingClearController extends AppCompatActivity {
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.VPN_ENABLED,false)); dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.BRIDGE_VPN_ENABLED,false));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.BRIDGE_ENABLES,false)); dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.BRIDGE_ENABLES,false));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_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));

View File

@ -4,6 +4,7 @@ import android.content.Context;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.content.res.Resources; import android.content.res.Resources;
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;
@ -12,6 +13,7 @@ import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatDelegate; import androidx.appcompat.app.AppCompatDelegate;
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.homeManager.homeController.homeController;
import com.darkweb.genesissearchengine.appManager.languageManager.languageController; import com.darkweb.genesissearchengine.appManager.languageManager.languageController;
import com.darkweb.genesissearchengine.constants.constants; import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.enums; import com.darkweb.genesissearchengine.constants.enums;
@ -31,6 +33,8 @@ import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.M_APPLICATION_CRASH;
public class settingGeneralController extends AppCompatActivity { public class settingGeneralController extends AppCompatActivity {
/* PRIVATE VARIABLES */ /* PRIVATE VARIABLES */
@ -50,6 +54,7 @@ public class settingGeneralController extends AppCompatActivity {
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
onInitTheme();
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
if(!status.mThemeApplying){ if(!status.mThemeApplying){
@ -61,6 +66,23 @@ public class settingGeneralController extends AppCompatActivity {
viewsInitializations(); viewsInitializations();
} }
private void onInitTheme(){
if(status.mThemeApplying){
if(status.sTheme == enums.Theme.THEME_DARK){
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
}else if(status.sTheme == enums.Theme.THEME_LIGHT){
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
}else {
if(!status.sDefaultNightMode){
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
}else {
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
}
}
}
}
@Override @Override
public void onConfigurationChanged(@NonNull Configuration newConfig) { public void onConfigurationChanged(@NonNull Configuration newConfig) {
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
@ -101,24 +123,20 @@ public class settingGeneralController extends AppCompatActivity {
boolean mIsThemeChangable = false; boolean mIsThemeChangable = false;
if(status.sTheme == enums.Theme.THEME_DARK){ if(status.sTheme == enums.Theme.THEME_DARK){
if(AppCompatDelegate.getDefaultNightMode() != AppCompatDelegate.MODE_NIGHT_YES){ if(AppCompatDelegate.getDefaultNightMode() != AppCompatDelegate.MODE_NIGHT_YES){
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
mIsThemeChangable = true; mIsThemeChangable = true;
} }
} }
else if(status.sTheme == enums.Theme.THEME_LIGHT){ else if(status.sTheme == enums.Theme.THEME_LIGHT){
if(AppCompatDelegate.getDefaultNightMode() == AppCompatDelegate.MODE_NIGHT_YES){ if(AppCompatDelegate.getDefaultNightMode() == AppCompatDelegate.MODE_NIGHT_YES){
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
mIsThemeChangable = true; mIsThemeChangable = true;
} }
}else { }else {
if(!status.sDefaultNightMode){ if(!status.sDefaultNightMode){
if(AppCompatDelegate.getDefaultNightMode() != AppCompatDelegate.MODE_NIGHT_NO){ if(AppCompatDelegate.getDefaultNightMode() != AppCompatDelegate.MODE_NIGHT_NO){
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
mIsThemeChangable = true; mIsThemeChangable = true;
} }
}else { }else {
if(AppCompatDelegate.getDefaultNightMode() != AppCompatDelegate.MODE_NIGHT_YES){ if(AppCompatDelegate.getDefaultNightMode() != AppCompatDelegate.MODE_NIGHT_YES){
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
mIsThemeChangable = true; mIsThemeChangable = true;
} }
} }
@ -128,9 +146,14 @@ public class settingGeneralController extends AppCompatActivity {
status.mThemeApplying = true; status.mThemeApplying = true;
onBackPressed(); onBackPressed();
overridePendingTransition(R.anim.fade_in_lang, R.anim.fade_out_lang); overridePendingTransition(R.anim.fade_in_lang, R.anim.fade_out_lang);
activityContextManager.getInstance().getHomeController().onReInitTheme();
activityContextManager.getInstance().getSettingController().onReInitTheme();
helperMethod.openActivity(settingGeneralController.class, constants.CONST_LIST_HISTORY, settingGeneralController.this,true); helperMethod.openActivity(settingGeneralController.class, constants.CONST_LIST_HISTORY, settingGeneralController.this,true);
new Handler().postDelayed(() ->
{
activityContextManager.getInstance().getHomeController().onReInitTheme();
activityContextManager.getInstance().getSettingController().onReInitTheme();
}, 100);
} }
} }
return null; return null;

View File

@ -14,6 +14,8 @@ import android.widget.Toast;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatDelegate;
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.kotlinHelperLibraries.BrowserIconManager; import com.darkweb.genesissearchengine.appManager.kotlinHelperLibraries.BrowserIconManager;
@ -28,6 +30,7 @@ import com.darkweb.genesissearchengine.appManager.settingManager.privacyManager.
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.appManager.settingManager.trackingManager.settingTrackingController;
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;
@ -46,6 +49,7 @@ import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import static androidx.appcompat.app.AppCompatDelegate.setDefaultNightMode;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.*; import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.*;
public class settingHomeController extends AppCompatActivity public class settingHomeController extends AppCompatActivity
@ -87,6 +91,23 @@ public class settingHomeController extends AppCompatActivity
super.onConfigurationChanged(newConfig); super.onConfigurationChanged(newConfig);
} }
private void onInitTheme(){
if(status.mThemeApplying){
if(status.sTheme == enums.Theme.THEME_DARK){
setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
}else if(status.sTheme == enums.Theme.THEME_LIGHT){
setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
}else {
if(!status.sDefaultNightMode){
setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
}else {
setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
}
}
}
}
private void viewsInitializations() private void viewsInitializations()
{ {
activityContextManager.getInstance().setSettingController(this); activityContextManager.getInstance().setSettingController(this);

View File

@ -8,6 +8,7 @@ import android.graphics.Color;
import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.os.Handler; import android.os.Handler;
import android.util.Log;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -388,9 +389,10 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
mWebThumbnail.setImageBitmap(model.getBitmap()); mWebThumbnail.setImageBitmap(model.getBitmap());
}else { }else {
Drawable mDrawable = new BitmapDrawable(itemView.getContext().getResources(), model.getBitmap()); Drawable mDrawable = new BitmapDrawable(itemView.getContext().getResources(), model.getBitmap());
helperMethod.setImageDrawableWithAnimation(mWebThumbnail, mDrawable,250); helperMethod.setImageDrawableWithAnimation(mWebThumbnail, mDrawable,150);
} }
}, 1 * getLayoutPosition()); Log.i("SUPERFFF", "SUPERFFF : " + getLayoutPosition());
}, getLayoutPosition());
} }
if(mSelectedList.contains(model.getSession().getSessionID())){ if(mSelectedList.contains(model.getSession().getSessionID())){

View File

@ -35,6 +35,7 @@ import com.darkweb.genesissearchengine.dataManager.dataEnums;
import com.darkweb.genesissearchengine.dataManager.models.tabRowModel; import com.darkweb.genesissearchengine.dataManager.models.tabRowModel;
import com.darkweb.genesissearchengine.eventObserver; import com.darkweb.genesissearchengine.eventObserver;
import com.darkweb.genesissearchengine.helperManager.helperMethod; import com.darkweb.genesissearchengine.helperManager.helperMethod;
import com.darkweb.genesissearchengine.pluginManager.pluginController;
import com.example.myapplication.R; import com.example.myapplication.R;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@ -43,6 +44,8 @@ import java.util.List;
import java.util.Objects; import java.util.Objects;
import static com.darkweb.genesissearchengine.appManager.tabManager.tabEnums.eTabViewCommands.ON_HIDE_UNDO_DIALOG_FORCED; import static com.darkweb.genesissearchengine.appManager.tabManager.tabEnums.eTabViewCommands.ON_HIDE_UNDO_DIALOG_FORCED;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.M_RESET;
import static org.mozilla.gecko.util.ThreadUtils.runOnUiThread;
public class tabController extends Fragment public class tabController extends Fragment
{ {
@ -165,7 +168,7 @@ public class tabController extends Fragment
} }
public void onInitFirstElement(){ public void onInitFirstElement(){
mHomeController.runOnUiThread(() -> { runOnUiThread(() -> {
if(mTabAdapter!=null){ if(mTabAdapter!=null){
if(mBlocker.getVisibility() != View.VISIBLE){ if(mBlocker.getVisibility() != View.VISIBLE){
mTabAdapter.notifyItemChanged(0); mTabAdapter.notifyItemChanged(0);

View File

@ -7,7 +7,7 @@ public class enums
M_CHANGE_HOME_THEME, M_IS_ERROR_PAGE, on_update_favicon,M_RELOAD,ON_UPDATE_TAB_TITLE, ON_OPEN_TAB_VIEW,ON_NEW_TAB_ANIMATION, M_UPDATE_SESSION_STATE,ON_LOAD_REQUEST, GECKO_SCROLL_UP, GECKO_SCROLL_UP_ALWAYS, GECKO_SCROLL_DOWN, WAS_SCROLL_CHANGED, GECKO_SCROLL_DOWN_MOVE, GECKO_SCROLL_UP_MOVE, GECKO_SCROLL_DOWN_CALLER,ON_UPDATE_SEARCH_BAR,M_ON_MAIL,SESSION_ID,M_UPDATE_PIXEL_BACKGROUND, M_ON_SCROLL_BOUNDARIES, M_ON_SCROLL_TOP_BOUNDARIES, M_ON_SCROLL_NO_BOUNDARIES, M_INIT_PADDING, M_RATE_COUNT,M_CACHE_UPDATE_TAB,M_DEFAULT_BROWSER, M_CHANGE_HOME_THEME, M_IS_ERROR_PAGE, on_update_favicon,M_RELOAD,ON_UPDATE_TAB_TITLE, ON_OPEN_TAB_VIEW,ON_NEW_TAB_ANIMATION, M_UPDATE_SESSION_STATE,ON_LOAD_REQUEST, GECKO_SCROLL_UP, GECKO_SCROLL_UP_ALWAYS, GECKO_SCROLL_DOWN, WAS_SCROLL_CHANGED, GECKO_SCROLL_DOWN_MOVE, GECKO_SCROLL_UP_MOVE, GECKO_SCROLL_DOWN_CALLER,ON_UPDATE_SEARCH_BAR,M_ON_MAIL,SESSION_ID,M_UPDATE_PIXEL_BACKGROUND, M_ON_SCROLL_BOUNDARIES, M_ON_SCROLL_TOP_BOUNDARIES, M_ON_SCROLL_NO_BOUNDARIES, M_INIT_PADDING, M_RATE_COUNT,M_CACHE_UPDATE_TAB,M_DEFAULT_BROWSER,
on_verify_selected_url_menu,FINDER_RESULT_CALLBACK,M_ADMOB_BANNER_RECHECK,M_OPEN_SESSION,M_DOWNLOAD_FAILURE, M_ADVERT_LOADED, on_verify_selected_url_menu,FINDER_RESULT_CALLBACK,M_ADMOB_BANNER_RECHECK,M_OPEN_SESSION,M_DOWNLOAD_FAILURE, M_ADVERT_LOADED,
welcome, reload,download_folder, M_UPDATE_THEME,M_ON_BANNER_UPDATE, M_LOAD_HOMEPAGE_GENESIS,M_INIT_TAB_COUNT_FORCED,M_SPLASH_DISABLE,M_NEW_LINK_IN_NEW_TAB,M_RESET_SUGGESTION, welcome, reload,download_folder, M_UPDATE_THEME,M_ON_BANNER_UPDATE, M_LOAD_HOMEPAGE_GENESIS,M_INIT_TAB_COUNT_FORCED,M_SPLASH_DISABLE,M_NEW_LINK_IN_NEW_TAB,M_RESET_SUGGESTION,
url_triggered, url_triggered_new_tab,url_clear,fetch_favicon, M_COPY_URL,url_clear_at,remove_from_database,is_empty,M_HOME_PAGE,M_PRELOAD_URL,ON_KEYBOARD_CLOSE,M_CLOSE_TAB, url_triggered, url_triggered_new_tab,url_clear,fetch_favicon,M_OPEN_BOOKMARK_SETTING, M_COPY_URL,url_clear_at,remove_from_database,is_empty,M_HOME_PAGE,M_PRELOAD_URL,ON_KEYBOARD_CLOSE,M_CLOSE_TAB,
on_close_sesson,on_long_press, on_full_screen,on_handle_external_intent,on_update_suggestion_url,progress_update,progress_update_forced, ON_EXPAND_TOP_BAR,recheck_orbot,on_url_load,on_playstore_load,back_list_empty,start_proxy, ON_UPDATE_THEME, M_NEW_IDENTITY, M_NEW_IDENTITY_MESSAGED, M_INITIALIZE_TAB_SINGLE, M_INITIALIZE_TAB_LINK,on_request_completed, on_update_history,on_update_suggestion,M_WELCOME_MESSAGE,ON_FIRST_PAINT, ON_LOAD_TAB_ON_RESUME, ON_SESSION_REINIT,on_page_loaded,on_load_error, M_ORBOT_LOADING,download_file_popup,on_init_ads, M_GET_CURRENT_URL,search_update, open_new_tab,open_new_tab_instant on_close_sesson,on_long_press, on_full_screen,on_handle_external_intent,on_update_suggestion_url,progress_update,progress_update_forced, ON_EXPAND_TOP_BAR,recheck_orbot,on_url_load,on_playstore_load,back_list_empty,start_proxy, ON_UPDATE_THEME, M_NEW_IDENTITY, M_NEW_IDENTITY_MESSAGED, M_INITIALIZE_TAB_SINGLE, M_INITIALIZE_TAB_LINK,on_request_completed, on_update_history,on_update_suggestion,M_WELCOME_MESSAGE,ON_FIRST_PAINT, ON_LOAD_TAB_ON_RESUME, ON_SESSION_REINIT,on_page_loaded,on_load_error, M_ORBOT_LOADING,download_file_popup,on_init_ads, M_GET_CURRENT_URL,search_update, open_new_tab,open_new_tab_instant
} }

View File

@ -64,7 +64,12 @@ public class keys
public static final String BRIDGE_CUSTOM_BRIDGE_1 = "CLEAR_PREFS_V1"; public static final String BRIDGE_CUSTOM_BRIDGE_1 = "CLEAR_PREFS_V1";
public static final String BRIDGE_CUSTOM_TYPE = "BRIDGE_CUSTOM_TYPE_V1"; public static final String BRIDGE_CUSTOM_TYPE = "BRIDGE_CUSTOM_TYPE_V1";
public static final String BRIDGE_ENABLES = "pref_bridges_enabled_V1"; public static final String BRIDGE_ENABLES = "pref_bridges_enabled_V1";
public static final String VPN_ENABLED = "pref_vpn_V1"; public static final String BRIDGE_VPN_ENABLED = "pref_vpn_V1";
public static final String BRIDGE_DEFAULT = "BRIDGE_DEFAULT"; public static final String BRIDGE_DEFAULT = "BRIDGE_DEFAULT";
/*Bookmark Settings*/
public static final String BOOKMARK_SETTING_NAME = "BOOKMARK_SETTING_NAME";
public static final String BOOKMARK_SETTING_URL = "BOOKMARK_SETTING_URL";
public static final String BOOKMARK_SETTING_ID = "BOOKMARK_SETTING_ID";
} }

View File

@ -104,7 +104,7 @@ public class status
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.sVPNStatus = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.VPN_ENABLED,false)); status.sVPNStatus = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.BRIDGE_VPN_ENABLED,false));
status.sBridgeStatus = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.BRIDGE_ENABLES,false)); status.sBridgeStatus = (boolean)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.BRIDGE_ENABLES,false));
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));

View File

@ -63,5 +63,11 @@ public class strings
/*Message Manager*/ /*Message Manager*/
public static final String MESSAGE_PLAYSTORE_NOT_FOUND = "Playstore Not Found"; public static final String MESSAGE_PLAYSTORE_NOT_FOUND = "Playstore Not Found";
/*Bookmark Setting Manager*/
public static final String BOOKMARK_SETTING_VALIDATION_ERROR_1 = "➔ bookmark name empty";
public static final String BOOKMARK_SETTING_VALIDATION_ERROR_2 = "➔ bookmark url empty";
} }

View File

@ -68,6 +68,22 @@ public class bookmarkDataModel {
mBookmarks.clear(); mBookmarks.clear();
} }
void updateBookmark(String pBookmarkName, String pBookmarkURL, int pBookmarkID){
for(int mCounter=0;mCounter<mBookmarks.size();mCounter++){
if(mBookmarks.get(mCounter).getID()==pBookmarkID){
mBookmarks.get(mCounter).setHeader(pBookmarkName);
mBookmarks.get(mCounter).setURL(pBookmarkURL);
}
}
int autoval = 0;
String[] params = new String[2];
params[0] = pBookmarkName;
params[1] = pBookmarkURL;
mExternalEvents.invokeObserver(Arrays.asList("REPLACE INTO bookmark(id,title,url) VALUES("+autoval+",?,?);",params), dataEnums.eBookmarkCallbackCommands.M_EXEC_SQL);
}
void deleteBookmark(int pID) { void deleteBookmark(int pID) {
for(int mCounter=0;mCounter<mBookmarks.size();mCounter++){ for(int mCounter=0;mCounter<mBookmarks.size();mCounter++){
if(mBookmarks.get(mCounter).getID()==pID){ if(mBookmarks.get(mCounter).getID()==pID){
@ -80,19 +96,22 @@ public class bookmarkDataModel {
/* External Triggers */ /* External Triggers */
public Object onTrigger(dataEnums.eBookmarkCommands p_commands, List<Object> pData){ public Object onTrigger(dataEnums.eBookmarkCommands pCommands, List<Object> pData){
if(p_commands == dataEnums.eBookmarkCommands.M_GET_BOOKMARK){ if(pCommands == dataEnums.eBookmarkCommands.M_GET_BOOKMARK){
return getBookmark(); return getBookmark();
} }
else if(p_commands == dataEnums.eBookmarkCommands.M_ADD_BOOKMARK){ else if(pCommands == 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_DELETE_BOOKMARK){ else if(pCommands == dataEnums.eBookmarkCommands.M_DELETE_BOOKMARK){
deleteBookmark((int)pData.get(0)); deleteBookmark((int)pData.get(0));
} }
else if(p_commands == dataEnums.eBookmarkCommands.M_CLEAR_BOOKMARK){ else if(pCommands == dataEnums.eBookmarkCommands.M_CLEAR_BOOKMARK){
clearBookmark(); clearBookmark();
} }
else if(pCommands == dataEnums.eBookmarkCommands.M_UPDATE_BOOKMARK){
updateBookmark((String) pData.get(0),(String) pData.get(1),(int) pData.get(2));
}
return null; return null;
} }

View File

@ -213,7 +213,7 @@ public class dataController
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.VPN_ENABLED,false)); dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.BRIDGE_VPN_ENABLED,false));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.BRIDGE_ENABLES,false)); dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.BRIDGE_ENABLES,false));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_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));

View File

@ -13,7 +13,7 @@ public class dataEnums
} }
public enum eBookmarkCommands { public enum eBookmarkCommands {
M_ADD_BOOKMARK, M_GET_BOOKMARK, M_DELETE_BOOKMARK, M_CLEAR_BOOKMARK; M_ADD_BOOKMARK, M_GET_BOOKMARK, M_DELETE_BOOKMARK, M_CLEAR_BOOKMARK, M_UPDATE_BOOKMARK;
} }
public enum eReferenceWebsiteCommands { public enum eReferenceWebsiteCommands {

View File

@ -9,6 +9,10 @@ import com.darkweb.genesissearchengine.helperManager.helperMethod;
import org.mozilla.geckoview.GeckoSession; import org.mozilla.geckoview.GeckoSession;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.zip.Deflater;
public class tabRowModel public class tabRowModel
{ {
/*Private Variables*/ /*Private Variables*/
@ -30,11 +34,39 @@ public class tabRowModel
this.mId = pID; this.mId = pID;
this.mDate = pDate; this.mDate = pDate;
if(pBlob!=null){ if(pBlob!=null){
mBitmap = BitmapFactory.decodeByteArray(pBlob,0,pBlob.length); if(mBitmap!=null && !mBitmap.isRecycled()){
mBitmap.recycle();
mBitmap = null;
}
try {
byte[] pBlobTemp = compress(pBlob);
int mSize = pBlobTemp.length;
mBitmap = BitmapFactory.decodeByteArray(pBlobTemp,0,mSize);
} catch (IOException e) {
e.printStackTrace();
}
} }
} }
/*Helper Method*/ public byte[] compress(byte[] data) throws IOException {
Deflater deflater = new Deflater();
deflater.setInput(data);
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(data.length);
deflater.finish();
byte[] buffer = new byte[1024];
while (!deflater.finished()) {
int count = deflater.deflate(buffer); // returns the generated code... index
outputStream.write(buffer, 0, count);
}
outputStream.close();
byte[] output = outputStream.toByteArray();
return output;
}
/*Helper Method*/
public geckoSession getSession() public geckoSession getSession()
{ {

View File

@ -96,13 +96,25 @@ public class sqlCipherDataModel
}; };
private void execSQL(String query,Object params,boolean pContentValues) private void execSQL(String query,Object params,boolean pContentValues)
{
if(params==null)
{
sDatabaseInstance.execSQL(query);
}
else
{
sDatabaseInstance.execSQL(query,(String[])params);
}
}
private void execSQL(String query,Object params,boolean pContentValues,String whereClause, String[] whereArgs)
{ {
if(params==null) if(params==null)
{ {
sDatabaseInstance.execSQL(query); sDatabaseInstance.execSQL(query);
} }
else if(pContentValues){ else if(pContentValues){
sDatabaseInstance.replace(query,null,(ContentValues)params); sDatabaseInstance.update(query, (ContentValues)params, whereClause, whereArgs);
} }
else else
{ {
@ -209,7 +221,7 @@ public class sqlCipherDataModel
execSQL((String)pData.get(0), pData.get(1), false); execSQL((String)pData.get(0), pData.get(1), false);
} }
else if(pCommands == dataEnums.eSqlCipherCommands.M_EXEC_SQL_USING_CONTENT){ else if(pCommands == dataEnums.eSqlCipherCommands.M_EXEC_SQL_USING_CONTENT){
execSQL((String)pData.get(0), pData.get(1), true); execSQL((String)pData.get(0), pData.get(1), true, (String)pData.get(3), (String[])pData.get(4));
} }
else if(pCommands == dataEnums.eSqlCipherCommands.M_SELECT_BOOKMARK){ else if(pCommands == dataEnums.eSqlCipherCommands.M_SELECT_BOOKMARK){
return selectBookmark(); return selectBookmark();

View File

@ -38,6 +38,7 @@ class tabDataModel
private ArrayList<tabRowModel> mTabs = new ArrayList<>(); private ArrayList<tabRowModel> mTabs = new ArrayList<>();
void initializeTab(ArrayList<tabRowModel> pTabMdel){ void initializeTab(ArrayList<tabRowModel> pTabMdel){
mTabs.clear();
mTabs.addAll(pTabMdel); mTabs.addAll(pTabMdel);
} }
@ -79,7 +80,9 @@ class tabDataModel
return enums.AddTabCallback.TAB_ADDED; return enums.AddTabCallback.TAB_ADDED;
} }
mExternalEvents.invokeObserver(Arrays.asList("REPLACE INTO tab(mid,date,title,url,theme) VALUES('"+ mTabModel.getmId() +"','" + m_date + "',?,?,?);",params), dataEnums.eTabCallbackCommands.M_EXEC_SQL); if(mTabModel.getmId()!=null){
//mExternalEvents.invokeObserver(Arrays.asList("REPLACE INTO tab(mid,date,title,url,theme) VALUES('"+ mTabModel.getmId() +"','" + m_date + "',?,?,?);",params), dataEnums.eTabCallbackCommands.M_EXEC_SQL);
}
} }
return enums.AddTabCallback.TAB_ADDED; return enums.AddTabCallback.TAB_ADDED;
} }
@ -195,7 +198,9 @@ class tabDataModel
return false; return false;
} }
mExternalEvents.invokeObserver(Arrays.asList("REPLACE INTO tab(mid,date,title,url,theme) VALUES('"+ mTabs.get(counter).getmId() +"','" + m_date + "',?,?,?);",params), dataEnums.eTabCallbackCommands.M_EXEC_SQL); if(mTabs.get(counter).getmId()!=null){
mExternalEvents.invokeObserver(Arrays.asList("REPLACE INTO tab(mid,date,title,url,theme) VALUES('"+ mTabs.get(counter).getmId() +"','" + m_date + "',?,?,?);",params), dataEnums.eTabCallbackCommands.M_EXEC_SQL);
}
return true; return true;
} }
} }
@ -260,7 +265,7 @@ class tabDataModel
byte[] mThumbnail = out.toByteArray(); byte[] mThumbnail = out.toByteArray();
ContentValues mContentValues = new ContentValues(); ContentValues mContentValues = new ContentValues();
mContentValues.put("mThumbnail", mThumbnail); mContentValues.put("mThumbnail", mThumbnail);
mExternalEvents.invokeObserver(Arrays.asList("tab",mContentValues, mTabs.get(finalCounter).getmId()), dataEnums.eTabCallbackCommands.M_EXEC_SQL_USING_CONTENT); mExternalEvents.invokeObserver(Arrays.asList("tab",mContentValues, "mid = ?", new String[]{mTabs.get(finalCounter).getmId()}), dataEnums.eTabCallbackCommands.M_EXEC_SQL_USING_CONTENT);
} }
} }
} }

View File

@ -4,8 +4,6 @@ import android.appwidget.AppWidgetProvider;
import android.content.Context; import android.content.Context;
import android.view.View; import android.view.View;
import android.widget.RemoteViews; import android.widget.RemoteViews;
import com.darkweb.genesissearchengine.appManager.settingManager.settingHomeManager.settingHomeEnums;
import com.darkweb.genesissearchengine.eventObserver; import com.darkweb.genesissearchengine.eventObserver;
import com.example.myapplication.R; import com.example.myapplication.R;

View File

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

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:top="113dp">
<shape
android:shape="rectangle" android:padding="10dp" >
<solid android:color="@color/c_edittext_background_error"/>
<corners android:radius="7dp"/>
<stroke android:width="2dp" android:color="@color/dark_red_soft"/>
</shape>
</item>
<item android:state_pressed="false"
android:top="113dp">
<shape
android:shape="rectangle" android:padding="10dp">
<solid android:color="@color/c_edittext_background_error"/>
<corners android:radius="7dp"/>
<stroke android:width="2dp" android:color="@color/dark_red_soft"/>
</shape>
</item>
</selector>

View File

@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#3C5C7E"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-1.83,1.83 3.75,3.75 1.83,-1.83z"/>
</vector>

View File

@ -0,0 +1,181 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@xml/hx_border"
android:baselineAligned="false">
<LinearLayout
android:layout_width="match_parent"
android:orientation="horizontal"
android:layout_marginStart="0dp"
android:paddingEnd="0dp"
android:layout_marginTop="0dp"
android:id="@+id/pRowContainer"
android:background="@xml/gx_ripple_blue"
android:layout_height="60dp"
tools:ignore="RtlSymmetry">
<TextView
android:id="@+id/pWebLogo"
android:layout_width="35dp"
android:layout_marginTop="9dp"
android:layout_marginStart="15dp"
android:layout_marginEnd="5dp"
android:alpha="0"
android:layout_height="35dp"
android:textStyle="bold"
android:textSize="17sp"
android:text="A"
android:textAlignment="center"
android:textColor="@color/white"
android:background="@xml/hx_circle_favicon"
android:gravity="center_vertical"
tools:ignore="RtlCompat" />
<androidx.cardview.widget.CardView
android:layout_width="35dp"
android:layout_height="35dp"
app:cardElevation="0dp"
android:padding="20dp"
android:layout_marginStart="-47dp"
android:layout_marginTop="12dp"
android:layout_marginEnd="5dp"
android:gravity="center_vertical"
app:cardCornerRadius="5dp">
<ImageView
android:id="@+id/pFaviconLogo"
android:layout_width="37dp"
android:layout_height="37dp"
android:layout_marginTop="-1dp"
android:background="@color/button_gray"
android:contentDescription="@string/GENERAL_TODO"
android:textAlignment="center"
android:textColor="@color/white"
tools:ignore="RtlCompat" />
</androidx.cardview.widget.CardView>
<ImageView
android:id="@+id/pLogoImage"
android:layout_width="48dp"
android:layout_marginTop="10dp"
android:layout_marginStart="-47dp"
android:layout_marginEnd="-1dp"
android:layout_height="48dp"
android:visibility="visible"
android:alpha="0"
android:translationZ="3dp"
android:src="@drawable/tick_recycler_view_green"
android:gravity="center_vertical"
tools:ignore="RtlCompat"
android:contentDescription="@string/GENERAL_TODO" />
<LinearLayout
android:layout_width="0dp"
android:orientation="vertical"
android:layout_marginStart="0dp"
android:paddingEnd="8dp"
android:layout_marginTop="0dp"
android:clickable="false"
android:layout_weight="1"
android:layout_height="match_parent"
tools:ignore="NestedWeights,RtlSymmetry">
<TextView
android:id="@+id/pHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/c_text_v1"
android:singleLine="true"
android:layout_marginTop="10dp"
android:textSize="14.5sp"
android:layout_marginStart="10dp"
/>
<TextView
android:layout_marginStart="10dp"
android:id="@+id/pDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:layout_marginTop="1dp"
android:ellipsize="end"
android:textSize="13sp"
android:textColor="@color/c_text_v2"
/>
</LinearLayout>
<ImageButton
android:id="@+id/pBookmarkEdit"
android:layout_width="60dp"
android:layout_height="60dp"
android:background="@xml/gx_ripple_gray"
android:contentDescription="@string/GENERAL_TODO"
android:paddingTop="20dp"
android:paddingBottom="20dp"
android:scaleType="fitCenter"
android:src="@xml/ic_baseline_edit"
android:tint="@color/c_navigation_tint"
tools:ignore="RtlSymmetry" />
<ImageButton
android:id="@+id/pRowMenu"
android:layout_width="40dp"
android:layout_height="60dp"
android:background="@xml/gx_ripple_gray"
android:contentDescription="@string/GENERAL_TODO"
android:paddingTop="22dp"
android:paddingBottom="22dp"
android:scaleType="fitCenter"
android:src="@drawable/menu_item"
android:tint="@color/c_navigation_tint"
tools:ignore="RtlSymmetry" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:id="@+id/pDateContainer"
android:background="@xml/hx_border"
android:baselineAligned="false">
<TextView
android:id="@+id/pDate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/c_text_v2"
android:singleLine="true"
android:layout_marginTop="15dp"
android:layout_marginBottom="15dp"
android:textSize="13sp"
android:layout_marginStart="15dp"/>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="60dp"
android:visibility="gone"
android:id="@+id/pLoadingContainer"
android:baselineAligned="false">
<ProgressBar
android:id="@+id/pLoading"
android:layout_marginTop="5dp"
style="?android:attr/progressBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</FrameLayout>

View File

@ -0,0 +1,203 @@
<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.bookmarkManager.BookmarkSettings.bookmarkSettingController">
<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:elevation="8dp"
android:background="@color/c_background"
android:paddingStart="5dp"
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:paddingStart="10dp"
android:paddingEnd="10dp"
android:onClick="onClose"
android:layout_marginTop="-3dp"
android:gravity="center_vertical|start"
android:text="@string/BOOKMARK_SETTING_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="44dp"
android:layout_height="44dp"
android:padding="8dp"
android:layout_marginEnd="3dp"
android:layout_gravity="center_vertical"
android:onClick="onUpdateBookmark"
android:background="@xml/gx_ripple_default_round"
android:contentDescription="@string/GENERAL_TODO"
android:src="@xml/ic_baseline_done"
app:tint="@color/c_navigation_tint" />
</LinearLayout>
<!-- Title Header -->
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/c_view_divier_background" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="35dp"
android:alpha="1"
android:background="@android:color/transparent"
android:clickable="false"
android:padding="0dp"
android:textStyle="bold"
android:paddingStart="15dp"
android:paddingEnd="5dp"
android:text="@string/BOOKMARK_SETTING_HEADER_URL"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="@color/c_text_v4"
android:textSize="13.5sp"
tools:ignore="RtlSymmetry" />
<com.darkweb.genesissearchengine.appManager.homeManager.homeController.editTextManager
android:id="@+id/pBookmarkName"
android:layout_width="match_parent"
android:layout_height="45dp"
android:background="@xml/gx_generic_input"
android:layout_margin="10dp"
android:fadingEdgeLength="20dp"
android:hint="@string/BOOKMARK_SETTING_HEADER_NAME_HINT"
android:inputType="text"
android:digits="0,1,2,3,4,5,6,7,8,9,*,qwertzuiopa sdfghjklyxcvbnm,_,-"
android:maxLines="1"
android:paddingStart="18dp"
android:paddingEnd="15dp"
android:maxLength="100"
android:layout_marginTop="5dp"
android:requiresFadingEdge="horizontal"
android:text="@string/GENERAL_HOME_URL"
android:textColor="@color/c_text_v8"
android:textColorHighlight="@color/text_color_highlight_v3"
android:textColorHint="@color/c_text_v2"
android:textCursorDrawable="@xml/gx_search_cursor_state"
android:textSize="16sp"
tools:targetApi="o"/>
<TextView
android:id="@+id/pBookmarkNameError"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:textStyle="bold"
android:layout_marginTop="-5dp"
android:alpha="0"
android:background="@android:color/transparent"
android:text="@string/BOOKMARK_SETTING_HEADER_NAME_ERROR"
android:textAlignment="textStart"
android:textColor="@color/dark_red_soft"
android:textSize="12sp"
tools:ignore="RtlSymmetry" />
<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" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:alpha="1"
android:background="@android:color/transparent"
android:clickable="false"
android:padding="0dp"
android:paddingStart="15dp"
android:paddingEnd="5dp"
android:text="@string/BOOKMARK_SETTING_HEADER_NAME"
android:textAlignment="textStart"
android:textStyle="bold"
android:textAllCaps="false"
android:textColor="@color/c_text_v4"
android:textSize="13.5sp"
tools:ignore="RtlSymmetry" />
<com.darkweb.genesissearchengine.appManager.homeManager.homeController.editTextManager
android:id="@+id/pBookmarkURL"
android:layout_width="match_parent"
android:layout_height="45dp"
android:background="@xml/gx_generic_input"
android:layout_margin="10dp"
android:fadingEdgeLength="20dp"
android:hint="@string/BOOKMARK_SETTING_HEADER_URL_HINT"
android:maxLength="350"
android:inputType="textWebEmailAddress"
android:maxLines="1"
android:paddingStart="18dp"
android:layout_marginTop="5dp"
android:paddingEnd="15dp"
android:requiresFadingEdge="horizontal"
android:text="@string/GENERAL_HOME_URL"
android:textColor="@color/c_text_v8"
android:textColorHighlight="@color/text_color_highlight_v3"
android:textColorHint="@color/c_text_v2"
android:textCursorDrawable="@xml/gx_search_cursor_state"
android:textSize="16sp"
tools:targetApi="o"/>
<TextView
android:id="@+id/pBookmarkURLError"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="-5dp"
android:alpha="0"
android:background="@android:color/transparent"
android:text="@string/BOOKMARK_SETTING_HEADER_URL_ERROR"
android:textAlignment="textStart"
android:textColor="@color/dark_red_soft"
android:textSize="12sp"
android:textStyle="bold"
tools:ignore="RtlSymmetry" />
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -5,7 +5,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" android:background="@color/c_background"
tools:context="com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkController"> tools:context="com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkHome.bookmarkController">
<LinearLayout <LinearLayout
android:id="@+id/pHeaderContainer" android:id="@+id/pHeaderContainer"

View File

@ -57,6 +57,7 @@
<color name="c_profile_radial_inner">#2c2b31</color> <color name="c_profile_radial_inner">#2c2b31</color>
<color name="c_profile_radial_outer">#2c2b31</color> <color name="c_profile_radial_outer">#2c2b31</color>
<color name="c_edittext_background">#3c3946</color> <color name="c_edittext_background">#3c3946</color>
<color name="c_edittext_background_error">#660b0b</color>
<color name="c_edittext_background_dark">#24222a</color> <color name="c_edittext_background_dark">#24222a</color>
<color name="c_menu_drop_shadow_05">#00000000</color> <color name="c_menu_drop_shadow_05">#00000000</color>
<color name="c_menu_drop_shadow_10">#00000000</color> <color name="c_menu_drop_shadow_10">#00000000</color>

View File

@ -40,7 +40,7 @@
<color name="c_checkbox_tint">#3385ff</color> <color name="c_checkbox_tint">#3385ff</color>
<color name="c_checkbox_tint_default">#3385ff</color> <color name="c_checkbox_tint_default">#3385ff</color>
<color name="c_border_background">#f9f9f9</color> <color name="c_border_background">#f9f9f9</color>
<color name="c_border_background_divider">#808080</color> <color name="c_border_background_divider">#f7f7f7</color>
<color name="c_security_popup_background">#f5fff5</color> <color name="c_security_popup_background">#f5fff5</color>
<color name="c_security_popup_divider">#e0ffe0</color> <color name="c_security_popup_divider">#e0ffe0</color>
<color name="c_font_change_background">#e3e3e3</color> <color name="c_font_change_background">#e3e3e3</color>
@ -59,6 +59,7 @@
<color name="c_profile_radial_inner">#000000</color> <color name="c_profile_radial_inner">#000000</color>
<color name="c_profile_radial_outer">#ffffff</color> <color name="c_profile_radial_outer">#ffffff</color>
<color name="c_edittext_background">#f1f3f4</color> <color name="c_edittext_background">#f1f3f4</color>
<color name="c_edittext_background_error">#f9e2eb</color>
<color name="c_edittext_background_dark">#f5f5f5</color> <color name="c_edittext_background_dark">#f5f5f5</color>
<color name="c_button_warning">#f65555</color> <color name="c_button_warning">#f65555</color>
<color name="c_rateus_warning">#b3b3b3</color> <color name="c_rateus_warning">#b3b3b3</color>

View File

@ -326,6 +326,15 @@
We want to inform users of this Service that these third parties have access to your Personal Information. The reason is to perform the tasks assigned to them on our behalf. However, they are obligated not to disclose or use the information for any other purpose. We value your trust in providing us your Personal Information, thus we are striving to use commercially acceptable means of protecting it. But remember that no method of transmission over the internet, or method of electronic storage is 100% secure and reliable, and we cannot guarantee its absolute security\n\n We want to inform users of this Service that these third parties have access to your Personal Information. The reason is to perform the tasks assigned to them on our behalf. However, they are obligated not to disclose or use the information for any other purpose. We value your trust in providing us your Personal Information, thus we are striving to use commercially acceptable means of protecting it. But remember that no method of transmission over the internet, or method of electronic storage is 100% secure and reliable, and we cannot guarantee its absolute security\n\n
This Service only contain links to other sites. If you click on a third-party link, you will be directed to that site. Note that these external sites are not operated by us. Therefore, we strongly advise you to review the Privacy Policy of these websites. We have no control over and assume no responsibility for the content, privacy policies, or practices of any third-party sites or services. We may update our Privacy Policy from time to time. Thus, you are advised to review this page periodically for any changes. We will notify you of any changes by posting the new Privacy Policy on this page. These changes are effective immediately after they are posted on this page.</string> This Service only contain links to other sites. If you click on a third-party link, you will be directed to that site. Note that these external sites are not operated by us. Therefore, we strongly advise you to review the Privacy Policy of these websites. We have no control over and assume no responsibility for the content, privacy policies, or practices of any third-party sites or services. We may update our Privacy Policy from time to time. Thus, you are advised to review this page periodically for any changes. We will notify you of any changes by posting the new Privacy Policy on this page. These changes are effective immediately after they are posted on this page.</string>
<!-- Bookmark Setting -->
<string name="BOOKMARK_SETTING_HEADER" translatable="true">Edit Bookmark</string>
<string name="BOOKMARK_SETTING_HEADER_NAME" translatable="true">Bookmark URL</string>
<string name="BOOKMARK_SETTING_HEADER_URL" translatable="true">Bookmark Name</string>
<string name="BOOKMARK_SETTING_HEADER_NAME_HINT" translatable="true">enter bookmark name</string>
<string name="BOOKMARK_SETTING_HEADER_URL_HINT" translatable="true">enter bookmark url</string>
<string name="BOOKMARK_SETTING_HEADER_NAME_ERROR" translatable="true"> ➔ invalid bookmark name</string>
<string name="BOOKMARK_SETTING_HEADER_URL_ERROR" translatable="true"> ➔ invalid bookmark url</string>
<!-- Bridge Settings --> <!-- Bridge Settings -->
<string name="BRIDGE_BASIC_SETTING" translatable="true">Security Settings</string> <string name="BRIDGE_BASIC_SETTING" translatable="true">Security Settings</string>
<string name="BRIDGE_SETTING" translatable="true">Bridge Settings</string> <string name="BRIDGE_SETTING" translatable="true">Bridge Settings</string>

View File

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

View File

@ -1,5 +1,8 @@
buildscript { buildscript {
ext {
kotlin_version = '1.5.10'
}
ext.kotlinVersion = '1.1.51' ext.kotlinVersion = '1.1.51'
repositories { repositories {
google() google()