Bug Fixes

Bug Fixes
master
msmannan00 2021-04-18 13:37:16 +05:00
parent d6c0708814
commit 475d8c7e4a
70 changed files with 1053 additions and 1331 deletions

View File

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

View File

@ -6,6 +6,10 @@
<inspection_tool class="BooleanMethodIsAlwaysInverted" 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="BusyWait" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CollectionAddAllCanBeReplacedWithConstructor" 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="EmptyStatementBody" enabled="false" level="WARNING" enabled_by_default="false"> <inspection_tool class="EmptyStatementBody" enabled="false" level="WARNING" enabled_by_default="false">
<option name="m_reportEmptyBlocks" value="true" /> <option name="m_reportEmptyBlocks" value="true" />
</inspection_tool> </inspection_tool>

View File

@ -1,6 +1,5 @@
apply plugin: 'com.android.application'
apply from: 'variables.gradle' apply from: 'variables.gradle'
apply plugin: 'com.android.application'
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
apply plugin: 'com.google.gms.google-services' apply plugin: 'com.google.gms.google-services'
apply plugin: 'kotlin-android' apply plugin: 'kotlin-android'
@ -12,8 +11,8 @@ ext {
repositories { repositories {
maven { maven {
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } maven { url project.ext.url_snapshot }
url "https://maven.mozilla.org/maven2/" url project.ext.url
mavenLocal() mavenLocal()
mavenCentral() mavenCentral()
google() google()
@ -22,19 +21,19 @@ repositories {
} }
android { android {
compileSdkVersion project.ext.compileSdkVersion compileSdkVersion project.ext.compile_sdk_version
ndkVersion "21.4.7075529" ndkVersion project.ext.ndk_version
defaultConfig { defaultConfig {
applicationId project.ext.applicationId applicationId project.ext.application_id
minSdkVersion project.ext.minSdkVersion minSdkVersion project.ext.min_sdk_version
targetSdkVersion project.ext.targetSdkVersion targetSdkVersion project.ext.target_sdk_version
versionCode project.ext.versionCode versionCode project.ext.version_code
versionName project.ext.versionName versionName project.ext.version_name
} }
buildToolsVersion '29.0.3' buildToolsVersion project.ext.build_tool_version
flavorDimensions "abi" flavorDimensions project.ext.dimen
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_1_8
@ -45,164 +44,103 @@ android {
flavorDimensions project.ext.dimen flavorDimensions project.ext.dimen
productFlavors { productFlavors {
arm { arm {
dimension "abi" versionCode project.ext.arm_vcode
ndk { versionName project.ext.arm_vname
ndk.abiFilters 'armeabi-v7a','arm64-v8a', 'x86', 'x86_64' dimension project.ext.dimen
}
} }
aarch64 { aarch64 {
dimension "abi" versionCode project.ext.aarch_vcode
ndk { versionName project.ext.aarch_vname
ndk.abiFilters 'armeabi-v7a','arm64-v8a', 'x86', 'x86_64' dimension project.ext.dimen
}
} }
x86 { x86 {
dimension "abi" versionCode project.ext.x86_vcode
ndk { versionName project.ext.x86_vname
ndk.abiFilters 'armeabi-v7a','arm64-v8a', 'x86', 'x86_64' dimension project.ext.dimen
}
} }
x86_64 { x86_64 {
dimension "abi" versionCode project.ext.x64_vcode
ndk { versionName project.ext.x64_vname
ndk.abiFilters 'armeabi-v7a','arm64-v8a', 'x86', 'x86_64' dimension project.ext.dimen
}
} }
} }
sourceSets { sourceSets {
main { main {
res.srcDirs = res.srcDirs = project.ext.resource_directories
[
'src/main/res/layouts/history',
'src/main/res/layouts/help',
'src/main/res/layouts/tab',
'src/main/res/layouts/language',
'src/main/res/layouts/orbot',
'src/main/res/layouts/proxyStatus',
'src/main/res/layouts/orbotLog',
'src/main/res/layouts/setting',
'src/main/res/layouts/bridge',
'src/main/res/layouts/log',
'src/main/res/layouts/landing',
'src/main/res/layouts/alert',
'src/main/res/layouts/bookmark',
'src/main/res/layouts/shared',
'src/main/res/layouts/shared/listviews',
'src/main/res/layouts/searchWidget',
'src/main/res/layouts/home',
'src/main/res/custom-xml/alert',
'src/main/res/custom-xml/tab',
'src/main/res/custom-xml/images',
'src/main/res/custom-xml/bookmark',
'src/main/res/custom-xml/generic',
'src/main/res/custom-xml/history',
'src/main/res/custom-xml/home',
'src/main/res/custom-xml/landing',
'src/main/res/custom-xml/orbot',
'src/main/res/custom-xml/orbot_log',
'src/main/res/custom-xml/setting',
'src/main/res/layouts',
'src/main/res/images',
'src/main/res'
]
} }
} }
buildTypes { buildTypes {
release { release {
minifyEnabled true minifyEnabled project.ext.minifyEnabled
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile(project.ext.proguard_file), project.ext.proguard_rule
} }
} }
lintOptions { lintOptions {
checkReleaseBuilds false checkReleaseBuilds project.ext.checkReleaseBuilds
// Or, if you prefer, you can continue to check for errors in release builds, abortOnError project.ext.abortOnError
// but continue the build even when errors are found:
abortOnError false
} }
} }
dependencies { dependencies {
/* Android Support Repository dependencies */
// Android Support Repository dependencies
androidTestImplementation 'junit:junit:4.13.2'
implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.preference:preference:1.1.1' implementation 'androidx.preference:preference-ktx:1.1.1'
implementation 'androidx.preference:preference:1.1.1'
implementation 'androidx.legacy:legacy-preference-v14:1.0.0' implementation 'androidx.legacy:legacy-preference-v14:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0' implementation 'androidx.recyclerview:recyclerview:1.2.0'
implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0' implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
implementation 'com.google.firebase:firebase-messaging:21.0.1' implementation 'com.google.firebase:firebase-messaging:21.1.0'
// Testing-only dependencies /* Default Libraries */
androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0') {
exclude group: 'com.android.support', module: 'support-annotations'
}
/*Default Libraries*/
implementation 'androidx.constraintlayout:constraintlayout:2.0.4' implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4' implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4' implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.google.android.material:material:1.4.0-alpha02' implementation 'com.google.android.material:material:1.4.0-alpha02'
implementation 'androidx.preference:preference:1.1.1' implementation 'androidx.preference:preference-ktx:1.1.1'
implementation 'com.google.android.material:material:1.3.0' implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.4.31' implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2'
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.4.32'
/*Firefox ABI Splits*/ /* Firefox ABI Splits */
implementation "org.mozilla.components:browser-engine-gecko:$mozilla_components_version"
implementation "org.mozilla.components:browser-icons:$mozilla_components_icon_version"
implementation "org.mozilla.geckoview:geckoview:$gecko_nightly_version"
/*Alert Dialog*/ implementation "org.mozilla.components:browser-engine-gecko:73.0.8"
implementation 'com.crowdfire.cfalertdialog:cfalertdialog:1.1.0' implementation "org.mozilla.components:browser-icons:73.0.9"
implementation "org.mozilla.geckoview:geckoview:87.0.20210318103112"
/*Ads Manager*/
implementation 'com.google.android.gms:play-services-ads:19.8.0'
/*Crashlytics*/
implementation 'com.flurry.android:analytics:12.4.0@aar'
/*View Animator*/
implementation 'com.daimajia.easing:library:2.4@aar'
implementation 'com.daimajia.androidanimations:library:2.4@aar'
/*Orbot Service*/
implementation project(path: ':orbotservice')
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.github.apl-devs:appintro:v4.2.2'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.6'
/*Helper Libraries*/
implementation 'com.chauthai.overscroll:overscroll-bouncy:0.1.1'
implementation 'jp.wasabeef:recyclerview-animators:2.2.7'
implementation 'com.android.support:design:28.0.0'
implementation "org.mozilla.components:browser-icons:9.0.0"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:0.30.1'
implementation 'com.android.volley:volley:1.2.0'
implementation 'com.github.gabrielemariotti.recyclerview:recyclerview-animators:0.3.0-SNAPSHOT@aar'
implementation 'com.github.instacart.truetime-android:library-extension-rx:3.3'
/*Image Cache Libraries*/
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
implementation 'com.github.intelligo-systems:slight:1.1.3'
implementation "org.mozilla.components:concept-fetch:73.0.9" implementation "org.mozilla.components:concept-fetch:73.0.9"
implementation "org.mozilla.components:concept-base:73.0.9" implementation "org.mozilla.components:concept-base:73.0.9"
implementation 'com.coolerfall:android-http-download-manager:1.6.3' implementation 'com.coolerfall:android-http-download-manager:1.6.3'
implementation "org.mozilla.components:support-utils:73.0.9" implementation "org.mozilla.components:support-utils:73.0.9"
/*Crashlytics*/
implementation 'com.flurry.android:analytics:12.4.0@aar'
/* Ads Manager */
implementation 'com.google.android.gms:play-services-ads:20.0.0'
/* Orbot Service */
implementation project(path: ':orbotservice')
/* Helper Libraries */
implementation 'com.github.intelligo-systems:slight:1.1.3'
implementation 'jp.wasabeef:recyclerview-animators:2.2.7'
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 files('libs\\httpclientandroidlib-1.2.1.jar')
} }
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

Binary file not shown.

View File

@ -11,6 +11,7 @@
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.READ_CLIPBOARD" /> <uses-permission android:name="android.permission.READ_CLIPBOARD" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.VIBRATE" /> <uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" /> <uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />

View File

@ -1,5 +1,7 @@
package com.darkweb.genesissearchengine.appManager; package com.darkweb.genesissearchengine.appManager;
import android.content.Context;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkController; import com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkController;
import com.darkweb.genesissearchengine.appManager.bridgeManager.bridgeController; import com.darkweb.genesissearchengine.appManager.bridgeManager.bridgeController;
@ -9,7 +11,6 @@ import com.darkweb.genesissearchengine.appManager.orbotLogManager.orbotLogContro
import com.darkweb.genesissearchengine.appManager.settingManager.generalManager.settingGeneralController; import com.darkweb.genesissearchengine.appManager.settingManager.generalManager.settingGeneralController;
import com.darkweb.genesissearchengine.appManager.settingManager.settingHomePage.settingHomeController; import com.darkweb.genesissearchengine.appManager.settingManager.settingHomePage.settingHomeController;
import com.darkweb.genesissearchengine.appManager.tabManager.tabController; import com.darkweb.genesissearchengine.appManager.tabManager.tabController;
import java.lang.ref.WeakReference; import java.lang.ref.WeakReference;
import java.util.ArrayList; import java.util.ArrayList;
@ -33,6 +34,7 @@ public class activityContextManager
private WeakReference<settingHomeController> pSettingController; private WeakReference<settingHomeController> pSettingController;
private WeakReference<settingGeneralController> pSettingGeneralController; private WeakReference<settingGeneralController> pSettingGeneralController;
private WeakReference<orbotLogController> pOrbotLogController; private WeakReference<orbotLogController> pOrbotLogController;
private WeakReference<Context> pApplicationContext;
private ArrayList<WeakReference<AppCompatActivity>> mStackList; private ArrayList<WeakReference<AppCompatActivity>> mStackList;
/*Initialization*/ /*Initialization*/
@ -79,6 +81,15 @@ public class activityContextManager
} }
return pHomeController.get(); return pHomeController.get();
} }
public void setApplicationContext(Context pContext){
this.pApplicationContext = new WeakReference(pContext);
}
public Context getApplicationController(){
return pApplicationContext.get();
}
public void setHomeController(homeController home_controller){ public void setHomeController(homeController home_controller){
this.pHomeController = new WeakReference(home_controller); this.pHomeController = new WeakReference(home_controller);
} }

View File

@ -111,31 +111,25 @@ public class bookmarkAdapter extends RecyclerView.Adapter<bookmarkAdapter.listVi
mEvent.invokeObserver(Collections.singletonList(m_counter_inner),enums.etype.is_empty); mEvent.invokeObserver(Collections.singletonList(m_counter_inner),enums.etype.is_empty);
boolean mDateVerify = false; boolean mDateVerify = false;
if(mCurrentList.size()>0 && mCurrentList.get(m_counter_inner-1).getDescription()==null && (mCurrentList.size()>m_counter_inner+1 && mCurrentList.get(m_counter_inner+1).getDescription()==null || mCurrentList.size()==m_counter_inner+1)){ if(mCurrentList.size()>0 && mCurrentList.size()<m_counter_inner+1 && mCurrentList.get(m_counter_inner-1).getDescription()==null && (mCurrentList.size()>m_counter_inner+1 && mCurrentList.get(m_counter_inner+1).getDescription()==null || mCurrentList.size()==m_counter_inner+1)){
mDateVerify = true; mDateVerify = true;
} }
if(m_counter_inner==0){
notifyDataSetChanged();
}else {
if(mDateVerify){ if(mDateVerify){
notifyItemRemoved(m_counter_inner-1); notifyItemRemoved(m_counter_inner-1);
mCurrentList.remove(m_counter_inner-1); mCurrentList.remove(m_counter_inner-1);
//notifyItemRemoved(m_counter_inner-1);
//mCurrentList.remove(m_counter_inner-1);
notifyItemRangeChanged(m_counter_inner-1, mCurrentList.size()); notifyItemRangeChanged(m_counter_inner-1, mCurrentList.size());
}else { }else {
notifyItemRemoved(m_counter_inner); notifyItemRemoved(m_counter_inner);
mCurrentList.remove(m_counter_inner); mCurrentList.remove(m_counter_inner);
notifyItemRangeChanged(m_counter_inner, mCurrentList.size()); notifyItemRangeChanged(m_counter_inner, mCurrentList.size());
} }
}
break; break;
} }
} }
} }
clearLongSelectedURL(); clearLongSelectedURL();
initializeModelWithDate(false);
} }
private void clearLongSelectedURL(){ private void clearLongSelectedURL(){
@ -322,7 +316,6 @@ public class bookmarkAdapter extends RecyclerView.Adapter<bookmarkAdapter.listVi
mPopupWindow.dismiss(); mPopupWindow.dismiss();
} }
else if(v.getId() == R.id.pMenuDelete){ else if(v.getId() == R.id.pMenuDelete){
initializeModelWithDate(false);
onClose(pPosition); onClose(pPosition);
invokeFilter(true); invokeFilter(true);
mPopupWindow.dismiss(); mPopupWindow.dismiss();
@ -339,7 +332,6 @@ public class bookmarkAdapter extends RecyclerView.Adapter<bookmarkAdapter.listVi
private void onClose(int pIndex){ private void onClose(int pIndex){
mEvent.invokeObserver(Collections.singletonList(mRealIndex.get(pIndex)),enums.etype.url_clear); mEvent.invokeObserver(Collections.singletonList(mRealIndex.get(pIndex)),enums.etype.url_clear);
mEvent.invokeObserver(Collections.singletonList(mRealID.get(pIndex)),enums.etype.url_clear_at); mEvent.invokeObserver(Collections.singletonList(mRealID.get(pIndex)),enums.etype.url_clear_at);
invokeFilter(false);
mEvent.invokeObserver(Collections.singletonList(mRealID.get(pIndex)),enums.etype.is_empty); mEvent.invokeObserver(Collections.singletonList(mRealID.get(pIndex)),enums.etype.is_empty);
boolean mDateVerify = false; boolean mDateVerify = false;
if(mPassedList.size()>0){ if(mPassedList.size()>0){
@ -348,22 +340,20 @@ public class bookmarkAdapter extends RecyclerView.Adapter<bookmarkAdapter.listVi
} }
}else { }else {
mCurrentList.clear(); mCurrentList.clear();
//notifyDataSetChanged();
return; return;
} }
int size = mCurrentList.size(); int size = mCurrentList.size();
if(mDateVerify){ if(mDateVerify){
notifyItemRemoved(pIndex);
mCurrentList.remove(pIndex); mCurrentList.remove(pIndex);
notifyItemRemoved(pIndex);
notifyItemRangeChanged(pIndex, mCurrentList.size()); notifyItemRangeChanged(pIndex, mCurrentList.size());
}else { }else {
mCurrentList.remove(pIndex); mCurrentList.remove(pIndex);
notifyItemRemoved(pIndex); notifyItemRemoved(pIndex);
notifyItemRangeChanged(pIndex, mCurrentList.size());
notifyItemChanged(mCurrentList.size()-1); notifyItemChanged(mCurrentList.size()-1);
} }
initializeModelWithDate(false);
} }
/*View Holder Extensions*/ /*View Holder Extensions*/
@ -429,6 +419,9 @@ public class bookmarkAdapter extends RecyclerView.Adapter<bookmarkAdapter.listVi
String header = model.getHeader(); String header = model.getHeader();
mDescription.setText(("https://"+model.getDescription())); mDescription.setText(("https://"+model.getDescription()));
if(model.getDescription().contains("boogle.store") || model.getDescription().contains("genesis.onion")){
mFaviconLogo.setImageDrawable(itemView.getResources().getDrawable(R.drawable.genesis));
}else{
new Thread(){ new Thread(){
public void run(){ public void run(){
try { try {
@ -448,16 +441,14 @@ public class bookmarkAdapter extends RecyclerView.Adapter<bookmarkAdapter.listVi
} }
mContext.runOnUiThread(() -> { mContext.runOnUiThread(() -> {
Bitmap mBitmap = helperMethod.drawableToBitmap(mHindTypeIconTemp.getDrawable()); Bitmap mBitmap = helperMethod.drawableToBitmap(mHindTypeIconTemp.getDrawable());
ByteArrayOutputStream out = new ByteArrayOutputStream(); mFaviconLogo.setImageBitmap(mBitmap);
mBitmap.compress(Bitmap.CompressFormat.PNG, 20, out);
Bitmap decoded = BitmapFactory.decodeStream(new ByteArrayInputStream(out.toByteArray()));
mFaviconLogo.setImageBitmap(decoded);
}); });
} catch (InterruptedException e) { } catch (InterruptedException e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
}.start(); }.start();
}
setItemViewOnClickListener(mRowContainer, mRowMenu, mDescription.getText().toString(), p_position, header, mRowMenu, mLogoImage, model.getID(), model.getDate()); setItemViewOnClickListener(mRowContainer, mRowMenu, mDescription.getText().toString(), p_position, header, mRowMenu, mLogoImage, model.getID(), model.getDate());
} }
@ -484,11 +475,6 @@ public class bookmarkAdapter extends RecyclerView.Adapter<bookmarkAdapter.listVi
void invokeFilter(boolean notify){ void invokeFilter(boolean notify){
if(notify){ if(notify){
if(mFilter.length()>0){
initializeModelWithDate(true);
}else {
initializeModelWithDate(false);
}
notifyDataSetChanged(); notifyDataSetChanged();
} }
} }

View File

@ -77,16 +77,16 @@ public class bookmarkAdapterView
pItemView.setPressed(false); pItemView.setPressed(false);
int speed = 150; int speed = 150;
if(pIsForced){ if(pIsForced){
speed=0; speed=150;
} }
if(pVibrate){ if(pVibrate){
helperMethod.vibrate(mContext); helperMethod.vibrate(mContext);
} }
pLogoImage.setAlpha(0.5f); pLogoImage.setAlpha(0f);
pLogoImage.setVisibility(View.VISIBLE); pLogoImage.setVisibility(View.VISIBLE);
pLogoImage.animate().cancel(); pLogoImage.animate().cancel();
pLogoImage.animate().setDuration(speed).alpha(1); pLogoImage.animate().setDuration(speed).alpha(0.95f);
} }
public void onClearHighlight( View pItemView, View pMenuItem, ImageView pLogoImage, boolean pIsForced) public void onClearHighlight( View pItemView, View pMenuItem, ImageView pLogoImage, boolean pIsForced)

View File

