Bug Fixes

Bug Fixes
master
Abdul Mannan Saeed 2023-02-15 02:09:35 +05:00
parent 3641c1a49a
commit 5817c45cbb
30 changed files with 227 additions and 178 deletions

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetDropDown">
<targetSelectedWithDropDown>
<Target>
<type value="QUICK_BOOT_TARGET" />
<deviceKey>
<Key>
<type value="VIRTUAL_DEVICE_PATH" />
<value value="C:\Users\msman\.android\avd\Nexus_6P_API_33.avd" />
</Key>
</deviceKey>
</Target>
</targetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2023-02-07T21:45:12.561778Z" />
</component>
</project>

View File

@ -1,3 +1,3 @@
#Sun Feb 12 18:54:23 PKT 2023 #Wed Feb 15 00:42:23 PKT 2023
\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000= \u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000=
json=321093871 json=337604914

View File

@ -1,5 +1,5 @@
# #
#Sun Feb 12 19:27:01 PKT 2023 #Wed Feb 15 01:32:40 PKT 2023
\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000= \u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000=
sdk_analysis_plugin_version=4.8.5 sdk_analysis_plugin_version=4.8.5
set_multidex=true set_multidex=true

View File

@ -30,12 +30,12 @@
padding-top: 3px padding-top: 3px
} }
.privacy__welcome-mail{ .privacy__welcome-mail{
font-size: 15px;/ font-size: 15px;
text-align:center; text-align:center !important;
margin: 25px auto auto; margin: 25px auto auto;
font-weight: bold; font-weight: bold;
padding: 13px 13px 13px 33px; padding: 13px 13px 13px 13px;
width: 200px; max-width: 200px;
border-radius: 5px; border-radius: 5px;
border: 2px solid white; border: 2px solid white;
cursor: pointer; cursor: pointer;

View File

@ -21,6 +21,7 @@ import com.hiddenservices.onionservices.dataManager.models.bookmarkRowModel;
import com.hiddenservices.onionservices.eventObserver; import com.hiddenservices.onionservices.eventObserver;
import com.hiddenservices.onionservices.helperManager.helperMethod; import com.hiddenservices.onionservices.helperManager.helperMethod;
import com.hiddenservices.onionservices.R; import com.hiddenservices.onionservices.R;
import com.hiddenservices.onionservices.pluginManager.pluginController;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@ -29,6 +30,8 @@ import java.util.Date;
import java.util.List; import java.util.List;
import static android.content.Context.LAYOUT_INFLATER_SERVICE; import static android.content.Context.LAYOUT_INFLATER_SERVICE;
import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eMessageManager.M_COPY;
import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eMessageManager.M_RESET;
@SuppressLint("NotifyDataSetChanged") @SuppressLint("NotifyDataSetChanged")
public class bookmarkAdapter extends RecyclerView.Adapter<bookmarkAdapter.listViewHolder> { public class bookmarkAdapter extends RecyclerView.Adapter<bookmarkAdapter.listViewHolder> {
@ -327,7 +330,7 @@ public class bookmarkAdapter extends RecyclerView.Adapter<bookmarkAdapter.listVi
if (v.getId() == R.id.pMenuCopy) { if (v.getId() == R.id.pMenuCopy) {
helperMethod.copyURL(pUrl, mListHolderContext); helperMethod.copyURL(pUrl, mListHolderContext);
mPopupWindow.dismiss(); mPopupWindow.dismiss();
helperMethod.showToastMessage("copied to clipboard", mContext); pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(mContext), M_COPY);
} else if (v.getId() == R.id.pMenuShare) { } else if (v.getId() == R.id.pMenuShare) {
helperMethod.shareApp((AppCompatActivity) mListHolderContext, pUrl, pTitle); helperMethod.shareApp((AppCompatActivity) mListHolderContext, pUrl, pTitle);
mPopupWindow.dismiss(); mPopupWindow.dismiss();

View File

@ -22,6 +22,7 @@ import com.hiddenservices.onionservices.dataManager.models.historyRowModel;
import com.hiddenservices.onionservices.eventObserver; import com.hiddenservices.onionservices.eventObserver;
import com.hiddenservices.onionservices.helperManager.helperMethod; import com.hiddenservices.onionservices.helperManager.helperMethod;
import com.hiddenservices.onionservices.R; import com.hiddenservices.onionservices.R;
import com.hiddenservices.onionservices.pluginManager.pluginController;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@ -32,6 +33,8 @@ import java.util.List;
import static android.content.Context.LAYOUT_INFLATER_SERVICE; import static android.content.Context.LAYOUT_INFLATER_SERVICE;
import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eMessageManager.M_COPY;
import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eMessageManager.M_RESET;
@SuppressLint("NotifyDataSetChanged") @SuppressLint("NotifyDataSetChanged")
public class historyAdapter extends RecyclerView.Adapter<historyAdapter.listViewHolder> { public class historyAdapter extends RecyclerView.Adapter<historyAdapter.listViewHolder> {
@ -401,7 +404,7 @@ public class historyAdapter extends RecyclerView.Adapter<historyAdapter.listView
if (v.getId() == R.id.pMenuCopy) { if (v.getId() == R.id.pMenuCopy) {
helperMethod.copyURL(pUrl, mListHolderContext); helperMethod.copyURL(pUrl, mListHolderContext);
mPopupWindow.dismiss(); mPopupWindow.dismiss();
helperMethod.showToastMessage("copied to clipboard", mContext); pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(mContext), M_COPY);
} else if (v.getId() == R.id.pMenuShare) { } else if (v.getId() == R.id.pMenuShare) {
helperMethod.shareApp((AppCompatActivity) mListHolderContext, pUrl, pTitle); helperMethod.shareApp((AppCompatActivity) mListHolderContext, pUrl, pTitle);
mPopupWindow.dismiss(); mPopupWindow.dismiss();

View File

@ -1,9 +1,10 @@
package com.hiddenservices.onionservices.appManager.homeManager.geckoManager.dataModel; package com.hiddenservices.onionservices.appManager.homeManager.geckoManager.dataModel;
public class geckoDataModel { public class geckoDataModel {
public boolean mFullScreenStatus = false;
public int mCurrentURL_ID = -1; public int mCurrentURL_ID = -1;
public boolean mFullScreenStatus = false;
public String mTheme = null;
public String mCurrentURL = "about:blank"; public String mCurrentURL = "about:blank";
public String mSessionID; public String mSessionID;
public String mCurrentTitle = "loading"; public String mCurrentTitle = "loading";

View File

@ -73,21 +73,21 @@ public class contentDelegate implements GeckoSession.ContentDelegate {
} }
if (var4.type != 0 && var4.srcUri != null) { if (var4.type != 0 && var4.srcUri != null) {
if (var4.linkUri != null) { if (var4.linkUri != null) {
mEvent.invokeObserver(Arrays.asList(var4.linkUri, mGeckoDataModel.mSessionID, var4.srcUri, title, var4.altText, mGeckoSession, mContext.get()), M_LONG_PRESS_WITH_LINK); mEvent.invokeObserver(Arrays.asList(var4.linkUri, mGeckoDataModel.mSessionID, var4.srcUri, title, mGeckoDataModel.mTheme, var4.altText, mGeckoSession, mContext.get()), M_LONG_PRESS_WITH_LINK);
} else { } else {
try { try {
String mTitle = var4.title; String mTitle = var4.title;
if (mTitle == null || mTitle.length() <= 0) { if (mTitle == null || mTitle.length() <= 0) {
mTitle = helperMethod.getDomainName(mGeckoDataModel.mCurrentURL) + "\n" + var4.srcUri; mTitle = helperMethod.getDomainName(mGeckoDataModel.mCurrentURL) + "\n" + var4.srcUri;
} }
mEvent.invokeObserver(Arrays.asList(var4.srcUri, mGeckoDataModel.mSessionID, mTitle, mGeckoSession, mContext.get()), homeEnums.eGeckoCallback.ON_LONG_PRESS); mEvent.invokeObserver(Arrays.asList(var4.srcUri, mGeckoDataModel.mSessionID, mTitle, mGeckoDataModel.mTheme, mGeckoSession, mContext.get()), homeEnums.eGeckoCallback.ON_LONG_PRESS);
} catch (Exception ex) { } catch (Exception ex) {
ex.printStackTrace(); ex.printStackTrace();
Log.i("", ""); Log.i("", "");
} }
} }
} else if (var4.linkUri != null) { } else if (var4.linkUri != null) {
mEvent.invokeObserver(Arrays.asList(var4.linkUri, mGeckoDataModel.mSessionID, title, mGeckoSession, mContext.get()), M_LONG_PRESS_URL); mEvent.invokeObserver(Arrays.asList(var4.linkUri, mGeckoDataModel.mSessionID, title, mGeckoDataModel.mTheme, mGeckoSession, mContext.get()), M_LONG_PRESS_URL);
} }
} }
@ -109,29 +109,28 @@ public class contentDelegate implements GeckoSession.ContentDelegate {
@UiThread @UiThread
public void onFirstContentfulPaint(@NonNull GeckoSession var1) { public void onFirstContentfulPaint(@NonNull GeckoSession var1) {
if (!mGeckoDataModel.mCurrentURL.equals("about:blank")) { if (!mGeckoDataModel.mCurrentURL.equals("about:blank")) {
mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mCurrentURL_ID), homeEnums.eGeckoCallback.ON_LOAD_REQUEST); mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mTheme), homeEnums.eGeckoCallback.ON_UPDATE_THEME);
mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mCurrentURL_ID, mGeckoDataModel.mTheme), homeEnums.eGeckoCallback.ON_LOAD_REQUEST);
} }
mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle), homeEnums.eGeckoCallback.ON_EXPAND_TOP_BAR); mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mTheme), homeEnums.eGeckoCallback.ON_EXPAND_TOP_BAR);
mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL,mGeckoDataModel.mSessionID,null, mGeckoDataModel.mCurrentURL_ID, null), homeEnums.eGeckoCallback.M_INDEX_WEBSITE);
} }
@UiThread @UiThread
public void onWebAppManifest(@NonNull GeckoSession var1, @NonNull JSONObject var2) { public void onWebAppManifest(@NonNull GeckoSession var1, @NonNull JSONObject var2) {
try { try {
mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL,mGeckoDataModel.mSessionID,mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mCurrentURL_ID, var2.getString("theme_color")), homeEnums.eGeckoCallback.M_INDEX_WEBSITE); mGeckoDataModel.mTheme = var2.getString("theme_color");
mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL,mGeckoDataModel.mSessionID,null, mGeckoDataModel.mCurrentURL_ID, var2.getString("theme_color")), homeEnums.eGeckoCallback.M_INDEX_WEBSITE); mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mTheme), homeEnums.eGeckoCallback.ON_UPDATE_THEME);
mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL,mGeckoDataModel.mSessionID,mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mCurrentURL_ID, mGeckoDataModel.mTheme), homeEnums.eGeckoCallback.M_INDEX_WEBSITE);
} catch (Exception ex) { } catch (Exception ex) {
mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle), homeEnums.eGeckoCallback.ON_UPDATE_THEME);
mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL,mGeckoDataModel.mSessionID,null, mGeckoDataModel.mCurrentURL_ID, null), homeEnums.eGeckoCallback.M_INDEX_WEBSITE);
ex.printStackTrace(); ex.printStackTrace();
} }
mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mCurrentURL_ID), homeEnums.eGeckoCallback.ON_UPDATE_TAB_TITLE); mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mCurrentURL_ID, mGeckoDataModel.mTheme), homeEnums.eGeckoCallback.ON_UPDATE_TAB_TITLE);
} }
@UiThread @UiThread
public void onCrash(@NonNull GeckoSession session) { public void onCrash(@NonNull GeckoSession session) {
mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mCurrentURL_ID, mGeckoSession), homeEnums.eGeckoCallback.ON_DESTROY_MEDIA); mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mCurrentURL_ID, mGeckoDataModel.mTheme, mGeckoSession), homeEnums.eGeckoCallback.ON_DESTROY_MEDIA);
if (!mClosed && status.sSettingIsAppStarted) { if (!mClosed && status.sSettingIsAppStarted) {
if (mEvent == null) { if (mEvent == null) {
@ -147,7 +146,7 @@ public class contentDelegate implements GeckoSession.ContentDelegate {
final Handler handler = new Handler(); final Handler handler = new Handler();
handler.postDelayed(() -> { handler.postDelayed(() -> {
try { try {
mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mCurrentURL_ID, this), homeEnums.eGeckoCallback.M_OPEN_SESSION); mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mCurrentURL_ID, mGeckoDataModel.mTheme, this), homeEnums.eGeckoCallback.M_OPEN_SESSION);
} catch (Exception ignored) { } catch (Exception ignored) {
} }
}, mCrashCount * 500L); }, mCrashCount * 500L);
@ -159,7 +158,7 @@ public class contentDelegate implements GeckoSession.ContentDelegate {
@UiThread @UiThread
public void onKill(@NonNull GeckoSession session) { public void onKill(@NonNull GeckoSession session) {
mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mCurrentURL_ID, mGeckoSession), homeEnums.eGeckoCallback.ON_DESTROY_MEDIA); mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mCurrentURL_ID, mGeckoDataModel.mTheme, mGeckoSession), homeEnums.eGeckoCallback.ON_DESTROY_MEDIA);
if (!mClosed && status.sSettingIsAppStarted) { if (!mClosed && status.sSettingIsAppStarted) {
if (mEvent == null) { if (mEvent == null) {
@ -178,7 +177,7 @@ public class contentDelegate implements GeckoSession.ContentDelegate {
handler.postDelayed(() -> { handler.postDelayed(() -> {
if (status.sSettingIsAppStarted && !session.isOpen()) { if (status.sSettingIsAppStarted && !session.isOpen()) {
try { try {
mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mCurrentURL_ID, this), homeEnums.eGeckoCallback.M_OPEN_SESSION); mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mCurrentURL_ID, mGeckoDataModel.mTheme, this), homeEnums.eGeckoCallback.M_OPEN_SESSION);
} catch (Exception ignored) { } catch (Exception ignored) {
} }
} }
@ -192,7 +191,7 @@ public class contentDelegate implements GeckoSession.ContentDelegate {
@UiThread @UiThread
public void onCloseRequest(@NonNull final GeckoSession session) { public void onCloseRequest(@NonNull final GeckoSession session) {
mClosed = true; mClosed = true;
mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mCurrentURL_ID, this), homeEnums.eGeckoCallback.ON_DESTROY_MEDIA); mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mCurrentURL_ID, mGeckoDataModel.mTheme, this), homeEnums.eGeckoCallback.ON_DESTROY_MEDIA);
mGeckoDataModel.mSessionID = "-1"; mGeckoDataModel.mSessionID = "-1";
} }

View File

@ -36,6 +36,9 @@ public class historyDelegate implements GeckoSession.HistoryDelegate {
@UiThread @UiThread
public void onHistoryStateChange(@NonNull GeckoSession var1, @NonNull GeckoSession.HistoryDelegate.HistoryList var2) { public void onHistoryStateChange(@NonNull GeckoSession var1, @NonNull GeckoSession.HistoryDelegate.HistoryList var2) {
if(mHistory==null || mHistory.size()!=var2.size()){
mGeckoDataModel.mTheme = null;
}
mHistory = var2; mHistory = var2;
if(mHistory !=null){ if(mHistory !=null){
setURL(mHistory.get(mHistory.getCurrentIndex()).getUri()); setURL(mHistory.get(mHistory.getCurrentIndex()).getUri());
@ -43,7 +46,6 @@ public class historyDelegate implements GeckoSession.HistoryDelegate {
if(mCurrentIndex != var2.getCurrentIndex()){ if(mCurrentIndex != var2.getCurrentIndex()){
mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mHistory.get(mHistory.getCurrentIndex()).getTitle(), mGeckoDataModel.mCurrentURL_ID, mGeckoDataModel.mTheme, mGeckoSession), homeEnums.eGeckoCallback.ON_UPDATE_SEARCH_BAR); mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mHistory.get(mHistory.getCurrentIndex()).getTitle(), mGeckoDataModel.mCurrentURL_ID, mGeckoDataModel.mTheme, mGeckoSession), homeEnums.eGeckoCallback.ON_UPDATE_SEARCH_BAR);
} }
Object mID = mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mHistory.get(mHistory.getCurrentIndex()).getTitle(), -1, mGeckoDataModel.mTheme, mGeckoSession, false), homeEnums.eGeckoCallback.ON_UPDATE_HISTORY); Object mID = mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mHistory.get(mHistory.getCurrentIndex()).getTitle(), -1, mGeckoDataModel.mTheme, mGeckoSession, false), homeEnums.eGeckoCallback.ON_UPDATE_HISTORY);
if (mID != null) { if (mID != null) {
mGeckoDataModel.mCurrentURL_ID = (int) mID; mGeckoDataModel.mCurrentURL_ID = (int) mID;

View File

@ -21,6 +21,7 @@ public class mediaSessionDelegate implements MediaSession.Delegate{
private mediaDelegate mMediaDelegate; private mediaDelegate mMediaDelegate;
private WeakReference<AppCompatActivity> mContext; private WeakReference<AppCompatActivity> mContext;
private geckoDataModel mGeckoDataModel; private geckoDataModel mGeckoDataModel;
private boolean mIsRunning = false;
private Bitmap mMediaImage; private Bitmap mMediaImage;
private String mMediaTitle = GENERIC_EMPTY_STR; private String mMediaTitle = GENERIC_EMPTY_STR;
@ -38,6 +39,7 @@ public class mediaSessionDelegate implements MediaSession.Delegate{
@Override @Override
public void onActivated(@NonNull GeckoSession session, @NonNull MediaSession mediaSession) { public void onActivated(@NonNull GeckoSession session, @NonNull MediaSession mediaSession) {
MediaSession.Delegate.super.onActivated(session, mediaSession); MediaSession.Delegate.super.onActivated(session, mediaSession);
mIsRunning = true;
mMediaSession = mediaSession; mMediaSession = mediaSession;
} }
@ -49,7 +51,6 @@ public class mediaSessionDelegate implements MediaSession.Delegate{
@Override @Override
public void onMetadata(@NonNull GeckoSession session, @NonNull MediaSession mediaSession, @NonNull MediaSession.Metadata meta) { public void onMetadata(@NonNull GeckoSession session, @NonNull MediaSession mediaSession, @NonNull MediaSession.Metadata meta) {
try { try {
mMediaTitle = meta.title; mMediaTitle = meta.title;
mMediaImage = meta.artwork.getBitmap(250).poll(2500); mMediaImage = meta.artwork.getBitmap(250).poll(2500);
@ -103,8 +104,10 @@ public class mediaSessionDelegate implements MediaSession.Delegate{
mMediaSession.play(); mMediaSession.play();
} }
else if(pCommands.equals(enums.MediaController.PAUSE)){ else if(pCommands.equals(enums.MediaController.PAUSE)){
mMediaDelegate.showNotification(this.mContext.get(), mMediaTitle, helperMethod.getHost(mGeckoDataModel.mCurrentURL), mMediaImage, false);
mMediaSession.pause(); mMediaSession.pause();
if(mIsRunning){
mMediaDelegate.showNotification(this.mContext.get(), mMediaTitle, helperMethod.getHost(mGeckoDataModel.mCurrentURL), mMediaImage, false);
}
} }
else if(pCommands.equals(enums.MediaController.STOP)){ else if(pCommands.equals(enums.MediaController.STOP)){
mMediaSession.stop(); mMediaSession.stop();
@ -112,6 +115,7 @@ public class mediaSessionDelegate implements MediaSession.Delegate{
else if(pCommands.equals(enums.MediaController.DESTROY)){ else if(pCommands.equals(enums.MediaController.DESTROY)){
mMediaSession.stop(); mMediaSession.stop();
mMediaDelegate.onHideDefaultNotification(); mMediaDelegate.onHideDefaultNotification();
mIsRunning = false;
} }
else if(pCommands.equals(enums.MediaController.SKIP_BACKWARD)){ else if(pCommands.equals(enums.MediaController.SKIP_BACKWARD)){
mMediaSession.previousTrack(); mMediaSession.previousTrack();

View File

@ -112,7 +112,7 @@ public class navigationDelegate implements GeckoSession.NavigationDelegate {
mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, false), homeEnums.eGeckoCallback.M_LOAD_HOMEPAGE_GENESIS); mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, false), homeEnums.eGeckoCallback.M_LOAD_HOMEPAGE_GENESIS);
return GeckoResult.fromValue(AllowOrDeny.DENY); return GeckoResult.fromValue(AllowOrDeny.DENY);
} else if (var1.target == 2) { } else if (var1.target == 2) {
mEvent.invokeObserver(Arrays.asList(m_url, mGeckoDataModel.mSessionID), homeEnums.eGeckoCallback.open_new_tab); mEvent.invokeObserver(Arrays.asList(m_url, mGeckoDataModel.mSessionID), homeEnums.eGeckoCallback.OPEN_NEW_TAB);
mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mTheme), homeEnums.eGeckoCallback.ON_EXPAND_TOP_BAR); mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mTheme), homeEnums.eGeckoCallback.ON_EXPAND_TOP_BAR);
return GeckoResult.fromValue(AllowOrDeny.DENY); return GeckoResult.fromValue(AllowOrDeny.DENY);
} else if (!m_url.equals("about:blank")) { } else if (!m_url.equals("about:blank")) {
@ -154,6 +154,7 @@ public class navigationDelegate implements GeckoSession.NavigationDelegate {
if (status.sSettingIsAppStarted && orbotLocalConstants.mIsTorInitialized) { if (status.sSettingIsAppStarted && orbotLocalConstants.mIsTorInitialized) {
errorHandler handler = new errorHandler(); errorHandler handler = new errorHandler();
mEvent.invokeObserver(Arrays.asList(var2, mGeckoDataModel.mSessionID), homeEnums.eGeckoCallback.ON_LOAD_ERROR); mEvent.invokeObserver(Arrays.asList(var2, mGeckoDataModel.mSessionID), homeEnums.eGeckoCallback.ON_LOAD_ERROR);
mGeckoDataModel.mTheme = null;
mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mTheme), homeEnums.eGeckoCallback.ON_UPDATE_THEME); mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mTheme), homeEnums.eGeckoCallback.ON_UPDATE_THEME);
InputStream mResourceURL = null; InputStream mResourceURL = null;

View File

@ -2,7 +2,6 @@ package com.hiddenservices.onionservices.appManager.homeManager.geckoManager.del
import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eMessageManagerCallbacks.M_RATE_APPLICATION; import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eMessageManagerCallbacks.M_RATE_APPLICATION;
import android.os.Handler;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.UiThread; import androidx.annotation.UiThread;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
@ -69,7 +68,8 @@ public class progressDelegate implements GeckoSession.ProgressDelegate {
@Override @Override
public void onPageStart(@NonNull GeckoSession var1, @NonNull String var2) { public void onPageStart(@NonNull GeckoSession var1, @NonNull String var2) {
mEvent.invokeObserver(Arrays.asList(5, mGeckoDataModel.mSessionID), homeEnums.eGeckoCallback.PROGRESS_UPDATE_FORCED);
mEvent.invokeObserver(Arrays.asList(var2, mGeckoDataModel.mSessionID, var2, mGeckoDataModel.mCurrentURL_ID, mGeckoDataModel.mTheme, null), homeEnums.eGeckoCallback.ON_UPDATE_SEARCH_BAR);
if (mIsLoaded) { if (mIsLoaded) {
if (!mGeckoDataModel.mCurrentURL.equals("about:config") && !var2.equals("about:blank") && helperMethod.getHost(var2).endsWith(".onion")) { if (!mGeckoDataModel.mCurrentURL.equals("about:config") && !var2.equals("about:blank") && helperMethod.getHost(var2).endsWith(".onion")) {
var2 = var2.replace("www.", ""); var2 = var2.replace("www.", "");
@ -85,7 +85,6 @@ public class progressDelegate implements GeckoSession.ProgressDelegate {
if (!mGeckoDataModel.mCurrentURL.equals("about:config") && !mGeckoDataModel.mCurrentURL.equals("about:blank") && !mGeckoDataModel.mCurrentTitle.equals("loading")) { if (!mGeckoDataModel.mCurrentURL.equals("about:config") && !mGeckoDataModel.mCurrentURL.equals("about:blank") && !mGeckoDataModel.mCurrentTitle.equals("loading")) {
mProgress = 5; mProgress = 5;
mContext.get().runOnUiThread(() -> mEvent.invokeObserver(Arrays.asList(5, mGeckoDataModel.mSessionID), homeEnums.eGeckoCallback.PROGRESS_UPDATE)); mContext.get().runOnUiThread(() -> mEvent.invokeObserver(Arrays.asList(5, mGeckoDataModel.mSessionID), homeEnums.eGeckoCallback.PROGRESS_UPDATE));
mGeckoDataModel.mThemeChanged = false;
if(!var2.equals("about:blank")){ if(!var2.equals("about:blank")){
mEvent.invokeObserver(Arrays.asList(var2, mGeckoDataModel.mSessionID), homeEnums.eGeckoCallback.SEARCH_UPDATE); mEvent.invokeObserver(Arrays.asList(var2, mGeckoDataModel.mSessionID), homeEnums.eGeckoCallback.SEARCH_UPDATE);
} }
@ -98,18 +97,6 @@ public class progressDelegate implements GeckoSession.ProgressDelegate {
if (var2) { if (var2) {
if (mProgress >= 100) { if (mProgress >= 100) {
mEvent.invokeObserver(Arrays.asList(null, mGeckoDataModel.mSessionID), homeEnums.eGeckoCallback.ON_PAGE_LOADED); mEvent.invokeObserver(Arrays.asList(null, mGeckoDataModel.mSessionID), homeEnums.eGeckoCallback.ON_PAGE_LOADED);
if (!mGeckoDataModel.mThemeChanged) {
new Handler().postDelayed(() ->
{
if (!mGeckoDataModel.mThemeChanged) {
mGeckoDataModel.mTheme = null;
if (mEvent != null) {
mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mTheme), homeEnums.eGeckoCallback.ON_UPDATE_THEME);
}
}
}, 500);
}
} }
} }
} }

View File

@ -59,7 +59,10 @@ public class geckoClients {
if (pGeckoView.getSession() != null) { if (pGeckoView.getSession() != null) {
pGeckoView.releaseSession(); pGeckoView.releaseSession();
} }
mSession = initSettings(pGeckoView, pEvent, pContext);
this.mEvent = pEvent;
mSessionID = helperMethod.createRandomID();
mSession = initSettings(pGeckoView, pEvent, pContext, mSessionID);
initRuntimeSettings(pContext); initRuntimeSettings(pContext);
mSession.open(mRuntime); mSession.open(mRuntime);
pGeckoView.setSession(mSession); pGeckoView.setSession(mSession);
@ -67,7 +70,8 @@ public class geckoClients {
} }
public geckoSession initializeSessionInBackground(GeckoView pGeckoView, eventObserver.eventListener pEvent, AppCompatActivity pContext, String pURL) { public geckoSession initializeSessionInBackground(GeckoView pGeckoView, eventObserver.eventListener pEvent, AppCompatActivity pContext, String pURL) {
geckoSession mSessionHidden = initSettings(pGeckoView, pEvent, pContext); geckoSession mSessionHidden = initSettings(pGeckoView, pEvent, pContext, helperMethod.createRandomID());
mSessionHidden.open(mRuntime);
mSessionHidden.loadUri(pURL); mSessionHidden.loadUri(pURL);
pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(pContext), M_LOAD_NEW_TAB); pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(pContext), M_LOAD_NEW_TAB);
@ -75,16 +79,13 @@ public class geckoClients {
return mSessionHidden; return mSessionHidden;
} }
private geckoSession initSettings(GeckoView pGeckoView, eventObserver.eventListener pEvent, AppCompatActivity pContext){ private geckoSession initSettings(GeckoView pGeckoView, eventObserver.eventListener pEvent, AppCompatActivity pContext, String pSessionID){
this.mEvent = pEvent; geckoSession mSessionIbitializer = new geckoSession(new geckoViewClientCallback(), pSessionID, pContext, pGeckoView);
mSessionID = helperMethod.createRandomID(); mSessionIbitializer.getSettings().setUseTrackingProtection(status.sStatusDoNotTrack);
mSession = new geckoSession(new geckoViewClientCallback(), mSessionID, pContext, pGeckoView); mSessionIbitializer.getSettings().setFullAccessibilityTree(true);
mSessionIbitializer.getSettings().setUserAgentMode(USER_AGENT_MODE_MOBILE);
mSession.getSettings().setUseTrackingProtection(status.sStatusDoNotTrack); mSessionIbitializer.getSettings().setAllowJavascript(status.sSettingJavaStatus);
mSession.getSettings().setFullAccessibilityTree(true); return mSessionIbitializer;
mSession.getSettings().setUserAgentMode(USER_AGENT_MODE_MOBILE);
mSession.getSettings().setAllowJavascript(status.sSettingJavaStatus);
return mSession;
} }
public void initializeIcon(Context pcontext) { public void initializeIcon(Context pcontext) {
@ -132,7 +133,6 @@ public class geckoClients {
mSettings.configFilePath(helperMethod.getAssetsCacheFile(context, "geckoview-config.yaml")); mSettings.configFilePath(helperMethod.getAssetsCacheFile(context, "geckoview-config.yaml"));
} }
mSettings.build(); mSettings.build();
onClearAll();
mRuntime = GeckoRuntime.create(context, mSettings.build()); mRuntime = GeckoRuntime.create(context, mSettings.build());
mRuntime.getSettings().setAboutConfigEnabled(true); mRuntime.getSettings().setAboutConfigEnabled(true);
@ -149,6 +149,7 @@ public class geckoClients {
} }
dataController.getInstance().initializeListData(); dataController.getInstance().initializeListData();
onClearAll();
} }
initializeIcon(context); initializeIcon(context);
} }
@ -327,7 +328,6 @@ public class geckoClients {
mRuntime.getStorageController().clearData(SITE_DATA); mRuntime.getStorageController().clearData(SITE_DATA);
} }
} }
public void onClearSession() { public void onClearSession() {
if (mRuntime != null) { if (mRuntime != null) {
mRuntime.getStorageController().clearData(AUTH_SESSIONS); mRuntime.getStorageController().clearData(AUTH_SESSIONS);
@ -385,7 +385,9 @@ public class geckoClients {
} }
public void onExitFullScreen() { public void onExitFullScreen() {
//mSession.exitScreen(); if(mSession!=null){
mSession.exitScreen();
}
} }
public void onForwardPressed() { public void onForwardPressed() {

View File

@ -123,7 +123,7 @@ public class geckoSession extends GeckoSession implements GeckoSession.Progress
public void onClose() { public void onClose() {
stop(); stop();
mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mCurrentURL_ID, this), homeEnums.eGeckoCallback.ON_DESTROY_MEDIA); mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mCurrentURL_ID, mGeckoDataModel.mTheme, this), homeEnums.eGeckoCallback.ON_DESTROY_MEDIA);
} }
public boolean onRestoreState() { public boolean onRestoreState() {
@ -178,17 +178,16 @@ public class geckoSession extends GeckoSession implements GeckoSession.Progress
} }
public void goBackSession() { public void goBackSession() {
mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mCurrentURL_ID, this), homeEnums.eGeckoCallback.ON_DESTROY_MEDIA); mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mCurrentURL_ID, mGeckoDataModel.mTheme, this), homeEnums.eGeckoCallback.ON_DESTROY_MEDIA);
goBack(); goBack();
} }
public void goForwardSession() { public void goForwardSession() {
mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mCurrentURL_ID, this), homeEnums.eGeckoCallback.ON_DESTROY_MEDIA); mEvent.invokeObserver(Arrays.asList(mGeckoDataModel.mCurrentURL, mGeckoDataModel.mSessionID, mGeckoDataModel.mCurrentTitle, mGeckoDataModel.mCurrentURL_ID, mGeckoDataModel.mTheme, this), homeEnums.eGeckoCallback.ON_DESTROY_MEDIA);
goForward(); goForward();
} }
/*Properties Getter Setter*/ /*Properties Getter Setter*/
public void setTheme(String pTheme) { public void setTheme(String pTheme) {
mGeckoDataModel.mTheme = pTheme; mGeckoDataModel.mTheme = pTheme;
} }

