From 41932fefa88aa2c1e8b49f585b9ae7c3040282d2 Mon Sep 17 00:00:00 2001 From: Abdul Mannan Saeed Date: Thu, 1 Sep 2022 21:32:50 +0500 Subject: [PATCH] Bug Fixes Bug Fixes --- .idea/deploymentTargetDropDown.xml | 17 ++++++++++++++ .idea/misc.xml | 1 + app/build.gradle | 7 +++--- .../geckoManager/geckoClients.java | 1 + .../homeController/homeController.java | 23 ++++++++++++------- .../layouts/language/layout/lang_row_view.xml | 1 - app/src/main/res/values-ch/strings.xml | 2 -- app/variables.gradle | 4 ++-- 8 files changed, 40 insertions(+), 16 deletions(-) create mode 100644 .idea/deploymentTargetDropDown.xml diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml new file mode 100644 index 00000000..45f79ea6 --- /dev/null +++ b/.idea/deploymentTargetDropDown.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 7324f179..3a47835f 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -65,6 +65,7 @@ + diff --git a/app/build.gradle b/app/build.gradle index e0b358e3..1a807561 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,4 +1,4 @@ -//import com.android.build.OutputFile +import com.android.build.OutputFile plugins { id "com.jetbrains.python.envs" version "0.0.26" @@ -14,6 +14,7 @@ android { compileSdkVersion project.ext.compile_sdk_version ndkVersion project.ext.ndk_version + defaultConfig { applicationId project.ext.application_id minSdkVersion project.ext.min_sdk_version @@ -133,7 +134,7 @@ dependencies { /* Automated APK Generation */ -/*android.applicationVariants.all { variant -> +android.applicationVariants.all { variant -> def buildType = variant.buildType.name @@ -157,7 +158,7 @@ dependencies { output.versionCodeOverride = versionCodeOverride } } -}*/ +} diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/geckoClients.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/geckoClients.java index 2de9c006..d14f18b7 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/geckoClients.java +++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/geckoClients.java @@ -13,6 +13,7 @@ import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import com.hiddenservices.onionservices.appManager.activityContextManager; +import com.hiddenservices.onionservices.appManager.homeManager.homeController.homeController; import com.hiddenservices.onionservices.appManager.kotlinHelperLibraries.BrowserIconManager; import com.hiddenservices.onionservices.constants.*; import com.hiddenservices.onionservices.dataManager.dataController; diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/homeController/homeController.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/homeController/homeController.java index 039132e7..6310cdaa 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/homeController/homeController.java +++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/homeController/homeController.java @@ -918,14 +918,16 @@ public class homeController extends AppCompatActivity implements ComponentCallba return false; } onSearchBarInvoked(v); - if (!mSearchBarPreviousText.equals(mSearchbar.getText())) { - mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(), false, true, false); - } - mHomeViewController.onClearSelections(true); - mGeckoClient.setLoading(true); + if (mGeckoClient!=null && mGeckoClient.getSession() !=null){ + if (!mSearchBarPreviousText.equals(mSearchbar.getText())) { + mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(), false, true, false); + } + mHomeViewController.onClearSelections(true); + mGeckoClient.setLoading(true); - mSearchbar.clearFocus(); - mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(), false, false, true); + mSearchbar.clearFocus(); + mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(), false, false, true); + } } return true; }); @@ -2225,6 +2227,9 @@ public class homeController extends AppCompatActivity implements ComponentCallba if (e_type.equals(enums.etype.M_INIT_TAB_COUNT_FORCED)) { initTabCountForced(); } else if (e_type.equals(enums.etype.M_INIT_RUNTIME_SETTINGS)) { + if (mGeckoClient.getSession()==null){ + mGeckoClient.initialize(mGeckoView, new geckoViewCallback(), homeController.this, false); + } mGeckoClient.postInitRuntime(mGeckoView, homeController.this); } else if (e_type.equals(enums.etype.M_IS_ERROR_PAGE)) { if (mGeckoClient == null || mGeckoClient.getSession() == null) { @@ -2321,7 +2326,9 @@ public class homeController extends AppCompatActivity implements ComponentCallba onLoadTabOnResume(); } onLoadURL(data.get(0).toString()); - mHomeViewController.onUpdateSearchBar(dataToStr(data.get(0), mGeckoClient.getSession().getCurrentURL()), false, true, false); + if(mGeckoClient == null || mGeckoClient.getSession() == null){ + mHomeViewController.onUpdateSearchBar(dataToStr(data.get(0), mGeckoClient.getSession().getCurrentURL()), false, true, false); + } } mHomeViewController.onFullScreen(true); } else if (e_type.equals(enums.etype.ON_LOAD_TAB_ON_RESUME)) { diff --git a/app/src/main/res/layouts/language/layout/lang_row_view.xml b/app/src/main/res/layouts/language/layout/lang_row_view.xml index cf52a3a3..3ea72bd5 100644 --- a/app/src/main/res/layouts/language/layout/lang_row_view.xml +++ b/app/src/main/res/layouts/language/layout/lang_row_view.xml @@ -20,7 +20,6 @@ android:weightSum="7" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/pDivider" tools:ignore="UnknownIdInLayout"> odebrat přizpůsobení prohlížeče - Bridge ... - web záložek odstranit procházené webové odkazy a data vymazat záložku a Data diff --git a/app/variables.gradle b/app/variables.gradle index 86771129..5b356587 100755 --- a/app/variables.gradle +++ b/app/variables.gradle @@ -1,6 +1,6 @@ /* Version */ -project.ext.vname = 'Build | Dark-Origin 1.0.5.7' -project.ext.vcode = 410 +project.ext.vname = 'Build | Dark-Origin 1.0.5.8' +project.ext.vcode = 415 project.ext.buildType = 'release' /* dimension */