@ -23,6 +23,7 @@ import androidx.recyclerview.widget.ItemTouchHelper;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.darkweb.genesissearchengine.appManager.activityContextManager; import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.historyManager.historyEnums;
import com.darkweb.genesissearchengine.databaseManager.databaseController; import com.darkweb.genesissearchengine.databaseManager.databaseController;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.editTextManager; import com.darkweb.genesissearchengine.appManager.homeManager.homeController.editTextManager;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController; import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
@ -45,6 +46,8 @@ import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import static com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkEnums.eBookmarkViewCommands.M_VERTIFY_SELECTION_MENU; import static com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkEnums.eBookmarkViewCommands.M_VERTIFY_SELECTION_MENU;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.M_CLEAR_BOOKMARK;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.M_CLEAR_HISTORY;
public class bookmarkController extends AppCompatActivity public class bookmarkController extends AppCompatActivity
@ -125,6 +128,10 @@ public class bookmarkController extends AppCompatActivity
mSearchInput.setEventHandler(new edittextManagerCallback()); mSearchInput.setEventHandler(new edittextManagerCallback());
mClearButton.setOnClickListener(v -> {
pluginController.getInstance().onMessageManagerInvoke(Arrays.asList(strings.GENERIC_EMPTY_STR, this), M_CLEAR_BOOKMARK);
});
mSearchInput.setOnEditorActionListener((v, actionId, event) ->{ mSearchInput.setOnEditorActionListener((v, actionId, event) ->{
if (actionId == EditorInfo.IME_ACTION_NEXT) if (actionId == EditorInfo.IME_ACTION_NEXT)
{ {
@ -325,7 +332,7 @@ public class bookmarkController extends AppCompatActivity
((bookmarkAdapter) Objects.requireNonNull(mRecycleView.getAdapter())).invokeFilter(true ); ((bookmarkAdapter) Objects.requireNonNull(mRecycleView.getAdapter())).invokeFilter(true );
mbookmarkViewController.onTrigger(bookmarkEnums.eBookmarkViewCommands.M_CLEAR_LIST, null); mbookmarkViewController.onTrigger(bookmarkEnums.eBookmarkViewCommands.M_CLEAR_LIST, null);
databaseController.getInstance().execSQL(sql.SQL_CLEAR_BOOKMARK,null); databaseController.getInstance().execSQL(sql.SQL_CLEAR_BOOKMARK,null);
finish(); mRecycleView.setAlpha(0);
} }
public class edittextManagerCallback implements eventObserver.eventListener { public class edittextManagerCallback implements eventObserver.eventListener {
@ -334,8 +341,7 @@ public class bookmarkController extends AppCompatActivity
public Object invokeObserver(List<Object> data, Object e_type) { public Object invokeObserver(List<Object> data, Object e_type) {
if(e_type.equals(enums.etype.ON_KEYBOARD_CLOSE)){ if(e_type.equals(enums.etype.ON_KEYBOARD_CLOSE)){
onHideSearch(null); onBackPressed();
onClearMultipleSelection(null);
} }
return null; return null;
} }
@ -363,6 +369,9 @@ public class bookmarkController extends AppCompatActivity
else if(e_type.equals(enums.etype.url_clear)){ else if(e_type.equals(enums.etype.url_clear)){
mbookmarkModel.onManualClear((int)data.get(0)); mbookmarkModel.onManualClear((int)data.get(0));
if(mbookmarkModel.getList().size()==0){
mRecycleView.setAlpha(0);
}
} }
else if(e_type.equals(enums.etype.url_clear_at)){ else if(e_type.equals(enums.etype.url_clear_at)){
dataController.getInstance().invokeBookmark(dataEnums.eBookmarkCommands.M_DELETE_BOOKMARK ,data); dataController.getInstance().invokeBookmark(dataEnums.eBookmarkCommands.M_DELETE_BOOKMARK ,data);

View File

@ -7,6 +7,7 @@ import android.graphics.Canvas;
import android.graphics.Paint; import android.graphics.Paint;
import android.graphics.RectF; import android.graphics.RectF;
import android.os.Build; import android.os.Build;
import android.os.Handler;
import android.view.View; import android.view.View;
import android.view.Window; import android.view.Window;
import android.view.WindowManager; import android.view.WindowManager;
@ -27,9 +28,16 @@ import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.core.content.ContextCompat; import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.ItemTouchHelper; import androidx.recyclerview.widget.ItemTouchHelper;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.darkweb.genesissearchengine.constants.enums;
import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.constants.strings; import com.darkweb.genesissearchengine.constants.strings;
import com.darkweb.genesissearchengine.dataManager.dataController;
import com.darkweb.genesissearchengine.dataManager.dataEnums;
import com.darkweb.genesissearchengine.helperManager.helperMethod; import com.darkweb.genesissearchengine.helperManager.helperMethod;
import com.example.myapplication.R; import com.example.myapplication.R;
import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
@ -90,7 +98,7 @@ class bookmarkViewController
if(pSize>0){ if(pSize>0){
mClearButton.setTextColor(ContextCompat.getColor(mContext, R.color.c_text_setting_heading)); mClearButton.setTextColor(ContextCompat.getColor(mContext, R.color.c_text_setting_heading));
mEmptyListNotification.animate().setDuration(pDuration).alpha(0f); mEmptyListNotification.animate().setDuration(pDuration).alpha(0f);
mClearButton.setText(strings.BOOKMARK_CLEAR_BOOKMARK); mClearButton.setText(strings.HISTORY_CLEAR_HISTORY);
mClearButton.setClickable(true); mClearButton.setClickable(true);
} }
else { else {
@ -107,7 +115,7 @@ class bookmarkViewController
mTitle.setVisibility(View.VISIBLE); mTitle.setVisibility(View.VISIBLE);
mClearButton.setTextColor(ContextCompat.getColor(mContext, R.color.c_text_v3)); mClearButton.setTextColor(ContextCompat.getColor(mContext, R.color.c_text_v3));
mClearButton.setText(strings.BOOKMARK_NO_BOOKMARK_FOUND); mClearButton.setText(strings.HISTORY_NO_HISTORY_FOUND);
mClearButton.setClickable(false); mClearButton.setClickable(false);
mClearButton.getLayoutParams().height = 0; mClearButton.getLayoutParams().height = 0;
@ -157,7 +165,7 @@ class bookmarkViewController
private void clearList(){ private void clearList(){
Objects.requireNonNull(mRecycleView.getAdapter()).notifyDataSetChanged(); Objects.requireNonNull(mRecycleView.getAdapter()).notifyDataSetChanged();
updateIfListEmpty(mRecycleView.getAdapter().getItemCount(),300); updateIfListEmpty(0,300);
mSearchInput.clearFocus(); mSearchInput.clearFocus();
mSearchInput.setText(strings.GENERIC_EMPTY_STR); mSearchInput.setText(strings.GENERIC_EMPTY_STR);
mClearButton.setTextColor(ContextCompat.getColor(mContext, R.color.c_text_v3)); mClearButton.setTextColor(ContextCompat.getColor(mContext, R.color.c_text_v3));
@ -170,6 +178,8 @@ class bookmarkViewController
mSearchInput.setVisibility(View.GONE); mSearchInput.setVisibility(View.GONE);
mSearchInput.setText(strings.GENERIC_EMPTY_STR); mSearchInput.setText(strings.GENERIC_EMPTY_STR);
new Handler().postDelayed(() ->
{
mTitle.setAlpha(0f); mTitle.setAlpha(0f);
mTitle.setVisibility(View.VISIBLE); mTitle.setVisibility(View.VISIBLE);
mTitle.animate().setDuration(150).alpha(1); mTitle.animate().setDuration(150).alpha(1);
@ -177,6 +187,7 @@ class bookmarkViewController
mSearchButton.setAlpha(0f); mSearchButton.setAlpha(0f);
mSearchButton.setVisibility(View.VISIBLE); mSearchButton.setVisibility(View.VISIBLE);
mSearchButton.animate().setDuration(150).alpha(1); mSearchButton.animate().setDuration(150).alpha(1);
}, 500);
mSearchInput.setText(strings.GENERIC_EMPTY_STR); mSearchInput.setText(strings.GENERIC_EMPTY_STR);
mSearchInput.setClickable(false); mSearchInput.setClickable(false);

View File

@ -157,7 +157,7 @@ public class historyAdapter extends RecyclerView.Adapter<historyAdapter.listView
mEvent.invokeObserver(Collections.singletonList(m_counter_inner),enums.etype.is_empty); mEvent.invokeObserver(Collections.singletonList(m_counter_inner),enums.etype.is_empty);
boolean mDateVerify = false; boolean mDateVerify = false;
if(mCurrentList.size()>0 && mCurrentList.get(m_counter_inner-1).getDescription()==null && (mCurrentList.size()>m_counter_inner+1 && mCurrentList.get(m_counter_inner+1).getDescription()==null || mCurrentList.size()==m_counter_inner+1)){ if(mCurrentList.size()>0 && mCurrentList.size()<m_counter_inner+1 && mCurrentList.get(m_counter_inner-1).getDescription()==null && (mCurrentList.size()>m_counter_inner+1 && mCurrentList.get(m_counter_inner+1).getDescription()==null || mCurrentList.size()==m_counter_inner+1)){
mDateVerify = true; mDateVerify = true;
} }
@ -333,6 +333,7 @@ public class historyAdapter extends RecyclerView.Adapter<historyAdapter.listView
} }
return false; return false;
}); });
initializeModelWithDate(false);
} }
void onOpenMenu(View pView, String pUrl, int pPosition, String pTitle){ void onOpenMenu(View pView, String pUrl, int pPosition, String pTitle){
@ -366,7 +367,6 @@ public class historyAdapter extends RecyclerView.Adapter<historyAdapter.listView
mPopupWindow.dismiss(); mPopupWindow.dismiss();
} }
else if(v.getId() == R.id.pMenuDelete){ else if(v.getId() == R.id.pMenuDelete){
initializeModelWithDate(false);
onClose(pPosition); onClose(pPosition);
invokeFilter(true); invokeFilter(true);
mPopupWindow.dismiss(); mPopupWindow.dismiss();
@ -383,31 +383,25 @@ public class historyAdapter extends RecyclerView.Adapter<historyAdapter.listView
private void onClose(int pIndex){ private void onClose(int pIndex){
mEvent.invokeObserver(Collections.singletonList(mRealIndex.get(pIndex)),enums.etype.url_clear); mEvent.invokeObserver(Collections.singletonList(mRealIndex.get(pIndex)),enums.etype.url_clear);
mEvent.invokeObserver(Collections.singletonList(mRealID.get(pIndex)),enums.etype.url_clear_at); mEvent.invokeObserver(Collections.singletonList(mRealID.get(pIndex)),enums.etype.url_clear_at);
invokeFilter(false);
mEvent.invokeObserver(Collections.singletonList(mRealID.get(pIndex)),enums.etype.is_empty); mEvent.invokeObserver(Collections.singletonList(mRealID.get(pIndex)),enums.etype.is_empty);
boolean mDateVerify = false; boolean mDateVerify = false;
if(mPassedList.size()>0){ if(mPassedList.size()>0){
if(mCurrentList.size()>0 && mCurrentList.get(pIndex-1).getDescription()==null && (mCurrentList.size()>pIndex+1 && mCurrentList.get(pIndex+1).getDescription()==null || mCurrentList.size()==pIndex+1)){ if(mCurrentList.size()>0 && (mCurrentList.size()>pIndex+1 || mCurrentList.size()==pIndex+1)){
mDateVerify = true; mDateVerify = true;
} }
}else { }else {
mCurrentList.clear(); mCurrentList.clear();
//notifyDataSetChanged();
return; return;
} }
int size = mCurrentList.size(); int size = mCurrentList.size();
if(mDateVerify){ if(mDateVerify){
notifyItemRemoved(pIndex-1);
mCurrentList.remove(pIndex-1);
notifyItemRemoved(pIndex-1);
mCurrentList.remove(pIndex-1);
notifyItemRangeChanged(pIndex-1, mCurrentList.size());
}else {
mCurrentList.remove(pIndex); mCurrentList.remove(pIndex);
notifyItemRemoved(pIndex); notifyItemRemoved(pIndex);
notifyItemRangeChanged(pIndex, mCurrentList.size()); notifyItemRangeChanged(pIndex, mCurrentList.size());
}else {
mCurrentList.remove(pIndex);
notifyItemRemoved(pIndex);
notifyItemChanged(mCurrentList.size()-1); notifyItemChanged(mCurrentList.size()-1);
} }
initializeModelWithDate(false); initializeModelWithDate(false);
@ -432,6 +426,7 @@ public class historyAdapter extends RecyclerView.Adapter<historyAdapter.listView
super(itemView); super(itemView);
} }
@SuppressLint("UseCompatLoadingForDrawables")
void bindListView(historyRowModel model, int p_position) { void bindListView(historyRowModel model, int p_position) {
mDateContainer = itemView.findViewById(R.id.pDateContainer); mDateContainer = itemView.findViewById(R.id.pDateContainer);
mHeader = itemView.findViewById(R.id.pHeader); mHeader = itemView.findViewById(R.id.pHeader);
@ -476,6 +471,9 @@ public class historyAdapter extends RecyclerView.Adapter<historyAdapter.listView
String header = model.getHeader(); String header = model.getHeader();
mDescription.setText(("https://"+model.getDescription())); mDescription.setText(("https://"+model.getDescription()));
if(model.getDescription().contains("boogle.store") || model.getDescription().contains("genesis.onion")){
mFaviconLogo.setImageDrawable(itemView.getResources().getDrawable(R.drawable.genesis));
}else{
new Thread(){ new Thread(){
public void run(){ public void run(){
try { try {
@ -495,16 +493,14 @@ public class historyAdapter extends RecyclerView.Adapter<historyAdapter.listView
} }
mContext.runOnUiThread(() -> { mContext.runOnUiThread(() -> {
Bitmap mBitmap = helperMethod.drawableToBitmap(mHindTypeIconTemp.getDrawable()); Bitmap mBitmap = helperMethod.drawableToBitmap(mHindTypeIconTemp.getDrawable());
ByteArrayOutputStream out = new ByteArrayOutputStream(); mFaviconLogo.setImageBitmap(mBitmap);
mBitmap.compress(Bitmap.CompressFormat.PNG, 20, out);
Bitmap decoded = BitmapFactory.decodeStream(new ByteArrayInputStream(out.toByteArray()));
mFaviconLogo.setImageBitmap(decoded);
}); });
} catch (InterruptedException e) { } catch (InterruptedException e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
}.start(); }.start();
}
setItemViewOnClickListener(mRowContainer, mRowMenu, mDescription.getText().toString(), p_position, header, mRowMenu, mLogoImage, model.getID(), model.getDate()); setItemViewOnClickListener(mRowContainer, mRowMenu, mDescription.getText().toString(), p_position, header, mRowMenu, mLogoImage, model.getID(), model.getDate());
} }
@ -531,12 +527,7 @@ public class historyAdapter extends RecyclerView.Adapter<historyAdapter.listView
void invokeFilter(boolean notify){ void invokeFilter(boolean notify){
if(notify){ if(notify){
if(mFilter.length()>0){
initializeModelWithDate(true); initializeModelWithDate(true);
}else {
initializeModelWithDate(false);
}
notifyDataSetChanged();
} }
} }

View File

@ -79,16 +79,16 @@ public class historyAdapterView
pItemView.setPressed(false); pItemView.setPressed(false);
int speed = 150; int speed = 150;
if(pIsForced){ if(pIsForced){
speed=0; speed=150;
} }
if(pVibrate){ if(pVibrate){
helperMethod.vibrate(mContext); helperMethod.vibrate(mContext);
} }
pLogoImage.setAlpha(0.5f); pLogoImage.setAlpha(0f);
pLogoImage.setVisibility(View.VISIBLE); pLogoImage.setVisibility(View.VISIBLE);
pLogoImage.animate().cancel(); pLogoImage.animate().cancel();
pLogoImage.animate().setDuration(speed).alpha(1); pLogoImage.animate().setDuration(speed).alpha(0.95f);
} }
public void onClearHighlight(View pItemView, ImageView pLogoImage, boolean pIsForced) public void onClearHighlight(View pItemView, ImageView pLogoImage, boolean pIsForced)
@ -100,9 +100,9 @@ public class historyAdapterView
if(pIsForced){ if(pIsForced){
speed = 0; speed = 0;
} }
pLogoImage.setAlpha(1f); pLogoImage.setAlpha(0f);
pLogoImage.animate().cancel(); pLogoImage.animate().cancel();
pLogoImage.animate().setDuration(speed).alpha(0).withEndAction(() -> pLogoImage.setVisibility(View.GONE)); pLogoImage.animate().setDuration(speed).alpha(0f).withEndAction(() -> pLogoImage.setVisibility(View.GONE));
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();

View File

@ -400,8 +400,7 @@ public class historyController extends AppCompatActivity
public Object invokeObserver(List<Object> data, Object e_type) { public Object invokeObserver(List<Object> data, Object e_type) {
if(e_type.equals(enums.etype.ON_KEYBOARD_CLOSE)){ if(e_type.equals(enums.etype.ON_KEYBOARD_CLOSE)){
onHideSearch(null); onBackPressed();
onClearMultipleSelection(null);
} }
return null; return null;
} }

View File

@ -46,6 +46,9 @@ public class historyRowModel
public String getDescription() { public String getDescription() {
return mDescription; return mDescription;
} }
public String getDescriptionParsed() {
return mDescription.substring(8);
}
public int getID() { public int getID() {
return mID; return mID;
} }

View File

@ -7,6 +7,7 @@ import android.graphics.Canvas;
import android.graphics.Paint; import android.graphics.Paint;
import android.graphics.RectF; import android.graphics.RectF;
import android.os.Build; import android.os.Build;
import android.os.Handler;
import android.view.View; import android.view.View;
import android.view.Window; import android.view.Window;
import android.view.WindowManager; import android.view.WindowManager;

View File

@ -3,6 +3,7 @@ package com.darkweb.genesissearchengine.appManager.homeManager.geckoManager;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.content.Intent; import android.content.Intent;
import android.net.Uri; import android.net.Uri;
import android.util.Log;
import android.widget.ImageView; import android.widget.ImageView;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
@ -179,6 +180,18 @@ public class geckoClients
onReload(mNestedGeckoView, pcontext); onReload(mNestedGeckoView, pcontext);
} }
public void resetSession(){
mSessionID = strings.GENERIC_EMPTY_STR;
}
public String getTheme(){
if(mSessionID.equals(strings.GENERIC_EMPTY_STR)){
return null;
}else {
return mSession.getTheme();
}
}
public void initSession(geckoSession mSession){ public void initSession(geckoSession mSession){
mSessionID = mSession.getSessionID(); mSessionID = mSession.getSessionID();
this.mSession = mSession; this.mSession = mSession;
@ -383,7 +396,9 @@ public class geckoClients
Intent intent = new Intent(Intent.ACTION_VIEW); Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndTypeAndNormalize(Uri.parse(responseInfo.uri), responseInfo.headers.get("Content-Type")); intent.setDataAndTypeAndNormalize(Uri.parse(responseInfo.uri), responseInfo.headers.get("Content-Type"));
activityContextManager.getInstance().getHomeController().startActivity(intent); activityContextManager.getInstance().getHomeController().startActivity(intent);
}catch (Exception ignored){} }catch (Exception ex){
Log.i("ex","ex");
}
} else } else
{ {
return event.invokeObserver(data, e_type); return event.invokeObserver(data, e_type);

View File

@ -495,8 +495,7 @@ public class geckoSession extends GeckoSession implements GeckoSession.MediaDele
if(response.headers.containsKey("Content-Disposition")){ if(response.headers.containsKey("Content-Disposition")){
mDownloadManager.downloadFile(response,this,mContext.get(),event); mDownloadManager.downloadFile(response,this,mContext.get(),event);
}else if(response.headers.containsKey("Content-Type")){ }else if(response.headers.containsKey("Content-Type")){
event.invokeObserver(Arrays.asList(response,mSessionID), enums.etype.on_handle_external_intent); mDownloadManager.downloadFile(response,this,mContext.get(),event);
stop();
} }
} catch (ActivityNotFoundException e) { } catch (ActivityNotFoundException e) {
event.invokeObserver(Arrays.asList(response,mSessionID), enums.etype.on_handle_external_intent); event.invokeObserver(Arrays.asList(response,mSessionID), enums.etype.on_handle_external_intent);

View File

@ -204,7 +204,15 @@ public class hintAdapter extends RecyclerView.Adapter<hintAdapter.listViewHolder
mHintWebIcon.setImageTintList(null); mHintWebIcon.setImageTintList(null);
mHintWebIcon.setClipToOutline(true); mHintWebIcon.setClipToOutline(true);
mWebIcon.put(mURLLink,mHindTypeIconTemp.getDrawable()); mWebIcon.put(mURLLink,mHindTypeIconTemp.getDrawable());
if(mHindTypeIconTemp.getDrawable() != null){
mHintWebIcon.setImageDrawable(mHindTypeIconTemp.getDrawable()); mHintWebIcon.setImageDrawable(mHindTypeIconTemp.getDrawable());
}else {
Resources res = itemView.getContext().getResources();
try {
mHintWebIcon.setImageDrawable(Drawable.createFromXml(res, res.getXml(R.xml.ic_baseline_browser)));
} catch (Exception ignored) {
}
}
}); });

View File

