Bug Fixes

Bug Fixes
master
Abdul Mannan Saeed 2021-08-01 02:47:13 -07:00
parent 836183291c
commit e15242b411
844 changed files with 18383 additions and 16501 deletions

View File

@ -4,7 +4,7 @@
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="PLATFORM" />
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">

View File

@ -1,16 +1,19 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="AndroidDomInspection" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="AndroidLintPxUsage" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="AndroidLintSuspiciousImport" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="BooleanMethodIsAlwaysInverted" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="BusyWait" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CatchMayIgnoreException" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CodeBlock2Expr" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CollectionAddAllCanBeReplacedWithConstructor" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="ConstantConditions" enabled="false" level="WARNING" enabled_by_default="false">
<option name="SUGGEST_NULLABLE_ANNOTATIONS" value="false" />
<option name="DONT_REPORT_TRUE_ASSERT_STATEMENTS" value="false" />
</inspection_tool>
<inspection_tool class="Convert2MethodRef" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="Deprecation" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="DifferentKotlinGradleVersion" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="EmptyStatementBody" enabled="false" level="WARNING" enabled_by_default="false">
@ -37,6 +40,7 @@
<option name="processLiterals" value="true" />
<option name="processComments" value="true" />
</inspection_tool>
<inspection_tool class="StringConcatenationInLoops" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SuspiciousListRemoveInLoop" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SuspiciousMethodCalls" enabled="false" level="WARNING" enabled_by_default="false">
<option name="REPORT_CONVERTIBLE_METHOD_CALLS" value="true" />

View File

@ -1,5 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DesignSurface">
<option name="filePathToZoomLevelMap">
<map>
<entry key="..\:/Workspace/Genesis Android/app/src/main/res/layouts/alert/layout/application_crash.xml" value="0.33" />
<entry key="..\:/Workspace/Genesis Android/app/src/main/res/layouts/alert/layout/certificate_info.xml" value="0.20260416666666667" />
<entry key="..\:/Workspace/Genesis Android/app/src/main/res/layouts/alert/layout/popup_block_popup.xml" value="0.20260416666666667" />
<entry key="..\:/Workspace/Genesis Android/app/src/main/res/layouts/alert/layout/popup_bridge_mail.xml" value="0.20260416666666667" />
<entry key="..\:/Workspace/Genesis Android/app/src/main/res/layouts/alert/layout/popup_clear_bookmark.xml" value="0.20260416666666667" />
<entry key="..\:/Workspace/Genesis Android/app/src/main/res/layouts/alert/layout/popup_clear_history.xml" value="0.20260416666666667" />
<entry key="..\:/Workspace/Genesis Android/app/src/main/res/layouts/alert/layout/popup_create_bookmark.xml" value="0.20260416666666667" />
<entry key="..\:/Workspace/Genesis Android/app/src/main/res/layouts/alert/layout/popup_data_cleared.xml" value="0.20260416666666667" />
<entry key="..\:/Workspace/Genesis Android/app/src/main/res/layouts/alert/layout/popup_load_new_tab.xml" value="0.33" />
<entry key="..\:/Workspace/Genesis Android/app/src/main/res/layouts/alert/layout/popup_max_tab.xml" value="0.20260416666666667" />
<entry key="..\:/Workspace/Genesis Android/app/src/main/res/layouts/alert/layout/popup_new_circuit.xml" value="0.20260416666666667" />
<entry key="..\:/Workspace/Genesis Android/app/src/main/res/layouts/alert/layout/popup_not_supported.xml" value="0.20260416666666667" />
<entry key="..\:/Workspace/Genesis Android/app/src/main/res/layouts/alert/layout/popup_orbot_connecting.xml" value="0.20260416666666667" />
<entry key="..\:/Workspace/Genesis Android/app/src/main/res/layouts/alert/layout/popup_panic.xml" value="0.20260416666666667" />
<entry key="..\:/Workspace/Genesis Android/app/src/main/res/layouts/alert/layout/popup_rate_failure.xml" value="0.20260416666666667" />
<entry key="..\:/Workspace/Genesis Android/app/src/main/res/layouts/alert/layout/popup_rate_us.xml" value="0.20260416666666667" />
<entry key="..\:/Workspace/Genesis Android/app/src/main/res/layouts/alert/layout/popup_toast_generic.xml" value="0.20260416666666667" />
<entry key="..\:/Workspace/Genesis Android/app/src/main/res/layouts/alert/layout/popup_undo.xml" value="0.20260416666666667" />
<entry key="..\:/Workspace/Genesis Android/app/src/main/res/layouts/alert/layout/popup_update_bridges.xml" value="0.20260416666666667" />
<entry key="..\:/Workspace/Genesis Android/app/src/main/res/layouts/alert/layout/popup_url_longpress.xml" value="0.20260416666666667" />
<entry key="..\:/Workspace/Genesis Android/app/src/main/res/layouts/setting/layout/setting.xml" value="0.33" />
<entry key="..\:/Workspace/Genesis Android/app/src/main/res/layouts/setting/layout/setting_advance_view.xml" value="0.33" />
</map>
</option>
</component>
<component name="NullableNotNullManager">
<option name="myDefaultNullable" value="org.jetbrains.annotations.Nullable" />
<option name="myDefaultNotNull" value="androidx.annotation.NonNull" />
@ -25,7 +53,7 @@
</option>
<option name="myNotNulls">
<value>
<list size="13">
<list size="14">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="1" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="2" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
@ -39,6 +67,7 @@
<item index="10" class="java.lang.String" itemvalue="org.eclipse.jdt.annotation.NonNull" />
<item index="11" class="java.lang.String" itemvalue="io.reactivex.annotations.NonNull" />
<item index="12" class="java.lang.String" itemvalue="io.reactivex.rxjava3.annotations.NonNull" />
<item index="13" class="java.lang.String" itemvalue="lombok.NonNull" />
</list>
</value>
</option>

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
</set>
</option>
</component>
</project>

View File

