diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml
new file mode 100644
index 00000000..3beb1542
--- /dev/null
+++ b/.idea/deploymentTargetDropDown.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.safedk/hashes.safedk b/.safedk/hashes.safedk
index b3404b22..2319d73c 100644
--- a/.safedk/hashes.safedk
+++ b/.safedk/hashes.safedk
@@ -1,3 +1,3 @@
-#Thu Dec 29 13:28:14 PKT 2022
+#Sun Jan 01 02:47:09 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=
-json=1845496062
+json=1692972943
diff --git a/.safedk/plugin.properties b/.safedk/plugin.properties
index 053d07f6..53831df6 100644
--- a/.safedk/plugin.properties
+++ b/.safedk/plugin.properties
@@ -1,5 +1,5 @@
#
-#Thu Dec 29 13:41:56 PKT 2022
+#Sun Jan 01 02:48:31 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.1
set_multidex=true
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index cfe7bbde..6a2c7301 100755
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -127,6 +127,11 @@
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:windowSoftInputMode="adjustPan" />
+
+
{
finishAndRemoveTask();
+ android.os.Process.killProcess(android.os.Process.myPid());
+ System.exit(1);
return null;
});
diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/externalCommandManager/externalURLNavigationContoller.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/externalCommandManager/externalURLNavigationContoller.java
index 64b8810c..3bece2c4 100644
--- a/app/src/main/java/com/hiddenservices/onionservices/appManager/externalCommandManager/externalURLNavigationContoller.java
+++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/externalCommandManager/externalURLNavigationContoller.java
@@ -9,6 +9,8 @@ import android.os.Bundle;
import android.os.Handler;
import androidx.annotation.RequiresApi;
import androidx.appcompat.app.AppCompatActivity;
+
+import com.example.myapplication.R;
import com.hiddenservices.onionservices.appManager.activityContextManager;
import com.hiddenservices.onionservices.appManager.advertManager.advertController;
import com.hiddenservices.onionservices.appManager.homeManager.homeController.homeController;
@@ -79,5 +81,6 @@ public class externalURLNavigationContoller extends AppCompatActivity {
}, 100);
finish();
+ overridePendingTransition(R.anim.fade_out , R.anim.fade_out);
}
}
\ No newline at end of file
diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/mediaDelegate.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/mediaDelegate.java
index 0434664b..b5ea05c4 100644
--- a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/mediaDelegate.java
+++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/mediaDelegate.java
@@ -4,6 +4,7 @@ package com.hiddenservices.onionservices.appManager.homeManager.geckoManager;
import static android.app.PendingIntent.FLAG_IMMUTABLE;
import static android.content.Context.NOTIFICATION_SERVICE;
import static com.hiddenservices.onionservices.appManager.homeManager.geckoManager.geckoPromptView.LOGTAG;
+
import android.app.Activity;
import android.app.Notification;
import android.app.NotificationChannel;
@@ -12,21 +13,17 @@ import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
-import android.graphics.Color;
import android.os.Build;
import android.util.Log;
import android.widget.RemoteViews;
-
import androidx.annotation.NonNull;
import androidx.core.app.NotificationCompat;
import androidx.core.app.NotificationManagerCompat;
import com.example.myapplication.R;
-import com.hiddenservices.onionservices.appManager.homeManager.homeController.homeController;
import com.hiddenservices.onionservices.constants.status;
import com.hiddenservices.onionservices.helperManager.helperMethod;
import com.hiddenservices.onionservices.pluginManager.pluginReciever.mediaNotificationReciever;
import org.mozilla.geckoview.GeckoSession;
-import org.mozilla.geckoview.Image;
public class mediaDelegate implements GeckoSession.MediaDelegate {
private Integer mLastNotificationId = 100;
@@ -113,14 +110,17 @@ public class mediaDelegate implements GeckoSession.MediaDelegate {
return;
}
RemoteViews contentView;
- if (android.os.Build.VERSION. SDK_INT > Build.VERSION_CODES.N_MR1 ) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S ) {
+ contentView = new RemoteViews(context.getPackageName() , R.layout. media_notification_no_background ) ;
+ }else if (android.os.Build.VERSION. SDK_INT > Build.VERSION_CODES.N_MR1){
contentView = new RemoteViews(context.getPackageName() , R.layout. media_notification_layout ) ;
}else {
contentView = new RemoteViews(context.getPackageName() , R.layout. media_notification_layout_small ) ;
}
-
- contentView.setInt(R.id.layout,"setBackgroundResource", R.color.c_tab_background);
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S ) {
+ contentView.setInt(R.id.layout,"setBackgroundResource", R.color.c_tab_background);
+ }
contentView.setTextViewText(R.id.header, title);
contentView.setTextViewText(R.id.body, "☍ " + url);
@@ -133,11 +133,19 @@ public class mediaDelegate implements GeckoSession.MediaDelegate {
if (not_status){
PendingIntent pIntent = helperMethod.onCreateActionIntent(context, mediaNotificationReciever.class, 1030, "media_play", 0);
contentView.setOnClickPendingIntent(R.id.trigger, pIntent);
- contentView.setImageViewResource(R.id.trigger, R.drawable.ic_baseline_play_arrow);
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S ) {
+ contentView.setImageViewResource(R.id.trigger, R.drawable.ic_baseline_play_arrow_no_tint);
+ }else {
+ contentView.setImageViewResource(R.id.trigger, R.drawable.ic_baseline_play_arrow);
+ }
}else {
PendingIntent pIntent = helperMethod.onCreateActionIntent(context, mediaNotificationReciever.class, 1030, "media_pause", 1);
contentView.setOnClickPendingIntent(R.id.trigger, pIntent);
- contentView.setImageViewResource(R.id.trigger, R.drawable.ic_baseline_pause);
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S ) {
+ contentView.setImageViewResource(R.id.trigger, R.drawable.ic_baseline_pause_no_tint);
+ }else {
+ contentView.setImageViewResource(R.id.trigger, R.drawable.ic_baseline_pause);
+ }
}
PendingIntent pIntentPrev = helperMethod.onCreateActionIntent(context, mediaNotificationReciever.class, 1030, "media_next", 2);
@@ -150,11 +158,16 @@ public class mediaDelegate implements GeckoSession.MediaDelegate {
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(mContext, "1030" ) ;
- mBuilder.setContent(contentView) ;
mBuilder.setPriority(Notification.PRIORITY_LOW);
mBuilder.setAutoCancel(true);
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S){
+ mBuilder.setCustomBigContentView(contentView);
+ mBuilder.setStyle(new NotificationCompat.DecoratedCustomViewStyle());
+ }else {
+ mBuilder.setContent(contentView);
+ }
- mBuilder.setSmallIcon(R.drawable.ic_genesis_logo ) ;
+ mBuilder.setSmallIcon(R.drawable.ic_baseline_media) ;
mBuilder.setAutoCancel( true ) ;
if (android.os.Build.VERSION. SDK_INT >= android.os.Build.VERSION_CODES. O ) {
int importance = NotificationManager.IMPORTANCE_LOW ;
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 736bcc0b..1e186e2d 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
@@ -225,6 +225,8 @@ public class homeController extends AppCompatActivity implements ComponentCallba
@RequiresApi(api = Build.VERSION_CODES.M)
@Override
protected void onCreate(Bundle savedInstanceState) {
+ orbotLocalConstants.mAppForceExit = false;
+ orbotLocalConstants.mForcedQuit = false;
onInitTheme();
onInitBooleans();
orbotLocalConstants.mHomeIntent = getIntent();
@@ -262,7 +264,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba
initBundle();
initTor();
initNotification();
- onHideDefaultNotification();
}
public void initNotification() {
@@ -578,6 +579,12 @@ public class homeController extends AppCompatActivity implements ComponentCallba
public void initPreFixes() {
try {
+ if(status.mThemeApplying){
+ onShowDefaultNotification();
+ }else {
+ onHideDefaultNotification();
+ }
+
String strManufacturer = android.os.Build.MANUFACTURER;
if ((Build.VERSION.SDK_INT == Build.VERSION_CODES.O || Build.VERSION.SDK_INT == Build.VERSION_CODES.O_MR1) && strManufacturer.equals("samsung")) {
PackageManager packageManager = getApplicationContext().getPackageManager();
@@ -832,11 +839,17 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mGeckoClient.onClearAll();
status.sSettingIsAppStarted = false;
orbotLocalConstants.mAppStarted = false;
+ new Handler().postDelayed(() ->
+ {
+ android.os.Process.killProcess(android.os.Process.myPid());
+ System.exit(1);
+ }, 100);
+
}
NotificationManager manager = null;
public void showDefaultNotification(Context context, String title) {
- if(status.sTorBrowsing && status.sBridgeNotificationManual != 0){
+ if(!status.mThemeApplying && status.sTorBrowsing && status.sBridgeNotificationManual != 0){
return;
}
@@ -889,7 +902,11 @@ public class homeController extends AppCompatActivity implements ComponentCallba
}
notification.fullScreenIntent = dummyIntent;
- notification.flags |= Notification.FLAG_NO_CLEAR;
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU){
+ notification.flags = Notification.FLAG_AUTO_CANCEL|Notification.FLAG_ONGOING_EVENT;
+ }else {
+ notification.flags |= Notification.FLAG_NO_CLEAR;
+ }
int notificationCode = 1025;
@@ -900,7 +917,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba
@Override
public void onReceive(Context context, Intent intent) {
long id = intent.getLongExtra(DownloadManager.EXTRA_DOWNLOAD_ID, -1);
-
DownloadManager dMgr = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);
Cursor c = Objects.requireNonNull(dMgr).query(new DownloadManager.Query().setFilterById(id));
@@ -958,13 +974,17 @@ public class homeController extends AppCompatActivity implements ComponentCallba
@SuppressLint("ClickableViewAccessibility")
@Override
protected void onDestroy() {
+ status.sNoTorTriggered = false;
+ orbotLocalConstants.mAppForceExit = true;
NotificationManagerCompat.from(this).cancel(1030);
if(manager!=null){
manager.cancel(1025);
}
NotificationManagerCompat.from(this).cancel(1025);
- mGeckoClient.getSession().onDestroyMedia();
- onHideDefaultNotification();
+ if(mGeckoClient.getSession() !=null){
+ mGeckoClient.getSession().onDestroyMedia();
+ onHideDefaultNotification();
+ }
pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_DESTROY);
if (!status.sSettingIsAppStarted) {
super.onDestroy();
@@ -993,6 +1013,16 @@ public class homeController extends AppCompatActivity implements ComponentCallba
activityContextManager.getInstance().getHomeController().onResetData();
NotificationManagerCompat.from(this).cancel(1030);
+
+ if (!status.mThemeApplying) {
+ new Handler().postDelayed(() ->
+ {
+ android.os.Process.killProcess(android.os.Process.myPid());
+ System.exit(1);
+ }, 100);
+ finishAffinity();
+ finishAndRemoveTask();
+ }
super.onDestroy();
}
@@ -1686,6 +1716,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
@Override
public void onResume() {
+ orbotLocalConstants.mAppForceExit = false;
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_RESUME);
activityContextManager.getInstance().setCurrentActivity(this);
@@ -1932,7 +1963,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
{
if(!mBackground){
Intent intent = new Intent(this, activityStateManager.class);
- bindService(intent, connection, 0);
+ bindService(intent, connection, BIND_AUTO_CREATE);
startService(intent);
}
}, 500);
@@ -1965,7 +1996,10 @@ public class homeController extends AppCompatActivity implements ComponentCallba
pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_DISABLE_NOTIFICATION);
activityContextManager.getInstance().getHomeController().onShowDefaultNotification();
} else {
- pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_ENABLE_NOTIFICATION);
+ new Handler().postDelayed(() ->
+ {
+ pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_ENABLE_NOTIFICATION);
+ }, 2000);
}
}
@@ -2174,6 +2208,12 @@ public class homeController extends AppCompatActivity implements ComponentCallba
status.sSettingIsAppStarted = false;
orbotLocalConstants.mAppStarted = false;
+ new Handler().postDelayed(() ->
+ {
+ android.os.Process.killProcess(android.os.Process.myPid());
+ System.exit(1);
+ }, 100);
+
} else if (menuId == R.id.pMenuFind) {
helperMethod.hideKeyboard(this);
mHomeViewController.onUpdateFindBar(true);
@@ -2237,6 +2277,15 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mHomeViewController.closeMenu();
}
+ public void onNewCircuitInvoked(){
+ try {
+ pluginController.getInstance().onOrbotInvoke(null, pluginEnums.eOrbotManager.M_NEW_CIRCUIT);
+ pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(this), M_NEW_IDENTITY);
+ mGeckoClient.onReloadDelay(mGeckoView, this, false);
+ onLoadURL(mSearchbar.getText().toString());
+ }catch (Exception ex){}
+ }
+
private void onInitTheme() {
if (status.sSettingIsAppStarted) {
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 11e5e9a1..84629cca 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
@@ -1345,8 +1345,10 @@ class homeViewController {
}
void progressBarReset() {
- mProgressBar.setProgress(0);
- mProgressBar.setVisibility(View.INVISIBLE);
+ if(mSearchbar.getText().toString().equals("about:blank")){
+ mProgressBar.setProgress(0);
+ mProgressBar.setVisibility(View.INVISIBLE);
+ }
}
public void onFirstPaint() {
@@ -1440,6 +1442,11 @@ class homeViewController {
alpha.start();
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP_MR1) {
+ final Handler handler = new Handler();
+ handler.postDelayed(() -> {
+ mEvent.invokeObserver(data, e_type);
+ }, 450);
+
scaleDown.addListener(new Animator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animation, boolean isReverse) {
@@ -1447,6 +1454,8 @@ class homeViewController {
@Override
public void onAnimationEnd(Animator animation, boolean isReverse) {
+ scaleDown.removeAllListeners();
+ handler.removeCallbacksAndMessages(null);
mEvent.invokeObserver(data, e_type);
}
@@ -1456,15 +1465,18 @@ class homeViewController {
@Override
public void onAnimationEnd(Animator animation) {
+ //scaleDown.removeAllListeners();
+ //mEvent.invokeObserver(data, e_type);
}
@Override
public void onAnimationCancel(Animator animation) {
-
+ Log.i("","");
}
@Override
public void onAnimationRepeat(Animator animation) {
+ Log.i("","");
}
});
}else {
diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/orbotRequestManager.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/orbotRequestManager.java
new file mode 100644
index 00000000..82cfc10e
--- /dev/null
+++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/orbotRequestManager.java
@@ -0,0 +1,44 @@
+package com.hiddenservices.onionservices.appManager;
+
+import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
+
+import static com.hiddenservices.onionservices.constants.keys.EXTERNAL_SHORTCUT_COMMAND_NAVIGATE;
+
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import androidx.appcompat.app.AppCompatActivity;
+
+import com.hiddenservices.onionservices.appManager.homeManager.homeController.homeController;
+import com.hiddenservices.onionservices.constants.constants;
+import com.hiddenservices.onionservices.constants.status;
+import com.hiddenservices.onionservices.helperManager.helperMethod;
+
+import org.torproject.android.service.wrapper.orbotExternalCommands;
+
+public class orbotRequestManager extends AppCompatActivity{
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ finish();
+
+ int m_command = getIntent().getIntExtra("command", 0);
+ if(m_command == orbotExternalCommands.S_NEW_CIRCUIT){
+ Intent mIntent = new Intent(this, homeController.class);
+ helperMethod.openIntent(mIntent, this, constants.CONST_LIST_EXTERNAL_SHORTCUT);
+ activityContextManager.getInstance().getHomeController().onNewCircuitInvoked();
+ }
+ else if(m_command == orbotExternalCommands.S_NOTIFICATION_SETTINGS){
+ try {
+ Intent intent;
+ intent = new Intent(this, Class.forName("com.hiddenservices.onionservices.appManager.settingManager.notificationManager.settingNotificationController"));
+ intent.setFlags(FLAG_ACTIVITY_NEW_TASK);
+ getApplicationContext().startActivity(intent);
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+}
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 01303e0f..006d0a42 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
@@ -1,5 +1,7 @@
package com.hiddenservices.onionservices.appManager.settingManager.searchEngineManager;
+import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eMessageManager.M_GENESIS_SEARCH_DISABLED;
+
import android.content.res.Configuration;
import android.os.Bundle;
import android.view.View;
@@ -130,6 +132,9 @@ public class settingSearchController extends AppCompatActivity {
public void onSelectSearchEngine(View view) {
if (view.getId() == R.id.pSearchSettingOption1) {
+ if(!status.sTorBrowsing){
+ pluginController.getInstance().onMessageManagerInvoke(Collections.singletonList(this), M_GENESIS_SEARCH_DISABLED);
+ }
mSettingSearchModel.onTrigger(settingSearchEnums.eSearchModel.M_SET_SEARCH_ENGINE, Collections.singletonList(constants.CONST_BACKEND_GENESIS_URL));
dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_STRING, Arrays.asList(keys.SETTING_SEARCH_ENGINE, status.sSettingDefaultSearchEngine));
} else if (view.getId() == R.id.pSearchSettingOption2) {
diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/settingManager/searchEngineManager/settingSearchViewController.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/settingManager/searchEngineManager/settingSearchViewController.java
index f822e5c2..a044604d 100644
--- a/app/src/main/java/com/hiddenservices/onionservices/appManager/settingManager/searchEngineManager/settingSearchViewController.java
+++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/settingManager/searchEngineManager/settingSearchViewController.java
@@ -1,5 +1,8 @@
package com.hiddenservices.onionservices.appManager.settingManager.searchEngineManager;
+import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eMessageManager.M_GENESIS_SEARCH_DISABLED;
+import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eMessageManager.M_MAX_TAB_REACHED;
+
import android.content.res.ColorStateList;
import android.os.Build;
import android.view.View;
@@ -17,8 +20,10 @@ import com.hiddenservices.onionservices.constants.status;
import com.hiddenservices.onionservices.eventObserver;
import com.example.myapplication.R;
import com.google.android.material.switchmaterial.SwitchMaterial;
+import com.hiddenservices.onionservices.pluginManager.pluginController;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
class settingSearchViewController {
@@ -65,7 +70,7 @@ class settingSearchViewController {
}
if (!status.sTorBrowsing) {
- mSearchSettingOption1.setVisibility(View.GONE);
+ mSearchSettingOption1.setAlpha(0.3f);
}
}
diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/tabManager/tabAdapter.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/tabManager/tabAdapter.java
index 752c9f3e..2da875d4 100644
--- a/app/src/main/java/com/hiddenservices/onionservices/appManager/tabManager/tabAdapter.java
+++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/tabManager/tabAdapter.java
@@ -407,10 +407,13 @@ public class tabAdapter extends RecyclerView.Adapter
new Handler().postDelayed(() ->
{
+ ImageButton mOrbotRowRemove = itemView.findViewById(R.id.pOrbotRowRemove);
itemView.setBackgroundColor(ContextCompat.getColor(activityContextManager.getInstance().getHomeController(), R.color.clear_alpha));
+ mOrbotRowRemove.setBackgroundColor(ContextCompat.getColor(itemView.getContext(), R.color.c_background));
if (!status.sTabGridLayoutEnabled) {
if (getLayoutPosition() == 0) {
itemView.setBackgroundColor(ContextCompat.getColor(activityContextManager.getInstance().getHomeController(), R.color.c_list_item_current));
+ mOrbotRowRemove.setBackgroundColor(ContextCompat.getColor(itemView.getContext(), R.color.c_list_item_current));
}
}
diff --git a/app/src/main/java/com/hiddenservices/onionservices/helperManager/helperMethod.java b/app/src/main/java/com/hiddenservices/onionservices/helperManager/helperMethod.java
index bf0eac7f..f57b58b4 100644
--- a/app/src/main/java/com/hiddenservices/onionservices/helperManager/helperMethod.java
+++ b/app/src/main/java/com/hiddenservices/onionservices/helperManager/helperMethod.java
@@ -1112,6 +1112,7 @@ public class helperMethod {
activityContextManager.getInstance().getHomeController().overridePendingTransition(R.anim.popup_scale_in, R.anim.popup_scale_out);
}
});
+
Runtime.getRuntime().exit(0);
System.exit(1);
}
diff --git a/app/src/main/java/com/hiddenservices/onionservices/pluginManager/adPluginManager/appLovinManager.java b/app/src/main/java/com/hiddenservices/onionservices/pluginManager/adPluginManager/appLovinManager.java
index 0554cad8..48f741ab 100644
--- a/app/src/main/java/com/hiddenservices/onionservices/pluginManager/adPluginManager/appLovinManager.java
+++ b/app/src/main/java/com/hiddenservices/onionservices/pluginManager/adPluginManager/appLovinManager.java
@@ -104,7 +104,7 @@ public class appLovinManager implements MaxAdViewAdListener {
public void onAdLoadFailed(String adUnitId, MaxError error) {
new Handler().postDelayed(() ->
{
- if (mRequestCount <= 10) {
+ if (mRequestCount <= 50) {
mRequestCount += 1;
bannerAdRequested = true;
mBannerAds.get().loadAd();
diff --git a/app/src/main/java/com/hiddenservices/onionservices/pluginManager/messagePluginManager/messageManager.java b/app/src/main/java/com/hiddenservices/onionservices/pluginManager/messagePluginManager/messageManager.java
index 652f0ab1..db29e325 100644
--- a/app/src/main/java/com/hiddenservices/onionservices/pluginManager/messagePluginManager/messageManager.java
+++ b/app/src/main/java/com/hiddenservices/onionservices/pluginManager/messagePluginManager/messageManager.java
@@ -866,6 +866,11 @@ public class messageManager implements View.OnClickListener, DialogInterface.OnD
onShowToast(R.layout.popup_toast_generic, R.xml.ax_background_generic, 1000, mContext.getString(R.string.TOAST_ALERT_URL_COPIED), mContext.getString(R.string.ALERT_DISMISS), null);
break;
+ case M_GENESIS_SEARCH_DISABLED:
+ /*VERIFIED*/
+ onShowToast(R.layout.popup_toast_warning, R.xml.ax_background_warning, 2000, "Warning! Start Browser with tor browsing enabled", mContext.getString(R.string.ALERT_DISMISS), null);
+ break;
+
case M_UPDATE_BOOKMARK:
/*VERIFIED*/
onShowToast(R.layout.popup_toast_generic, R.xml.ax_background_generic, 2000, mContext.getString(R.string.TOAST_ALERT_BOOKMARK_UPDATE), mContext.getString(R.string.ALERT_DISMISS), 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 00206f89..24c66f4a 100644
--- a/app/src/main/java/com/hiddenservices/onionservices/pluginManager/pluginEnums.java
+++ b/app/src/main/java/com/hiddenservices/onionservices/pluginManager/pluginEnums.java
@@ -26,7 +26,7 @@ public class pluginEnums {
/*Message Manager*/
public enum eMessageManager {
- M_RESET, M_DATA_CLEARED, M_COPY, M_APPLICATION_CRASH, M_DELETE_BOOKMARK, M_UPDATE_BOOKMARK, M_IMAGE_UPDATE, M_OPEN_ACTIVITY_FAILED, M_OPEN_CICADA, M_TOR_SWITCH, M_SECURE_CONNECTION, M_SECURITY_INFO, M_POPUP_BLOCKED, M_PANIC, M_MAX_TAB_REACHED, M_ORBOT_LOADING, M_LOAD_NEW_TAB, M_UNDO, M_DOWNLOAD_SINGLE, M_UPDATE_BRIDGES, M_NEW_IDENTITY, M_NOT_SUPPORTED, M_BRIDGE_MAIL, M_LONG_PRESS_WITH_LINK, M_LONG_PRESS_URL, M_LONG_PRESS_DOWNLOAD, M_START_ORBOT, M_DOWNLOAD_FAILURE, M_DOWNLOAD_FILE, M_RATE_APP, M_REPORT_URL, M_CLEAR_BOOKMARK, M_CLEAR_HISTORY, M_BOOKMARK, M_PANIC_RESET, M_DEFAULT_BROWSER, M_TOR_SWITCH_RESTART, M_RATE_SUCCESS, M_RATE_FAILURE, M_CLOSE, M_LANGUAGE_SUPPORT_FAILURE, M_WELCOME
+ M_RESET, M_DATA_CLEARED, M_COPY, M_APPLICATION_CRASH, M_DELETE_BOOKMARK, M_UPDATE_BOOKMARK, M_IMAGE_UPDATE, M_OPEN_ACTIVITY_FAILED, M_OPEN_CICADA, M_TOR_SWITCH, M_SECURE_CONNECTION, M_SECURITY_INFO, M_POPUP_BLOCKED, M_PANIC, M_MAX_TAB_REACHED, M_ORBOT_LOADING, M_GENESIS_SEARCH_DISABLED, M_LOAD_NEW_TAB, M_UNDO, M_DOWNLOAD_SINGLE, M_UPDATE_BRIDGES, M_NEW_IDENTITY, M_NOT_SUPPORTED, M_BRIDGE_MAIL, M_LONG_PRESS_WITH_LINK, M_LONG_PRESS_URL, M_LONG_PRESS_DOWNLOAD, M_START_ORBOT, M_DOWNLOAD_FAILURE, M_DOWNLOAD_FILE, M_RATE_APP, M_REPORT_URL, M_CLEAR_BOOKMARK, M_CLEAR_HISTORY, M_BOOKMARK, M_PANIC_RESET, M_DEFAULT_BROWSER, M_TOR_SWITCH_RESTART, M_RATE_SUCCESS, M_RATE_FAILURE, M_CLOSE, M_LANGUAGE_SUPPORT_FAILURE, M_WELCOME
}
public enum eMessageManagerCallbacks {
diff --git a/app/src/main/res/custom-xml/alert/xml/ax_background_warning.xml b/app/src/main/res/custom-xml/alert/xml/ax_background_warning.xml
new file mode 100644
index 00000000..f5cc79e0
--- /dev/null
+++ b/app/src/main/res/custom-xml/alert/xml/ax_background_warning.xml
@@ -0,0 +1,25 @@
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable-hdpi/splashlogoclip.png b/app/src/main/res/drawable-hdpi/splashlogoclip.png
index e3b1d62c..648988c7 100644
Binary files a/app/src/main/res/drawable-hdpi/splashlogoclip.png and b/app/src/main/res/drawable-hdpi/splashlogoclip.png differ
diff --git a/app/src/main/res/drawable-mdpi/splashlogoclip.png b/app/src/main/res/drawable-mdpi/splashlogoclip.png
index b0544ade..08ee5df2 100644
Binary files a/app/src/main/res/drawable-mdpi/splashlogoclip.png and b/app/src/main/res/drawable-mdpi/splashlogoclip.png differ
diff --git a/app/src/main/res/drawable-xhdpi/splashlogoclip.png b/app/src/main/res/drawable-xhdpi/splashlogoclip.png
index 992475b5..a4c84603 100644
Binary files a/app/src/main/res/drawable-xhdpi/splashlogoclip.png and b/app/src/main/res/drawable-xhdpi/splashlogoclip.png differ
diff --git a/app/src/main/res/drawable/ic_baseline_media.xml b/app/src/main/res/drawable/ic_baseline_media.xml
new file mode 100644
index 00000000..35ffb01e
--- /dev/null
+++ b/app/src/main/res/drawable/ic_baseline_media.xml
@@ -0,0 +1,5 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_baseline_pause_no_tint.xml b/app/src/main/res/drawable/ic_baseline_pause_no_tint.xml
new file mode 100644
index 00000000..9334460d
--- /dev/null
+++ b/app/src/main/res/drawable/ic_baseline_pause_no_tint.xml
@@ -0,0 +1,5 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_baseline_play_arrow_no_tint.xml b/app/src/main/res/drawable/ic_baseline_play_arrow_no_tint.xml
new file mode 100644
index 00000000..b9c59a00
--- /dev/null
+++ b/app/src/main/res/drawable/ic_baseline_play_arrow_no_tint.xml
@@ -0,0 +1,5 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_baseline_skip_next_no_tint.xml b/app/src/main/res/drawable/ic_baseline_skip_next_no_tint.xml
new file mode 100644
index 00000000..cd890c57
--- /dev/null
+++ b/app/src/main/res/drawable/ic_baseline_skip_next_no_tint.xml
@@ -0,0 +1,5 @@
+
+
+
diff --git a/app/src/main/res/layouts/alert/layout/popup_toast_warning.xml b/app/src/main/res/layouts/alert/layout/popup_toast_warning.xml
new file mode 100644
index 00000000..ed048b0a
--- /dev/null
+++ b/app/src/main/res/layouts/alert/layout/popup_toast_warning.xml
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layouts/home/layout/media_notification_no_background.xml b/app/src/main/res/layouts/home/layout/media_notification_no_background.xml
new file mode 100644
index 00000000..ccc9f055
--- /dev/null
+++ b/app/src/main/res/layouts/home/layout/media_notification_no_background.xml
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layouts/tab/layout/tab_row_view.xml b/app/src/main/res/layouts/tab/layout/tab_row_view.xml
index aedba878..b9e2a43b 100644
--- a/app/src/main/res/layouts/tab/layout/tab_row_view.xml
+++ b/app/src/main/res/layouts/tab/layout/tab_row_view.xml
@@ -191,15 +191,17 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
- android:background="@xml/hx_border"
android:contentDescription="@string/GENERAL_TODO"
android:longClickable="true"
android:padding="20dp"
android:paddingTop="22dp"
+ android:background="@color/c_background"
android:paddingBottom="22dp"
+ android:foreground="?attr/selectableItemBackgroundBorderless"
android:scaleType="fitCenter"
android:src="@xml/ic_baseline_cross"
android:translationZ="10dp"
+ android:outlineProvider="none"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:tint="@color/c_navigation_tint"
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index ff2fe803..77048438 100755
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -194,6 +194,7 @@
#ffffff
#ffc107
#997300
+ #cc7a00
#ffffff
#00d9ff
#00a4fd
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 673513fa..41fac2ee 100644
--- a/orbotmanager/src/main/java/org/torproject/android/service/OrbotService.java
+++ b/orbotmanager/src/main/java/org/torproject/android/service/OrbotService.java
@@ -31,6 +31,7 @@ import android.net.NetworkInfo;
import android.net.Uri;
import android.net.VpnService;
import android.os.Build;
+import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.provider.BaseColumns;
@@ -41,6 +42,7 @@ import net.freehaven.tor.control.TorControlCommands;
import net.freehaven.tor.control.TorControlConnection;
import org.torproject.android.service.wrapper.localHelperMethod;
import org.torproject.android.service.wrapper.logRowModel;
+import org.torproject.android.service.wrapper.orbotExternalCommands;
import org.torproject.android.service.wrapper.orbotLocalConstants;
import org.torproject.android.service.util.CustomTorResourceInstaller;
import org.torproject.android.service.util.Prefs;
@@ -184,8 +186,8 @@ public class OrbotService extends VpnService implements OrbotConstants {
boolean mToolbarUpdating = false;
@SuppressLint({"NewApi", "RestrictedApi"})
- public void showToolbarNotification(String notifyMsg, int notifyType, int icon) {
- if(!mToolbarUpdating && orbotLocalConstants.mNotificationStatus != 0 && orbotLocalConstants.mAppStarted){
+ public void showToolbarNotification(String notifyMsg, int notifyType, int icon, boolean forced) {
+ if(!mToolbarUpdating && orbotLocalConstants.mNotificationStatus != 0 && (orbotLocalConstants.mAppStarted || forced)){
mToolbarUpdating = true;
}else {
return;
@@ -251,7 +253,7 @@ public class OrbotService extends VpnService implements OrbotConstants {
}
public int onStartCommand(Intent intent, int flags, int startId) {
- showToolbarNotification(getString(org.torproject.android.service.R.string.newnym), NOTIFY_ID, org.torproject.android.service.R.drawable.ic_stat_starting_tor_logo);
+ showToolbarNotification("orbot is connecting please wait!", NOTIFY_ID, org.torproject.android.service.R.drawable.ic_stat_starting_tor_logo, false);
createNetworkStateReciever();
IntentFilter mNetworkStateFilter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION);
@@ -345,8 +347,8 @@ public class OrbotService extends VpnService implements OrbotConstants {
//sendCallbackStatus(STATUS_OFF);
orbotLocalConstants.mTorLogsStatus = "No internet connection";
if(orbotLocalConstants.mNotificationStatus!=0 && orbotLocalConstants.mAppStarted){
- showToolbarNotification(getString(R.string.newnym), getNotifyId(), R.drawable.ic_stat_tor_off);
- showToolbarNotification("Genesis is sleeping | Internet connectivity issue",NOTIFY_ID,R.drawable.ic_stat_tor_off);
+ showToolbarNotification(getString(R.string.newnym), getNotifyId(), R.drawable.ic_stat_tor_off, false);
+ showToolbarNotification("Genesis is sleeping | Internet connectivity issue",NOTIFY_ID,R.drawable.ic_stat_tor_off, false);
}
}
else
@@ -354,7 +356,7 @@ public class OrbotService extends VpnService implements OrbotConstants {
//sendCallbackStatus(STATUS_STARTING);
if(orbotLocalConstants.mNotificationStatus!=0 && orbotLocalConstants.mAppStarted){
- showToolbarNotification(getString(R.string.status_starting_up),NOTIFY_ID,R.drawable.ic_stat_starting_tor_logo);
+ showToolbarNotification(getString(R.string.status_starting_up),NOTIFY_ID,R.drawable.ic_stat_starting_tor_logo, false);
}
}
@@ -406,13 +408,16 @@ public class OrbotService extends VpnService implements OrbotConstants {
public void enableTorNotificationNoBandwidth(){
orbotLocalConstants.mNotificationStatus = 1;
- showToolbarNotification("Connected to the Tor network", HS_NOTIFY_ID, R.mipmap.ic_stat_tor_logo);
+ showToolbarNotification("Connected to the Tor network", HS_NOTIFY_ID, R.mipmap.ic_stat_tor_logo, false);
}
public void enableNotification(){
if(mConnectivity && orbotLocalConstants.mIsTorInitialized){
orbotLocalConstants.mNotificationStatus = 1;
- showToolbarNotification(0+"kbps ⇣ / " +0+"kbps ⇡", HS_NOTIFY_ID, R.mipmap.ic_stat_tor_logo);
+ showToolbarNotification(0+"kbps ⇣ / " +0+"kbps ⇡", HS_NOTIFY_ID, R.mipmap.ic_stat_tor_logo, false);
+ }
+ else {
+ showToolbarNotification("orbot is connecting please wait!", NOTIFY_ID, org.torproject.android.service.R.drawable.ic_stat_starting_tor_logo, true);
}
}
@@ -447,7 +452,7 @@ public class OrbotService extends VpnService implements OrbotConstants {
stopTorAsync(false);
showToolbarNotification(
getString(R.string.unable_to_start_tor) + ": " + message,
- ERROR_NOTIFY_ID, R.drawable.ic_stat_notifyerr);
+ ERROR_NOTIFY_ID, R.drawable.ic_stat_notifyerr, false);
}
private static boolean useIPtObfsMeekProxy() {
@@ -824,7 +829,7 @@ public class OrbotService extends VpnService implements OrbotConstants {
if(orbotLocalConstants.mNotificationStatus != 0 && orbotLocalConstants.mAppStarted ) {
mNotifyBuilder.setProgress(100, 0, false);
}
- showToolbarNotification("", NOTIFY_ID, R.mipmap.ic_stat_tor_logo);
+ showToolbarNotification("", NOTIFY_ID, R.mipmap.ic_stat_tor_logo, false);
startTorService();
@@ -1052,7 +1057,7 @@ public class OrbotService extends VpnService implements OrbotConstants {
try {
if (conn != null && mCurrentStatus.equals(STATUS_ON)) {
mNotifyBuilder.setSubText(null); // clear previous exit node info if present
- showToolbarNotification(getString(R.string.newnym), NOTIFY_ID, R.drawable.ic_stat_starting_tor_logo);
+ showToolbarNotification(getString(R.string.newnym), NOTIFY_ID, R.drawable.ic_stat_starting_tor_logo, false);
conn.signal(TorControlCommands.SIGNAL_NEWNYM);
}
} catch (Exception ioe) {
@@ -1221,7 +1226,7 @@ public class OrbotService extends VpnService implements OrbotConstants {
}
} catch (Exception e) {
- showToolbarNotification(getString(R.string.your_reachableaddresses_settings_caused_an_exception_), ERROR_NOTIFY_ID, R.drawable.ic_stat_notifyerr);
+ showToolbarNotification(getString(R.string.your_reachableaddresses_settings_caused_an_exception_), ERROR_NOTIFY_ID, R.drawable.ic_stat_notifyerr, false);
return null;
}
@@ -1238,7 +1243,7 @@ public class OrbotService extends VpnService implements OrbotConstants {
}
} catch (Exception e) {
- showToolbarNotification(getString(R.string.your_relay_settings_caused_an_exception_), ERROR_NOTIFY_ID, R.drawable.ic_stat_notifyerr);
+ showToolbarNotification(getString(R.string.your_relay_settings_caused_an_exception_), ERROR_NOTIFY_ID, R.drawable.ic_stat_notifyerr, false);
return null;
}
@@ -1254,7 +1259,7 @@ public class OrbotService extends VpnService implements OrbotConstants {
void showBandwidthNotification(String message, boolean isActiveTransfer) {
if (!mCurrentStatus.equals(STATUS_ON) || !mConnectivity) return;
var icon = !isActiveTransfer ? R.mipmap.ic_stat_tor_logo : R.mipmap.ic_stat_tor_logo;
- showToolbarNotification(message, NOTIFY_ID, icon);
+ showToolbarNotification(message, NOTIFY_ID, icon, false);
}
public static String formatBandwidthCount(Context context, long bitsPerSecond) {
@@ -1597,7 +1602,7 @@ public class OrbotService extends VpnService implements OrbotConstants {
break;
case ACTION_STATUS:
if (mCurrentStatus.equals(STATUS_OFF))
- showToolbarNotification(getString(R.string.open_orbot_to_connect_to_tor), NOTIFY_ID, R.mipmap.ic_stat_tor_logo);
+ showToolbarNotification(getString(R.string.open_orbot_to_connect_to_tor), NOTIFY_ID, R.mipmap.ic_stat_tor_logo, false);
replyWithStatus(mIntent);
break;
@@ -1608,7 +1613,7 @@ public class OrbotService extends VpnService implements OrbotConstants {
newIdentity();
break;
case CMD_SETTING:
- onSettingRegister();
+ //onSettingRegister();
break;
case CMD_ACTIVE:
sendSignalActive();
@@ -1623,11 +1628,14 @@ public class OrbotService extends VpnService implements OrbotConstants {
}
}
- public void onSettingRegister(){
+ public void onInvokeController(int pCommand){
try {
Intent intent;
- intent = new Intent(this, Class.forName("com.hiddenservices.onionservices.appManager.settingManager.notificationManager.settingNotificationController"));
+ intent = new Intent(this, Class.forName("com.hiddenservices.onionservices.appManager.orbotRequestManager"));
intent.setFlags(FLAG_ACTIVITY_NEW_TASK);
+ Bundle mBundle = new Bundle();
+ mBundle.putInt("command", pCommand);
+ intent.putExtras(mBundle);
getApplicationContext().startActivity(intent);
} catch (ClassNotFoundException e) {
e.printStackTrace();
@@ -1639,8 +1647,7 @@ public class OrbotService extends VpnService implements OrbotConstants {
switch (intent.getAction()) {
case TorControlCommands.SIGNAL_NEWNYM: {
- activityContextManager
- newIdentity();
+ onInvokeController(orbotExternalCommands.S_NEW_CIRCUIT);
break;
}
case CMD_ACTIVE: {
@@ -1652,7 +1659,7 @@ public class OrbotService extends VpnService implements OrbotConstants {
break;
}
case CMD_SETTING: {
- onSettingRegister();
+ onInvokeController(orbotExternalCommands.S_NOTIFICATION_SETTINGS);
try{
sendBroadcast(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS));
}catch (Exception ex){}
diff --git a/orbotmanager/src/main/java/org/torproject/android/service/wrapper/orbotExternalCommands.java b/orbotmanager/src/main/java/org/torproject/android/service/wrapper/orbotExternalCommands.java
new file mode 100644
index 00000000..fae62dfe
--- /dev/null
+++ b/orbotmanager/src/main/java/org/torproject/android/service/wrapper/orbotExternalCommands.java
@@ -0,0 +1,7 @@
+package org.torproject.android.service.wrapper;
+
+public class orbotExternalCommands
+{
+ public static int S_NEW_CIRCUIT = 1;
+ public static int S_NOTIFICATION_SETTINGS = 2;
+}
diff --git a/orbotmanager/src/main/java/org/torproject/android/service/wrapper/orbotLocalConstants.java b/orbotmanager/src/main/java/org/torproject/android/service/wrapper/orbotLocalConstants.java
index bf0f848b..ceb36c65 100644
--- a/orbotmanager/src/main/java/org/torproject/android/service/wrapper/orbotLocalConstants.java
+++ b/orbotmanager/src/main/java/org/torproject/android/service/wrapper/orbotLocalConstants.java
@@ -12,6 +12,7 @@ public class orbotLocalConstants
public static String mTorLogsStatus = "Loading...";
public static boolean mIsTorInitialized = false;
public static boolean mForcedQuit = false;
+ public static boolean mAppForceExit = false;
public static int mNotificationStatus = 0;
public static WeakReference mHomeContext;
public static Intent mHomeIntent = null;
@@ -22,6 +23,7 @@ public class orbotLocalConstants
public static boolean mAppStarted = false;
public static String mBridgesDefault = "";
public static boolean mStartTriggered = false;
+ public static boolean mNewCircuitRegistered = false;
public static int mHTTPPort = 8118;
public static int mSOCKSPort = -1;