@ -34,6 +34,7 @@ import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatDelegate; import androidx.appcompat.app.AppCompatDelegate;
import androidx.constraintlayout.widget.ConstraintLayout; import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.core.content.ContextCompat; import androidx.core.content.ContextCompat;
import androidx.core.widget.NestedScrollView; import androidx.core.widget.NestedScrollView;
import androidx.fragment.app.FragmentContainerView; import androidx.fragment.app.FragmentContainerView;
@ -75,8 +76,6 @@ import com.darkweb.genesissearchengine.pluginManager.pluginEnums;
import com.darkweb.genesissearchengine.widget.progressBar.AnimatedProgressBar; import com.darkweb.genesissearchengine.widget.progressBar.AnimatedProgressBar;
import com.example.myapplication.R; import com.example.myapplication.R;
import com.google.android.gms.ads.AdView; import com.google.android.gms.ads.AdView;
import com.google.firebase.installations.time.SystemClock;
import org.mozilla.geckoview.GeckoResult; import org.mozilla.geckoview.GeckoResult;
import org.mozilla.geckoview.GeckoSession; import org.mozilla.geckoview.GeckoSession;
import org.torproject.android.service.OrbotService; import org.torproject.android.service.OrbotService;
@ -142,7 +141,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
private ImageView mBlockerFullSceen; private ImageView mBlockerFullSceen;
private ImageView mNewTabBlocker; private ImageView mNewTabBlocker;
private TextView mCopyright; private TextView mCopyright;
private RecyclerView mHintListView; private RecyclerView mHintListView = null;
private ImageView mSearchLock; private ImageView mSearchLock;
private ImageButton mOrbotLogManager; private ImageButton mOrbotLogManager;
private ConstraintLayout mInfoPortrait; private ConstraintLayout mInfoPortrait;
@ -153,6 +152,8 @@ public class homeController extends AppCompatActivity implements ComponentCallba
private LinearLayout mTopBarContainer; private LinearLayout mTopBarContainer;
private View mPopupLoadNewTab; private View mPopupLoadNewTab;
private ImageView mTopBarHider; private ImageView mTopBarHider;
private CoordinatorLayout mCoordinatorLayout;
private ImageView mImageDivider;
/*Redirection Objects*/ /*Redirection Objects*/
private GeckoResult<Bitmap> mRenderedBitmap = null; private GeckoResult<Bitmap> mRenderedBitmap = null;
@ -163,6 +164,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
private boolean isFocusChanging = false; private boolean isFocusChanging = false;
private boolean mAppRestarted = false; private boolean mAppRestarted = false;
private boolean mSearchBarLoading = false; private boolean mSearchBarLoading = false;
private boolean mSearchBarLoadingOpening = false;
private boolean mSearchBarWasBackButtonPressed = false; private boolean mSearchBarWasBackButtonPressed = false;
private String mSearchBarPreviousText = strings.GENERIC_EMPTY_STR; private String mSearchBarPreviousText = strings.GENERIC_EMPTY_STR;
private Handler mScrollHandler = null; private Handler mScrollHandler = null;
@ -200,6 +202,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
initSuggestions(); initSuggestions();
initAdmob(); initAdmob();
initWidget(); initWidget();
initSuggestionView(new ArrayList<>(), strings.GENERIC_EMPTY_STR);
} }
@ -330,8 +333,8 @@ public class homeController extends AppCompatActivity implements ComponentCallba
@SuppressLint("ClickableViewAccessibility") @SuppressLint("ClickableViewAccessibility")
private void initSuggestionView(ArrayList<historyRowModel> pList, String pSearch){ private void initSuggestionView(ArrayList<historyRowModel> pList, String pSearch){
if(mHintListView.getAdapter() == null){
hintAdapter mAdapter = new hintAdapter(pList,new hintViewCallback(), this, pSearch); hintAdapter mAdapter = new hintAdapter(pList,new hintViewCallback(), this, pSearch);
mHintListView.setAdapter(mAdapter); mHintListView.setAdapter(mAdapter);
mHintListView.setLayoutManager(new LinearLayoutManager(this)); mHintListView.setLayoutManager(new LinearLayoutManager(this));
mHintListView.setHasFixedSize(true); mHintListView.setHasFixedSize(true);
@ -349,6 +352,9 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} }
return false; return false;
}); });
}else {
onUpdateSuggestionList(mSuggestions);
}
} }
public void onUpdateSuggestionList(ArrayList<historyRowModel> pList){ public void onUpdateSuggestionList(ArrayList<historyRowModel> pList){
@ -425,13 +431,15 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mPopupLoadNewTab = findViewById(R.id.pPopupLoadNewTab); mPopupLoadNewTab = findViewById(R.id.pPopupLoadNewTab);
mTopBarHider = findViewById(R.id.pTopBarHider); mTopBarHider = findViewById(R.id.pTopBarHider);
mNewTabBlocker = findViewById(R.id.pNewTabBlocker); mNewTabBlocker = findViewById(R.id.pNewTabBlocker);
mCoordinatorLayout = findViewById(R.id.pCoordinatorLayout);
mImageDivider = findViewById(R.id.pImageDivider);
mGeckoView.setSaveEnabled(false); mGeckoView.setSaveEnabled(false);
mGeckoView.setSaveFromParentEnabled(false); mGeckoView.setSaveFromParentEnabled(false);
mGeckoView.setAutofillEnabled(true); mGeckoView.setAutofillEnabled(true);
mGeckoClient = new geckoClients(); mGeckoClient = new geckoClients();
mHomeViewController.initialization(new homeViewCallback(),this,mNewTab, mWebViewContainer, mLoadingText, mProgressBar, mSearchbar, mSplashScreen, mLoadingIcon, mBannerAds, mGatewaySplash, mTopBar, mGeckoView, mBackSplash, mConnectButton, mFindBar, mFindText, mFindCount, mTopLayout, mVoiceInput, mMenu, mNestedScroll, mBlocker, mBlockerFullSceen, mSearchEngineBar, mCopyright, mHintListView, mAppBar, mOrbotLogManager, mInfoLandscape, mInfoPortrait, mProgressBarIndeterminate, mTabFragment, mTopBarContainer, mSearchLock, mPopupLoadNewTab, mTopBarHider, mNewTabBlocker); mHomeViewController.initialization(new homeViewCallback(),this,mNewTab, mWebViewContainer, mLoadingText, mProgressBar, mSearchbar, mSplashScreen, mLoadingIcon, mBannerAds, mGatewaySplash, mTopBar, mGeckoView, mBackSplash, mConnectButton, mFindBar, mFindText, mFindCount, mTopLayout, mVoiceInput, mMenu, mNestedScroll, mBlocker, mBlockerFullSceen, mSearchEngineBar, mCopyright, mHintListView, mAppBar, mOrbotLogManager, mInfoLandscape, mInfoPortrait, mProgressBarIndeterminate, mTabFragment, mTopBarContainer, mSearchLock, mPopupLoadNewTab, mTopBarHider, mNewTabBlocker, mCoordinatorLayout, mImageDivider);
mGeckoView.onSetHomeEvent(new nestedGeckoViewCallback()); mGeckoView.onSetHomeEvent(new nestedGeckoViewCallback());
mGeckoClient.initialize(mGeckoView, new geckoViewCallback(), this,false); mGeckoClient.initialize(mGeckoView, new geckoViewCallback(), this,false);
mGeckoClient.onValidateInitializeFromStartup(mGeckoView, homeController.this); mGeckoClient.onValidateInitializeFromStartup(mGeckoView, homeController.this);
@ -439,7 +447,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} }
public void onUpdateStatusBarTheme(){ public void onUpdateStatusBarTheme(){
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getSession().getTheme(), false); mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), false);
} }
@Override @Override
@ -493,6 +501,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
orbotLocalConstants.mHomeContext = new WeakReference<>(base); orbotLocalConstants.mHomeContext = new WeakReference<>(base);
Context mContext = theme.getInstance().initTheme(base); Context mContext = theme.getInstance().initTheme(base);
activityContextManager.getInstance().setApplicationContext(mContext.getApplicationContext());
super.attachBaseContext(LocaleHelper.onAttach(mContext, Prefs.getDefaultLocale())); super.attachBaseContext(LocaleHelper.onAttach(mContext, Prefs.getDefaultLocale()));
} }
@ -553,6 +562,12 @@ public class homeController extends AppCompatActivity implements ComponentCallba
dataController.getInstance().invokeTab(dataEnums.eTabCommands.MOVE_TAB_TO_TOP, Collections.singletonList(mTempSession)); dataController.getInstance().invokeTab(dataEnums.eTabCommands.MOVE_TAB_TO_TOP, Collections.singletonList(mTempSession));
} }
if(mTempSession.isOpen()){
if(mTempSession.getSessionID().equals(mGeckoClient.getSession().getSessionID())){
return;
}
}
mGeckoClient.getmRuntime(); mGeckoClient.getmRuntime();
mGeckoClient.initSession(mTempSession); mGeckoClient.initSession(mTempSession);
mGeckoView.releaseSession(); mGeckoView.releaseSession();
@ -575,7 +590,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mGeckoClient.onSessionReinit(); mGeckoClient.onSessionReinit();
mHomeViewController.onUpdateStatusBarTheme(mTempSession.getTheme(), false); mHomeViewController.onUpdateStatusBarTheme(mTempSession.getTheme(), false);
mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(), false, false, false); mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(), false, false, false);
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getSession().getTheme(),false); mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(),false);
try{ try{
mRenderedBitmap = mGeckoView.capturePixels(); mRenderedBitmap = mGeckoView.capturePixels();
@ -619,7 +634,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
view.dispatchTouchEvent(motionEvent); view.dispatchTouchEvent(motionEvent);
view.dispatchTouchEvent(MotionEvent.obtain(0,0,MotionEvent.ACTION_DOWN, 100,100,0.5f,5,0,1,1,0,0)); view.dispatchTouchEvent(MotionEvent.obtain(0,0,MotionEvent.ACTION_DOWN, -1,-1,0.5f,5,0,1,1,0,0));
} }
/*-------------------------------------------------------USER EVENTS-------------------------------------------------------*/ /*-------------------------------------------------------USER EVENTS-------------------------------------------------------*/
@ -806,8 +821,10 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mSearchbar.addTextChangedListener(new TextWatcher() { mSearchbar.addTextChangedListener(new TextWatcher() {
@Override @Override
public void afterTextChanged(Editable s) { public void onTextChanged(CharSequence s, int start, int before, int count) {
new Handler().postDelayed(() ->
{
String mText = mSearchbar.getText().toString();
if(status.sSearchSuggestionStatus && isSuggestionChanged){ if(status.sSearchSuggestionStatus && isSuggestionChanged){
String mURL = mSearchbar.getText().toString(); String mURL = mSearchbar.getText().toString();
@ -816,43 +833,50 @@ public class homeController extends AppCompatActivity implements ComponentCallba
}else{ }else{
mHomeViewController.onUpdateSearchIcon(0); mHomeViewController.onUpdateSearchIcon(0);
} }
if(!mSearchBarLoading && mSearchEngineBar.getVisibility() != View.VISIBLE){ if(mSearchEngineBar.getVisibility() == View.GONE){
mSuggestions = (ArrayList<historyRowModel>)dataController.getInstance().invokeSuggestions(dataEnums.eSuggestionCommands.M_GET_SUGGESTIONS, Collections.singletonList(mSearchbar.getText().toString())); mSearchBarLoadingOpening = true;
initSuggestionView(mSuggestions, s.toString());
} }
mSuggestions = (ArrayList<historyRowModel>)dataController.getInstance().invokeSuggestions(dataEnums.eSuggestionCommands.M_GET_SUGGESTIONS, Collections.singletonList(mSearchbar.getText().toString())); if(mSearchBarLoadingOpening){
if(mSuggestions.size()>0){ mSuggestions = (ArrayList<historyRowModel>)dataController.getInstance().invokeSuggestions(dataEnums.eSuggestionCommands.M_GET_DEFAULT_SUGGESTION, Collections.singletonList(mText));
if(!isSuggestionSearchOpened && mSearchbar.isFocused()){
if(Objects.requireNonNull(mHintListView.getAdapter()).getItemCount()>0){
mHomeViewController.onUpdateSearchEngineBar(true, 0); mHomeViewController.onUpdateSearchEngineBar(true, 0);
onUpdateSuggestionList(mSuggestions);
mEdittextChanged.postDelayed(postToServerRunnable, 0);
mSearchBarLoadingOpening = true;
mSearchBarLoading = false;
mEdittextChanged.removeCallbacks(postToServerRunnable);
mSuggestions = (ArrayList<historyRowModel>)dataController.getInstance().invokeSuggestions(dataEnums.eSuggestionCommands.M_GET_SUGGESTIONS, Collections.singletonList(mText));
mEdittextChanged.postDelayed(postToServerRunnable, 150);
return;
} }
} if(mSuggestions.size()>0){
mSuggestions = (ArrayList<historyRowModel>)dataController.getInstance().invokeSuggestions(dataEnums.eSuggestionCommands.M_GET_SUGGESTIONS, Collections.singletonList(mText));
if(mHintListView.getAdapter()==null){ if(mHintListView.getAdapter()==null){
initSuggestionView(mSuggestions, s.toString()); initSuggestionView(mSuggestions, mText.toString());
mSearchEngineBar.setVisibility(View.VISIBLE); }else if(!mSearchBarLoadingOpening){
mSearchEngineBar.setAlpha(1);
}else {
mSearchEngineBar.setVisibility(View.VISIBLE);
mSearchEngineBar.setAlpha(1);
mEdittextChanged.removeCallbacks(postToServerRunnable); mEdittextChanged.removeCallbacks(postToServerRunnable);
if(!mSearchBarLoading){ if(!mSearchBarLoading){
mSearchBarLoading = true; mSearchBarLoading = true;
mEdittextChanged.postDelayed(postToServerRunnable, 0); mEdittextChanged.postDelayed(postToServerRunnable, 0);
}else{ }else{
mEdittextChanged.postDelayed(postToServerRunnable, 250); mEdittextChanged.postDelayed(postToServerRunnable, 150);
} }
} }
} }
} }
}, 0);
}
@Override
public void afterTextChanged(Editable s) {
} }
@Override @Override
public void beforeTextChanged(CharSequence s, int start,int count, int after) { public void beforeTextChanged(CharSequence s, int start,int count, int after) {
} }
@Override
public void onTextChanged(CharSequence s, int start,int before, int count) {
}
}); });
mSearchbar.setEventHandler(new edittextManagerCallback()); mSearchbar.setEventHandler(new edittextManagerCallback());
@ -923,9 +947,12 @@ public class homeController extends AppCompatActivity implements ComponentCallba
private ArrayList<historyRowModel> mSuggestions; private ArrayList<historyRowModel> mSuggestions;
private Handler mEdittextChanged = new Handler(); private Handler mEdittextChanged = new Handler();
private Runnable postToServerRunnable = () -> { private Runnable postToServerRunnable = () -> {
mSearchBarLoadingOpening = false;
onUpdateSuggestionList(mSuggestions); onUpdateSuggestionList(mSuggestions);
final Handler handler = new Handler(); final Handler handler = new Handler();
handler.postDelayed(() -> mSearchBarLoading = false, 260); handler.postDelayed(() -> {
mSearchBarLoading = false;
}, 150);
}; };
public void onSearchBarInvoked(View view){ public void onSearchBarInvoked(View view){
@ -950,7 +977,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mHomeViewController.onClearSelections(true); mHomeViewController.onClearSelections(true);
onLoadURL(pURL); onLoadURL(pURL);
mHomeViewController.onUpdateSearchBar(pURL,false,true, false); mHomeViewController.onUpdateSearchBar(pURL,false,true, true);
} }
public void onSuggestionMove(View view){ public void onSuggestionMove(View view){
@ -961,7 +988,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
public void onHomeButton(View view){ public void onHomeButton(View view){
mGeckoClient.getSession().setTheme(null); mGeckoClient.getSession().setTheme(null);
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getSession().getTheme(), true); mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), true);
onLoadURL(helperMethod.getDomainName(mHomeModel.getSearchEngine())); onLoadURL(helperMethod.getDomainName(mHomeModel.getSearchEngine()));
mHomeViewController.onUpdateLogo(); mHomeViewController.onUpdateLogo();
} }
@ -1020,7 +1047,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mHomeViewController.onNewTab(); mHomeViewController.onNewTab();
} }
mHomeViewController.progressBarReset(); mHomeViewController.progressBarReset();
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getSession().getTheme(), false); mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), false);
} }
public void postNewLinkTabAnimation(String url,boolean isRemovable){ public void postNewLinkTabAnimation(String url,boolean isRemovable){
@ -1059,10 +1086,28 @@ public class homeController extends AppCompatActivity implements ComponentCallba
public void onNewTab(boolean isKeyboardOpenedTemp, boolean isKeyboardOpened){ public void onNewTab(boolean isKeyboardOpenedTemp, boolean isKeyboardOpened){
try{
mRenderedBitmap = mGeckoView.capturePixels(); mRenderedBitmap = mGeckoView.capturePixels();
}catch (Exception ignored){}
new Handler().postDelayed(() -> new Handler().postDelayed(() ->
{ {
dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_UPDATE_PIXEL, Arrays.asList(mGeckoClient.getSession().getSessionID(), mRenderedBitmap, null, mGeckoView, false)); dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_UPDATE_PIXEL, Arrays.asList(mGeckoClient.getSession().getSessionID(), mRenderedBitmap, null, mGeckoView, false));
if(status.sSettingSearchStatus.startsWith("https://boogle.store") || !status.sOpenURLInNewTab){
mHomeViewController.updateBannerAdvertStatus(false, (boolean)pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
}
if(status.sOpenURLInNewTab){
mGeckoClient.resetSession();
mHomeViewController.onUpdateSearchBar(helperMethod.getDomainName(mHomeModel.getSearchEngine()), false, false,false);
if(status.sSettingSearchStatus.startsWith("https://boogle.store")){
mHomeViewController.progressBarReset();
}else {
mHomeViewController.onProgressBarUpdate(5, true);
}
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), false);
}
mHomeViewController.onNewTabAnimation(Arrays.asList(isKeyboardOpenedTemp, isKeyboardOpened), M_INITIALIZE_TAB_SINGLE); mHomeViewController.onNewTabAnimation(Arrays.asList(isKeyboardOpenedTemp, isKeyboardOpened), M_INITIALIZE_TAB_SINGLE);
}, 100); }, 100);
} }
@ -1072,6 +1117,22 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} }
public void onNewTabBackground(boolean isKeyboardOpenedTemp, boolean isKeyboardOpened){ public void onNewTabBackground(boolean isKeyboardOpenedTemp, boolean isKeyboardOpened){
if(status.sSettingSearchStatus.startsWith("https://boogle.store") || !status.sOpenURLInNewTab){
mHomeViewController.updateBannerAdvertStatus(false, (boolean)pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
}
if(status.sOpenURLInNewTab){
mGeckoClient.resetSession();
mHomeViewController.onUpdateSearchBar(helperMethod.getDomainName(mHomeModel.getSearchEngine()), false, false,false);
if(status.sSettingSearchStatus.startsWith("https://boogle.store")){
mHomeViewController.progressBarReset();
}else {
mHomeViewController.onProgressBarUpdate(5, true);
}
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), true);
}
mHomeViewController.onNewTabAnimation(Arrays.asList(isKeyboardOpenedTemp, isKeyboardOpened), M_INITIALIZE_TAB_SINGLE); mHomeViewController.onNewTabAnimation(Arrays.asList(isKeyboardOpenedTemp, isKeyboardOpened), M_INITIALIZE_TAB_SINGLE);
} }
@ -1081,12 +1142,18 @@ public class homeController extends AppCompatActivity implements ComponentCallba
handler.postDelayed(() -> { handler.postDelayed(() -> {
onGetThumbnail(null, false); onGetThumbnail(null, false);
mHomeViewController.expandTopBar(); mHomeViewController.expandTopBar();
if(status.sSettingSearchStatus.startsWith("https://boogle.store") || !status.sOpenURLInNewTab){
mHomeViewController.updateBannerAdvertStatus(false, (boolean)pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
}
mHomeViewController.onNewTabAnimation(Collections.singletonList(url), M_INITIALIZE_TAB_LINK); mHomeViewController.onNewTabAnimation(Collections.singletonList(url), M_INITIALIZE_TAB_LINK);
}, 100); }, 100);
} }
public void onOpenTabViewBoundary(View view){ public void onOpenTabViewBoundary(View view){
onInvokePixelGenerator(); onInvokePixelGenerator();
if(mScrollHandler!=null){
mScrollHandler.removeCallbacksAndMessages(null);
}
mNewTab.setPressed(true); mNewTab.setPressed(true);
onOpenTabReady(); onOpenTabReady();
} }
@ -1161,7 +1228,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} }
else if(!mGeckoClient.getFullScreenStatus()){ else if(!mGeckoClient.getFullScreenStatus()){
mGeckoClient.onExitFullScreen(); mGeckoClient.onExitFullScreen();
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getSession().getTheme(), false); mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), false);
} }
else if(mSearchbar.isFocused() || isKeyboardOpened){ else if(mSearchbar.isFocused() || isKeyboardOpened){
mHomeViewController.onClearSelections(true); mHomeViewController.onClearSelections(true);
@ -1242,17 +1309,18 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} }
if(mTabFragment.getVisibility()==View.VISIBLE){ if(mTabFragment.getVisibility()==View.VISIBLE){
onResumeDump(); onResumeDump();
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getSession().getTheme(), false); mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), false);
mHomeViewController.onHideTabContainer(); mHomeViewController.onHideTabContainer();
activityContextManager.getInstance().getTabController().onPostExit(); activityContextManager.getInstance().getTabController().onPostExit();
activityContextManager.getInstance().getTabController().onBackPressed(); activityContextManager.getInstance().getTabController().onBackPressed();
return; return;
} }
mHomeViewController.onUpdateSearchEngineBar(false, 0);
mGeckoClient.onExitFullScreen(); mGeckoClient.onExitFullScreen();
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getSession().getTheme(), false); mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), false);
pluginController.getInstance().onMessageManagerInvoke(null, M_RESET); pluginController.getInstance().onMessageManagerInvoke(null, M_RESET);
pluginController.getInstance().onNotificationInvoke(Collections.singletonList(1296000000) /* Every 15 Days */ , pluginEnums.eNotificationManager.M_CREATE_NOTIFICATION); pluginController.getInstance().onNotificationInvoke(Collections.singletonList(1296000000) , pluginEnums.eNotificationManager.M_CREATE_NOTIFICATION);
mSearchBarWasBackButtonPressed = false; mSearchBarWasBackButtonPressed = false;
} }
@ -1261,9 +1329,15 @@ public class homeController extends AppCompatActivity implements ComponentCallba
{ {
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_RESUME); pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_RESUME);
activityContextManager.getInstance().setCurrentActivity(this); activityContextManager.getInstance().setCurrentActivity(this);
if (mGeckoClient.getSession()!=null && mGeckoClient!=null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && mGeckoClient.getUriPermission()!=null) { if (mGeckoClient.getSession()!=null && mGeckoClient!=null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && mGeckoClient.getUriPermission()!=null) {
this.revokeUriPermission(mGeckoClient.getUriPermission(), Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_GRANT_READ_URI_PERMISSION); this.revokeUriPermission(mGeckoClient.getUriPermission(), Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_GRANT_READ_URI_PERMISSION);
TouchView(mGeckoView);
TouchView(mNestedScroll);
} }
if(isSuggestionSearchOpened){ if(isSuggestionSearchOpened){
isSuggestionChanged = true; isSuggestionChanged = true;
isFocusChanging = false; isFocusChanging = false;
@ -1301,6 +1375,8 @@ public class homeController extends AppCompatActivity implements ComponentCallba
if(status.sSettingIsAppStarted && !status.mThemeApplying){ if(status.sSettingIsAppStarted && !status.mThemeApplying){
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_INIT_LOCALE); pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_INIT_LOCALE);
mHomeViewController.onUpdateSearchEngineBar(false, 0);
mNewTab.setPressed(false);
} }
status.mThemeApplying = false; status.mThemeApplying = false;
@ -1308,13 +1384,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba
super.onResume(); super.onResume();
} }
public void onChangeDefaultLanguage(){
if(status.sSettingIsAppStarted){
setContentView(R.layout.home_view);
recreate();
}
}
public void onResumeDump() public void onResumeDump()
{ {
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_RESUME); pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_RESUME);
@ -1341,8 +1410,13 @@ public class homeController extends AppCompatActivity implements ComponentCallba
tabRowModel model = (tabRowModel)dataController.getInstance().invokeTab(dataEnums.eTabCommands.GET_CURRENT_TAB, null); tabRowModel model = (tabRowModel)dataController.getInstance().invokeTab(dataEnums.eTabCommands.GET_CURRENT_TAB, null);
if(model==null){ if(model==null){
mHomeViewController.onProgressBarUpdate(5, false);
initializeGeckoView(false,false); initializeGeckoView(false,false);
onLoadURL(helperMethod.getDomainName(status.sSettingSearchStatus)); onLoadURL(helperMethod.getDomainName(status.sSettingSearchStatus));
}else {
if(model.getSession().getSessionID() != mGeckoClient.getSession().getSessionID()){
onLoadTab(model.getSession(),false,true);
}
} }
} }
@ -1664,7 +1738,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
public void onReInitTheme(){ public void onReInitTheme(){
recreate(); recreate();
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getSession().getTheme(), true); mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), true);
} }
public void onOrbotLog(View view) { public void onOrbotLog(View view) {
@ -1699,6 +1773,9 @@ public class homeController extends AppCompatActivity implements ComponentCallba
postNewLinkTabAnimationInBackground(dataToStr(data.get(0))); postNewLinkTabAnimationInBackground(dataToStr(data.get(0)));
mHomeViewController.onShowLoadTabDialog(); mHomeViewController.onShowLoadTabDialog();
} }
else if(e_type.equals(enums.etype.M_RESET_SUGGESTION))
{
}
else if(e_type.equals(open_new_tab)) else if(e_type.equals(open_new_tab))
{ {
if(status.sSettingPopupStatus){ if(status.sSettingPopupStatus){
@ -1725,11 +1802,11 @@ public class homeController extends AppCompatActivity implements ComponentCallba
else if(e_type.equals(enums.etype.M_UPDATE_THEME)) else if(e_type.equals(enums.etype.M_UPDATE_THEME))
{ {
if(mGeckoClient!=null) { if(mGeckoClient!=null) {
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getSession().getTheme(), true); mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), true);
} }
} }
else if(e_type.equals(enums.etype.ON_UPDATE_THEME)){ else if(e_type.equals(enums.etype.ON_UPDATE_THEME)){
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getSession().getTheme(),false); mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(),false);
} }
else if(e_type.equals(M_INITIALIZE_TAB_SINGLE)){ else if(e_type.equals(M_INITIALIZE_TAB_SINGLE)){
initTabCount(enums.etype.ON_NEW_TAB_ANIMATION,data); initTabCount(enums.etype.ON_NEW_TAB_ANIMATION,data);
@ -1784,6 +1861,9 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} }
} }
} }
else if(e_type.equals(enums.etype.open_new_tab_instant)){
postNewLinkTabAnimation(dataToStr(data.get(0)), true);
}
else if(e_type.equals(enums.etype.M_HOME_PAGE)){ else if(e_type.equals(enums.etype.M_HOME_PAGE)){
geckoSession mSession = (geckoSession)dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_HOME_PAGE, null); geckoSession mSession = (geckoSession)dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_HOME_PAGE, null);
if(mSession!=null){ if(mSession!=null){
@ -1829,9 +1909,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
((hintAdapter) Objects.requireNonNull(mHintListView.getAdapter())).onClearAdapter(); ((hintAdapter) Objects.requireNonNull(mHintListView.getAdapter())).onClearAdapter();
} }
mHomeViewController.initSearchBarFocus(false, isKeyboardOpened); mHomeViewController.initSearchBarFocus(false, isKeyboardOpened);
if(!mGeckoClient.isLoading()){ mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(),false,true, true);
mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(),false,true, false);
}
helperMethod.hideKeyboard(homeController.this); helperMethod.hideKeyboard(homeController.this);
} }
isFocusChanging = false; isFocusChanging = false;
@ -1945,7 +2023,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} }
} }
else if(e_type.equals(enums.etype.ON_UPDATE_THEME)){ else if(e_type.equals(enums.etype.ON_UPDATE_THEME)){
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getSession().getTheme(),false); mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(),false);
} }
else if(e_type.equals(enums.etype.start_proxy)){ else if(e_type.equals(enums.etype.start_proxy)){
pluginController.getInstance().onOrbotInvoke(data, pluginEnums.eOrbotManager.M_SET_PROXY); pluginController.getInstance().onOrbotInvoke(data, pluginEnums.eOrbotManager.M_SET_PROXY);
@ -1984,7 +2062,8 @@ public class homeController extends AppCompatActivity implements ComponentCallba
else if(e_type.equals(enums.etype.on_full_screen)){ else if(e_type.equals(enums.etype.on_full_screen)){
boolean status = (Boolean)data.get(0); boolean status = (Boolean)data.get(0);
mHomeViewController.onFullScreenUpdate(status); mHomeViewController.onFullScreenUpdate(status);
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getSession().getTheme(),false);
mHomeViewController.onUpdateSearchEngineBar(false, 0);
} }
else if(e_type.equals(enums.etype.on_update_favicon)){ else if(e_type.equals(enums.etype.on_update_favicon)){
dataController.getInstance().invokeImage(dataEnums.eImageCommands.M_REQUEST_IMAGE_URL,Collections.singletonList(data.get(0))); dataController.getInstance().invokeImage(dataEnums.eImageCommands.M_REQUEST_IMAGE_URL,Collections.singletonList(data.get(0)));

View File

@ -33,6 +33,7 @@ import android.widget.*;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatDelegate; import androidx.appcompat.app.AppCompatDelegate;
import androidx.constraintlayout.widget.ConstraintLayout; import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.core.content.ContextCompat; import androidx.core.content.ContextCompat;
import androidx.core.graphics.ColorUtils; import androidx.core.graphics.ColorUtils;
import androidx.core.widget.NestedScrollView; import androidx.core.widget.NestedScrollView;
@ -49,10 +50,8 @@ import com.darkweb.genesissearchengine.helperManager.helperMethod;
import com.darkweb.genesissearchengine.widget.progressBar.AnimatedProgressBar; import com.darkweb.genesissearchengine.widget.progressBar.AnimatedProgressBar;
import com.example.myapplication.R; import com.example.myapplication.R;
import com.google.android.gms.ads.AdView; import com.google.android.gms.ads.AdView;
import com.nostra13.universalimageloader.cache.disc.naming.Md5FileNameGenerator; import com.google.android.material.appbar.AppBarLayout;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
import com.nostra13.universalimageloader.core.assist.QueueProcessingType;
import org.mozilla.geckoview.GeckoView; import org.mozilla.geckoview.GeckoView;
import org.torproject.android.service.wrapper.orbotLocalConstants; import org.torproject.android.service.wrapper.orbotLocalConstants;
import java.util.ArrayList; import java.util.ArrayList;
@ -111,6 +110,8 @@ class homeViewController
private View mPopupLoadNewTab; private View mPopupLoadNewTab;
private ImageView mTopBarHider; private ImageView mTopBarHider;
private ImageView mNewTabBlocker; private ImageView mNewTabBlocker;
private CoordinatorLayout mCoordinatorLayout;
private ImageView mImageDivider;
/*Local Variables*/ /*Local Variables*/
private Callable<String> mLogs = null; private Callable<String> mLogs = null;
@ -120,7 +121,7 @@ class homeViewController
private Handler mTabDialogHandler = null; private Handler mTabDialogHandler = null;
private Runnable mTabDialogRunnable = null; private Runnable mTabDialogRunnable = null;
void initialization(eventObserver.eventListener event, AppCompatActivity context, Button mNewTab, ConstraintLayout webviewContainer, TextView loadingText, AnimatedProgressBar progressBar, editTextManager searchbar, ConstraintLayout splashScreen, ImageView loading, AdView 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){ void initialization(eventObserver.eventListener event, AppCompatActivity context, Button mNewTab, ConstraintLayout webviewContainer, TextView loadingText, AnimatedProgressBar progressBar, editTextManager searchbar, ConstraintLayout splashScreen, ImageView loading, AdView 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){
this.mContext = context; this.mContext = context;
this.mProgressBar = progressBar; this.mProgressBar = progressBar;
this.mSearchbar = searchbar; this.mSearchbar = searchbar;
@ -157,6 +158,8 @@ class homeViewController
this.mPopupLoadNewTab = pPopupLoadNewTab; this.mPopupLoadNewTab = pPopupLoadNewTab;
this.mTopBarHider = pTopBarHider; this.mTopBarHider = pTopBarHider;
this.mNewTabBlocker = pNewTabBlocker; this.mNewTabBlocker = pNewTabBlocker;
this.mCoordinatorLayout = mCoordinatorLayout;
this.mImageDivider = pImageDivider;
initSplashScreen(); initSplashScreen();
createUpdateUiHandler(); createUpdateUiHandler();
@ -182,19 +185,48 @@ class homeViewController
updateBannerAdvertStatus(false, false); updateBannerAdvertStatus(false, false);
expandTopBar(); expandTopBar();
mBlockerFullSceen.setVisibility(View.GONE); mBlockerFullSceen.setVisibility(View.GONE);
mNewTab.setPressed(true);
mNewTab.setPressed(false);
View child = mAppBar.getChildAt(0);
AppBarLayout.LayoutParams params = (AppBarLayout.LayoutParams) child.getLayoutParams();
params.setScrollFlags(1);
mAppBar.setExpanded(true,false);
mAppBar.refreshDrawableState();
mAppBar.invalidate();
onClearSelections(false);
mGeckoView.requestFocus();
} }
@SuppressLint("WrongConstant")
public void initTopBarPadding(){ public void initTopBarPadding(){
if(!status.sFullScreenBrowsing){ if(!status.sFullScreenBrowsing){
int paddingDp = 60; int paddingDp = 110;
if(isFullScreen){
paddingDp = 60;
}
float density = mContext.getResources().getDisplayMetrics().density; float density = mContext.getResources().getDisplayMetrics().density;
int paddingPixel = (int)(paddingDp * density); int paddingPixel = (int)(paddingDp * density);
mGeckoView.setPadding(0,0,0,paddingPixel); mGeckoView.setPadding(0,0,0,paddingPixel);
View child = mAppBar.getChildAt(0);
AppBarLayout.LayoutParams params = (AppBarLayout.LayoutParams) child.getLayoutParams();
params.setScrollFlags(0);
}else { }else {
int paddingDp = 0; int paddingDp = 0;
if(isFullScreen){
paddingDp = 60;
}
float density = mContext.getResources().getDisplayMetrics().density; float density = mContext.getResources().getDisplayMetrics().density;
int paddingPixel = (int)(paddingDp * density); int paddingPixel = (int)(paddingDp * density);
mGeckoView.setPadding(0,0,0,paddingPixel); mGeckoView.setPadding(0,0,0,paddingPixel);
View child = mAppBar.getChildAt(0);
AppBarLayout.LayoutParams params = (AppBarLayout.LayoutParams) child.getLayoutParams();
params.setScrollFlags(1);
} }
} }
@ -279,17 +311,6 @@ class homeViewController
} }
} }
public static void initImageLoader(Context context) {
ImageLoaderConfiguration.Builder config = new ImageLoaderConfiguration.Builder(context);
config.threadPriority(Thread.NORM_PRIORITY - 2);
config.denyCacheImageMultipleSizesInMemory();
config.diskCacheFileNameGenerator(new Md5FileNameGenerator());
config.diskCacheSize(50 * 1024 * 1024); // 50 MiB
config.tasksProcessingOrder(QueueProcessingType.LIFO);
config.writeDebugLogs(); // Remove for release app
ImageLoader.getInstance().init(config.build());
}
@SuppressLint("UseCompatLoadingForDrawables") @SuppressLint("UseCompatLoadingForDrawables")
public void onUpdateSearchIcon(int mStatus){ public void onUpdateSearchIcon(int mStatus){
try { try {
@ -486,26 +507,6 @@ class homeViewController
} }
void initializeSuggestionView(ArrayList<historyRowModel> suggestions){
if(mSearchbar.isFocused()){
return;
}
autoCompleteAdapter suggestionAdapter = new autoCompleteAdapter(mContext, R.layout.hint_view, (ArrayList<historyRowModel>) suggestions.clone());
int width = Math.round(helperMethod.screenWidth());
mSearchbar.setThreshold(2);
mSearchbar.setAdapter(suggestionAdapter);
mSearchbar.setDropDownVerticalOffset(helperMethod.pxFromDp(0));
mSearchbar.setDropDownWidth(width);
mSearchbar.setDropDownBackgroundDrawable(new ColorDrawable(mContext.getResources().getColor(R.color.c_background)));
mSearchbar.setDropDownHeight(helperMethod.getScreenHeight(mContext)*75/100);
mSearchbar.setInputType(EditorInfo.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
mSearchbar.setInputType(EditorInfo.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
mSearchbar.setAnimation(null);
}
public void initSplashLoading(){ public void initSplashLoading(){
mLoadingText.setAlpha(0); mLoadingText.setAlpha(0);
@ -554,6 +555,7 @@ class homeViewController
View root = mSearchbar.getRootView(); View root = mSearchbar.getRootView();
root.setBackgroundColor(ContextCompat.getColor(mContext, R.color.c_background_keyboard)); root.setBackgroundColor(ContextCompat.getColor(mContext, R.color.c_background_keyboard));
} }
void initProxyLoading(Callable<String> logs){ void initProxyLoading(Callable<String> logs){
@ -615,6 +617,8 @@ class homeViewController
triggerPostUI(); triggerPostUI();
mProgressBar.setVisibility(View.GONE); mProgressBar.setVisibility(View.GONE);
mSplashScreen.animate().cancel(); mSplashScreen.animate().cancel();
onClearSelections(false);
mGeckoView.requestFocus();
mProgressBarIndeterminate.animate().setStartDelay(300).setDuration(250).alpha(0).withEndAction(() -> mSplashScreen.animate().setDuration(350).setStartDelay(200).alpha(0).withEndAction(() -> { mProgressBarIndeterminate.animate().setStartDelay(300).setDuration(250).alpha(0).withEndAction(() -> mSplashScreen.animate().setDuration(350).setStartDelay(200).alpha(0).withEndAction(() -> {
mProgressBarIndeterminate.setVisibility(View.GONE); mProgressBarIndeterminate.setVisibility(View.GONE);
mSplashScreen.setClickable(false); mSplashScreen.setClickable(false);
@ -827,6 +831,7 @@ class homeViewController
} }
Log.i("FUCK::5",url); Log.i("FUCK::5",url);
if(!mSearchbar.hasFocus() || pClearText || pBypassFocus){ if(!mSearchbar.hasFocus() || pClearText || pBypassFocus){
if(mSearchEngineBar.getVisibility() == View.GONE || pBypassFocus){
int delay = 0; int delay = 0;
handlerLocalUrl = url; handlerLocalUrl = url;
@ -843,6 +848,7 @@ class homeViewController
}, delay); }, delay);
} }
} }
}
public void onUpdateFindBarCount(int index, int total) public void onUpdateFindBarCount(int index, int total)
{ {
@ -857,7 +863,7 @@ class homeViewController
public void onUpdateStatusBarTheme(String pTheme, boolean mForced) public void onUpdateStatusBarTheme(String pTheme, boolean mForced)
{ {
if(mSplashScreen.getAlpha()<=0 && (status.sTheme != enums.Theme.THEME_DARK) && mTabFragment.getAlpha()<=0 || mForced){ if(mSplashScreen.getAlpha()<=0 && (status.sTheme != enums.Theme.THEME_DARK && mTabFragment.getAlpha()<=0 || mForced)){
if(status.sDefaultNightMode && status.sTheme == enums.Theme.THEME_DEFAULT){ if(status.sDefaultNightMode && status.sTheme == enums.Theme.THEME_DEFAULT){
return; return;
} }
@ -1006,21 +1012,33 @@ class homeViewController
public void onUpdateSearchEngineBar(boolean pStatus, int delay) public void onUpdateSearchEngineBar(boolean pStatus, int delay)
{ {
if(pStatus){ if(pStatus){
if(mSearchEngineBar.getAlpha() == 0 || mSearchEngineBar.getVisibility() == View.GONE){ if(mSearchEngineBar.getAlpha() == 0 || mSearchEngineBar.getVisibility() == View.GONE && mSplashScreen.getAlpha()<=0){
mSearchEngineBar.animate().cancel(); mSearchEngineBar.animate().cancel();
mSearchEngineBar.setAlpha(0f); mSearchEngineBar.setAlpha(0f);
mSearchEngineBar.animate().setDuration(delay).alpha(1); mSearchEngineBar.animate().setDuration(delay).alpha(1);
mSearchEngineBar.setVisibility(View.VISIBLE); mSearchEngineBar.setVisibility(View.VISIBLE);
onUpdateStatusBarTheme(null, false); onUpdateStatusBarTheme(null, false);
View child = mAppBar.getChildAt(0);
AppBarLayout.LayoutParams params = (AppBarLayout.LayoutParams) child.getLayoutParams();
params.setScrollFlags(0);
} }
}else { }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(() -> { mSearchEngineBar.animate().setDuration(delay).alpha(0).withEndAction(() -> {
mSearchEngineBar.animate().cancel(); mSearchEngineBar.animate().cancel();
mSearchEngineBar.setAlpha(0f); mSearchEngineBar.setAlpha(0f);
mSearchEngineBar.setVisibility(View.GONE); mSearchEngineBar.setVisibility(View.GONE);
mEvent.invokeObserver(null, enums.etype.M_UPDATE_THEME); 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){ private void triggerUpdateSearchBar(String url, boolean showProtocol, boolean pClearText){
@ -1122,9 +1140,6 @@ class homeViewController
public void onNewTabAnimation(List<Object> data, Object e_type){ public void onNewTabAnimation(List<Object> data, Object e_type){
mGeckoView.setPivotX(0); mGeckoView.setPivotX(0);
mGeckoView.setPivotY(0); mGeckoView.setPivotY(0);
//mGeckoView.setClickable(false);
//mGeckoView.setFocusable(false);
//mGeckoView.setEnabled(false);
ObjectAnimator scaleDown = ObjectAnimator.ofPropertyValuesHolder(mGeckoView, ObjectAnimator scaleDown = ObjectAnimator.ofPropertyValuesHolder(mGeckoView,
PropertyValuesHolder.ofFloat("scaleX", 1, 0.8f), PropertyValuesHolder.ofFloat("scaleX", 1, 0.8f),
@ -1154,13 +1169,10 @@ class homeViewController
scaleDown.setDuration(150); scaleDown.setDuration(150);
scaleDown.setStartDelay(0); scaleDown.setStartDelay(0);
mNewTabBlocker.animate().setStartDelay(350).setDuration(150).alpha(0f).withEndAction(() -> { mNewTabBlocker.animate().setStartDelay(250).setDuration(150).alpha(0f).withEndAction(() -> {
mNewTabBlocker.setVisibility(View.GONE); mNewTabBlocker.setVisibility(View.GONE);
}); });
scaleDown.start(); scaleDown.start();
//mGeckoView.setClickable(true);
//mGeckoView.setFocusable(true);
//mGeckoView.setEnabled(true);
} }
@Override @Override
@ -1169,6 +1181,17 @@ class homeViewController
@Override @Override
public void onAnimationEnd(Animator animation) { public void onAnimationEnd(Animator animation) {
mEvent.invokeObserver(data, e_type);
ObjectAnimator scaleDown = ObjectAnimator.ofPropertyValuesHolder(mGeckoView,
PropertyValuesHolder.ofFloat("scaleX", 0.8f, 1f),
PropertyValuesHolder.ofFloat("scaleY", 0.8f, 1f));
scaleDown.setDuration(150);
scaleDown.setStartDelay(0);
mNewTabBlocker.animate().setStartDelay(250).setDuration(150).alpha(0f).withEndAction(() -> {
mNewTabBlocker.setVisibility(View.GONE);
});
scaleDown.start();
} }
@Override @Override
@ -1266,7 +1289,6 @@ class homeViewController
mNestedScroll.setLayoutParams(params); mNestedScroll.setLayoutParams(params);
com.darkweb.genesissearchengine.constants.status.sFullScreenBrowsing = (boolean) dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_FULL_SCREEN_BROWSIING,true)); com.darkweb.genesissearchengine.constants.status.sFullScreenBrowsing = (boolean) dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_FULL_SCREEN_BROWSIING,true));
initTopBarPadding();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if(status.sTheme == enums.Theme.THEME_DARK || status.sDefaultNightMode){ if(status.sTheme == enums.Theme.THEME_DARK || status.sDefaultNightMode){
@ -1279,6 +1301,10 @@ class homeViewController
} }
this.mBlockerFullSceen.animate().setStartDelay(0).setDuration(200).alpha(0).withEndAction(() -> mBlockerFullSceen.setVisibility(View.GONE)); this.mBlockerFullSceen.animate().setStartDelay(0).setDuration(200).alpha(0).withEndAction(() -> mBlockerFullSceen.setVisibility(View.GONE));
initTopBarPadding();
mAppBar.setExpanded(true,false);
mAppBar.refreshDrawableState();
mAppBar.invalidate();
} }
} }
@ -1319,14 +1345,22 @@ class homeViewController
{ {
if(msg.what == messages.MESSAGE_ON_URL_LOAD) if(msg.what == messages.MESSAGE_ON_URL_LOAD)
{ {
Log.i("SUPEEEE","SUPEEE1");
if(mEvent.invokeObserver(null, enums.etype.M_HOME_PAGE)==null){ if(mEvent.invokeObserver(null, enums.etype.M_HOME_PAGE)==null){
mEvent.invokeObserver(null, enums.etype.M_PRELOAD_URL); mEvent.invokeObserver(null, enums.etype.M_PRELOAD_URL);
Log.i("SUPEEEE","SUPEEE2");
if(status.sSettingRedirectStatus.equals(strings.GENERIC_EMPTY_STR)){ if(status.sSettingRedirectStatus.equals(strings.GENERIC_EMPTY_STR)){
mEvent.invokeObserver(Collections.singletonList(helperMethod.getDomainName(status.sSettingSearchStatus)), enums.etype.on_url_load); mEvent.invokeObserver(Collections.singletonList(helperMethod.getDomainName(status.sSettingSearchStatus)), enums.etype.on_url_load);
Log.i("SUPEEEE","SUPEEE5");
}else { }else {
mEvent.invokeObserver(Collections.singletonList(helperMethod.getDomainName(status.sSettingRedirectStatus)), enums.etype.on_url_load); mEvent.invokeObserver(Collections.singletonList(helperMethod.getDomainName(status.sSettingRedirectStatus)), enums.etype.on_url_load);
Log.i("SUPEEEE","SUPEEE5");
} }
} }
if(!status.sExternalWebsite.equals(strings.GENERIC_EMPTY_STR) ){
mEvent.invokeObserver(Collections.singletonList(helperMethod.getDomainName(status.sExternalWebsite)), enums.etype.open_new_tab_instant);
}
status.sSettingIsAppStarted = true; status.sSettingIsAppStarted = true;
} }
if(msg.what == messages.MESSAGE_UPDATE_LOADING_TEXT) if(msg.what == messages.MESSAGE_UPDATE_LOADING_TEXT)

View File

@ -20,7 +20,6 @@ import java.util.Collections;
import java.util.List; import java.util.List;
import static com.darkweb.genesissearchengine.appManager.settingManager.generalManager.settingGeneralEnums.eGeneralViewCallback.M_RESET_THEME_INVOKED_BACK; import static com.darkweb.genesissearchengine.appManager.settingManager.generalManager.settingGeneralEnums.eGeneralViewCallback.M_RESET_THEME_INVOKED_BACK;
import static com.flurry.sdk.jo.v;
class settingGeneralViewController class settingGeneralViewController
{ {

View File

@ -67,10 +67,8 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
private void reInitData(ArrayList<tabRowModel> pModelList){ private void reInitData(ArrayList<tabRowModel> pModelList){
for(int mCounter=0;mCounter<pModelList.size();mCounter++){ mModelList.addAll(0, pModelList);
mModelList.add(0,pModelList.get(mCounter)); notifyItemRangeInserted(0,pModelList.size());
}
notifyItemRangeInserted(0, pModelList.size());
notifyItemChanged(pModelList.size()); notifyItemChanged(pModelList.size());
} }
@ -107,14 +105,16 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
public void scaleView(View v, tabRowModel mTabRowModel) { public void scaleView(View v, tabRowModel mTabRowModel) {
v.bringToFront(); v.bringToFront();
ObjectAnimator scaleDown = ObjectAnimator.ofPropertyValuesHolder(v, ObjectAnimator scaleDown = ObjectAnimator.ofPropertyValuesHolder(v,
PropertyValuesHolder.ofFloat("scaleX", 1, 0.9f), PropertyValuesHolder.ofFloat("scaleX", 1, 1f),
PropertyValuesHolder.ofFloat("scaleY", 1, 0.9f)); PropertyValuesHolder.ofFloat("scaleY", 1, 1f));
scaleDown.setDuration(130); scaleDown.setDuration(0);
scaleDown.start(); scaleDown.start();
v.setClickable(false); v.setClickable(false);
v.setFocusable(false); v.setFocusable(false);
v.setEnabled(false); v.setEnabled(false);
mEvent.invokeObserver(Arrays.asList(mTabRowModel.getSession(), false), tabEnums.eTabAdapterCallback.ON_LOAD_TAB); mEvent.invokeObserver(Arrays.asList(mTabRowModel.getSession(), false), tabEnums.eTabAdapterCallback.ON_LOAD_TAB);
onTriggerURL(mTabRowModel);
scaleDown.addListener(new Animator.AnimatorListener() { scaleDown.addListener(new Animator.AnimatorListener() {
@Override @Override
@ -123,7 +123,6 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
@Override @Override
public void onAnimationEnd(Animator animation, boolean isReverse) { public void onAnimationEnd(Animator animation, boolean isReverse) {
onTriggerURL(mTabRowModel);
} }
@Override @Override
@ -203,9 +202,9 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
}else { }else {
for(int mCounter=0;mCounter<mSize;mCounter++){ for(int mCounter=0;mCounter<mSize;mCounter++){
mModelList.remove(0); mModelList.remove(0);
notifyDataSetChanged();
mEvent.invokeObserver(Arrays.asList(0, false), tabEnums.eTabAdapterCallback.ON_REMOVE_TAB_VIEW_RETAIN_BACKUP); mEvent.invokeObserver(Arrays.asList(0, false), tabEnums.eTabAdapterCallback.ON_REMOVE_TAB_VIEW_RETAIN_BACKUP);
} }
notifyDataSetChanged();
} }
} }
@ -256,6 +255,7 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
if(model.getSession()!=null){ if(model.getSession()!=null){
mEvent.invokeObserver(null, tabEnums.eTabAdapterCallback.ON_BACK_PRESSED); mEvent.invokeObserver(null, tabEnums.eTabAdapterCallback.ON_BACK_PRESSED);
mEvent.invokeObserver(null, tabEnums.eTabAdapterCallback.ON_INIT_TAB_COUNT); mEvent.invokeObserver(null, tabEnums.eTabAdapterCallback.ON_INIT_TAB_COUNT);
mEvent.invokeObserver(Arrays.asList(model.getSession(), false), tabEnums.eTabAdapterCallback.ON_LOAD_TAB);
} }
} }
@ -331,7 +331,7 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
if(model.getSession().getTheme()==null){ if(model.getSession().getTheme()==null){
if(status.sTabGridLayoutEnabled){ if(status.sTabGridLayoutEnabled){
mBorder.setBackgroundColor(ContextCompat.getColor(itemView.getContext(), R.color.c_view_divier_background_inner)); mBorder.setBackgroundColor(ContextCompat.getColor(itemView.getContext(), R.color.c_ripple));
}else { }else {
mBorder.setBackgroundColor(ContextCompat.getColor(itemView.getContext(), R.color.c_ripple)); mBorder.setBackgroundColor(ContextCompat.getColor(itemView.getContext(), R.color.c_ripple));
} }
@ -366,7 +366,7 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
} }
if(mDescText.equals("$TITLE") || mDescText.startsWith("http://loading") || mDescText.startsWith("loading")){ if(mDescText.equals("$TITLE") || mDescText.startsWith("http://loading") || mDescText.startsWith("loading")){
mDescription.setText("about:blank"); mDescription.setText(mURL);
} }
mDate.setText(model.getDate()); mDate.setText(model.getDate());
@ -391,7 +391,7 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
onSelectionClear(mSelectedView); onSelectionClear(mSelectedView);
} }
if(!model.getSession().equals(mModelList.get(0).getSession()) && !status.sTabGridLayoutEnabled){ //if(!model.getSession().equals(mModelList.get(0).getSession()) && !status.sTabGridLayoutEnabled){
Drawable mDrawable; Drawable mDrawable;
Resources res = itemView.getContext().getResources(); Resources res = itemView.getContext().getResources();
try { try {
@ -399,7 +399,7 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
itemView.setBackground(mDrawable); itemView.setBackground(mDrawable);
} catch (Exception ignored) { } catch (Exception ignored) {
} }
} //}
} }
new Handler().postDelayed(() -> new Handler().postDelayed(() ->
@ -480,6 +480,9 @@ public class tabAdapter extends RecyclerView.Adapter<tabAdapter.listViewHolder>
notifyItemChanged(mModelList.size()-1); notifyItemChanged(mModelList.size()-1);
}else { }else {
v.setFocusable(false);
v.setClickable(false);
v.setEnabled(false);
if(status.sTabGridLayoutEnabled){ if(status.sTabGridLayoutEnabled){
scaleView(itemView, mModelList.get(this.getLayoutPosition())); scaleView(itemView, mModelList.get(this.getLayoutPosition()));
}else { }else {

View File

@ -1,5 +1,7 @@
package com.darkweb.genesissearchengine.appManager.tabManager; package com.darkweb.genesissearchengine.appManager.tabManager;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator; import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder; import android.animation.PropertyValuesHolder;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
@ -120,7 +122,7 @@ public class tabController extends Fragment
initSwipe(); initSwipe();
mClosed = false; mClosed = false;
mFirstLaunch = false; mClosedByNewTab = false;
mTabGridLayoutEnabled = status.sTabGridLayoutEnabled; mTabGridLayoutEnabled = status.sTabGridLayoutEnabled;
mtabViewController.onTrigger(tabEnums.eTabViewCommands.ON_RELEASE_BLOCKER, null); mtabViewController.onTrigger(tabEnums.eTabViewCommands.ON_RELEASE_BLOCKER, null);
mNestedScrollView.scrollTo(0,0); mNestedScrollView.scrollTo(0,0);
@ -136,35 +138,38 @@ public class tabController extends Fragment
ObjectAnimator alpha = ObjectAnimator.ofPropertyValuesHolder(mRecycleView, PropertyValuesHolder.ofFloat("alpha", 0, 1f)); ObjectAnimator alpha = ObjectAnimator.ofPropertyValuesHolder(mRecycleView, PropertyValuesHolder.ofFloat("alpha", 0, 1f));
alpha.setDuration(300); alpha.setDuration(300);
alpha.setStartDelay(600); alpha.setStartDelay(500);
alpha.start(); alpha.start();
mEmptyView.setAlpha(0); mEmptyView.setAlpha(0);
new Handler().postDelayed(() ->
{
mEmptyView.setAlpha(1);
}, 1000);
}else {
mRecycleView.setAlpha(1);
mEmptyView.setAlpha(1);
}
initializeList(); initializeList();
mClosed = false;
mtabViewController.onTrigger(tabEnums.eTabViewCommands.ON_RELEASE_BLOCKER, null);
mNestedScrollView.scrollTo(0,0);
mtabViewController.onTrigger(tabEnums.eTabViewCommands.ON_HIDE_UNDO_DIALOG_INIT, null);
mTabAdapter.notifyDataSetChanged();
mEmptyView.animate().setStartDelay(1200).setDuration(0).alpha(1);
}else {
initializeList();
mRecycleView.setAlpha(1);
mEmptyView.setAlpha(1);
mClosed = false; mClosed = false;
mtabViewController.onTrigger(tabEnums.eTabViewCommands.ON_RELEASE_BLOCKER, null); mtabViewController.onTrigger(tabEnums.eTabViewCommands.ON_RELEASE_BLOCKER, null);
mNestedScrollView.scrollTo(0,0); mNestedScrollView.scrollTo(0,0);
mtabViewController.onTrigger(tabEnums.eTabViewCommands.ON_HIDE_UNDO_DIALOG_INIT, null); mtabViewController.onTrigger(tabEnums.eTabViewCommands.ON_HIDE_UNDO_DIALOG_INIT, null);
mTabAdapter.notifyDataSetChanged(); mTabAdapter.notifyDataSetChanged();
} }
}
public void onInitFirstElement(){ public void onInitFirstElement(){
if(mTabAdapter!=null){
mHomeController.runOnUiThread(() -> { mHomeController.runOnUiThread(() -> {
if(mTabAdapter!=null){
if(mBlocker.getVisibility() != View.VISIBLE){ if(mBlocker.getVisibility() != View.VISIBLE){
mTabAdapter.notifyItemChanged(0); mTabAdapter.notifyItemChanged(0);
} }
});
} }
});
} }
public void initializeActivity(){ public void initializeActivity(){
@ -398,7 +403,7 @@ public class tabController extends Fragment
mClosedByNewTab = false; mClosedByNewTab = false;
onPostExit(); onPostExit();
onBackPressed(); //onBackPressed();
onClose(); onClose();
} }
else { else {
@ -408,27 +413,26 @@ public class tabController extends Fragment
public void onRestoreTab(View view){ public void onRestoreTab(View view){
ArrayList<tabRowModel> mBackup = (ArrayList<tabRowModel>)mListModel.onTrigger(tabEnums.eModelCallback.M_LOAD_BACKUP,null);
final Handler handler = new Handler(); final Handler handler = new Handler();
handler.postDelayed(() -> handler.postDelayed(() ->
{ {
ArrayList<tabRowModel> mBackup = (ArrayList<tabRowModel>)mListModel.onTrigger(tabEnums.eModelCallback.M_LOAD_BACKUP,null);
mPopupUndo.findViewById(R.id.pBlockerUndo).setVisibility(View.VISIBLE); mPopupUndo.findViewById(R.id.pBlockerUndo).setVisibility(View.VISIBLE);
mListModel.onTrigger(tabEnums.eModelCallback.M_CLEAR_BACKUP_RETAIN_DATABASE,null);
if(mRecycleView.getAlpha()==0){ if(mRecycleView.getAlpha()==0){
mTabAdapter.notifyDataSetChanged();
initializeList();
mRecycleView.animate().cancel(); mRecycleView.animate().cancel();
mRecycleView.setVisibility(View.VISIBLE); mRecycleView.setVisibility(View.VISIBLE);
mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.REINIT_DATA, Collections.singletonList(mBackup));
mTabAdapter.notifyDataSetChanged();
mRecycleView.animate().setDuration(200).alpha(1).withEndAction(() -> mtabViewController.onTrigger(tabEnums.eTabViewCommands.ON_HIDE_UNDO_DIALOG, null)); mRecycleView.animate().setDuration(200).alpha(1).withEndAction(() -> mtabViewController.onTrigger(tabEnums.eTabViewCommands.ON_HIDE_UNDO_DIALOG, null));
}else { }else {
mtabViewController.onTrigger(tabEnums.eTabViewCommands.ON_HIDE_UNDO_DIALOG, null); mtabViewController.onTrigger(tabEnums.eTabViewCommands.ON_HIDE_UNDO_DIALOG, null);
mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.REINIT_DATA, Collections.singletonList(mBackup)); mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.REINIT_DATA, Collections.singletonList(mBackup));
} }
mListModel.onTrigger(tabEnums.eModelCallback.M_CLEAR_BACKUP_RETAIN_DATABASE,null);
}, 100);
activityContextManager.getInstance().getHomeController().onLoadTabFromTabController(); activityContextManager.getInstance().getHomeController().onLoadTabFromTabController();
}, 100);
} }
public void onShowUndoDialog(){ public void onShowUndoDialog(){
@ -522,19 +526,18 @@ public class tabController extends Fragment
public void onMenuTrigger(View pView){ public void onMenuTrigger(View pView){
if(pView.getId() == R.id.pNewTab){ if(pView.getId() == R.id.pNewTab){
onNewTabInvoked(); onNewTabInvoked();
mClosedByNewTab = true;
mHomeController.onBackPressed(); mHomeController.onBackPressed();
mClosedByNewTab = true;
} }
if(pView.getId() == R.id.pNewTabMenu){ if(pView.getId() == R.id.pNewTabMenu){
onNewTabInvoked(); onNewTabInvoked();
mClosedByNewTab = true;
mHomeController.onBackPressed(); mHomeController.onBackPressed();
mClosedByNewTab = true;
} }
else if(pView.getId() == R.id.pCloseTab){ else if(pView.getId() == R.id.pCloseTab){
mRecycleView.animate().setDuration(200).alpha(0).withEndAction(() -> { onExitAndClearBackup();
ArrayList<tabRowModel> mBackup = (ArrayList<tabRowModel>)mListModel.onTrigger(tabEnums.eModelCallback.M_GET_BACKUP,null); mRecycleView.animate().setDuration(250).alpha(0).withEndAction(() -> {
mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.REMOVE_ALL, null); mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.REMOVE_ALL, null);
onClearTabBackup();
}); });
} }
else if(pView.getId() == R.id.pOpenSetting){ else if(pView.getId() == R.id.pOpenSetting){
@ -568,7 +571,7 @@ public class tabController extends Fragment
public void onBackPressed() { public void onBackPressed() {
if(mTabAdapter!=null && !mClosedByNewTab){ if(mTabAdapter!=null){
boolean mStatus = (boolean) mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.M_SELECTION_MENU_SHOWING, null); boolean mStatus = (boolean) mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.M_SELECTION_MENU_SHOWING, null);
onClearTabBackup(); onClearTabBackup();
onClearSelection(null); onClearSelection(null);

View File

@ -48,10 +48,10 @@ class tabModel
} }
private ArrayList<tabRowModel> onLoadBackup(){ private ArrayList<tabRowModel> onLoadBackup(){
for(int mCounter=0;mCounter<mBackupIndex.size();mCounter++){ mModelList.addAll(0, mBackupIndex);
mModelList.add(0,mBackupIndex.get(mCounter)); ArrayList<tabRowModel> mModelListTemp = new ArrayList<>();
} mModelListTemp.addAll(mBackupIndex);
return mBackupIndex; return mModelListTemp;
} }

View File

@ -10,7 +10,6 @@ public class constants
public static final String CONST_SOFTWARE_URL = "https://boogle.store/search?q=softwares+tools&p_num=1&s_type=all&p_num=1&s_type=all"; public static final String CONST_SOFTWARE_URL = "https://boogle.store/search?q=softwares+tools&p_num=1&s_type=all&p_num=1&s_type=all";
public static final String CONST_SOFTWARE_FINANCE = "https://boogle.store/search?q=finance&p_num=1&s_type=all&p_num=1&s_type=all"; public static final String CONST_SOFTWARE_FINANCE = "https://boogle.store/search?q=finance&p_num=1&s_type=all&p_num=1&s_type=all";
public static final String CONST_COMMUNITIES = "https://boogle.store/search?q=news&p_num=1&s_type=all&p_num=1&s_type=all"; public static final String CONST_COMMUNITIES = "https://boogle.store/search?q=news&p_num=1&s_type=all&p_num=1&s_type=all";
public static final String CONST_MARKET_URL = "https://boogle.store/search?q=news&p_num=1&s_type=all&p_num=1&s_type=all";
public static final String CONST_SERVER = "https://drive.google.com/uc?export=download&id=1es7XOAWCktGGfSnJu_o8W4_LZuudjR-T"; public static final String CONST_SERVER = "https://drive.google.com/uc?export=download&id=1es7XOAWCktGGfSnJu_o8W4_LZuudjR-T";
public static final String CONST_PLAYSTORE_URL = "http://play.google.com/store/apps/details?id=com.darkweb.genesissearchengine"; public static final String CONST_PLAYSTORE_URL = "http://play.google.com/store/apps/details?id=com.darkweb.genesissearchengine";
public static final String CONST_PRIVACY_POLICY_URL = "https://boogle.store/privacy"; public static final String CONST_PRIVACY_POLICY_URL = "https://boogle.store/privacy";
@ -52,14 +51,6 @@ public class constants
public static final String CONST_LOGS_DEFAULT_MESSAGE = "Genesis on standby at the moment"; public static final String CONST_LOGS_DEFAULT_MESSAGE = "Genesis on standby at the moment";
/*HISTORY CONSTANTS*/
public static final String CONST_HISTORY_LOAD_MORE = "loading_more";
/*BOOKMARK CONSTANTS*/
public static final String CONST_BOOKMARK_LOAD_MORE = "loading_more";
/*MENU CONSTANTS*/ /*MENU CONSTANTS*/
public static final int CONST_LIST_HISTORY = 1; public static final int CONST_LIST_HISTORY = 1;
@ -73,10 +64,6 @@ public class constants
public static final String CONST_DATABASE_NAME ="genesis_dbase"; public static final String CONST_DATABASE_NAME ="genesis_dbase";
public static final String CONST_PERCENTAGE_SIGN ="%"; public static final String CONST_PERCENTAGE_SIGN ="%";
/*ANALYTICS CONSTANTS*/
public static final String CONST_UNIQUE_KEY_ID = "*PREF_UNIQUE_ID";
/*Notification Manager*/ /*Notification Manager*/
public static final String CONST_NOTIFICATION_ID_NAME = "NOTIFICATION:INDENTIFIER:1001"; public static final String CONST_NOTIFICATION_ID_NAME = "NOTIFICATION:INDENTIFIER:1001";

View File

@ -4,11 +4,11 @@ public class enums
{ {
/*Settings Manager*/ /*Settings Manager*/
public enum etype{ public enum etype{
on_update_favicon,ON_UPDATE_TAB_TITLE, ON_OPEN_TAB_VIEW,ON_NEW_TAB_ANIMATION, ON_LOAD_REQUEST,GECKO_SCROLL_CHANGED,GECKO_SCROLL_FINISHED,ON_UPDATE_SEARCH_BAR,M_ON_MAIL,SESSION_ID,M_UPDATE_PIXEL_BACKGROUND,M_CACHE_UPDATE_TAB, on_update_favicon,ON_UPDATE_TAB_TITLE, ON_OPEN_TAB_VIEW,ON_NEW_TAB_ANIMATION, ON_LOAD_REQUEST,GECKO_SCROLL_CHANGED,ON_UPDATE_SEARCH_BAR,M_ON_MAIL,SESSION_ID,M_UPDATE_PIXEL_BACKGROUND,M_CACHE_UPDATE_TAB,
on_verify_selected_url_menu,FINDER_RESULT_CALLBACK,M_ADMOB_BANNER_RECHECK,M_OPEN_SESSION, on_verify_selected_url_menu,FINDER_RESULT_CALLBACK,M_ADMOB_BANNER_RECHECK,M_OPEN_SESSION,
welcome, reload,download_folder, M_UPDATE_THEME,M_ON_BANNER_UPDATE, M_LOAD_HOMEPAGE_GENESIS,M_INIT_TAB_COUNT,M_INIT_TAB_COUNT_FORCED,M_SPLASH_DISABLE,M_NEW_LINK_IN_NEW_TAB, 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, fetch_thumbnail,url_clear_at,remove_from_database,is_empty,M_HOME_PAGE,M_PRELOAD_URL,ON_KEYBOARD_CLOSE,M_CLOSE_TAB, url_triggered, url_triggered_new_tab,url_clear,fetch_favicon,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_INITIALIZE_TAB_SINGLE, M_INITIALIZE_TAB_LINK,on_request_completed, on_update_history,on_update_suggestion,M_WELCOME_MESSAGE,ON_UPDATE_TITLE_BAR,ON_FIRST_PAINT, ON_LOAD_TAB_ON_RESUME, ON_SESSION_REINIT,on_page_loaded,on_load_error,download_file_popup,on_init_ads,search_update, open_new_tab 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_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,download_file_popup,on_init_ads,search_update, open_new_tab,open_new_tab_instant
} }
/*General Enums*/ /*General Enums*/

View File

@ -20,16 +20,17 @@ public class status
public static int mNotificationID = 1001; public static int mNotificationID = 1001;
/*Settings Status*/ /*Settings Status*/
public static Locale mSystemLocale = null;
public static String sSettingSearchStatus = constants.CONST_BACKEND_GENESIS_URL; public static String sSettingSearchStatus = constants.CONST_BACKEND_GENESIS_URL;
public static String sSettingRedirectStatus = strings.GENERIC_EMPTY_STR; public static String sSettingRedirectStatus = strings.GENERIC_EMPTY_STR;
public static String sSettingLanguage = "en"; public static String sSettingLanguage = "en";
public static String sSettingLanguageRegion = "Us"; public static String sSettingLanguageRegion = "Us";
public static String mReferenceWebsites; public static String sReferenceWebsites;
public static String sBridgeCustomBridge = strings.GENERIC_EMPTY_STR; public static String sBridgeCustomBridge = strings.GENERIC_EMPTY_STR;
public static String sBridgeCustomType = strings.GENERIC_EMPTY_STR; public static String sBridgeCustomType = strings.GENERIC_EMPTY_STR;
public static String sVersion = ""; public static String sVersion = "";
public static Locale mSystemLocale = null; public static String sExternalWebsite = strings.GENERIC_EMPTY_STR;
public static boolean sSettingEnableZoom = true; public static boolean sSettingEnableZoom = true;
public static boolean sSettingEnableVoiceInput = true; public static boolean sSettingEnableVoiceInput = true;
@ -105,7 +106,7 @@ public class status
status.sSettingCookieStatus = (int)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_INT, Arrays.asList(keys.SETTING_COOKIE_ADJUSTABLE,ACCEPT_FIRST_PARTY)); status.sSettingCookieStatus = (int)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_INT, Arrays.asList(keys.SETTING_COOKIE_ADJUSTABLE,ACCEPT_FIRST_PARTY));
status.sSettingFontSize = (int)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_FLOAT, Arrays.asList(keys.SETTING_FONT_SIZE,100)); status.sSettingFontSize = (int)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_FLOAT, Arrays.asList(keys.SETTING_FONT_SIZE,100));
status.sSettingLanguage = (String)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_STRING, Arrays.asList(keys.SETTING_LANGUAGE,strings.SETTING_DEFAULT_LANGUAGE)); status.sSettingLanguage = (String)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_STRING, Arrays.asList(keys.SETTING_LANGUAGE,strings.SETTING_DEFAULT_LANGUAGE));
status.mReferenceWebsites = (String)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_STRING, Arrays.asList(keys.HOME_REFERENCE_WEBSITES,strings.HOME_REFERENCE_WEBSITES_DEFAULT)); status.sReferenceWebsites = (String)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_STRING, Arrays.asList(keys.HOME_REFERENCE_WEBSITES,strings.HOME_REFERENCE_WEBSITES_DEFAULT));
status.sSettingLanguageRegion = (String)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_STRING, Arrays.asList(keys.SETTING_LANGUAGE_REGION,strings.SETTING_DEFAULT_LANGUAGE_REGION)); status.sSettingLanguageRegion = (String)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_STRING, Arrays.asList(keys.SETTING_LANGUAGE_REGION,strings.SETTING_DEFAULT_LANGUAGE_REGION));
status.sSettingSearchStatus = (String)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_STRING, Arrays.asList(keys.SETTING_SEARCH_ENGINE,constants.CONST_BACKEND_GENESIS_URL)); status.sSettingSearchStatus = (String)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_STRING, Arrays.asList(keys.SETTING_SEARCH_ENGINE,constants.CONST_BACKEND_GENESIS_URL));
status.sBridgeCustomBridge = (String)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_STRING, Arrays.asList(keys.BRIDGE_CUSTOM_BRIDGE_1,strings.BRIDGE_CUSTOM_BRIDGE_OBFS4)); status.sBridgeCustomBridge = (String)dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_STRING, Arrays.asList(keys.BRIDGE_CUSTOM_BRIDGE_1,strings.BRIDGE_CUSTOM_BRIDGE_OBFS4));

View File

@ -28,7 +28,6 @@ public class strings
public static final String BRIDGE_CUSTOM_BRIDGE_OBFS4 = "obfs4"; public static final String BRIDGE_CUSTOM_BRIDGE_OBFS4 = "obfs4";
public static final String BRIDGE_CUSTOM_BRIDGE_MEEK = "meek"; public static final String BRIDGE_CUSTOM_BRIDGE_MEEK = "meek";
public static final String BRIDGE_CUSTOM_BRIDGE_CUSTOM = "custom";
/*Generic*/ /*Generic*/

View File

@ -19,7 +19,7 @@ public class referenceWebsiteDataModel {
private boolean mLoading = false; private boolean mLoading = false;
public referenceWebsiteDataModel(){ public referenceWebsiteDataModel(){
mReferenceWebsiteData = status.mReferenceWebsites; mReferenceWebsiteData = status.sReferenceWebsites;
} }
private void onLoad(Context pContext){ private void onLoad(Context pContext){
@ -30,15 +30,15 @@ public class referenceWebsiteDataModel {
response -> { response -> {
if(response.length()>10){ if(response.length()>10){
mReferenceWebsiteData = response; mReferenceWebsiteData = response;
status.mReferenceWebsites = response; status.sReferenceWebsites = response;
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_STRING, Arrays.asList(keys.HOME_REFERENCE_WEBSITES,status.mReferenceWebsites)); dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_STRING, Arrays.asList(keys.HOME_REFERENCE_WEBSITES,status.sReferenceWebsites));
mLoading = false; mLoading = false;
}else { }else {
mReferenceWebsiteData = status.mReferenceWebsites; mReferenceWebsiteData = status.sReferenceWebsites;
} }
}, },
error -> { error -> {
mReferenceWebsiteData = status.mReferenceWebsites; mReferenceWebsiteData = status.sReferenceWebsites;
mLoading = false; mLoading = false;
}); });

View File

@ -1,22 +1,17 @@
package com.darkweb.genesissearchengine.dataManager; package com.darkweb.genesissearchengine.dataManager;
import android.content.Context; import android.content.Context;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.style.SuggestionSpan;
import android.view.textservice.SentenceSuggestionsInfo; import android.view.textservice.SentenceSuggestionsInfo;
import android.view.textservice.SpellCheckerSession; import android.view.textservice.SpellCheckerSession;
import android.view.textservice.SuggestionsInfo; import android.view.textservice.SuggestionsInfo;
import android.view.textservice.TextServicesManager; import android.view.textservice.TextServicesManager;
import com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkRowModel; import com.darkweb.genesissearchengine.appManager.bookmarkManager.bookmarkRowModel;
import com.darkweb.genesissearchengine.appManager.historyManager.historyRowModel; import com.darkweb.genesissearchengine.appManager.historyManager.historyRowModel;
import com.darkweb.genesissearchengine.constants.constants;
import com.darkweb.genesissearchengine.constants.status; import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.constants.strings; import com.darkweb.genesissearchengine.constants.strings;
import com.darkweb.genesissearchengine.helperManager.helperMethod;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.regex.Pattern;
public class suggestionDataModel implements SpellCheckerSession.SpellCheckerSessionListener { public class suggestionDataModel implements SpellCheckerSession.SpellCheckerSessionListener {
@ -38,20 +33,70 @@ public class suggestionDataModel implements SpellCheckerSession.SpellCheckerSess
/*Helper Methods*/ /*Helper Methods*/
private ArrayList<historyRowModel> getDefaultSuggestions(String pQuery, int mSize){
private ArrayList<historyRowModel> getDefaultSuggestionsOnStart(String pQuery, int mSize, ArrayList<String> mDuplicationHandler, boolean pDefaultHostChaned){
mCurrentList.clear();
if(!pQuery.equals(strings.GENERIC_EMPTY_STR) && !pQuery.equals("about:blank") && !pQuery.contains("?") && !pQuery.contains("/") && !pQuery.contains(" ") && !pQuery.contains(" ") && !pQuery.contains("\n")){
mCurrentList.size();
int sepPos = pQuery.indexOf(".");
if (sepPos == -1) {
mCurrentList.add( 0, new historyRowModel(pQuery+".com", strings.GENERIC_EMPTY_STR,-1));
mCurrentList.add( 0, new historyRowModel(pQuery+".onion", strings.GENERIC_EMPTY_STR,-1));
}else
{
if(!pQuery.equals(pQuery.substring(0,sepPos)+".com")){
mCurrentList.add( 0, new historyRowModel(pQuery.substring(0,sepPos)+".com", strings.GENERIC_EMPTY_STR,-1));
}
if(!pQuery.equals(pQuery.substring(0,sepPos)+".onion")){
mCurrentList.add( 0, new historyRowModel(pQuery.substring(0,sepPos)+".onion", strings.GENERIC_EMPTY_STR,-1));
}
}
}
mCurrentList.add( 0,new historyRowModel(pQuery, strings.GENERIC_EMPTY_STR,-1));
return mCurrentList;
}
private ArrayList<historyRowModel> getDefaultSuggestions(String pQuery, int mSize, ArrayList<String> mDuplicationHandler, boolean pDefaultHostChaned){
for(int count = 0; count<= mHintListLocalCache.size()-1 && mHintListLocalCache.size()<500; count++){ for(int count = 0; count<= mHintListLocalCache.size()-1 && mHintListLocalCache.size()<500; count++){
if(mHintListLocalCache.get(count).getHeader().toLowerCase().contains(pQuery)){ if(mHintListLocalCache.get(count).getHeader().toLowerCase().contains(pQuery)){
mCurrentList.add(new historyRowModel(mHintListLocalCache.get(count).getHeader(),mHintListLocalCache.get(count).getDescription(),-1)); if(mHintListLocalCache.get(count).getHeader().toLowerCase().startsWith(pQuery)){
}else if(mHintListLocalCache.get(count).getDescription().toLowerCase().contains(pQuery)){ if(mDuplicationHandler!=null && !mDuplicationHandler.contains(mHintListLocalCache.get(count).getDescriptionParsed())) {
if(mCurrentList.size()==0){ if(pDefaultHostChaned){
mCurrentList.add(new historyRowModel(mHintListLocalCache.get(count).getHeader(),mHintListLocalCache.get(count).getDescription(),-1)); mCurrentList.add(1, new historyRowModel(mHintListLocalCache.get(count).getHeader(), mHintListLocalCache.get(count).getDescriptionParsed(), -1));
}else { }else {
mCurrentList.add(new historyRowModel(mHintListLocalCache.get(count).getHeader(),mHintListLocalCache.get(count).getDescription(),-1)); mCurrentList.add(0, new historyRowModel(mHintListLocalCache.get(count).getHeader(), mHintListLocalCache.get(count).getDescriptionParsed(), -1));
} }
} }
if(mCurrentList.size() + mSize > 6){ if(mCurrentList.size() + mSize > 6){
break; break;
} }
}else {
if(mCurrentList.size() + mSize <= 6){
mCurrentList.add(new historyRowModel(mHintListLocalCache.get(count).getHeader(),mHintListLocalCache.get(count).getDescriptionParsed(),-1));
}
}
}else if(mHintListLocalCache.get(count).getDescriptionParsed().toLowerCase().contains(pQuery)){
if(mHintListLocalCache.get(count).getHeader().toLowerCase().startsWith(pQuery)){
if(mDuplicationHandler!=null && !mDuplicationHandler.contains(mHintListLocalCache.get(count).getDescriptionParsed())) {
if(pDefaultHostChaned){
mCurrentList.add(1, new historyRowModel(mHintListLocalCache.get(count).getHeader(), mHintListLocalCache.get(count).getDescriptionParsed(), -1));
}else {
mCurrentList.add(0, new historyRowModel(mHintListLocalCache.get(count).getHeader(), mHintListLocalCache.get(count).getDescriptionParsed(), -1));
}
}
if(mCurrentList.size() + mSize > 6){
break;
}
}else {
if(mCurrentList.size() + mSize <= 6){
mCurrentList.add(new historyRowModel(mHintListLocalCache.get(count).getHeader(),mHintListLocalCache.get(count).getDescriptionParsed(),-1));
}
}
}
} }
return mCurrentList; return mCurrentList;
@ -111,37 +156,61 @@ public class suggestionDataModel implements SpellCheckerSession.SpellCheckerSess
} }
} }
if(mCurrentList.size()<6) { boolean mDefaultHostChaned = false;
getDefaultSuggestions(pQuery, mCurrentList.size()); if(mCurrentList.size()>3){
String mHost1 = helperMethod.getHost(helperMethod.completeURL(mCurrentList.get(0).getDescription()));
String mHost2 = helperMethod.getHost(helperMethod.completeURL(mCurrentList.get(1).getDescription()));
String mHost3 = helperMethod.getHost(helperMethod.completeURL(mCurrentList.get(2).getDescription()));
String mHostReal = mHost1.replace("www.","");
if(mHost1.equals(mHost2) && mHost1.equals(mHost3) && !mDuplicationHandler.contains(mHostReal)){
mCurrentList.add( 0,new historyRowModel(mHostReal, strings.GENERIC_EMPTY_STR,-1));
mDuplicationHandler.add(mHostReal);
}
mDefaultHostChaned = true;
} }
getDefaultSuggestions(pQuery, mCurrentList.size(), mDuplicationHandler, mDefaultHostChaned);
boolean mHostAppend = false;
if(mCurrentList.size()>1 && helperMethod.getHost(helperMethod.completeURL(mCurrentList.get(0).getDescription())).equals(helperMethod.completeURL(mCurrentList.get(1).getDescription()))){
mHostAppend = true;
}
int mSize = mCurrentList.size();
if(mCurrentList.size()<3){ if(mCurrentList.size()<3){
if(!mQueryOriginal.equals(strings.GENERIC_EMPTY_STR) && !mQueryOriginal.equals("about:blank") && !mQueryOriginal.contains("?") && !mQueryOriginal.contains("/") && !mQueryOriginal.contains(" ") && !mQueryOriginal.contains(" ") && !mQueryOriginal.contains("\n")){ if(!mQueryOriginal.equals(strings.GENERIC_EMPTY_STR) && !mQueryOriginal.equals("about:blank") && !mQueryOriginal.contains("?") && !mQueryOriginal.contains("/") && !mQueryOriginal.contains(" ") && !mQueryOriginal.contains(" ") && !mQueryOriginal.contains("\n")){
mCurrentList.size(); mCurrentList.size();
int sepPos = pQuery.indexOf("."); int sepPos = pQuery.indexOf(".");
if (sepPos == -1) { if (sepPos == -1) {
mCurrentList.add( 0,new historyRowModel(mQueryOriginal+".com", strings.GENERIC_EMPTY_STR,-1)); mCurrentList.add( mSize, new historyRowModel(mQueryOriginal+".com", strings.GENERIC_EMPTY_STR,-1));
mCurrentList.add( 0,new historyRowModel(mQueryOriginal+".onion", strings.GENERIC_EMPTY_STR,-1)); mCurrentList.add( mSize, new historyRowModel(mQueryOriginal+".onion", strings.GENERIC_EMPTY_STR,-1));
}else }else
{ {
if(!pQuery.equals(pQuery.substring(0,sepPos)+".com")){ if(!pQuery.equals(pQuery.substring(0,sepPos)+".com")){
mCurrentList.add( 0,new historyRowModel(pQuery.substring(0,sepPos)+".com", strings.GENERIC_EMPTY_STR,-1)); mCurrentList.add( mSize, new historyRowModel(pQuery.substring(0,sepPos)+".com", strings.GENERIC_EMPTY_STR,-1));
} }
if(!pQuery.equals(pQuery.substring(0,sepPos)+".onion")){ if(!pQuery.equals(pQuery.substring(0,sepPos)+".onion")){
mCurrentList.add( 0,new historyRowModel(pQuery.substring(0,sepPos)+".onion", strings.GENERIC_EMPTY_STR,-1)); mCurrentList.add( mSize, new historyRowModel(pQuery.substring(0,sepPos)+".onion", strings.GENERIC_EMPTY_STR,-1));
} }
} }
} }
} }
if(mHostAppend){
if(mCurrentList.get(0).getDescription().startsWith(pQuery)){
mCurrentList.add( mSize,new historyRowModel(mCurrentList.get(0).getHeader(), mCurrentList.get(0).getDescription(),-1));
}
}
if(pQuery.length()>0){ if(pQuery.length()>0){
if(!pQuery.equals("about:blank")){ if(!pQuery.equals("about:blank")){
mCurrentList.add( 0,new historyRowModel(pQuery, strings.GENERIC_EMPTY_STR,-1)); mCurrentList.add( mSize,new historyRowModel(pQuery, strings.GENERIC_EMPTY_STR,-1));
} }
} }
if(mCurrentList.size()<=0) { if(mCurrentList.size()<=0) {
mCurrentList.add( 0,new historyRowModel("Genesis Search", "genesis.onion",-1)); mCurrentList.add( mSize,new historyRowModel("Genesis Search", "genesis.onion",-1));
} }
return mCurrentList; return mCurrentList;
@ -224,6 +293,7 @@ public class suggestionDataModel implements SpellCheckerSession.SpellCheckerSess
mHintListLocalCache.add(new historyRowModel("Steam Powered","https://steampowered.com",-1 )); mHintListLocalCache.add(new historyRowModel("Steam Powered","https://steampowered.com",-1 ));
mHintListLocalCache.add(new historyRowModel("Macys","https://macys.com",-1 )); mHintListLocalCache.add(new historyRowModel("Macys","https://macys.com",-1 ));
mHintListLocalCache.add(new historyRowModel("Wikihow","https://wikihow.com",-1 )); mHintListLocalCache.add(new historyRowModel("Wikihow","https://wikihow.com",-1 ));
mHintListLocalCache.add(new historyRowModel("Wikipedia","https://en.wikipedia.org/",-1 ));
mHintListLocalCache.add(new historyRowModel("Mail Yahoo","https://mail.yahoo.com",-1 )); mHintListLocalCache.add(new historyRowModel("Mail Yahoo","https://mail.yahoo.com",-1 ));
mHintListLocalCache.add(new historyRowModel("Wiktionary","https://wiktionary.com",-1 )); mHintListLocalCache.add(new historyRowModel("Wiktionary","https://wiktionary.com",-1 ));
mHintListLocalCache.add(new historyRowModel("Cbssports","https://cbssports.com",-1 )); mHintListLocalCache.add(new historyRowModel("Cbssports","https://cbssports.com",-1 ));
@ -266,7 +336,7 @@ public class suggestionDataModel implements SpellCheckerSession.SpellCheckerSess
} }
else if(pCommands == dataEnums.eSuggestionCommands.M_GET_DEFAULT_SUGGESTION) else if(pCommands == dataEnums.eSuggestionCommands.M_GET_DEFAULT_SUGGESTION)
{ {
return getDefaultSuggestions((String) pData.get(0),0); return getDefaultSuggestionsOnStart((String) pData.get(0),0, null, false);
} }
return null; return null;

View File

@ -66,11 +66,11 @@ class tabDataModel
params[2] = mTabModel.getSession().getTheme(); params[2] = mTabModel.getSession().getTheme();
String m_date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS", Locale.ENGLISH).format(Calendar.getInstance().getTime()); String m_date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS", Locale.ENGLISH).format(Calendar.getInstance().getTime());
if(mTabModel.getSession().getTitle().equals("$TITLE") || mTabModel.getSession().getTitle().startsWith("http://loading") || mTabModel.getSession().getTitle().startsWith("loading")){ if(mTabModel.getSession().getTitle().equals("about:blank") || mTabModel.getSession().getTitle().equals("$TITLE") || mTabModel.getSession().getTitle().startsWith("http://loading") || mTabModel.getSession().getTitle().startsWith("loading")){
return enums.AddTabCallback.TAB_ADDED; return enums.AddTabCallback.TAB_ADDED;
} }
if(mTabModel.getSession().getCurrentURL().equals("$TITLE") || mTabModel.getSession().getCurrentURL().startsWith("http://loading") || mTabModel.getSession().getCurrentURL().startsWith("loading")){ if(mTabModel.getSession().getCurrentURL().equals("about:blank") || mTabModel.getSession().getCurrentURL().equals("$TITLE") || mTabModel.getSession().getCurrentURL().startsWith("http://loading") || mTabModel.getSession().getCurrentURL().startsWith("loading")){
return enums.AddTabCallback.TAB_ADDED; return enums.AddTabCallback.TAB_ADDED;
} }
@ -155,7 +155,16 @@ class tabDataModel
params[1] = mTabs.get(counter).getSession().getCurrentURL(); params[1] = mTabs.get(counter).getSession().getCurrentURL();
params[2] = mTabs.get(counter).getSession().getTheme(); params[2] = mTabs.get(counter).getSession().getTheme();
String m_date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS", Locale.ENGLISH).format(Calendar.getInstance().getTime()); String m_date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS", Locale.ENGLISH).format(Calendar.getInstance().getTime());
databaseController.getInstance().execSQL("UPDATE tab SET date = '" + m_date + "' , url = ? , title = ?, theme = ? WHERE mid='"+mTabs.get(counter).getmId() + "'",params);
if(mTabs.get(counter).getSession().getTitle().equals("about:blank") || mTabs.get(counter).getSession().getTitle().equals("$TITLE") || mTabs.get(counter).getSession().getTitle().startsWith("http://loading") || mTabs.get(counter).getSession().getTitle().startsWith("loading")){
return false;
}
if(mTabs.get(counter).getSession().getCurrentURL().equals("about:blank") || mTabs.get(counter).getSession().getCurrentURL().equals("$TITLE") || mTabs.get(counter).getSession().getCurrentURL().startsWith("http://loading") || mTabs.get(counter).getSession().getCurrentURL().startsWith("loading")){
return false;
}
databaseController.getInstance().execSQL("REPLACE INTO tab(mid,date,title,url,theme) VALUES('"+ mTabs.get(counter).getmId() +"','" + m_date + "',?,?,?);",params);
return true; return true;
} }
} }