@ -78,7 +78,6 @@ dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'androidx.preference:preference-ktx:1.1.1'
implementation 'androidx.legacy:legacy-preference-v14:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
@ -88,23 +87,20 @@ dependencies {
/* Default Libraries */
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.preference:preference-ktx:1.1.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
/* Firefox ABI Splits */
implementation "org.mozilla.components:browser-engine-gecko:73.0.8"
implementation "org.mozilla.components:browser-icons:73.0.9"
implementation "org.mozilla.geckoview:geckoview:89.0.20210622155641"
implementation "org.mozilla.components:concept-fetch:73.0.9"
implementation "org.mozilla.components:concept-base:73.0.9"
implementation "org.mozilla.components:support-utils:73.0.9"
implementation "org.mozilla.components:browser-engine-gecko:75.0.0"
implementation "org.mozilla.components:browser-icons:91.0.6"
implementation "org.mozilla.geckoview:geckoview: 90.0.20210705185941"
implementation "org.mozilla.components:concept-fetch:91.0.6"
implementation "org.mozilla.components:concept-base:91.0.6"
implementation "org.mozilla.components:support-utils:91.0.6"
/*Crashlytics*/
@ -112,9 +108,10 @@ dependencies {
/* Ads Manager */
implementation('com.mopub:mopub-sdk:5.17.0@aar') {
implementation 'com.facebook.android:audience-network-sdk:6.5.1'
/* implementation('com.mopub:mopub-sdk:5.17.0@aar') {
transitive = true
}
} */
/* Orbot Service */
@ -125,19 +122,18 @@ dependencies {
implementation files('libs/httpclientandroidlib-1.2.1.jar')
implementation 'com.coolerfall:android-http-download-manager:1.6.3'
implementation 'com.github.intelligo-systems:slight:1.1.3'
implementation 'com.github.apl-devs:appintro:v4.2.2'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.volley:volley:1.2.0'
implementation 'com.github.instacart.truetime-android:library-extension-rx:3.3'
implementation "net.zetetic:android-database-sqlcipher:4.4.3"
implementation "androidx.sqlite:sqlite-ktx:2.1.0"
implementation 'com.github.apl-devs:appintro:v4.2.2'
implementation 'androidx.palette:palette-ktx:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
implementation 'com.google.android.material:material:1.4.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'com.google.android.gms:play-services-ads:20.2.0'
}
/* Automated APK Generation */

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,59 @@
{
"version": 2,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.darkweb.genesissearchengine.production",
"variantName": "genesisRelease",
"elements": [
{
"type": "ONE_OF_MANY",
"filters": [
{
"filterType": "ABI",
"value": "x86_64"
}
],
"versionCode": 178,
"versionName": "Build | Dark-Origin 1.4.7.1",
"outputFile": "app-genesis-x86_64-release.apk"
},
{
"type": "ONE_OF_MANY",
"filters": [
{
"filterType": "ABI",
"value": "armeabi-v7a"
}
],
"versionCode": 175,
"versionName": "Build | Dark-Origin 1.4.7.1",
"outputFile": "app-genesis-armeabi-v7a-release.apk"
},
{
"type": "ONE_OF_MANY",
"filters": [
{
"filterType": "ABI",
"value": "arm64-v8a"
}
],
"versionCode": 176,
"versionName": "Build | Dark-Origin 1.4.7.1",
"outputFile": "app-genesis-arm64-v8a-release.apk"
},
{
"type": "ONE_OF_MANY",
"filters": [
{
"filterType": "ABI",
"value": "x86"
}
],
"versionCode": 177,
"versionName": "Build | Dark-Origin 1.4.7.1",
"outputFile": "app-genesis-x86-release.apk"
}
]
}

View File

@ -25,11 +25,12 @@
android:requestLegacyExternalStorage="true"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:debuggable="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true"
tools:targetApi="n">
<activity
android:name="com.darkweb.genesissearchengine.appManager.bookmarkManager.BookmarkSettings.bookmarkSettingController"
android:name="com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkSettings.bookmarkSettingController"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:windowSoftInputMode="adjustPan" />
@ -117,13 +118,6 @@
android:name="com.darkweb.genesissearchengine.appManager.settingManager.searchEngineManager.settingSearchController"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:windowSoftInputMode="adjustPan" />
<activity
android:name="com.darkweb.genesissearchengine.appManager.landingManager.landingController"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:label="@string/SETTING_HEADER"
android:exported="true"
android:launchMode="singleTop"
android:windowSoftInputMode="adjustPan" />
<activity
android:name="com.darkweb.genesissearchengine.appManager.settingManager.trackingManager.settingTrackingController"
@ -133,7 +127,7 @@
android:name="com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController"
android:configChanges="keyboard|keyboardHidden|mcc|mnc|orientation|screenSize|locale|layoutDirection|smallestScreenSize|screenLayout"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:screenOrientation="fullSensor"
android:windowSoftInputMode="adjustPan">
<meta-data
android:name="android.app.shortcuts"
@ -206,7 +200,7 @@
<!-- -->
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-5074525529134731~8620681036" /> <!-- Development Build -->
android:value="ca-app-pub-5074525529134731~4717329156" /> <!-- Development Build -->
<!--
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
@ -238,19 +232,7 @@
<action android:name="org.torproject.android.intent.action.START" />
</intent-filter>
</receiver>
<!--
Permissions File Provider Live
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="com.darkweb.genesissearchengine.production.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths" />
</provider>
-->
<!-- Permissions File Provider Dev -->
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="com.darkweb.genesissearchengine.production.provider"

View File

@ -74,9 +74,7 @@ $(window).on('load', function() {
// var mResponseJson = '[{ "mIcon":"https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196", "mHeader":"Experience", "mBody":"Donec id elit non mi porta gravida at eget metus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui"},{ "mIcon":"https://wikileaks.org/static/img/wl-logo.png", "mHeader":"Experience", "mBody":"Donec id elit non mi porta gravida at eget metus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui"},{ "mIcon":"https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196", "mHeader":"Experience", "mBody":"Donec id elit non mi porta gravida at eget metus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui"},{ "mIcon":"https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196", "mHeader":"Experience", "mBody":"Donec id elit non mi porta gravida at eget metus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui"},{ "mIcon":"https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196", "mHeader":"Experience", "mBody":"Donec id elit non mi porta gravida at eget metus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui"},{ "mIcon":"https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196", "mHeader":"Experience", "mBody":"Donec id elit non mi porta gravida at eget metus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui"}]';
// setTimeout(mHomepageLoader.onLoadReferenceWebsites, 500);
// setTimeout(mHomepageLoader.onLoadReferenceWebsiteContent, 1000, mResponseJson);
$(document).ready(function() {
$('body').hide().fadeIn('fast');
});
document.getElementById("pBody").classList.toggle('body_fadein');
setTimeout(function (){
onTriggerScriptHandler(Commands.onLoadReferenceWebsites, null)

View File

@ -1,8 +1,8 @@
/*Search*/
body{
opacity: 0;
transition: opacity 2s;
-webkit-transition: opacity 2s; /* Safari */
transition: opacity 0s;
-webkit-transition: opacity 0s; /* Safari */
}
.body_fadein {

View File

@ -1,6 +1,8 @@
/*Search*/
body{
opacity: 1;
opacity: 0;
transition: opacity 0s;
-webkit-transition: opacity 0s; /* Safari */
}
.body_fadein {

View File

@ -0,0 +1,56 @@
# Contents of /data/local/tmp/com.yourcompany.yourapp-geckoview-config.yaml
env:
MOZ_LOG: nsHttp:5
prefs:
network.proxy.type: 1
network.proxy.socks: "127.0.0.1"
network.proxy.socks_port: 9050
network.proxy.socks_version: 5
network.proxy.socks_remote_dns: true
permissions.default.image: 2
browser.display.show_image_placeholders: true
browser.cache.disk.enable: false
browser.cache.memory.enable: true
browser.cache.disk.capacity: 0
privacy.resistFingerprinting: true
privacy.donottrackheader.enabled: false
privacy.donottrackheader.value: 1
network.http.sendRefererHeader: 0
security.checkloaduri: false
security.mixed_content.block_active_content: false
security.mixed_content.block_display_content: false
media.peerconnection.enabled: false //webrtc disabled
browser.cache.disk_cache_ssl: true
signon.formlessCapture.enabled: true
signon.storeWhenAutocompleteOff: true
dom.event.contextmenu.enabled: true
layout.css.visited_links_enabled: true
security.ssl3.ecdhe_rsa_aes_128_sha: true
security.ssl3.ecdhe_ecdsa_aes_128_sha: true
security.ssl3.dhe_rsa_aes_128_sha: true
security.ssl3.rsa_des_ede3_sha: true
security.ssl3.dhe_rsa_aes_256_sha: true
browser.safebrowsing.blockedURIs.enabled: false
media.gmp-provider.enabled: false
browser.send_pings.require_same_host: false
webgl.disabled: false
pdfjs.enableWebGL: false
browser.safebrowsing.malware.enabled: false
security.csp.experimentalEnabled: false
network.http.referer.spoofSource: false
security.OCSP.require: false
security.ssl.require_safe_negotiation: false
privacy.clearOnShutdown.cache: true
privacy.clearOnShutdown.downloads: true
privacy.clearOnShutdown.formdata: true
privacy.clearOnShutdown.history: true
privacy.clearOnShutdown.offlineApps: true
privacy.clearOnShutdown.passwords: true
privacy.clearOnShutdown.sessions: true
privacy.clearOnShutdown.siteSettings: true

View File

@ -0,0 +1,56 @@
# Contents of /data/local/tmp/com.yourcompany.yourapp-geckoview-config.yaml
env:
MOZ_LOG: nsHttp:5
prefs:
network.proxy.type: 1
network.proxy.socks: "127.0.0.1"
network.proxy.socks_port: 9050
network.proxy.socks_version: 5
network.proxy.socks_remote_dns: true
permissions.default.image: 1
browser.display.show_image_placeholders: true
browser.cache.disk.enable: false
browser.cache.memory.enable: true
browser.cache.disk.capacity: 0
privacy.resistFingerprinting: true
privacy.donottrackheader.enabled: false
privacy.donottrackheader.value: 1
network.http.sendRefererHeader: 0
security.checkloaduri: false
security.mixed_content.block_active_content: false
security.mixed_content.block_display_content: false
media.peerconnection.enabled: false //webrtc disabled
browser.cache.disk_cache_ssl: true
signon.formlessCapture.enabled: true
signon.storeWhenAutocompleteOff: true
dom.event.contextmenu.enabled: true
layout.css.visited_links_enabled: true
security.ssl3.ecdhe_rsa_aes_128_sha: true
security.ssl3.ecdhe_ecdsa_aes_128_sha: true
security.ssl3.dhe_rsa_aes_128_sha: true
security.ssl3.rsa_des_ede3_sha: true
security.ssl3.dhe_rsa_aes_256_sha: true
browser.safebrowsing.blockedURIs.enabled: false
media.gmp-provider.enabled: false
browser.send_pings.require_same_host: false
webgl.disabled: false
pdfjs.enableWebGL: false
browser.safebrowsing.malware.enabled: false
security.csp.experimentalEnabled: false
network.http.referer.spoofSource: false
security.OCSP.require: false
security.ssl.require_safe_negotiation: false
privacy.clearOnShutdown.cache: true
privacy.clearOnShutdown.downloads: true
privacy.clearOnShutdown.formdata: true
privacy.clearOnShutdown.history: true
privacy.clearOnShutdown.offlineApps: true
privacy.clearOnShutdown.passwords: true
privacy.clearOnShutdown.sessions: true
privacy.clearOnShutdown.siteSettings: true

View File

@ -1,4 +1,4 @@
package com.darkweb.genesissearchengine.appManager.bookmarkManager.BookmarkSettings;
package com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkSettings;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;

View File

@ -1,4 +1,4 @@
package com.darkweb.genesissearchengine.appManager.bookmarkManager.BookmarkSettings;
package com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkSettings;
public class bookmarkSettingEnums
{

View File

@ -1,4 +1,4 @@
package com.darkweb.genesissearchengine.appManager.bookmarkManager.BookmarkSettings;
package com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkSettings;
import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.constants.strings;

View File

@ -1,4 +1,4 @@
package com.darkweb.genesissearchengine.appManager.bookmarkManager.BookmarkSettings;
package com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkSettings;
import android.widget.EditText;
import android.widget.TextView;

View File

@ -2,7 +2,6 @@ package com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkHome;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Bitmap;
import android.os.Handler;
import android.view.LayoutInflater;
import android.view.MotionEvent;
@ -20,7 +19,6 @@ import com.darkweb.genesissearchengine.eventObserver;
import com.darkweb.genesissearchengine.helperManager.helperMethod;
import com.example.myapplication.R;
import java.io.ByteArrayOutputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@ -397,8 +395,8 @@ public class bookmarkAdapter extends RecyclerView.Adapter<bookmarkAdapter.listVi
void bindListView(bookmarkRowModel model, int p_position) {
mDateContainer = itemView.findViewById(R.id.pDateContainer);
mHeader = itemView.findViewById(R.id.pHeader);
mDescription = itemView.findViewById(R.id.pDescription);
mHeader = itemView.findViewById(R.id.pOrbotRowHeader);
mDescription = itemView.findViewById(R.id.pOrbotRowDescription);
mRowContainer = itemView.findViewById(R.id.pRowContainer);
mRowMenu = itemView.findViewById(R.id.pRowMenu);
mDate = itemView.findViewById(R.id.pDate);

View File

@ -24,7 +24,7 @@ import androidx.recyclerview.widget.ItemTouchHelper;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.bookmarkManager.BookmarkSettings.bookmarkSettingController;
import com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkSettings.bookmarkSettingController;
import com.darkweb.genesissearchengine.dataManager.models.bookmarkRowModel;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.editTextManager;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
@ -305,7 +305,7 @@ public class bookmarkController extends AppCompatActivity
/* UI Redirection */
public void onBackPressed(View view){
public void onClose(View view){
onBackPressed();
}
@ -322,7 +322,7 @@ public class bookmarkController extends AppCompatActivity
for(int m_counter=0;m_counter<m_long_selected_urk.size();m_counter++){
mHomeController.postNewLinkTabAnimation(m_long_selected_urk.get(m_counter), false);
}
onBackPressed(null);
onClose(null);
mbookmarkAdapter.onTrigger(bookmarkEnums.eBookmarkAdapterCommands.M_CLEAR_LONG_SELECTED_URL,null);
mbookmarkViewController.onTrigger(bookmarkEnums.eBookmarkViewCommands.M_CLOSE_MENU, null);
}

View File

@ -2,64 +2,71 @@ package com.darkweb.genesissearchengine.appManager.externalCommandManager;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.dataManager.dataController;
import com.darkweb.genesissearchengine.helperManager.helperMethod;
import com.example.myapplication.R;
import org.torproject.android.service.wrapper.orbotLocalConstants;
import static com.darkweb.genesissearchengine.constants.constants.CONST_EXTERNAL_SHORTCUT_COMMAND_ERASE;
import static com.darkweb.genesissearchengine.constants.keys.EXTERNAL_SHORTCUT_COMMAND;
public class externalShortcutController extends AppCompatActivity {
/* Initialize */
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
status.sSettingIsAppStarted = false;
orbotLocalConstants.mIsTorInitialized = false;
boolean mConnect = false;
if (getIntent() != null && getIntent().getStringExtra("shortcut") != null) {
String bundleString = getIntent().getStringExtra("shortcut");
switch (bundleString) {
case "erase":
setContentView(R.layout.popup_data_cleared_shortcut);
panicExitInvoked();
new Handler().postDelayed(this::finish, 3000);
return;
case "erase_and_open":
panicExitInvoked();
mConnect = true;
break;
case "Restart":
break;
orbotLocalConstants.mIsTorInitialized = false;
Intent mIntent = new Intent(this, homeController.class);
if(getIntent() != null){
String mShortcutCommands = getIntent().getStringExtra(EXTERNAL_SHORTCUT_COMMAND);
if(mShortcutCommands!=null){
mIntent.putExtra(EXTERNAL_SHORTCUT_COMMAND, mShortcutCommands);
switch (mShortcutCommands) {
case CONST_EXTERNAL_SHORTCUT_COMMAND_ERASE:
setContentView(R.layout.popup_data_cleared_shortcut);
panicExitInvoked();
return;
case constants.CONST_EXTERNAL_SHORTCUT_COMMAND_ERASE_OPEN:
setContentView(R.layout.empty_view);
panicExitInvoked();
break;
case constants.CONST_EXTERNAL_SHORTCUT_COMMAND_RESTART:
break;
}
}
}
setContentView(R.layout.empty_view);
/* Start Required Activity */
if(mConnect){
new Handler().postDelayed(() -> activityContextManager.getInstance().getHomeController().onStartApplication(null), 3000);
helperMethod.openIntent(mIntent, this, constants.CONST_LIST_EXTERNAL_SHORTCUT);
}
/* UI TRIGGERS */
public void onUITrigger(View view){
if(view.getId() == R.id.pTDDismiss){
finishAffinity();
}
}
helperMethod.onDelayHandler(activityContextManager.getInstance().getHomeController(), 800, () -> {
/* Helper Methods */
/* Start Required Activity */
public void panicExitInvoked() {
Intent intent = new Intent(this.getIntent());
intent.setClassName(this.getApplicationContext(), homeController.class.getName());
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
this.startActivity(intent);
overridePendingTransition(R.anim.fade_in_lang, R.anim.fade_out_lang);
dataController.getInstance().clearData(this);
helperMethod.onDelayHandler(this, 3000, () -> {
finish();
return null;
});
}
public void panicExitInvoked() {
dataController.getInstance().clearData(this);
}
}

View File

@ -2,86 +2,54 @@ package com.darkweb.genesissearchengine.appManager.externalCommandManager;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import androidx.annotation.RequiresApi;
import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.constants.strings;
import com.darkweb.genesissearchengine.helperManager.helperMethod;
import com.example.myapplication.R;
import static com.darkweb.genesissearchengine.constants.constants.CONST_PACKAGE_NAME;
import static com.darkweb.genesissearchengine.constants.keys.EXTERNAL_SHORTCUT_COMMAND_NAVIGATE;
public class externalURLNavigationContoller extends AppCompatActivity {
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP_MR1)
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Uri data = externalURLNavigationContoller.this.getIntent().getData();
boolean mConnect = false;
if(activityContextManager.getInstance().getHomeController()!=null && (data == null || status.sSettingIsAppStarted)){
/* Close Activity */
finish();
activityContextManager.getInstance().onClearStack();
/* Create Request Handler */
if(status.sSettingIsAppStarted && data!=null){
helperMethod.onDelayHandler(this, 250, () -> {
activityContextManager.getInstance().getHomeController().onOpenLinkNewTab(activityContextManager.getInstance().getHomeController().completeURL(data.toString()));
activityContextManager.getInstance().getHomeController().onClearSelectionTab();
return null;
});
}
Intent bringToForegroundIntent = new Intent(activityContextManager.getInstance().getHomeController(), homeController.class);
bringToForegroundIntent.setFlags(Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(bringToForegroundIntent);
overridePendingTransition(R.anim.fade_in_instant, R.anim.fade_out_instant);
mConnect = true;
Uri mData = externalURLNavigationContoller.this.getIntent().getData();
if(mData == null){
mData = Uri.parse(constants.CONST_BACKEND_GENESIS_URL);
}
else if(status.sSettingIsAppRunning){
/* Refresh Intent Data */
finish();
status.sExternalWebsite = data.toString();
}else {
/* Start Required Activity */
Intent intent = new Intent(this.getIntent());
intent.setClassName(this.getApplicationContext(), homeController.class.getName());
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
if(activityContextManager.getInstance().getHomeController()!=null){
activityContextManager.getInstance().getHomeController().onOpenLinkNewTab(data.toString());
}else {
status.sExternalWebsite = data.toString();
}
/* Bring Application To Front */
Intent launchIntent = getPackageManager().getLaunchIntentForPackage(CONST_PACKAGE_NAME);
startActivity(launchIntent);
overridePendingTransition(R.anim.fade_in_instant, R.anim.fade_out_instant);
mConnect = true;
/* Close Activity */
helperMethod.onDelayHandler(this, 1000, () -> {
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP_MR1){
if(getReferrer().getHost().equals(CONST_PACKAGE_NAME)){
helperMethod.openURLInCustomBrowser(mData.toString(), this);
finish();
return null;
});
return;
}
}
if(mConnect){
new Handler().postDelayed(() -> activityContextManager.getInstance().getHomeController().onStartApplication(null), 3000);
else{
if(!helperMethod.getHost(mData.toString()).contains(".onion")){
helperMethod.openURLInCustomBrowser(mData.toString(), this);
finish();
return;
}
}
if(activityContextManager.getInstance().getHomeController()==null){
Intent mIntent = new Intent(this, homeController.class);
mIntent.putExtra(EXTERNAL_SHORTCUT_COMMAND_NAVIGATE, mData.toString());
helperMethod.openIntent(mIntent, this, constants.CONST_LIST_EXTERNAL_SHORTCUT);
}
else {
activityContextManager.getInstance().getHomeController().onExternalURLInvoke(mData.toString());
}
finish();
}
}

View File

@ -2,10 +2,8 @@ package com.darkweb.genesissearchengine.appManager.historyManager;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.os.Handler;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
@ -474,8 +472,8 @@ public class historyAdapter extends RecyclerView.Adapter<historyAdapter.listView
@SuppressLint("UseCompatLoadingForDrawables")
void bindListView(historyRowModel model, int p_position) {
mDateContainer = itemView.findViewById(R.id.pDateContainer);
mHeader = itemView.findViewById(R.id.pHeader);
mDescription = itemView.findViewById(R.id.pDescription);
mHeader = itemView.findViewById(R.id.pOrbotRowHeader);
mDescription = itemView.findViewById(R.id.pOrbotRowDescription);
mRowContainer = itemView.findViewById(R.id.pRowContainer);
mRowMenu = itemView.findViewById(R.id.pRowMenu);
mDate = itemView.findViewById(R.id.pDate);

View File

@ -19,8 +19,10 @@ public class errorHandler
this.mContext = mContext;
if (mErrorTemplate == null) {
StringBuilder builder = new StringBuilder();
try (InputStream stream = mResourceURL; BufferedReader reader = new BufferedReader(new InputStreamReader(stream))) {
try {
InputStream stream = mResourceURL;
BufferedReader reader = new BufferedReader(new InputStreamReader(stream));
String line;
while ((line = reader.readLine()) != null) {
builder.append(line);

View File

@ -681,19 +681,7 @@ public class extendedGeckoView extends FrameLayout {
* @param event A {@link MotionEvent}
* @return One of the {@link PanZoomController#INPUT_RESULT_UNHANDLED INPUT_RESULT_*}) indicating how the event was handled.
*/
public @NonNull GeckoResult<Integer> onTouchEventForResult(final @NonNull MotionEvent event) {
if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
requestFocus();
}
if (mSession == null) {
return GeckoResult.fromValue(PanZoomController.INPUT_RESULT_UNHANDLED);
}
// NOTE: Treat mouse events as "touch" rather than as "mouse", so mouse can be
// used to pan/zoom. Call onMouseEvent() instead for behavior similar to desktop.
return mSession.getPanZoomController().onTouchEventForResult(event);
}
@Override
public boolean onGenericMotionEvent(final MotionEvent event) {

View File

@ -1,6 +1,7 @@
package com.darkweb.genesissearchengine.appManager.homeManager.geckoManager;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Handler;
@ -8,24 +9,23 @@ import android.util.Log;
import android.widget.ImageView;
import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
import com.darkweb.genesissearchengine.appManager.kotlinHelperLibraries.BrowserIconManager;
import com.darkweb.genesissearchengine.constants.*;
import com.darkweb.genesissearchengine.dataManager.dataController;
import com.darkweb.genesissearchengine.dataManager.dataEnums;
import com.darkweb.genesissearchengine.eventObserver;
import com.darkweb.genesissearchengine.helperManager.helperMethod;
import com.darkweb.genesissearchengine.pluginManager.pluginController;
import java.io.File;
import java.util.Collections;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
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_REPORT_URL;
import static com.darkweb.genesissearchengine.constants.enums.etype.on_handle_external_intent;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.M_APPLICATION_CRASH;
import static org.mozilla.geckoview.GeckoSessionSettings.USER_AGENT_MODE_MOBILE;
import static org.mozilla.geckoview.StorageController.ClearFlags.AUTH_SESSIONS;
import static org.mozilla.geckoview.StorageController.ClearFlags.COOKIES;
@ -35,8 +35,10 @@ import static org.mozilla.geckoview.StorageController.ClearFlags.NETWORK_CACHE;
import static org.mozilla.geckoview.StorageController.ClearFlags.PERMISSIONS;
import static org.mozilla.geckoview.StorageController.ClearFlags.SITE_DATA;
import static org.mozilla.geckoview.StorageController.ClearFlags.SITE_SETTINGS;
import org.mozilla.geckoview.ContentBlocking;
import org.mozilla.geckoview.GeckoRuntime;
import org.mozilla.geckoview.GeckoRuntimeSettings;
import org.mozilla.geckoview.GeckoView;
import org.mozilla.geckoview.WebResponse;
@ -45,7 +47,11 @@ public class geckoClients
/*Gecko Variables*/
private geckoSession mSession = null;
private GeckoRuntime mRuntime = null;
private geckoSession mSession1 = null;
private geckoSession mSession2 = null;
int mCounter = 0;
private static GeckoRuntime mRuntime = null;
private BrowserIconManager mIconManager;
private eventObserver.eventListener event;
@ -66,6 +72,7 @@ public class geckoClients
if(geckoView.getSession()!=null){
geckoView.releaseSession();
}
mSession = new geckoSession(new geckoViewClientCallback(),mSessionID,context, geckoView);
mSession.open(mRuntime);
mSession.getSettings().setUseTrackingProtection(status.sStatusDoNotTrack);
@ -78,6 +85,7 @@ public class geckoClients
onUpdateFont();
}
public void onValidateInitializeFromStartup(NestedGeckoView mNestedGeckoView, AppCompatActivity pcontext){
boolean mStatus = mSession.onValidateInitializeFromStartup();
if(mStatus){
@ -138,26 +146,67 @@ public class geckoClients
return mSession.getUserAgentMode();
}
public String getAssetsCacheFile(Context context, String fileName) {
File cacheFile = new File(context.getCacheDir(), fileName);
try {
InputStream inputStream = context.getAssets().open(fileName);
try {
FileOutputStream outputStream = new FileOutputStream(cacheFile);
try {
byte[] buf = new byte[1024];
int len;
while ((len = inputStream.read(buf)) > 0) {
outputStream.write(buf, 0, len);
}
} finally {
outputStream.close();
}
} finally {
inputStream.close();
}
} catch (IOException e) {
e.printStackTrace();
}
return cacheFile.getAbsolutePath();
}
static boolean mCreated = false;
@SuppressLint("WrongConstant")
public void initRuntimeSettings(AppCompatActivity context){
if(mRuntime==null){
mRuntime = GeckoRuntime.getDefault(context.getApplicationContext());
GeckoRuntimeSettings.Builder mSettings = new GeckoRuntimeSettings.Builder();
if(status.sShowImages == 2){
mSettings.configFilePath(getAssetsCacheFile(context, "config/geckoview-config-noimage.yaml"));
}else {
mSettings.configFilePath(getAssetsCacheFile(context, "config/geckoview-config.yaml"));
}
mSettings.build();
mRuntime = GeckoRuntime.create(context, mSettings.build());
mCreated = true;
onClearAll();
mRuntime.getSettings().setAboutConfigEnabled(true);
mRuntime.getSettings().setAutomaticFontSizeAdjustment(false);
mRuntime.getSettings().setWebFontsEnabled(status.sShowWebFonts);
mRuntime.getSettings().setForceUserScalableEnabled(status.sSettingEnableZoom);
mRuntime.getSettings().getContentBlocking().setCookieBehavior(getCookiesBehaviour());
mRuntime.getSettings().getContentBlocking().setSafeBrowsing(ContentBlocking.SafeBrowsing.DEFAULT);
mIconManager = new BrowserIconManager();
if(status.sSettingTrackingProtection == 1){
mRuntime.getSettings().getContentBlocking().setAntiTracking(ContentBlocking.AntiTracking.DEFAULT);
}else if(status.sSettingTrackingProtection == 2){
mRuntime.getSettings().getContentBlocking().setAntiTracking(ContentBlocking.AntiTracking.STRICT);
}
}
mIconManager = new BrowserIconManager();
}
public void onGetFavIcon(ImageView pImageView, String pURL, AppCompatActivity pcontext){
pURL = helperMethod.completeURL(helperMethod.getDomainName(pURL));
mIconManager.onLoadIconIntoView(pcontext,mRuntime, pImageView, pURL);
@ -174,6 +223,14 @@ public class geckoClients
@SuppressLint("WrongConstant")
public void updateSetting(NestedGeckoView mNestedGeckoView, AppCompatActivity pcontext){
GeckoRuntimeSettings.Builder mSettings = new GeckoRuntimeSettings.Builder();
if(status.sShowImages == 2){
mSettings.configFilePath(getAssetsCacheFile(pcontext, "config/geckoview-config-noimage.yaml"));
}else {
mSettings.configFilePath(getAssetsCacheFile(pcontext, "config/geckoview-config.yaml"));
}
mSettings.build();
mRuntime.getSettings().setRemoteDebuggingEnabled(false);
mRuntime.getSettings().setWebFontsEnabled(status.sShowWebFonts);
mRuntime.getSettings().getContentBlocking().setCookieBehavior(getCookiesBehaviour());
@ -287,6 +344,15 @@ public class geckoClients
return mSession.isLoaded();
}
public void onClearAll(){
mRuntime.getStorageController().clearData(NETWORK_CACHE);
mRuntime.getStorageController().clearData(IMAGE_CACHE);
mRuntime.getStorageController().clearData(DOM_STORAGES);
mRuntime.getStorageController().clearData(COOKIES);
mRuntime.getStorageController().clearData(SITE_SETTINGS);
mRuntime.getStorageController().clearData(SITE_DATA);
}
public void onClearSiteData(){
mRuntime.getStorageController().clearData(SITE_SETTINGS);
mRuntime.getStorageController().clearData(SITE_DATA);
@ -321,6 +387,10 @@ public class geckoClients
}
}
public String getSecurityInfo(){
return mSession.getSecurityInfo();
}
public boolean wasPreviousErrorPage(){
return mSession.wasPreviousErrorPage();
}

View File

@ -106,6 +106,7 @@ geckoSession extends GeckoSession implements GeckoSession.MediaDelegate,GeckoSes
private boolean mThemeChanged = false;
private int mScollOffset = 0;
private selectionActionDelegate mSelectionActionDelegate;
private SecurityInformation securityInfo = null;
/*Temp Variables*/
private GeckoSession.HistoryDelegate.HistoryList mHistoryList = null;
@ -305,10 +306,18 @@ geckoSession extends GeckoSession implements GeckoSession.MediaDelegate,GeckoSes
}
/*Progress Delegate*/
@UiThread
public void onSecurityChange(@NonNull final GeckoSession session,@NonNull final SecurityInformation securityInfo) {
this.securityInfo = securityInfo;
}
@Override
public void onPageStart(@NonNull GeckoSession var1, @NonNull String var2) {
if(mIsLoaded){
event.invokeObserver(Arrays.asList(var2,mSessionID,mCurrentTitle, m_current_url_id, mTheme, this), enums.etype.ON_UPDATE_SEARCH_BAR);
mCurrentURL = var2;
if(!var2.equals("about:blank")){
event.invokeObserver(Arrays.asList(var2,mSessionID,mCurrentTitle, m_current_url_id, mTheme, this), enums.etype.ON_UPDATE_SEARCH_BAR);
}
if(!isPageLoading){
mCurrentTitle = "loading";
m_current_url_id = -1;
@ -333,7 +342,7 @@ geckoSession extends GeckoSession implements GeckoSession.MediaDelegate,GeckoSes
if(var2){
if(mProgress>=100){
//event.invokeObserver(Arrays.asList(mCurrentURL,mSessionID,mCurrentTitle, mTheme), enums.etype.ON_UPDATE_THEME);
event.invokeObserver(Arrays.asList(mCurrentURL,mSessionID,mCurrentTitle, m_current_url_id, mTheme), enums.etype.on_update_favicon);
//event.invokeObserver(Arrays.asList(mCurrentURL,mSessionID,mCurrentTitle, m_current_url_id, mTheme), enums.etype.on_update_favicon);
event.invokeObserver(Arrays.asList(null,mSessionID), enums.etype.on_page_loaded);
if(!mThemeChanged){
@ -385,6 +394,30 @@ geckoSession extends GeckoSession implements GeckoSession.MediaDelegate,GeckoSes
}
}
public String getSecurityInfo(){
if(securityInfo!=null && securityInfo.certificate!=null){
String mAlternativeNames = strings.GENERIC_EMPTY_STR;
try{
for (List name : securityInfo.certificate.getSubjectAlternativeNames()){
mAlternativeNames = mAlternativeNames + name.get(1) + "<br>";
}
}catch (Exception ignored) {}
return "<br><b>Website</b><br>"+securityInfo.host + "<br><br>" +
"<b>Serial Number</b><br>" + securityInfo.certificate.getSerialNumber() + "<br><br>" +
"<b>Algorithm Name</b><br>" + securityInfo.certificate.getSigAlgName() + "<br><br>" +
"<b>Issued On</b><br>" + securityInfo.certificate.getNotBefore() + "<br><br>" +
"<b>Expires On</b><br>" + securityInfo.certificate.getNotAfter() + "<br><br>" +
"<b>Organization (O)</b><br>" + securityInfo.certificate.getSubjectDN().getName() + "<br><br>" +
"<b>Common Name (CN)</b><br>" + securityInfo.certificate.getIssuerDN().getName() + "<br><br>" +
"<b>Subject Alternative Names</b><br>" + mAlternativeNames;
}else {
return "Onion Secured Connection";
}
}
public void onProgressStart(){
if(!getCurrentURL().equals("about:blank") && !getCurrentURL().contains("genesishiddentechnologies.com") && !wasPreviousErrorPage() && !getCurrentURL().startsWith(CONST_GENESIS_URL_CACHED) && !getCurrentURL().startsWith(CONST_GENESIS_URL_CACHED_DARK) && !getCurrentURL().startsWith(CONST_GENESIS_HELP_URL_CACHE) && !getCurrentURL().startsWith(CONST_GENESIS_HELP_URL_CACHE_DARK)){
mContext.get().runOnUiThread(() -> event.invokeObserver(Arrays.asList(5,mSessionID), enums.etype.progress_update));
@ -606,8 +639,8 @@ geckoSession extends GeckoSession implements GeckoSession.MediaDelegate,GeckoSes
}else {
mResourceURL = mContext.get().getResources().getAssets().open(CONST_GENESIS_ERROR_CACHED_DARK);
}
}catch (Exception ignored){
}catch (Exception ex){
Log.i("asd","asd : " + ex.getMessage());
}
return GeckoResult.fromValue("data:text/html," + handler.createErrorPage(var3.category, var3.code,mContext.get(),var2, mResourceURL));

View File

@ -156,15 +156,14 @@ public class selectionActionDelegate implements ActionMode.Callback,
* @return True if the action is presently available.
*/
protected boolean isActionAvailable(final @NonNull String id) {
if (mSelection == null || mSelection.text.toString().length()<1) {
if (mSelection == null || mSelection.text.length()<1 || mSelection.text.getBytes().length >= 500000) {
return false;
}
if (mExternalActionsEnabled && !mSelection.text.isEmpty() &&
ACTION_PROCESS_TEXT.equals(id)) {
final PackageManager pm = mActivity.getPackageManager();
return pm.resolveActivity(getProcessTextIntent(),
PackageManager.MATCH_DEFAULT_ONLY) != null;
return pm.resolveActivity(getProcessTextIntent(),PackageManager.MATCH_DEFAULT_ONLY) != null;
}
if(id.equals("SEARCH") && !mSelection.text.isEmpty() && mExternalActionsEnabled){
return true;
@ -430,7 +429,7 @@ public class selectionActionDelegate implements ActionMode.Callback,
try{
if (mUseFloatingToolbar) {
String strManufacturer = android.os.Build.MANUFACTURER;
if (android.os.Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP_MR1 || (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && android.os.Build.VERSION.SDK_INT <= Build.VERSION_CODES.N_MR1 && strManufacturer.equals("samsung"))) {
if (android.os.Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP_MR1 || (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && android.os.Build.VERSION.SDK_INT <= Build.VERSION_CODES.N_MR1 && (strManufacturer.toLowerCase().contains("samsung") || android.os.Build.MODEL.toLowerCase().contains("samsung") || Build.PRODUCT.toLowerCase().contains("samsung")))) {
mActionMode = mActivity.startActionMode(this);
}else {
mActionMode = mActivity.startActionMode(new Callback2Wrapper(),ActionMode.TYPE_FLOATING);

View File

@ -16,6 +16,7 @@ import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.cardview.widget.CardView;
import androidx.recyclerview.widget.RecyclerView;
import com.darkweb.genesissearchengine.dataManager.models.historyRowModel;
@ -63,12 +64,10 @@ public class hintAdapter extends RecyclerView.Adapter<hintAdapter.listViewHolder
mHintList.clear();
mHintList.add( new historyRowModel("Genesis Search", "genesis.onion",-1));
}
notifyDataSetChanged();
}
public void onClearAdapter(){
//mPastWebIcon.clear();
mPastWebIcon.remove(0);
mPastWebIcon.remove(1);
mPastWebIcon.remove(2);
@ -103,7 +102,8 @@ public class hintAdapter extends RecyclerView.Adapter<hintAdapter.listViewHolder
TextView mURL;
ImageButton mMoveURL;
ImageView mHindTypeIcon;
ImageView mHintWebIcon = null;
CardView mHintWebIcon = null;
ImageView pHintWebIconImage = null;
LinearLayout mpHintListener;
ImageView mHindTypeIconTemp;
@ -113,22 +113,23 @@ public class hintAdapter extends RecyclerView.Adapter<hintAdapter.listViewHolder
@SuppressLint({"ClickableViewAccessibility", "UseCompatLoadingForDrawables"})
void bindListView(historyRowModel model) {
mHeader = itemView.findViewById(R.id.pHeader);
mHeader = itemView.findViewById(R.id.pOrbotRowHeader);
mHeaderSingle = itemView.findViewById(R.id.pHeaderSingle);
mURL = itemView.findViewById(R.id.pURL);
mHindTypeIcon = itemView.findViewById(R.id.pHindTypeIcon);
mpHintListener = itemView.findViewById(R.id.pHintListener);
mMoveURL = itemView.findViewById(R.id.pMoveURL);
mHintWebIcon = itemView.findViewById(R.id.pHintWebIcon);
pHintWebIconImage = itemView.findViewById(R.id.pHintWebIconImage);
mHindTypeIconTemp = new ImageView(mContext);
mHintWebIcon.setImageTintList(ColorStateList.valueOf(mContext.getResources().getColor(R.color.c_text_v6)));
pHintWebIconImage.setImageTintList(ColorStateList.valueOf(mContext.getResources().getColor(R.color.c_text_v6)));
if(mPastWebIcon.containsKey(getLayoutPosition())){
mHintWebIcon.setImageDrawable(mPastWebIcon.get(getLayoutPosition()));
mHintWebIcon.setImageTintList(null);
pHintWebIconImage.setImageDrawable(mPastWebIcon.get(getLayoutPosition()));
pHintWebIconImage.setImageTintList(null);
}else {
mHintWebIcon.setImageTintList(ColorStateList.valueOf(mContext.getResources().getColor(R.color.c_text_v8)));
pHintWebIconImage.setImageTintList(ColorStateList.valueOf(mContext.getResources().getColor(R.color.c_text_v8)));
Drawable mDrawable;
Resources res = itemView.getContext().getResources();
@ -136,7 +137,7 @@ public class hintAdapter extends RecyclerView.Adapter<hintAdapter.listViewHolder
mDrawable = Drawable.createFromXml(res, res.getXml(R.xml.ic_baseline_browser));
mMoveURL.setVisibility(View.VISIBLE);
mMoveURL.setOnTouchListener(listViewHolder.this);
mHintWebIcon.setImageDrawable(mDrawable);
pHintWebIconImage.setImageDrawable(mDrawable);
} catch (Exception ignored) {
}
@ -189,9 +190,9 @@ public class hintAdapter extends RecyclerView.Adapter<hintAdapter.listViewHolder
mpHintListener.setOnTouchListener(listViewHolder.this);
if(mURLLink.contains("genesishiddentechnologies.com") || mURLLink.contains("genesis.onion")){
mHintWebIcon.setImageTintList(null);
mHintWebIcon.setImageDrawable(itemView.getResources().getDrawable(R.drawable.genesis));
mPastWebIcon.put(getLayoutPosition(),mHintWebIcon.getDrawable());
pHintWebIconImage.setImageTintList(null);
pHintWebIconImage.setImageDrawable(itemView.getResources().getDrawable(R.drawable.genesis));
mPastWebIcon.put(getLayoutPosition(),pHintWebIconImage.getDrawable());
}else
{
String mURLPast = mURLLink;
@ -204,9 +205,9 @@ public class hintAdapter extends RecyclerView.Adapter<hintAdapter.listViewHolder
{
if(mHindTypeIconTemp.getDrawable() != null){
if(mURLPast.equals(mPastIconFlicker.get(getLayoutPosition()))){
mHintWebIcon.setImageTintList(null);
mHintWebIcon.setImageDrawable(mHindTypeIconTemp.getDrawable());
mPastWebIcon.put(getLayoutPosition(),mHintWebIcon.getDrawable());
pHintWebIconImage.setImageTintList(null);
pHintWebIconImage.setImageDrawable(mHindTypeIconTemp.getDrawable());
mPastWebIcon.put(getLayoutPosition(),pHintWebIconImage.getDrawable());
}
if(getLayoutPosition() == 1){
Log.i("FUSSSS1111","FUSSSS4444");

View File

@ -1,14 +1,17 @@
package com.darkweb.genesissearchengine.appManager.homeManager.homeController;
import android.annotation.SuppressLint;
import android.app.ActivityManager;
import android.app.DownloadManager;
import android.content.ActivityNotFoundException;
import android.content.BroadcastReceiver;
import android.content.ComponentCallbacks2;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.database.Cursor;
@ -44,7 +47,7 @@ import androidx.fragment.app.FragmentContainerView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.bookmarkManager.BookmarkSettings.bookmarkSettingController;
import com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkSettings.bookmarkSettingController;
import com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkHome.bookmarkController;
import com.darkweb.genesissearchengine.appManager.historyManager.historyController;
import com.darkweb.genesissearchengine.dataManager.models.historyRowModel;
@ -52,7 +55,6 @@ import com.darkweb.genesissearchengine.appManager.homeManager.geckoManager.Neste
import com.darkweb.genesissearchengine.appManager.homeManager.geckoManager.*;
import com.darkweb.genesissearchengine.appManager.homeManager.geckoManager.geckoSession;
import com.darkweb.genesissearchengine.appManager.homeManager.hintManager.hintAdapter;
import com.darkweb.genesissearchengine.appManager.landingManager.landingController;
import com.darkweb.genesissearchengine.appManager.languageManager.languageController;
import com.darkweb.genesissearchengine.appManager.orbotLogManager.orbotLogController;
import com.darkweb.genesissearchengine.appManager.orbotManager.orbotController;
@ -75,7 +77,8 @@ import com.darkweb.genesissearchengine.libs.trueTime.trueTime;
import com.darkweb.genesissearchengine.pluginManager.pluginController;
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
import com.example.myapplication.R;
import com.mopub.mobileads.MoPubView;
import com.google.android.gms.ads.AdView;
import com.widget.Genesis.widgetManager.widgetController;
import org.mozilla.geckoview.ContentBlocking;
import org.mozilla.geckoview.GeckoResult;
@ -100,17 +103,22 @@ import mozilla.components.support.utils.DownloadUtils;
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
import static android.content.Intent.FLAG_ACTIVITY_NO_ANIMATION;
import static androidx.appcompat.app.AppCompatDelegate.setDefaultNightMode;
import static com.darkweb.genesissearchengine.constants.constants.CONST_EXTERNAL_SHORTCUT_COMMAND_ERASE_OPEN;
import static com.darkweb.genesissearchengine.constants.constants.CONST_EXTERNAL_SHORTCUT_COMMAND_RESTART;
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_URL_CACHED;
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_UP_MOVE;
import static com.darkweb.genesissearchengine.constants.enums.etype.M_HOME_BUTTON_PRESSED;
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_NEW_LINK_IN_NEW_TAB;
import static com.darkweb.genesissearchengine.constants.enums.etype.WAS_SCROLL_CHANGED;
import static com.darkweb.genesissearchengine.constants.enums.etype.open_new_tab;
import static com.darkweb.genesissearchengine.constants.keys.EXTERNAL_SHORTCUT_COMMAND;
import static com.darkweb.genesissearchengine.constants.keys.EXTERNAL_SHORTCUT_COMMAND_NAVIGATE;
import static com.darkweb.genesissearchengine.constants.keys.M_ACTIVITY_RESPONSE;
import static com.darkweb.genesissearchengine.constants.responses.BOOKMARK_SETTING_CONTROLLER_SHOW_DELETE_ALERT;
import static com.darkweb.genesissearchengine.constants.responses.BOOKMARK_SETTING_CONTROLLER_SHOW_SUCCESS_ALERT;
@ -140,7 +148,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
private ImageView mLoadingIcon;
private ImageView mBlocker;
private TextView mLoadingText;
private MoPubView mBannerAds = null;
private LinearLayout mBannerAds = null;
private ImageButton mGatewaySplash;
private ImageButton mPanicButton;
private ImageButton mPanicButtonLandscape;
@ -211,6 +219,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
helperMethod.updateResources(this, status.mSystemLocale.getLanguage());
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
super.onCreate(savedInstanceState);
setContentView(R.layout.home_view);
@ -229,7 +238,28 @@ public class homeController extends AppCompatActivity implements ComponentCallba
initWidget();
initSuggestionView(new ArrayList<>(), strings.GENERIC_EMPTY_STR);
status.sSettingIsAppRunning = true;
org.torproject.android.service.util.Prefs.setContext(activityContextManager.getInstance().getHomeController());
initPreFixes();
initBundle();
}
public void initBundle(){
if(getIntent().getExtras()!=null){
String mShortcutCommand = getIntent().getExtras().getString(EXTERNAL_SHORTCUT_COMMAND);
String mShortcutCommandNavigate = getIntent().getExtras().getString(EXTERNAL_SHORTCUT_COMMAND_NAVIGATE);
if(mShortcutCommand!=null){
if(mShortcutCommand.equals(CONST_EXTERNAL_SHORTCUT_COMMAND_ERASE_OPEN) || mShortcutCommand.equals(CONST_EXTERNAL_SHORTCUT_COMMAND_RESTART)){
onStartApplication(null);
}
}
if(mShortcutCommandNavigate!=null){
status.sExternalWebsite = mShortcutCommandNavigate;
onStartApplication(null);
}
}
}
public boolean isSplashScreenLoading(){
return mSplashScreen.getAlpha()!=0;
}
public void initWidget(){
@ -340,6 +370,10 @@ public class homeController extends AppCompatActivity implements ComponentCallba
}
}
public void onUpdateBannerAdvert(){
mHomeViewController.updateBannerAdvertStatus(true, (boolean)pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
}
public void onLoadTabOnResume(){
Object mTempModel = dataController.getInstance().invokeTab(dataEnums.eTabCommands.GET_CURRENT_TAB, null);
if(mTempModel!=null){
@ -409,9 +443,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba
}
public void initLandingPage(){
if(!status.sLandingPageStatus){
helperMethod.openActivity(landingController.class, constants.CONST_LIST_HISTORY, homeController.this,false);
}
}
public void initializeAppModel()
@ -431,7 +462,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mWebViewContainer = findViewById(R.id.pWebLayoutView);
mTopLayout = findViewById(R.id.pTopLayout);
mLoadingIcon = findViewById(R.id.pLoadingIcon);
mBannerAds = findViewById(R.id.pAdView);
mBannerAds = findViewById(R.id.adView);
mGatewaySplash = findViewById(R.id.pSettings);
mTopBar = findViewById(R.id.pTopbar);
mBackSplash = findViewById(R.id.pTopImage);
@ -442,7 +473,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mFindCount = findViewById(R.id.pFindCount);
mVoiceInput = findViewById(R.id.pVoiceInput);
mMenu = findViewById(R.id.pMenu);
mBlocker = findViewById(R.id.pBlocker);
mBlocker = findViewById(R.id.pSecureRootBlocker);
mNestedScroll = findViewById(R.id.pNestedScroll);
mBlockerFullSceen = findViewById(R.id.pBlockerFullSceen);
mCopyright = findViewById(R.id.pCopyright);
@ -487,6 +518,15 @@ public class homeController extends AppCompatActivity implements ComponentCallba
public void initPreFixes() {
try {
String strManufacturer = android.os.Build.MANUFACTURER;
if((Build.VERSION.SDK_INT == Build.VERSION_CODES.O || Build.VERSION.SDK_INT == Build.VERSION_CODES.O_MR1) && strManufacturer.equals("samsung")){
PackageManager packageManager = getApplicationContext().getPackageManager();
packageManager.setComponentEnabledSetting(new ComponentName(getApplicationContext(), widgetController.class), PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
}else {
PackageManager packageManager = getApplicationContext().getPackageManager();
packageManager.setComponentEnabledSetting(new ComponentName(getApplicationContext(), widgetController.class), PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP);
}
if(getIntent().getBooleanExtra("crash", false)){
new Handler().postDelayed(() ->
{
@ -577,6 +617,14 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mGeckoClient.initialize(mGeckoView, new geckoViewCallback(), this,false);
}
public void onExternalURLInvoke(String pData){
if(status.sSettingIsAppStarted){
onOpenLinkNewTab(pData);
}else {
status.sExternalWebsite = pData;
onStartApplication(null);
}
}
public void onLoadURL(String url){
if(mGeckoView.getSession()!=null && !mGeckoView.getSession().isOpen()){
@ -588,6 +636,10 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mGeckoClient.loadURL(url.replace("genesis.onion","genesishiddentechnologies.com"),mGeckoView, homeController.this);
}
public String getSecurityInfo(){
return mGeckoClient.getSecurityInfo();
}
public void onLoadTab(geckoSession mTempSession, boolean isSessionClosed, boolean pExpandAppBar, boolean pForced){
if(!isSessionClosed){
@ -733,8 +785,10 @@ public class homeController extends AppCompatActivity implements ComponentCallba
@SuppressLint("ClickableViewAccessibility")
@Override
protected void onDestroy() {
pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_DESTROY);
if(!status.sSettingIsAppStarted){
super.onDestroy();
mGeckoClient.onClearAll();
return;
}
@ -751,17 +805,30 @@ public class homeController extends AppCompatActivity implements ComponentCallba
// mGeckoView.onDestroy();
unregisterReceiver(downloadStatus);
activityContextManager.getInstance().getHomeController().onResetData();
super.onDestroy();
}
private boolean isMyServiceRunning(Class<?> serviceClass) {
ActivityManager manager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
for (ActivityManager.RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {
if (serviceClass.getName().equals(service.service.getClassName())) {
return true;
}
}
return false;
}
@RequiresApi(api = Build.VERSION_CODES.M)
@SuppressLint("ClickableViewAccessibility")
private void initializeLocalEventHandlers() {
mSearchbar.setMovementMethod(null);
startService(new Intent(getBaseContext(), activityStateManager.class));
if(!isMyServiceRunning(activityStateManager.class)){
startService(new Intent(getBaseContext(), activityStateManager.class));
}
registerReceiver(downloadStatus,new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
@ -1000,6 +1067,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
}, 250);
}
public void onSuggestionMove(View view){
String val = view.getTag().toString();
mHomeViewController.onUpdateSearchBar(val,false,false, true);
@ -1009,7 +1077,8 @@ public class homeController extends AppCompatActivity implements ComponentCallba
pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_INITIALIZE_BANNER_ADS);
mGeckoClient.getSession().setTheme(null);
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), true);
onLoadURL(helperMethod.getDomainName(mHomeModel.getSearchEngine()));
mHomeViewController.onNewTabAnimation(Collections.singletonList(helperMethod.getDomainName(mHomeModel.getSearchEngine())), M_HOME_BUTTON_PRESSED);
}
/*TAB CONTROLLER EVENTS*/
@ -1057,7 +1126,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mGeckoView.getSession().setActive(true);
}else {
onLoadURL("about:blank");
mHomeViewController. onUpdateSearchBar(strings.HOME_BLANK_PAGE,false,true, false);
mHomeViewController.onNewTab();
}
@ -1071,7 +1139,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mHomeViewController.progressBarReset();
mHomeViewController.onUpdateSearchBar(url,false,true, false);
mGeckoClient.loadURL(url, mGeckoView, homeController.this);
Log.i("superman2222","superman2222");
if(isRemovable){
mGeckoClient.setRemovableFromBackPressed(true);
}
@ -1331,11 +1399,13 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mHomeViewController.onClearSelections(true);
mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(),false,true, true);
//mHomeViewController.initTopBarPadding();
//mHomeViewController.onSetBannerAdMargin(!mGeckoClient.isLoading(),(boolean)pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED)&&!!mGeckoClient.isLoading());
// mHomeViewController.initTopBarPadding();
// mHomeViewController.onSetBannerAdMargin(!mGeckoClient.isLoading(),(boolean)pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED)&&!!mGeckoClient.isLoading());
mHomeViewController.expandTopBar(false, mGeckoView.getMaxY());
status.sUIInteracted = true;
mHomeViewController.initSearchEngineView();
}
@Override
@ -1597,7 +1667,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mGeckoClient.manualDownloadWithName(pURL,pPath,this);
}
public MoPubView getBannerAd()
public LinearLayout getBannerAd()
{
return mBannerAds;
}
@ -1755,23 +1825,12 @@ public class homeController extends AppCompatActivity implements ComponentCallba
{
pluginController.getInstance().onOrbotInvoke(Collections.singletonList(status.mThemeApplying), pluginEnums.eOrbotManager.M_DESTROY);
new Handler().postDelayed(() ->
{
status.sSettingIsAppStarted = false;
finishAndRemoveTask();
finishAffinity();
overridePendingTransition(R.anim.popup_scale_in, R.anim.popup_scale_out);
activityContextManager.getInstance().getHomeController().onResetData();
mGeckoClient.onClearAll();
status.sSettingIsAppStarted = false;
new Thread(){
public void run(){
try {
sleep(1000);
android.os.Process.killProcess(android.os.Process.myPid());
System.exit(1);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}.start();
}, 100);
}
else if (menuId == R.id.pMenuFind)
{
@ -1857,16 +1916,31 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), true);
}
public void onResetData(){
mGeckoClient.onClearAll();
}
public void onOrbotLog(View view) {
mHomeViewController.closeMenu();
helperMethod.openActivity(orbotLogController.class, constants.CONST_LIST_HISTORY, homeController.this,true);
}
public void panicExit(View view) {
mGeckoClient.onClearAll();
pluginController.getInstance().onMessageManagerInvoke(null, M_RESET);
pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(homeController.this), M_PANIC_RESET);
}
public void quitApplication(){
pluginController.getInstance().onOrbotInvoke(Collections.singletonList(status.mThemeApplying), pluginEnums.eOrbotManager.M_DESTROY);
finishAffinity();
overridePendingTransition(R.anim.popup_scale_in, R.anim.popup_scale_out);
activityContextManager.getInstance().getHomeController().onResetData();
mGeckoClient.onClearAll();
status.sSettingIsAppStarted = false;
}
public void panicExitInvoked() {
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_SEARCH_HISTORY,true));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_SEARCH_SUGGESTION,true));
@ -1905,6 +1979,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.BRIDGE_ENABLES,false));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_GATEWAY_MANUAL,false));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_INSTALLED,false));
mGeckoClient.onClearAll();
dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_CLEAR_TAB, null);
@ -2033,6 +2108,10 @@ public class homeController extends AppCompatActivity implements ComponentCallba
else if(e_type.equals(M_INITIALIZE_TAB_SINGLE)){
initTabCount(enums.etype.ON_NEW_TAB_ANIMATION,data);
}
else if(e_type.equals(M_HOME_BUTTON_PRESSED)){
onLoadURL((String) data.get(0));
initTabCount(null,data);
}
else if(e_type.equals(M_INITIALIZE_TAB_LINK)){
postNewLinkTabAnimation((String)data.get(0),false);
}
@ -2040,6 +2119,12 @@ public class homeController extends AppCompatActivity implements ComponentCallba
{
mHomeViewController.onSetBannerAdMargin((boolean)data.get(0),(boolean)pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
}
else if(e_type.equals(enums.etype.M_ON_BANNER_UPDATE)){
Object mStatus = pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED);
if(mStatus!=null){
mHomeViewController.updateBannerAdvertStatus(false, (boolean)mStatus);
}
}
else if(e_type.equals(enums.etype.M_GET_CURRENT_URL))
{
if(mGeckoClient==null || mGeckoClient.getSession()==null){

View File

@ -16,6 +16,7 @@ import android.graphics.drawable.Drawable;
import android.graphics.drawable.GradientDrawable;
import android.graphics.drawable.InsetDrawable;
import android.graphics.drawable.StateListDrawable;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Handler;
import android.os.Message;
@ -46,9 +47,8 @@ import com.darkweb.genesissearchengine.libs.views.ColorAnimator;
import com.darkweb.genesissearchengine.eventObserver;
import com.darkweb.genesissearchengine.helperManager.helperMethod;
import com.example.myapplication.R;
import com.google.android.gms.ads.AdView;
import com.google.android.material.appbar.AppBarLayout;
import com.mopub.mobileads.MoPubView;
import org.mozilla.geckoview.GeckoView;
import org.torproject.android.service.wrapper.orbotLocalConstants;
import java.util.Arrays;
@ -62,6 +62,7 @@ import static com.darkweb.genesissearchengine.constants.constants.CONST_GENESIS_
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 org.mozilla.geckoview.GeckoSessionSettings.USER_AGENT_MODE_DESKTOP;
import static java.lang.Thread.sleep;
class homeViewController
{
@ -76,7 +77,7 @@ class homeViewController
private editTextManager mSearchbar;
private ConstraintLayout mSplashScreen;
private TextView mLoadingText;
private com.mopub.mobileads.MoPubView mBannerAds = null;
private LinearLayout mBannerAds = null;
private Handler mUpdateUIHandler = null;
private ImageButton mGatewaySplash;
private LinearLayout mTopBar;
@ -120,7 +121,7 @@ class homeViewController
private Runnable mTabDialogRunnable = null;
private boolean mIsTopBarExpanded = true;
void initialization(eventObserver.eventListener event, AppCompatActivity context, Button mNewTab, ConstraintLayout webviewContainer, TextView loadingText, ProgressBar progressBar, editTextManager searchbar, ConstraintLayout splashScreen, ImageView loading, MoPubView banner_ads, ImageButton gateway_splash, LinearLayout top_bar, GeckoView gecko_view, ImageView backsplash, Button connect_button, View pFindBar, EditText pFindText, TextView pFindCount, androidx.constraintlayout.widget.ConstraintLayout pTopLayout, ImageButton pVoiceInput, ImageButton pMenu, androidx.core.widget.NestedScrollView pNestedScroll, ImageView pBlocker, ImageView pBlockerFullSceen, View mSearchEngineBar, TextView pCopyright, RecyclerView pHistListView, com.google.android.material.appbar.AppBarLayout pAppBar, ImageButton pOrbotLogManager, ConstraintLayout pInfoLandscape, ConstraintLayout pInfoPortrait, ProgressBar pProgressBarIndeterminate, FragmentContainerView pTabFragment, LinearLayout pTopBarContainer, ImageView pSearchLock, View pPopupLoadNewTab, ImageView pTopBarHider, ImageView pNewTabBlocker, CoordinatorLayout mCoordinatorLayout, ImageView pImageDivider, ImageButton pPanicButton, ImageView pGenesisLogo, ImageButton pPanicButtonLandscape){
void initialization(eventObserver.eventListener event, AppCompatActivity context, Button mNewTab, ConstraintLayout webviewContainer, TextView loadingText, ProgressBar progressBar, editTextManager searchbar, ConstraintLayout splashScreen, ImageView loading, LinearLayout banner_ads, ImageButton gateway_splash, LinearLayout top_bar, GeckoView gecko_view, ImageView backsplash, Button connect_button, View pFindBar, EditText pFindText, TextView pFindCount, androidx.constraintlayout.widget.ConstraintLayout pTopLayout, ImageButton pVoiceInput, ImageButton pMenu, androidx.core.widget.NestedScrollView pNestedScroll, ImageView pBlocker, ImageView pBlockerFullSceen, View mSearchEngineBar, TextView pCopyright, RecyclerView pHistListView, com.google.android.material.appbar.AppBarLayout pAppBar, ImageButton pOrbotLogManager, ConstraintLayout pInfoLandscape, ConstraintLayout pInfoPortrait, ProgressBar pProgressBarIndeterminate, FragmentContainerView pTabFragment, LinearLayout pTopBarContainer, ImageView pSearchLock, View pPopupLoadNewTab, ImageView pTopBarHider, ImageView pNewTabBlocker, CoordinatorLayout mCoordinatorLayout, ImageView pImageDivider, ImageButton pPanicButton, ImageView pGenesisLogo, ImageButton pPanicButtonLandscape){
this.mContext = context;
this.mProgressBar = progressBar;
this.mSearchbar = searchbar;
@ -162,6 +163,7 @@ class homeViewController
this.mPanicButton = pPanicButton;
this.mGenesisLogo = pGenesisLogo;
this.mPanicButtonLandscape = pPanicButtonLandscape;
this.mLogHandler = new LogHandler();
initSplashScreen();
createUpdateUiHandler();
@ -216,7 +218,22 @@ class homeViewController
mGenesisLogo.setLayoutParams(newLayoutParams);
}
});
initSearchEngineView();
}
public void initSearchEngineView(){
ConstraintLayout.LayoutParams layoutParams = (ConstraintLayout.LayoutParams) mSearchEngineBar.getLayoutParams();
if(isLandscape){
layoutParams.setMargins(0, helperMethod.pxFromDp(60), 0, 0);
}else {
Object mAdvertLoaded = mEvent.invokeObserver(null, enums.etype.M_ADVERT_LOADED);
if(mAdvertLoaded!=null && (boolean)mAdvertLoaded && mBannerAds.getVisibility() == View.VISIBLE){
layoutParams.setMargins(0, mBannerAds.getHeight() + helperMethod.pxFromDp(60), 0, 0);
}else {
layoutParams.setMargins(0, helperMethod.pxFromDp(60), 0, 0);
}
}
mSearchEngineBar.setLayoutParams(layoutParams);
}
@SuppressLint("WrongConstant")
@ -275,8 +292,6 @@ class homeViewController
public void onShowTabContainer(){
if(mTabFragment.getAlpha()==0 || mTabFragment.getAlpha()==1){
onUpdateStatusBarTheme(null, false);
mTabFragment.animate().cancel();
mTabFragment.setAlpha(0);
mTabFragment.setVisibility(View.VISIBLE);
@ -474,7 +489,7 @@ class homeViewController
}
public void initStatusBarColor(boolean mInstant) {
int mDelay = 2000;
int mDelay = 1500;
if(status.mThemeApplying || mInstant){
mDelay = 0;
}
@ -590,70 +605,75 @@ class homeViewController
}
private LogHandler mLogHandler;
@SuppressLint("StaticFieldLeak")
class LogHandler extends AsyncTask<Void, Integer, Void> {
protected Void doInBackground(Void...arg0) {
AppCompatActivity temp_context = mContext;
int mCounter = 0;
int mCounterInternet = 0;
while (!orbotLocalConstants.mIsTorInitialized || !orbotLocalConstants.mNetworkState){
try
{
boolean mFastConnect = !status.sRestoreTabs && status.sAppInstalled && status.sSettingSearchStatus.equals(constants.CONST_BACKEND_GENESIS_URL) && !status.sBridgeStatus && status.sExternalWebsite.equals(strings.GENERIC_EMPTY_STR);
if(mFastConnect){
sleep(1000);
if(orbotLocalConstants.mNetworkState){
orbotLocalConstants.mTorLogsStatus = "Starting Genesis | Please Wait ...";
mEvent.invokeObserver(Collections.singletonList(status.sSettingSearchStatus), enums.etype.recheck_orbot);
startPostTask(messages.MESSAGE_UPDATE_LOADING_TEXT);
break;
}else{
orbotLocalConstants.mTorLogsStatus = "No internet connection";
startPostTask(messages.MESSAGE_UPDATE_LOADING_TEXT);
if(mCounterInternet>10){
// break;
}else {
mCounterInternet += 1;
}
}
}
sleep(500);
if(mCounter>20){
break;
}else {
mCounter+=1;
}
if(mFastConnect){
continue;
}
mEvent.invokeObserver(Collections.singletonList(status.sSettingSearchStatus), enums.etype.recheck_orbot);
if(temp_context.isDestroyed()){
return null;
}
startPostTask(messages.MESSAGE_UPDATE_LOADING_TEXT);
}
catch (Exception e)
{
e.printStackTrace();
}
}
if(!status.sSettingIsAppStarted){
mContext.runOnUiThread(() -> {
splashScreenDisable();
});
startPostTask(messages.MESSAGE_ON_URL_LOAD);
}else {
mContext.runOnUiThread(() -> {
mEvent.invokeObserver(null, enums.etype.ON_LOAD_TAB_ON_RESUME);
});
}
return null;
}
}
void initProxyLoading(Callable<String> logs){
this.mLogs = logs;
if(mSplashScreen.getVisibility()==View.VISIBLE){
new Thread(){
public void run(){
AppCompatActivity temp_context = mContext;
int mCounter = 0;
int mCounterInternet = 0;
while (!orbotLocalConstants.mIsTorInitialized || !orbotLocalConstants.mNetworkState){
try
{
boolean mFastConnect = !status.sRestoreTabs && status.sAppInstalled && status.sSettingSearchStatus.equals(constants.CONST_BACKEND_GENESIS_URL) && !status.sBridgeStatus;
if(mFastConnect){
sleep(1000);
if(orbotLocalConstants.mNetworkState){
orbotLocalConstants.mTorLogsStatus = "Starting Genesis | Please Wait ...";
mEvent.invokeObserver(Collections.singletonList(status.sSettingSearchStatus), enums.etype.recheck_orbot);
startPostTask(messages.MESSAGE_UPDATE_LOADING_TEXT);
break;
}else{
orbotLocalConstants.mTorLogsStatus = "No internet connection";
startPostTask(messages.MESSAGE_UPDATE_LOADING_TEXT);
if(mCounterInternet>10){
// break;
}else {
mCounterInternet += 1;
}
}
}
sleep(500);
if(mCounter>20){
break;
}else {
mCounter+=1;
}
if(mFastConnect){
continue;
}
mEvent.invokeObserver(Collections.singletonList(status.sSettingSearchStatus), enums.etype.recheck_orbot);
if(temp_context.isDestroyed()){
return;
}
startPostTask(messages.MESSAGE_UPDATE_LOADING_TEXT);
}
catch (Exception e)
{
e.printStackTrace();
}
}
if(!status.sSettingIsAppStarted){
mContext.runOnUiThread(() -> {
splashScreenDisable();
});
startPostTask(messages.MESSAGE_ON_URL_LOAD);
}else {
mContext.runOnUiThread(() -> {
mEvent.invokeObserver(null, enums.etype.ON_LOAD_TAB_ON_RESUME);
});
}
}
}.start();
this.mLogHandler.execute();
}
}
@ -679,6 +699,7 @@ class homeViewController
private boolean mIsAnimating = false;
public void splashScreenDisable(){
mTopBar.setAlpha(1);
mGeckoView.setVisibility(View.VISIBLE);
if(mSplashScreen.getAlpha()==1){
if(!mIsAnimating){
@ -803,13 +824,14 @@ class homeViewController
helperMethod.hideKeyboard(mContext);
popupWindow.setHeight(height);
}
if(status.sSettingLanguageRegion.equals("Ur") || status.sSettingLanguage.equals("default") && status.mSystemLocale.getLanguage().equals("ur")){
popupWindow.showAtLocation(parent, Gravity.TOP|Gravity.START,0,0);
}else {
popupWindow.showAtLocation(parent, Gravity.TOP|Gravity.END,0,0);
}
ScrollView mScrollView = popupView.findViewById(R.id.pScrollView);
ImageButton bookmark = popupView.findViewById(R.id.menu23);
ImageButton back = popupView.findViewById(R.id.menu22);
ImageButton close = popupView.findViewById(R.id.menu20);
@ -828,6 +850,19 @@ class homeViewController
}
}
ConstraintLayout.LayoutParams layoutParams = (ConstraintLayout.LayoutParams) mScrollView.getLayoutParams();
if(isLandscape){
layoutParams.setMargins(mScrollView.getLeft(), helperMethod.pxFromDp(7), mScrollView.getRight(), helperMethod.pxFromDp(10));
}else {
Object mAdvertLoaded = mEvent.invokeObserver(null, enums.etype.M_ADVERT_LOADED);
if(mAdvertLoaded!=null && (boolean)mAdvertLoaded){
layoutParams.setMargins(mScrollView.getLeft(), mBannerAds.getHeight(), mScrollView.getRight(), helperMethod.pxFromDp(30));
}else {
layoutParams.setMargins(mScrollView.getLeft(), helperMethod.pxFromDp(7), mScrollView.getRight(), helperMethod.pxFromDp(30));
}
}
mScrollView.setLayoutParams(layoutParams);
String mExtention = helperMethod.getMimeType(mURL, mContext);
if(!mURL.startsWith("data") && !mURL.startsWith("blob") && (mExtention == null || mExtention.equals("application/x-msdos-program") || mExtention.equals("text/html") || mExtention.equals("application/vnd.ms-htmlhelp") || mExtention.equals("application/vnd.sun.xml.writer") || mExtention.equals("application/vnd.sun.xml.writer.global") || mExtention.equals("application/vnd.sun.xml.writer.template") || mExtention.equals("application/xhtml+xml"))){
mDownload.setEnabled(false);
@ -944,12 +979,16 @@ class homeViewController
}
onSetBannerAdMargin(false,true);
}
initSearchEngineView();
}
void removeBanner(){
mBannerAds.setVisibility(View.GONE);
mWebviewContainer.setPadding(0,0,0,0);
onFullScreen(false);
// if(isLandscape){
// mBannerAds.setVisibility(View.GONE);
// }else {
// mEvent.invokeObserver(null, enums.etype.M_ON_BANNER_UPDATE);
// }
// onFullScreen(false);
}
private Handler searchBarUpdateHandler = new Handler();
@ -1053,16 +1092,16 @@ class homeViewController
mSearchbar.setHintTextColor(ColorUtils.blendARGB(helperMethod.invertedShadeColor(mColor,0.10f), Color.BLACK, 0.2f));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
mContext.getWindow().setStatusBarColor(Color.parseColor(pTheme));
//mContext.getWindow().setStatusBarColor(Color.parseColor(pTheme));
}else {
mContext.getWindow().setStatusBarColor(ContextCompat.getColor(mContext, R.color.landing_ease_blue));
//mContext.getWindow().setStatusBarColor(ContextCompat.getColor(mContext, R.color.landing_ease_blue));
}
if(helperMethod.isColorDark(mColor)){
mContext.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
//mContext.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}else {
View decorView = mContext.getWindow().getDecorView(); //set status background black
decorView.setSystemUiVisibility(decorView.getSystemUiVisibility() & ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
//View decorView = mContext.getWindow().getDecorView(); //set status background black
//decorView.setSystemUiVisibility(decorView.getSystemUiVisibility() & ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}
mTopBarHider.setBackgroundColor(mColor);
}
@ -1071,10 +1110,10 @@ class homeViewController
mTopBar.setBackground(ContextCompat.getDrawable(mContext, R.color.c_background));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
mContext.getWindow().setStatusBarColor(ContextCompat.getColor(mContext, R.color.c_background));
//mContext.getWindow().setStatusBarColor(ContextCompat.getColor(mContext, R.color.c_background));
}else {
mContext.getWindow().setStatusBarColor(mContext.getResources().getColor(R.color.blue_dark));
mContext.getWindow().setStatusBarColor(ContextCompat.getColor(mContext, R.color.landing_ease_blue));
//mContext.getWindow().setStatusBarColor(mContext.getResources().getColor(R.color.blue_dark));
//mContext.getWindow().setStatusBarColor(ContextCompat.getColor(mContext, R.color.landing_ease_blue));
}
GradientDrawable gradientDrawable1 = new GradientDrawable();
@ -1106,10 +1145,10 @@ class homeViewController
}
if(status.sTheme != enums.Theme.THEME_DARK || (status.sDefaultNightMode && status.sTheme != enums.Theme.THEME_DEFAULT)){
mContext.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
//mContext.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}else {
View decorView = mContext.getWindow().getDecorView();
decorView.setSystemUiVisibility(decorView.getSystemUiVisibility() & ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
//View decorView = mContext.getWindow().getDecorView();
//decorView.setSystemUiVisibility(decorView.getSystemUiVisibility() & ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
}
mTopBarHider.setBackground(ContextCompat.getDrawable(mContext, R.color.c_background));
@ -1149,32 +1188,21 @@ class homeViewController
{
if(pStatus){
if(mSearchEngineBar.getAlpha() == 0 || mSearchEngineBar.getVisibility() == View.GONE && mSplashScreen.getAlpha()<=0){
onUpdateStatusBarTheme(null, false);
mSearchEngineBar.animate().cancel();
mSearchEngineBar.setAlpha(0f);
mSearchEngineBar.setAlpha(1f);
mSearchEngineBar.animate().setDuration(delay).alpha(1);
mSearchEngineBar.setVisibility(View.VISIBLE);
onUpdateStatusBarTheme(null, false);
View child = mAppBar.getChildAt(0);
AppBarLayout.LayoutParams params = (AppBarLayout.LayoutParams) child.getLayoutParams();
params.setScrollFlags(0);
}
}else {
View child = mAppBar.getChildAt(0);
AppBarLayout.LayoutParams params = (AppBarLayout.LayoutParams) child.getLayoutParams();
params.setScrollFlags(1);
mAppBar.refreshDrawableState();
mAppBar.invalidate();
mSearchEngineBar.animate().setDuration(delay).alpha(0).withEndAction(() -> {
mEvent.invokeObserver(null, enums.etype.M_UPDATE_THEME);
mSearchEngineBar.animate().setDuration(delay).setStartDelay(0).alpha(0).withEndAction(() -> {
mSearchEngineBar.animate().cancel();
mSearchEngineBar.setAlpha(0f);
mSearchEngineBar.setVisibility(View.GONE);
mEvent.invokeObserver(null, enums.etype.M_UPDATE_THEME);
mEvent.invokeObserver(null, enums.etype.M_RESET_SUGGESTION);
});
}
}
private void triggerUpdateSearchBar(String url, boolean showProtocol, boolean pClearText){
@ -1352,6 +1380,55 @@ class homeViewController
});
}
public void onHomeTabAnimation(List<Object> data, Object e_type){
mGeckoView.setPivotX(0);
mGeckoView.setPivotY(0);
if(mGeckoView.getAlpha()<1 || mGeckoView.getTranslationX()<0){
return;
}
ObjectAnimator scaleDown = ObjectAnimator.ofPropertyValuesHolder(mGeckoView,
PropertyValuesHolder.ofFloat("translationX", 0, helperMethod.pxFromDp(-50)));
mNewTabBlocker.setVisibility(View.VISIBLE);
ObjectAnimator alpha = ObjectAnimator.ofPropertyValuesHolder(mNewTabBlocker,
PropertyValuesHolder.ofFloat("alpha", 0, 1f));
scaleDown.setDuration(150);
alpha.setDuration(150);
scaleDown.start();
alpha.start();
scaleDown.addListener(new Animator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animation, boolean isReverse) {
mEvent.invokeObserver(data, e_type);
}
@Override
public void onAnimationEnd(Animator animation, boolean isReverse) {
}
@Override
public void onAnimationStart(Animator animation) {
}
@Override
public void onAnimationEnd(Animator animation) {
}
@Override
public void onAnimationCancel(Animator animation) {
}
@Override
public void onAnimationRepeat(Animator animation) {
}
});
}
public void onResetTabAnimation(){
mGeckoView.setPivotX(0);
mGeckoView.setPivotY(0);

View File

@ -1,116 +0,0 @@
package com.darkweb.genesissearchengine.appManager.landingManager;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import com.darkweb.genesissearchengine.appManager.landingManager.langingPageManager.landingPageController;
import com.darkweb.genesissearchengine.appManager.landingManager.langingPageManager.landingPageDataModel;
import com.darkweb.genesissearchengine.appManager.orbotManager.orbotController;
import com.darkweb.genesissearchengine.constants.enums;
import com.darkweb.genesissearchengine.eventObserver;
import com.darkweb.genesissearchengine.pluginManager.pluginController;
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
import com.example.myapplication.R;
import com.github.paolorotolo.appintro.AppIntro;
import java.util.Collections;
import java.util.List;
import static com.darkweb.genesissearchengine.appManager.landingManager.landingEnums.eLandingPageControllerCallbackCommands.M_ON_LANDING_PAGE_FINISH_TRIGGERED;
public class landingController extends AppIntro {
/* Private Variables */
private landingViewController mLandingViewController;
private landingModelController mLandingModel;
/* UI Variables */
private landingPageController mIntro_welcome;
private landingPageController mIntro_intro;
private landingPageController mIntro_start;
/* Initializations */
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
super.onCreate(savedInstanceState);
initializePages();
initializeModels();
}
private void initializePages(){
mIntro_welcome = new landingPageController();
mIntro_intro = new landingPageController();
mIntro_start = new landingPageController();
mIntro_welcome.onInitialize(new landingPageCallback(), new landingPageDataModel(getString(R.string.LANDING_HELLO), getString(R.string.LANDING_WELCOME),null, enums.LandingPageTypes.M_LANDING_WELCOME));
mIntro_intro.onInitialize(new landingPageCallback(), new landingPageDataModel(getString(R.string.LANDING_BROWSE_INFO), getString(R.string.LANDING_NO_TRACKING),null, enums.LandingPageTypes.M_LANDING_INTRO));
mIntro_start.onInitialize(new landingPageCallback(), new landingPageDataModel(getString(R.string.LANDING_BRIDGES_INFO),null,getString(R.string.LANDING_MORE), enums.LandingPageTypes.M_LANDING_START));
}
private void initializeModels(){
mLandingViewController = new landingViewController(this,new landingViewCallback(), mIntro_welcome, mIntro_intro, mIntro_start);
mLandingModel = new landingModelController(this, new landingModelCallback());
}
/* Local Override */
@Override
public void onDonePressed(Fragment currentFragment) {
super.onDonePressed(currentFragment);
mLandingModel.onTrigger(landingEnums.eLandingModelCommands.M_UPDATE_LANDING_PAGE_SHOWN_STATUS);
onCloseTrigger();
}
@Override
protected void onResume() {
super.onResume();
}
/* Helper Methods */
public void onCloseTrigger(){
finish();
}
/* Callbacks */
private class landingViewCallback implements eventObserver.eventListener{
@Override
public Object invokeObserver(List<Object> pData, Object pType)
{
return null;
}
}
private class landingModelCallback implements eventObserver.eventListener{
@Override
public Object invokeObserver(List<Object> pData, Object pType)
{
return null;
}
}
private class landingPageCallback implements eventObserver.eventListener{
@Override
public Object invokeObserver(List<Object> pData, Object pType)
{
if(pType.equals(M_ON_LANDING_PAGE_FINISH_TRIGGERED)){
if((int)pData.get(0) == enums.LandingPageTypes.M_LANDING_START){
startActivity(new Intent(landingController.this, orbotController.class));
}
}
return null;
}
}
}

View File

@ -1,20 +0,0 @@
package com.darkweb.genesissearchengine.appManager.landingManager;
public class landingEnums
{
public enum eLandingViewCommands {
}
public enum eLandingModelCommands {
M_UPDATE_LANDING_PAGE_SHOWN_STATUS
}
public enum eLandingModelCallbackCommands {
}
public enum eLandingPageControllerCallbackCommands {
M_ON_LANDING_PAGE_FINISH_TRIGGERED
}
}

View File

@ -1,40 +0,0 @@
package com.darkweb.genesissearchengine.appManager.landingManager;
import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.dataManager.dataController;
import com.darkweb.genesissearchengine.dataManager.dataEnums;
import com.darkweb.genesissearchengine.eventObserver;
import java.util.Arrays;
public class landingModelController {
/* Private Variables */
private AppCompatActivity mContext;
private eventObserver.eventListener mEvent;
public landingModelController(AppCompatActivity pContext, eventObserver.eventListener pEvent){
this.mContext = pContext;
this.mEvent = pEvent;
}
private void onUpdateLandingPageStatus(){
status.sLandingPageStatus = true;
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.sLandingPageStatus,true));
}
public Object onTrigger(landingEnums.eLandingModelCommands pCommands){
if(pCommands.equals(landingEnums.eLandingModelCommands.M_UPDATE_LANDING_PAGE_SHOWN_STATUS)){
onUpdateLandingPageStatus();
}
return null;
}
}

View File

@ -1,54 +0,0 @@
package com.darkweb.genesissearchengine.appManager.landingManager;
import androidx.core.content.ContextCompat;
import com.darkweb.genesissearchengine.appManager.landingManager.langingPageManager.landingPageController;
import com.darkweb.genesissearchengine.eventObserver;
import com.example.myapplication.R;
import com.github.paolorotolo.appintro.AppIntro;
class landingViewController
{
/*Private Variables*/
private AppIntro mContext;
private eventObserver.eventListener mEvent;
/*UI Variables*/
private landingPageController mIntroWelcome;
private landingPageController mIntroIntro;
private landingPageController mIntroStart;
/*Initializations*/
landingViewController(AppIntro pContext, eventObserver.eventListener pEvent, landingPageController pIntroWelcome, landingPageController pIntroIntro, landingPageController pIntroStart){
this.mContext = pContext;
this.mEvent = pEvent;
this.mIntroWelcome = pIntroWelcome;
this.mIntroIntro = pIntroIntro;
this.mIntroStart = pIntroStart;
setUIData();
initPostUI();
}
private void setUIData(){
mContext.addSlide(mIntroWelcome);
mContext.addSlide(mIntroIntro);
mContext.addSlide(mIntroStart);
mContext.setBarColor(mContext.getResources().getColor(R.color.landing_ease_blue));
mContext.setSeparatorColor(mContext.getResources().getColor(R.color.headerblack));
mContext.showSkipButton(false);
mContext.setProgressButtonEnabled(true);
}
private void initPostUI(){
mContext.getWindow().setStatusBarColor(ContextCompat.getColor(mContext, R.color.landing_ease_blue));
}
public Object onTrigger(landingEnums.eLandingViewCommands pCommands){
return null;
}
}

View File

@ -1,85 +0,0 @@
package com.darkweb.genesissearchengine.appManager.landingManager.langingPageManager;
import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.darkweb.genesissearchengine.eventObserver;
import com.example.myapplication.R;
import java.util.Collections;
import java.util.List;
import static com.darkweb.genesissearchengine.appManager.landingManager.landingEnums.eLandingPageControllerCallbackCommands.M_ON_LANDING_PAGE_FINISH_TRIGGERED;
public class landingPageController extends Fragment {
/*UI Variables*/
private TextView mHeader;
private TextView mSubHeader;
private TextView mSubmit;
/*Local Variables*/
private eventObserver.eventListener mEvent;
private landingPageDataModel mDataModel;
private landingPageViewController mLandingPageViewController;
/*Initializations*/
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.landing_view, container, false);
initializeModels(view);
initializeLocalEventHandlers();
return view;
}
private void initializeModels(View pView){
mHeader = pView.findViewById(R.id.pHeader);
mSubHeader = pView.findViewById(R.id.pSubHeader);
mSubmit = pView.findViewById(R.id.pNextButton);
mLandingPageViewController = new landingPageViewController(this,new landingPageViewCallback(), mHeader, mSubHeader, mSubmit, mDataModel);
}
public landingPageController onInitialize(eventObserver.eventListener pEvent, landingPageDataModel pDataModel) {
landingPageController mSlidePage = new landingPageController();
Bundle args = new Bundle();
mDataModel = pDataModel;
mEvent = pEvent;
mSlidePage.setArguments(args);
return mSlidePage;
}
private void initializeLocalEventHandlers(){
mSubmit.setOnClickListener(v -> mEvent.invokeObserver(Collections.singletonList(mDataModel.getPageType()), M_ON_LANDING_PAGE_FINISH_TRIGGERED));
}
private class landingPageViewCallback implements eventObserver.eventListener{
@Override
public Object invokeObserver(List<Object> pData, Object pType)
{
return null;
}
}
}

View File

@ -1,31 +0,0 @@
package com.darkweb.genesissearchengine.appManager.landingManager.langingPageManager;
public class landingPageDataModel {
private String mHeader;
private String mSubHeader;
private String mNextButtonText;
private int mLandingPageType;
public landingPageDataModel(String pHeader, String pSubHeader, String pNextButtonText, int pLandingPageType){
this.mHeader = pHeader;
this.mSubHeader = pSubHeader;
this.mNextButtonText = pNextButtonText;
this.mLandingPageType = pLandingPageType;
}
public String getHeader(){
return mHeader;
}
public String getSubHeader(){
return mSubHeader;
}
public String getNextButtonText(){
return mNextButtonText;
}
public int getPageType(){
return mLandingPageType;
}
}

View File

@ -1,48 +0,0 @@
package com.darkweb.genesissearchengine.appManager.landingManager.langingPageManager;
import android.view.View;
import android.widget.TextView;
import androidx.fragment.app.Fragment;
import com.darkweb.genesissearchengine.constants.enums;
import com.darkweb.genesissearchengine.eventObserver;
import com.example.myapplication.R;
public class landingPageViewController {
private Fragment mContext;
private TextView mHeader;
private TextView mSubHeader;
private TextView mSubmit;
private landingPageDataModel mLandingModel;
public landingPageViewController(Fragment pContext, eventObserver.eventListener pEvent, TextView pHeader, TextView pSubHeader, TextView pSubmit, landingPageDataModel pLandingModel){
this.mHeader = pHeader;
this.mSubHeader = pSubHeader;
this.mSubmit = pSubmit;
this.mContext = pContext;
this.mLandingModel = pLandingModel;
onInitializeView();
}
private void onInitializeView(){
if(this.mLandingModel.getPageType() == enums.LandingPageTypes.M_LANDING_WELCOME){
mHeader.setText(mLandingModel.getHeader());
mSubHeader.setText(mLandingModel.getSubHeader());
mSubHeader.setVisibility(View.VISIBLE);
}
else if(this.mLandingModel.getPageType() == enums.LandingPageTypes.M_LANDING_INTRO){
mHeader.setText(mLandingModel.getHeader());
mSubHeader.setText(mLandingModel.getSubHeader());
mSubHeader.setVisibility(View.VISIBLE);
}
else if(this.mLandingModel.getPageType() == enums.LandingPageTypes.M_LANDING_START){
mHeader.setText(mLandingModel.getHeader());
mSubHeader.setText(mLandingModel.getSubHeader());
mSubmit.setText(mLandingModel.getNextButtonText());
mSubHeader.setVisibility(View.VISIBLE);
mSubmit.setVisibility(View.VISIBLE);
}
}
}

View File

@ -72,8 +72,8 @@ public class languageAdapter extends RecyclerView.Adapter<languageAdapter.helpVi
void bindListView(languageDataModel model) {
boolean mIsDefaultSupported = true;
mHeader = itemView.findViewById(R.id.pHeader);
mDescription = itemView.findViewById(R.id.pDescription);
mHeader = itemView.findViewById(R.id.pOrbotRowHeader);
mDescription = itemView.findViewById(R.id.pOrbotRowDescription);
mContainer = itemView.findViewById(R.id.pContainer);
mMarker = itemView.findViewById(R.id.pMarker);

View File

@ -86,7 +86,7 @@ public class languageController extends AppCompatActivity {
{
activityContextManager.getInstance().onStack(this);
mRecycleView = findViewById(R.id.pRecycleView);
mBlocker = findViewById(R.id.pBlocker);
mBlocker = findViewById(R.id.pSecureRootBlocker);
mLanguageViewController.initialization(new languageViewCallback(),this, mBlocker);
}

View File

@ -53,28 +53,28 @@ public class orbotLogAdapter extends RecyclerView.Adapter<orbotLogAdapter.listVi
/*View Holder Extensions*/
class listViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
TextView mHeader;
TextView mDescription;
ConstraintLayout mRowContainerInner;
TextView mOrbotRowHeader;
TextView mOrbotRowDescription;
ConstraintLayout mOrbotRowContainer;
listViewHolder(View itemView) {
super(itemView);
}
void bindListView(logRowModel model) {
mHeader = itemView.findViewById(R.id.pHeader);
mDescription = itemView.findViewById(R.id.pDescription);
mRowContainerInner = itemView.findViewById(R.id.pRowContainerInner);
mOrbotRowHeader = itemView.findViewById(R.id.pOrbotRowHeader);
mOrbotRowDescription = itemView.findViewById(R.id.pOrbotRowDescription);
mOrbotRowContainer = itemView.findViewById(R.id.pOrbotRowContainer);
mHeader.setText((this.getLayoutPosition() + ". " + model.getLog()));
mDescription.setText(model.getDate());
mRowContainerInner.setOnClickListener(this);
mOrbotRowHeader.setText((this.getLayoutPosition() + ". " + model.getLog()));
mOrbotRowDescription.setText(model.getDate());
mOrbotRowContainer.setOnClickListener(this);
}
@Override
public void onClick(View v) {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(constants.CONST_LOG_DUCKDUCK + Uri.encode(" " + mModelList.get(this.getLayoutPosition()).getLog())));
intent.putExtra(SearchManager.QUERY, mDescription.getText());
intent.putExtra(SearchManager.QUERY, mOrbotRowDescription.getText());
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
activityContextManager.getInstance().getHomeController().startActivity(intent);
}

View File

@ -27,38 +27,38 @@ import com.darkweb.genesissearchengine.pluginManager.pluginController;
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
import com.example.myapplication.R;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import org.torproject.android.service.wrapper.logRowModel;
import org.torproject.android.service.wrapper.orbotLocalConstants;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import static com.darkweb.genesissearchengine.appManager.orbotLogManager.orbotLogEnums.eOrbotLogModelCallbackCommands.M_UPDATE_FLOATING_BUTTON;
import static com.darkweb.genesissearchengine.appManager.orbotLogManager.orbotLogEnums.eOrbotLogModelCallbackCommands.M_UPDATE_LOGS;
import static com.darkweb.genesissearchengine.appManager.orbotLogManager.orbotLogEnums.eOrbotLogModelCallbackCommands.M_UPDATE_RECYCLE_VIEW;
import static com.darkweb.genesissearchengine.appManager.orbotLogManager.orbotLogEnums.eOrbotLogModelCommands.M_GET_LIST;
import static com.darkweb.genesissearchengine.appManager.orbotLogManager.orbotLogEnums.eOrbotLogModelCommands.M_GET_LIST_SIZE;
import static com.darkweb.genesissearchengine.appManager.orbotLogManager.orbotLogEnums.eOrbotLogViewCommands.M_FLOAT_BUTTON_UPDATE;
import static com.darkweb.genesissearchengine.appManager.orbotLogManager.orbotLogEnums.eOrbotLogViewCommands.M_SCROLL_BOTTOM;
import static com.darkweb.genesissearchengine.appManager.orbotLogManager.orbotLogEnums.eOrbotLogViewCommands.M_SCROLL_TOP;
import static com.darkweb.genesissearchengine.appManager.orbotLogManager.orbotLogEnums.eOrbotLogViewCommands.M_SCROLL_TO_POSITION;
import static com.darkweb.genesissearchengine.appManager.orbotLogManager.orbotLogEnums.eOrbotLogViewCommands.M_SHOW_FLOATING_TOOLBAR;
public class orbotLogController extends AppCompatActivity {
public class orbotLogController extends AppCompatActivity implements ViewTreeObserver.OnScrollChangedListener, ViewTreeObserver.OnGlobalLayoutListener {
/* PRIVATE VARIABLES */
private orbotLogModel mOrbotModel;
private orbotLogViewController mOrbotLogViewController;
private orbotLogAdapter mOrbotAdapter;
private boolean mActivityClosed = false;
private int mLogCounter = 1;
private boolean mIsRecycleviewInteracting = false;
/* UI VARIABLES */
private TextView mLogs;
private RecyclerView mLogRecycleView;
private NestedScrollView mNestedScrollView;
private FloatingActionButton mFloatingScroller;
private TextView mOrbotLogLoadingText;
private RecyclerView mOrbotLogRecycleView;
private NestedScrollView mOrbotLogNestedScroll;
private FloatingActionButton mOrbotLogFloatingToolbar;
private boolean mIsRecycleviewInteracting = false;
/* INITIALIZATIONS */
@ -66,17 +66,22 @@ public class orbotLogController extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
overridePendingTransition(R.anim.push_anim_out_reverse, R.anim.push_anim_in_reverse);
activityContextManager.getInstance().setOrbotLogController(this);
activityContextManager.getInstance().onStack(this);
super.onCreate(savedInstanceState);
setContentView(R.layout.orbot_log_view);
initializeStartupAnimation();
initializeViews();
initializeLogs();
initListener();
updateLogs();
}
public void initializeStartupAnimation(){
if(activityContextManager.getInstance().getHomeController().isSplashScreenLoading()){
overridePendingTransition(R.anim.translate_fade_left, R.anim.translate_fade_right);
}
}
@Override
@ -87,242 +92,208 @@ public class orbotLogController extends AppCompatActivity {
activityThemeManager.getInstance().onConfigurationChanged(this);
}
mNestedScrollView.stopNestedScroll();
helperMethod.onDelayHandler(orbotLogController.this, 150, () -> {
if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE || newConfig.orientation == Configuration.ORIENTATION_PORTRAIT) {
if(!orbotLogStatus.sUIInteracted && ((int)mOrbotModel.onTrigger(M_GET_LIST_SIZE)>1)){
if(mNestedScrollView.canScrollVertically(enums.ScrollDirection.VERTICAL)){
mNestedScrollView.stopNestedScroll();
onScrollBottom();
mNestedScrollView.stopNestedScroll();
orbotLogStatus.sScrollPosition = -1;
}
}else {
mNestedScrollView.stopNestedScroll();
mNestedScrollView.scrollTo(0,0);
mNestedScrollView.smoothScrollTo(0,0);
mNestedScrollView.stopNestedScroll();
orbotLogStatus.sScrollPosition = 0;
}
}
return null;
});
mOrbotLogNestedScroll.stopNestedScroll();
if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE || newConfig.orientation == Configuration.ORIENTATION_PORTRAIT) {
initScrollPositionOnConfigurationChanged();
}
super.onConfigurationChanged(newConfig);
}
private void initializeViews() {
mLogRecycleView = findViewById(R.id.pLogRecycleView);
mLogs = findViewById(R.id.pLogs);
mNestedScrollView = findViewById(R.id.pNestedScrollView);
mFloatingScroller = findViewById(R.id.pFloatingScroller);
private void initScrollPositionOnConfigurationChanged(){
helperMethod.onDelayHandler(orbotLogController.this, 150, () -> {
if(!orbotLogStatus.sUIInteracted && ((int)mOrbotModel.onTrigger(M_GET_LIST_SIZE)>1)){
if(mOrbotLogNestedScroll.canScrollVertically(enums.ScrollDirection.VERTICAL)){
mOrbotLogViewController.onTrigger(M_SCROLL_BOTTOM);
orbotLogStatus.sScrollPosition = -1;
onScrollBottom();
}
}else {
mOrbotLogViewController.onTrigger(M_SCROLL_TOP);
orbotLogStatus.sScrollPosition = 0;
}
return null;
});
}
mOrbotLogViewController = new orbotLogViewController(this, new orbotLogViewCallback() , mLogs, mLogRecycleView, mNestedScrollView, mFloatingScroller);
mOrbotModel = new orbotLogModel();
private void initializeViews() {
mOrbotLogRecycleView = findViewById(R.id.pOrbotLogRecycleView);
mOrbotLogLoadingText = findViewById(R.id.pOrbotLogLoadingText);
mOrbotLogNestedScroll = findViewById(R.id.pOrbotLogNestedScroll);
mOrbotLogFloatingToolbar = findViewById(R.id.pOrbotLogFloatingToolbar);
mOrbotLogViewController = new orbotLogViewController(this, new orbotLogViewCallback() , mOrbotLogLoadingText, mOrbotLogRecycleView, mOrbotLogNestedScroll, mOrbotLogFloatingToolbar);
mOrbotModel = new orbotLogModel(this, new orbotModelCallback());
}
private void initializeLogs(){
mLogCounter = 0;
mOrbotModel.setList(orbotLocalConstants.mTorLogsHistory);
if(status.sLogThemeStyleAdvanced){
mLogCounter = (int)mOrbotModel.onTrigger(M_GET_LIST_SIZE);
LinearLayoutManager layoutManager = new LinearLayoutManager(orbotLogController.this);
orbotLogAdapter adapter = new orbotLogAdapter(((ArrayList)mOrbotModel.onTrigger(M_GET_LIST)),new orbotLogController.orbotModelCallback());
mOrbotAdapter = adapter;
layoutManager.setReverseLayout(true);
mLogRecycleView.setAdapter(adapter);
Objects.requireNonNull(mLogRecycleView.getItemAnimator()).setAddDuration(350);
mLogRecycleView.setNestedScrollingEnabled(false);
mLogRecycleView.setLayoutManager(new LinearLayoutManager(orbotLogController.this));
Objects.requireNonNull(mOrbotLogRecycleView.getItemAnimator()).setAddDuration(350);
mOrbotLogRecycleView.setAdapter(adapter);
mOrbotLogRecycleView.setNestedScrollingEnabled(false);
mOrbotLogRecycleView.setLayoutManager(new LinearLayoutManager(orbotLogController.this));
mOrbotAdapter.notifyDataSetChanged();
}else {
logToString();
}
mOrbotLogViewController.onTrigger(orbotLogEnums.eOrbotLogViewCommands.M_INIT_VIEWS, Collections.singletonList(status.sLogThemeStyleAdvanced));
mLogRecycleView.smoothScrollToPosition((int)mOrbotModel.onTrigger(M_GET_LIST_SIZE));
mOrbotLogRecycleView.smoothScrollToPosition((int)mOrbotModel.onTrigger(M_GET_LIST_SIZE));
}
/* LISTENERS */
@RequiresApi(api = Build.VERSION_CODES.M)
@Override
public void onGlobalLayout() {
if(orbotLogStatus.sOrientation==-1){
orbotLogStatus.sOrientation = getResources().getConfiguration().orientation;
}
if(orbotLogStatus.sOrientation != getResources().getConfiguration().orientation && orbotLogStatus.sScrollPosition!=-1 && orbotLogStatus.sScrollPosition!=0){
orbotLogStatus.sScrollPosition = 0;
orbotLogStatus.sOrientation = getResources().getConfiguration().orientation;
mOrbotLogNestedScroll.stopNestedScroll();
mOrbotLogViewController.onTrigger(M_SCROLL_TO_POSITION, Collections.singletonList(orbotLogStatus.sScrollPosition));
}else {
if(orbotLogStatus.sScrollPosition!=-1 && orbotLogStatus.sUIInteracted){
mOrbotLogViewController.onTrigger(M_SCROLL_TO_POSITION, Collections.singletonList(orbotLogStatus.sScrollPosition));
}else if(mOrbotLogNestedScroll.canScrollVertically(enums.ScrollDirection.VERTICAL)){
if(orbotLogStatus.sScrollPosition==-1){
onScrollBottom();
}else {
mOrbotLogViewController.onTrigger(M_SCROLL_TO_POSITION, Collections.singletonList((int)(mOrbotModel.onTrigger(M_GET_LIST_SIZE))*100));
}
}
}
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) {
mOrbotLogNestedScroll.setOnScrollChangeListener((View.OnScrollChangeListener) (v, scrollX, scrollY, oldScrollX, oldScrollY) -> {
orbotLogStatus.sScrollPosition = scrollY;
if(!mOrbotLogNestedScroll.canScrollVertically(1)){
orbotLogStatus.sScrollPosition = -1;
}
});
}
Log.i("SUPERFUCK1","1");
mOrbotLogViewController.onTrigger(M_FLOAT_BUTTON_UPDATE);
mOrbotLogRecycleView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
orbotLogStatus.sOrientation = getResources().getConfiguration().orientation;
}
@Override
public void onScrollChanged() {
if (mOrbotLogNestedScroll.getChildAt(0).getBottom() <= (mOrbotLogNestedScroll.getHeight() + mOrbotLogNestedScroll.getScrollY())) {
Log.i("SUPERFUCK1","2");
mOrbotLogViewController.onTrigger(M_FLOAT_BUTTON_UPDATE);
if(!mIsRecycleviewInteracting){
Log.i("asdjaslkdjlasd","asd");
orbotLogStatus.sUIInteracted = false;
}
}
else if(mOrbotLogNestedScroll.getScrollY() == 0){
Log.i("SUPERFUCK1111","2");
helperMethod.onDelayHandler(orbotLogController.this, 300, () -> {
if(mOrbotLogNestedScroll.getScrollY() == 0){
mOrbotLogViewController.onTrigger(M_SHOW_FLOATING_TOOLBAR);
}
return null;
});
}
}
public void onScrollStateChange(RecyclerView recyclerView, int newState){
if (!recyclerView.canScrollVertically(1) && newState==RecyclerView.SCROLL_STATE_IDLE) {
mOrbotLogViewController.onTrigger(M_FLOAT_BUTTON_UPDATE);
}
}
@SuppressLint("ClickableViewAccessibility")
private void initListener(){
mLogRecycleView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@SuppressLint("NewApi") @SuppressWarnings("deprecation")
@Override
public void onGlobalLayout() {
mOrbotLogRecycleView.getViewTreeObserver().addOnGlobalLayoutListener(this);
if(orbotLogStatus.sOrientation==-1){
orbotLogStatus.sOrientation = getResources().getConfiguration().orientation;
}
mOrbotLogNestedScroll.getViewTreeObserver().addOnScrollChangedListener(this);
if(orbotLogStatus.sOrientation != getResources().getConfiguration().orientation && orbotLogStatus.sScrollPosition!=-1 && orbotLogStatus.sScrollPosition!=0){
mNestedScrollView.stopNestedScroll();
orbotLogStatus.sScrollPosition = 0;
mNestedScrollView.scrollTo(0, orbotLogStatus.sScrollPosition);
orbotLogStatus.sOrientation = getResources().getConfiguration().orientation;
}else {
if(orbotLogStatus.sScrollPosition!=-1 && orbotLogStatus.sUIInteracted){
mNestedScrollView.scrollTo(0, orbotLogStatus.sScrollPosition);
}else if(mNestedScrollView.canScrollVertically(enums.ScrollDirection.VERTICAL)){
onScrollBottom();
}
}
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) {
mNestedScrollView.setOnScrollChangeListener((View.OnScrollChangeListener) (v, scrollX, scrollY, oldScrollX, oldScrollY) -> {
orbotLogStatus.sScrollPosition = scrollY;
});
}
mOrbotLogViewController.onTrigger(M_FLOAT_BUTTON_UPDATE);
mLogRecycleView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
orbotLogStatus.sOrientation = getResources().getConfiguration().orientation;
}
});
mLogRecycleView.addOnScrollListener(new RecyclerView.OnScrollListener() {
mOrbotLogRecycleView.addOnScrollListener(new RecyclerView.OnScrollListener() {
@Override
public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {
super.onScrollStateChanged(recyclerView, newState);
if (!recyclerView.canScrollVertically(1) && newState==RecyclerView.SCROLL_STATE_IDLE) {
mOrbotLogViewController.onTrigger(M_FLOAT_BUTTON_UPDATE);
}
onScrollStateChange(recyclerView, newState);
}
});
mLogRecycleView.setOnTouchListener((v, event) -> onTouch(event));
mOrbotLogRecycleView.setOnTouchListener((v, event) -> onTouch(event));
mNestedScrollView.setOnTouchListener((v, event) -> onTouch(event));
mOrbotLogNestedScroll.setOnTouchListener((v, event) -> onTouch(event));
mLogRecycleView.addOnScrollListener(new RecyclerView.OnScrollListener() {
@Override
public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {
super.onScrollStateChanged(recyclerView, newState);
if (!recyclerView.canScrollVertically(1) && newState==RecyclerView.SCROLL_STATE_IDLE) {
mOrbotLogViewController.onTrigger(M_FLOAT_BUTTON_UPDATE);
}
}
});
mNestedScrollView.getViewTreeObserver() .addOnScrollChangedListener(() -> {
if (mNestedScrollView.getChildAt(0).getBottom() <= (mNestedScrollView.getHeight() + mNestedScrollView.getScrollY())) {
mOrbotLogViewController.onTrigger(M_FLOAT_BUTTON_UPDATE);
if(!mIsRecycleviewInteracting){
orbotLogStatus.sUIInteracted = false;
}
}
if(mNestedScrollView.getScrollY() == 0){
mOrbotLogViewController.onTrigger(M_FLOAT_BUTTON_UPDATE);
}
});
}
/* Helper Methods */
public boolean onTouch(MotionEvent event){
if(event.getAction() == MotionEvent.ACTION_UP){
mIsRecycleviewInteracting = false;
if(mNestedScrollView.canScrollVertically(enums.ScrollDirection.VERTICAL)){
if(mOrbotLogNestedScroll.canScrollVertically(enums.ScrollDirection.VERTICAL)){
Log.i("asdjaslkdjlasd","asd3");
orbotLogStatus.sUIInteracted = true;
}
}else if(event.getAction() == MotionEvent.ACTION_DOWN){
}else if(event.getAction() == MotionEvent.ACTION_DOWN || event.getAction() == MotionEvent.ACTION_MOVE){
mIsRecycleviewInteracting = true;
}
Log.i("SUPERFUCK1","5");
mOrbotLogViewController.onTrigger(M_FLOAT_BUTTON_UPDATE);
return false;
}
private void logToString(){
if((int)mOrbotModel.onTrigger(M_GET_LIST_SIZE)>1){
for(int mCounter=0;mCounter<(int)mOrbotModel.onTrigger(M_GET_LIST_SIZE);mCounter++){
mOrbotLogViewController.onTrigger(orbotLogEnums.eOrbotLogViewCommands.M_UPDATE_LOGS, Collections.singletonList(((ArrayList<logRowModel>)mOrbotModel.onTrigger(M_GET_LIST)).get(mCounter).getLog()));
mLogCounter+=1;
}
}
}
private void updateLogs(){
new Thread(){
public void run(){
try {
sleep(1000);
while (!mActivityClosed){
if(status.sLogThemeStyleAdvanced){
sleep(800);
}else {
sleep(100);
}
if(mLogCounter>0){
runOnUiThread(() -> {
if(orbotLocalConstants.mTorLogsHistory.size()>mLogCounter){
((ArrayList<logRowModel>)mOrbotModel.onTrigger(M_GET_LIST)).add(orbotLocalConstants.mTorLogsHistory.get(mLogCounter));
if(!status.sLogThemeStyleAdvanced){
mOrbotLogViewController.onTrigger(orbotLogEnums.eOrbotLogViewCommands.M_UPDATE_LOGS, Collections.singletonList(((ArrayList<logRowModel>)mOrbotModel.onTrigger(M_GET_LIST)).get(mLogCounter).getLog()));
}else {
if(mOrbotAdapter!=null){
mOrbotAdapter.notifyItemInserted((int)mOrbotModel.onTrigger(M_GET_LIST_SIZE)-1);
}
}
if(!orbotLogStatus.sUIInteracted){
helperMethod.onDelayHandler(orbotLogController.this, 150, () -> {
Log.i("SUPFUCK4", orbotLogStatus.sUIInteracted + "");
if(!orbotLogStatus.sUIInteracted){
onScrollBottomAnimated(null);
}
return null;
});
}
mLogCounter+=1;
}
});
}
}
}
catch (InterruptedException e) {
e.printStackTrace();
}
}
}.start();
}
private void onScrollBottom() {
mNestedScrollView.scrollTo(0,helperMethod.pxFromDp((int)mOrbotModel.onTrigger(M_GET_LIST_SIZE)*100));
mOrbotLogNestedScroll.scrollTo(0,helperMethod.pxFromDp((int)mOrbotModel.onTrigger(M_GET_LIST_SIZE)*100));
}
/* View Callback */
public void onScrollBottomAnimated(View view) {
mNestedScrollView.fullScroll(View.FOCUS_DOWN);
orbotLogStatus.sUIInteracted = false;
Log.i("SUPFUCK5", orbotLogStatus.sUIInteracted + "");
if(view!=null){
mOrbotLogViewController.onTrigger(M_FLOAT_BUTTON_UPDATE);
public void onUITriggered(View view){
if(view.getId() == R.id.pOrbotLogFloatingToolbar){
if(!orbotLogStatus.sUIInteracted || view!=null){
onScrollDownByFloatingToolabar();
}
if(view!=null){
mOrbotLogViewController.onTrigger(M_FLOAT_BUTTON_UPDATE);
}
}else if(view.getId() == R.id.pOrbotLogSettings){
helperMethod.openActivity(settingLogController.class, constants.CONST_LIST_HISTORY, this,true);
}
}
public void onOpenInfo(View view) {
helperMethod.openActivity(settingLogController.class, constants.CONST_LIST_HISTORY, this,true);
public void onScrollDownByFloatingToolabar(){
if(!mIsRecycleviewInteracting){
orbotLogStatus.sUIInteracted = false;
mOrbotLogNestedScroll.fullScroll(View.FOCUS_DOWN);
}
}
public void onClose(View view){
public void onCloseTriggered(View view){
finish();
activityContextManager.getInstance().onRemoveStack(this);
overridePendingTransition(R.anim.push_anim_in, R.anim.push_anim_out);
mActivityClosed = true;
initializeStartupAnimation();
}
/* View Callback */
@ -330,7 +301,7 @@ public class orbotLogController extends AppCompatActivity {
private class orbotLogViewCallback implements eventObserver.eventListener{
@Override
public Object invokeObserver(List<Object> data, Object e_type)
public Object invokeObserver(List<Object> pData, Object pType)
{
return null;
}
@ -340,8 +311,21 @@ public class orbotLogController extends AppCompatActivity {
public class orbotModelCallback implements eventObserver.eventListener{
@Override
public Object invokeObserver(List<Object> data, Object e_type)
public Object invokeObserver(List<Object> pData, Object pType)
{
if(pType.equals(M_UPDATE_FLOATING_BUTTON)){
if(!orbotLogStatus.sUIInteracted){
onScrollDownByFloatingToolabar();
}
}
else if(pType.equals(M_UPDATE_LOGS)){
mOrbotLogViewController.onTrigger(orbotLogEnums.eOrbotLogViewCommands.M_UPDATE_LOGS, Collections.singletonList(((ArrayList<logRowModel>)mOrbotModel.onTrigger(M_GET_LIST)).get((int)pData.get(0)).getLog()));
}
else if(pType.equals(M_UPDATE_RECYCLE_VIEW)){
if(mOrbotAdapter!=null){
mOrbotAdapter.notifyItemInserted((int)pData.get(0));
}
}
return null;
}
}
@ -359,7 +343,7 @@ public class orbotLogController extends AppCompatActivity {
@Override
public void onBackPressed() {
onClose(null);
onCloseTriggered(null);
}
@Override
@ -367,7 +351,6 @@ public class orbotLogController extends AppCompatActivity {
super.onDestroy();
activityContextManager.getInstance().onRemoveStack(this);
activityContextManager.getInstance().setOrbotLogController(null);
mActivityClosed = true;
}
/* External Calls */

View File

@ -5,7 +5,7 @@ public class orbotLogEnums
/*Orbot Log View Manager*/
public enum eOrbotLogViewCommands {
M_UPDATE_LOGS, M_INIT_VIEWS, M_FLOAT_BUTTON_UPDATE
M_UPDATE_LOGS, M_INIT_VIEWS, M_FLOAT_BUTTON_UPDATE, M_SCROLL_TOP, M_SCROLL_BOTTOM, M_SCROLL_TO_POSITION, M_SHOW_FLOATING_TOOLBAR
}
/*Orbot Log Model Manager*/
@ -13,4 +13,10 @@ public class orbotLogEnums
public enum eOrbotLogModelCommands {
M_GET_LIST, M_GET_LIST_SIZE
}
/*Orbot Log Model Callback*/
public enum eOrbotLogModelCallbackCommands {
M_UPDATE_FLOATING_BUTTON, M_UPDATE_LOGS, M_UPDATE_RECYCLE_VIEW
}
}

View File

@ -1,21 +1,51 @@
package com.darkweb.genesissearchengine.appManager.orbotLogManager;
import android.annotation.SuppressLint;
import android.os.AsyncTask;
import android.util.Log;
import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.eventObserver;
import com.darkweb.genesissearchengine.helperManager.helperMethod;
import org.torproject.android.service.wrapper.logRowModel;
import org.torproject.android.service.wrapper.orbotLocalConstants;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import static com.darkweb.genesissearchengine.appManager.orbotLogManager.orbotLogEnums.eOrbotLogModelCallbackCommands.M_UPDATE_FLOATING_BUTTON;
import static com.darkweb.genesissearchengine.appManager.orbotLogManager.orbotLogEnums.eOrbotLogModelCallbackCommands.M_UPDATE_LOGS;
import static com.darkweb.genesissearchengine.appManager.orbotLogManager.orbotLogEnums.eOrbotLogModelCallbackCommands.M_UPDATE_RECYCLE_VIEW;
import static java.lang.Thread.sleep;
import static org.mozilla.gecko.util.ThreadUtils.runOnUiThread;
class orbotLogModel
{
/*Private Variables*/
private ArrayList<logRowModel> mModelList = new ArrayList<>();
private AppCompatActivity mContext;
private eventObserver.eventListener mEvent;
private LogHandler mLogHandler;
private int mLogCounter;
/*Helper Methods*/
void setList(ArrayList<logRowModel> pModel)
public orbotLogModel(AppCompatActivity pContext, eventObserver.eventListener pEvent){
this.mContext = pContext;
this.mEvent = pEvent;
initLogHandler();
this.initList(orbotLocalConstants.mTorLogsHistory);
}
private void initLogHandler(){
this.mLogHandler = new LogHandler();
this.mLogHandler.execute();
}
private void initList(ArrayList<logRowModel> pModel)
{
if(pModel.size()>0){
mModelList.clear();
@ -38,6 +68,58 @@ class orbotLogModel
/*Triggers*/
public void onLoadLogs(){
new Thread(){
public void run(){
}
}.start();
}
@SuppressLint("StaticFieldLeak")
class LogHandler extends AsyncTask<Void, Integer, Void> {
protected Void doInBackground(Void...arg0) {
try {
sleep(1000);
mLogCounter = mModelList.size();
while (!mContext.isDestroyed()){
if(status.sLogThemeStyleAdvanced){
sleep(800);
}else {
sleep(100);
}
if(mLogCounter>0){
runOnUiThread(() -> {
if(orbotLocalConstants.mTorLogsHistory.size()>mLogCounter){
mModelList.add(orbotLocalConstants.mTorLogsHistory.get(mLogCounter));
Log.i("asdasd : ",orbotLocalConstants.mTorLogsHistory.get(mLogCounter).getLog());
if(!status.sLogThemeStyleAdvanced){
mEvent.invokeObserver(Collections.singletonList(mLogCounter), M_UPDATE_LOGS);
}else {
mEvent.invokeObserver(Collections.singletonList(mModelList.size()-1), M_UPDATE_RECYCLE_VIEW);
}
if(!orbotLogStatus.sUIInteracted){
helperMethod.onDelayHandler(mContext, 150, () -> {
if(!orbotLogStatus.sUIInteracted){
mEvent.invokeObserver(null, M_UPDATE_FLOATING_BUTTON);
}
return null;
});
}
mLogCounter+=1;
}
});
}
}
}
catch (InterruptedException e) {
e.printStackTrace();
}
return null;
}
}
public void onTrigger(orbotLogEnums.eOrbotLogViewCommands pCommands, List<Object> pData){
}

View File

@ -1,16 +1,18 @@
package com.darkweb.genesissearchengine.appManager.orbotLogManager;
import android.os.Handler;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.widget.NestedScrollView;
import androidx.recyclerview.widget.RecyclerView;
import com.darkweb.genesissearchengine.constants.enums;
import com.darkweb.genesissearchengine.eventObserver;
import com.darkweb.genesissearchengine.helperManager.helperMethod;
import com.darkweb.genesissearchengine.helperManager.sharedUIMethod;
import com.example.myapplication.R;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import java.util.List;
class orbotLogViewController
@ -20,32 +22,32 @@ class orbotLogViewController
private AppCompatActivity mContext;
private eventObserver.eventListener mEvent;
private TextView mLogs;
private RecyclerView mLogRecycleView;
private NestedScrollView mNestedScrollView;
private FloatingActionButton mFloatingScroller;
private TextView mOrbotLogLoadingText;
private RecyclerView mOrbotLogRecycleView;
private NestedScrollView mOrbotLogNestedScroll;
private FloatingActionButton mOrbotLogFloatingToolbar;
/*Initializations*/
orbotLogViewController(AppCompatActivity pContext, eventObserver.eventListener pEvent, TextView pLogs, RecyclerView pLogRecycleView, NestedScrollView pNestedScrollView, FloatingActionButton pFloatingScroller)
orbotLogViewController(AppCompatActivity pContext, eventObserver.eventListener pEvent, TextView pOrbotLogLoadingText, RecyclerView pOrbotLogRecycleView, NestedScrollView pOrbotLogNestedScroll, FloatingActionButton pOrbotLogFloatingToolbar)
{
this.mContext = pContext;
this.mLogs = pLogs;
this.mLogRecycleView = pLogRecycleView;
this.mNestedScrollView = pNestedScrollView;
this.mFloatingScroller = pFloatingScroller;
this.mEvent = pEvent;
this.mOrbotLogLoadingText = pOrbotLogLoadingText;
this.mOrbotLogRecycleView = pOrbotLogRecycleView;
this.mOrbotLogNestedScroll = pOrbotLogNestedScroll;
this.mOrbotLogFloatingToolbar = pOrbotLogFloatingToolbar;
initPostUI();
}
private void initViews(boolean pLogThemeStyleAdvanced){
if(pLogThemeStyleAdvanced){
mLogRecycleView.setVisibility(View.VISIBLE);
mLogs.setVisibility(View.GONE);
mOrbotLogRecycleView.setVisibility(View.VISIBLE);
mOrbotLogLoadingText.setVisibility(View.GONE);
}else {
mLogRecycleView.setVisibility(View.GONE);
mLogs.setVisibility(View.VISIBLE);
mOrbotLogRecycleView.setVisibility(View.GONE);
mOrbotLogLoadingText.setVisibility(View.VISIBLE);
}
}
@ -57,20 +59,38 @@ class orbotLogViewController
private void onUpdateLogs(String pLogs){
pLogs = "~ " + pLogs;
mLogs.setText(String.format("%s%s",mLogs.getText() , "\n\n" + pLogs ));
mOrbotLogLoadingText.setText(String.format("%s%s", mOrbotLogLoadingText.getText() , "\n\n" + pLogs ));
}
private void onFloatButtonUpdate(){
if(mNestedScrollView.canScrollVertically(enums.ScrollDirection.VERTICAL)){
mFloatingScroller.setVisibility(View.VISIBLE);
mFloatingScroller.animate().cancel();
mFloatingScroller.animate().setDuration(250).alpha(1);
if(mOrbotLogNestedScroll.canScrollVertically(enums.ScrollDirection.VERTICAL)){
mOrbotLogFloatingToolbar.setVisibility(View.VISIBLE);
mOrbotLogFloatingToolbar.animate().setDuration(250).alpha(1);
}else {
mFloatingScroller.animate().cancel();
mFloatingScroller.animate().setDuration(250).alpha(0).withEndAction(() -> mFloatingScroller.setVisibility(View.GONE));
mOrbotLogFloatingToolbar.animate().cancel();
mOrbotLogFloatingToolbar.animate().setDuration(250).alpha(0).withEndAction(() -> mOrbotLogFloatingToolbar.setVisibility(View.GONE));
}
}
private void onShowFloatingToolbar(){
mOrbotLogFloatingToolbar.setVisibility(View.VISIBLE);
mOrbotLogFloatingToolbar.animate().setDuration(250).alpha(1);
}
private void onScrollToTop(){
mOrbotLogNestedScroll.stopNestedScroll();
mOrbotLogNestedScroll.scrollTo(0,0);
mOrbotLogNestedScroll.smoothScrollTo(0,0);
}
private void onScrollToBottom(){
mOrbotLogNestedScroll.stopNestedScroll();
}
private void onScrollToSize(int pSize){
mOrbotLogNestedScroll.stopNestedScroll();
mOrbotLogNestedScroll.scrollTo(0, pSize);
}
/*Triggers*/
@ -81,12 +101,23 @@ class orbotLogViewController
else if(pCommands.equals(orbotLogEnums.eOrbotLogViewCommands.M_INIT_VIEWS)){
initViews((boolean)pData.get(0));
}
else if(pCommands.equals(orbotLogEnums.eOrbotLogViewCommands.M_FLOAT_BUTTON_UPDATE)){
onFloatButtonUpdate();
else if(pCommands.equals(orbotLogEnums.eOrbotLogViewCommands.M_SCROLL_TO_POSITION)){
onScrollToSize((int)pData.get(0));
}
}
public void onTrigger(orbotLogEnums.eOrbotLogViewCommands pCommands){
onTrigger(pCommands, null);
if(pCommands.equals(orbotLogEnums.eOrbotLogViewCommands.M_SCROLL_TOP)){
onScrollToTop();
}
else if(pCommands.equals(orbotLogEnums.eOrbotLogViewCommands.M_SCROLL_BOTTOM)){
onScrollToBottom();
}
else if(pCommands.equals(orbotLogEnums.eOrbotLogViewCommands.M_FLOAT_BUTTON_UPDATE)){
onFloatButtonUpdate();
}
else if(pCommands.equals(orbotLogEnums.eOrbotLogViewCommands.M_SHOW_FLOATING_TOOLBAR)){
onShowFloatingToolbar();
}
}
}

View File

@ -42,10 +42,10 @@ public class orbotController extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
overridePendingTransition(R.anim.push_anim_in, R.anim.push_anim_out);
super.onCreate(savedInstanceState);
setContentView(R.layout.orbot_settings_view);
initializeStartupAnimation();
if(!status.mThemeApplying){
activityContextManager.getInstance().onStack(this);
@ -111,8 +111,14 @@ public class orbotController extends AppCompatActivity {
public void onClose(View view){
finish();
initializeStartupAnimation();
activityContextManager.getInstance().onRemoveStack(this);
overridePendingTransition(R.anim.push_anim_out_reverse, R.anim.push_anim_in_reverse);
}
public void initializeStartupAnimation(){
if(activityContextManager.getInstance().getHomeController().isSplashScreenLoading()){
overridePendingTransition(R.anim.translate_fade_left_reverse, R.anim.translate_fade_right_reverse);
}
}
/* LOCAL OVERRIDES */

View File

@ -38,7 +38,7 @@ public class proxyStatusController extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
overridePendingTransition(R.anim.push_anim_in, R.anim.push_anim_out);
overridePendingTransition(R.anim.popup_scale_in, R.anim.popup_scale_out);
super.onCreate(savedInstanceState);
setContentView(R.layout.proxy_status_view);
@ -88,7 +88,7 @@ public class proxyStatusController extends AppCompatActivity {
public void onClose(View view){
finish();
activityContextManager.getInstance().onRemoveStack(this);
overridePendingTransition(R.anim.push_anim_out_reverse, R.anim.push_anim_in_reverse);
overridePendingTransition(R.anim.popup_scale_in, R.anim.popup_scale_out);
}
/* LOCAL OVERRIDES */

View File

@ -1,5 +1,8 @@
package com.darkweb.genesissearchengine.appManager.settingManager.advanceManager;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.M_IMAGE_UPDATE;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.M_UPDATE_BOOKMARK;
import android.content.res.Configuration;
import android.os.Bundle;
import android.view.View;
@ -155,11 +158,16 @@ public class settingAdvanceController extends AppCompatActivity {
}
public void onShowImages(View view) {
if(status.sShowImages == 0 && view.getId() == R.id.pAdvanceOption2 && !mImageOption.get(1).isChecked() || status.sShowImages == 2 && view.getId() == R.id.pAdvanceOption1 && !mImageOption.get(0).isChecked()){
pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(this), M_IMAGE_UPDATE);
}
mIsChanged = true;
mSettingAdvanceViewController.onTrigger(settingAdvanceEnums.eAdvanceViewController.M_CLEAR_IMAGE, Collections.singletonList(null));
mSettingAdvanceModel.onTrigger(settingAdvanceEnums.eAdvanceModel.M_SHOW_IMAGE, Collections.singletonList(view));
mSettingAdvanceViewController.onTrigger(settingAdvanceEnums.eAdvanceViewController.M_SET_IMAGE, Collections.singletonList(view));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_INT, Arrays.asList(keys.SETTING_SHOW_IMAGES,status.sShowImages));
}
public void onGridView(View view) {

View File

@ -234,6 +234,7 @@ public class settingClearController extends AppCompatActivity {
status.mThemeApplying = true;
onBackPressed();
overridePendingTransition(R.anim.fade_in_lang, R.anim.fade_out_lang);
activityContextManager.getInstance().getHomeController().onResetData();
activityContextManager.getInstance().getHomeController().onReInitTheme();
activityContextManager.getInstance().getSettingController().onReInitTheme();
helperMethod.openActivity(settingClearController.class, constants.CONST_LIST_HISTORY, settingClearController.this, true);

View File

@ -1,8 +1,6 @@
package com.darkweb.genesissearchengine.appManager.settingManager.generalManager;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
@ -13,7 +11,6 @@ import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatDelegate;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
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.constants.constants;
import com.darkweb.genesissearchengine.constants.enums;
@ -31,9 +28,6 @@ import com.google.android.material.switchmaterial.SwitchMaterial;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.M_APPLICATION_CRASH;
public class settingGeneralController extends AppCompatActivity {
@ -100,7 +94,7 @@ public class settingGeneralController extends AppCompatActivity {
private void viewsInitializations() {
mFullScreenMode = findViewById(R.id.pJSStatus);
mFullScreenMode = findViewById(R.id.pSecureJavascriptStatus);
mThemeLight = findViewById(R.id.pThemeLight);
mThemeDark = findViewById(R.id.pThemeDark);
mThemeDefault = findViewById(R.id.pThemeDefault);

View File

@ -91,7 +91,7 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
{
holder.bindListView(mModelList.get(position));
holder.itemView.setTag(position);
holder.itemView.findViewById(R.id.pRemoveRow).setTag(position);
holder.itemView.findViewById(R.id.pOrbotRowRemove).setTag(position);
holder.itemView.findViewById(R.id.pLoadSession).setTag(position);
if(position == 0 && status.sTabGridLayoutEnabled && !mViewLoaded){
@ -268,10 +268,10 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
}
void bindListView(tabRowModel model) {
mHeader = itemView.findViewById(R.id.pHeader);
mDescription = itemView.findViewById(R.id.pDescription);
mHeader = itemView.findViewById(R.id.pOrbotRowHeader);
mDescription = itemView.findViewById(R.id.pOrbotRowDescription);
mLoadSession = itemView.findViewById(R.id.pLoadSession);
mRemoveRow = itemView.findViewById(R.id.pRemoveRow);
mRemoveRow = itemView.findViewById(R.id.pOrbotRowRemove);
mWebThumbnail = itemView.findViewById(R.id.pWebThumbnail);
mDate = itemView.findViewById(R.id.pDate);
mSelectedView = itemView.findViewById(R.id.pSelectedView);
@ -340,6 +340,15 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
mHeader.setText("about:blank");
}
if(mHeadText.startsWith("resource")){
if(mHeadText.equals(CONST_GENESIS_URL_CACHED) || mHeadText.equals(CONST_GENESIS_URL_CACHED_DARK)){
mHeader.setText(CONST_GENESIS_DOMAIN_URL);
}
else if(mHeadText.equals(CONST_GENESIS_HELP_URL_CACHE) || mHeadText.equals(CONST_GENESIS_HELP_URL_CACHE_DARK)){
mHeader.setText(CONST_GENESIS_HELP_URL);
}
}
if(mDescText.equals("$TITLE") || mDescText.startsWith("http://loading") || mDescText.startsWith("loading")){
mDescription.setText(mURL);
}
@ -388,7 +397,7 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
}
if(status.sTabGridLayoutEnabled){
CardView mLayout = itemView.findViewById(R.id.pRowContainerInner);
CardView mLayout = itemView.findViewById(R.id.pTABRowContainer);
CardView mCardView = itemView.findViewById(R.id.pCardViewParent);
ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) mLayout.getLayoutParams();
@ -477,7 +486,7 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
onSelectionClear(mSelectedView);
notifyItemChanged(mModelList.size()-1);
}
}else if(v.getId() == R.id.pRemoveRow){
}else if(v.getId() == R.id.pOrbotRowRemove){
v.setEnabled(false);
onRemoveRowCross(this.getLayoutPosition());
}

View File

@ -198,7 +198,7 @@ public class tabController extends Fragment
mClearSelection = mRootView.findViewById(R.id.pClearSelection);
mPopupUndo = mRootView.findViewById(R.id.pPopupUndo);
mSelectionCount = mRootView.findViewById(R.id.pSelectionCount);
mBlocker = mRootView.findViewById(R.id.pBlocker);
mBlocker = mRootView.findViewById(R.id.pSecureRootBlocker);
mNestedScrollView = mRootView.findViewById(R.id.pNestedScroll);
mNewTab = mRootView.findViewById(R.id.pNewTab);
@ -234,7 +234,10 @@ public class tabController extends Fragment
float scrollY = mNestedScrollView.getScrollY();
minScroll = scrollY;
int orientation = mContextManager.getHomeController().getResources().getConfiguration().orientation;
if(activityContextManager.getInstance().getHomeController()==null){
return;
}
int orientation = activityContextManager.getInstance().getHomeController().getResources().getConfiguration().orientation;
if (orientation == Configuration.ORIENTATION_PORTRAIT) {
maxScroll = mRecycleView.computeVerticalScrollRange() - mScreenHeight*0.350f + helperMethod.pxFromDp(helperMethod.getNavigationBarSize(getContext()).y);
} else {

View File

@ -66,8 +66,9 @@ public class constants
/*MENU CONSTANTS*/
public static final int CONST_LIST_HISTORY = 1;
public static final int CONST_LIST_BOOKMARK = 2;
public static final int CONST_LIST_EXTERNAL_SHORTCUT = 1;
public static final int CONST_LIST_HISTORY = 2;
public static final int CONST_LIST_BOOKMARK = 3;
/*SETTINGS CONSTANTS*/
@ -105,5 +106,10 @@ public class constants
public static final String CONST_ENCRYPTION_KEY = "Zr4u7x!A%D*F-JaNdRgUkXp2s5v8y/B?";
public static final String CONST_ENCRYPTION_KEY_DATABASE = "Zr4u7x!!A%D*F-JaNdsS@@gUbbp^^5v8y/B?";
/*SHORTCUT CONSTANTS*/
public static final String CONST_EXTERNAL_SHORTCUT_COMMAND_ERASE = "EXTERNAL_SHORTCUT_COMMAND_ERASE";
public static final String CONST_EXTERNAL_SHORTCUT_COMMAND_ERASE_OPEN = "EXTERNAL_SHORTCUT_COMMAND_ERASE_OPEN";
public static final String CONST_EXTERNAL_SHORTCUT_COMMAND_RESTART = "EXTERNAL_SHORTCUT_COMMAND_RESTART";
public static final String CONST_EXTERNAL_SHORTCUT_COMMAND_NAVIGATE = "EXTERNAL_SHORTCUT_COMMAND_NAVIGATE";
}

View File

@ -8,7 +8,7 @@ public class enums
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,
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_HOME_BUTTON_PRESSED, 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
}
/*General Enums*/

View File

@ -5,6 +5,7 @@ public class keys
/*GENERIC*/
public static final String M_ACTIVITY_RESPONSE = "M_ACTIVITY_RESPONSE";
public static final String M_ACTIVITY_NAVIGATION_BUNDLE_KEY = "M_ACTIVITY_NAVIGATION_BUNDLE_KEY";
/*Home page*/
@ -77,10 +78,9 @@ public class keys
public static final String BOOKMARK_SETTING_URL = "BOOKMARK_SETTING_URL";
public static final String BOOKMARK_SETTING_ID = "BOOKMARK_SETTING_ID";
/*Landing Settings*/
public static final String LANDING_TITLE_KEY = "LANDING_TITLE_KEY";
public static final String LANDING_SUB_TITLE_KEY = "LANDING_SUB_TITLE_KEY";
public static final String LANDING_SUBMIT_KEY = "LANDING_SUBMIT_KEY";
public static final String LANDING_LAYOUT_RESID = "LANDING_LAYOUT_RESID";
/*External Shortcut Settings*/
public static final String EXTERNAL_SHORTCUT_COMMAND = "EXTERNAL_SHORTCUT_COMMAND";
public static final String EXTERNAL_SHORTCUT_COMMAND_NAVIGATE = "EXTERNAL_SHORTCUT_COMMAND";
}

View File

@ -61,7 +61,7 @@ class imageDataModel
}
public void mBackgroundThread(){
new Thread(){
/*new Thread(){
public void run(){
while (true) {
try {
@ -82,7 +82,7 @@ class imageDataModel
}
}
}
}.start();
}.start();*/
}
private Bitmap getBitmapFromURL(String src) {

View File

@ -13,6 +13,7 @@ import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Bitmap;
@ -52,9 +53,12 @@ import androidx.core.content.ContextCompat;
import androidx.core.content.FileProvider;
import androidx.core.graphics.ColorUtils;
import com.darkweb.genesissearchengine.appManager.homeManager.geckoManager.geckoSession;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
import com.darkweb.genesissearchengine.appManager.kotlinHelperLibraries.defaultBrowser;
import com.darkweb.genesissearchengine.constants.enums;
import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.constants.strings;
import com.example.myapplication.R;
import org.xmlpull.v1.XmlPullParserException;
import java.io.ByteArrayInputStream;
@ -87,7 +91,10 @@ import javax.net.ssl.HttpsURLConnection;
import static android.content.Context.LAYOUT_INFLATER_SERVICE;
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
import static android.content.Intent.FLAG_ACTIVITY_NO_ANIMATION;
import static com.darkweb.genesissearchengine.constants.constants.CONST_LIST_EXTERNAL_SHORTCUT;
import static com.darkweb.genesissearchengine.constants.constants.CONST_PACKAGE_NAME;
import static com.darkweb.genesissearchengine.constants.constants.CONST_PLAYSTORE_URL;
import static com.darkweb.genesissearchengine.constants.keys.M_ACTIVITY_NAVIGATION_BUNDLE_KEY;
public class helperMethod
{
@ -172,6 +179,21 @@ public class helperMethod
context.startActivity(browserIntent);
}
public static geckoSession deepCopy(geckoSession object) {
try {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
ObjectOutputStream outputStrm = new ObjectOutputStream(outputStream);
outputStrm.writeObject(object);
ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
ObjectInputStream objInputStream = new ObjectInputStream(inputStream);
return (geckoSession)objInputStream.readObject();
}
catch (Exception e) {
e.printStackTrace();
return null;
}
}
public static String completeURL(String pURL){
if(pURL.equals("about:blank")){
return pURL;
@ -262,6 +284,36 @@ public class helperMethod
}
}
public static String getDefaultBrowser(AppCompatActivity context){
Intent browserIntent = new Intent("android.intent.action.VIEW", Uri.parse("http://"));
ResolveInfo resolveInfo = context.getPackageManager().resolveActivity(browserIntent,PackageManager.MATCH_DEFAULT_ONLY);
return resolveInfo.activityInfo.packageName;
}
public static void openURLInCustomBrowser(String pData, AppCompatActivity pContext){
String mBrowser = helperMethod.getSystemBrowser(pContext);
Intent intent = new Intent(Intent.ACTION_VIEW,Uri.parse(pData));
intent.setPackage(mBrowser);
pContext.startActivity(intent);
}
public static String getSystemBrowser(AppCompatActivity context){
PackageManager packageManager = context.getPackageManager();
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("http://www.google.com"));
List<ResolveInfo> list = packageManager.queryIntentActivities(intent, PackageManager.MATCH_ALL);
String mBrowser = strings.GENERIC_EMPTY_STR;
for (ResolveInfo info : list) {
if(!info.activityInfo.packageName.contains(CONST_PACKAGE_NAME)){
mBrowser = info.activityInfo.packageName;
if(info.activityInfo.packageName.contains("chrome") || info.activityInfo.packageName.contains("google") || info.activityInfo.packageName.contains("firefox")){
return mBrowser;
}
}
}
return mBrowser;
}
public static void sendIssueEmail(Context context){
Intent selectorIntent = new Intent(Intent.ACTION_SENDTO);
selectorIntent.setData(Uri.parse("mailto:"));
@ -623,6 +675,15 @@ public class helperMethod
context.startActivity(myIntent);
}
public static void openIntent(Intent pIntent,AppCompatActivity pContext, int pType){
if(pType == CONST_LIST_EXTERNAL_SHORTCUT){
pIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
pIntent.putExtra(M_ACTIVITY_NAVIGATION_BUNDLE_KEY, pType);
pContext.startActivity(pIntent);
pContext.overridePendingTransition(R.anim.fade_in_lang, R.anim.fade_out_lang);
}
}
public static void openActivityReverse( Class<?> cls,int type,AppCompatActivity context,boolean animation){
Intent myIntent = new Intent(context, cls);
myIntent.putExtra(keys.PROXY_LIST_TYPE, type);

View File

@ -1,126 +0,0 @@
package com.darkweb.genesissearchengine.pluginManager.adPluginManager;
import android.content.Context;
import android.os.Handler;
import android.util.Log;
import androidx.annotation.NonNull;
import com.darkweb.genesissearchengine.eventObserver;
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
import com.mopub.common.MoPub;
import com.mopub.common.SdkConfiguration;
import com.mopub.common.SdkInitializationListener;
import com.mopub.mobileads.MoPubErrorCode;
import com.mopub.mobileads.MoPubView;
import java.lang.ref.WeakReference;
import java.util.List;
import static com.mopub.common.logging.MoPubLog.LogLevel.INFO;
public class adManager
{
/*Private Variables */
private eventObserver.eventListener mEvent;
private WeakReference<MoPubView> mBannerAds;
private int mRequestCount = 0;
private boolean mPaidStatus;
private boolean bannerAdsLoading = false;
private boolean bannerAdsLoaded = false;
/*Initializations*/
public adManager(eventObserver.eventListener pEvent, MoPubView pBannerAds, boolean pPaidStatus,Context pContext) {
this.mEvent = pEvent;
this.mPaidStatus = pPaidStatus;
this.mBannerAds = new WeakReference(pBannerAds);
initializeBannerAds(pContext);
}
private void initializeBannerAds(Context pContext){
if(!mPaidStatus){
final SdkConfiguration.Builder configBuilder = new SdkConfiguration.Builder("c122efbe224f46678800d2f73389d258");
configBuilder.withLogLevel(INFO);
MoPub.initializeSdk(pContext, configBuilder.build(), initSdkListener());
admobListeners();
}
}
private SdkInitializationListener initSdkListener() {
return () -> {
};
}
/*Local Helper Methods*/
private void loadAds(){
if(!mPaidStatus)
{
if (!bannerAdsLoading)
{
bannerAdsLoading = true;
mBannerAds.get().setAdUnitId("c122efbe224f46678800d2f73389d258");
mBannerAds.get().loadAd();
}
}
}
private boolean isAdvertLoaded(){
return bannerAdsLoaded;
}
/*Local Listeners*/
private void admobListeners(){
if(!mPaidStatus){
mBannerAds.get().setBannerAdListener(new MoPubView.BannerAdListener() {
@Override
public void onBannerLoaded(@NonNull MoPubView moPubView) {
bannerAdsLoaded = true;
}
@Override
public void onBannerFailed(MoPubView moPubView, MoPubErrorCode moPubErrorCode) {
new Handler().postDelayed(() ->
{
if(mRequestCount<10){
mRequestCount+=1;
mBannerAds.get().loadAd();
}
}, 30000);
}
@Override
public void onBannerClicked(MoPubView moPubView) {
Log.i("asd","asd");
}
@Override
public void onBannerExpanded(MoPubView moPubView) {
Log.i("asd","asd");
}
@Override
public void onBannerCollapsed(MoPubView moPubView) {
Log.i("asd","asd");
}
});
}
}
/*External Triggers*/
public Object onTrigger(List<Object> pData, pluginEnums.eAdManager pEventType) {
if(pEventType.equals(pluginEnums.eAdManager.M_INITIALIZE_BANNER_ADS))
{
loadAds();
}
else if(pEventType.equals(pluginEnums.eAdManager.M_IS_ADVERT_LOADED))
{
return isAdvertLoaded();
}
return null;
}
}

View File

@ -0,0 +1,82 @@
package com.darkweb.genesissearchengine.pluginManager.adPluginManager;
import android.content.Context;
import android.util.Log;
import com.darkweb.genesissearchengine.eventObserver;
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
import com.google.android.gms.ads.AdListener;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdView;
import java.lang.ref.WeakReference;
import java.util.List;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eAdManagerCallbacks.M_ON_AD_CLICK;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eAdManagerCallbacks.M_ON_AD_LOAD;
public class admobManager extends AdListener {
/*Private Variables */
private eventObserver.eventListener mEvent;
private WeakReference<AdView> mBannerAds;
private boolean bannerAdsLoaded = false;
/*Initializations*/
public admobManager(eventObserver.eventListener pEvent, AdView pBannerAds, Context pContext) {
this.mEvent = pEvent;
this.mBannerAds = new WeakReference(pBannerAds);
loadAds();
}
/*Local Overrides*/
@Override
public void onAdLoaded() {
super.onAdLoaded();
bannerAdsLoaded = true;
mEvent.invokeObserver(null, M_ON_AD_LOAD);
}
@Override
public void onAdClicked(){
super.onAdClicked();
mEvent.invokeObserver(null, M_ON_AD_CLICK);
}
/*Local Helper Methods*/
private void loadAds(){
AdRequest adRequest = new AdRequest.Builder().build();
mBannerAds.get().loadAd(adRequest);
mBannerAds.get().setAdListener(this);
}
private boolean isAdvertLoaded(){
return bannerAdsLoaded;
}
private void onDestroy(){
mBannerAds.get().destroy();
}
/*External Triggers*/
public Object onTrigger(pluginEnums.eAdManager pEventType) {
if(pEventType.equals(pluginEnums.eAdManager.M_INITIALIZE_BANNER_ADS))
{
}
else if(pEventType.equals(pluginEnums.eAdManager.M_IS_ADVERT_LOADED))
{
return isAdvertLoaded();
}
else if(pEventType.equals(pluginEnums.eAdManager.M_DESTROY))
{
onDestroy();
}
return null;
}
}

View File

@ -0,0 +1,85 @@
package com.darkweb.genesissearchengine.pluginManager.adPluginManager;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eAdManagerCallbacks.M_ON_AD_CLICK;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eAdManagerCallbacks.M_ON_AD_LOAD;
import android.widget.LinearLayout;
import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.eventObserver;
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
import com.facebook.ads.*;
import java.lang.ref.WeakReference;
public class facebookAdsManager implements AdListener {
/*Private Variables */
private eventObserver.eventListener mEvent;
private WeakReference<LinearLayout> mBannerAds;
private AdView adView;
private boolean bannerAdsLoaded = false;
/*Initializations*/
public facebookAdsManager(eventObserver.eventListener pEvent, LinearLayout pBannerAds, AppCompatActivity pContext) {
this.mEvent = pEvent;
this.mBannerAds = new WeakReference(pBannerAds);
loadAds(pContext, pBannerAds);
}
/*Local Overrides*/
@Override
public void onError(Ad ad, AdError adError) {
}
@Override
public void onAdLoaded(Ad ad) {
bannerAdsLoaded = true;
mEvent.invokeObserver(null, M_ON_AD_LOAD);
}
@Override
public void onAdClicked(Ad ad) {
mEvent.invokeObserver(null, M_ON_AD_CLICK);
}
@Override
public void onLoggingImpression(Ad ad) {
}
/*Local Helper Methods*/
private void loadAds(AppCompatActivity pContext, LinearLayout pLinearLayout){
AudienceNetworkAds.initialize(pContext);
adView = new AdView(pContext, "856646331639727_856654334972260", AdSize.BANNER_HEIGHT_50);
pLinearLayout.addView(adView);
adView.loadAd(adView.buildLoadAdConfig().withAdListener(this).build());
}
private boolean isAdvertLoaded(){
return bannerAdsLoaded;
}
private void onDestroy(){
adView.destroy();
}
/*External Triggers*/
public Object onTrigger(pluginEnums.eAdManager pEventType) {
if(pEventType.equals(pluginEnums.eAdManager.M_INITIALIZE_BANNER_ADS))
{
}
else if(pEventType.equals(pluginEnums.eAdManager.M_IS_ADVERT_LOADED))
{
return isAdvertLoaded();
}
else if(pEventType.equals(pluginEnums.eAdManager.M_DESTROY))
{
onDestroy();
}
return null;
}
}

View File

@ -0,0 +1,98 @@
package com.darkweb.genesissearchengine.pluginManager.adPluginManager;
/*
import android.content.Context;
import androidx.annotation.NonNull;
import com.darkweb.genesissearchengine.eventObserver;
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
import com.mopub.common.MoPub;
import com.mopub.common.SdkConfiguration;
import com.mopub.common.SdkInitializationListener;
import com.mopub.mobileads.MoPubErrorCode;
import com.mopub.mobileads.MoPubView;
import java.lang.ref.WeakReference;
import java.util.List;
import static com.mopub.common.logging.MoPubLog.LogLevel.INFO;
public class mopubManager implements MoPubView.BannerAdListener
{
/*Private Variables */
/*private eventObserver.eventListener mEvent;
private WeakReference<MoPubView> mBannerAds;
private boolean bannerAdsLoaded = false;
/*Initializations*/
/*public mopubManager(eventObserver.eventListener pEvent, MoPubView pBannerAds, boolean pPaidStatus, Context pContext) {
this.mEvent = pEvent;
this.mBannerAds = new WeakReference(pBannerAds);
initializeBannerAds(pContext);
}
private void initializeBannerAds(Context pContext){
final SdkConfiguration.Builder configBuilder = new SdkConfiguration.Builder("c122efbe224f46678800d2f73389d258");
configBuilder.withLogLevel(INFO);
MoPub.initializeSdk(pContext, configBuilder.build(), initSdkListener());
}
private SdkInitializationListener initSdkListener() {
return () -> {
};
}
/* Local Overrides */
/*@Override
public void onBannerLoaded(@NonNull MoPubView moPubView) {
bannerAdsLoaded = true;
}
@Override
public void onBannerFailed(MoPubView moPubView, MoPubErrorCode moPubErrorCode) {
}
@Override
public void onBannerClicked(MoPubView moPubView) {
}
@Override
public void onBannerExpanded(MoPubView moPubView) {
}
@Override
public void onBannerCollapsed(MoPubView moPubView) {
}
/*Local Helper Methods*/
/*private void loadAds(){
mBannerAds.get().setAdUnitId("c122efbe224f46678800d2f73389d258");
mBannerAds.get().loadAd();
}
private boolean isAdvertLoaded(){
return bannerAdsLoaded;
}
/*External Triggers*/
/*public Object onTrigger(List<Object> pData, pluginEnums.eAdManager pEventType) {
if(pEventType.equals(pluginEnums.eAdManager.M_INITIALIZE_BANNER_ADS))
{
loadAds();
}
else if(pEventType.equals(pluginEnums.eAdManager.M_IS_ADVERT_LOADED))
{
return isAdvertLoaded();
}
return null;
}
}
*/

View File

@ -9,14 +9,16 @@ import android.graphics.drawable.Drawable;
import android.graphics.drawable.InsetDrawable;
import android.net.Uri;
import android.os.Handler;
import android.text.Html;
import android.view.Gravity;
import android.view.View;
import android.view.Window;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.RatingBar;
import android.widget.ScrollView;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.constraintlayout.widget.ConstraintLayout;
@ -60,33 +62,28 @@ public class messageManager
}
private void initializeDialog(int pLayout, int pGravity){
mDialog = new Dialog(mContext);
mDialog.getWindow().setGravity(pGravity);
mDialog.getWindow().getAttributes().windowAnimations = R.style.dialiog_animation;
Drawable myDrawable;
Resources res = mContext.getResources();
try {
if(mDialog !=null && mDialog.isShowing()){
mDialog.dismiss();
}
myDrawable = Drawable.createFromXml(res, res.getXml(R.xml.hox_rounded_corner));
mDialog.getWindow().setBackgroundDrawable(myDrawable);
} catch (Exception ignored) {
}
mDialog = new Dialog(mContext);
mDialog.getWindow().setGravity(pGravity);
mDialog.getWindow().getAttributes().windowAnimations = R.style.dialiog_animation;
mDialog.setCancelable(true);
mDialog.setContentView(pLayout);
Drawable myDrawable;
Resources res = mContext.getResources();
try {
myDrawable = Drawable.createFromXml(res, res.getXml(R.xml.hox_rounded_corner));
mDialog.getWindow().setBackgroundDrawable(myDrawable);
} catch (Exception ignored) {
}
ColorDrawable back = new ColorDrawable(Color.TRANSPARENT);
InsetDrawable inset = new InsetDrawable(back, helperMethod.pxFromDp(10),0,helperMethod.pxFromDp(10),0);
mDialog.getWindow().setBackgroundDrawable(inset);
mDialog.getWindow().setLayout(helperMethod.pxFromDp(350), -1);
mDialog.getWindow().setLayout(ConstraintLayout.LayoutParams.MATCH_PARENT, ConstraintLayout.LayoutParams.WRAP_CONTENT);
mDialog.setCancelable(true);
mDialog.setContentView(pLayout);
ColorDrawable back = new ColorDrawable(Color.TRANSPARENT);
InsetDrawable inset = new InsetDrawable(back, helperMethod.pxFromDp(10),0,helperMethod.pxFromDp(10),0);
mDialog.getWindow().setBackgroundDrawable(inset);
mDialog.getWindow().setLayout(helperMethod.pxFromDp(350), -1);
mDialog.getWindow().setLayout(ConstraintLayout.LayoutParams.MATCH_PARENT, ConstraintLayout.LayoutParams.WRAP_CONTENT);
mDialog.show();
}catch (Exception ignored){}
mDialog.show();
}
public messageManager(eventObserver.eventListener event)
@ -100,7 +97,7 @@ public class messageManager
{
initializeDialog(R.layout.popup_language_support, Gravity.CENTER);
// ((TextView) mDialog.findViewById(R.id.pLanguage)).setText((mData.get(0).toString()));
mDialog.findViewById(R.id.pTrigger).setOnClickListener(v -> mDialog.dismiss());
mDialog.findViewById(R.id.pDismiss).setOnClickListener(v -> mDialog.dismiss());
mDialog.setOnDismissListener(dialog -> onClearReference());
}
@ -127,10 +124,10 @@ public class messageManager
private void newIdentityCreated()
{
initializeDialog(R.layout.popup_new_circuit, Gravity.BOTTOM);
final Handler handler = new Handler();
Runnable runnable = () -> mDialog.dismiss();
initializeDialog(R.layout.popup_new_circuit, Gravity.BOTTOM);
mDialog.findViewById(R.id.pTrigger).setOnClickListener(v -> mDialog.dismiss());
mDialog.setOnDismissListener(dialog -> {
@ -144,17 +141,17 @@ public class messageManager
private void mDownloadFailure()
{
mContext.runOnUiThread(() -> {
initializeDialog(R.layout.popup_download_failure, Gravity.BOTTOM);
final Handler handler = new Handler();
Runnable runnable = () -> mDialog.dismiss();
initializeDialog(R.layout.popup_download_failure, Gravity.BOTTOM);
String mMessage;
if(mData == null || mData.get(0) == null || (mData.get(0)).equals("0")){
mMessage = "\"Unknown\"";
}else {
mMessage = (String) mData.get(0);
}
((TextView)mDialog.findViewById(R.id.pDescription)).setText(("Request denied Error " + mMessage));
((TextView)mDialog.findViewById(R.id.pOrbotRowDescription)).setText(("Request denied Error " + mMessage));
mDialog.findViewById(R.id.pTrigger).setOnClickListener(v -> mDialog.dismiss());
mDialog.setOnDismissListener(dialog -> {
@ -169,10 +166,10 @@ public class messageManager
private void popupBlocked()
{
initializeDialog(R.layout.popup_block_popup, Gravity.BOTTOM);
final Handler handler = new Handler();
Runnable runnable = () -> mDialog.dismiss();
initializeDialog(R.layout.popup_block_popup, Gravity.BOTTOM);
mDialog.findViewById(R.id.pOpenPrivacy).setOnClickListener(v -> {
mEvent.invokeObserver(null, M_OPEN_PRIVACY);
mDialog.dismiss();
@ -189,10 +186,10 @@ public class messageManager
private void popupLoadNewTab()
{
initializeDialog(R.layout.popup_load_new_tab, Gravity.BOTTOM);
final Handler handler = new Handler();
Runnable runnable = () -> mDialog.dismiss();
initializeDialog(R.layout.popup_load_new_tab, Gravity.BOTTOM);
mDialog.getWindow().setDimAmount(0.3f);
mDialog.findViewById(R.id.pRestore).setOnClickListener(v -> {
mEvent.invokeObserver(null, M_UNDO_SESSION);
@ -210,10 +207,10 @@ public class messageManager
private void popupUndo()
{
initializeDialog(R.layout.popup_undo, Gravity.BOTTOM);
final Handler handler = new Handler();
Runnable runnable = () -> mDialog.dismiss();
initializeDialog(R.layout.popup_undo, Gravity.BOTTOM);
mDialog.getWindow().setDimAmount(0.3f);
mDialog.findViewById(R.id.pUndo).setOnClickListener(v -> {
mEvent.invokeObserver(null, M_UNDO_TAB);
@ -232,7 +229,37 @@ public class messageManager
private void onShowToast(int mLayout, int mDelay, String mInfo, String mTriggerText, pluginEnums.eMessageManagerCallbacks pCallback)
{
initializeDialog(mLayout, Gravity.BOTTOM);
((TextView)mDialog.findViewById(R.id.pDescription)).setText(mInfo);
((TextView)mDialog.findViewById(R.id.pOrbotRowDescription)).setText(mInfo);
((Button)mDialog.findViewById(R.id.pTrigger)).setText(mTriggerText);
mDialog.getWindow().setDimAmount(0.3f);
final Handler handler = new Handler();
Runnable runnable = () -> mDialog.dismiss();
mDialog.setOnDismissListener(dialog -> {
handler.removeCallbacks(runnable);
onClearReference();
});
mDialog.findViewById(R.id.pTrigger).setOnClickListener(v -> {
if(pCallback == null){
mEvent.invokeObserver(null, M_UNDO_TAB);
mDialog.dismiss();
handler.removeCallbacks(runnable);
}
else {
mDialog.dismiss();
mEvent.invokeObserver(Collections.singletonList(mContext), pCallback);
}
});
handler.postDelayed(runnable, mDelay);
}
private void onShowToastWithCallback(int mLayout, int mDelay, String mInfo, String mTriggerText, pluginEnums.eMessageManagerCallbacks pCallback)
{
initializeDialog(mLayout, Gravity.BOTTOM);
((TextView)mDialog.findViewById(R.id.pOrbotRowDescription)).setText(mInfo);
((Button)mDialog.findViewById(R.id.pTrigger)).setText(mTriggerText);
mDialog.getWindow().setDimAmount(0.3f);
@ -257,10 +284,10 @@ public class messageManager
private void maxTabReached()
{
initializeDialog(R.layout.popup_max_tab, Gravity.BOTTOM);
final Handler handler = new Handler();
Runnable runnable = () -> mDialog.dismiss();
initializeDialog(R.layout.popup_max_tab, Gravity.BOTTOM);
mDialog.getWindow().setDimAmount(0);
mDialog.findViewById(R.id.pTrigger).setOnClickListener(v -> {
mDialog.dismiss();
@ -304,10 +331,10 @@ public class messageManager
private void orbotLoading()
{
initializeDialog(R.layout.popup_orbot_connecting, Gravity.BOTTOM);
final Handler handler = new Handler();
Runnable runnable = () -> mDialog.dismiss();
initializeDialog(R.layout.popup_orbot_connecting, Gravity.BOTTOM);
mDialog.findViewById(R.id.pNext).setOnClickListener(v -> {
mDialog.dismiss();
handler.removeCallbacks(runnable);
@ -323,22 +350,6 @@ public class messageManager
}
private void dataClearedSuccessfully()
{
final Handler handler = new Handler();
Runnable runnable = () -> mDialog.dismiss();
initializeDialog(R.layout.popup_data_cleared, Gravity.BOTTOM);
mDialog.findViewById(R.id.pTrigger).setOnClickListener(v -> mDialog.dismiss());
mDialog.setOnDismissListener(dialog -> {
handler.removeCallbacks(runnable);
onClearReference();
});
handler.postDelayed(runnable, 1500);
}
private void applicationCrashed()
{
initializeDialog(R.layout.application_crash, Gravity.BOTTOM);
@ -346,38 +357,97 @@ public class messageManager
mDialog.setOnDismissListener(dialog -> onClearReference());
}
private void openSecurityInfo()
{
String mInfo = mData.get(0).toString();
initializeDialog(R.layout.certificate_info, Gravity.TOP);
InsetDrawable inset = new InsetDrawable(new ColorDrawable(Color.TRANSPARENT), 0,0,0,-1);
mDialog.getWindow().setBackgroundDrawable(inset);
mDialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
((TextView)mDialog.findViewById(R.id.pCertificateDesciption)).setText(Html.fromHtml((String)mData.get(0)));
mDialog.findViewById(R.id.pCertificateRootBackground).animate().setStartDelay(100).setDuration(400).alpha(1);
if(mInfo.equals("Onion Secured Connection")){
ScrollView mCertificateScrollView = mDialog.findViewById(R.id.pCertificateScrollView);
ViewGroup.LayoutParams params = mCertificateScrollView.getLayoutParams();
params.height = helperMethod.pxFromDp(60);
mCertificateScrollView.requestLayout();
mCertificateScrollView.requestDisallowInterceptTouchEvent(false);
}else {
mDialog.findViewById(R.id.pCertificateRootBlocker).setVisibility(View.GONE);
}
mDialog.findViewById(R.id.pCertificateDesciption).setOnClickListener(v -> {
mDialog.findViewById(R.id.pCertificateRootBackground).animate().setDuration(150).alpha(0);
mDialog.dismiss();
});
mDialog.findViewById(R.id.pCertificateRootBackground).setOnClickListener(v -> {
mDialog.dismiss();
});
mDialog.setOnDismissListener(dialogInterface -> {
mDialog.findViewById(R.id.pCertificateRootBlocker).animate().setDuration(200).alpha(0);
});
}
private void openSecureConnectionPopup()
{
initializeDialog(R.layout.secure_connection_popup, Gravity.TOP);
Window window = mDialog.getWindow();
window.setLayout(ConstraintLayout.LayoutParams.MATCH_PARENT, ConstraintLayout.LayoutParams.WRAP_CONTENT);
ColorDrawable back = new ColorDrawable(Color.TRANSPARENT);
InsetDrawable inset = new InsetDrawable(back, 0,0,0,0);
InsetDrawable inset = new InsetDrawable(new ColorDrawable(Color.TRANSPARENT), 0,0,0,-1);
mDialog.getWindow().setBackgroundDrawable(inset);
mDialog.setCancelable(true);
mDialog.setCanceledOnTouchOutside(true);
mDialog.findViewById(R.id.pTrigger).setOnClickListener(v -> mDialog.dismiss());
mDialog.findViewById(R.id.pNext).setOnClickListener(v -> mEvent.invokeObserver(null, M_SECURE_CONNECTION));
mDialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
mDialog.findViewById(R.id.pSecureRootBlocker).animate().setStartDelay(100).setDuration(400).alpha(1);
((TextView) mDialog.findViewById(R.id.pSecureSubHeader)).setText(helperMethod.getDomainName(mData.get(0).toString().replace("genesishiddentechnologies.com", "genesis.onion")));
mDialog.setOnDismissListener(dialog -> onClearReference());
if((boolean) mData.get(1)){
((SwitchMaterial) mDialog.findViewById(R.id.pJSStatus)).setChecked(true);
((SwitchMaterial) mDialog.findViewById(R.id.pSecureJavascriptStatus)).setChecked(true);
}else {
((SwitchMaterial) mDialog.findViewById(R.id.pJSStatus)).setChecked(false);
((SwitchMaterial) mDialog.findViewById(R.id.pSecureJavascriptStatus)).setChecked(false);
}
if((boolean) mData.get(2)){
((SwitchMaterial) mDialog.findViewById(R.id.pDTStatus)).setChecked(true);
((SwitchMaterial) mDialog.findViewById(R.id.pSecureTrackingStatus)).setChecked(true);
}else {
((SwitchMaterial) mDialog.findViewById(R.id.pDTStatus)).setChecked(false);
((SwitchMaterial) mDialog.findViewById(R.id.pSecureTrackingStatus)).setChecked(false);
}
if((int) mData.get(3) != ContentBlocking.AntiTracking.NONE){
((SwitchMaterial) mDialog.findViewById(R.id.pTPStatus)).setChecked(true);
((SwitchMaterial) mDialog.findViewById(R.id.pSecureTrackingProtectionStatus)).setChecked(true);
}else {
((SwitchMaterial) mDialog.findViewById(R.id.pTPStatus)).setChecked(false);
((SwitchMaterial) mDialog.findViewById(R.id.pSecureTrackingProtectionStatus)).setChecked(false);
}
((TextView) mDialog.findViewById(R.id.pHeaderSubpart)).setText(helperMethod.getDomainName(mData.get(0).toString().replace("genesishiddentechnologies.com", "genesis.onion")));
mDialog.setOnDismissListener(dialog -> onClearReference());
mDialog.findViewById(R.id.pSecureRootBlocker).setOnClickListener(v -> {
mDialog.findViewById(R.id.pSecureRootBlocker).animate().setDuration(150).alpha(0);
mDialog.dismiss();
});
mDialog.findViewById(R.id.pSecureCertificate).setOnClickListener(v -> {
mDialog.findViewById(R.id.pSecureRootBlocker).animate().setDuration(150).alpha(0);
mDialog.dismiss();
new Handler().postDelayed(() ->
{
mEvent.invokeObserver(null, M_SECURITY_INFO);
}, 500);
});
mDialog.findViewById(R.id.pSecurePrivacy).setOnClickListener(v -> {
mDialog.findViewById(R.id.pSecureRootBlocker).animate().setDuration(150).alpha(0);
helperMethod.onDelayHandler(mContext, 250, () -> {
mEvent.invokeObserver(null, M_SECURE_CONNECTION);
mDialog.dismiss();
return null;
});
});
mDialog.setOnDismissListener(dialogInterface -> {
mDialog.findViewById(R.id.pSecureRootBlocker).animate().setDuration(200).alpha(0);
});
}
private void bookmark()
@ -517,7 +587,7 @@ public class messageManager
murl = "https://" + murl;
}
((TextView) mDialog.findViewById(R.id.pDescription)).setText(mData.get(0).toString());
((TextView) mDialog.findViewById(R.id.pOrbotRowDescription)).setText(mData.get(0).toString());
((TextView) mDialog.findViewById(R.id.pDescriptionLong)).setText(murl);
mDialog.findViewById(R.id.pTrigger).setOnClickListener(v -> mDialog.dismiss());
mDialog.findViewById(R.id.pNext).setOnClickListener(v -> {
@ -536,6 +606,7 @@ public class messageManager
private void rateApp()
{
initializeDialog(R.layout.popup_rate_us, Gravity.CENTER);
mDialog.setCancelable(false);
mDialog.findViewById(R.id.pTrigger).setOnClickListener(v -> mDialog.dismiss());
mDialog.findViewById(R.id.pNext).setOnClickListener(v -> {
RatingBar mRatingBar = mDialog.findViewById(R.id.pRating);
@ -572,7 +643,7 @@ public class messageManager
}
initializeDialog(R.layout.popup_file_longpress, Gravity.CENTER);
((TextView) mDialog.findViewById(R.id.pDescription)).setText((title + mData.get(0).toString()));
((TextView) mDialog.findViewById(R.id.pOrbotRowDescription)).setText((title + mData.get(0).toString()));
mEvent.invokeObserver(Arrays.asList(((ImageView) mDialog.findViewById(R.id.pFaviconLogo)), helperMethod.getDomainName(mData.get(0).toString())), enums.etype.fetch_favicon);
mDialog.findViewById(R.id.pTrigger).setOnClickListener(v -> mDialog.dismiss());
mDialog.findViewById(R.id.pOption1).setOnClickListener(v -> {
@ -607,7 +678,7 @@ public class messageManager
String title = mData.get(2).toString();
initializeDialog(R.layout.popup_url_longpress, Gravity.CENTER);
((TextView) mDialog.findViewById(R.id.pDescription)).setText((title + mData.get(0)));
((TextView) mDialog.findViewById(R.id.pOrbotRowDescription)).setText((title + mData.get(0)));
mEvent.invokeObserver(Arrays.asList(((ImageView) mDialog.findViewById(R.id.pFaviconLogo)), helperMethod.getDomainName(mData.get(0).toString())), enums.etype.fetch_favicon);
mDialog.findViewById(R.id.pTrigger).setOnClickListener(v -> mDialog.dismiss());
mDialog.findViewById(R.id.pOption1).setOnClickListener(v -> {
@ -662,7 +733,7 @@ public class messageManager
initializeDialog(R.layout.popup_download_full, Gravity.CENTER);
mEvent.invokeObserver(Arrays.asList(((ImageView) mDialog.findViewById(R.id.pFaviconLogo)), helperMethod.getDomainName(data_local)), enums.etype.fetch_favicon);
((TextView) mDialog.findViewById(R.id.pDescription)).setText((mDescription));
((TextView) mDialog.findViewById(R.id.pOrbotRowDescription)).setText((mDescription));
((TextView) mDialog.findViewById(R.id.pDescriptionShort)).setText((mDescriptionShort));
mDialog.findViewById(R.id.pOption1).setOnClickListener(v -> {
if(mData!=null){
@ -811,11 +882,6 @@ public class messageManager
onPanic();
break;
case M_DATA_CLEARED:
/*VERIFIED*/
dataClearedSuccessfully();
break;
case M_APPLICATION_CRASH:
/*VERIFIED*/
applicationCrashed();
@ -826,6 +892,11 @@ public class messageManager
openSecureConnectionPopup();
break;
case M_SECURITY_INFO:
/*VERIFIED*/
openSecurityInfo();
break;
case M_DOWNLOAD_SINGLE:
/*VERIFIED*/
downloadSingle();
@ -871,6 +942,11 @@ public class messageManager
popupUndo();
break;
case M_DATA_CLEARED:
/*VERIFIED*/
onShowToast(R.layout.popup_data_cleared, 2500, mContext.getString(R.string.ALERT_DISMISS), mContext.getString(R.string.ALERT_DISMISS), null);
break;
case M_DELETE_BOOKMARK:
/*VERIFIED*/
onShowToast(R.layout.popup_toast_generic, 2000, mContext.getString(R.string.HOME_MENU__BOOKMARK_REMOVED), mContext.getString(R.string.ALERT_DISMISS), null);
@ -880,6 +956,11 @@ public class messageManager
/*VERIFIED*/
onShowToast(R.layout.popup_toast_generic, 2000, mContext.getString(R.string.HOME_MENU__BOOKMARK_UPDATE), mContext.getString(R.string.ALERT_DISMISS), null);
break;
case M_IMAGE_UPDATE:
/*VERIFIED*/
onShowToast(R.layout.popup_toast_generic, 4000, mContext.getString(R.string.ALERT_IMAGE_STATUS), mContext.getString(R.string.ALERT_RESTART), M_IMAGE_UPDATE_RESTART);
break;
}
}
}

View File

@ -0,0 +1,49 @@
package com.darkweb.genesissearchengine.pluginManager.orbotPluginManager;
import com.darkweb.genesissearchengine.constants.strings;
import java.util.List;
import static com.darkweb.genesissearchengine.pluginManager.orbotPluginManager.orbotPluginEnums.eLogManager.M_GET_CLEANED_LOGS;
public class orbotLogManager
{
private String onGetCleanedLogs(String pLogs)
{
String logs = pLogs;
if(logs.equals("Starting Genesis | Please Wait ...")){
return logs;
}
if(pLogs.equals("No internet connection")){
return "Warning | " + pLogs;
}
else if(pLogs.startsWith("Invalid Configuration")){
return pLogs;
}
if(!logs.contains("Bootstrapped")){
logs = "Initializing Bootstrap";
}
if(!logs.equals(strings.GENERIC_EMPTY_STR))
{
String Logs = logs;
Logs="Installing | " + Logs.replace("FAILED","Securing");
return Logs;
}
return "Loading Please Wait...";
}
/*External Triggers*/
public Object onTrigger(List<Object> pData, orbotPluginEnums.eLogManager pEventType) {
if(pEventType.equals(M_GET_CLEANED_LOGS))
{
return onGetCleanedLogs((String) pData.get(0));
}
return null;
}
}

View File

@ -1,48 +1,33 @@
package com.darkweb.genesissearchengine.pluginManager.orbotPluginManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Handler;
import android.os.IBinder;
import android.view.View;
import androidx.appcompat.app.AppCompatActivity;
import org.mozilla.gecko.PrefsHelper;
import org.torproject.android.service.OrbotService;
import org.torproject.android.service.util.Prefs;
import org.torproject.android.service.wrapper.orbotLocalConstants;
import java.lang.ref.WeakReference;
import java.util.Collections;
import java.util.List;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.enums;
import com.darkweb.genesissearchengine.constants.keys;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.constants.strings;
import com.darkweb.genesissearchengine.eventObserver;
import com.darkweb.genesissearchengine.helperManager.helperMethod;
import com.darkweb.genesissearchengine.pluginManager.pluginController;
import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.M_APPLICATION_CRASH;
import static android.content.Context.MODE_PRIVATE;
import static com.darkweb.genesissearchengine.pluginManager.orbotPluginManager.orbotPluginEnums.eLogManager.M_GET_CLEANED_LOGS;
import static org.torproject.android.service.TorServiceConstants.ACTION_START;
import static org.torproject.android.service.TorServiceConstants.ACTION_STOP;
// https://github.com/guardianproject/orbot/blob/8fca5f8ecddb4da9565ac3fd8936e4f28acdd352/BUILD.md
public class orbotManager
{
/*Private Variables*/
private WeakReference<AppCompatActivity> mAppContext;
private boolean mLogsStarted = false;
private orbotLogManager mLogManger;
/*Initialization*/
@ -54,237 +39,103 @@ public class orbotManager
public void initialize(AppCompatActivity pAppContext, eventObserver.eventListener pEvent, int pNotificationStatus){
this.mAppContext = new WeakReference(pAppContext);
this.mLogManger = new orbotLogManager();
onInitNotificationStatus(pNotificationStatus);
}
public void onRemoveInstances(){
this.mAppContext = null;
}
private void onStartOrbot(String pBridgeCustomBridge, boolean pBridgeGatewayManual, String pBridgeCustomType, boolean pBridgeStatus, int pShowImages, boolean mClearOnExit, String pBridgesDefault){
private void onInitlizeOrbot(String pBridgeCustomBridge, boolean pBridgeGatewayManual, String pBridgeCustomType, boolean pBridgeStatus, String pBridgesDefault){
orbotLocalConstants.mBridges = pBridgeCustomBridge;
orbotLocalConstants.mIsManualBridge = pBridgeGatewayManual;
orbotLocalConstants.mManualBridgeType = pBridgeCustomType;
orbotLocalConstants.mBridgesDefault = pBridgesDefault;
Prefs.putBridgesEnabled(pBridgeStatus);
bindService();
initializeProxy(pShowImages, mClearOnExit);
onInitailizeService();
}
private void bindService(){
ServiceConnection mServerConn = new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName name, IBinder binder) {
}
@Override
public void onServiceDisconnected(ComponentName name) {
}
};
Intent mServiceIntent = new Intent(mAppContext.get().getApplicationContext(), OrbotService.class);
private void onInitailizeService(){
Intent mServiceIntent = new Intent(mAppContext.get(), OrbotService.class);
mServiceIntent.setAction(ACTION_START);
helperMethod.onDelayHandler(activityContextManager.getInstance().getHomeController(), 3000, () -> {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
mAppContext.get().stopService(mServiceIntent);
mAppContext.get().startForegroundService(mServiceIntent);
}
else
{
mAppContext.get().stopService(mServiceIntent);
mAppContext.get().startService(mServiceIntent);
}
mAppContext.get().bindService(mServiceIntent, mServerConn, Context.BIND_AUTO_CREATE);
return null;
});
Intent startTorIntent = new Intent(mAppContext.get(), OrbotService.class);
startTorIntent.setAction(ACTION_START);
if (mAppContext.get().getPackageName() != null) {
startTorIntent.putExtra(OrbotService.EXTRA_PACKAGE_NAME, mAppContext.get().getPackageName());
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && Prefs.persistNotifications()) {
mAppContext.get().startForegroundService(startTorIntent);
} else {
mAppContext.get().startService(startTorIntent);
}
SharedPreferences settings = mAppContext.get().getSharedPreferences("se", MODE_PRIVATE);
SharedPreferences.Editor editor = settings.edit();
editor.putInt(keys.PROXY_TYPE, 1);
editor.putString(keys.PROXY_SOCKS, constants.CONST_PROXY_SOCKS);
editor.putInt(keys.PROXY_SOCKS_PORT, orbotLocalConstants.mSOCKSPort);
editor.putInt(keys.PROXY_SOCKS_VERSION,constants.CONST_PROXY_SOCKS_VERSION);
editor.putBoolean(keys.PROXY_SOCKS_REMOTE_DNS,constants.CONST_PROXY_SOCKS_REMOTE_DNS);
editor.apply();
}
private void onInitNotificationStatus(int status){
orbotLocalConstants.mNotificationStatus = status;
}
/*Helper Methods*/
private int onGetNotificationStatus(){
return orbotLocalConstants.mNotificationStatus;
public Object onTriggerCommands(List<Object> pData, pluginEnums.eOrbotManager pCommands){
if(pCommands.equals(pluginEnums.eOrbotManager.M_GET_NOTIFICATION_STATUS)){
return orbotLocalConstants.mNotificationStatus;
}
else if(pCommands.equals(pluginEnums.eOrbotManager.M_ENABLE_NOTIFICATION)){
OrbotService.getServiceObject().enableNotification();
}
else if(pCommands.equals(pluginEnums.eOrbotManager.M_DISABLE_NOTIFICATION)){
OrbotService.getServiceObject().disableNotification();
}
else if(pCommands.equals(pluginEnums.eOrbotManager.M_UPDATE_BRIDGES)){
Prefs.putBridgesEnabled((boolean)pData.get(0));
}
else if(pCommands.equals(pluginEnums.eOrbotManager.M_UPDATE_VPN)){
Prefs.putUseVpn((boolean)pData.get(0));
}
else if(pCommands.equals(pluginEnums.eOrbotManager.M_NEW_CIRCUIT)){
if(OrbotService.getServiceObject()!=null){
OrbotService.getServiceObject().newIdentity();
}
}
else if(pCommands.equals(pluginEnums.eOrbotManager.M_GET_ORBOT_STATUS)){
return OrbotService.getServiceObject().getProxyStatus();
}
return null;
}
private void onInitNotificationStatus(int status){
orbotLocalConstants.mNotificationStatus = status;
}
private void onEnableTorNotification(){
OrbotService.getServiceObject().enableNotification();
}
private void onDisableTorNotification(){
OrbotService.getServiceObject().disableNotification();
}
private void onEnableTorNotificationNoBandwidth(){
OrbotService service = OrbotService.getServiceObject();
if(service!=null){
OrbotService.getServiceObject().enableTorNotificationNoBandwidth();
private void onDestroy(boolean pThemeApplying){
if(!pThemeApplying) {
Intent mServiceIntent = new Intent(mAppContext.get(), OrbotService.class);
mServiceIntent.setAction(ACTION_STOP);
mAppContext.get().startService(mServiceIntent);
mAppContext.get().stopService(mServiceIntent);
}
}
private void onUpdateBridges(boolean p_status){
Prefs.putBridgesEnabled(p_status);
}
private void onUpdateVPN(boolean p_status){
Prefs.putUseVpn(p_status);
}
/*Proxy Manager*/
private void onSetProxy(){
PrefsHelper.setPref(keys.PROXY_TYPE, 1);
PrefsHelper.setPref(keys.PROXY_SOCKS,constants.CONST_PROXY_SOCKS);
PrefsHelper.setPref(keys.PROXY_SOCKS_PORT, orbotLocalConstants.mSOCKSPort);
PrefsHelper.setPref(keys.PROXY_SOCKS_VERSION,constants.CONST_PROXY_SOCKS_VERSION);
PrefsHelper.setPref(keys.PROXY_SOCKS_REMOTE_DNS,constants.CONST_PROXY_SOCKS_REMOTE_DNS);
}
private void onRestartProxy(){
bindService();
}
private void initializeProxy(int pShowImages, boolean mClearOnExit)
{
PrefsHelper.setPref(keys.PROXY_CACHE,constants.CONST_PROXY_CACHE);
PrefsHelper.setPref(keys.PROXY_MEMORY,constants.CONST_PROXY_MEMORY);
PrefsHelper.setPref(keys.PROXY_DO_NOT_TRACK_HEADER_ENABLED,constants.CONST_PROXY_DO_NOT_TRACK_HEADER_ENABLED);
PrefsHelper.setPref(keys.PROXY_DO_NOT_TRACK_HEADER_VALUE,constants.CONST_PROXY_DO_NOT_TRACK_HEADER_VALUE);
PrefsHelper.setPref("browser.cache.disk.enable",true);
PrefsHelper.setPref("browser.cache.memory.enable",true);
PrefsHelper.setPref("browser.cache.disk.capacity",1000);
PrefsHelper.setPref("Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0","en-us,en;q=0.5");
PrefsHelper.setPref("browser.display.show_image_placeholders",true);
PrefsHelper.setPref("browser.cache.disk.enable",false);
PrefsHelper.setPref("browser.cache.memory.enable",true);
PrefsHelper.setPref("browser.cache.disk.capacity",0);
PrefsHelper.setPref("privacy.resistFingerprinting",true);
PrefsHelper.setPref("privacy.donottrackheader.enabled",false);
PrefsHelper.setPref("privacy.donottrackheader.value",1);
PrefsHelper.setPref("network.http.sendRefererHeader", 0);
PrefsHelper.setPref("security.OCSP.require", false);
PrefsHelper.setPref("security.checkloaduri",false);
PrefsHelper.setPref("security.mixed_content.block_active_content",false);
PrefsHelper.setPref("security.mixed_content.block_display_content", false);
PrefsHelper.setPref("media.peerconnection.enabled",false); //webrtc disabled
PrefsHelper.setPref("Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0","en-us,en;q=0.5");
PrefsHelper.setPref("browser.cache.disk_cache_ssl",true);
PrefsHelper.setPref("signon.formlessCapture.enabled",true);
PrefsHelper.setPref("signon.storeWhenAutocompleteOff",true);
PrefsHelper.setPref("signon.storeWhenAutocompleteOff",true);
PrefsHelper.setPref("dom.event.contextmenu.enabled",true);
PrefsHelper.setPref("layout.css.visited_links_enabled",true);
PrefsHelper.setPref("security.ssl3.ecdhe_rsa_aes_128_sha",true);
PrefsHelper.setPref("security.ssl3.ecdhe_ecdsa_aes_128_sha",true);
PrefsHelper.setPref("security.ssl3.dhe_rsa_aes_128_sha",true);
PrefsHelper.setPref("security.ssl3.rsa_des_ede3_sha",true);
PrefsHelper.setPref("security.ssl3.dhe_rsa_aes_256_sha",true);
PrefsHelper.setPref("browser.send_pings.require_same_host",false);
PrefsHelper.setPref("webgl.disabled",false);
PrefsHelper.setPref("browser.safebrowsing.blockedURIs.enabled",false);
PrefsHelper.setPref("media.gmp-provider.enabled",false);
PrefsHelper.setPref("browser.send_pings.require_same_host",false);
PrefsHelper.setPref("webgl.disabled",false);
PrefsHelper.setPref("pdfjs.enableWebGL",false);
PrefsHelper.setPref("browser.safebrowsing.malware.enabled",false);
PrefsHelper.setPref("security.csp.experimentalEnabled",false);
PrefsHelper.setPref("network.http.referer.spoofSource",false);
PrefsHelper.setPref("security.OCSP.require",false);
PrefsHelper.setPref("security.ssl.treat_unsafe_negotiation_as_broken", false);
PrefsHelper.setPref("security.ssl.require_safe_negotiation",false);
onUpdatePrivacyPreferences(pShowImages, mClearOnExit);
}
private void onUpdatePrivacyPreferences(int pShowImages, boolean mClearOnExit)
{
PrefsHelper.setPref(keys.PROXY_IMAGE, pShowImages);
PrefsHelper.setPref("privacy.clearOnShutdown.cache",mClearOnExit);
PrefsHelper.setPref("privacy.clearOnShutdown.downloads",mClearOnExit);
PrefsHelper.setPref("privacy.clearOnShutdown.formdata",mClearOnExit);
PrefsHelper.setPref("privacy.clearOnShutdown.history",mClearOnExit);
PrefsHelper.setPref("privacy.clearOnShutdown.offlineApps",mClearOnExit);
PrefsHelper.setPref("privacy.clearOnShutdown.passwords",mClearOnExit);
PrefsHelper.setPref("privacy.clearOnShutdown.sessions",mClearOnExit);
PrefsHelper.setPref("privacy.clearOnShutdown.siteSettings",mClearOnExit);
}
/*Log Manager*/
private String getLogs()
{
String logs = orbotLocalConstants.mTorLogsStatus;
if(logs.equals("Starting Genesis | Please Wait ...")){
return logs;
}
if(orbotLocalConstants.mTorLogsStatus.equals("No internet connection")){
return "Warning | " + orbotLocalConstants.mTorLogsStatus;
}
else if(orbotLocalConstants.mTorLogsStatus.startsWith("Invalid Configuration")){
return orbotLocalConstants.mTorLogsStatus;
}
if(!logs.contains("Bootstrapped") && !mLogsStarted){
logs = "Initializing Bootstrap";
mLogsStarted = true;
}
if(!logs.equals(strings.GENERIC_EMPTY_STR))
{
String Logs = logs;
Logs="Installing | " + Logs.replace("FAILED","Securing");
return Logs;
}
return "Loading Please Wait";
}
private boolean isOrbotRunning(){
return orbotLocalConstants.mIsTorInitialized;
}
private void newCircuit(){
if(OrbotService.getServiceObject()!=null){
OrbotService.getServiceObject().newIdentity();
}
}
private String getOrbotStatus(){
return OrbotService.getServiceObject().getProxyStatus();
}
private void onDestroy(boolean pThemeApplying){
if(pThemeApplying) {
OrbotService.getServiceObject().onDestroy();
}
return (String) mLogManger.onTrigger(Collections.singletonList(orbotLocalConstants.mTorLogsStatus), M_GET_CLEANED_LOGS);
}
/*External Triggers*/
public Object onTrigger(List<Object> pData, pluginEnums.eOrbotManager pEventType) {
if(pEventType.equals(pluginEnums.eOrbotManager.M_GET_NOTIFICATION_STATUS))
if(pEventType.equals(pluginEnums.eOrbotManager.M_GET_NOTIFICATION_STATUS) || pEventType.equals(pluginEnums.eOrbotManager.M_ENABLE_NOTIFICATION) || pEventType.equals(pluginEnums.eOrbotManager.M_DISABLE_NOTIFICATION) || pEventType.equals(pluginEnums.eOrbotManager.M_DISABLE_NOTIFICATION_NO_BANDWIDTH) || pEventType.equals(pluginEnums.eOrbotManager.M_IS_ORBOT_RUNNING) || pEventType.equals(pluginEnums.eOrbotManager.M_GET_ORBOT_STATUS) || pEventType.equals(pluginEnums.eOrbotManager.M_UPDATE_VPN) || pEventType.equals(pluginEnums.eOrbotManager.M_UPDATE_BRIDGES) || pEventType.equals(pluginEnums.eOrbotManager.M_SHOW_NOTIFICATION_STATUS) || pEventType.equals(pluginEnums.eOrbotManager.M_ORBOT_RUNNING) || pEventType.equals(pluginEnums.eOrbotManager.M_NEW_CIRCUIT))
{
return onGetNotificationStatus();
}
else if(pEventType.equals(pluginEnums.eOrbotManager.M_ENABLE_NOTIFICATION))
{
onEnableTorNotification();
}
else if(pEventType.equals(pluginEnums.eOrbotManager.M_DISABLE_NOTIFICATION))
{
onDisableTorNotification();
}
else if(pEventType.equals(pluginEnums.eOrbotManager.M_DISABLE_NOTIFICATION_NO_BANDWIDTH))
{
onEnableTorNotificationNoBandwidth();
return onTriggerCommands(pData, pEventType);
}
else if(pEventType.equals(pluginEnums.eOrbotManager.M_GET_LOGS))
{
@ -292,52 +143,15 @@ public class orbotManager
}
else if(pEventType.equals(pluginEnums.eOrbotManager.M_UPDATE_PRIVACY))
{
onUpdatePrivacyPreferences((int) pData.get(0),(boolean) pData.get(1));
}
else if(pEventType.equals(pluginEnums.eOrbotManager.M_START_ORBOT))
{
onStartOrbot((String) pData.get(0),(boolean) pData.get(1),(String) pData.get(2),(boolean) pData.get(3),(int) pData.get(4),(boolean) pData.get(5),(String) pData.get(6));
}
else if(pEventType.equals(pluginEnums.eOrbotManager.M_IS_ORBOT_RUNNING))
{
isOrbotRunning();
}
else if(pEventType.equals(pluginEnums.eOrbotManager.M_GET_ORBOT_STATUS))
{
return getOrbotStatus();
}
else if(pEventType.equals(pluginEnums.eOrbotManager.M_UPDATE_VPN))
{
onUpdateVPN((boolean)pData.get(0));
}
else if(pEventType.equals(pluginEnums.eOrbotManager.M_UPDATE_BRIDGES))
{
onUpdateBridges((boolean)pData.get(0));
}
else if(pEventType.equals(pluginEnums.eOrbotManager.M_SET_PROXY))
{
onSetProxy();
}
else if(pEventType.equals(pluginEnums.eOrbotManager.M_SHOW_NOTIFICATION_STATUS))
{
onInitNotificationStatus((int)pData.get(0));
}
else if(pEventType.equals(pluginEnums.eOrbotManager.M_ORBOT_RUNNING))
{
return isOrbotRunning();
}
else if(pEventType.equals(pluginEnums.eOrbotManager.M_NEW_CIRCUIT))
{
newCircuit();
onInitlizeOrbot((String) pData.get(0),(boolean) pData.get(1),(String) pData.get(2),(boolean) pData.get(3), (String) pData.get(6));
}
else if(pEventType.equals(pluginEnums.eOrbotManager.M_DESTROY))
{
onDestroy((boolean) pData.get(0));
}
else if(pEventType.equals(pluginEnums.eOrbotManager.M_RESTART_PROXY))
{
onRestartProxy();
}
return null;
}

View File

@ -0,0 +1,13 @@
package com.darkweb.genesissearchengine.pluginManager.orbotPluginManager;
public class orbotPluginEnums
{
/*Orbot Log Manager*/
public enum eLogManager {
M_GET_CLEANED_LOGS
}
public enum eProxyManager {
M_INIT_PROXY, M_INIT_PRIVACY
}
}

View File

@ -1,8 +1,8 @@
package com.darkweb.genesissearchengine.pluginManager;
import android.content.Intent;
import android.os.Handler;
import android.widget.ImageView;
import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
@ -16,32 +16,35 @@ import com.darkweb.genesissearchengine.dataManager.dataController;
import com.darkweb.genesissearchengine.dataManager.dataEnums;
import com.darkweb.genesissearchengine.eventObserver;
import com.darkweb.genesissearchengine.helperManager.helperMethod;
import com.darkweb.genesissearchengine.pluginManager.adPluginManager.adManager;
import com.darkweb.genesissearchengine.pluginManager.adPluginManager.admobManager;
import com.darkweb.genesissearchengine.pluginManager.adPluginManager.facebookAdsManager;
import com.darkweb.genesissearchengine.pluginManager.analyticPluginManager.analyticManager;
import com.darkweb.genesissearchengine.pluginManager.downloadPluginManager.downloadManager;
import com.darkweb.genesissearchengine.pluginManager.langPluginManager.langManager;
import com.darkweb.genesissearchengine.pluginManager.messagePluginManager.messageManager;
import com.darkweb.genesissearchengine.pluginManager.notificationPluginManager.notifictionManager;
import com.darkweb.genesissearchengine.pluginManager.orbotPluginManager.orbotManager;
import com.example.myapplication.R;
import java.lang.ref.WeakReference;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import static com.darkweb.genesissearchengine.constants.enums.etype.fetch_favicon;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eAdManagerCallbacks.M_SHOW_LOADED_ADS;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eAdManagerCallbacks.M_ON_AD_CLICK;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eAdManagerCallbacks.M_ON_AD_LOAD;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eLangManager.M_ACTIVITY_CREATED;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eLangManager.M_RESUME;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.*;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManagerCallbacks.*;
import static org.webrtc.ContextUtils.getApplicationContext;
public class pluginController
{
/*Plugin Instance*/
private adManager mAdManager;
private facebookAdsManager mAdManager;
private com.darkweb.genesissearchengine.pluginManager.analyticPluginManager.analyticManager mAnalyticsManager;
private messageManager mMessageManager;
private notifictionManager mNotificationManager;
@ -74,7 +77,6 @@ public class pluginController
public void onRemoveInstances(){
mHomeController = null;
mOrbotManager.onRemoveInstances();
}
private void instanceObjectInitialization()
@ -83,7 +85,7 @@ public class pluginController
mContextManager = activityContextManager.getInstance();
mNotificationManager = new notifictionManager(mHomeController,new notificationCallback());
mAdManager = new adManager(new admobCallback(), ((homeController)mHomeController.get()).getBannerAd(), status.sPaidStatus, mHomeController.get());
mAdManager = new facebookAdsManager(new admobCallback(), ((homeController)mHomeController.get()).getBannerAd(), mHomeController.get());
mAnalyticsManager = new analyticManager(mHomeController,new analyticCallback(), status.sDeveloperBuild);
mMessageManager = new messageManager(new messageCallback());
mOrbotManager = orbotManager.getInstance();
@ -108,15 +110,19 @@ public class pluginController
@Override
public Object invokeObserver(List<Object> data, Object event_type)
{
if(event_type.equals(M_SHOW_LOADED_ADS))
((homeController)mHomeController.get()).onSetBannerAdMargin();
if(event_type.equals(M_ON_AD_CLICK)){
helperMethod.onMinimizeApp(mHomeController.get());
}
else if(event_type.equals(M_ON_AD_LOAD)){
activityContextManager.getInstance().getHomeController().onUpdateBannerAdvert();
}
return null;
}
}
public Object onAdsInvoke(List<Object> pData, pluginEnums.eAdManager pEventType){
if(mAdManager !=null){
return mAdManager.onTrigger(pData, pEventType);
return mAdManager.onTrigger(pEventType);
}
return null;
}
@ -314,6 +320,24 @@ public class pluginController
else if(pEventType.equals(M_UNDO_TAB)){
activityContextManager.getInstance().getTabController().onRestoreTab(null);
}
else if(pEventType.equals(M_SECURITY_INFO)){
mMessageManager.onTrigger(Arrays.asList(activityContextManager.getInstance().getHomeController().getSecurityInfo(),mHomeController.get()),M_SECURITY_INFO);
}
else if(pEventType.equals(M_IMAGE_UPDATE_RESTART)){
((AppCompatActivity)pData.get(0)).finish();
activityContextManager.getInstance().getSettingController().finish();
activityContextManager.getInstance().getHomeController().quitApplication();
new Thread(){
public void run(){
try {
sleep(500);
android.os.Process.killProcess(android.os.Process.myPid());
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}.start();
}
return null;
}
}

View File

@ -4,10 +4,10 @@ public class pluginEnums
{
/*Advert Manager*/
public enum eAdManager {
M_INITIALIZE_BANNER_ADS, M_IS_ADVERT_LOADED
M_INITIALIZE_BANNER_ADS, M_IS_ADVERT_LOADED, M_DESTROY
}
public enum eAdManagerCallbacks {
M_SHOW_LOADED_ADS
M_ON_AD_CLICK, M_ON_AD_LOAD
}
@ -28,10 +28,10 @@ public class pluginEnums
/*Message Manager*/
public enum eMessageManager{
M_RESET, M_DATA_CLEARED, M_APPLICATION_CRASH, M_DELETE_BOOKMARK, M_UPDATE_BOOKMARK, M_SECURE_CONNECTION, M_POPUP_BLOCKED, M_PANIC, M_MAX_TAB_REACHED, M_ORBOT_LOADING, M_LOAD_NEW_TAB, M_UNDO,M_DOWNLOAD_SINGLE, M_UPDATE_BRIDGES, M_NEW_IDENTITY, M_NOT_SUPPORTED, M_BRIDGE_MAIL, M_LONG_PRESS_WITH_LINK, M_LONG_PRESS_URL, M_LONG_PRESS_DOWNLOAD, M_START_ORBOT, M_DOWNLOAD_FAILURE, M_DOWNLOAD_FILE, M_RATE_APP, M_REPORT_URL, M_CLEAR_BOOKMARK, M_CLEAR_HISTORY, M_BOOKMARK, M_PANIC_RESET, M_OPEN_LOGS, M_RATE_SUCCESS, M_RATE_FAILURE, M_LANGUAGE_SUPPORT_FAILURE, M_WELCOME
M_RESET, M_DATA_CLEARED, M_APPLICATION_CRASH, M_DELETE_BOOKMARK, M_UPDATE_BOOKMARK, M_IMAGE_UPDATE, M_SECURE_CONNECTION, M_SECURITY_INFO, M_POPUP_BLOCKED, M_PANIC, M_MAX_TAB_REACHED, M_ORBOT_LOADING, M_LOAD_NEW_TAB, M_UNDO,M_DOWNLOAD_SINGLE, M_UPDATE_BRIDGES, M_NEW_IDENTITY, M_NOT_SUPPORTED, M_BRIDGE_MAIL, M_LONG_PRESS_WITH_LINK, M_LONG_PRESS_URL, M_LONG_PRESS_DOWNLOAD, M_START_ORBOT, M_DOWNLOAD_FAILURE, M_DOWNLOAD_FILE, M_RATE_APP, M_REPORT_URL, M_CLEAR_BOOKMARK, M_CLEAR_HISTORY, M_BOOKMARK, M_PANIC_RESET, M_OPEN_LOGS, M_RATE_SUCCESS, M_RATE_FAILURE, M_LANGUAGE_SUPPORT_FAILURE, M_WELCOME
}
public enum eMessageManagerCallbacks{
M_CANCEL_WELCOME, M_APP_RATED, M_DOWNLOAD_FILE_MANUAL, M_OPEN_LINK_CURRENT_TAB, M_COPY_LINK, M_REQUEST_BRIDGES, M_SET_BRIDGES, M_OPEN_LINK_NEW_TAB, M_CLEAR_TAB, M_RATE_APPLICATION, M_OPEN_PRIVACY, M_UNDO_SESSION, M_UNDO_TAB, M_CUSTOM_BRIDGE, M_BRIDGE_TYPE
M_CANCEL_WELCOME, M_APP_RATED, M_DOWNLOAD_FILE_MANUAL, M_OPEN_LINK_CURRENT_TAB, M_COPY_LINK, M_REQUEST_BRIDGES, M_SET_BRIDGES, M_OPEN_LINK_NEW_TAB, M_CLEAR_TAB, M_RATE_APPLICATION, M_OPEN_PRIVACY, M_UNDO_SESSION, M_UNDO_TAB, M_CUSTOM_BRIDGE, M_BRIDGE_TYPE, M_DATA_CLEARED_EXTERNAL, M_IMAGE_UPDATE_RESTART
}
/*Download Manager*/

View File

@ -4,7 +4,7 @@
android:fillEnabled="true">
<scale
android:duration="200"
android:duration="150"
android:fromXScale="0.95"
android:fromYScale="0.95"
android:pivotX="50%"
@ -16,6 +16,6 @@
<alpha android:fromAlpha="0"
android:toAlpha="1.0"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="200"
android:duration="100"
android:repeatCount="0"/>
</set>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:fillAfter="true"
android:fillEnabled="true">
<translate
android:duration="200"
android:fromXDelta="0%"
android:fromYDelta="-10%"
android:toXDelta="0%"
android:toYDelta="0%"
/>
<alpha android:fromAlpha="0.0"
android:toAlpha="1.0"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="250"
android:repeatCount="0"/>
</set>

View File

@ -4,7 +4,7 @@
android:fillEnabled="true">
<scale
android:duration="250"
android:duration="150"
android:fromXScale="1"
android:fromYScale="1"
android:pivotX="50%"
@ -16,6 +16,6 @@
<alpha android:fromAlpha="1.0"
android:toAlpha="0.0"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="250"
android:duration="100"
android:repeatCount="0"/>
</set>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:fillAfter="true"
android:fillEnabled="true">
<translate
android:duration="100"
android:fromXDelta="0%"
android:fromYDelta="0%"
android:toXDelta="0%"
android:toYDelta="0%"
/>
<alpha android:fromAlpha="1.0"
android:toAlpha="0.0"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="250"
android:repeatCount="0"/>
</set>

View File

@ -1,8 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromXDelta="-100%"
android:toXDelta="0"
android:interpolator="@android:anim/decelerate_interpolator"
android:duration="250"/>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<scale
android:duration="150"
android:fromXScale="1"
android:fromYScale="1"
android:pivotX="50%"
android:pivotY="50%"
android:toXScale="0.9"
android:toYScale="0.9"
/>
<alpha android:fromAlpha="1"
android:toAlpha="0"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="100"
android:repeatCount="0"/>
</set>

View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:duration="250"
android:fromXDelta="0%"
android:fromYDelta="0%"
android:toXDelta="-100%"
android:toYDelta="0%" />
</set>

View File

@ -1,8 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromXDelta="0"
android:toXDelta="100%"
android:interpolator="@android:anim/decelerate_interpolator"
android:duration="250"/>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<scale
android:duration="150"
android:fromXScale="1.1"
android:fromYScale="1.1"
android:pivotX="50%"
android:pivotY="50%"
android:toXScale="1"
android:toYScale="1"
/>
<alpha android:fromAlpha="0"
android:toAlpha="1.0"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="100"
android:repeatCount="0"/>
</set>

View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:duration="250"
android:fromXDelta="100%"
android:fromYDelta="0%"
android:toXDelta="0%"
android:toYDelta="0%" />
</set>

View File

@ -1,6 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<translate
xmlns:android="http://schemas.android.com/apk/res/android"
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:duration="250"
android:fromXDelta="100%p"
android:toXDelta="0%p"/>
android:fromXDelta="0%"
android:fromYDelta="0%"
android:toXDelta="-100%"
android:toYDelta="0%" />
</set>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:duration="200"
android:fromXDelta="5%"
android:fromYDelta="0%"
android:toXDelta="0%"
android:toYDelta="0%"
/>
<alpha android:fromAlpha="0"
android:toAlpha="1.0"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="200"
android:repeatCount="0"/>
</set>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:duration="200"
android:fromXDelta="-5%"
android:fromYDelta="0%"
android:toXDelta="0%"
android:toYDelta="0%"
/>
<alpha android:fromAlpha="0"
android:toAlpha="1.0"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="200"
android:repeatCount="0"/>
</set>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:duration="200"
android:fromXDelta="0%"
android:fromYDelta="0%"
android:toXDelta="5%"
android:toYDelta="0%"
/>
<alpha android:fromAlpha="1"
android:toAlpha="0"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="200"
android:repeatCount="0"/>
</set>

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
android:duration="200"
android:fromXDelta="0%"
android:fromYDelta="0%"
android:toXDelta="-5%"
android:toYDelta="0%"
/>
<alpha android:fromAlpha="1"
android:toAlpha="0"
android:interpolator="@android:anim/accelerate_interpolator"
android:duration="200"
android:repeatCount="0"/>
</set>

View File

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

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Bottom 2dp Shadow -->
<item>
<shape android:shape="rectangle">
<solid android:color="@color/c_secure_alert_border" />
<corners android:radius="0dp" />
</shape>
</item>
<!-- White Top color -->
<item android:bottom="4dp" android:left="0px" android:right="0px" android:top="0px">
<shape android:shape="rectangle">
<gradient
android:angle="90"
android:endColor="@color/c_secure_alert_start"
android:startColor="@color/c_secure_alert_end"
android:type="linear" />
<corners android:radius="0dp" />
</shape>
</item>
</layer-list>

View File

@ -2,7 +2,7 @@
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
<shortcut
android:shortcutId="Restart"
android:shortcutId="CONST_SHORTCUT_RESTART"
android:enabled="true"
android:icon="@xml/ic_baseline_shortcut_erase_back"
android:shortcutShortLabel="@string/shortcut_open"
@ -11,11 +11,11 @@
android:action="erase"
android:targetPackage="com.darkweb.genesissearchengine.production"
android:targetClass="com.darkweb.genesissearchengine.appManager.externalCommandManager.externalShortcutController">
<extra android:name="shortcut" android:value="open" />
<extra android:name="EXTERNAL_SHORTCUT_COMMAND" android:value="EXTERNAL_SHORTCUT_COMMAND_RESTART" />
</intent>
</shortcut>
<shortcut
android:shortcutId="erase_and_open"
android:shortcutId="CONST_SHORTCUT_ERASE_OPEN"
android:enabled="true"
android:icon="@xml/ic_baseline_shortcut_add_new_back"
android:shortcutShortLabel="@string/shortcut_erase_and_open_short_label"
@ -24,11 +24,11 @@
android:action="erase"
android:targetPackage="com.darkweb.genesissearchengine.production"
android:targetClass="com.darkweb.genesissearchengine.appManager.externalCommandManager.externalShortcutController">
<extra android:name="shortcut" android:value="erase_and_open" />
<extra android:name="EXTERNAL_SHORTCUT_COMMAND" android:value="EXTERNAL_SHORTCUT_COMMAND_ERASE_OPEN" />
</intent>
</shortcut>
<shortcut
android:shortcutId="erase"
android:shortcutId="CONST_SHORTCUT_ERASE"
android:enabled="true"
android:icon="@xml/ic_baseline_shortcut_cross_back"
android:shortcutShortLabel="@string/shortcut_erase_short_label"
@ -37,7 +37,7 @@
android:action="erase"
android:targetPackage="com.darkweb.genesissearchengine.production"
android:targetClass="com.darkweb.genesissearchengine.appManager.externalCommandManager.externalShortcutController">
<extra android:name="shortcut" android:value="erase" />
<extra android:name="EXTERNAL_SHORTCUT_COMMAND" android:value="EXTERNAL_SHORTCUT_COMMAND_ERASE" />
</intent>
</shortcut>
</shortcuts>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:left="0dp" android:right="-5dp" android:top="-5dp" android:bottom="-5dp">
<shape
android:shape="rectangle">
<stroke android:width="4dp" android:color="@color/c_text_short_header" />
<solid android:color="@color/c_orbot_background" />
</shape>
</item>
</layer-list>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -0,0 +1,99 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/pCertificateRootBackground"
android:layout_width="0dp"
android:layout_height="0dp"
android:alpha="0"
android:background="@color/c_secure_alert_background"
android:contentDescription="@string/GENERAL_TODO"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintVertical_weight="1" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/pCertificateRootLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="10dp"
android:background="@xml/ax_round_corner_secure"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/pCertificateRootHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginTop="20dp"
android:paddingStart="5dp"
android:text="@string/ALERT_CERTIFICATE_HEADER"
android:textAlignment="textStart"
android:textColor="@color/green_button"
android:textSize="15sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlSymmetry" />
<ScrollView
android:id="@+id/pCertificateScrollView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
android:paddingTop="10dp"
android:fillViewport="true"
android:paddingBottom="10dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pCertificateRootHeader">
<LinearLayout
android:id="@+id/pCertificateScroll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/pCertificateDesciption"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginEnd="15dp"
android:alpha="0.6"
android:text="@string/GENERAL_TODO"
android:paddingBottom="100dp"
android:textAlignment="textStart"
android:textColor="@color/c_alert_text"
android:textSize="14sp"
android:translationZ="2dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pCertificateRootHeader"
tools:ignore="SmallSp" />
</LinearLayout>
</ScrollView>
<ImageView
android:id="@+id/pCertificateRootBlocker"
android:layout_width="match_parent"
android:layout_height="60dp"
android:clickable="true"
android:contentDescription="@string/GENERAL_TODO"
android:focusable="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,361 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="2000dp">
<ImageView
android:id="@+id/pSecureRootBlocker"
android:layout_width="0dp"
android:layout_height="2000dp"
android:alpha="0"
android:background="@color/c_secure_alert_background"
android:contentDescription="@string/GENERAL_TODO"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pSecureRoot"
app:layout_constraintVertical_weight="1" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/pSecureRoot"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@xml/ax_round_corner_secure"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/pSecureLock"
android:layout_width="18dp"
android:layout_height="18dp"
android:layout_marginStart="14dp"
android:layout_marginTop="15dp"
android:contentDescription="@string/GENERAL_TODO"
android:src="@drawable/onion"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/pSecureHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="12dp"
android:paddingStart="5dp"
android:text="@string/ALERT_SECURE_INFO_HEADER"
android:textAlignment="textStart"
android:textColor="@color/green_button"
android:textSize="15sp"
android:textStyle="bold"
app:layout_constraintStart_toEndOf="@+id/pSecureLock"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlSymmetry" />
<TextView
android:id="@+id/pSecureSubHeader"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="2dp"
android:layout_marginTop="12dp"
android:layout_marginEnd="20dp"
android:alpha="0.8"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/GENERAL_TODO"
android:textAlignment="textStart"
android:textColor="@color/c_alert_text"
android:textSize="15sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintStart_toEndOf="@+id/pSecureHeader"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/pSecureDescription"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="15dp"
android:alpha="0.6"
android:paddingStart="10dp"
android:paddingEnd="10dp"
android:text="@string/ALERT_SECURE_INFO_DETAIL"
android:textAlignment="textStart"
android:textColor="@color/c_alert_text"
android:textSize="14sp"
android:translationZ="2dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pSecureLock"
tools:ignore="SmallSp" />
<LinearLayout
android:id="@+id/pSecureInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:orientation="vertical"
android:paddingStart="5dp"
android:paddingEnd="5dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pSecureDescription">
<LinearLayout
android:id="@+id/pSecureJavascript"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:padding="10dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/pSecureJavasciptHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="0dp"
android:paddingBottom="0dp"
android:text="@string/ALERT_SECURE_INFO_JAVASCRIPT_HEADER"
android:textAlignment="textStart"
android:textColor="@color/c_alert_text"
android:textSize="14sp"
android:translationZ="2dp" />
<TextView
android:id="@+id/pSecureJavasciptDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha="0.6"
android:background="@android:color/transparent"
android:clickable="false"
android:padding="0dp"
android:text="@string/ALERT_SECURE_INFO_JAVASCRIPT_INFO"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="@color/c_alert_text"
android:textSize="12sp"
android:translationZ="2dp"
tools:ignore="RtlSymmetry" />
</LinearLayout>
<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/pSecureJavascriptStatus"
android:layout_width="50dp"
android:layout_height="match_parent"
android:layout_marginStart="10dp"
android:alpha="0.2"
android:clickable="false"
android:contentDescription="@string/GENERAL_TODO"
android:theme="@style/SCBSwitchSecurity" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:alpha="0.8"
android:background="@color/c_security_popup_divider"
app:layout_constraintBottom_toTopOf="@+id/pSecureNavigation"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<LinearLayout
android:id="@+id/pInfoDonottrack"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:padding="10dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/pSecureNonTrackingHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="0dp"
android:paddingBottom="0dp"
android:text="@string/ALERT_SECURE_INFO_NONTRACKING_HEADER"
android:textAlignment="textStart"
android:textColor="@color/c_alert_text"
android:textSize="14sp"
android:translationZ="2dp" />
<TextView
android:id="@+id/pSecureNonTrackingDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha="0.6"
android:background="@android:color/transparent"
android:clickable="false"
android:padding="0dp"
android:text="@string/ALERT_SECURE_INFO_NONTRACKING_INFO"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="@color/c_alert_text"
android:textSize="12sp"
android:translationZ="2dp"
tools:ignore="RtlSymmetry" />
</LinearLayout>
<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/pSecureTrackingStatus"
android:layout_width="50dp"
android:layout_height="match_parent"
android:layout_marginStart="10dp"
android:alpha="0.2"
android:clickable="false"
android:contentDescription="@string/GENERAL_TODO"
android:theme="@style/SCBSwitchSecurity" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:alpha="1"
android:background="@color/c_security_popup_divider"
app:layout_constraintBottom_toTopOf="@+id/pSecureNavigation"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:padding="10dp">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/pSecureTrackingProtectionHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="0dp"
android:paddingBottom="0dp"
android:text="@string/ALERT_SECURE_INFO_TRACKING_HEADER"
android:textAlignment="textStart"
android:textColor="@color/c_alert_text"
android:textSize="14sp"
android:translationZ="2dp" />
<TextView
android:id="@+id/pSecureTrackingProtectionSubHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha="0.6"
android:background="@android:color/transparent"
android:clickable="false"
android:padding="0dp"
android:text="@string/ALERT_SECURE_INFO_TRACKING_INFO"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="@color/c_alert_text"
android:textSize="12sp"
android:translationZ="2dp"
tools:ignore="RtlSymmetry" />
</LinearLayout>
<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/pSecureTrackingProtectionStatus"
android:layout_width="50dp"
android:layout_height="match_parent"
android:layout_marginStart="10dp"
android:alpha="0.2"
android:clickable="false"
android:contentDescription="@string/GENERAL_TODO"
android:theme="@style/SCBSwitchSecurity" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:alpha="1"
android:background="@color/c_view_divier_background"
app:layout_constraintBottom_toTopOf="@+id/pSecureNavigation"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<LinearLayout
android:id="@+id/pSecureNavigation"
android:layout_width="match_parent"
android:layout_height="65dp"
android:layout_marginTop="15dp"
android:layout_marginBottom="200dp"
android:gravity="end"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pSecureInfo">
<Button
android:id="@+id/pSecurePrivacy"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="43dp"
android:layout_marginStart="15dp"
android:layout_marginTop="15dp"
android:layout_marginEnd="15dp"
android:layout_marginBottom="10dp"
android:layout_weight="1"
android:background="@xml/ax_ripple_default_round_bottom_neutral"
android:ellipsize="end"
android:maxLines="1"
android:padding="0dp"
android:paddingStart="10dp"
android:paddingEnd="10dp"
android:text="@string/ALERT_SECURE_INFO_SETTINGS"
android:textAllCaps="false"
android:textColor="@color/c_white"
android:textSize="13.5sp"
android:textStyle="bold" />
<Button
android:id="@+id/pSecureCertificate"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="0dp"
android:layout_height="43dp"
android:layout_marginTop="15dp"
android:layout_marginEnd="15dp"
android:layout_marginBottom="10dp"
android:layout_weight="1"
android:background="@xml/ax_ripple_default_round_bottom_neutral"
android:ellipsize="end"
android:maxLines="1"
android:padding="0dp"
android:paddingStart="15dp"
android:paddingEnd="10dp"
android:text="@string/ALERT_SECURE_INFO_CERTIFICATE"
android:textAllCaps="false"
android:textColor="@color/c_white"
android:textSize="13.5sp"
android:textStyle="bold" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -7,7 +7,7 @@
android:layout_marginBottom="10dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/pMainLayout"
android:id="@+id/pSecureRootLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@xml/ax_round_corner"
@ -16,7 +16,7 @@
app:layout_constraintStart_toStartOf="parent">
<TextView
android:id="@+id/pDescription"
android:id="@+id/pOrbotRowDescription"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="18dp"
@ -49,7 +49,7 @@
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pDescription" />
app:layout_constraintTop_toBottomOf="@+id/pOrbotRowDescription" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="2000dp">
<ImageView
android:id="@+id/pCertificateRootBackground"
android:layout_width="match_parent"
android:layout_height="2000dp"
android:alpha="0"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:background="@color/c_secure_alert_background"
app:layout_constraintTop_toBottomOf="@+id/pCertificateRootLayout"
app:layout_constraintVertical_weight="1"
android:contentDescription="@string/GENERAL_TODO" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/pCertificateRootLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxHeight="450dp"
android:paddingBottom="10dp"
android:background="@xml/ax_round_corner_secure"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/pCertificateRootHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginTop="20dp"
android:paddingStart="5dp"
android:text="@string/ALERT_CERTIFICATE_HEADER"
android:textAlignment="textStart"
android:textColor="@color/green_button"
android:textSize="15sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlSymmetry" />
<ScrollView
android:id="@+id/pCertificateScrollView"
android:layout_width="match_parent"
android:layout_height="450dp"
app:layout_constraintEnd_toEndOf="parent"
android:paddingTop="10dp"
android:fillViewport="true"
android:paddingBottom="10dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pCertificateRootHeader">
<LinearLayout
android:id="@+id/pCertificateScroll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/pCertificateDesciption"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginEnd="15dp"
android:alpha="0.6"
android:text="@string/GENERAL_TODO"
android:paddingBottom="100dp"
android:textAlignment="textStart"
android:textColor="@color/c_alert_text"
android:textSize="13sp"
android:translationZ="2dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pCertificateRootHeader"
tools:ignore="SmallSp" />
</LinearLayout>
</ScrollView>
<ImageView
android:id="@+id/pCertificateRootBlocker"
android:layout_width="match_parent"
android:layout_height="60dp"
android:clickable="true"
android:contentDescription="@string/GENERAL_TODO"
android:focusable="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -9,7 +9,7 @@
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/pMainLayout"
android:id="@+id/pSecureRootLayout"
android:layout_width="match_parent"
android:layout_height="55dp"
android:layout_marginBottom="10dp"
@ -19,7 +19,7 @@
app:layout_constraintStart_toStartOf="parent">
<TextView
android:id="@+id/pDescription"
android:id="@+id/pOrbotRowDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
@ -32,7 +32,7 @@
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="@+id/pMainLayout"
app:layout_constraintStart_toStartOf="@+id/pSecureRootLayout"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="SmallSp" />

View File

@ -7,7 +7,7 @@ android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/pMainLayout"
android:id="@+id/pSecureRootLayout"
android:layout_width="wrap_content"
android:maxWidth="450dp"
android:layout_height="wrap_content"
@ -19,7 +19,7 @@ android:layout_height="match_parent">
app:layout_constraintStart_toStartOf="parent">
<TextView
android:id="@+id/pDescription"
android:id="@+id/pOrbotRowDescription"
android:maxWidth="450dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -52,7 +52,7 @@ android:layout_height="match_parent">
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pDescription" />
app:layout_constraintTop_toBottomOf="@+id/pOrbotRowDescription" />
<Button
android:id="@+id/pTrigger"
@ -69,7 +69,7 @@ android:layout_height="match_parent">
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/pNext"
app:layout_constraintTop_toBottomOf="@+id/pDescription" />
app:layout_constraintTop_toBottomOf="@+id/pOrbotRowDescription" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -9,7 +9,7 @@
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/pMainLayout"
android:id="@+id/pSecureRootLayout"
android:layout_width="match_parent"
android:layout_height="55dp"
android:layout_marginBottom="10dp"
@ -19,7 +19,7 @@
app:layout_constraintStart_toStartOf="parent">
<TextView
android:id="@+id/pDescription"
android:id="@+id/pOrbotRowDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
@ -32,7 +32,7 @@
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="@+id/pMainLayout"
app:layout_constraintStart_toStartOf="@+id/pSecureRootLayout"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="SmallSp" />

View File

@ -9,7 +9,7 @@
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/pMainLayout"
android:id="@+id/pSecureRootLayout"
android:layout_width="match_parent"
android:layout_height="55dp"
android:layout_marginBottom="10dp"
@ -19,7 +19,7 @@
app:layout_constraintStart_toStartOf="parent">
<TextView
android:id="@+id/pDescription"
android:id="@+id/pOrbotRowDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
@ -32,7 +32,7 @@
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="@+id/pMainLayout"
app:layout_constraintStart_toStartOf="@+id/pSecureRootLayout"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="SmallSp" />

View File

@ -7,7 +7,7 @@
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/pMainLayout"
android:id="@+id/pSecureRootLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@xml/ax_round_corner"
@ -18,7 +18,7 @@
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/pDescription"
android:id="@+id/pOrbotRowDescription"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="18dp"
@ -60,7 +60,7 @@
android:textSize="13sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pDescription" />
app:layout_constraintTop_toBottomOf="@+id/pOrbotRowDescription" />
<TextView
android:id="@+id/pURL"

View File

@ -9,17 +9,17 @@
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/pMainLayout"
android:id="@+id/pSecureRootLayout"
android:layout_width="match_parent"
android:layout_height="55dp"
android:layout_marginBottom="10dp"
android:layout_marginBottom="15dp"
android:background="@xml/ax_toast_alert_background"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<TextView
android:id="@+id/pDescription"
android:id="@+id/pOrbotRowDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
@ -32,7 +32,7 @@
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="@+id/pMainLayout"
app:layout_constraintStart_toStartOf="@+id/pSecureRootLayout"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="SmallSp" />

View File

@ -5,21 +5,24 @@
android:id="@+id/pToastLayoutRoot"
android:translationZ="5dp"
xmlns:tools="http://schemas.android.com/tools"
android:background="@color/c_background_alpha"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/pMainLayout"
android:id="@+id/pTDialog"
android:layout_width="match_parent"
android:layout_height="55dp"
android:layout_marginBottom="10dp"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:layout_marginBottom="15dp"
android:background="@xml/ax_toast_alert_background"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<TextView
android:id="@+id/pDescription"
android:id="@+id/pTDDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
@ -32,17 +35,18 @@
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="@+id/pMainLayout"
app:layout_constraintStart_toStartOf="@+id/pTDialog"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="SmallSp" />
<Button
android:id="@+id/pOpenPrivacy"
android:id="@+id/pTDDismiss"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
android:layout_marginBottom="10dp"
android:onClick="onUITrigger"
android:layout_weight="1"
android:background="@xml/ax_toast_alert_button"
android:padding="0dp"
@ -55,16 +59,17 @@
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent"
tools:ignore="UsingOnClickInXml" />
<View
android:id="@+id/view6"
android:id="@+id/pTDDivider"
android:layout_width="1dp"
android:layout_height="30dp"
android:layout_marginEnd="10dp"
android:background="@color/c_alert_divider"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/pOpenPrivacy"
app:layout_constraintEnd_toStartOf="@+id/pTDDismiss"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -9,7 +9,7 @@
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/pMainLayout"
android:id="@+id/pSecureRootLayout"
android:layout_width="match_parent"
android:layout_height="55dp"
android:layout_marginBottom="10dp"
@ -19,7 +19,7 @@
app:layout_constraintStart_toStartOf="parent">
<TextView
android:id="@+id/pDescription"
android:id="@+id/pOrbotRowDescription"
android:layout_width="0dp"
app:layout_constraintHorizontal_weight="1"
android:layout_height="wrap_content"
@ -37,7 +37,7 @@
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/view6"
app:layout_constraintStart_toStartOf="@+id/pMainLayout"
app:layout_constraintStart_toStartOf="@+id/pSecureRootLayout"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="SmallSp" />

View File

@ -7,7 +7,7 @@
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/pMainLayout"
android:id="@+id/pSecureRootLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@xml/ax_round_corner"
@ -41,7 +41,7 @@
</androidx.cardview.widget.CardView>
<TextView
android:id="@+id/pDescription"
android:id="@+id/pOrbotRowDescription"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="11dp"
@ -77,7 +77,7 @@
android:translationY="-1dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/cardView2"
app:layout_constraintTop_toBottomOf="@+id/pDescription"
app:layout_constraintTop_toBottomOf="@+id/pOrbotRowDescription"
tools:ignore="SmallSp" />
<View
@ -145,7 +145,7 @@
android:background="@color/c_view_divier_background"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pDescription" />
app:layout_constraintTop_toBottomOf="@+id/pOrbotRowDescription" />
<LinearLayout
android:id="@+id/pOption2"
@ -192,7 +192,7 @@
android:background="@color/c_view_divier_background"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pDescription" />
app:layout_constraintTop_toBottomOf="@+id/pOrbotRowDescription" />
<LinearLayout
android:id="@+id/pOption3"
@ -239,7 +239,7 @@
android:background="@color/c_view_divier_background"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pDescription" />
app:layout_constraintTop_toBottomOf="@+id/pOrbotRowDescription" />
<LinearLayout
android:id="@+id/pOption4"
@ -288,7 +288,7 @@
android:background="@color/c_view_divier_background"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pDescription" />
app:layout_constraintTop_toBottomOf="@+id/pOrbotRowDescription" />
<LinearLayout
android:id="@+id/pOption5"
@ -337,7 +337,7 @@
android:background="@color/c_view_divier_background"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pDescription" />
app:layout_constraintTop_toBottomOf="@+id/pOrbotRowDescription" />
<LinearLayout
android:id="@+id/pOption6"
@ -386,7 +386,7 @@
android:background="@color/c_view_divier_background"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pDescription" />
app:layout_constraintTop_toBottomOf="@+id/pOrbotRowDescription" />
<LinearLayout
android:id="@+id/pOption7"

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