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 @@ + + + + + + + +