View File

@ -265,6 +265,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
public void initTor() { public void initTor() {
mHandler = new Handler();
try { try {
if(!status.mThemeApplying) { if(!status.mThemeApplying) {
Intent intent = new Intent(this, OrbotService.class); Intent intent = new Intent(this, OrbotService.class);
@ -288,7 +289,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
}, 500); }, 500);
}else { }else {
onHideDefaultNotification(); onHideDefaultNotification();
int notificationStatus = status.sBridgeNotificationManual; int notificationStatus = status.sNotificaionStatus;
if (notificationStatus == 0) { if (notificationStatus == 0) {
pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_DISABLE_NOTIFICATION); pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_DISABLE_NOTIFICATION);
activityContextManager.getInstance().getHomeController().onShowDefaultNotification(); activityContextManager.getInstance().getHomeController().onShowDefaultNotification();
@ -769,7 +770,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} }
public void onLoadTabHidden(boolean isSessionClosed, boolean pExpandAppBar, boolean pForced, boolean pGeneratePixel) { public void onLoadTabHidden(boolean isSessionClosed, boolean pExpandAppBar, boolean pForced, boolean pGeneratePixel) {
mHomeViewController.onNewTabAnimation(null, M_NEW_LINK_ANIMATION, 5000); mHomeViewController.onNewTabAnimation(null, M_NEW_LINK_ANIMATION, 1000);
onLoadTab(mSessionNewTab, isSessionClosed, pExpandAppBar, pForced, pGeneratePixel); onLoadTab(mSessionNewTab, isSessionClosed, pExpandAppBar, pForced, pGeneratePixel);
} }
@ -925,7 +926,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
NotificationManager manager = null; NotificationManager manager = null;
public void showDefaultNotification(Context context, String title) { public void showDefaultNotification(Context context, String title) {
if(!status.mThemeApplying && status.sTorBrowsing && status.sBridgeNotificationManual != 0 || !orbotLocalConstants.mAppStarted){ if(!status.mThemeApplying && status.sTorBrowsing && status.sNotificaionStatus != 0 || !orbotLocalConstants.mAppStarted || status.sNotificaionStatus == 0){
return; return;
} }
@ -1458,17 +1459,19 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} }
public void onHomeButton(View view) { public void onHomeButton(View view) {
mGeckoClient.getSession().setTheme(null); if(mGeckoClient.getSession()!=null){
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), true); mGeckoClient.getSession().setTheme(null);
if(!status.sRestoreTabs){ mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), true);
int mCount = (int) dataController.getInstance().invokeTab(dataEnums.eTabCommands.GET_TOTAL_TAB, null); if(!status.sRestoreTabs){
int mCount = (int) dataController.getInstance().invokeTab(dataEnums.eTabCommands.GET_TOTAL_TAB, null);
}
if (status.sSettingDefaultSearchEngine.equals(constants.CONST_BACKEND_GENESIS_URL)) {
mHomeViewController.onNewTabAnimation(Collections.singletonList(helperMethod.getDomainName(mHomeModel.getSearchEngine())), homeEnums.eHomeViewCallback.M_HOME_BUTTON_PRESSED, 1000);
} else {
onLoadURL(helperMethod.getHost(status.sSettingDefaultSearchEngine));
}
mHomeViewController.onUpdateSearchBar(status.sSettingDefaultSearchEngine, false, false, false);
} }
if (status.sSettingDefaultSearchEngine.equals(constants.CONST_BACKEND_GENESIS_URL)) {
mHomeViewController.onNewTabAnimation(Collections.singletonList(helperMethod.getDomainName(mHomeModel.getSearchEngine())), homeEnums.eHomeViewCallback.M_HOME_BUTTON_PRESSED, 5000);
} else {
onLoadURL(helperMethod.getHost(status.sSettingDefaultSearchEngine));
}
mHomeViewController.onUpdateSearchBar(status.sSettingDefaultSearchEngine, false, false, false);
} }
/*TAB CONTROLLER EVENTS*/ /*TAB CONTROLLER EVENTS*/
@ -1525,15 +1528,16 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} }
public void postNewLinkTabAnimation(String url, boolean isRemovable) { public void postNewLinkTabAnimation(String url, boolean isRemovable) {
mHomeViewController.onNewTabAnimation(Collections.singletonList(helperMethod.getDomainName(mHomeModel.getSearchEngine())), null, 1000);
mGeckoView.releaseSession();
mHomeViewController.onProgressBarUpdate(5, true); mHomeViewController.onProgressBarUpdate(5, true);
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));
mGeckoClient.initializeSession(mGeckoView, new geckoViewCallback(), this); initializeGeckoView(true, true);
mGeckoClient.onSaveCurrentTab(true);
dataController.getInstance().invokeTab(dataEnums.eTabCommands.MOVE_TAB_TO_TOP, Collections.singletonList(mGeckoClient.getSession()));
initTabCountForced();
mHomeViewController.progressBarReset(); mHomeViewController.progressBarReset();
mHomeViewController.onUpdateSearchBar(url, false, true, false); mHomeViewController.onUpdateSearchBar(url, false, true, false);
mGeckoClient.loadURL(url, mGeckoView, homeController.this); mGeckoClient.loadURL(url, mGeckoView, homeController.this);
mGeckoView.releaseSession();
mGeckoView.setSession(mGeckoClient.getSession());
if (isRemovable) { if (isRemovable) {
mGeckoClient.setRemovableFromBackPressed(true); mGeckoClient.setRemovableFromBackPressed(true);
} }
@ -1564,8 +1568,9 @@ public class homeController extends AppCompatActivity implements ComponentCallba
initTabCount(homeEnums.eHomeViewCallback.M_NEW_LINK_IN_NEW_TAB, Collections.singletonList(url)); initTabCount(homeEnums.eHomeViewCallback.M_NEW_LINK_IN_NEW_TAB, Collections.singletonList(url));
} else { } else {
mHomeViewController.initTab((int) dataController.getInstance().invokeTab(dataEnums.eTabCommands.GET_TOTAL_TAB, null), false, null, null); mHomeViewController.initTab((int) dataController.getInstance().invokeTab(dataEnums.eTabCommands.GET_TOTAL_TAB, null), false, null, null);
mHomeViewController.onNewTabAnimation(Collections.singletonList(url), homeEnums.eHomeViewCallback.M_NEW_LINK_IN_NEW_TAB_LOAD, 5000); mHomeViewController.onNewTabAnimation(Collections.singletonList(url), homeEnums.eHomeViewCallback.M_NEW_LINK_IN_NEW_TAB_LOAD, 1000);
} }
mGeckoView.destroyDrawingCache();
} }
geckoSession mSessionNewTab = null; geckoSession mSessionNewTab = null;
@ -1578,6 +1583,8 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mHomeViewController.progressBarReset(); mHomeViewController.progressBarReset();
initTabCountForced(); initTabCountForced();
mSessionNewTab.loadUri(url);
mAppBar.setTag(R.id.expandableBar, true); mAppBar.setTag(R.id.expandableBar, true);
} }
@ -1608,14 +1615,10 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} }
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), false); mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), false);
} }
mHomeViewController.onNewTabAnimation(Arrays.asList(isKeyboardOpenedTemp, isKeyboardOpened), homeEnums.eHomeViewCallback.M_INITIALIZE_TAB_SINGLE, 5000); mHomeViewController.onNewTabAnimation(Arrays.asList(isKeyboardOpenedTemp, isKeyboardOpened), homeEnums.eHomeViewCallback.M_INITIALIZE_TAB_SINGLE, 1000);
}, 100); }, 100);
} }
public void onUpdateScreenPixel() {
}
public void onNewTabBackground(boolean isKeyboardOpenedTemp, boolean isKeyboardOpened) { public void onNewTabBackground(boolean isKeyboardOpenedTemp, boolean isKeyboardOpened) {
if (status.sSettingDefaultSearchEngine.startsWith("http://167.86.99.31") || !status.sOpenURLInNewTab || mGeckoClient.getSession().getCurrentURL().equals("about:blank") || mGeckoClient.getSession().getCurrentURL().contains("167.86.99.31") || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_URL_CACHED) || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_URL_CACHED_DARK) || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_HELP_URL_CACHE) || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_HELP_URL_CACHE_DARK)) { if (status.sSettingDefaultSearchEngine.startsWith("http://167.86.99.31") || !status.sOpenURLInNewTab || mGeckoClient.getSession().getCurrentURL().equals("about:blank") || mGeckoClient.getSession().getCurrentURL().contains("167.86.99.31") || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_URL_CACHED) || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_URL_CACHED_DARK) || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_HELP_URL_CACHE) || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_HELP_URL_CACHE_DARK)) {
mHomeViewController.updateBannerAdvertStatus(false, (boolean) pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED)); mHomeViewController.updateBannerAdvertStatus(false, (boolean) pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
@ -1633,7 +1636,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), true); mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), true);
} }
mHomeViewController.onNewTabAnimation(Arrays.asList(isKeyboardOpenedTemp, isKeyboardOpened), homeEnums.eHomeViewCallback.M_INITIALIZE_TAB_SINGLE, 5000); mHomeViewController.onNewTabAnimation(Arrays.asList(isKeyboardOpenedTemp, isKeyboardOpened), homeEnums.eHomeViewCallback.M_INITIALIZE_TAB_SINGLE, 1000);
} }
public String completeURL(String pURL) { public String completeURL(String pURL) {
@ -1649,12 +1652,13 @@ public class homeController extends AppCompatActivity implements ComponentCallba
if (status.sSettingDefaultSearchEngine.startsWith("http://167.86.99.31") || !status.sOpenURLInNewTab || mGeckoClient.getSession().getCurrentURL().equals("about:blank") || mGeckoClient.getSession().getCurrentURL().contains("167.86.99.31") || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_URL_CACHED) || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_URL_CACHED_DARK) || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_HELP_URL_CACHE) || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_HELP_URL_CACHE_DARK)) { if (status.sSettingDefaultSearchEngine.startsWith("http://167.86.99.31") || !status.sOpenURLInNewTab || mGeckoClient.getSession().getCurrentURL().equals("about:blank") || mGeckoClient.getSession().getCurrentURL().contains("167.86.99.31") || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_URL_CACHED) || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_URL_CACHED_DARK) || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_HELP_URL_CACHE) || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_HELP_URL_CACHE_DARK)) {
mHomeViewController.updateBannerAdvertStatus(false, (boolean) pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED)); mHomeViewController.updateBannerAdvertStatus(false, (boolean) pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
} }
mHomeViewController.onNewTabAnimation(Collections.singletonList(url), homeEnums.eHomeViewCallback.M_INITIALIZE_TAB_LINK, 5000); mHomeViewController.onNewTabAnimation(Collections.singletonList(url), homeEnums.eHomeViewCallback.M_INITIALIZE_TAB_LINK, 1000);
}, 100); }, 100);
} }
public void onOpenLinkNewTabLoaded(String url) { public void onOpenLinkNewTabLoaded(String url) {
mNewTab.setPressed(true); mNewTab.setPressed(true);
mHomeViewController.onNewTabAnimation(Collections.singletonList(helperMethod.getDomainName(mHomeModel.getSearchEngine())), null, 1000);
final Handler handler = new Handler(); final Handler handler = new Handler();
handler.postDelayed(() -> { handler.postDelayed(() -> {
onGetThumbnail(null, false); onGetThumbnail(null, false);
@ -1724,7 +1728,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} }
boolean mBookmarked = (boolean) dataController.getInstance().invokeBookmark(dataEnums.eBookmarkCommands.M_BOOKMARK_AVAILABLE, Collections.singletonList(url)); boolean mBookmarked = (boolean) dataController.getInstance().invokeBookmark(dataEnums.eBookmarkCommands.M_BOOKMARK_AVAILABLE, Collections.singletonList(url));
mHomeViewController.onOpenMenu(view, mGeckoClient.canGoForward(), !(mProgressBar.getAlpha() <= 0 || mProgressBar.getVisibility() == View.INVISIBLE), mGeckoClient.getUserAgent(), mGeckoClient.getSession().getCurrentURL(), mBookmarked); mHomeViewController.onOpenMenu(view, mGeckoClient.canGoForward(), !(mProgressBar.getAlpha() <= 0 || mProgressBar.getVisibility() == View.INVISIBLE || mProgressBar.getVisibility() == View.GONE), mGeckoClient.getUserAgent(), mGeckoClient.getSession().getCurrentURL(), mBookmarked);
view.setClickable(false); view.setClickable(false);
new Handler().postDelayed(() -> new Handler().postDelayed(() ->
@ -1747,8 +1751,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba
@Override @Override
public void onBackPressed() { public void onBackPressed() {
mSearchEngineBar.findViewById(R.id.pSearchEngineHintInvoke).setVisibility(View.GONE);
if (mTabFragment.getVisibility() == View.VISIBLE) { if (mTabFragment.getVisibility() == View.VISIBLE) {
if (activityContextManager.getInstance().getTabController().isSelectionOpened()) { if (activityContextManager.getInstance().getTabController().isSelectionOpened()) {
activityContextManager.getInstance().getTabController().onClearSelection(null); activityContextManager.getInstance().getTabController().onClearSelection(null);
@ -1896,6 +1898,9 @@ public class homeController extends AppCompatActivity implements ComponentCallba
@Override @Override
public void onResume() { public void onResume() {
if(status.sNotificaionStatus == 1){
onShowDefaultNotification();
}
orbotLocalConstants.mAppForceExit = false; orbotLocalConstants.mAppForceExit = false;
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_RESUME); pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_RESUME);
@ -2174,21 +2179,23 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} }
public void onStartApplication(View view) { public void onStartApplication(View view) {
//status.sSettingDefaultSearchEngine = constants.CONST_BACKEND_DUCK_DUCK_GO_URL;
onStartBrowser(); onStartBrowser();
//status.sSettingDefaultSearchEngine = constants.CONST_BACKEND_DUCK_DUCK_GO_URL;
int notificationStatus = status.sBridgeNotificationManual; int notificationStatus = status.sNotificaionStatus;
if (notificationStatus == 0) { if (notificationStatus == 0) {
pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_DISABLE_NOTIFICATION); pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_DISABLE_NOTIFICATION);
activityContextManager.getInstance().getHomeController().onShowDefaultNotification(); activityContextManager.getInstance().getHomeController().onShowDefaultNotification();
} else { } else {
new Handler().postDelayed(() -> new Handler().postDelayed(() ->
{ {
pluginController.getInstance().onOrbotInvoke(Arrays.asList(status.sBridgeCustomBridge, status.sBridgeGatewayManual, status.sBridgeCustomType, status.sBridgeStatus, status.sShowImages, status.sClearOnExit, dataController.getInstance().invokeBridges(dataEnums.eBridgeWebsiteCommands.M_FETCH, null)), pluginEnums.eOrbotManager.M_START_ORBOT);
pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_ENABLE_NOTIFICATION); pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_ENABLE_NOTIFICATION);
}, 2000); }, 2000);
} }
new Handler().postDelayed(() ->
{
pluginController.getInstance().onOrbotInvoke(Arrays.asList(status.sBridgeCustomBridge, status.sBridgeGatewayManual, status.sBridgeCustomType, status.sBridgeStatus, status.sShowImages, status.sClearOnExit, dataController.getInstance().invokeBridges(dataEnums.eBridgeWebsiteCommands.M_FETCH, null)), pluginEnums.eOrbotManager.M_START_ORBOT);
}, 2000);
} }
public void onStartApplicationNoTor(View view) { public void onStartApplicationNoTor(View view) {
@ -2226,6 +2233,8 @@ public class homeController extends AppCompatActivity implements ComponentCallba
return mBannerAds; return mBannerAds;
} }
public void onInvokeProxyLoading() { public void onInvokeProxyLoading() {
Callable<String> callable = () -> { Callable<String> callable = () -> {
@ -2593,7 +2602,9 @@ public class homeController extends AppCompatActivity implements ComponentCallba
activityContextManager.getInstance().getHomeController().onClearSession(); activityContextManager.getInstance().getHomeController().onClearSession();
activityContextManager.getInstance().getHomeController().onClearCookies(); activityContextManager.getInstance().getHomeController().onClearCookies();
onClearSettings(); if(mGeckoClient.getSession()!=null){
onClearSettings();
}
status.initStatus(activityContextManager.getInstance().getHomeController(), false); status.initStatus(activityContextManager.getInstance().getHomeController(), false);
dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_CLEAR_TAB, null); dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_CLEAR_TAB, null);
pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(this), M_DATA_CLEARED); pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(this), M_DATA_CLEARED);
@ -2666,6 +2677,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
if(e_type==null){ if(e_type==null){
return null; return null;
} }
if (e_type.equals(homeEnums.eHomeViewCallback.M_INIT_TAB_COUNT_FORCED)) { if (e_type.equals(homeEnums.eHomeViewCallback.M_INIT_TAB_COUNT_FORCED)) {
initTabCountForced(); initTabCountForced();
} }
@ -2711,6 +2723,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), true); mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), true);
} }
} else if (e_type.equals(homeEnums.eHomeViewCallback.ON_UPDATE_THEME)) { } else if (e_type.equals(homeEnums.eHomeViewCallback.ON_UPDATE_THEME)) {
mHomeViewController.onResetTabAnimation();
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), false); mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), false);
} else if (e_type.equals(homeEnums.eHomeViewCallback.M_INITIALIZE_TAB_SINGLE)) { } else if (e_type.equals(homeEnums.eHomeViewCallback.M_INITIALIZE_TAB_SINGLE)) {
initTabCount(homeEnums.eHomeViewCallback.ON_NEW_TAB_ANIMATION, data); initTabCount(homeEnums.eHomeViewCallback.ON_NEW_TAB_ANIMATION, data);
@ -2724,7 +2737,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} }
else if (e_type.equals(homeEnums.eHomeViewCallback.ON_INIT_ADS)) { else if (e_type.equals(homeEnums.eHomeViewCallback.ON_INIT_ADS)) {
mHomeViewController.onSetBannerAdMargin((boolean) data.get(0), (boolean) pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED)); mHomeViewController.onSetBannerAdMargin((boolean) data.get(0), (boolean) pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
} else if (e_type.equals(homeEnums.eHomeViewCallback.on_full_screen_ads)) { } else if (e_type.equals(homeEnums.eHomeViewCallback.ON_FULL_SCREEN_ADS)) {
if((boolean)data.get(0)){ if((boolean)data.get(0)){
pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_HIDE_BANNER); pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_HIDE_BANNER);
}else { }else {
@ -2768,7 +2781,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
}; };
handler.postDelayed(runnable, 2500); handler.postDelayed(runnable, 2500);
} }
} else if (e_type.equals(homeEnums.eHomeViewCallback.on_url_load)) { } else if (e_type.equals(homeEnums.eHomeViewCallback.ON_URL_LOAD)) {
if (status.sSettingIsAppRedirected) { if (status.sSettingIsAppRedirected) {
mHomeViewController.onPageFinished(); mHomeViewController.onPageFinished();
//mGeckoClient.onRedrawPixel(homeController.this); //mGeckoClient.onRedrawPixel(homeController.this);
@ -2948,6 +2961,8 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mScrollHandler.postDelayed(mScrollRunnable, 450); mScrollHandler.postDelayed(mScrollRunnable, 450);
} }
Handler mHandler = null;
public class geckoViewCallback implements eventObserver.eventListener { public class geckoViewCallback implements eventObserver.eventListener {
@Override @Override
@ -2974,8 +2989,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} else if (e_type.equals(homeEnums.eGeckoCallback.M_LOAD_HOMEPAGE_GENESIS)) { } else if (e_type.equals(homeEnums.eGeckoCallback.M_LOAD_HOMEPAGE_GENESIS)) {
onLoadURL(helperMethod.getDomainName(constants.CONST_BACKEND_GENESIS_URL)); onLoadURL(helperMethod.getDomainName(constants.CONST_BACKEND_GENESIS_URL));
} else if (e_type.equals(homeEnums.eGeckoCallback.PROGRESS_UPDATE_FORCED)) { } else if (e_type.equals(homeEnums.eGeckoCallback.PROGRESS_UPDATE_FORCED)) {
Log.i("SUPPPP7:", (String) data.get(2));
mHomeViewController.onUpdateSearchBar((String) data.get(2), false, true, false);
mHomeViewController.onProgressBarUpdate((int) data.get(0), true); mHomeViewController.onProgressBarUpdate((int) data.get(0), true);
} else if (e_type.equals(homeEnums.eGeckoCallback.ON_UPDATE_SEARCH_BAR)) { } else if (e_type.equals(homeEnums.eGeckoCallback.ON_UPDATE_SEARCH_BAR)) {
mHomeViewController.onUpdateSearchBar((String) data.get(0), false, false, false); mHomeViewController.onUpdateSearchBar((String) data.get(0), false, false, false);
@ -2990,9 +3003,13 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} else if (e_type.equals(homeEnums.eGeckoCallback.M_CLOSE_TAB)) { } else if (e_type.equals(homeEnums.eGeckoCallback.M_CLOSE_TAB)) {
onCloseCurrentTab(mGeckoClient.getSession()); onCloseCurrentTab(mGeckoClient.getSession());
} else if (e_type.equals(homeEnums.eGeckoCallback.M_CLOSE_TAB_BACK)) { } else if (e_type.equals(homeEnums.eGeckoCallback.M_CLOSE_TAB_BACK)) {
mHomeViewController.onNewTabAnimation(Collections.singletonList(mGeckoClient.getSession()), homeEnums.eGeckoCallback.M_CLOSE_TAB_BACK, 250); mHomeViewController.onNewTabAnimation(Collections.singletonList(mGeckoClient.getSession()), homeEnums.eGeckoCallback.M_CLOSE_TAB_BACK, 500);
} else if (e_type.equals(homeEnums.eGeckoCallback.ON_UPDATE_THEME)) { } else if (e_type.equals(homeEnums.eGeckoCallback.ON_UPDATE_THEME)) {
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), false); mHomeViewController.onResetTabAnimation();
new Handler().postDelayed(() ->
{
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), false);
}, 500);
} else if (e_type.equals(homeEnums.eGeckoCallback.START_PROXY)) { } else if (e_type.equals(homeEnums.eGeckoCallback.START_PROXY)) {
pluginController.getInstance().onOrbotInvoke(data, pluginEnums.eOrbotManager.M_SET_PROXY); pluginController.getInstance().onOrbotInvoke(data, pluginEnums.eOrbotManager.M_SET_PROXY);
} else if (e_type.equals(homeEnums.eGeckoCallback.ON_UPDATE_HISTORY)) { } else if (e_type.equals(homeEnums.eGeckoCallback.ON_UPDATE_HISTORY)) {
@ -3037,7 +3054,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
pluginController.getInstance().onMessageManagerInvoke(data, M_LONG_PRESS_DOWNLOAD); pluginController.getInstance().onMessageManagerInvoke(data, M_LONG_PRESS_DOWNLOAD);
} else if (e_type.equals(M_LONG_PRESS_URL)) { } else if (e_type.equals(M_LONG_PRESS_URL)) {
pluginController.getInstance().onMessageManagerInvoke(data, M_LONG_PRESS_URL); pluginController.getInstance().onMessageManagerInvoke(data, M_LONG_PRESS_URL);
} else if (e_type.equals(homeEnums.eGeckoCallback.open_new_tab)) { } else if (e_type.equals(homeEnums.eGeckoCallback.OPEN_NEW_TAB)) {
initTabCount(OPEN_NEW_TAB, data); initTabCount(OPEN_NEW_TAB, data);
} else if (e_type.equals(homeEnums.eGeckoCallback.ON_CLOSE_SESSION)) { } else if (e_type.equals(homeEnums.eGeckoCallback.ON_CLOSE_SESSION)) {
if (!onCloseCurrentTab(mGeckoClient.getSession())) { if (!onCloseCurrentTab(mGeckoClient.getSession())) {
@ -3078,12 +3095,11 @@ public class homeController extends AppCompatActivity implements ComponentCallba
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_INT, Arrays.asList(keys.SETTING_RATE_COUNT, status.sGlobalURLCount)); dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_INT, Arrays.asList(keys.SETTING_RATE_COUNT, status.sGlobalURLCount));
} else if (e_type.equals(homeEnums.eGeckoCallback.M_ORBOT_LOADING)) { } else if (e_type.equals(homeEnums.eGeckoCallback.M_ORBOT_LOADING)) {
pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(homeController.this), M_ORBOT_LOADING); pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(homeController.this), M_ORBOT_LOADING);
} else if (e_type.equals(homeEnums.eGeckoCallback.M_DEFAULT_BROWSER)) { }
//if (helperMethod.isDefaultBrowserSet(homeController.this)) { else if (e_type.equals(homeEnums.eGeckoCallback.M_DEFAULT_BROWSER)) {
runOnUiThread(() -> { runOnUiThread(() -> {
pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(homeController.this), M_DEFAULT_BROWSER); pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(homeController.this), M_DEFAULT_BROWSER);
}); });
//}
} else if (e_type.equals(homeEnums.eGeckoCallback.M_NEW_IDENTITY)) { } else if (e_type.equals(homeEnums.eGeckoCallback.M_NEW_IDENTITY)) {
pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_NEW_CIRCUIT); pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_NEW_CIRCUIT);
} else if (e_type.equals(homeEnums.eGeckoCallback.M_NEW_IDENTITY_MESSAGED)) { } else if (e_type.equals(homeEnums.eGeckoCallback.M_NEW_IDENTITY_MESSAGED)) {

View File

@ -4,11 +4,11 @@ package com.hiddenservices.onionservices.appManager.homeManager.homeController;
public class homeEnums { public class homeEnums {
public enum eHomeViewCallback { public enum eHomeViewCallback {
M_HOME_PAGE, M_INITIALIZE_TAB_LINK_OPEN, OPEN_NEW_TAB_INSTANT, ON_LOAD_TAB_ON_RESUME, ON_LOAD_ADVERT, on_url_load, M_WELCOME_MESSAGE, M_SPLASH_DISABLE, M_GET_CURRENT_URL, M_ON_BANNER_UPDATE, on_full_screen_ads, M_INITIALIZE_TAB_LINK, M_HOME_BUTTON_PRESSED, M_INITIALIZE_TAB_SINGLE, ON_UPDATE_THEME, M_UPDATE_THEME, OPEN_DOWNLOAD_FOLDER, ON_OPEN_TAB_VIEW, ON_NEW_TAB_ANIMATION, M_UPDATE_PIXEL_BACKGROUND, M_CACHE_UPDATE_TAB, OPEN_NEW_TAB, M_RESET_SUGGESTION, M_NEW_LINK_IN_NEW_TAB_LOAD, M_NEW_LINK_IN_NEW_TAB, M_NEW_LINK_ANIMATION, M_ADVERT_LOADED, M_CLOSE_TAB_BACK, M_INIT_TOR, M_GET_SSL_STATUS, M_INIT_TAB_COUNT_FORCED, PROGRESS_UPDATE, ON_INIT_ADS, M_PRELOAD_URL M_HOME_PAGE, M_INITIALIZE_TAB_LINK_OPEN, OPEN_NEW_TAB_INSTANT, ON_LOAD_TAB_ON_RESUME, ON_LOAD_ADVERT, ON_URL_LOAD, M_WELCOME_MESSAGE, M_SPLASH_DISABLE, M_GET_CURRENT_URL, M_ON_BANNER_UPDATE, ON_FULL_SCREEN_ADS, M_INITIALIZE_TAB_LINK, M_HOME_BUTTON_PRESSED, M_INITIALIZE_TAB_SINGLE, ON_UPDATE_THEME, M_UPDATE_THEME, OPEN_DOWNLOAD_FOLDER, ON_OPEN_TAB_VIEW, ON_NEW_TAB_ANIMATION, M_UPDATE_PIXEL_BACKGROUND, M_CACHE_UPDATE_TAB, OPEN_NEW_TAB, M_RESET_SUGGESTION, M_NEW_LINK_IN_NEW_TAB_LOAD, M_NEW_LINK_IN_NEW_TAB, M_NEW_LINK_ANIMATION, M_ADVERT_LOADED, M_CLOSE_TAB_BACK, M_INIT_TOR, M_GET_SSL_STATUS, M_INIT_TAB_COUNT_FORCED, M_FLUSH_DRAWABLE, PROGRESS_UPDATE, ON_INIT_ADS, M_PRELOAD_URL
} }
public enum eGeckoCallback { public enum eGeckoCallback {
ON_FETCH_FAVICON, M_RELOAD,open_new_tab, M_DEFAULT_BROWSER, M_RATE_COUNT, M_INDEX_WEBSITE, ON_DESTROY_MEDIA, ON_HANDLE_EXTERNAL_INTENT, SESSION_ID, ON_LOAD_REQUEST, M_NEW_IDENTITY_MESSAGED, ON_UPDATE_SUGGESTION, M_NEW_IDENTITY, M_ORBOT_LOADING, M_UPDATE_PIXEL_BACKGROUND, M_OPEN_SESSION, M_ON_MAIL, FINDER_RESULT_CALLBACK, M_UPDATE_SESSION_STATE, ON_UPDATE_TAB_TITLE, ON_PLAYSTORE_LOAD, ON_CLOSE_SESSION, ON_LONG_PRESS, ON_UPDATE_FAVICON, ON_FULL_SCREEN, DOWNLOAD_FILE_POPUP, SEARCH_UPDATE, ON_LOAD_ERROR, ON_PAGE_LOADED, ON_UPDATE_HISTORY, START_PROXY, ON_UPDATE_THEME, M_CLOSE_TAB, BACK_LIST_EMPTY, ON_URL_LOAD, ON_SESSION_REINIT, ON_INVOKE_PARSER, ON_FIRST_PAINT, ON_UPDATE_SEARCH_BAR, PROGRESS_UPDATE_FORCED, M_LOAD_HOMEPAGE_GENESIS, PROGRESS_UPDATE, M_ON_BANNER_UPDATE, ON_EXPAND_TOP_BAR, M_ON_SCROLL_NO_BOUNDARIES, M_ON_SCROLL_TOP_BOUNDARIES, M_ON_SCROLL_BOUNDARIES, M_CLOSE_TAB_BACK, M_CHANGE_HOME_THEME, ON_UPDATE_SUGGESTION_URL, ON_REQUEST_COMPLETED, GECKO_SCROLL_DOWN, GECKO_SCROLL_UP_MOVE, WAS_SCROLL_CHANGED, GECKO_SCROLL_DOWN_MOVE, GECKO_SCROLL_UP_ALWAYS ON_FETCH_FAVICON, M_RELOAD, OPEN_NEW_TAB, M_DEFAULT_BROWSER, M_RATE_COUNT, M_INDEX_WEBSITE, ON_DESTROY_MEDIA, ON_HANDLE_EXTERNAL_INTENT, SESSION_ID, ON_LOAD_REQUEST, M_NEW_IDENTITY_MESSAGED, ON_UPDATE_SUGGESTION, M_NEW_IDENTITY, M_ORBOT_LOADING, M_UPDATE_PIXEL_BACKGROUND, M_OPEN_SESSION, M_ON_MAIL, FINDER_RESULT_CALLBACK, M_UPDATE_SESSION_STATE, ON_UPDATE_TAB_TITLE, ON_PLAYSTORE_LOAD, ON_CLOSE_SESSION, ON_LONG_PRESS, ON_UPDATE_FAVICON, ON_FULL_SCREEN, DOWNLOAD_FILE_POPUP, SEARCH_UPDATE, ON_LOAD_ERROR, ON_PAGE_LOADED, ON_UPDATE_HISTORY, START_PROXY, ON_UPDATE_THEME, M_CLOSE_TAB, BACK_LIST_EMPTY, ON_URL_LOAD, ON_SESSION_REINIT, ON_INVOKE_PARSER, ON_FIRST_PAINT, ON_UPDATE_SEARCH_BAR, PROGRESS_UPDATE_FORCED, M_LOAD_HOMEPAGE_GENESIS, PROGRESS_UPDATE, M_ON_BANNER_UPDATE, ON_EXPAND_TOP_BAR, M_ON_SCROLL_NO_BOUNDARIES, M_ON_SCROLL_TOP_BOUNDARIES, M_ON_SCROLL_BOUNDARIES, M_CLOSE_TAB_BACK, M_CHANGE_HOME_THEME, ON_UPDATE_SUGGESTION_URL, ON_REQUEST_COMPLETED, GECKO_SCROLL_DOWN, GECKO_SCROLL_UP_MOVE, WAS_SCROLL_CHANGED, GECKO_SCROLL_DOWN_MOVE, GECKO_SCROLL_UP_ALWAYS
} }
public enum eHintCallback { public enum eHintCallback {

View File

@ -1,9 +1,11 @@
package com.hiddenservices.onionservices.appManager.homeManager.homeController; package com.hiddenservices.onionservices.appManager.homeManager.homeController;
import static com.hiddenservices.onionservices.constants.constants.CONST_PRIVACY_POLICY_URL_NON_TOR; import static com.hiddenservices.onionservices.constants.constants.CONST_PRIVACY_POLICY_URL_NON_TOR;
import static com.hiddenservices.onionservices.constants.constants.CONST_REPORT_URL;
import android.util.Patterns; import android.util.Patterns;
import com.hiddenservices.onionservices.constants.constants;
import com.hiddenservices.onionservices.constants.status; import com.hiddenservices.onionservices.constants.status;
import com.hiddenservices.onionservices.helperManager.helperMethod; import com.hiddenservices.onionservices.helperManager.helperMethod;
@ -16,6 +18,9 @@ public class homeModel {
} }
public String urlComplete(String pURL, String pSearchEngine) { public String urlComplete(String pURL, String pSearchEngine) {
if (!pURL.startsWith(CONST_REPORT_URL) && (pURL.startsWith("resource://android/assets/homepage/") || pURL.startsWith("http://167.86.99.31/?pG") || pURL.startsWith("https://167.86.99.31?pG") || pURL.endsWith("167.86.99.31") || pURL.endsWith(constants.CONST_GENESIS_DOMAIN_URL_SLASHED))) {
return pURL;
}
if (pURL.startsWith(CONST_PRIVACY_POLICY_URL_NON_TOR)) { if (pURL.startsWith(CONST_PRIVACY_POLICY_URL_NON_TOR)) {
return CONST_PRIVACY_POLICY_URL_NON_TOR; return CONST_PRIVACY_POLICY_URL_NON_TOR;
} }

View File

@ -29,6 +29,8 @@ import android.view.ViewGroup;
import android.view.Window; import android.view.Window;
import android.view.WindowManager; import android.view.WindowManager;
import android.view.animation.AccelerateInterpolator; import android.view.animation.AccelerateInterpolator;
import android.view.animation.Animation;
import android.view.animation.Transformation;
import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodManager;
import android.widget.*; import android.widget.*;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
@ -41,6 +43,8 @@ import androidx.core.graphics.ColorUtils;
import androidx.core.widget.NestedScrollView; import androidx.core.widget.NestedScrollView;
import androidx.fragment.app.FragmentContainerView; import androidx.fragment.app.FragmentContainerView;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.hiddenservices.onionservices.BuildConfig;
import com.hiddenservices.onionservices.appManager.activityContextManager; import com.hiddenservices.onionservices.appManager.activityContextManager;
import com.hiddenservices.onionservices.appManager.editTextManager; import com.hiddenservices.onionservices.appManager.editTextManager;
import com.hiddenservices.onionservices.constants.*; import com.hiddenservices.onionservices.constants.*;
@ -242,6 +246,8 @@ public class homeViewController {
mFindText.setLongClickable(false); mFindText.setLongClickable(false);
mFindText.setOnLongClickListener(v -> false); mFindText.setOnLongClickListener(v -> false);
String mText = "Copyright © by Orion Technologies | Build "+BuildConfig.VERSION_NAME.substring(20);
mCopyright.setText(mText);
} }
@ -275,6 +281,7 @@ public class homeViewController {
String mText = getLocaleStringResource(new Locale(sSettingLanguage), R.string.GENERAL_SEARCH_ENGINE, mContext); String mText = getLocaleStringResource(new Locale(sSettingLanguage), R.string.GENERAL_SEARCH_ENGINE, mContext);
((TextView)mSearchEngineBar.findViewById(R.id.pSearchEngineHintInvoke)).setText(mText); ((TextView)mSearchEngineBar.findViewById(R.id.pSearchEngineHintInvoke)).setText(mText);
int e=0;
} }
} }
@ -624,12 +631,34 @@ public class homeViewController {
mOrbotLogManager.setEnabled(true); mOrbotLogManager.setEnabled(true);
}, 700); }, 700);
mConnectButton.animate().setDuration(350).alpha(0.4f).withEndAction(() -> { if(status.sTorBrowsing){
mCopyright.setVisibility(View.GONE); mConnectButton.animate().setDuration(350).alpha(0.4f).withEndAction(() -> {
initSplashLoading(); mCopyright.setVisibility(View.GONE);
}); initSplashLoading();
mConnectNoTorButton.animate().setDuration(350).alpha(0f).withEndAction(() -> { });
});
ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) mConnectButton.getLayoutParams();
final int bottomMarginStart = params.bottomMargin;
final int bottomMarginEnd = 0;
Animation a = new Animation() {
@Override
protected void applyTransformation(float interpolatedTime, Transformation t) {
ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) mConnectButton.getLayoutParams();
params.bottomMargin = bottomMarginStart + (int) ((bottomMarginEnd - bottomMarginStart) * interpolatedTime);
mConnectButton.setLayoutParams(params);
}
};
a.setDuration(400);
mConnectButton.startAnimation(a);
mConnectNoTorButton.animate().setDuration(150).alpha(0f).withEndAction(() -> {});
}else {
mConnectButton.animate().setDuration(350).alpha(0f).withEndAction(() -> {
mCopyright.setVisibility(View.GONE);
initSplashLoading();
});
mConnectNoTorButton.animate().setDuration(350).alpha(0.4f).withEndAction(() -> {});
}
mGatewaySplash.animate().setDuration(350).alpha(0.4f); mGatewaySplash.animate().setDuration(350).alpha(0.4f);
mPanicButtonLandscape.animate().setInterpolator(new AccelerateInterpolator()).setDuration(170).translationXBy(helperMethod.pxFromDp(55)); mPanicButtonLandscape.animate().setInterpolator(new AccelerateInterpolator()).setDuration(170).translationXBy(helperMethod.pxFromDp(55));
mPanicButton.animate().setDuration(170).setInterpolator(new AccelerateInterpolator()).translationXBy(helperMethod.pxFromDp(55)); mPanicButton.animate().setDuration(170).setInterpolator(new AccelerateInterpolator()).translationXBy(helperMethod.pxFromDp(55));
@ -846,9 +875,11 @@ public class homeViewController {
@SuppressLint("InflateParams") @SuppressLint("InflateParams")
View popupView = null; View popupView = null;
boolean mIsBookmarked = false;
void onOpenMenu(View view, boolean canGoForward, boolean isLoading, int userAgent, String mURL, boolean pIsBookmarked) { void onOpenMenu(View view, boolean canGoForward, boolean isLoading, int userAgent, String mURL, boolean pIsBookmarked) {
mIsBookmarked = pIsBookmarked;
if (popupWindow != null) { if (popupWindow != null) {
popupWindow.dismiss(); popupWindow.dismiss();
} }
@ -964,14 +995,21 @@ public class homeViewController {
if (popupView != null) { if (popupView != null) {
ImageButton mRefresh = popupView.findViewById(R.id.menu21); ImageButton mRefresh = popupView.findViewById(R.id.menu21);
ImageButton close = popupView.findViewById(R.id.menu20); ImageButton close = popupView.findViewById(R.id.menu20);
ImageButton bookmark = popupView.findViewById(R.id.menu23);
close.setVisibility(View.GONE); close.setVisibility(View.GONE);
mRefresh.setVisibility(View.VISIBLE); mRefresh.setVisibility(View.VISIBLE);
mRefresh.animate().alpha(0.1f); mRefresh.setAlpha(0.1f);
close.animate().alpha(0); close.animate().alpha(0);
new Handler().postDelayed(() ->
{ if(!mIsBookmarked){
mRefresh.animate().setDuration(250).alpha(1f); bookmark.setImageDrawable(helperMethod.getDrawableXML(mContext, R.xml.ic_baseline_bookmark));
}, 300); bookmark.setColorFilter(ContextCompat.getColor(mContext, R.color.c_navigation_tint), android.graphics.PorterDuff.Mode.MULTIPLY);
bookmark.animate().alpha(1);
bookmark.setClickable(true);
}
mRefresh.animate().setDuration(250).alpha(1f);
} }
} }
@ -1419,7 +1457,7 @@ public class homeViewController {
return; return;
} }
if (mSearchbar.getText().toString().equals("orion.onion")) { if (mSearchbar.getText().toString().equals("orion.onion") && !mForced) {
return; return;
} }
@ -1460,7 +1498,9 @@ public class homeViewController {
new Handler().postDelayed(() -> new Handler().postDelayed(() ->
{ {
onResetTabAnimation(); if(e_type!=null && e_type.equals(homeEnums.eGeckoCallback.M_CLOSE_TAB_BACK)){
onResetTabAnimation();
}
}, pDelay); }, pDelay);
mGeckoView.setPivotX(0); mGeckoView.setPivotX(0);
@ -1480,7 +1520,7 @@ public class homeViewController {
final Handler handler = new Handler(); final Handler handler = new Handler();
handler.postDelayed(() -> { handler.postDelayed(() -> {
mEvent.invokeObserver(data, e_type); mEvent.invokeObserver(data, e_type);
}, 450); }, 300);
scaleDown.addListener(new Animator.AnimatorListener() { scaleDown.addListener(new Animator.AnimatorListener() {
@Override @Override
@ -1500,18 +1540,14 @@ public class homeViewController {
@Override @Override
public void onAnimationEnd(Animator animation) { public void onAnimationEnd(Animator animation) {
//scaleDown.removeAllListeners();
//mEvent.invokeObserver(data, e_type);
} }
@Override @Override
public void onAnimationCancel(Animator animation) { public void onAnimationCancel(Animator animation) {
Log.i("","");
} }
@Override @Override
public void onAnimationRepeat(Animator animation) { public void onAnimationRepeat(Animator animation) {
Log.i("","");
} }
}); });
}else { }else {
@ -1620,7 +1656,7 @@ public class homeViewController {
mDefaultColor = mContext.getWindow().getNavigationBarColor(); mDefaultColor = mContext.getWindow().getNavigationBarColor();
mContext.getWindow().setNavigationBarColor(Color.BLACK); mContext.getWindow().setNavigationBarColor(Color.BLACK);
mEvent.invokeObserver(Collections.singletonList(true), homeEnums.eHomeViewCallback.on_full_screen_ads); mEvent.invokeObserver(Collections.singletonList(true), homeEnums.eHomeViewCallback.ON_FULL_SCREEN_ADS);
new Handler().postDelayed(() -> new Handler().postDelayed(() ->
{ {
@ -1718,7 +1754,7 @@ public class homeViewController {
mProgressBar.setVisibility(View.VISIBLE); mProgressBar.setVisibility(View.VISIBLE);
mTopBar.setVisibility(View.VISIBLE); mTopBar.setVisibility(View.VISIBLE);
mEvent.invokeObserver(Collections.singletonList(!isLandscape), homeEnums.eHomeViewCallback.ON_INIT_ADS); mEvent.invokeObserver(Collections.singletonList(!isLandscape), homeEnums.eHomeViewCallback.ON_INIT_ADS);
mEvent.invokeObserver(Collections.singletonList(isLandscape), homeEnums.eHomeViewCallback.on_full_screen_ads); mEvent.invokeObserver(Collections.singletonList(isLandscape), homeEnums.eHomeViewCallback.ON_FULL_SCREEN_ADS);
status.sFullScreenBrowsing = (boolean) dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_FULL_SCREEN_BROWSIING, false)); status.sFullScreenBrowsing = (boolean) dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_FULL_SCREEN_BROWSIING, false));
@ -1814,9 +1850,9 @@ public class homeViewController {
if (mEvent.invokeObserver(null, homeEnums.eHomeViewCallback.M_HOME_PAGE) == null) { if (mEvent.invokeObserver(null, homeEnums.eHomeViewCallback.M_HOME_PAGE) == null) {
mEvent.invokeObserver(null, homeEnums.eHomeViewCallback.M_PRELOAD_URL); mEvent.invokeObserver(null, homeEnums.eHomeViewCallback.M_PRELOAD_URL);
if (status.sSettingRedirectStatus.equals(strings.GENERIC_EMPTY_STR)) { if (status.sSettingRedirectStatus.equals(strings.GENERIC_EMPTY_STR)) {
mEvent.invokeObserver(Collections.singletonList(helperMethod.getDomainName(status.sSettingDefaultSearchEngine)), homeEnums.eHomeViewCallback.on_url_load); mEvent.invokeObserver(Collections.singletonList(helperMethod.getDomainName(status.sSettingDefaultSearchEngine)), homeEnums.eHomeViewCallback.ON_URL_LOAD);
} else { } else {
mEvent.invokeObserver(Collections.singletonList(helperMethod.getDomainName(status.sSettingRedirectStatus)), homeEnums.eHomeViewCallback.on_url_load); mEvent.invokeObserver(Collections.singletonList(helperMethod.getDomainName(status.sSettingRedirectStatus)), homeEnums.eHomeViewCallback.ON_URL_LOAD);
} }
} }
if (!status.sExternalWebsite.equals(strings.GENERIC_EMPTY_STR)) { if (!status.sExternalWebsite.equals(strings.GENERIC_EMPTY_STR)) {

View File

@ -138,7 +138,6 @@ public class languageController extends AppCompatActivity {
String mSystemLangugage = mSystemLocale.toString(); String mSystemLangugage = mSystemLocale.toString();
status.sSettingLanguage = CONST_LANGUAGE_DEFAULT_LANG; status.sSettingLanguage = CONST_LANGUAGE_DEFAULT_LANG;
status.sSettingLanguageRegion = CONST_LANGUAGE_DEFAULT_LANG; status.sSettingLanguageRegion = CONST_LANGUAGE_DEFAULT_LANG;
Log.i("MFUCKER", mSystemLangugage);
if (!mSystemLangugage.equals("en_GB") && !mSystemLangugage.equals("cs_CZ") && !mSystemLangugage.equals("en_US") && !mSystemLangugage.equals("ur_PK") && !mSystemLangugage.equals("de_DE") && !mSystemLangugage.equals("ca_ES") && !mSystemLangugage.equals("zh_CN") && !mSystemLangugage.equals("ch_CZ") && !mSystemLangugage.equals("nl_NL") && !mSystemLangugage.equals("fr_FR") && !mSystemLangugage.equals("el_GR") && !mSystemLangugage.equals("hu_HU") && !mSystemLangugage.equals("in_ID") && !mSystemLangugage.equals("it_IT") && !mSystemLangugage.equals("ja_JP") && !mSystemLangugage.equals("ko_KR") && !mSystemLangugage.equals("pt_PT") && !mSystemLangugage.equals("ro_RO") && !mSystemLangugage.equals("ru_RU") && !mSystemLangugage.equals("th_TH") && !mSystemLangugage.equals("tr_TR") && !mSystemLangugage.equals("uk_UA") && !mSystemLangugage.equals("vi_VN")) { if (!mSystemLangugage.equals("en_GB") && !mSystemLangugage.equals("cs_CZ") && !mSystemLangugage.equals("en_US") && !mSystemLangugage.equals("ur_PK") && !mSystemLangugage.equals("de_DE") && !mSystemLangugage.equals("ca_ES") && !mSystemLangugage.equals("zh_CN") && !mSystemLangugage.equals("ch_CZ") && !mSystemLangugage.equals("nl_NL") && !mSystemLangugage.equals("fr_FR") && !mSystemLangugage.equals("el_GR") && !mSystemLangugage.equals("hu_HU") && !mSystemLangugage.equals("in_ID") && !mSystemLangugage.equals("it_IT") && !mSystemLangugage.equals("ja_JP") && !mSystemLangugage.equals("ko_KR") && !mSystemLangugage.equals("pt_PT") && !mSystemLangugage.equals("ro_RO") && !mSystemLangugage.equals("ru_RU") && !mSystemLangugage.equals("th_TH") && !mSystemLangugage.equals("tr_TR") && !mSystemLangugage.equals("uk_UA") && !mSystemLangugage.equals("vi_VN")) {
mDefaultLanguageNotSupported = true; mDefaultLanguageNotSupported = true;
} }

View File

@ -30,7 +30,7 @@ class languageModel {
mSupportedLanaguage.add(new languageDataModel("韓国語", "Korean", "ko", "Kr")); mSupportedLanaguage.add(new languageDataModel("韓国語", "Korean", "ko", "Kr"));
mSupportedLanaguage.add(new languageDataModel("Português", "Portuguese (Portugal)", "pt", "Pt")); mSupportedLanaguage.add(new languageDataModel("Português", "Portuguese (Portugal)", "pt", "Pt"));
mSupportedLanaguage.add(new languageDataModel("Română", "Romanian", "ro", "Ro")); mSupportedLanaguage.add(new languageDataModel("Română", "Romanian", "ro", "Ro"));
// mSupportedLanaguage.add(new languageDataModel("Urdu (اردو)", "Urdu", "ur", "Ur")); //mSupportedLanaguage.add(new languageDataModel("Urdu (اردو)", "Urdu", "ur", "Ur"));
mSupportedLanaguage.add(new languageDataModel("русский", "Russian", "ru", "Ru")); mSupportedLanaguage.add(new languageDataModel("русский", "Russian", "ru", "Ru"));
mSupportedLanaguage.add(new languageDataModel("ไทย", "Thai", "th", "Th")); mSupportedLanaguage.add(new languageDataModel("ไทย", "Thai", "th", "Th"));
mSupportedLanaguage.add(new languageDataModel("Türk", "Turkish", "tr", "Tr")); mSupportedLanaguage.add(new languageDataModel("Türk", "Turkish", "tr", "Tr"));

View File

@ -216,7 +216,7 @@ public class settingGeneralController extends AppCompatActivity {
} }
public void onSelectTheme(View view) { public void onSelectTheme(View view) {
if(status.sLowMemory != enums.MemoryStatus.CRITICAL_MEMORY){ if(status.sLowMemory == enums.MemoryStatus.CRITICAL_MEMORY){
pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(this), M_LOW_MEMORY); pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(this), M_LOW_MEMORY);
return; return;
} }

View File

@ -91,12 +91,13 @@ public class settingNotificationController extends AppCompatActivity {
activityContextManager.getInstance().setCurrentActivity(this); activityContextManager.getInstance().setCurrentActivity(this);
super.onResume(); super.onResume();
int notificationStatus = status.sBridgeNotificationManual; int notificationStatus = status.sNotificaionStatus;
if (notificationStatus == 0) { if (notificationStatus == 0) {
pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_DISABLE_NOTIFICATION); pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_DISABLE_NOTIFICATION);
activityContextManager.getInstance().getHomeController().onShowDefaultNotification(); activityContextManager.getInstance().getHomeController().onHideDefaultNotification();
} else { } else {
pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_ENABLE_NOTIFICATION); pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_ENABLE_NOTIFICATION);
activityContextManager.getInstance().getHomeController().onShowDefaultNotification();
} }
} }
@ -133,6 +134,6 @@ public class settingNotificationController extends AppCompatActivity {
public void onSaveLocalNotificationSettings(View view) { public void onSaveLocalNotificationSettings(View view) {
mSettingNotificationModel.onTrigger(settingNotificationEnums.eNotificationModel.M_UPDATE_LOCAL_NOTIFICATION, Collections.singletonList(!mNotificationManual.isChecked())); mSettingNotificationModel.onTrigger(settingNotificationEnums.eNotificationModel.M_UPDATE_LOCAL_NOTIFICATION, Collections.singletonList(!mNotificationManual.isChecked()));
mNotificationManual.toggle(); mNotificationManual.toggle();
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_INT, Arrays.asList(keys.SETTING_NOTIFICATION_STATUS, status.sBridgeNotificationManual)); dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_INT, Arrays.asList(keys.SETTING_NOTIFICATION_STATUS, status.sNotificaionStatus));
} }
} }

View File

@ -25,15 +25,16 @@ class settingNotificationModel {
private void updateLocalNotification(boolean pStatus) { private void updateLocalNotification(boolean pStatus) {
int mStatus = pStatus ? 1 : 0; int mStatus = pStatus ? 1 : 0;
status.sBridgeNotificationManual = mStatus; status.sNotificaionStatus = mStatus;
if (!pStatus) { if (!pStatus) {
activityContextManager.getInstance().getHomeController().onShowDefaultNotification(); activityContextManager.getInstance().getHomeController().onHideDefaultNotification();
pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_DISABLE_NOTIFICATION); pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_DISABLE_NOTIFICATION);
} else { } else {
if(status.sTorBrowsing){ if(status.sTorBrowsing){
activityContextManager.getInstance().getHomeController().onHideDefaultNotification(); pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_ENABLE_NOTIFICATION);
}else {
activityContextManager.getInstance().getHomeController().onShowDefaultNotification();
} }
pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_ENABLE_NOTIFICATION);
} }
} }

