From a5c0306636ee096ecae321bdf15f3915514a588d Mon Sep 17 00:00:00 2001 From: Abdul Mannan Saeed <111820160@umt.edu.pk> Date: Sat, 4 Feb 2023 14:46:32 +0500 Subject: [PATCH] Bug fixes Bug fixes --- .safedk/hashes.safedk | 4 +- .safedk/plugin.properties | 2 +- .../results.bin | 1 + .../jetified-OrbotLib-runtime/classes.dex | Bin 0 -> 11896 bytes app/build.gradle | 4 +- app/src/main/AndroidManifest.xml | 2 +- .../geckoManager/geckoClients.java | 18 +- .../geckoManager/geckoPromptView.java | 4 +- .../geckoManager/geckoSession.java | 114 +++++++----- .../homeController/homeController.java | 50 +++-- .../homeController/homeViewController.java | 30 ++- .../settingSearchController.java | 3 + .../settingHomeController.java | 4 + .../dataManager/historyDataModel.java | 13 +- .../helperManager/helperMethod.java | 47 +++-- .../adPluginManager/appLovinManager.java | 173 +++--------------- .../applovinBannerManager.java | 112 ++++++++++++ .../applovinSupportManager.java | 79 ++++++++ .../orbotPluginManager/orbotLogManager.java | 3 - .../pluginManager/pluginController.java | 17 +- .../pluginManager/pluginEnums.java | 5 +- .../defaultNotificationReciever.java | 1 - .../images/xml/ic_baseline_support.xml | 7 + .../res/layouts/home/layout/home_view.xml | 34 ++++ .../layouts/home/layout/popup_side_menu.xml | 47 ++++- .../res/layouts/setting/layout/setting.xml | 119 +++++++++++- .../results.bin | 1 + .../jetified-tor-android-runtime/classes.dex | Bin 0 -> 15584 bytes 28 files changed, 621 insertions(+), 273 deletions(-) create mode 100644 OrbotLib/build/.transforms/1db88afc1664186024331f5c1b7f6d1e/results.bin create mode 100644 OrbotLib/build/.transforms/1db88afc1664186024331f5c1b7f6d1e/transformed/jetified-OrbotLib-runtime/classes.dex create mode 100644 app/src/main/java/com/hiddenservices/onionservices/pluginManager/adPluginManager/applovinBannerManager.java create mode 100644 app/src/main/java/com/hiddenservices/onionservices/pluginManager/adPluginManager/applovinSupportManager.java create mode 100644 app/src/main/res/custom-xml/images/xml/ic_baseline_support.xml create mode 100644 tor-android/build/.transforms/4ede3141055d002454e79cf5c054cbb1/results.bin create mode 100644 tor-android/build/.transforms/4ede3141055d002454e79cf5c054cbb1/transformed/jetified-tor-android-runtime/classes.dex diff --git a/.safedk/hashes.safedk b/.safedk/hashes.safedk index 93704cc4..b5af034b 100644 --- a/.safedk/hashes.safedk +++ b/.safedk/hashes.safedk @@ -1,3 +1,3 @@ -#Sat Jan 28 15:55:26 PKT 2023 +#Sat Feb 04 14:33:30 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= -json=-1628746731 +json=2027486056 diff --git a/.safedk/plugin.properties b/.safedk/plugin.properties index d9aefdaf..e48dbea2 100644 --- a/.safedk/plugin.properties +++ b/.safedk/plugin.properties @@ -1,5 +1,5 @@ # -#Sat Jan 28 16:12:03 PKT 2023 +#Sat Feb 04 14:33:30 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= sdk_analysis_plugin_version=4.8.3 set_multidex=true diff --git a/OrbotLib/build/.transforms/1db88afc1664186024331f5c1b7f6d1e/results.bin b/OrbotLib/build/.transforms/1db88afc1664186024331f5c1b7f6d1e/results.bin new file mode 100644 index 00000000..2de4c85c --- /dev/null +++ b/OrbotLib/build/.transforms/1db88afc1664186024331f5c1b7f6d1e/results.bin @@ -0,0 +1 @@ +o/jetified-OrbotLib-runtime diff --git a/OrbotLib/build/.transforms/1db88afc1664186024331f5c1b7f6d1e/transformed/jetified-OrbotLib-runtime/classes.dex b/OrbotLib/build/.transforms/1db88afc1664186024331f5c1b7f6d1e/transformed/jetified-OrbotLib-runtime/classes.dex new file mode 100644 index 0000000000000000000000000000000000000000..74cc7b416b79ac619e771e0dd07988076b7a39b3 GIT binary patch literal 11896 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 + android:windowSoftInputMode="adjustNothing"> diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/geckoClients.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/geckoClients.java index 34d45901..c00cc1a7 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/geckoClients.java +++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/geckoClients.java @@ -523,9 +523,7 @@ public class geckoClients { public void onRedrawPixel(AppCompatActivity pcontext) { if(status.sLowMemory != enums.MemoryStatus.CRITICAL_MEMORY){ mSession.onRedrawPixel(); - Log.i("FUCKSSS1111","333"); onLoadFavIcon(pcontext); - Log.i("FUCKSSS1111","444"); } } @@ -535,12 +533,14 @@ public class geckoClients { public void onClearAll() { if (mRuntime != null) { - mRuntime.getStorageController().clearData(NETWORK_CACHE); - mRuntime.getStorageController().clearData(IMAGE_CACHE); - mRuntime.getStorageController().clearData(DOM_STORAGES); - mRuntime.getStorageController().clearData(COOKIES); - mRuntime.getStorageController().clearData(SITE_SETTINGS); - mRuntime.getStorageController().clearData(SITE_DATA); + if(status.sClearOnExit){ + mRuntime.getStorageController().clearData(NETWORK_CACHE); + mRuntime.getStorageController().clearData(IMAGE_CACHE); + mRuntime.getStorageController().clearData(DOM_STORAGES); + mRuntime.getStorageController().clearData(COOKIES); + mRuntime.getStorageController().clearData(SITE_SETTINGS); + mRuntime.getStorageController().clearData(SITE_DATA); + } } } @@ -697,7 +697,7 @@ public class geckoClients { public void onUpdateFont() { float font = (status.sSettingFontSize - 100) / 3 + 100; - mRuntime.getSettings().setFontSizeFactor(font / 100); + mRuntime.getSettings().setFontSizeFactor(font / 117); } public void reinitHomeTheme() { diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/geckoPromptView.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/geckoPromptView.java index 1b210ca2..d743724a 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/geckoPromptView.java +++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/geckoPromptView.java @@ -210,7 +210,7 @@ final class geckoPromptView implements GeckoSession.PromptDelegate { builder.setNegativeButton("Cancel", listener); try { - if(!((Activity) builder.getContext()).isFinishing()) + if(mActivity!=null && !mActivity.isFinishing()) { createStandardDialog(builder, prompt, res).show(); } @@ -596,7 +596,7 @@ final class geckoPromptView implements GeckoSession.PromptDelegate { throw new UnsupportedOperationException(); } try { - if(!((Activity) builder.getContext()).isFinishing()) + if(mActivity!=null && !mActivity.isFinishing()) { dialog.show(); } diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/geckoSession.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/geckoSession.java index 02737555..3bada960 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/geckoSession.java +++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/geckoSession.java @@ -21,15 +21,12 @@ import android.os.Handler; import android.util.Base64; import android.util.Log; import android.view.autofill.AutofillManager; -import android.view.autofill.AutofillValue; - import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.UiThread; import androidx.appcompat.app.AppCompatActivity; import androidx.core.app.NotificationCompat; import androidx.core.content.FileProvider; - import com.hiddenservices.onionservices.constants.constants; import com.hiddenservices.onionservices.constants.enums; import com.hiddenservices.onionservices.constants.status; @@ -41,37 +38,30 @@ import com.hiddenservices.onionservices.libs.trueTime.trueTimeEncryption; import com.hiddenservices.onionservices.pluginManager.pluginController; import com.hiddenservices.onionservices.pluginManager.pluginEnums; import com.example.myapplication.R; - import org.json.JSONException; import org.json.JSONObject; import org.mozilla.gecko.EventDispatcher; import org.mozilla.gecko.util.GeckoBundle; -import org.mozilla.gecko.util.ThreadUtils; import org.mozilla.geckoview.AllowOrDeny; import org.mozilla.geckoview.Autofill; import org.mozilla.geckoview.GeckoResult; import org.mozilla.geckoview.GeckoSession; import org.mozilla.geckoview.GeckoView; -import org.mozilla.geckoview.Image; import org.mozilla.geckoview.MediaSession; import org.mozilla.geckoview.SlowScriptResponse; import org.mozilla.geckoview.WebExtension; import org.mozilla.geckoview.WebRequestError; import org.mozilla.geckoview.WebResponse; import org.torproject.android.service.wrapper.orbotLocalConstants; - import java.io.File; import java.io.FileOutputStream; import java.io.InputStream; import java.io.OutputStream; import java.lang.ref.WeakReference; -import java.text.SimpleDateFormat; import java.util.Arrays; import java.util.Collections; -import java.util.Date; import java.util.List; import java.util.Objects; - import static com.hiddenservices.onionservices.constants.constants.CONST_GENESIS_BADCERT_CACHED; import static com.hiddenservices.onionservices.constants.constants.CONST_GENESIS_BADCERT_CACHED_DARK; import static com.hiddenservices.onionservices.constants.constants.CONST_GENESIS_ERROR_CACHED; @@ -84,12 +74,10 @@ import static com.hiddenservices.onionservices.constants.enums.etype.M_DEFAULT_B import static com.hiddenservices.onionservices.constants.enums.etype.M_RATE_COUNT; import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eMessageManager.M_LONG_PRESS_URL; import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eMessageManager.M_LONG_PRESS_WITH_LINK; -import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eMessageManagerCallbacks.M_RATE_APPLICATION; import static org.mozilla.geckoview.GeckoSessionSettings.USER_AGENT_MODE_DESKTOP; import static org.mozilla.geckoview.GeckoSessionSettings.USER_AGENT_MODE_MOBILE; -public class -geckoSession extends GeckoSession implements MediaSession.Delegate, GeckoSession.MediaDelegate, GeckoSession.ScrollDelegate, GeckoSession.PermissionDelegate, GeckoSession.ProgressDelegate, GeckoSession.HistoryDelegate, GeckoSession.NavigationDelegate, GeckoSession.ContentDelegate { +public class geckoSession extends GeckoSession implements MediaSession.Delegate, GeckoSession.MediaDelegate, GeckoSession.ScrollDelegate, GeckoSession.PermissionDelegate, GeckoSession.ProgressDelegate, GeckoSession.HistoryDelegate, GeckoSession.NavigationDelegate, GeckoSession.ContentDelegate { private eventObserver.eventListener event; private boolean wasBackPressed = false; @@ -118,7 +106,6 @@ geckoSession extends GeckoSession implements MediaSession.Delegate, GeckoSession /*Temp Variables*/ private GeckoSession.HistoryDelegate.HistoryList mHistoryList = null; - private int rateCount = 0; private int m_current_url_id = -1; private GeckoView mGeckoView; private boolean mIsLoaded = false; @@ -177,6 +164,7 @@ geckoSession extends GeckoSession implements MediaSession.Delegate, GeckoSession @Override public void onMetadata(@NonNull GeckoSession session, @NonNull MediaSession mediaSession, @NonNull MediaSession.Metadata meta) { mMediaTitle = meta.title; + isPageLoading = false; if(mediaDelegateItem == null){ return; @@ -454,6 +442,28 @@ geckoSession extends GeckoSession implements MediaSession.Delegate, GeckoSession this.securityInfo = securityInfo; } + + + + + + + + + + + + + + + + + + + + + + @Override public void onPageStart(@NonNull GeckoSession var1, @NonNull String var2) { mCloseRequested = false; @@ -469,7 +479,7 @@ geckoSession extends GeckoSession implements MediaSession.Delegate, GeckoSession } if (!mCurrentURL.equals("about:config") && !mCurrentURL.equals("about:blank")) { - event.invokeObserver(Arrays.asList(mCurrentURL, mSessionID, mCurrentTitle, m_current_url_id, mTheme, this), enums.etype.ON_UPDATE_SEARCH_BAR); + //event.invokeObserver(Arrays.asList(mCurrentURL, mSessionID, mCurrentTitle, m_current_url_id, mTheme, this), enums.etype.ON_UPDATE_SEARCH_BAR); mContext.get().runOnUiThread(() -> event.invokeObserver(Arrays.asList(5, mSessionID), enums.etype.progress_update)); } if (!isPageLoading) { @@ -594,33 +604,43 @@ geckoSession extends GeckoSession implements MediaSession.Delegate, GeckoSession /*History Delegate*/ @Override public GeckoResult onVisited(@NonNull GeckoSession var1, @NonNull String var2, @Nullable String var3, int var4) { - if (var4 == 3 || var4 == 5 || var4 == 1) { - if(var4==1){ - m_current_url_id = -1; - setURL(var2); - } - event.invokeObserver(Arrays.asList(var2, mSessionID), enums.etype.on_url_load); - Object mID = event.invokeObserver(Arrays.asList(var2, mSessionID, mCurrentTitle, m_current_url_id, mTheme, this), enums.etype.on_update_history); - if (mID != null) { - m_current_url_id = (int) mID; - } - isPageLoading = false; - } + return null; } + int mHistoryListSize = 0; @UiThread public void onHistoryStateChange(@NonNull GeckoSession var1, @NonNull GeckoSession.HistoryDelegate.HistoryList var2) { mHistoryList = var2; + + + if(mHistoryList!=null){ + setURL(mHistoryList.get(mHistoryList.getCurrentIndex()).getUri()); + event.invokeObserver(Arrays.asList(mHistoryList, mSessionID), enums.etype.on_url_load); + if(mHistoryListSize == var2.size()){ + event.invokeObserver(Arrays.asList(mCurrentURL, mSessionID, mHistoryList.get(mHistoryList.getCurrentIndex()).getTitle(), m_current_url_id, mTheme, this), enums.etype.ON_UPDATE_SEARCH_BAR); + Object mID = event.invokeObserver(Arrays.asList(mCurrentURL, mSessionID, mHistoryList.get(mHistoryList.getCurrentIndex()).getTitle(), m_current_url_id, mTheme, this, wasBackPressed), enums.etype.on_update_history); + if (mID != null) { + m_current_url_id = (int) mID; + } + }else { + event.invokeObserver(Arrays.asList(mCurrentURL, mSessionID, mHistoryList.get(mHistoryList.getCurrentIndex()).getTitle(), m_current_url_id, mTheme, this), enums.etype.ON_UPDATE_SEARCH_BAR); + Object mID = event.invokeObserver(Arrays.asList(mCurrentURL, mSessionID, mHistoryList.get(mHistoryList.getCurrentIndex()).getTitle(), -1, mTheme, this, wasBackPressed), enums.etype.on_update_history); + if (mID != null) { + m_current_url_id = (int) mID; + } + } + mHistoryListSize = var2.size(); + onDestroyMedia(); + } } @UiThread public void onSessionStateChange(@NonNull GeckoSession session, @NonNull SessionState sessionState) { - try { - event.invokeObserver(Arrays.asList(mCurrentURL, mSessionID, mCurrentTitle, m_current_url_id, mTheme, sessionState.toString()), enums.etype.M_UPDATE_SESSION_STATE); - mSessionState = sessionState; - } catch (Exception ignored) { - } + mSessionState = sessionState; + event.invokeObserver(Arrays.asList(mCurrentURL, mSessionID, mCurrentTitle, m_current_url_id, mTheme, sessionState.toString()), enums.etype.M_UPDATE_SESSION_STATE); + + } public boolean onRestoreState() { @@ -658,14 +678,15 @@ geckoSession extends GeckoSession implements MediaSession.Delegate, GeckoSession } } } + wasBackPressed = false; String newUrl = Objects.requireNonNull(var2).split("#")[0]; if (!mCurrentTitle.equals("loading")) { - Object mURL = event.invokeObserver(Arrays.asList(mCurrentURL, mSessionID, mCurrentTitle, m_current_url_id, mTheme, this), enums.etype.on_update_history); - if (mURL != null) { - m_current_url_id = (int) mURL; - } + //Object mURL = event.invokeObserver(Arrays.asList(mCurrentURL, mSessionID, mCurrentTitle, m_current_url_id, mTheme, this, false), enums.etype.on_update_history); + //if (mURL != null) { + // m_current_url_id = (int) mURL; + //} } if (newUrl.startsWith(CONST_GENESIS_URL_CACHED) || newUrl.startsWith(CONST_GENESIS_URL_CACHED_DARK)) { setURL(constants.CONST_GENESIS_DOMAIN_URL); @@ -679,7 +700,7 @@ geckoSession extends GeckoSession implements MediaSession.Delegate, GeckoSession setURL(newUrl); } if (!mCurrentURL.equals("about:blank")) { - event.invokeObserver(Arrays.asList(mCurrentURL, mSessionID, mCurrentTitle, m_current_url_id, mTheme, this), enums.etype.ON_UPDATE_SEARCH_BAR); + //event.invokeObserver(Arrays.asList(mCurrentURL, mSessionID, mCurrentTitle, m_current_url_id, mTheme, this), enums.etype.ON_UPDATE_SEARCH_BAR); } } @@ -798,7 +819,7 @@ geckoSession extends GeckoSession implements MediaSession.Delegate, GeckoSession /* Its Absence causes delay on first launch*/ - event.invokeObserver(Arrays.asList(mCurrentURL, mSessionID, mCurrentTitle, m_current_url_id, mTheme, this), enums.etype.ON_UPDATE_SEARCH_BAR); + //event.invokeObserver(Arrays.asList(mCurrentURL, mSessionID, mCurrentTitle, m_current_url_id, mTheme, this), enums.etype.ON_UPDATE_SEARCH_BAR); if (!m_url.equals("about:config") && !mCurrentURL.contains("167.86.99.31")) { mProgress = 5; @@ -887,7 +908,7 @@ geckoSession extends GeckoSession implements MediaSession.Delegate, GeckoSession } else { event.invokeObserver(Arrays.asList(var2, mSessionID), enums.etype.M_ORBOT_LOADING); mCurrentURL = mPrevURL; - event.invokeObserver(Arrays.asList(mCurrentURL, mSessionID, mCurrentTitle, m_current_url_id, mTheme, this), enums.etype.ON_UPDATE_SEARCH_BAR); + //event.invokeObserver(Arrays.asList(mCurrentURL, mSessionID, mCurrentTitle, m_current_url_id, mTheme, this), enums.etype.ON_UPDATE_SEARCH_BAR); } return null; } catch (Exception ex) { @@ -915,6 +936,8 @@ geckoSession extends GeckoSession implements MediaSession.Delegate, GeckoSession public void onFirstContentfulPaint(@NonNull GeckoSession var1) { isFirstPaintExecuted = true; + + if (mPreviousErrorPage || mCurrentURL.contains("167.86.99.31") || mCurrentURL.startsWith(CONST_GENESIS_URL_CACHED) || mCurrentURL.startsWith(CONST_GENESIS_URL_CACHED_DARK) || mCurrentURL.startsWith(CONST_GENESIS_HELP_URL_CACHE) || mCurrentURL.startsWith(CONST_GENESIS_HELP_URL_CACHE_DARK)) { event.invokeObserver(Arrays.asList(mCurrentURL, mSessionID, mCurrentTitle, false), enums.etype.M_ON_BANNER_UPDATE); } else { @@ -967,12 +990,6 @@ geckoSession extends GeckoSession implements MediaSession.Delegate, GeckoSession public void onTitleChange(@NonNull GeckoSession var1, @Nullable String var2) { if (var2 != null && !var2.equals(strings.GENERIC_EMPTY_STR) && var2.length() > 2 && !var2.equals("about:blank") && mIsLoaded) { mCurrentTitle = var2; - Object mID = event.invokeObserver(Arrays.asList(mCurrentURL, mSessionID, mCurrentTitle, m_current_url_id, mTheme, this), enums.etype.on_update_history); - if (mID != null) { - m_current_url_id = (int) mID; - } - - event.invokeObserver(Arrays.asList(mCurrentURL, mSessionID, mCurrentTitle, mTheme), enums.etype.ON_UPDATE_TAB_TITLE); } } @@ -1250,6 +1267,11 @@ geckoSession extends GeckoSession implements MediaSession.Delegate, GeckoSession pURL = pURL.replace("www.", ""); } mCurrentURL = pURL; + if(pURL.startsWith("tel:")){ + Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse(pURL)); + mContext.get().startActivity(intent); + } + //event.invokeObserver(Arrays.asList(mCurrentURL, mSessionID, mCurrentTitle, m_current_url_id, mTheme, this), enums.etype.ON_UPDATE_SEARCH_BAR); } public void setRemovableFromBackPressed(boolean pStatus) { @@ -1363,6 +1385,8 @@ geckoSession extends GeckoSession implements MediaSession.Delegate, GeckoSession } wasBackPressed = true; m_current_url_id = -1; + + mCurrentTitle = mHistoryList.get(mHistoryList.getCurrentIndex()).getTitle(); goBack(); try { diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/homeController/homeController.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/homeController/homeController.java index f6c7c657..19110ee6 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/homeController/homeController.java +++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/homeController/homeController.java @@ -32,7 +32,6 @@ import android.os.Bundle; import android.os.Handler; import android.os.IBinder; import android.preference.PreferenceManager; -import android.provider.Settings; import android.speech.RecognizerIntent; import android.text.Editable; import android.text.TextWatcher; @@ -50,7 +49,6 @@ import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatDelegate; import androidx.constraintlayout.widget.ConstraintLayout; import androidx.coordinatorlayout.widget.CoordinatorLayout; -import androidx.core.app.ActivityCompat; import androidx.core.app.NotificationCompat; import androidx.core.app.NotificationManagerCompat; import androidx.core.content.ContextCompat; @@ -60,7 +58,7 @@ import androidx.lifecycle.Lifecycle; import androidx.lifecycle.OnLifecycleEvent; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; -import com.applovin.mediation.ads.MaxAdView; + import com.hiddenservices.onionservices.appManager.activityContextManager; import com.hiddenservices.onionservices.appManager.advertManager.advertController; import com.hiddenservices.onionservices.appManager.bookmarkManager.bookmarkSettings.bookmarkSettingController; @@ -99,6 +97,7 @@ import org.mozilla.geckoview.GeckoResult; import org.mozilla.geckoview.GeckoSession; import org.torproject.android.service.OrbotService; import org.torproject.android.service.wrapper.orbotLocalConstants; + import java.lang.ref.WeakReference; import java.lang.reflect.Method; import java.util.ArrayList; @@ -108,6 +107,7 @@ import java.util.List; import java.util.Locale; import java.util.Objects; import java.util.concurrent.Callable; + import mozilla.components.support.utils.DownloadUtils; import xcrash.ICrashCallback; import xcrash.XCrash; @@ -668,7 +668,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba Context mContext = activityThemeManager.getInstance().initTheme(base); activityContextManager.getInstance().setApplicationContext(mContext); try { - onCrashInit(mContext); + //onCrashInit(mContext); }catch (Exception ex){} super.attachBaseContext(mContext); } @@ -771,6 +771,10 @@ public class homeController extends AppCompatActivity implements ComponentCallba mGeckoView.getSession().stop(); } mGeckoClient.loadURL(url.replace("orion.onion", "167.86.99.31"), mGeckoView, homeController.this); + + if(!mHomeViewController.isOrientationLandscapce()){ + pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_SHOW_BANNER); + } } public String getSecurityInfo() { @@ -954,7 +958,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba if (SDK_INT >= Build.VERSION_CODES.O) { String channelId = "default_home_notification"; - NotificationChannel channel = new NotificationChannel(channelId, "default_home_notification", NotificationManager.IMPORTANCE_DEFAULT); + NotificationChannel channel = new NotificationChannel(channelId, "default_home_notification", NotificationManager.IMPORTANCE_LOW); channel.setSound(null, null); manager.createNotificationChannel(channel); builder.setChannelId(channelId); @@ -1014,14 +1018,16 @@ public class homeController extends AppCompatActivity implements ComponentCallba public void onMemoryCalculate() { if(!status.mThemeApplying){ + ActivityManager actManager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE); ActivityManager.MemoryInfo memInfo = new ActivityManager.MemoryInfo(); actManager.getMemoryInfo(memInfo); long totalMemory = memInfo.totalMem/(1024 * 1024); - if(totalMemory<2000){ + if(totalMemory<1070){ dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_CLOSE_TAB_LOW_MEMORY, null); Log.i("wow : ", "trim memory requested: memory on device is running low"); onLowMemoryInvoked(enums.MemoryStatus.LOW_MEMORY); + pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_LOW_MEMORY_DESTROY); } } } @@ -1100,7 +1106,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba mGeckoClient.getSession().onDestroyMedia(); onHideDefaultNotification(); } - pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_DESTROY); if (!status.sSettingIsAppStarted) { mGeckoClient.onClearAll(); } @@ -1149,6 +1154,16 @@ public class homeController extends AppCompatActivity implements ComponentCallba return false; } + public void onSupport(View view) { + pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_SHOW_INTERSTITIAL); + } + + public void onSupportSplash(View view) { + if(!status.sSettingIsAppStarted){ + pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_SHOW_INTERSTITIAL); + } + } + @RequiresApi(api = Build.VERSION_CODES.M) @SuppressLint("ClickableViewAccessibility") private void initializeLocalEventHandlers() { @@ -1720,7 +1735,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba ((hintAdapter) Objects.requireNonNull(mHintListView.getAdapter())).onClearAdapter(); } else if (!mGeckoClient.getFullScreenStatus()) { mGeckoClient.onExitFullScreen(); - pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_SHOW); + pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_SHOW_BANNER); mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), false); mHomeViewController.updateBannerAdvertStatus(false, (boolean) pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED)); } else if (mSearchbar.isFocused() || isKeyboardOpened) { @@ -1768,15 +1783,15 @@ public class homeController extends AppCompatActivity implements ComponentCallba final Handler handler = new Handler(); handler.postDelayed(() -> mGeckoClient.onRedrawPixel(homeController.this), 300); if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) { - pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_HIDE); + pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_HIDE_BANNER); mHomeViewController.setOrientation(true); mHomeViewController.removeBanner(); } else if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT) { if(mGeckoClient.getFullScreenStatus()){ - pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_SHOW); + pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_SHOW_BANNER); }else { - pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_HIDE); + pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_HIDE_BANNER); } mHomeViewController.setOrientation(false); @@ -1822,7 +1837,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba if(!mGeckoClient.getFullScreenStatus()){ mGeckoClient.onExitFullScreen(); } - pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_SHOW); + pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_SHOW_BANNER); mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), false); pluginController.getInstance().onMessageManagerInvoke(null, M_RESET); pluginController.getInstance().onNotificationInvoke(Collections.singletonList(172800000), pluginEnums.eNotificationManager.M_CREATE_NOTIFICATION); @@ -1862,7 +1877,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba isFocusChanging = false; isSuggestionSearchOpened = false; mSearchbar.requestFocus(); - mSearchbar.setText(helperMethod.urlDesigner(mSearchBarPreviousText, this, mSearchbar.getCurrentTextColor(), status.sTheme, status.sTorBrowsing)); + mSearchbar.setText(helperMethod.urlDesigner(false, mSearchBarPreviousText, this, mSearchbar.getCurrentTextColor(), status.sTheme, status.sTorBrowsing)); mSearchbar.selectAll(); mHomeViewController.initSearchBarFocus(true, isKeyboardOpened); } @@ -1931,7 +1946,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba isFocusChanging = false; isSuggestionSearchOpened = false; mSearchbar.requestFocus(); - mSearchbar.setText(helperMethod.urlDesigner(mSearchBarPreviousText, this, mSearchbar.getCurrentTextColor(), status.sTheme, status.sTorBrowsing)); + mSearchbar.setText(helperMethod.urlDesigner(false, mSearchBarPreviousText, this, mSearchbar.getCurrentTextColor(), status.sTheme, status.sTorBrowsing)); mSearchbar.selectAll(); mHomeViewController.initSearchBarFocus(true, isKeyboardOpened); } @@ -2693,9 +2708,9 @@ public class homeController extends AppCompatActivity implements ComponentCallba mHomeViewController.onSetBannerAdMargin((boolean) data.get(0), (boolean) pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED)); } else if (e_type.equals(enums.etype.on_full_screen_ads)) { if((boolean)data.get(0)){ - pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_HIDE); + pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_HIDE_BANNER); }else { - pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_SHOW); + pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_SHOW_BANNER); } } else if (e_type.equals(enums.etype.M_ON_BANNER_UPDATE)) { Object mStatus = pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED); @@ -2978,7 +2993,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_IS_BOOTSTRAPPED, true)); mHomeViewController.onPageFinished(); mGeckoClient.onRedrawPixel(homeController.this); - pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_INITIALIZE_BANNER_ADS); } else if (e_type.equals(M_RATE_APPLICATION)) { if (!status.sSettingIsAppRated) { runOnUiThread(() -> { @@ -3007,7 +3021,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba } mHomeViewController.onFullScreenUpdate(status); mHomeViewController.onUpdateSearchEngineBar(false, 0); - pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_HIDE); + pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_HIDE_BANNER); } else if (e_type.equals(enums.etype.on_update_favicon)) { //dataController.getInstance().invokeImage(dataEnums.eImageCommands.M_REQUEST_IMAGE_URL, Collections.singletonList(data.get(0))); } else if (e_type.equals(M_LONG_PRESS_WITH_LINK)) { diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/homeController/homeViewController.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/homeController/homeViewController.java index 88e3b36c..e5a82b50 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/homeController/homeViewController.java +++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/homeController/homeViewController.java @@ -253,6 +253,10 @@ class homeViewController { } + public boolean isOrientationLandscapce(){ + return isLandscape; + } + public void initSearchEngineView() { if (!isFullScreen) { ConstraintLayout.LayoutParams layoutParams = (ConstraintLayout.LayoutParams) mSearchEngineBar.getLayoutParams(); @@ -1317,9 +1321,9 @@ class homeViewController { if (url.length() <= 300) { url = removeEndingSlash(url); if(status.sTorBrowsing){ - mSearchbar.setText(helperMethod.urlDesigner(url, mContext, mSearchbar.getCurrentTextColor(), status.sTheme, true)); + mSearchbar.setText(helperMethod.urlDesigner(showProtocol, url, mContext, mSearchbar.getCurrentTextColor(), status.sTheme, true)); }else { - mSearchbar.setText(helperMethod.urlDesigner(url, mContext, mSearchbar.getCurrentTextColor(), status.sTheme, !ssl_status || url.contains("orion.onion"))); + mSearchbar.setText(helperMethod.urlDesigner(showProtocol, url, mContext, mSearchbar.getCurrentTextColor(), status.sTheme, !ssl_status || url.contains("orion.onion"))); } mSearchbar.selectAll(); @@ -1377,9 +1381,31 @@ class homeViewController { void onProgressBarUpdate(int value, boolean mForced) { + if (value == 105) { + progressAnimator.cancel(); + mProgressBar.setAlpha(1); + mProgressBar.animate().cancel(); + mProgressBar.animate().alpha(0); + value = 100; + mProgressBar.animate().alpha(0).withEndAction(() -> mProgressBar.setProgress(0)); + return; + } + if (value == 100) { changeRefreshMenu(); + new Handler().postDelayed(() -> + { + if(mProgressBar.getProgress()==100){ + progressAnimator.cancel(); + mProgressBar.setAlpha(1); + mProgressBar.animate().cancel(); + mProgressBar.animate().alpha(0).withEndAction(() -> mProgressBar.setProgress(0)); + } + onResetTabAnimation(); + }, 2000); + } + mProgressBar = activityContextManager.getInstance().getHomeController().mProgressBar; if (value != 0 && value != 100) { mAppBar.setExpanded(true, true); diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/settingManager/searchEngineManager/settingSearchController.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/settingManager/searchEngineManager/settingSearchController.java index 006d0a42..72080585 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/appManager/settingManager/searchEngineManager/settingSearchController.java +++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/settingManager/searchEngineManager/settingSearchController.java @@ -109,6 +109,9 @@ public class settingSearchController extends AppCompatActivity { @Override public void onPause() { + if(!status.sTorBrowsing && status.sSettingDefaultSearchEngine.equals(constants.CONST_BACKEND_GENESIS_URL)){ + status.sSettingDefaultSearchEngine = constants.CONST_BACKEND_DUCK_DUCK_GO_URL; + } super.onPause(); } diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/settingManager/settingHomeManager/settingHomeController.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/settingManager/settingHomeManager/settingHomeController.java index 0c99438e..55531bf0 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/appManager/settingManager/settingHomeManager/settingHomeController.java +++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/settingManager/settingHomeManager/settingHomeController.java @@ -120,6 +120,10 @@ public class settingHomeController extends AppCompatActivity { pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(this), M_OPEN_CICADA); } + public void onSupport(View view) { + pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_SHOW_INTERSTITIAL); + } + /*View Callbacks*/ private class settingViewCallback implements eventObserver.eventListener { diff --git a/app/src/main/java/com/hiddenservices/onionservices/dataManager/historyDataModel.java b/app/src/main/java/com/hiddenservices/onionservices/dataManager/historyDataModel.java index 75147e6d..005ce9d2 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/dataManager/historyDataModel.java +++ b/app/src/main/java/com/hiddenservices/onionservices/dataManager/historyDataModel.java @@ -90,7 +90,7 @@ public class historyDataModel { } } - private int addHistory(String pUrl, String pHeader, int pID) { + private int addHistory(String pUrl, String pHeader, int pID, boolean pWasBackPressed) { if (pUrl.startsWith(constants.CONST_GENESIS_URL_CACHED) || pUrl.startsWith(constants.CONST_GENESIS_URL_CACHED_DARK)) { pUrl = "https://orion.onion"; @@ -103,6 +103,15 @@ public class historyDataModel { pUrl = helperMethod.removeLastSlash(pUrl); pUrl = helperMethod.urlWithoutPrefix(pUrl); + if(pWasBackPressed){ + for(int e=0;e mBannerAds; + private applovinSupportManager mSupportManager; + private applovinBannerManager mBannerManager; - private int mRequestCount = 0; - private boolean bannerAdRequested = false; - private boolean bannerAdsLoaded = true; - private boolean bannerAdsLoadedRepeat = false; - private boolean lowmemory = false; - private AppCompatActivity mContext = null; - private MaxAdView adView; + private boolean mLowMemoryReached = false; /*Initializations*/ public appLovinManager(eventObserver.eventListener pEvent, View pBannerAds, AppCompatActivity pContext) { this.mEvent = pEvent; - //this.mBannerAds = new WeakReference(pBannerAds); - mContext = pContext; - - try { - if(!lowmemory){ - initializeBannerAds(pContext); - } - }catch (OutOfMemoryError | Exception ex){ - Log.i("",""); - } - - mContext = pContext; - } - public void onInitAdvert(){ - + onInitializeAdvertisement(pContext); } - private void initializeBannerAds(AppCompatActivity pContext) { + private void onInitializeAdvertisement(AppCompatActivity pContext) { AppLovinSdk.getInstance(pContext).getSettings().setVerboseLogging(true); AppLovinSdk.getInstance(pContext).setMediationProvider("max"); AppLovinSdk.initializeSdk(pContext, configuration -> { - bannerAdRequested = true; - showAd(); + if(!mLowMemoryReached){ + this.mSupportManager = new applovinSupportManager(pContext); + this.mBannerManager = new applovinBannerManager(pContext, mEvent); + } }); } /*Local Helper Methods*/ - private void loadAds() { - //onAdvertStatus(true); + private void onShowInterstitial() { + this.mSupportManager.onShow(); } - private void showAd(){ - if(!lowmemory){ - try { - adView = new MaxAdView( "642ec6302c7cecd2",mContext); - onAdvertStatus(false); - adView.setListener(this); - int width = ViewGroup.LayoutParams.MATCH_PARENT; - int heightPx = helperMethod.pxFromDp(50); - adView.setLayoutParams( new FrameLayout.LayoutParams( width, heightPx ) ); - adView.setVisibility(View.GONE); - adView.setLayerType(View.LAYER_TYPE_SOFTWARE, null); - adView.animate().alpha(1).setDuration(400); - adView.setBackgroundColor(mContext.getResources().getColor(R.color.c_background)); - adView.setExtraParameter( "disable_precache", "true" ); - ViewGroup rootView = mContext.findViewById(android.R.id.content); - rootView.addView( adView ); - adView.loadAd(); - }catch (Exception ex){} - } + private void onToggleBannerShow(boolean pStatus) { + this.mBannerManager.onShow(pStatus); } - private boolean isAdvertLoaded() { - return true; - } + /*Helper Methods*/ - private void onLowMemoryDestroy() { - lowmemory = true; - if(adView!=null){ - adView.destroy(); - adView = null; - } - } - - private void onAdvertStatus(boolean pStatus) { - if(adView!=null && bannerAdRequested){ - if(pStatus){ - new Handler().postDelayed(() -> - { - adView.setVisibility(View.VISIBLE); - }, 4000); - }else { - adView.setVisibility(View.GONE); - } - } - } - - /* Overriden Methods */ - - @Override - public void onAdExpanded(MaxAd ad) { - } - - @Override - public void onAdCollapsed(MaxAd ad) { - } - - @Override - public void onAdLoaded(MaxAd ad) { - bannerAdsLoaded = true; - bannerAdsLoadedRepeat = true; - mEvent.invokeObserver(null, M_ON_AD_LOAD); - orbotLocalConstants.sAdLoaded = true; - } - - @Override - public void onAdDisplayed(MaxAd ad) { - status.sAdLoaded = true; - bannerAdsLoadedRepeat = true; - orbotLocalConstants.sAdLoaded = true; - } - - @Override - public void onAdHidden(MaxAd ad) { - orbotLocalConstants.sAdLoaded = true; - } - - @Override - public void onAdClicked(MaxAd ad) { - status.sIsBackgroundAdvertCheck = true; - new Handler().postDelayed(() -> - { - status.sIsBackgroundAdvertCheck = false; - }, 5000); - } - - @Override - public void onAdLoadFailed(String adUnitId, MaxError error) { - status.sAdLoaded = true; - orbotLocalConstants.sAdLoaded = true; - if(!bannerAdsLoadedRepeat){ - showAd(); - } - } - - @Override - public void onAdDisplayFailed(MaxAd ad, MaxError error) { - status.sAdLoaded = true; - orbotLocalConstants.sAdLoaded = true; + private void onDestroy() { + mLowMemoryReached = true; + mBannerManager.onDestroy(); } /*External Triggers*/ public Object onTrigger(pluginEnums.eAdManager pEventType) { if (pEventType.equals(pluginEnums.eAdManager.M_LOW_MEMORY_DESTROY)) { - onLowMemoryDestroy(); + onDestroy(); } else if (pEventType.equals(pluginEnums.eAdManager.M_IS_ADVERT_LOADED)) { - return isAdvertLoaded(); - } else if (pEventType.equals(pluginEnums.eAdManager.M_INITIALIZE_BANNER_ADS)) { - loadAds(); - } else if (pEventType.equals(pluginEnums.eAdManager.M_SHOW)) { - onAdvertStatus(true); - } else if (pEventType.equals(pluginEnums.eAdManager.M_HIDE)) { - onAdvertStatus(false); + return true; + } else if (pEventType.equals(pluginEnums.eAdManager.M_SHOW_BANNER)) { + onToggleBannerShow(true); + } else if (pEventType.equals(pluginEnums.eAdManager.M_HIDE_BANNER)) { + onToggleBannerShow(false); + } else if (pEventType.equals(pluginEnums.eAdManager.M_SHOW_INTERSTITIAL)) { + onShowInterstitial(); } return null; } diff --git a/app/src/main/java/com/hiddenservices/onionservices/pluginManager/adPluginManager/applovinBannerManager.java b/app/src/main/java/com/hiddenservices/onionservices/pluginManager/adPluginManager/applovinBannerManager.java new file mode 100644 index 00000000..81fc1ebf --- /dev/null +++ b/app/src/main/java/com/hiddenservices/onionservices/pluginManager/adPluginManager/applovinBannerManager.java @@ -0,0 +1,112 @@ +package com.hiddenservices.onionservices.pluginManager.adPluginManager; + +import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eAdManagerCallbacks.M_ON_AD_CLICKED; +import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eAdManagerCallbacks.M_ON_AD_LOAD; +import android.view.View; +import android.view.ViewGroup; +import android.widget.FrameLayout; +import androidx.appcompat.app.AppCompatActivity; +import com.applovin.mediation.MaxAd; +import com.applovin.mediation.MaxAdViewAdListener; +import com.applovin.mediation.MaxError; +import com.applovin.mediation.ads.MaxAdView; +import com.hiddenservices.onionservices.eventObserver; +import com.hiddenservices.onionservices.helperManager.helperMethod; + + +public class applovinBannerManager implements MaxAdViewAdListener{ + + /* Private Variabes */ + + private static final String S_UNIT_ID = "642ec6302c7cecd2"; + private MaxAdView mBanner; + eventObserver.eventListener mEvent; + + /* Initializations */ + + public applovinBannerManager(AppCompatActivity pContext, eventObserver.eventListener pEvent){ + mEvent = pEvent; + mBanner = new MaxAdView( S_UNIT_ID,pContext); + mBanner.setListener(this); + + int width = ViewGroup.LayoutParams.MATCH_PARENT; + int heightPx = helperMethod.pxFromDp(50); + + mBanner.setLayoutParams( new FrameLayout.LayoutParams( width, heightPx ) ); + mBanner.setVisibility(View.GONE); + mBanner.setLayerType(View.LAYER_TYPE_SOFTWARE, null); + mBanner.setExtraParameter( "disable_precache", "true" ); + + ViewGroup rootView = pContext.findViewById(android.R.id.content); + rootView.addView(mBanner); + + mBanner.setExtraParameter( "allow_pause_auto_refresh_immediately", "true" ); + mBanner.loadAd(); + } + + /* Helper Methods */ + + public void onShow(boolean pStatus) { + if(mBanner!=null){ + if(pStatus){ + mBanner.startAutoRefresh(); + mBanner.clearAnimation(); + mBanner.setAlpha(0); + mBanner.setVisibility(View.VISIBLE); + mBanner.animate().setDuration(250).alpha(1).setStartDelay(500); + }else { + mBanner.stopAutoRefresh(); + mBanner.clearAnimation(); + mBanner.setAlpha(1); + mBanner.setVisibility(View.VISIBLE); + mBanner.animate().setDuration(250).alpha(0).setStartDelay(0).withEndAction(() -> { + mBanner.setVisibility(View.GONE); + }); + } + } + } + + public void onDestroy() { + if(mBanner !=null){ + mBanner.destroy(); + mBanner = null; + } + } + + /* Local Listeners */ + + @Override + public void onAdExpanded(MaxAd ad) { + } + + @Override + public void onAdCollapsed(MaxAd ad) { + } + + @Override + public void onAdLoaded(MaxAd ad) { + mEvent.invokeObserver(null, M_ON_AD_LOAD); + } + + @Override + public void onAdDisplayed(MaxAd ad) { + } + + @Override + public void onAdHidden(MaxAd ad) { + } + + @Override + public void onAdClicked(MaxAd ad) { + mEvent.invokeObserver(null, M_ON_AD_CLICKED); + } + + @Override + public void onAdLoadFailed(String adUnitId, MaxError error) { + } + + @Override + public void onAdDisplayFailed(MaxAd ad, MaxError error) { + } + +} diff --git a/app/src/main/java/com/hiddenservices/onionservices/pluginManager/adPluginManager/applovinSupportManager.java b/app/src/main/java/com/hiddenservices/onionservices/pluginManager/adPluginManager/applovinSupportManager.java new file mode 100644 index 00000000..55871c42 --- /dev/null +++ b/app/src/main/java/com/hiddenservices/onionservices/pluginManager/adPluginManager/applovinSupportManager.java @@ -0,0 +1,79 @@ +package com.hiddenservices.onionservices.pluginManager.adPluginManager; + +import android.os.Handler; +import androidx.appcompat.app.AppCompatActivity; +import com.applovin.mediation.MaxAd; +import com.applovin.mediation.MaxAdViewAdListener; +import com.applovin.mediation.MaxError; +import com.applovin.mediation.ads.MaxInterstitialAd; +import java.util.concurrent.TimeUnit; + +public class applovinSupportManager implements MaxAdViewAdListener { + + /* Private Variabes */ + + private static final String S_UNIT_ID = "20c7df09f494b00d"; + private MaxInterstitialAd mInterstitialAd; + private int mRetryAttemt; + + + /* Initializations */ + + public applovinSupportManager(AppCompatActivity pContext){ + mInterstitialAd = new MaxInterstitialAd( S_UNIT_ID, pContext); + mInterstitialAd.setListener(this); + mInterstitialAd.loadAd(); + } + + /* Helper Methods */ + + public void onShow() { + if(mInterstitialAd!=null){ + if(mInterstitialAd.isReady()){ + mInterstitialAd.showAd(); + } + } + } + + /* Local Listeners */ + + @Override + public void onAdExpanded(MaxAd ad) { + } + + @Override + public void onAdCollapsed(MaxAd ad) { + } + + @Override + public void onAdLoaded(final MaxAd maxAd) + { + mRetryAttemt = 0; + } + + @Override + public void onAdLoadFailed(final String adUnitId, final MaxError error) + { + mRetryAttemt++; + long delayMillis = TimeUnit.SECONDS.toMillis( (long) Math.pow( 2, Math.min( 6, mRetryAttemt) ) ); + new Handler().postDelayed(() -> mInterstitialAd.loadAd(), delayMillis ); + } + + @Override + public void onAdDisplayFailed(final MaxAd maxAd, final MaxError error) + { + mInterstitialAd.loadAd(); + } + + @Override + public void onAdDisplayed(final MaxAd maxAd) {} + + @Override + public void onAdClicked(final MaxAd maxAd) {} + + @Override + public void onAdHidden(final MaxAd maxAd) + { + mInterstitialAd.loadAd(); + } +} diff --git a/app/src/main/java/com/hiddenservices/onionservices/pluginManager/orbotPluginManager/orbotLogManager.java b/app/src/main/java/com/hiddenservices/onionservices/pluginManager/orbotPluginManager/orbotLogManager.java index e96855e9..37b27ff0 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/pluginManager/orbotPluginManager/orbotLogManager.java +++ b/app/src/main/java/com/hiddenservices/onionservices/pluginManager/orbotPluginManager/orbotLogManager.java @@ -12,9 +12,6 @@ public class orbotLogManager { private String onGetCleanedLogs(String pLogs) { String logs = pLogs; - if(!status.sAdLoaded){ - return "Initializing extentions"; - } if (logs.equals("Starting Orion | Please Wait ...")) { return logs; } diff --git a/app/src/main/java/com/hiddenservices/onionservices/pluginManager/pluginController.java b/app/src/main/java/com/hiddenservices/onionservices/pluginManager/pluginController.java index 147ed5ac..cf198587 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/pluginManager/pluginController.java +++ b/app/src/main/java/com/hiddenservices/onionservices/pluginManager/pluginController.java @@ -1,5 +1,6 @@ package com.hiddenservices.onionservices.pluginManager; +import android.os.Handler; import android.view.WindowManager; import android.widget.ImageView; @@ -33,8 +34,7 @@ import java.util.List; import java.util.Locale; import static com.hiddenservices.onionservices.constants.enums.etype.fetch_favicon; -import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eAdManagerCallbacks.M_ON_AD_CLICK; -import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eAdManagerCallbacks.M_ON_AD_HIDE; +import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eAdManagerCallbacks.M_ON_AD_CLICKED; import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eAdManagerCallbacks.M_ON_AD_LOAD; import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eLangManager.M_ACTIVITY_CREATED; import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eLangManager.M_RESUME; @@ -110,13 +110,14 @@ public class pluginController { private class admobCallback implements eventObserver.eventListener { @Override public Object invokeObserver(List data, Object event_type) { - if (event_type.equals(M_ON_AD_CLICK)) { - helperMethod.onMinimizeApp(mHomeController.get()); - activityContextManager.getInstance().getHomeController().onAdClicked(); - } else if (event_type.equals(M_ON_AD_LOAD)) { + if (event_type.equals(M_ON_AD_LOAD)) { activityContextManager.getInstance().getHomeController().onUpdateBannerAdvert(); - } else if (event_type.equals(M_ON_AD_HIDE)) { - activityContextManager.getInstance().getHomeController().onAdClicked(); + } else if (event_type.equals(M_ON_AD_CLICKED)) { + status.sIsBackgroundAdvertCheck = true; + new Handler().postDelayed(() -> + { + status.sIsBackgroundAdvertCheck = false; + }, 5000); } return null; } diff --git a/app/src/main/java/com/hiddenservices/onionservices/pluginManager/pluginEnums.java b/app/src/main/java/com/hiddenservices/onionservices/pluginManager/pluginEnums.java index a244873a..773f199b 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/pluginManager/pluginEnums.java +++ b/app/src/main/java/com/hiddenservices/onionservices/pluginManager/pluginEnums.java @@ -1,13 +1,14 @@ package com.hiddenservices.onionservices.pluginManager; public class pluginEnums { + /*Advert Manager*/ public enum eAdManager { - M_INITIALIZE_BANNER_ADS, M_IS_ADVERT_LOADED, M_LOW_MEMORY_DESTROY, M_DESTROY, M_HIDE, M_SHOW + M_IS_ADVERT_LOADED, M_LOW_MEMORY_DESTROY, M_HIDE_BANNER, M_SHOW_BANNER, M_SHOW_INTERSTITIAL } public enum eAdManagerCallbacks { - M_ON_AD_CLICK, M_ON_AD_LOAD, M_ON_AD_HIDE + M_ON_AD_LOAD, M_ON_AD_CLICKED } /*Analytics Manager*/ diff --git a/app/src/main/java/com/hiddenservices/onionservices/pluginManager/pluginReciever/defaultNotificationReciever.java b/app/src/main/java/com/hiddenservices/onionservices/pluginManager/pluginReciever/defaultNotificationReciever.java index b5fb7136..0aea4a2b 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/pluginManager/pluginReciever/defaultNotificationReciever.java +++ b/app/src/main/java/com/hiddenservices/onionservices/pluginManager/pluginReciever/defaultNotificationReciever.java @@ -35,7 +35,6 @@ public class defaultNotificationReciever extends BroadcastReceiver { protected void onDestroy(Context context) { orbotLocalConstants.mAppForceExit = true; - pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_DESTROY); if (!status.mThemeApplying) { if (!status.sSettingIsAppStarted) { diff --git a/app/src/main/res/custom-xml/images/xml/ic_baseline_support.xml b/app/src/main/res/custom-xml/images/xml/ic_baseline_support.xml new file mode 100644 index 00000000..4d35dc5a --- /dev/null +++ b/app/src/main/res/custom-xml/images/xml/ic_baseline_support.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/app/src/main/res/layouts/home/layout/home_view.xml b/app/src/main/res/layouts/home/layout/home_view.xml index 3dbefd64..8c6f20c9 100644 --- a/app/src/main/res/layouts/home/layout/home_view.xml +++ b/app/src/main/res/layouts/home/layout/home_view.xml @@ -463,6 +463,23 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" /> + + + + + app:tint="@color/c_navigation_tint" /> + app:tint="@color/c_navigation_tint" /> + app:tint="@color/c_navigation_tint" /> + app:tint="@color/c_navigation_tint" /> + app:tint="@color/c_navigation_tint" /> + app:tint="@color/c_navigation_tint" /> + + + + + + + + + + + + + + + + + + + + + + + +