mirror of https://github.com/LeOS-GSI/LeOS-Genesis
parent
edcd452fcc
commit
8dd19543ca
|
@ -7,11 +7,11 @@
|
||||||
<deviceKey>
|
<deviceKey>
|
||||||
<Key>
|
<Key>
|
||||||
<type value="VIRTUAL_DEVICE_PATH" />
|
<type value="VIRTUAL_DEVICE_PATH" />
|
||||||
<value value="C:\Users\msman\.android\avd\Pixel_4_API_31_2.avd" />
|
<value value="C:\Users\msman\.android\avd\Pixel_2_API_33.avd" />
|
||||||
</Key>
|
</Key>
|
||||||
</deviceKey>
|
</deviceKey>
|
||||||
</Target>
|
</Target>
|
||||||
</targetSelectedWithDropDown>
|
</targetSelectedWithDropDown>
|
||||||
<timeTargetWasSelectedWithDropDown value="2022-08-18T13:09:12.710571200Z" />
|
<timeTargetWasSelectedWithDropDown value="2022-08-21T18:03:56.258272500Z" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
|
@ -108,9 +108,9 @@ dependencies {
|
||||||
|
|
||||||
/* Ads Manager */
|
/* Ads Manager */
|
||||||
|
|
||||||
implementation 'com.facebook.android:audience-network-sdk:6.8.0'
|
implementation 'com.applovin:applovin-sdk:+'
|
||||||
implementation 'com.applovin:applovin-sdk:11.3.1'
|
implementation 'com.applovin.mediation:mytarget-adapter:+'
|
||||||
implementation 'com.applovin.mediation:facebook-adapter:6.8.0.12'
|
implementation 'com.adcolony:sdk:4.8.0'
|
||||||
|
|
||||||
/* Orbot Service */
|
/* Orbot Service */
|
||||||
|
|
||||||
|
|
|
@ -80,10 +80,17 @@ public class activityContextManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public homeController getHomeController() {
|
public homeController getHomeController() {
|
||||||
if (pHomeController == null) {
|
try {
|
||||||
helperMethod.onStartApplication(pApplicationContext.get(), CONST_PACKAGE_NAME);
|
if (pHomeController == null) {
|
||||||
|
if(pApplicationContext == null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
helperMethod.onStartApplication(pApplicationContext.get(), CONST_PACKAGE_NAME);
|
||||||
|
}
|
||||||
|
return pHomeController.get();
|
||||||
|
}catch (Exception ex){
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
return pHomeController.get();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setApplicationContext(Context pContext) {
|
public void setApplicationContext(Context pContext) {
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class externalURLNavigationContoller extends AppCompatActivity {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
status.sExternalWebsiteLoading = true;
|
status.sExternalWebsiteLoading = true;
|
||||||
if (mData.toString().contains("applovin")) {
|
if (mData!=null && mData.toString().contains("applovin")) {
|
||||||
Intent myIntent = new Intent(this, advertController.class);
|
Intent myIntent = new Intent(this, advertController.class);
|
||||||
myIntent.putExtra(keys.ADVERT_URL, mData.toString());
|
myIntent.putExtra(keys.ADVERT_URL, mData.toString());
|
||||||
myIntent.addFlags(FLAG_ACTIVITY_NO_ANIMATION);
|
myIntent.addFlags(FLAG_ACTIVITY_NO_ANIMATION);
|
||||||
|
|
|
@ -144,7 +144,12 @@ final class geckoPromptView implements GeckoSession.PromptDelegate {
|
||||||
builder.setPositiveButton("Resend", listener);
|
builder.setPositiveButton("Resend", listener);
|
||||||
builder.setNegativeButton("Cancel", listener);
|
builder.setNegativeButton("Cancel", listener);
|
||||||
|
|
||||||
createStandardDialog(builder, prompt, res).show();
|
try {
|
||||||
|
if(!((Activity) builder.getContext()).isFinishing())
|
||||||
|
{
|
||||||
|
createStandardDialog(builder, prompt, res).show();
|
||||||
|
}
|
||||||
|
}catch (Exception ex){}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -517,7 +522,12 @@ final class geckoPromptView implements GeckoSession.PromptDelegate {
|
||||||
} else {
|
} else {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
dialog.show();
|
try {
|
||||||
|
if(!((Activity) builder.getContext()).isFinishing())
|
||||||
|
{
|
||||||
|
dialog.show();
|
||||||
|
}
|
||||||
|
}catch (Exception ex){}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -912,6 +912,9 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
mSearchbar.setOnEditorActionListener((v, actionId, event) ->
|
mSearchbar.setOnEditorActionListener((v, actionId, event) ->
|
||||||
{
|
{
|
||||||
if (actionId == EditorInfo.IME_ACTION_NEXT || actionId == EditorInfo.IME_ACTION_GO || actionId == EditorInfo.IME_ACTION_DONE) {
|
if (actionId == EditorInfo.IME_ACTION_NEXT || actionId == EditorInfo.IME_ACTION_GO || actionId == EditorInfo.IME_ACTION_DONE) {
|
||||||
|
if(mGeckoClient == null || mGeckoClient.getSession() == null){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
onSearchBarInvoked(v);
|
onSearchBarInvoked(v);
|
||||||
if (!mSearchBarPreviousText.equals(mSearchbar.getText())) {
|
if (!mSearchBarPreviousText.equals(mSearchbar.getText())) {
|
||||||
mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(), false, true, false);
|
mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(), false, true, false);
|
||||||
|
@ -1740,11 +1743,15 @@ public class homeController extends AppCompatActivity implements ComponentCallba
|
||||||
public void onStartApplication(View view) {
|
public void onStartApplication(View view) {
|
||||||
if (!mStateService) {
|
if (!mStateService) {
|
||||||
mStateService = true;
|
mStateService = true;
|
||||||
if (!isMyServiceRunning(activityStateManager.class)) {
|
try{
|
||||||
new Handler().postDelayed(() ->
|
if (!isMyServiceRunning(activityStateManager.class)) {
|
||||||
{
|
new Handler().postDelayed(() ->
|
||||||
startService(new Intent(this, activityStateManager.class));
|
{
|
||||||
}, 500);
|
startService(new Intent(this, activityStateManager.class));
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
|
}catch (Exception ex){
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,14 @@ package com.hiddenservices.onionservices.pluginManager.adPluginManager;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
|
|
||||||
|
import com.adcolony.sdk.AdColony;
|
||||||
|
import com.adcolony.sdk.AdColonyAppOptions;
|
||||||
import com.applovin.mediation.MaxAd;
|
import com.applovin.mediation.MaxAd;
|
||||||
import com.applovin.mediation.MaxAdViewAdListener;
|
import com.applovin.mediation.MaxAdViewAdListener;
|
||||||
import com.applovin.mediation.MaxError;
|
import com.applovin.mediation.MaxError;
|
||||||
import com.applovin.mediation.ads.MaxAdView;
|
import com.applovin.mediation.ads.MaxAdView;
|
||||||
import com.applovin.sdk.AppLovinSdk;
|
import com.applovin.sdk.AppLovinSdk;
|
||||||
import com.facebook.ads.AdSettings;
|
import com.hiddenservices.onionservices.appManager.activityContextManager;
|
||||||
import com.hiddenservices.onionservices.eventObserver;
|
import com.hiddenservices.onionservices.eventObserver;
|
||||||
import com.hiddenservices.onionservices.pluginManager.pluginEnums;
|
import com.hiddenservices.onionservices.pluginManager.pluginEnums;
|
||||||
|
|
||||||
|
@ -23,7 +25,6 @@ public class appLovinManager implements MaxAdViewAdListener {
|
||||||
private WeakReference<MaxAdView> mBannerAds;
|
private WeakReference<MaxAdView> mBannerAds;
|
||||||
|
|
||||||
private int mRequestCount = 0;
|
private int mRequestCount = 0;
|
||||||
private boolean bannerAdsLoaded = false;
|
|
||||||
private boolean bannerAdRequested = false;
|
private boolean bannerAdRequested = false;
|
||||||
|
|
||||||
/*Initializations*/
|
/*Initializations*/
|
||||||
|
@ -35,7 +36,9 @@ public class appLovinManager implements MaxAdViewAdListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initializeBannerAds(Context pContext) {
|
private void initializeBannerAds(Context pContext) {
|
||||||
AdSettings.setDataProcessingOptions(new String[]{});
|
AdColonyAppOptions appOptions = new AdColonyAppOptions();
|
||||||
|
AdColony.configure(activityContextManager.getInstance().getHomeController(), appOptions,"app3b56c67c45544c5c89");
|
||||||
|
|
||||||
AppLovinSdk.getInstance(pContext).setMediationProvider("max");
|
AppLovinSdk.getInstance(pContext).setMediationProvider("max");
|
||||||
AppLovinSdk.initializeSdk(pContext, configuration -> {
|
AppLovinSdk.initializeSdk(pContext, configuration -> {
|
||||||
});
|
});
|
||||||
|
@ -69,7 +72,6 @@ public class appLovinManager implements MaxAdViewAdListener {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onAdLoaded(MaxAd ad) {
|
public void onAdLoaded(MaxAd ad) {
|
||||||
bannerAdsLoaded = true;
|
|
||||||
mEvent.invokeObserver(null, M_ON_AD_LOAD);
|
mEvent.invokeObserver(null, M_ON_AD_LOAD);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* Version */
|
/* Version */
|
||||||
project.ext.vname = 'Build | Dark-Origin 1.0.5.5'
|
project.ext.vname = 'Build | Dark-Origin 1.0.5.6'
|
||||||
project.ext.vcode = 400
|
project.ext.vcode = 405
|
||||||
project.ext.buildType = 'release'
|
project.ext.buildType = 'release'
|
||||||
|
|
||||||
/* dimension */
|
/* dimension */
|
||||||
|
|
|
@ -3,3 +3,4 @@ android.enableJetifier=true
|
||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
org.gradle.jvmargs=-Xmx5048M
|
org.gradle.jvmargs=-Xmx5048M
|
||||||
android.disableAutomaticComponentCreation=true
|
android.disableAutomaticComponentCreation=true
|
||||||
|
android.bundle.enableUncompressedNativeLibs=false
|
||||||
|
|
|
@ -421,37 +421,26 @@ public class OrbotService extends VpnService implements OrbotConstants {
|
||||||
isDestroyed=true;
|
isDestroyed=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void stopTorAsync(boolean showNotification) {
|
private void stopTorAsync(boolean notification) {
|
||||||
debug("stopTor");
|
|
||||||
|
|
||||||
if (showNotification) sendCallbackLogMessage(getString(R.string.status_shutting_down));
|
Log.i("OrbotService", "stopTor");
|
||||||
|
try {
|
||||||
|
sendCallbackLogMessage(getString(R.string.status_shutting_down));
|
||||||
|
|
||||||
if (Prefs.bridgesEnabled()) {
|
|
||||||
if (useIPtObfsMeekProxy())
|
if (useIPtObfsMeekProxy())
|
||||||
IPtProxy.stopObfs4Proxy();
|
IPtProxy.stopObfs4Proxy();
|
||||||
else if (useIPtSnowflakeProxyDomainFronting())
|
|
||||||
IPtProxy.stopSnowflake();
|
stopTor();
|
||||||
}
|
|
||||||
else if (Prefs.beSnowflakeProxy())
|
//stop the foreground priority and make sure to remove the persistant notification
|
||||||
disableSnowflakeProxy();
|
stopForeground(true);
|
||||||
|
|
||||||
stopTor();
|
sendCallbackLogMessage(getString(R.string.status_disabled));
|
||||||
showToolbarNotification(getString(R.string.status_starting_up), NOTIFY_ID, R.drawable.ic_stat_starting_tor_logo);
|
} catch (Exception e) {
|
||||||
|
logNotice("An error occured stopping Tor: " + e.getMessage());
|
||||||
//stop the foreground priority and make sure to remove the persistent notification
|
sendCallbackLogMessage(getString(R.string.something_bad_happened));
|
||||||
stopForeground(!showNotification);
|
|
||||||
|
|
||||||
if (showNotification) sendCallbackLogMessage(getString(R.string.status_disabled));
|
|
||||||
|
|
||||||
mPortDns = -1;
|
|
||||||
mPortSOCKS = -1;
|
|
||||||
mPortHTTP = -1;
|
|
||||||
mPortTrans = -1;
|
|
||||||
|
|
||||||
if (!showNotification) {
|
|
||||||
clearNotifications();
|
|
||||||
stopSelf();
|
|
||||||
}
|
}
|
||||||
|
clearNotifications();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void stopTorOnError(String message) {
|
private void stopTorOnError(String message) {
|
||||||
|
@ -539,13 +528,25 @@ public class OrbotService extends VpnService implements OrbotConstants {
|
||||||
}
|
}
|
||||||
|
|
||||||
// if someone stops during startup, we may have to wait for the conn port to be setup, so we can properly shutdown tor
|
// if someone stops during startup, we may have to wait for the conn port to be setup, so we can properly shutdown tor
|
||||||
private void stopTor() {
|
private synchronized void stopTor() throws Exception {
|
||||||
if (shouldUnbindTorService) {
|
|
||||||
unbindService(torServiceConnection); //unbinding from the tor service will stop tor
|
if (conn != null) {
|
||||||
shouldUnbindTorService = false;
|
logNotice("Using control port to shutdown Tor");
|
||||||
conn = null;
|
|
||||||
} else {
|
try {
|
||||||
sendLocalStatusOffBroadcast();
|
logNotice("sending HALT signal to Tor process");
|
||||||
|
conn.shutdownTor(TorControlCommands.SIGNAL_SHUTDOWN);
|
||||||
|
|
||||||
|
if (shouldUnbindTorService) {
|
||||||
|
unbindService(torServiceConnection);
|
||||||
|
shouldUnbindTorService = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
conn = null;
|
||||||
|
|
||||||
|
} catch (IOException e) {
|
||||||
|
Log.d(OrbotConstants.TAG, "error shutting down Tor via connection", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1638,7 +1639,9 @@ public class OrbotService extends VpnService implements OrbotConstants {
|
||||||
}
|
}
|
||||||
case CMD_SETTING: {
|
case CMD_SETTING: {
|
||||||
onSettingRegister();
|
onSettingRegister();
|
||||||
sendBroadcast(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS));
|
try{
|
||||||
|
sendBroadcast(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS));
|
||||||
|
}catch (Exception ex){}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ACTION_STATUS: {
|
case ACTION_STATUS: {
|
||||||
|
|
Loading…
Reference in New Issue