View File

@ -34,7 +34,7 @@ class settingNotificationViewController {
} }
private void initViews() { private void initViews() {
if (status.sBridgeNotificationManual == 1) { if (status.sNotificaionStatus == 1) {
mNotificationManual.setChecked(true); mNotificationManual.setChecked(true);
} else { } else {
mNotificationManual.setChecked(false); mNotificationManual.setChecked(false);

View File

@ -75,12 +75,13 @@ public class status {
public static boolean sVPNStatus = false; public static boolean sVPNStatus = false;
public static boolean sBridgeStatus = false; public static boolean sBridgeStatus = false;
public static boolean sAppInstalled = false; public static boolean sAppInstalled = false;
public static boolean sDefaultLanguageSet = false;
public static int sTheme = enums.Theme.THEME_DEFAULT; public static int sTheme = enums.Theme.THEME_DEFAULT;
public static int sSettingCookieStatus = ContentBlocking.AntiTracking.DEFAULT; public static int sSettingCookieStatus = ContentBlocking.AntiTracking.DEFAULT;
public static int sShowImages = -1; public static int sShowImages = -1;
public static int sWidgetResponse = enums.WidgetResponse.NONE; public static int sWidgetResponse = enums.WidgetResponse.NONE;
public static int sBridgeNotificationManual = 0; public static int sNotificaionStatus = 0;
public static int sSettingTrackingProtection = 0; public static int sSettingTrackingProtection = 0;
public static int sGlobalURLCount = 0; public static int sGlobalURLCount = 0;
@ -127,7 +128,7 @@ public class status {
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));
status.sBridgeCustomType = (String) dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_STRING, Arrays.asList(keys.BRIDGE_CUSTOM_TYPE, strings.GENERIC_EMPTY_SPACE)); status.sBridgeCustomType = (String) dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_STRING, Arrays.asList(keys.BRIDGE_CUSTOM_TYPE, strings.GENERIC_EMPTY_SPACE));
status.sBridgesDefault = (String) dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_STRING, Arrays.asList(keys.BRIDGE_DEFAULT, strings.BRIDGES_DEFAULT)); status.sBridgesDefault = (String) dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_STRING, Arrays.asList(keys.BRIDGE_DEFAULT, strings.BRIDGES_DEFAULT));
status.sBridgeNotificationManual = (int) dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_INT, Arrays.asList(keys.SETTING_NOTIFICATION_STATUS, 1)); status.sNotificaionStatus = (int) dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_INT, Arrays.asList(keys.SETTING_NOTIFICATION_STATUS, 1));
status.sRestoreTabs = (boolean) dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_RESTORE_TAB, false)); status.sRestoreTabs = (boolean) dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_RESTORE_TAB, false));
status.sCharacterEncoding = (boolean) dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_CHARACTER_ENCODING, false)); status.sCharacterEncoding = (boolean) dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_BOOL, Arrays.asList(keys.SETTING_CHARACTER_ENCODING, false));
status.sShowImages = (int) dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_INT, Arrays.asList(keys.SETTING_SHOW_IMAGES, 0)); status.sShowImages = (int) dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_GET_INT, Arrays.asList(keys.SETTING_SHOW_IMAGES, 0));

