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