View File

@ -110,7 +110,7 @@ public class databaseController
do { do {
geckoSession mSession = activityContextManager.getInstance().getHomeController().onNewTabInit(); geckoSession mSession = activityContextManager.getInstance().getHomeController().onNewTabInit();
tabRowModel model = new tabRowModel(c.getString(0), c.getString(1),c.getBlob(4)); tabRowModel model = new tabRowModel(c.getString(0), c.getString(1),c.getBlob(4));
model.setSession(mSession, c.getString(2),c.getString(3), c.getString(5)); model.setSession(mSession, c.getString(3),c.getString(2), c.getString(5));
model.getSession().setSessionID(model.getmId()); model.getSession().setSessionID(model.getmId());
mTempListModel.add(model); mTempListModel.add(model);
} while(c.moveToNext()); } while(c.moveToNext());

View File

@ -4,9 +4,7 @@ import android.content.Intent;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.appManager.activityContextManager; import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController; import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
import com.darkweb.genesissearchengine.constants.status; import com.darkweb.genesissearchengine.constants.status;
@ -30,15 +28,20 @@ public class externalNavigationController extends AppCompatActivity {
return; return;
} }
setContentView(R.layout.home_view);
Intent intent = new Intent(this.getIntent()); Intent intent = new Intent(this.getIntent());
intent.setClassName(this.getApplicationContext(), homeController.class.getName()); intent.setClassName(this.getApplicationContext(), homeController.class.getName());
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
Uri data = this.getIntent().getData(); Uri data = this.getIntent().getData();
if(data!=null){ if(data!=null){
if(activityContextManager.getInstance().getHomeController()!=null){
activityContextManager.getInstance().getHomeController().onOpenLinkNewTab(data.toString()); activityContextManager.getInstance().getHomeController().onOpenLinkNewTab(data.toString());
}else {
status.sExternalWebsite = data.toString();
}
} }
this.startActivity(intent); this.startActivity(intent);
this.overridePendingTransition(0, 0);
new Thread(){ new Thread(){
public void run(){ public void run(){

View File

@ -1,50 +0,0 @@
package com.darkweb.genesissearchengine.helperManager;
import android.app.Activity;
import android.app.Service;
import android.content.Context;
import android.content.res.Configuration;
import android.preference.PreferenceManager;
import android.text.TextUtils;
import com.darkweb.genesissearchengine.constants.status;
import com.example.myapplication.R;
import java.util.Locale;
public class LocaleManager {
private Locale currentLocale;
public void onCreate(Activity activity) {
currentLocale = getSelectedLocale(activity);
setContextLocale(activity, currentLocale);
}
public void onResume(Activity activity) {
}
private static Locale getSelectedLocale(Context context) {
String defaultLanguage = context.getString(R.string.SETTING_DEFAULT_LANGUAGE);
String selectedLanguage = PreferenceManager.getDefaultSharedPreferences(context).getString(
context.getResources().getString(R.string.PREF_LANGUAGE),
defaultLanguage
);
String language[] = TextUtils.split(selectedLanguage, "_");
if (language[0].equals(defaultLanguage))
return Locale.getDefault();
else if (language.length == 2)
return new Locale(language[0], language[1]);
else
return new Locale(language[0]);
}
private static void setContextLocale(Context context, Locale selectedLocale) {
Configuration configuration = context.getResources().getConfiguration();
configuration.locale = new Locale(status.sSettingLanguage);
context.getResources().updateConfiguration(
configuration,
context.getResources().getDisplayMetrics()
);
}
}

View File

@ -1,81 +0,0 @@
package com.darkweb.genesissearchengine.helperManager;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Build;
import android.preference.PreferenceManager;
import android.view.ContextThemeWrapper;
import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController;
import java.util.Locale;
/**
* Created by Umesh on 10/10/16.
*/
public class LocaleUtils {
private static Locale mLocale;
public static void setLocale(Locale locale){
mLocale = locale;
if(mLocale != null){
Locale.setDefault(mLocale);
}
}
public static void updateConfiguration(ContextThemeWrapper wrapper){
if(mLocale != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1){
Configuration configuration = new Configuration();
configuration.setLocale(mLocale);
wrapper.applyOverrideConfiguration(configuration);
}
}
public static void updateConfiguration(homeController application, Configuration configuration){
if(mLocale != null && Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1){
Configuration config = new Configuration(configuration);
config.locale = mLocale;
Resources res = application.getBaseContext().getResources();
res.updateConfiguration(configuration, res.getDisplayMetrics());
}
}
public static void updateConfiguration(Context context, String language, String country){
Locale locale = new Locale(language,country);
setLocale(locale);
if(mLocale != null){
Resources res = context.getResources();
Configuration configuration = res.getConfiguration();
configuration.locale = mLocale;
res.updateConfiguration(configuration,res.getDisplayMetrics());
}
}
public static String getPrefLangCode(Context context) {
return PreferenceManager.getDefaultSharedPreferences(context).getString("lang_code","en");
}
public static void setPrefLangCode(Context context, String mPrefLangCode) {
SharedPreferences.Editor editor = PreferenceManager.getDefaultSharedPreferences(context).edit();
editor.putString("lang_code",mPrefLangCode);
editor.commit();
}
public static String getPrefCountryCode(Context context) {
return PreferenceManager.getDefaultSharedPreferences(context).getString("country_code","US");
}
public static void setPrefCountryCode(Context context,String mPrefCountryCode) {
SharedPreferences.Editor editor = PreferenceManager.getDefaultSharedPreferences(context).edit();
editor.putString("country_code",mPrefCountryCode);
editor.commit();
}
}

View File

@ -1,67 +0,0 @@
package com.darkweb.genesissearchengine.helperManager;
import android.content.Context;
import android.view.GestureDetector;
import android.view.GestureDetector.SimpleOnGestureListener;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
public class OnSwipeTouchListener implements OnTouchListener {
private final GestureDetector gestureDetector;
public OnSwipeTouchListener (Context ctx){
gestureDetector = new GestureDetector(ctx, new GestureListener());
}
@Override
public boolean onTouch(View v, MotionEvent event) {
return gestureDetector.onTouchEvent(event);
}
private final class GestureListener extends SimpleOnGestureListener {
private static final int SWIPE_THRESHOLD = 100;
private static final int SWIPE_VELOCITY_THRESHOLD = 100;
@Override
public boolean onDown(MotionEvent e) {
onTap();
return true;
}
@Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
boolean result = false;
try {
float diffY = e2.getY() - e1.getY();
float diffX = e2.getX() - e1.getX();
if (Math.abs(diffX) > Math.abs(diffY)) {
if (Math.abs(diffX) > SWIPE_THRESHOLD && Math.abs(velocityX) > SWIPE_VELOCITY_THRESHOLD) {
if (diffX > 0) {
onSwipeRight();
} else {
onSwipeLeft();
}
result = true;
}
}
else if (Math.abs(diffY) > SWIPE_THRESHOLD && Math.abs(velocityY) > SWIPE_VELOCITY_THRESHOLD) {
if (diffY > 0) {
onSwipeBottom();
} else {
onSwipeTop();
}
result = true;
}
} catch (Exception exception) {
exception.printStackTrace();
}
return result;
}
}
public void onSwipeRight() {
}
public void onSwipeLeft() {
}
public void onSwipeTop() {
}
public void onSwipeBottom() {
}
public void onTap() {
}
}

View File

@ -1,23 +0,0 @@
package com.darkweb.genesissearchengine.helperManager;
import com.android.volley.toolbox.HurlStack;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.InetSocketAddress;
import java.net.Proxy;
import java.net.URL;
import static com.darkweb.genesissearchengine.constants.constants.CONST_PROXY_SOCKS;
public class ProxiedHurlStack extends HurlStack {
private static final String PROXY_ADDRESS = CONST_PROXY_SOCKS;
private static final int PROXY_PORT = 9050;
@Override
protected HttpURLConnection createConnection(URL url) throws IOException {
Proxy proxy = new Proxy(Proxy.Type.SOCKS,
InetSocketAddress.createUnresolved(PROXY_ADDRESS, PROXY_PORT));
return (HttpURLConnection) url.openConnection(proxy);
}
}

View File

@ -0,0 +1,138 @@
package com.darkweb.genesissearchengine.helperManager;
import android.text.TextUtils;
import androidx.annotation.Nullable;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Proxy;
import java.net.URI;
import java.net.URLConnection;
import java.util.List;
public class ProxySelector {
public static URLConnection openConnectionWithProxy(final URI uri) throws IOException {
final java.net.ProxySelector ps = java.net.ProxySelector.getDefault();
Proxy proxy = Proxy.NO_PROXY;
if (ps != null) {
final List<Proxy> proxies = ps.select(uri);
if (proxies != null && !proxies.isEmpty()) {
proxy = proxies.get(0);
}
}
return uri.toURL().openConnection(ProxySettings.getProxy());
}
public ProxySelector() {
}
public Proxy select(String scheme, String host) {
int port = -1;
Proxy proxy = null;
String nonProxyHostsKey = null;
boolean httpProxyOkay = true;
if ("http".equalsIgnoreCase(scheme)) {
port = 80;
nonProxyHostsKey = "http.nonProxyHosts";
proxy = lookupProxy("http.proxyHost", "http.proxyPort", Proxy.Type.HTTP, port);
} else if ("https".equalsIgnoreCase(scheme)) {
port = 443;
nonProxyHostsKey = "https.nonProxyHosts"; // RI doesn't support this
proxy = lookupProxy("https.proxyHost", "https.proxyPort", Proxy.Type.HTTP, port);
} else if ("ftp".equalsIgnoreCase(scheme)) {
port = 80; // not 21 as you might guess
nonProxyHostsKey = "ftp.nonProxyHosts";
proxy = lookupProxy("ftp.proxyHost", "ftp.proxyPort", Proxy.Type.HTTP, port);
} else if ("socket".equalsIgnoreCase(scheme)) {
httpProxyOkay = false;
} else {
return Proxy.NO_PROXY;
}
if (nonProxyHostsKey != null
&& isNonProxyHost(host, System.getProperty(nonProxyHostsKey))) {
return Proxy.NO_PROXY;
}
if (proxy != null) {
return proxy;
}
if (httpProxyOkay) {
proxy = lookupProxy("proxyHost", "proxyPort", Proxy.Type.HTTP, port);
if (proxy != null) {
return proxy;
}
}
proxy = lookupProxy("socksProxyHost", "socksProxyPort", Proxy.Type.SOCKS, 1080);
if (proxy != null) {
return proxy;
}
return Proxy.NO_PROXY;
}
/**
* Returns the proxy identified by the {@code hostKey} system property, or
* null.
*/
@Nullable
private Proxy lookupProxy(String hostKey, String portKey, Proxy.Type type, int defaultPort) {
final String host = System.getProperty(hostKey);
if (TextUtils.isEmpty(host)) {
return null;
}
final int port = getSystemPropertyInt(portKey, defaultPort);
if (port == -1) {
// Port can be -1. See bug 1270529.
return null;
}
return new Proxy(type, InetSocketAddress.createUnresolved(host, port));
}
private int getSystemPropertyInt(String key, int defaultValue) {
String string = System.getProperty(key);
if (string != null) {
try {
return Integer.parseInt(string);
} catch (NumberFormatException ignored) {
}
}
return defaultValue;
}
/**
* Returns true if the {@code nonProxyHosts} system property pattern exists
* and matches {@code host}.
*/
private boolean isNonProxyHost(String host, String nonProxyHosts) {
if (host == null || nonProxyHosts == null) {
return false;
}
// construct pattern
StringBuilder patternBuilder = new StringBuilder();
for (int i = 0; i < nonProxyHosts.length(); i++) {
char c = nonProxyHosts.charAt(i);
switch (c) {
case '.':
patternBuilder.append("\\.");
break;
case '*':
patternBuilder.append(".*");
break;
default:
patternBuilder.append(c);
}
}
// check whether the host is the nonProxyHosts.
String pattern = patternBuilder.toString();
return host.matches(pattern);
}
}

View File

@ -0,0 +1,21 @@
package com.darkweb.genesissearchengine.helperManager;
import java.net.InetSocketAddress;
import java.net.Proxy;
import ch.boye.httpclientandroidlib.HttpHost;
public class ProxySettings {
private static final String TOR_PROXY_ADDRESS = "127.0.0.1";
private static final int TOR_PROXY_PORT = 9050;
public static Proxy getProxy() {
// TODO make configurable
return new Proxy(Proxy.Type.SOCKS, new InetSocketAddress(TOR_PROXY_ADDRESS, TOR_PROXY_PORT));
}
public static HttpHost getProxyHost() {
// TODO make configurable
return new HttpHost(TOR_PROXY_ADDRESS, TOR_PROXY_PORT);
}
}

View File

@ -1,260 +0,0 @@
package com.darkweb.genesissearchengine.helperManager;
/*
* Author: Felipe Herranz (felhr85@gmail.com)
* Contributors:Francesco Verheye (verheye.francesco@gmail.com)
* Israel Dominguez (dominguez.israel@gmail.com)
*/
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
public class SoftKeyboard implements View.OnFocusChangeListener
{
private static final int CLEAR_FOCUS = 0;
private ViewGroup layout;
private int layoutBottom;
private InputMethodManager im;
private int[] coords;
private boolean isKeyboardShow;
private SoftKeyboardChangesThread softKeyboardThread;
private List<EditText> editTextList;
private View tempView; // reference to a focused EditText
public SoftKeyboard(ViewGroup layout, InputMethodManager im)
{
this.layout = layout;
keyboardHideByDefault();
initEditTexts(layout);
this.im = im;
this.coords = new int[2];
this.isKeyboardShow = false;
this.softKeyboardThread = new SoftKeyboardChangesThread();
this.softKeyboardThread.start();
}
public void openSoftKeyboard()
{
if(!isKeyboardShow)
{
layoutBottom = getLayoutCoordinates();
im.toggleSoftInput(0, InputMethodManager.SHOW_IMPLICIT);
softKeyboardThread.keyboardOpened();
isKeyboardShow = true;
}
}
public void closeSoftKeyboard()
{
if(isKeyboardShow)
{
im.toggleSoftInput(InputMethodManager.HIDE_IMPLICIT_ONLY, 0);
isKeyboardShow = false;
}
}
public void setSoftKeyboardCallback(SoftKeyboardChanged mCallback)
{
softKeyboardThread.setCallback(mCallback);
}
public void unRegisterSoftKeyboardCallback()
{
softKeyboardThread.stopThread();
}
public interface SoftKeyboardChanged
{
public void onSoftKeyboardHide();
public void onSoftKeyboardShow();
}
private int getLayoutCoordinates()
{
layout.getLocationOnScreen(coords);
return coords[1] + layout.getHeight();
}
private void keyboardHideByDefault()
{
layout.setFocusable(true);
layout.setFocusableInTouchMode(true);
}
/*
* InitEditTexts now handles EditTexts in nested views
* Thanks to Francesco Verheye (verheye.francesco@gmail.com)
*/
private void initEditTexts(ViewGroup viewgroup)
{
if(editTextList == null)
editTextList = new ArrayList<EditText>();
int childCount = viewgroup.getChildCount();
for(int i=0; i<= childCount-1;i++)
{
View v = viewgroup.getChildAt(i);
if(v instanceof ViewGroup)
{
initEditTexts((ViewGroup) v);
}
if(v instanceof EditText)
{
EditText editText = (EditText) v;
editText.setOnFocusChangeListener(this);
editText.setCursorVisible(true);
editTextList.add(editText);
}
}
}
/*
* OnFocusChange does update tempView correctly now when keyboard is still shown
* Thanks to Israel Dominguez (dominguez.israel@gmail.com)
*/
@Override
public void onFocusChange(View v, boolean hasFocus)
{
if(hasFocus)
{
tempView = v;
if(!isKeyboardShow)
{
layoutBottom = getLayoutCoordinates();
softKeyboardThread.keyboardOpened();
isKeyboardShow = true;
}
}
}
// This handler will clear focus of selected EditText
private final Handler mHandler = new Handler()
{
@Override
public void handleMessage(Message m)
{
switch(m.what)
{
case CLEAR_FOCUS:
if(tempView != null)
{
tempView.clearFocus();
tempView = null;
}
break;
}
}
};
private class SoftKeyboardChangesThread extends Thread
{
private AtomicBoolean started;
private SoftKeyboardChanged mCallback;
public SoftKeyboardChangesThread()
{
started = new AtomicBoolean(true);
}
public void setCallback(SoftKeyboardChanged mCallback)
{
this.mCallback = mCallback;
}
@Override
public void run()
{
while(started.get())
{
// Wait until keyboard is requested to open
synchronized(this)
{
try
{
wait();
} catch (InterruptedException e)
{
e.printStackTrace();
}
}
int currentBottomLocation = getLayoutCoordinates();
// There is some lag between open soft-keyboard function and when it really appears.
while(currentBottomLocation == layoutBottom && started.get())
{
currentBottomLocation = getLayoutCoordinates();
}
if(started.get())
mCallback.onSoftKeyboardShow();
// When keyboard is opened from EditText, initial bottom location is greater than layoutBottom
// and at some moment equals layoutBottom.
// That broke the previous logic, so I added this new loop to handle this.
while(currentBottomLocation >= layoutBottom && started.get())
{
currentBottomLocation = getLayoutCoordinates();
}
// Now Keyboard is shown, keep checking layout dimensions until keyboard is gone
while(currentBottomLocation != layoutBottom && started.get())
{
synchronized(this)
{
try
{
wait(500);
} catch (InterruptedException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
}
currentBottomLocation = getLayoutCoordinates();
}
if(started.get())
mCallback.onSoftKeyboardHide();
// if keyboard has been opened clicking and EditText.
if(isKeyboardShow && started.get())
isKeyboardShow = false;
// if an EditText is focused, remove its focus (on UI thread)
if(started.get())
mHandler.obtainMessage(CLEAR_FOCUS).sendToTarget();
}
}
public void keyboardOpened()
{
synchronized(this)
{
notify();
}
}
public void stopThread()
{
synchronized(this)
{
started.set(false);
notify();
}
}
}
}

View File

@ -1,28 +0,0 @@
package com.darkweb.genesissearchengine.helperManager;
import android.content.Context;
import android.content.res.Resources;
import android.util.Log;
import com.example.myapplication.R;
/**
* Created by BrainWang on 05/01/2016.
*/
public class adBlocker {
static String[] adUrls = null;
public static boolean isAd(Context context, String url) {
Resources res = context.getResources();
if(adUrls==null)
{
adUrls = res.getStringArray(R.array.adBlockUrl);
}
for (String adUrl : adUrls) {
if (url.contains(adUrl)) {
return true;
}
}
return false;
}
}

View File

@ -1,25 +0,0 @@
package com.darkweb.genesissearchengine.helperManager;
import android.os.Build;
import android.os.CancellationSignal;
import android.service.autofill.AutofillService;
import android.service.autofill.FillCallback;
import android.service.autofill.FillRequest;
import android.service.autofill.SaveCallback;
import android.service.autofill.SaveRequest;
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;
@RequiresApi(api = Build.VERSION_CODES.O)
public class autoFillService extends AutofillService {
@Override
public void onFillRequest(@NonNull FillRequest request, @NonNull CancellationSignal cancellationSignal, @NonNull FillCallback callback) {
}
@Override
public void onSaveRequest(@NonNull SaveRequest request, @NonNull SaveCallback callback) {
}
}

View File

@ -1,25 +0,0 @@
package com.darkweb.genesissearchengine.helperManager;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.graphics.BitmapFactory;
import android.graphics.Bitmap;
import java.net.URL;
import java.io.IOException;
import android.media.RingtoneManager;
import android.util.Log;
import com.google.firebase.messaging.FirebaseMessagingService;
import com.google.firebase.messaging.RemoteMessage;
/**
* Created by francesco on 13/09/16.
*/
public class firebaseMessagingService extends FirebaseMessagingService {
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
}
}

View File

@ -23,6 +23,7 @@ import android.graphics.drawable.Drawable;
import android.graphics.drawable.TransitionDrawable; import android.graphics.drawable.TransitionDrawable;
import android.net.Uri; import android.net.Uri;
import android.os.Build; import android.os.Build;
import android.os.Environment;
import android.os.Vibrator; import android.os.Vibrator;
import android.text.SpannableString; import android.text.SpannableString;
import android.text.Spanned; import android.text.Spanned;
@ -643,55 +644,10 @@ public class helperMethod
public static void openFile(File url, Context context) { public static void openFile(File url, Context context) {
try { try {
Uri uri = FileProvider.getUriForFile(context, context.getApplicationContext().getPackageName() + ".provider", url); Uri uri = FileProvider.getUriForFile(context, context.getApplicationContext().getPackageName() + ".provider", url);
Intent intent = new Intent(Intent.ACTION_VIEW,Uri.parse(url.toString()));
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
if (url.toString().contains(".doc") || url.toString().contains(".docx")) {
// Word document
intent.setDataAndType(uri, "application/msword");
} else if (url.toString().contains(".pdf")) {
// PDF file
intent.setDataAndType(uri, "application/pdf");
} else if (url.toString().contains(".ppt") || url.toString().contains(".pptx")) {
// Powerpoint file
intent.setDataAndType(uri, "application/vnd.ms-powerpoint");
} else if (url.toString().contains(".xls") || url.toString().contains(".xlsx")) {
// Excel file
intent.setDataAndType(uri, "application/vnd.ms-excel");
} else if (url.toString().contains(".zip")) {
// ZIP file
intent.setDataAndType(uri, "application/zip");
} else if (url.toString().contains(".rar")){
// RAR file
intent.setDataAndType(uri, "application/x-rar-compressed");
} else if (url.toString().contains(".rtf")) {
// RTF file
intent.setDataAndType(uri, "application/rtf");
} else if (url.toString().contains(".wav") || url.toString().contains(".mp3")) {
// WAV audio file
intent.setDataAndType(uri, "audio/x-wav");
} else if (url.toString().contains(".apk")) {
}
else if (url.toString().contains(".gif")) {
// GIF file
intent.setDataAndType(uri, "image/gif");
} else if (url.toString().contains(".jpg") || url.toString().contains(".jpeg") || url.toString().contains(".png")) {
// JPG file
intent.setDataAndType(uri, "image/jpeg");
} else if (url.toString().contains(".txt")) {
// Text file
intent.setDataAndType(uri, "text/plain");
} else if (url.toString().contains(".3gp") || url.toString().contains(".mpg") ||
url.toString().contains(".mpeg") || url.toString().contains(".mpe") || url.toString().contains(".mp4") || url.toString().contains(".avi")) {
// Video files
intent.setDataAndType(uri, "video/*");
} else {
context.startActivity(new Intent(DownloadManager.ACTION_VIEW_DOWNLOADS));
return;
}
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setDataAndType(uri, Uri.parse(url.toString()).getScheme());
context.startActivity(intent); context.startActivity(intent);
} catch (ActivityNotFoundException e) { } catch (ActivityNotFoundException e) {
Toast.makeText(context, "No application found which can open the file", Toast.LENGTH_SHORT).show(); Toast.makeText(context, "No application found which can open the file", Toast.LENGTH_SHORT).show();

View File

@ -31,9 +31,13 @@ import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
import java.net.Proxy; import java.net.Proxy;
import java.net.URI;
import java.net.URL; import java.net.URL;
import java.net.URLConnection; import java.net.URLConnection;
import java.util.Objects; import java.util.Objects;
import javax.net.ssl.HttpsURLConnection;
import static java.lang.Thread.sleep; import static java.lang.Thread.sleep;
@ -117,11 +121,11 @@ public class localFileDownloader extends AsyncTask<String, Integer, String> {
int count; int count;
try { try {
URL url = new URL(f_url[0]); URL url = new URL(f_url[0]);
Proxy proxy = new Proxy(Proxy.Type.SOCKS, InetSocketAddress.createUnresolved(PROXY_ADDRESS, PROXY_PORT)); Proxy proxy = new Proxy(Proxy.Type.SOCKS, InetSocketAddress.createUnresolved(PROXY_ADDRESS, PROXY_PORT));
URLConnection conection= null;
conection = url.openConnection(proxy);
URLConnection conection = url.openConnection(proxy); //conection = (HttpsURLConnection)ProxySelector.openConnectionWithProxy(new URI(f_url[0]));
conection.connect(); conection.connect();
int lenghtOfFile = conection.getContentLength(); int lenghtOfFile = conection.getContentLength();

View File

@ -1,18 +1,10 @@
package com.darkweb.genesissearchengine.pluginManager; package com.darkweb.genesissearchengine.pluginManager;
import android.view.View;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.helperManager.eventObserver; import com.darkweb.genesissearchengine.helperManager.eventObserver;
import com.google.android.gms.ads.*; import com.google.android.gms.ads.*;
import java.lang.ref.WeakReference; import java.lang.ref.WeakReference;
import java.util.List; import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
import static com.darkweb.genesissearchengine.constants.status.sPaidStatus;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eAdManagerCallbacks.M_SHOW_LOADED_ADS;
class adManager class adManager
{ {
@ -21,19 +13,21 @@ class adManager
private eventObserver.eventListener mEvent; private eventObserver.eventListener mEvent;
private WeakReference<AdView> mBannerAds; private WeakReference<AdView> mBannerAds;
private boolean mPaidStatus = false;
private boolean bannerAdsLoading = false; private boolean bannerAdsLoading = false;
private boolean bannerAdsLoaded = false; private boolean bannerAdsLoaded = false;
/*Initializations*/ /*Initializations*/
adManager(eventObserver.eventListener pEvent, AdView pBannerAds) { adManager(eventObserver.eventListener pEvent, AdView pBannerAds, boolean pPaidStatus) {
this.mEvent = pEvent; this.mEvent = pEvent;
mBannerAds = new WeakReference(pBannerAds); this.mPaidStatus = pPaidStatus;
this.mBannerAds = new WeakReference(pBannerAds);
} }
private void initializeBannerAds(){ private void initializeBannerAds(){
if(!sPaidStatus){ if(!mPaidStatus){
AdRequest request = new AdRequest.Builder().build(); AdRequest request = new AdRequest.Builder().build();
mBannerAds.get().loadAd(request); mBannerAds.get().loadAd(request);
admobListeners(); admobListeners();
@ -43,7 +37,7 @@ class adManager
/*Local Helper Methods*/ /*Local Helper Methods*/
private void loadAds(AppCompatActivity pAppContext){ private void loadAds(AppCompatActivity pAppContext){
if(!sPaidStatus) if(!mPaidStatus)
{ {
if (!bannerAdsLoading) if (!bannerAdsLoading)
{ {
@ -62,7 +56,7 @@ class adManager
/*Local Listeners*/ /*Local Listeners*/
private void admobListeners(){ private void admobListeners(){
if(!sPaidStatus){ if(!mPaidStatus){
mBannerAds.get().setAdListener(new AdListener() { mBannerAds.get().setAdListener(new AdListener() {
@Override @Override
public void onAdLoaded() { public void onAdLoaded() {
@ -77,10 +71,6 @@ class adManager
public void onAdClicked() { public void onAdClicked() {
} }
@Override
public void onAdLeftApplication() {
}
@Override @Override
public void onAdClosed() { public void onAdClosed() {
} }

View File

@ -3,7 +3,6 @@ package com.darkweb.genesissearchengine.pluginManager;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.helperManager.eventObserver; import com.darkweb.genesissearchengine.helperManager.eventObserver;
import com.flurry.android.FlurryAgent; import com.flurry.android.FlurryAgent;
import java.lang.ref.WeakReference; import java.lang.ref.WeakReference;
import java.util.List; import java.util.List;
@ -39,7 +38,6 @@ class analyticManager
void onTrigger(List<Object> pData, pluginEnums.eAnalyticManager pEventType) { void onTrigger(List<Object> pData, pluginEnums.eAnalyticManager pEventType) {
if(pEventType.equals(pluginEnums.eAnalyticManager.M_LOG_EVENT)) if(pEventType.equals(pluginEnums.eAnalyticManager.M_LOG_EVENT))
{ {
//logEvent((String) pData.get(0));
} }
} }
} }

View File

@ -1,11 +1,9 @@
package com.darkweb.genesissearchengine.pluginManager; package com.darkweb.genesissearchengine.pluginManager;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.helperManager.localFileDownloader; import com.darkweb.genesissearchengine.helperManager.localFileDownloader;
import com.darkweb.genesissearchengine.helperManager.eventObserver; import com.darkweb.genesissearchengine.helperManager.eventObserver;
import com.darkweb.genesissearchengine.helperManager.helperMethod; import com.darkweb.genesissearchengine.helperManager.helperMethod;
import java.lang.ref.WeakReference; import java.lang.ref.WeakReference;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@ -17,7 +15,7 @@ class downloadManager
/*Private Variables*/ /*Private Variables*/
private WeakReference<AppCompatActivity> mAppContext; private WeakReference<AppCompatActivity> mAppContext;
private Map<Integer, localFileDownloader> mDownloads = new HashMap<Integer, localFileDownloader>(); private Map<Integer, localFileDownloader> mDownloads = new HashMap<>();
/*Initializations*/ /*Initializations*/

View File

@ -1,20 +1,13 @@
package com.darkweb.genesissearchengine.pluginManager; package com.darkweb.genesissearchengine.pluginManager;
import android.app.Activity;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.content.res.Resources; import android.content.res.Resources;
import android.os.Build; import android.os.Build;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.appManager.activityContextManager;
import com.darkweb.genesissearchengine.constants.status; import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.helperManager.eventObserver; import com.darkweb.genesissearchengine.helperManager.eventObserver;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Objects;
import static com.darkweb.genesissearchengine.constants.status.mSystemLocale;
class langManager { class langManager {
@ -22,12 +15,14 @@ class langManager {
private eventObserver.eventListener mEvent; private eventObserver.eventListener mEvent;
private Locale mLanguage; private Locale mLanguage;
private Locale mSystemLocale;
/*Initializations*/ /*Initializations*/
langManager(AppCompatActivity pAppContext, eventObserver.eventListener pEvent, Locale pLanguage) { langManager(AppCompatActivity pAppContext, eventObserver.eventListener pEvent, Locale pLanguage, Locale pSystemLocale) {
this.mEvent = pEvent; this.mEvent = pEvent;
this.mLanguage = pLanguage; this.mLanguage = pLanguage;
this.mSystemLocale = pSystemLocale;
onInitLanguage(pAppContext); onInitLanguage(pAppContext);
} }
@ -38,18 +33,11 @@ class langManager {
Locale mSystemLocale = Resources.getSystem().getConfiguration().getLocales().get(0); Locale mSystemLocale = Resources.getSystem().getConfiguration().getLocales().get(0);
if(mSystemLocale!=status.mSystemLocale || !mSystemLocale.getLanguage().equals(mLanguage.getLanguage()) ){ if(mSystemLocale!=status.mSystemLocale || !mSystemLocale.getLanguage().equals(mLanguage.getLanguage()) ){
status.mSystemLocale = mSystemLocale; status.mSystemLocale = mSystemLocale;
/*if(activityContextManager.getInstance().getHomeController()!=null && status.sSettingLanguage.equals("default")){
return true;
}*/
} }
} else { } else {
Locale mSystemLocale = Resources.getSystem().getConfiguration().locale; Locale mSystemLocale = Resources.getSystem().getConfiguration().locale;
if(mSystemLocale!=status.mSystemLocale || !mSystemLocale.getLanguage().equals(mLanguage.getLanguage())){ if(mSystemLocale!=status.mSystemLocale || !mSystemLocale.getLanguage().equals(mLanguage.getLanguage())){
status.mSystemLocale = mSystemLocale; status.mSystemLocale = mSystemLocale;
activityContextManager.getInstance().getCurrentActivity().recreate();
/*if(activityContextManager.getInstance().getHomeController()!=null && status.sSettingLanguage.equals("default")){
return true;
}*/
} }
} }
} }
@ -123,7 +111,7 @@ class langManager {
} }
else if(pEventType.equals(pluginEnums.eLangManager.M_RESUME)) else if(pEventType.equals(pluginEnums.eLangManager.M_RESUME))
{ {
boolean mStatus = initLocale(); initLocale();
onResume((AppCompatActivity) pData.get(0)); onResume((AppCompatActivity) pData.get(0));
} }
else if(pEventType.equals(pluginEnums.eLangManager.M_SET_LANGUAGE)) else if(pEventType.equals(pluginEnums.eLangManager.M_SET_LANGUAGE))

View File

@ -1,7 +1,6 @@
package com.darkweb.genesissearchengine.pluginManager; package com.darkweb.genesissearchengine.pluginManager;
import android.app.Dialog; import android.app.Dialog;
import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.res.Resources; import android.content.res.Resources;
import android.graphics.Color; import android.graphics.Color;
@ -26,14 +25,11 @@ import com.darkweb.genesissearchengine.helperManager.eventObserver;
import com.darkweb.genesissearchengine.helperManager.helperMethod; import com.darkweb.genesissearchengine.helperManager.helperMethod;
import com.example.myapplication.R; import com.example.myapplication.R;
import com.google.android.material.switchmaterial.SwitchMaterial; import com.google.android.material.switchmaterial.SwitchMaterial;
import org.mozilla.geckoview.ContentBlocking; import org.mozilla.geckoview.ContentBlocking;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import static com.darkweb.genesissearchengine.constants.constants.*; import static com.darkweb.genesissearchengine.constants.constants.*;
import static com.darkweb.genesissearchengine.constants.strings.MESSAGE_PLAYSTORE_NOT_FOUND; import static com.darkweb.genesissearchengine.constants.strings.MESSAGE_PLAYSTORE_NOT_FOUND;
import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.*; import static com.darkweb.genesissearchengine.pluginManager.pluginEnums.eMessageManager.*;
@ -181,9 +177,7 @@ class messageManager
private void popupBlocked() private void popupBlocked()
{ {
final Handler handler = new Handler(); final Handler handler = new Handler();
Runnable runnable = () -> { Runnable runnable = () -> mDialog.dismiss();
mDialog.dismiss();
};
initializeDialog(R.layout.popup_block_popup, Gravity.BOTTOM); initializeDialog(R.layout.popup_block_popup, Gravity.BOTTOM);
mDialog.findViewById(R.id.pOpenPrivacy).setOnClickListener(v -> { mDialog.findViewById(R.id.pOpenPrivacy).setOnClickListener(v -> {
@ -203,9 +197,7 @@ class messageManager
private void maxTabReached() private void maxTabReached()
{ {
final Handler handler = new Handler(); final Handler handler = new Handler();
Runnable runnable = () -> { Runnable runnable = () -> mDialog.dismiss();
mDialog.dismiss();
};
initializeDialog(R.layout.popup_max_tab, Gravity.BOTTOM); initializeDialog(R.layout.popup_max_tab, Gravity.BOTTOM);
mDialog.getWindow().setDimAmount(0); mDialog.getWindow().setDimAmount(0);
@ -389,9 +381,7 @@ class messageManager
tempData.addAll(mData); tempData.addAll(mData);
mDialog.dismiss(); mDialog.dismiss();
final Handler handler = new Handler(); final Handler handler = new Handler();
Runnable runnable = () -> { Runnable runnable = () -> mEvent.invokeObserver(tempData, M_DOWNLOAD_SINGLE);
mEvent.invokeObserver(tempData, M_DOWNLOAD_SINGLE);
};
handler.postDelayed(runnable, 1000); handler.postDelayed(runnable, 1000);
onClearReference(); onClearReference();
}); });

View File

@ -13,7 +13,6 @@ import com.darkweb.genesissearchengine.constants.status;
import com.darkweb.genesissearchengine.helperManager.eventObserver; import com.darkweb.genesissearchengine.helperManager.eventObserver;
import com.darkweb.genesissearchengine.helperManager.userEngagementNotification; import com.darkweb.genesissearchengine.helperManager.userEngagementNotification;
import com.example.myapplication.R; import com.example.myapplication.R;
import java.lang.ref.WeakReference; import java.lang.ref.WeakReference;
import java.util.List; import java.util.List;
import static com.darkweb.genesissearchengine.constants.constants.*; import static com.darkweb.genesissearchengine.constants.constants.*;

View File

@ -8,7 +8,6 @@ import org.mozilla.gecko.PrefsHelper;
import org.torproject.android.service.OrbotService; import org.torproject.android.service.OrbotService;
import org.torproject.android.service.util.Prefs; import org.torproject.android.service.util.Prefs;
import org.torproject.android.service.wrapper.orbotLocalConstants; import org.torproject.android.service.wrapper.orbotLocalConstants;
import java.lang.ref.WeakReference; import java.lang.ref.WeakReference;
import java.util.List; import java.util.List;
import com.darkweb.genesissearchengine.constants.*; import com.darkweb.genesissearchengine.constants.*;

View File

@ -48,7 +48,7 @@ public class pluginController
} }
public void preInitialize(homeController context){ public void preInitialize(homeController context){
mLangManager = new langManager(context,new langCallback(), new Locale(status.sSettingLanguage)); mLangManager = new langManager(context,new langCallback(), new Locale(status.sSettingLanguage), status.mSystemLocale);
} }
public void initialize(){ public void initialize(){
@ -67,7 +67,7 @@ public class pluginController
mContextManager = activityContextManager.getInstance(); mContextManager = activityContextManager.getInstance();
mNotificationManager = new notifictionManager(mHomeController,new notificationCallback()); mNotificationManager = new notifictionManager(mHomeController,new notificationCallback());
mAdManager = new adManager(new admobCallback(), ((homeController)mHomeController.get()).getBannerAd()); mAdManager = new adManager(new admobCallback(), ((homeController)mHomeController.get()).getBannerAd(), status.sPaidStatus);
mAnalyticsManager = new com.darkweb.genesissearchengine.pluginManager.analyticManager(mHomeController,new analyticManager()); mAnalyticsManager = new com.darkweb.genesissearchengine.pluginManager.analyticManager(mHomeController,new analyticManager());
mMessageManager = new messageManager(new messageCallback()); mMessageManager = new messageManager(new messageCallback());
mOrbotManager = orbotManager.getInstance(); mOrbotManager = orbotManager.getInstance();
@ -224,6 +224,10 @@ public class pluginController
dataController.getInstance().invokeBookmark(dataEnums.eBookmarkCommands.M_CLEAR_BOOKMARK ,pData); dataController.getInstance().invokeBookmark(dataEnums.eBookmarkCommands.M_CLEAR_BOOKMARK ,pData);
mContextManager.getBookmarkController().onclearData(); mContextManager.getBookmarkController().onclearData();
} }
else if(pEventType.equals(M_CLEAR_HISTORY)){
dataController.getInstance().invokeHistory(dataEnums.eHistoryCommands.M_CLEAR_HISTORY ,pData);
mContextManager.getHistoryController().onclearData();
}
else if(pEventType.equals(M_BOOKMARK)){ else if(pEventType.equals(M_BOOKMARK)){
String [] dataParser = pData.get(0).toString().split("split"); String [] dataParser = pData.get(0).toString().split("split");
if(dataParser.length>1){ if(dataParser.length>1){

View File

@ -13,7 +13,6 @@ public class AnimatedProgressBar extends ProgressBar {
private static final Interpolator DEFAULT_INTERPOLATER = new LinearInterpolator(); private static final Interpolator DEFAULT_INTERPOLATER = new LinearInterpolator();
private ValueAnimator animator; private ValueAnimator animator;
private ValueAnimator animatorSecondary;
private boolean animate = true; private boolean animate = true;
public AnimatedProgressBar(Context context, AttributeSet attrs, int defStyle) { public AnimatedProgressBar(Context context, AttributeSet attrs, int defStyle) {

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<paths>
<external-path
name="external"
path="." />
<external-files-path
name="external_files"
path="." />
<files-path
name="files"
path="." />
</paths>

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@ -7,9 +7,10 @@
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/pMainLayout" android:id="@+id/pMainLayout"
android:layout_width="320dp" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@xml/hox_rounded_corner" android:background="@xml/hox_rounded_corner"
android:minHeight="150dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5" app:layout_constraintHorizontal_bias="0.5"
@ -40,7 +41,7 @@
android:text="@string/ALERT_DOWNLOAD_SINGLE" android:text="@string/ALERT_DOWNLOAD_SINGLE"
android:textAlignment="textStart" android:textAlignment="textStart"
android:textColor="@color/c_text_setting_heading_v2" android:textColor="@color/c_text_setting_heading_v2"
android:textSize="14sp" android:textSize="14.5sp"
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintStart_toEndOf="@+id/imageView2" app:layout_constraintStart_toEndOf="@+id/imageView2"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@ -51,9 +52,7 @@
android:layout_marginStart="15dp" android:layout_marginStart="15dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:layout_marginEnd="19dp" android:layout_marginEnd="19dp"
android:layout_marginBottom="10dp" android:background="@color/c_view_divier_background"
android:background="@color/holo_gray_light"
app:layout_constraintBottom_toTopOf="@+id/pDescription"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/pHeader" /> app:layout_constraintTop_toBottomOf="@+id/pHeader" />
@ -65,10 +64,9 @@
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:layout_marginEnd="3dp" android:layout_marginEnd="3dp"
android:alpha="0.6" android:alpha="0.6"
android:maxLines="5"
android:paddingStart="15dp" android:paddingStart="15dp"
android:paddingEnd="15dp" android:paddingEnd="15dp"
android:maxLines="5"
android:text="@string/GENERAL_DEFAULT_TEXT"
android:textAlignment="textStart" android:textAlignment="textStart"
android:textColor="@color/c_alert_text" android:textColor="@color/c_alert_text"
android:textSize="12sp" android:textSize="12sp"
@ -81,20 +79,19 @@
android:id="@+id/pDivider" android:id="@+id/pDivider"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:layout_marginTop="10dp"
android:background="@color/c_view_divier_background" android:background="@color/c_view_divier_background"
app:layout_constraintBottom_toTopOf="@+id/pNavigationContainer"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent" />
app:layout_constraintTop_toBottomOf="@+id/pDescription" />
<LinearLayout <LinearLayout
android:id="@+id/pNavigationContainer" android:id="@+id/pNavigationContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="40dp" android:layout_height="45dp"
android:orientation="horizontal" android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent">
app:layout_constraintTop_toBottomOf="@+id/pDivider">
<Button <Button
android:id="@+id/pDismiss" android:id="@+id/pDismiss"
@ -106,7 +103,7 @@
android:text="@string/ALERT_DISMISS" android:text="@string/ALERT_DISMISS"
android:textAllCaps="false" android:textAllCaps="false"
android:textColor="@color/c_button_text_v2" android:textColor="@color/c_button_text_v2"
android:textSize="13sp" android:textSize="14.5sp"
android:textStyle="bold" /> android:textStyle="bold" />
<View <View
@ -128,7 +125,7 @@
android:text="@string/ALERT_DOWNLOAD_SINGLE_BUTTON" android:text="@string/ALERT_DOWNLOAD_SINGLE_BUTTON"
android:textAllCaps="false" android:textAllCaps="false"
android:textColor="@color/c_button_text_v3" android:textColor="@color/c_button_text_v3"
android:textSize="13sp" android:textSize="14.5sp"
android:textStyle="bold" /> android:textStyle="bold" />
</LinearLayout> </LinearLayout>

View File

@ -77,6 +77,7 @@
android:textCursorDrawable="@xml/gx_search_cursor_state" android:textCursorDrawable="@xml/gx_search_cursor_state"
android:textSize="15sp" android:textSize="15sp"
android:visibility="gone" android:visibility="gone"
android:layout_marginEnd="15dp"
tools:targetApi="o" /> tools:targetApi="o" />
<View <View

View File

@ -77,6 +77,7 @@
android:textCursorDrawable="@xml/gx_search_cursor_state" android:textCursorDrawable="@xml/gx_search_cursor_state"
android:textSize="15sp" android:textSize="15sp"
android:visibility="gone" android:visibility="gone"
android:layout_marginEnd="15dp"
tools:targetApi="o" /> tools:targetApi="o" />
<View <View
@ -156,7 +157,6 @@
android:paddingStart="20dp" android:paddingStart="20dp"
android:stateListAnimator="@null" android:stateListAnimator="@null"
android:text="@string/HISTORY_CLEAR" android:text="@string/HISTORY_CLEAR"
android:textAlignment="textStart" android:textAlignment="textStart"
android:textColor="@color/c_text_setting_heading" android:textColor="@color/c_text_setting_heading"

View File

@ -57,52 +57,63 @@
<TextView <TextView
android:id="@+id/pHeader" android:id="@+id/pHeader"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="4dp" android:layout_marginStart="4dp"
android:layout_marginEnd="10dp"
android:clickable="false" android:clickable="false"
android:ellipsize="end" android:ellipsize="end"
android:maxLines="1"
android:paddingStart="10dp" android:paddingStart="10dp"
android:paddingEnd="10dp" android:paddingEnd="0dp"
android:singleLine="true" android:singleLine="true"
android:text="@string/GENERAL_DEFAULT_HINT_SUGGESTION" android:text="@string/GENERAL_DEFAULT_HINT_SUGGESTION"
android:textColor="@color/c_text_v1" android:textColor="@color/c_text_v1"
android:textSize="14sp" android:textSize="14sp"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/pHintWebIcon" app:layout_constraintStart_toEndOf="@+id/pHintWebIcon"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
android:id="@+id/pHeaderSingle" android:id="@+id/pHeaderSingle"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="55dp" android:layout_height="55dp"
android:layout_marginStart="5dp" android:layout_marginStart="5dp"
android:layout_marginTop="6dp" android:layout_marginTop="8dp"
android:layout_marginEnd="10dp"
android:clickable="false" android:clickable="false"
android:ellipsize="end" android:ellipsize="end"
android:maxLines="1"
android:paddingStart="10dp" android:paddingStart="10dp"
android:paddingEnd="10dp" android:paddingEnd="0dp"
android:singleLine="true" android:singleLine="true"
android:text="@string/GENERAL_DEFAULT_HINT_SUGGESTION" android:text="@string/GENERAL_DEFAULT_HINT_SUGGESTION"
android:textColor="@color/c_text_v1" android:textColor="@color/c_text_v1"
android:textSize="16sp" android:textSize="16sp"
android:visibility="gone" android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintStart_toEndOf="@+id/pHintWebIcon" app:layout_constraintStart_toEndOf="@+id/pHintWebIcon"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
android:id="@+id/pURL" android:id="@+id/pURL"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="4dp" android:layout_marginStart="4dp"
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:layout_marginEnd="10dp"
android:clickable="false" android:clickable="false"
android:ellipsize="end" android:ellipsize="end"
android:paddingStart="10dp" android:paddingStart="10dp"
android:paddingEnd="10dp" android:paddingEnd="0dp"
android:singleLine="true" android:singleLine="true"
android:text="@string/GENERAL_DEFAULT_HINT_SUGGESTION" android:text="@string/GENERAL_DEFAULT_HINT_SUGGESTION"
android:textColor="@color/c_text_v6" android:textColor="@color/c_text_v6"
android:textSize="12.5sp" android:textSize="12.5sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintStart_toEndOf="@+id/pHintWebIcon" app:layout_constraintStart_toEndOf="@+id/pHintWebIcon"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />

View File

@ -94,6 +94,7 @@
android:ems="10" android:ems="10"
android:fadingEdgeLength="20dp" android:fadingEdgeLength="20dp"
android:focusableInTouchMode="true" android:focusableInTouchMode="true"
android:focusedByDefault="false"
android:hint="@string/GENERAL_SEARCH_HINT" android:hint="@string/GENERAL_SEARCH_HINT"
android:importantForAutofill="no" android:importantForAutofill="no"
android:inputType="textNoSuggestions" android:inputType="textNoSuggestions"
@ -175,25 +176,25 @@
android:id="@+id/pTopBarHider" android:id="@+id/pTopBarHider"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="60dp" android:layout_height="60dp"
android:translationZ="4dp"
android:alpha="0" android:alpha="0"
android:visibility="gone" android:background="@color/c_background"
android:clickable="false" android:clickable="false"
android:contentDescription="@string/GENERAL_TODO"
android:focusable="false" android:focusable="false"
android:translationZ="4dp"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent" />
android:background="@color/c_background"
android:contentDescription="@string/GENERAL_TODO" />
<com.google.android.gms.ads.AdView <com.google.android.gms.ads.AdView
android:id="@+id/pAdView" android:id="@+id/pAdView"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:alpha="0" android:alpha="0"
android:background="@color/clear_alpha" android:background="@color/c_border_background_divider"
android:visibility="gone" android:visibility="gone"
app:adSize="SMART_BANNER" app:adSize="BANNER"
app:adUnitId="ca-app-pub-3940256099942544/6300978111" app:adUnitId="ca-app-pub-3940256099942544/6300978111"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -257,6 +258,22 @@
app:shiftDuration="@integer/progress_shift_duration" app:shiftDuration="@integer/progress_shift_duration"
app:wrapShiftDrawable="true" app:wrapShiftDrawable="true"
tools:progress="0" /> tools:progress="0" />
<ImageView
android:id="@+id/pNewTabBlocker"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:alpha="0"
android:background="@color/c_background"
android:clickable="true"
android:contentDescription="@string/GENERAL_TODO"
android:focusable="true"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="MissingConstraints" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
@ -296,8 +313,9 @@
android:scaleY="1.55" android:scaleY="1.55"
android:src="@drawable/wall2" android:src="@drawable/wall2"
android:translationY="-90dp" android:translationY="-90dp"
app:layout_constraintBottom_toBottomOf="@+id/pImageDivider"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHeight_percent="0.55" app:layout_constraintHeight_percent="0.5"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@ -305,11 +323,12 @@
android:id="@+id/pImageDivider" android:id="@+id/pImageDivider"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="130dp" android:layout_marginBottom="100dp"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:contentDescription="@string/GENERAL_TODO" android:contentDescription="@string/GENERAL_TODO"
android:scaleType="fitXY" android:scaleType="fitXY"
android:src="@drawable/glide" android:src="@drawable/glide"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
@ -723,12 +742,12 @@
android:layout_marginEnd="24dp" android:layout_marginEnd="24dp"
android:layout_marginBottom="24dp" android:layout_marginBottom="24dp"
android:alpha="0" android:alpha="0"
android:visibility="gone"
android:backgroundTint="@color/white" android:backgroundTint="@color/white"
android:clickable="true" android:clickable="true"
android:contentDescription="@string/GENERAL_TODO" android:contentDescription="@string/GENERAL_TODO"
android:focusable="true" android:focusable="true"
android:src="@drawable/icon_ban" android:src="@drawable/icon_ban"
android:visibility="gone"
app:borderWidth="0dp" app:borderWidth="0dp"
app:elevation="10dp" app:elevation="10dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
@ -778,39 +797,22 @@
<include <include
android:id="@+id/pPopupLoadNewTab" android:id="@+id/pPopupLoadNewTab"
layout="@layout/popup_load_new_tab" layout="@layout/popup_load_new_tab"
android:translationZ="0dp"
android:alpha="0" android:alpha="0"
android:translationZ="0dp"
android:visibility="gone" /> android:visibility="gone" />
<androidx.fragment.app.FragmentContainerView <androidx.fragment.app.FragmentContainerView
android:id="@+id/mTabFragment" android:id="@+id/mTabFragment"
android:name="com.darkweb.genesissearchengine.appManager.tabManager.tabController"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:name="com.darkweb.genesissearchengine.appManager.tabManager.tabController"
android:visibility="gone"
android:background="@color/c_background"
android:alpha="0" android:alpha="0"
android:background="@color/c_background"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/pNewTabBlocker"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="60dp"
android:clickable="true"
android:alpha="0"
android:background="@color/c_background"
android:contentDescription="@string/GENERAL_TODO"
android:focusable="true"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="MissingConstraints" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -481,7 +481,7 @@
android:layout_marginStart="0dp" android:layout_marginStart="0dp"
android:layout_weight="1" android:layout_weight="1"
android:background="@color/clear_alpha" android:background="@color/clear_alpha"
android:buttonTint="@color/c_navigation_tint" android:buttonTint="@color/c_checkbox_tint"
android:clickable="false" android:clickable="false"
android:focusable="false" android:focusable="false"
android:gravity="start|center_vertical" android:gravity="start|center_vertical"

View File

@ -23,11 +23,12 @@
tools:ignore="RtlSymmetry"> tools:ignore="RtlSymmetry">
<TextView <TextView
android:id="@+id/pWebLogo" android:id="@+id/pWebLogo"
android:layout_width="42dp" android:layout_width="35dp"
android:layout_marginTop="9dp" android:layout_marginTop="9dp"
android:layout_marginStart="15dp" android:layout_marginStart="15dp"
android:layout_marginEnd="5dp" android:layout_marginEnd="5dp"
android:layout_height="42dp" android:alpha="0"
android:layout_height="35dp"
android:textStyle="bold" android:textStyle="bold"
android:textSize="17sp" android:textSize="17sp"
android:text="A" android:text="A"
@ -38,40 +39,38 @@
tools:ignore="RtlCompat" /> tools:ignore="RtlCompat" />
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
android:layout_width="43dp" android:layout_width="35dp"
android:layout_height="43dp" android:layout_height="35dp"
app:cardElevation="0dp" app:cardElevation="0dp"
android:padding="20dp" android:padding="20dp"
android:translationZ="1dp" android:layout_marginStart="-47dp"
android:layout_marginStart="-48dp" android:layout_marginTop="12dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="5dp" android:layout_marginEnd="5dp"
android:gravity="center_vertical" android:gravity="center_vertical"
app:cardCornerRadius="40dp"> app:cardCornerRadius="5dp">
<ImageView <ImageView
android:id="@+id/pFaviconLogo" android:id="@+id/pFaviconLogo"
android:layout_width="43dp" android:layout_width="37dp"
android:layout_height="43dp" android:layout_height="37dp"
android:layout_marginTop="-1dp"
android:background="@color/button_gray" android:background="@color/button_gray"
android:contentDescription="@string/GENERAL_TODO" android:contentDescription="@string/GENERAL_TODO"
android:textAlignment="center" android:textAlignment="center"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="17sp"
android:textStyle="bold"
tools:ignore="RtlCompat" /> tools:ignore="RtlCompat" />
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
<ImageView <ImageView
android:id="@+id/pLogoImage" android:id="@+id/pLogoImage"
android:layout_width="45dp" android:layout_width="48dp"
android:layout_marginTop="7dp" android:layout_marginTop="10dp"
android:layout_marginStart="-49dp" android:layout_marginStart="-47dp"
android:layout_marginEnd="4.5dp" android:layout_marginEnd="-1dp"
android:layout_height="45dp" android:layout_height="48dp"
android:visibility="gone" android:visibility="visible"
android:alpha="0" android:alpha="1"
android:translationZ="3dp" android:translationZ="3dp"
android:src="@drawable/tick_recycler_view" android:src="@drawable/tick_recycler_view_green"
android:gravity="center_vertical" android:gravity="center_vertical"
tools:ignore="RtlCompat" tools:ignore="RtlCompat"
android:contentDescription="@string/GENERAL_TODO" /> android:contentDescription="@string/GENERAL_TODO" />
@ -95,11 +94,11 @@
android:singleLine="true" android:singleLine="true"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:textSize="14.5sp" android:textSize="14.5sp"
android:layout_marginStart="15dp" android:layout_marginStart="10dp"
/> />
<TextView <TextView
android:layout_marginStart="15dp" android:layout_marginStart="10dp"
android:id="@+id/pDescription" android:id="@+id/pDescription"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@ -244,6 +244,7 @@
android:focusable="true" android:focusable="true"
android:longClickable="true" android:longClickable="true"
android:translationZ="10dp" android:translationZ="10dp"
android:background="@xml/gx_ripple_light"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/cardView" app:layout_constraintEnd_toEndOf="@+id/cardView"
app:layout_constraintHorizontal_weight="1" app:layout_constraintHorizontal_weight="1"

View File

@ -80,7 +80,7 @@
<color name="c_alert_text">#212d45</color> <color name="c_alert_text">#212d45</color>
<color name="c_alert_text_inverted">#ffffff</color> <color name="c_alert_text_inverted">#ffffff</color>
<color name="c_long_button">#7591bd</color> <color name="c_long_button">#7591bd</color>
<color name="c_ripple_light">#dedede</color> <color name="c_ripple_light">#e6e6e6</color>
<color name="blue">#0066FF</color> <color name="blue">#0066FF</color>
<color name="ease_blue_light">#fdfeff</color> <color name="ease_blue_light">#fdfeff</color>

View File

@ -18,6 +18,12 @@
<string name="GENERAL_DEFAULT_HINT_SUGGESTION" translatable="true">BBC | Israel Strikes Again</string> <string name="GENERAL_DEFAULT_HINT_SUGGESTION" translatable="true">BBC | Israel Strikes Again</string>
<string name="GENERAL_HIDDEN_WEB" translatable="false">Search the web ...</string> <string name="GENERAL_HIDDEN_WEB" translatable="false">Search the web ...</string>
<!-- Temp -->
<string name="downloading">Downloading...</string>
<string name="title_file_download">APK is downloading</string>
<string name="storage_access_required">Storage access is required to downloading the file.</string>
<string name="storage_permission_denied">Storage permission request was denied.</string>
<!-- Settings --> <!-- Settings -->
<string name="SETTING_DEFAULT_LANGUAGE" translatable="false">ru</string> <string name="SETTING_DEFAULT_LANGUAGE" translatable="false">ru</string>
<string name="SETTING_BASIC_SETTING" translatable="true">Basic Settings</string> <string name="SETTING_BASIC_SETTING" translatable="true">Basic Settings</string>

View File

@ -74,39 +74,4 @@
<item name="android:windowExitAnimation">@anim/popup_anim_out</item> <item name="android:windowExitAnimation">@anim/popup_anim_out</item>
</style> </style>
<style name="CFDialog.Title">
<item name="android:textSize">15sp</item>
<item name="android:textColor">@color/cfdialog_title_font_color</item>
<item name="android:textStyle">bold</item>
<item name="android:includeFontPadding">false</item>
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_gravity">center_vertical</item>
</style>
<style name="CFDialog.Message">
<item name="android:textSize">13sp</item>
<item name="android:textColor">@color/cfdialog_desc_font_color</item>
<item name="android:textStyle">normal</item>
<item name="android:layout_marginTop">5dp</item>
<item name="android:includeFontPadding">false</item>
<item name="android:layout_width">match_parent</item>
<item name="android:layout_marginBottom">10dp</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:gravity">left</item>
</style>
<style name="CFDialog.Button">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:gravity">center</item>
<item name="android:paddingTop">10dp</item>
<item name="android:paddingBottom">10dp</item>
<item name="android:paddingLeft">20dp</item>
<item name="android:paddingRight">20dp</item>
<item name="android:textSize">11sp</item>
<item name="android:textStyle">bold</item>
<item name="android:textAllCaps">false</item>
</style>
</resources> </resources>

View File

@ -1,41 +1,82 @@
/*arm versions*/ /* arm versions */
project.ext.arm_vname = '605' project.ext.arm_vname = 'Build | Dark-Origin'
project.ext.arm_vcode = 605 project.ext.arm_vcode = 1000
/*aarch versions*/ /* aarch versions */
project.ext.aarch_vname = '606' project.ext.aarch_vname = 'Build | Dark-Origin'
project.ext.aarch_vcode = 606 project.ext.aarch_vcode = 1001
/*x86 versions*/ /* x86 versions */
project.ext.x86_vname = '607' project.ext.x86_vname = 'Build | Dark-Origin'
project.ext.x86_vcode = 607 project.ext.x86_vcode = 1002
/*x64 versions*/ /* x64 versions */
project.ext.x64_vname = '608' project.ext.x64_vname = 'Build | Dark-Origin'
project.ext.x64_vcode = 608 project.ext.x64_vcode = 1003
/*dimension*/ /* dimension */
project.ext.dimen = 'abi' project.ext.dimen = 'abi'
/*firefox version*/ /* firefox version */
project.ext.firefox_version = "87.0.20210318103112" project.ext.firefox_version = "87.0.20210318103112"
project.ext.firefox_channel = "" project.ext.firefox_channel = ""
/*Application Preferences*/ /* Maven */
project.ext.compileSdkVersion = 30 project.ext.url_snapshot = "https://oss.sonatype.org/content/repositories/snapshots/"
project.ext.minSdkVersion = 21 project.ext.url = "https://maven.mozilla.org/maven2/"
project.ext.targetSdkVersion = 30
project.ext.versionCode = 600
project.ext.versionName = "600.0"
project.ext.applicationId = "com.darkweb.genesissearchengine"
/* Proguard */
project.ext.proguard_file = "proguard-android.txt"
project.ext.proguard_rule = "proguard-rules.pro"
/*test*/ /* Build Types */
project.ext.architecture_components_version = '2.1.0' project.ext.minifyEnabled = true
project.ext.support_libraries_version = '1.0.0'
project.ext.espresso_version = '3.1.0-alpha4' /* Lint Options */
project.ext.coroutines_version = '1.3.0' project.ext.checkReleaseBuilds = false
project.ext.spotbugs_version = '3.1.4' project.ext.abortOnError = false
project.ext.mozilla_components_version = '73.0.8'
project.ext.mozilla_components_icon_version = '73.0.9' /* Application Preferences */
project.ext.gecko_nightly_version = '87.0.20210318103112' project.ext.version_code = 1000
project.ext.version_name = "Build | Dark-Origin"
project.ext.compile_sdk_version = 30
project.ext.min_sdk_version = 21
project.ext.target_sdk_version = 30
project.ext.build_tool_version = '30.0.0'
project.ext.ndk_version = '21.4.7075529'
project.ext.application_id = "com.darkweb.genesissearchengine"
/* Resource Directories */
project.ext.resource_directories = [
'src/main/res/layouts/history',
'src/main/res/layouts/help',
'src/main/res/layouts/tab',
'src/main/res/layouts/language',
'src/main/res/layouts/orbot',
'src/main/res/layouts/proxyStatus',
'src/main/res/layouts/orbotLog',
'src/main/res/layouts/setting',
'src/main/res/layouts/bridge',
'src/main/res/layouts/log',
'src/main/res/layouts/landing',
'src/main/res/layouts/alert',
'src/main/res/layouts/bookmark',
'src/main/res/layouts/shared',
'src/main/res/layouts/shared/listviews',
'src/main/res/layouts/searchWidget',
'src/main/res/layouts/home',
'src/main/res/custom-xml/alert',
'src/main/res/custom-xml/tab',
'src/main/res/custom-xml/images',
'src/main/res/custom-xml/bookmark',
'src/main/res/custom-xml/generic',
'src/main/res/custom-xml/history',
'src/main/res/custom-xml/home',
'src/main/res/custom-xml/landing',
'src/main/res/custom-xml/orbot',
'src/main/res/custom-xml/orbot_log',
'src/main/res/custom-xml/setting',
'src/main/res/layouts',
'src/main/res/images',
'src/main/res'
]

View File

@ -10,7 +10,7 @@ buildscript {
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:4.1.3' classpath 'com.android.tools.build:gradle:4.1.3'
classpath 'com.google.gms:google-services:4.3.5' classpath 'com.google.gms:google-services:4.3.5'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.31" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.32"
} }
} }

View File

@ -3,7 +3,7 @@ apply plugin: 'com.android.library'
android { android {
compileSdkVersion 30 compileSdkVersion 30
buildToolsVersion '30.0.3' buildToolsVersion '30.0.3'
ndkVersion '21.3.6528147' ndkVersion '21.4.7075529'
sourceSets { sourceSets {
main { main {