View File

@ -67,7 +67,7 @@ public class langManager {
} else if (mSystemLangugage.equals("vi_VN") || mSystemLangugage.equals("cs_CZ")) { } else if (mSystemLangugage.equals("vi_VN") || mSystemLangugage.equals("cs_CZ")) {
mLanguage = new Locale("ch", "Cz"); mLanguage = new Locale("ch", "Cz");
} else { } else {
mLanguage = new Locale(mSystemLocale.getLanguage(), mSystemLocale.getCountry()); mLanguage = new Locale(mSystemLocale.getCountry(), mSystemLocale.getCountry());
} }
} else { } else {
mLanguage = new Locale("en", "Us"); mLanguage = new Locale("en", "Us");

View File

@ -319,7 +319,7 @@
android:id="@+id/pInfoPortrait" android:id="@+id/pInfoPortrait"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:visibility="visible" android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"> app:layout_constraintStart_toStartOf="parent">
@ -581,7 +581,7 @@
android:id="@+id/pInfoLandscape" android:id="@+id/pInfoLandscape"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:visibility="gone" android:visibility="visible"
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">
@ -592,6 +592,7 @@
android:layout_height="40dp" android:layout_height="40dp"
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:layoutDirection="ltr"
android:alpha="0.95" android:alpha="0.95"
android:background="@xml/hox_rounded_corner_splash_right" android:background="@xml/hox_rounded_corner_splash_right"
android:contentDescription="@string/GENERAL_TODO" android:contentDescription="@string/GENERAL_TODO"
@ -608,6 +609,7 @@
android:layout_height="40dp" android:layout_height="40dp"
android:layout_marginTop="80dp" android:layout_marginTop="80dp"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:layoutDirection="ltr"
android:alpha="0.95" android:alpha="0.95"
android:background="@xml/hox_rounded_corner_splash_right" android:background="@xml/hox_rounded_corner_splash_right"
android:contentDescription="@string/GENERAL_TODO" android:contentDescription="@string/GENERAL_TODO"
@ -624,6 +626,7 @@
android:layout_width="90dp" android:layout_width="90dp"
android:layout_height="90dp" android:layout_height="90dp"
android:layout_marginStart="7dp" android:layout_marginStart="7dp"
android:layoutDirection="ltr"
android:layout_marginTop="15dp" android:layout_marginTop="15dp"
android:contentDescription="@string/GENERAL_TODO" android:contentDescription="@string/GENERAL_TODO"
android:rotationY="@integer/angle_rtl_180" android:rotationY="@integer/angle_rtl_180"
@ -642,6 +645,7 @@
android:gravity="start" android:gravity="start"
android:maxHeight="20dp" android:maxHeight="20dp"
android:paddingStart="5dp" android:paddingStart="5dp"
android:layoutDirection="ltr"
android:paddingEnd="15dp" android:paddingEnd="15dp"
android:text="@string/HOME_DESCRIPTION_TEXT_7" android:text="@string/HOME_DESCRIPTION_TEXT_7"
android:textAlignment="textStart" android:textAlignment="textStart"
@ -664,6 +668,7 @@
android:ellipsize="end" android:ellipsize="end"
android:gravity="start" android:gravity="start"
android:maxHeight="20dp" android:maxHeight="20dp"
android:layoutDirection="ltr"
android:paddingStart="5dp" android:paddingStart="5dp"
android:paddingEnd="15dp" android:paddingEnd="15dp"
android:text="@string/HOME_DESCRIPTION_TEXT_8" android:text="@string/HOME_DESCRIPTION_TEXT_8"
@ -686,6 +691,7 @@
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:ellipsize="end" android:ellipsize="end"
android:gravity="start" android:gravity="start"
android:layoutDirection="ltr"
android:maxHeight="20dp" android:maxHeight="20dp"
android:paddingStart="5dp" android:paddingStart="5dp"
android:paddingEnd="15dp" android:paddingEnd="15dp"
@ -703,28 +709,28 @@
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<Button <Button
android:id="@+id/ConnectNoTor" android:id="@+id/ConnectTor"
android:textSize="13sp" android:textSize="13sp"
android:layout_width="190dp" android:layout_width="170dp"
android:layout_height="51dp" android:layout_height="51dp"
android:paddingStart="10dp" android:paddingStart="10dp"
android:paddingEnd="10dp" android:paddingEnd="10dp"
android:layout_marginStart="23dp" android:layout_marginStart="23dp"
android:layout_marginBottom="8dp" android:layout_marginBottom="58dp"
android:textAlignment="textStart" android:textAlignment="textStart"
android:layoutDirection="ltr" android:layoutDirection="ltr"
android:drawableStart="@drawable/ic_no_tor" android:drawableStart="@drawable/ic_tor"
android:background="@xml/hox_rounded_corner_splash_no_ripple" android:background="@xml/hox_rounded_corner_splash_no_ripple"
android:onClick="onStartApplicationNoTor" android:onClick="onStartApplication"
android:text="@string/HOME_CONNECT_NO_TOR" android:text="@string/HOME_CONNECT_TOR"
app:layout_constraintBottom_toTopOf="@+id/ConnectTor" app:layout_constraintBottom_toBottomOf="@+id/ConnectNoTor"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
tools:ignore="RtlSymmetry" /> tools:ignore="RtlSymmetry" />
<Button <Button
android:id="@+id/ConnectTor" android:id="@+id/ConnectNoTor"
android:textSize="13sp" android:textSize="13sp"
android:layout_width="190dp" android:layout_width="170dp"
android:layout_height="51dp" android:layout_height="51dp"
android:paddingStart="10dp" android:paddingStart="10dp"
android:layoutDirection="ltr" android:layoutDirection="ltr"
@ -733,9 +739,9 @@
android:textAlignment="textStart" android:textAlignment="textStart"
android:paddingEnd="10dp" android:paddingEnd="10dp"
android:background="@xml/hox_rounded_corner_splash_no_ripple" android:background="@xml/hox_rounded_corner_splash_no_ripple"
android:drawableStart="@drawable/ic_tor" android:drawableStart="@drawable/ic_no_tor"
android:onClick="onStartApplication" android:onClick="onStartApplicationNoTor"
android:text="@string/HOME_CONNECT_TOR" android:text="@string/HOME_CONNECT_NO_TOR"
app:layout_constraintBottom_toTopOf="@+id/pCopyright" app:layout_constraintBottom_toTopOf="@+id/pCopyright"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
tools:ignore="RtlSymmetry" /> tools:ignore="RtlSymmetry" />

View File

@ -33,8 +33,8 @@
<string name="HOME_DESCRIPTION_TEXT_7">Secured by Tor Network</string> <string name="HOME_DESCRIPTION_TEXT_7">Secured by Tor Network</string>
<string name="HOME_DESCRIPTION_TEXT_8">Builtin Onion Search Engine</string> <string name="HOME_DESCRIPTION_TEXT_8">Builtin Onion Search Engine</string>
<string name="HOME_DESCRIPTION_TEXT_9">No Record and Digital Fingerprinting</string> <string name="HOME_DESCRIPTION_TEXT_9">No Record and Digital Fingerprinting</string>
<string name="HOME_CONNECT_NO_TOR">Normal Browsing</string> <string name="HOME_CONNECT_NO_TOR">Fast &amp; Secure</string>
<string name="HOME_CONNECT_TOR">Tor Browsing</string> <string name="HOME_CONNECT_TOR">Dark Web - VPN</string>
<!-- Default Notification --> <!-- Default Notification -->
<string name="DEFAULT_NOTIFICATION_RESET" translatable="false">EXIT AND RESET</string> <string name="DEFAULT_NOTIFICATION_RESET" translatable="false">EXIT AND RESET</string>