Trackers Completely Removed

Trackers Completely Removed
master
Abdul Mannan Saeed 2023-04-13 13:44:17 +05:00
parent c616d1c7f3
commit f105dbbbe9
13 changed files with 405 additions and 539 deletions

View File

@ -6,11 +6,6 @@ plugins {
apply plugin: 'com.android.application'
apply from: 'variables.gradle'
apply plugin: 'kotlin-android'
apply plugin: 'applovin-quality-service'
applovin {
apiKey project.ext.applovin_key
}
android {
@ -100,16 +95,6 @@ dependencies {
implementation "org.mozilla.components:concept-base:108.2.0"
implementation "org.mozilla.components:support-utils:108.2.0"
/* Analytics */
implementation 'com.flurry.android:analytics:14.0.0'
/* Ads Manager */
implementation 'com.applovin:applovin-sdk:11.7.0'
implementation 'com.facebook.android:audience-network-sdk:6.12.0'
implementation 'com.applovin.mediation:facebook-adapter:6.12.0.1'
/* Orbot Service */
implementation project(path: ':orbotmanager')

View File

@ -268,8 +268,8 @@ public class homeController extends AppCompatActivity implements ComponentCallba
initTor();
}
onMemoryCalculate();
pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_INIT_ADS);
mHomeViewController.updateBannerAdvertStatus(true, (boolean) pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
//pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_INIT_ADS);
//mHomeViewController.updateBannerAdvertStatus(true, (boolean) pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
mHomeViewController.onSessionReinit();
if(status.mThemeApplying){
mGeckoClient.initRestore(mGeckoView, homeController.this);
@ -446,15 +446,15 @@ public class homeController extends AppCompatActivity implements ComponentCallba
}
if (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.progressBarReset();
} else {
mHomeViewController.updateBannerAdvertStatus(true, (boolean) pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
//mHomeViewController.updateBannerAdvertStatus(true, (boolean) pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
}
mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(), false, false, false);
} else {
if (status.sSettingDefaultSearchEngine.equals(constants.CONST_BACKEND_GENESIS_URL)) {
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.onFullScreen(true);
@ -462,7 +462,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
}
public void onUpdateBannerAdvert() {
mHomeViewController.updateBannerAdvertStatus(true, (boolean) pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
//mHomeViewController.updateBannerAdvertStatus(true, (boolean) pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
new Handler().postDelayed(() ->
{
@ -783,7 +783,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
new Handler().postDelayed(() ->
{
if(status.sSettingIsAppStarted) {
pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_SHOW_BANNER);
//pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_SHOW_BANNER);
}
}, 3000);
}
@ -866,9 +866,9 @@ public class homeController extends AppCompatActivity implements ComponentCallba
}
if (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));
} else {
mHomeViewController.updateBannerAdvertStatus(true, (boolean) pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
//mHomeViewController.updateBannerAdvertStatus(true, (boolean) pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
}
if(pGeneratePixel){
@ -1060,7 +1060,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
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);
//pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_LOW_MEMORY_DESTROY);
}
}
}
@ -1092,7 +1092,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
onLowMemoryInvoked(enums.MemoryStatus.MODERATE_MEMORY);
break;
case TRIM_MEMORY_RUNNING_CRITICAL:
pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_LOW_MEMORY_DESTROY);
//pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_LOW_MEMORY_DESTROY);
dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_CLOSE_TAB_LOW_MEMORY, null);
Log.i("wow : ", "trim memory requested: memory on device is very low and critical");
onLowMemoryInvoked(enums.MemoryStatus.CRITICAL_MEMORY);
@ -1195,12 +1195,12 @@ public class homeController extends AppCompatActivity implements ComponentCallba
}
public void onSupport(View view) {
pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_SHOW_INTERSTITIAL);
//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);
//pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_SHOW_INTERSTITIAL);
}
}
@ -1665,7 +1665,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
{
dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_UPDATE_PIXEL, Arrays.asList(mGeckoClient.getSession().getSessionID(), mRenderedBitmap, null, mGeckoView, false));
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));
}
if (status.sOpenURLInNewTab) {
@ -1687,7 +1687,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
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)) {
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));
}
if (status.sOpenURLInNewTab) {
@ -1716,7 +1716,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
onGetThumbnail(null, false);
mHomeViewController.expandTopBar(false, mGeckoView.getMaxY());
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, 1000, mGeckoClient.getSession().getCurrentURL());
}, 100);
@ -1733,7 +1733,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
onGetThumbnail(null, false);
mHomeViewController.expandTopBar(false, mGeckoView.getMaxY());
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));
}
mNewTab.setPressed(false);
@ -1842,10 +1842,10 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} else if (!mGeckoClient.getFullScreenStatus()) {
mGeckoClient.onExitFullScreen();
if(status.sSettingIsAppStarted){
pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_SHOW_BANNER);
//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));
//mHomeViewController.updateBannerAdvertStatus(false, (boolean) pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
} else if (mSearchbar.isFocused() || isKeyboardOpened) {
mHomeViewController.onClearSelections(true);
} else if (!mSearchBarWasBackButtonPressed) {
@ -1890,21 +1890,21 @@ public class homeController extends AppCompatActivity implements ComponentCallba
final Handler handler = new Handler();
if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {
pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_HIDE_BANNER);
//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()){
if(status.sSettingIsAppStarted){
pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_SHOW_BANNER);
//pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_SHOW_BANNER);
}
}else {
pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_HIDE_BANNER);
//pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_HIDE_BANNER);
}
mHomeViewController.setOrientation(false);
mHomeViewController.updateBannerAdvertStatus(true, (boolean) pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
//mHomeViewController.updateBannerAdvertStatus(true, (boolean) pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
}
if (mSplashScreen.getAlpha() > 0) {
mHomeViewController.initSplashOrientation();
@ -1949,7 +1949,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mGeckoClient.onExitFullScreen();
}
if(status.sSettingIsAppStarted){
pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_SHOW_BANNER);
//pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_SHOW_BANNER);
}
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), false);
pluginController.getInstance().onMessageManagerInvoke(null, M_RESET);
@ -2157,7 +2157,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
}
public void onSetBannerAdMargin() {
mHomeViewController.onSetBannerAdMargin(true, (boolean) pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
//mHomeViewController.onSetBannerAdMargin(true, (boolean) pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED));
}
public void onVoiceClick(View view) {
@ -2820,7 +2820,8 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mHomeViewController.onProgressBarUpdate(100, true, false);
onCloseCurrentTab((geckoSession) data.get(0));
} else if (e_type.equals(homeEnums.eHomeViewCallback.M_ADVERT_LOADED)) {
return pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED);
return false;
//return pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED);
} else if (e_type.equals(homeEnums.eHomeViewCallback.M_NEW_LINK_IN_NEW_TAB)) {
postNewLinkTabAnimationInBackground(dataToStr(data.get(0)));
} else if (e_type.equals(homeEnums.eHomeViewCallback.M_NEW_LINK_IN_NEW_TAB_LOAD)) {
@ -2856,20 +2857,20 @@ public class homeController extends AppCompatActivity implements ComponentCallba
postNewLinkTabAnimationOpen((String) data.get(0), false);
}
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)) {
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 {
if(status.sSettingIsAppStarted){
pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_SHOW_BANNER);
//pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_SHOW_BANNER);
}
}
} else if (e_type.equals(homeEnums.eHomeViewCallback.M_ON_BANNER_UPDATE)) {
Object mStatus = pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED);
if (mStatus != null) {
mHomeViewController.updateBannerAdvertStatus(false, (boolean) mStatus);
}
//Object mStatus = pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED);
//if (mStatus != null) {
// mHomeViewController.updateBannerAdvertStatus(false, (boolean) mStatus);
//}
} else if (e_type.equals(homeEnums.eHomeViewCallback.M_GET_CURRENT_URL)) {
if (mGeckoClient == null || mGeckoClient.getSession() == null) {
return null;
@ -3114,11 +3115,11 @@ public class homeController extends AppCompatActivity implements ComponentCallba
} else if (e_type.equals(homeEnums.eGeckoCallback.ON_EXPAND_TOP_BAR)) {
mHomeViewController.expandTopBar(false, mGeckoView.getMaxY());
} else if (e_type.equals(homeEnums.eGeckoCallback.M_ON_BANNER_UPDATE)) {
Object mAdvertResponse = pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED);
if (mAdvertResponse != null) {
mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), true);
mHomeViewController.updateBannerAdvertStatus((boolean) data.get(3), (boolean) mAdvertResponse);
}
//Object mAdvertResponse = pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED);
// if (mAdvertResponse != null) {
// mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), true);
// mHomeViewController.updateBannerAdvertStatus((boolean) data.get(3), (boolean) mAdvertResponse);
//}
} else if (e_type.equals(homeEnums.eGeckoCallback.PROGRESS_UPDATE)) {
mHomeViewController.onProgressBarUpdate((int) data.get(0), false, isStaticURL());
} else if (e_type.equals(homeEnums.eGeckoCallback.M_LOAD_HOMEPAGE_GENESIS)) {
@ -3200,7 +3201,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_BANNER);
//pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_HIDE_BANNER);
} else if (e_type.equals(homeEnums.eGeckoCallback.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)) {

View File

@ -1112,8 +1112,8 @@ public class homeViewController {
if (mBannerAds.getAlpha() == 0) {
mBannerAds.animate().cancel();
mBannerAds.setAlpha(0);
mBannerAds.animate().alpha(1);
mBannerAds.setVisibility(View.VISIBLE);
mBannerAds.animate().alpha(0);
mBannerAds.setVisibility(View.GONE);
}
onSetBannerAdMargin(true, true);
} else if (mBannerAds.getVisibility() != View.VISIBLE) {

View File

@ -120,7 +120,7 @@ public class settingHomeController extends AppCompatActivity {
}
public void onSupport(View view) {
pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_SHOW_INTERSTITIAL);
//pluginController.getInstance().onAdsInvoke(Collections.singletonList(this), pluginEnums.eAdManager.M_SHOW_INTERSTITIAL);
}
/*View Callbacks*/

View File

@ -1,83 +1,83 @@
package com.hiddenservices.onionservices.pluginManager.adPluginManager;
import android.view.View;
import com.applovin.sdk.AppLovinSdk;
import com.hiddenservices.onionservices.eventObserver;
import com.hiddenservices.onionservices.pluginManager.pluginEnums;
import androidx.appcompat.app.AppCompatActivity;
public class appLovinManager {
/*Private Variables */
private eventObserver.eventListener mEvent;
private applovinSupportManager mSupportManager;
private applovinBannerManager mBannerManager;
private AppCompatActivity mContext;
private boolean mLowMemoryReached = false;
/*Initializations*/
public appLovinManager(eventObserver.eventListener pEvent, View pBannerAds, AppCompatActivity pContext) {
this.mEvent = pEvent;
this.mContext = pContext;
}
private void onInitializeAdvertisement() {
if(!mLowMemoryReached){
AppLovinSdk.getInstance(mContext).getSettings().setVerboseLogging(true);
AppLovinSdk.getInstance(mContext).setMediationProvider("max");
AppLovinSdk.initializeSdk(mContext, configuration -> {
if(!mLowMemoryReached){
this.mSupportManager = new applovinSupportManager(mContext);
this.mBannerManager = new applovinBannerManager(mContext, mEvent);
}
});
}
}
/*Local Helper Methods*/
private void onShowInterstitial() {
if(AppLovinSdk.getInstance(mContext).isInitialized() && this.mSupportManager!=null){
this.mSupportManager.onShow();
}
}
private void onToggleBannerShow(boolean pStatus) {
if(AppLovinSdk.getInstance(mContext).isInitialized() && this.mBannerManager!=null){
this.mBannerManager.onShowToggle(pStatus);
}
}
/*Helper Methods*/
private void onDestroy() {
mLowMemoryReached = true;
if(mBannerManager!=null){
mBannerManager.onDestroy();
}
}
/*External Triggers*/
public Object onTrigger(pluginEnums.eAdManager pEventType) {
if (pEventType.equals(pluginEnums.eAdManager.M_LOW_MEMORY_DESTROY)) {
onDestroy();
} else if (pEventType.equals(pluginEnums.eAdManager.M_IS_ADVERT_LOADED)) {
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();
} else if (pEventType.equals(pluginEnums.eAdManager.M_INIT_ADS)) {
onInitializeAdvertisement();
}
return null;
}
}
//package com.hiddenservices.onionservices.pluginManager.adPluginManager;
//
//import android.view.View;
//import com.applovin.sdk.AppLovinSdk;
//import com.hiddenservices.onionservices.eventObserver;
//import com.hiddenservices.onionservices.pluginManager.pluginEnums;
//import androidx.appcompat.app.AppCompatActivity;
//
//public class appLovinManager {
//
// /*Private Variables */
//
// private eventObserver.eventListener mEvent;
// private applovinSupportManager mSupportManager;
// private applovinBannerManager mBannerManager;
// private AppCompatActivity mContext;
//
// private boolean mLowMemoryReached = false;
//
// /*Initializations*/
//
// public appLovinManager(eventObserver.eventListener pEvent, View pBannerAds, AppCompatActivity pContext) {
// this.mEvent = pEvent;
// this.mContext = pContext;
// }
//
// private void onInitializeAdvertisement() {
// if(!mLowMemoryReached){
// AppLovinSdk.getInstance(mContext).getSettings().setVerboseLogging(true);
// AppLovinSdk.getInstance(mContext).setMediationProvider("max");
// AppLovinSdk.initializeSdk(mContext, configuration -> {
// if(!mLowMemoryReached){
// this.mSupportManager = new applovinSupportManager(mContext);
// this.mBannerManager = new applovinBannerManager(mContext, mEvent);
// }
// });
// }
// }
//
// /*Local Helper Methods*/
//
// private void onShowInterstitial() {
// if(AppLovinSdk.getInstance(mContext).isInitialized() && this.mSupportManager!=null){
// this.mSupportManager.onShow();
// }
// }
//
// private void onToggleBannerShow(boolean pStatus) {
// if(AppLovinSdk.getInstance(mContext).isInitialized() && this.mBannerManager!=null){
// this.mBannerManager.onShowToggle(pStatus);
// }
// }
//
// /*Helper Methods*/
//
// private void onDestroy() {
// mLowMemoryReached = true;
// if(mBannerManager!=null){
// mBannerManager.onDestroy();
// }
// }
//
// /*External Triggers*/
//
// public Object onTrigger(pluginEnums.eAdManager pEventType) {
// if (pEventType.equals(pluginEnums.eAdManager.M_LOW_MEMORY_DESTROY)) {
// onDestroy();
// } else if (pEventType.equals(pluginEnums.eAdManager.M_IS_ADVERT_LOADED)) {
// 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();
// } else if (pEventType.equals(pluginEnums.eAdManager.M_INIT_ADS)) {
// onInitializeAdvertisement();
// }
// return null;
// }
//
//}
//

View File

@ -1,115 +1,115 @@
package com.hiddenservices.onionservices.pluginManager.adPluginManager;
import static com.hiddenservices.onionservices.constants.keys.APPLOVIN_BANNER_KEY;
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 = APPLOVIN_BANNER_KEY;
private MaxAdView mBanner;
private 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 onShowToggle(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 if (mBanner!=null){
mBanner.stopAutoRefresh();
mBanner.clearAnimation();
mBanner.setAlpha(1);
mBanner.setVisibility(View.VISIBLE);
mBanner.animate().setDuration(250).alpha(0).setStartDelay(0).withEndAction(() -> {
if(mBanner!=null){
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) {
}
}
//package com.hiddenservices.onionservices.pluginManager.adPluginManager;
//
//import static com.hiddenservices.onionservices.constants.keys.APPLOVIN_BANNER_KEY;
//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 = APPLOVIN_BANNER_KEY;
// private MaxAdView mBanner;
// private 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 onShowToggle(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 if (mBanner!=null){
// mBanner.stopAutoRefresh();
// mBanner.clearAnimation();
// mBanner.setAlpha(1);
// mBanner.setVisibility(View.VISIBLE);
// mBanner.animate().setDuration(250).alpha(0).setStartDelay(0).withEndAction(() -> {
// if(mBanner!=null){
// 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) {
// }
//
//}

View File

@ -1,81 +1,81 @@
package com.hiddenservices.onionservices.pluginManager.adPluginManager;
import static com.hiddenservices.onionservices.constants.keys.APPLOVIN_SUPPORT_KEY;
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 = APPLOVIN_SUPPORT_KEY;
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();
}
}
//package com.hiddenservices.onionservices.pluginManager.adPluginManager;
//
//import static com.hiddenservices.onionservices.constants.keys.APPLOVIN_SUPPORT_KEY;
//
//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 = APPLOVIN_SUPPORT_KEY;
// 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();
// }
//}

View File

@ -1,42 +1,42 @@
package com.hiddenservices.onionservices.pluginManager.analyticPluginManager;
import androidx.appcompat.app.AppCompatActivity;
import com.hiddenservices.onionservices.eventObserver;
import com.hiddenservices.onionservices.pluginManager.pluginEnums;
import com.flurry.android.FlurryAgent;
import java.lang.ref.WeakReference;
import java.util.List;
public class analyticManager {
/*Private Variables*/
private WeakReference<AppCompatActivity> mAppContext;
/*Initializations*/
public analyticManager(WeakReference<AppCompatActivity> pAppContext, eventObserver.eventListener pEvent) {
this.mAppContext = pAppContext;
initialize();
}
private void initialize() {
new FlurryAgent.Builder().withLogEnabled(false).build(mAppContext.get(), "ND6QCR4JSHSJ25VWC8DN");
}
/*External Triggers*/
private void logEvent(String pValue) {
if (FlurryAgent.isSessionActive()) {
FlurryAgent.logEvent(pValue);
}
}
public void onTrigger(List<Object> pData, pluginEnums.eAnalyticManager pEventType) {
if (pEventType.equals(pluginEnums.eAnalyticManager.M_LOG_EVENT)) {
logEvent((String) pData.get(0));
}
}
}
//package com.hiddenservices.onionservices.pluginManager.analyticPluginManager;
//
//import androidx.appcompat.app.AppCompatActivity;
//
//import com.hiddenservices.onionservices.eventObserver;
//import com.hiddenservices.onionservices.pluginManager.pluginEnums;
//import com.flurry.android.FlurryAgent;
//
//import java.lang.ref.WeakReference;
//import java.util.List;
//
//public class analyticManager {
// /*Private Variables*/
//
// private WeakReference<AppCompatActivity> mAppContext;
//
// /*Initializations*/
//
// public analyticManager(WeakReference<AppCompatActivity> pAppContext, eventObserver.eventListener pEvent) {
// this.mAppContext = pAppContext;
//
// initialize();
// }
//
// private void initialize() {
// new FlurryAgent.Builder().withLogEnabled(false).build(mAppContext.get(), "ND6QCR4JSHSJ25VWC8DN");
// }
//
// /*External Triggers*/
//
// private void logEvent(String pValue) {
// if (FlurryAgent.isSessionActive()) {
// FlurryAgent.logEvent(pValue);
// }
// }
//
// public void onTrigger(List<Object> pData, pluginEnums.eAnalyticManager pEventType) {
// if (pEventType.equals(pluginEnums.eAnalyticManager.M_LOG_EVENT)) {
// logEvent((String) pData.get(0));
// }
// }
//}

View File

@ -1,7 +1,5 @@
package com.hiddenservices.onionservices.pluginManager;
import android.Manifest;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
@ -10,7 +8,6 @@ import android.widget.ImageView;
import androidx.appcompat.app.AppCompatActivity;
import com.hiddenservices.onionservices.appManager.activityContextManager;
import com.hiddenservices.onionservices.appManager.homeManager.geckoManager.helperClasses.permissionHandler;
import com.hiddenservices.onionservices.appManager.homeManager.homeController.homeEnums;
import com.hiddenservices.onionservices.appManager.unproxiedConnectionManager.unproxiedConnectionController;
import com.hiddenservices.onionservices.appManager.homeManager.homeController.homeController;
import com.hiddenservices.onionservices.appManager.orbotLogManager.orbotLogController;
@ -22,25 +19,16 @@ import com.hiddenservices.onionservices.dataManager.dataController;
import com.hiddenservices.onionservices.dataManager.dataEnums;
import com.hiddenservices.onionservices.eventObserver;
import com.hiddenservices.onionservices.helperManager.helperMethod;
import com.hiddenservices.onionservices.pluginManager.adPluginManager.appLovinManager;
import com.hiddenservices.onionservices.pluginManager.analyticPluginManager.analyticManager;
import com.hiddenservices.onionservices.pluginManager.downloadPluginManager.downloadManager;
import com.hiddenservices.onionservices.pluginManager.langPluginManager.langManager;
import com.hiddenservices.onionservices.pluginManager.messagePluginManager.messageManager;
import com.hiddenservices.onionservices.pluginManager.orbotPluginManager.orbotManager;
import com.karumi.dexter.Dexter;
import com.karumi.dexter.MultiplePermissionsReport;
import com.karumi.dexter.PermissionToken;
import com.karumi.dexter.listener.PermissionRequest;
import com.karumi.dexter.listener.multi.MultiplePermissionsListener;
import java.lang.ref.WeakReference;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.concurrent.Callable;
import static com.hiddenservices.onionservices.constants.constants.CONST_BRIDGES;
import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eAdManagerCallbacks.M_ON_AD_CLICKED;
import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eAdManagerCallbacks.M_ON_AD_LOAD;
@ -55,8 +43,8 @@ import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eMessag
public class pluginController {
/*Plugin Instance*/
private appLovinManager mAdManager;
private analyticManager mAnalyticsManager;
//private appLovinManager mAdManager;
//private analyticManager mAnalyticsManager;
private messageManager mMessageManager;
private activityContextManager mContextManager;
private langManager mLangManager;
@ -92,8 +80,8 @@ public class pluginController {
mHomeController = new WeakReference(activityContextManager.getInstance().getHomeController());
mContextManager = activityContextManager.getInstance();
mAdManager = new appLovinManager(new admobCallback(), ((homeController) mHomeController.get()).getBannerAd(), mHomeController.get());
mAnalyticsManager = new analyticManager(mHomeController, new analyticCallback());
//mAdManager = new appLovinManager(new admobCallback(), ((homeController) mHomeController.get()).getBannerAd(), mHomeController.get());
//mAnalyticsManager = new analyticManager(mHomeController, new analyticCallback());
mMessageManager = new messageManager(new messageCallback());
mOrbotManager = orbotManager.getInstance();
mDownloadManager = new downloadManager(mHomeController, new downloadCallback());
@ -113,45 +101,45 @@ public class pluginController {
/*------------------------------------------------ CALLBACK LISTENERS------------------------------------------------------------*/
/*Ad Manager*/
private class admobCallback implements eventObserver.eventListener {
@Override
public Object invokeObserver(List<Object> data, Object event_type) {
if (event_type.equals(M_ON_AD_LOAD)) {
activityContextManager.getInstance().getHomeController().onUpdateBannerAdvert();
} else if (event_type.equals(M_ON_AD_CLICKED)) {
status.sIsBackgroundAdvertCheck = true;
new Handler().postDelayed(() ->
{
status.sIsBackgroundAdvertCheck = false;
}, 5000);
}
return null;
}
}
// private class admobCallback implements eventObserver.eventListener {
// @Override
// public Object invokeObserver(List<Object> data, Object event_type) {
// if (event_type.equals(M_ON_AD_LOAD)) {
// activityContextManager.getInstance().getHomeController().onUpdateBannerAdvert();
// } else if (event_type.equals(M_ON_AD_CLICKED)) {
// status.sIsBackgroundAdvertCheck = true;
// new Handler().postDelayed(() ->
// {
// status.sIsBackgroundAdvertCheck = false;
// }, 5000);
// }
// return null;
// }
// }
public Object onAdsInvoke(List<Object> pData, pluginEnums.eAdManager pEventType) {
//public Object onAdsInvoke(List<Object> pData, pluginEnums.eAdManager pEventType) {
if (mAdManager != null) {
return mAdManager.onTrigger(pEventType);
}
//if (mAdManager != null) {
// return mAdManager.onTrigger(pEventType);
//}
return null;
}
//return null;
//}
/*Analytics Manager*/
private class analyticCallback implements eventObserver.eventListener {
@Override
public Object invokeObserver(List<Object> data, Object event_type) {
return null;
}
}
//private class analyticCallback implements eventObserver.eventListener {
// @Override
// public Object invokeObserver(List<Object> data, Object event_type) {
// return null;
//}
//}
public void onAnalyticsInvoke(List<Object> pData, pluginEnums.eAnalyticManager pEventType) {
if (mAnalyticsManager != null) {
mAnalyticsManager.onTrigger(pData, pEventType);
}
}
//public void onAnalyticsInvoke(List<Object> pData, pluginEnums.eAnalyticManager pEventType) {
//if (mAnalyticsManager != null) {
// mAnalyticsManager.onTrigger(pData, pEventType);
//}
//}
/*Download Manager*/
private class downloadCallback implements eventObserver.eventListener {

View File

@ -11,7 +11,7 @@
<View
android:id="@+id/adView"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_height="1dp"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
app:layout_constraintEnd_toEndOf="parent"
@ -484,6 +484,7 @@
android:contentDescription="@string/GENERAL_TODO"
android:onClick="onSupportSplash"
android:padding="6dp"
android:visibility="gone"
android:scaleType="fitCenter"
android:src="@xml/ic_baseline_support"
app:layout_constraintEnd_toEndOf="parent"
@ -615,6 +616,7 @@
android:contentDescription="@string/GENERAL_TODO"
android:onClick="onSupportSplash"
android:padding="7dp"
android:visibility="gone"
android:scaleType="fitCenter"
app:tint="@color/c_setting_icon_tint"
android:src="@xml/ic_baseline_support"

View File

@ -171,7 +171,7 @@
android:layout_marginEnd="15dp"
android:background="@color/c_home_side" />
<LinearLayout
<!--<LinearLayout
android:id="@+id/menu9"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -207,7 +207,7 @@
android:textColor="@color/c_text_home_menu"
android:textSize="15sp"
tools:ignore="RtlHardcoded,RtlSymmetry" />
</LinearLayout>
</LinearLayout>-->
<LinearLayout
android:id="@+id/menu7"

View File

@ -128,44 +128,6 @@
</LinearLayout>
<LinearLayout
android:id="@+id/pSearchSettingOption0"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@xml/gx_ripple_gray"
android:onClick="onSupport"
android:orientation="horizontal"
android:paddingTop="10dp"
android:paddingBottom="10dp">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="5dp"
android:layout_marginEnd="5dp"
android:contentDescription="@string/GENERAL_TODO"
android:padding="10dp"
android:src="@xml/ic_baseline_support"
app:tint="@color/c_setting_icon_tint" />
<Button
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="7"
android:alpha="1"
android:background="@android:color/transparent"
android:clickable="false"
android:paddingEnd="20dp"
android:text="@string/GENERAL_SUPPORT_ORION_BROWSER"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="@color/c_text_v1"
android:textSize="15sp"
tools:ignore="RtlSymmetry" />
</LinearLayout>
<View
android:id="@+id/view4"
android:layout_width="match_parent"
@ -292,76 +254,6 @@
android:layout_height="0dp"
android:background="@color/c_orbot_setting_divider" />
<LinearLayout
android:id="@+id/pSearchSettingOption4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:background="@xml/gx_ripple_gray"
android:onClick="onManageSearchEngine"
android:orientation="horizontal">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:padding="10dp"
android:layout_marginStart="5dp"
android:layout_marginEnd="5dp"
app:tint="@color/c_setting_icon_tint"
android:src="@xml/ic_baseline_search"
android:contentDescription="@string/GENERAL_TODO" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="6"
android:clickable="false"
android:orientation="vertical">
<Button
android:layout_width="match_parent"
android:textAlignment="textStart"
android:layout_height="20dp"
android:alpha="1"
android:background="@android:color/transparent"
android:clickable="false"
android:padding="0dp"
android:text="@string/SETTING_SEARCH"
android:textAllCaps="false"
android:textColor="@color/c_text_v1"
android:textSize="15sp"
tools:ignore="RtlSymmetry" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:alpha="1"
android:background="@android:color/transparent"
android:clickable="false"
android:padding="0dp"
android:text="@string/SETTING_SEARCH_INFO"
android:textAlignment="textStart"
android:textAllCaps="false"
android:textColor="#757575"
android:textSize="13.5sp"
tools:ignore="RtlSymmetry" />
</LinearLayout>
<ImageButton
android:layout_width="45dp"
android:layout_height="match_parent"
android:background="@android:color/transparent"
android:contentDescription="@string/GENERAL_TODO"
android:clickable="false"
android:layout_marginEnd="5dp"
android:src="@xml/ic_arrow_right"
app:tint="@color/c_navigation_tint" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="0dp"

View File

@ -8,7 +8,6 @@ buildscript {
google()
mavenCentral()
mavenLocal()
maven { url 'https://artifacts.applovin.com/android' }
maven { url "https://maven.mozilla.org/maven2" }
maven { url "https://nightly.maven.mozilla.org/maven2" }
}
@ -17,7 +16,6 @@ buildscript {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.google.gms:google-services:4.3.15'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.0"
classpath "com.applovin.quality:AppLovinQualityServiceGradlePlugin:+"
}
}