diff --git a/app/build.gradle b/app/build.gradle index 8aaefbcc..f180d94e 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -57,11 +57,11 @@ android { splits { abi { - enable project.ext.splitEnabled + //enable project.ext.splitEnabled - reset() + //reset() - include project.ext.abi_x86, project.ext.abi_x86_x64, project.ext.abi_arm64, project.ext.abi_armeabi + //include project.ext.abi_x86, project.ext.abi_x86_x64, project.ext.abi_arm64, project.ext.abi_armeabi } } bundle { @@ -127,7 +127,7 @@ dependencies { /* Automated APK Generation */ -android.applicationVariants.all { variant -> +/*android.applicationVariants.all { variant -> def buildType = variant.buildType.name @@ -152,7 +152,7 @@ android.applicationVariants.all { variant -> } } } - +*/ 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 96fdcba7..20883894 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 @@ -274,6 +274,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba if(status.mThemeApplying){ mGeckoClient.initRestore(mGeckoView, homeController.this); } + status.mThemeApplying = false; } public void initTor() { @@ -755,8 +756,8 @@ public class homeController extends AppCompatActivity implements ComponentCallba public void onReDrawGeckoview() { dataController.getInstance().invokeTab(dataEnums.eTabCommands.CLOSE_TAB, Arrays.asList(mGeckoClient.getSession(), mGeckoClient.getSession())); mGeckoClient.initializeSession(mGeckoView, new geckoViewCallback(), this); + mGeckoClient.onSaveCurrentTab(true, this); } - public void onExternalURLInvoke(String pData) { if (status.sSettingIsAppStarted) { activityContextManager.getInstance().onGoHome(); @@ -1969,8 +1970,21 @@ public class homeController extends AppCompatActivity implements ComponentCallba orbotLocalConstants.mSoftNotification = true; } + public void onReloadProxy(){ + if(!status.mThemeApplying && status.sSettingIsAppStarted && status.sTorBrowsing && status.sNotificaionStatus == 0){ + pluginController.getInstance().onOrbotInvoke(Collections.singletonList(status.mThemeApplying), pluginEnums.eOrbotManager.M_DESTROY); + new Handler().postDelayed(() -> + { + pluginController.getInstance().onOrbotInvoke(Arrays.asList(status.sBridgeCustomBridge, status.sBridgeGatewayManual, status.sBridgeCustomType, status.sBridgeStatus, status.sShowImages, status.sClearOnExit, dataController.getInstance().invokeBridges(dataEnums.eBridgeWebsiteCommands.M_FETCH, null)), pluginEnums.eOrbotManager.M_START_ORBOT); + }, 500); + } + } + @Override public void onResume() { + + onReloadProxy(); + if(status.sNotificaionStatus == 1){ onShowDefaultNotification(true); } diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/settingManager/notificationManager/settingNotificationModel.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/settingManager/notificationManager/settingNotificationModel.java index ce3d132f..5a5711d2 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/appManager/settingManager/notificationManager/settingNotificationModel.java +++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/settingManager/notificationManager/settingNotificationModel.java @@ -36,6 +36,7 @@ class settingNotificationModel { activityContextManager.getInstance().getHomeController().onShowDefaultNotification(true); } } + activityContextManager.getInstance().getHomeController().onReloadProxy(); } public Object onTrigger(settingNotificationEnums.eNotificationModel pCommands, List pData) { diff --git a/app/variables.gradle b/app/variables.gradle index 50582e91..906baf38 100755 --- a/app/variables.gradle +++ b/app/variables.gradle @@ -1,6 +1,6 @@ /* Version */ -project.ext.vname = 'Build | Dark-Origin 1.1.0.4' -project.ext.vcode = 540 +project.ext.vname = 'Build | Dark-Origin 1.1.0.5' +project.ext.vcode = 545 project.ext.buildType = 'release' project.ext.jvmTarget = "1.8" project.ext.applovin_key = "pCPe4EeU2ZQVwQPeHLgseRqHBX1V5pvo9Piuu4J809dRhadEgukXa1A8po_UeXu5hmPOTaP1v4QPaMKIEOhh50" diff --git a/build/kotlin/sessions/kotlin-compiler-5547377381595311531.salive b/build/kotlin/sessions/kotlin-compiler-5547377381595311531.salive new file mode 100644 index 00000000..e69de29b diff --git a/orbotmanager/src/main/java/org/torproject/android/service/OrbotService.java b/orbotmanager/src/main/java/org/torproject/android/service/OrbotService.java index 528faa1b..d3ce4692 100644 --- a/orbotmanager/src/main/java/org/torproject/android/service/OrbotService.java +++ b/orbotmanager/src/main/java/org/torproject/android/service/OrbotService.java @@ -318,7 +318,9 @@ public class OrbotService extends VpnService implements OrbotConstants { createNetworkStateReciever(); IntentFilter mNetworkStateFilter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION); - registerReceiver(mNetworkStateReceiver , mNetworkStateFilter); + try { + registerReceiver(mNetworkStateReceiver , mNetworkStateFilter); + }catch (Exception ex){} if (mCurrentStatus.equals(STATUS_OFF)) showToolbarNotification(getString(R.string.open_orbot_to_connect_to_tor), NOTIFY_ID, R.drawable.ic_stat_tor_off); self = this; @@ -335,6 +337,20 @@ public class OrbotService extends VpnService implements OrbotConstants { //showToolbarNotification(getString(R.string.open_orbot_to_connect_to_tor), NOTIFY_ID, R.mipmap.ic_stat_tor_logo); } + public void onUnRegister() { + try { + if(mNetworkStateReceiver!=null){ + unregisterReceiver(mNetworkStateReceiver); + } + if(mActionBroadcastReceiver!=null){ + unregisterReceiver(mActionBroadcastReceiver); + } + }catch (Exception ex){ + Log.i("sad","asd"); + ex.printStackTrace(); + } + } + @Override public void onDestroy() {