diff --git a/.idea/misc.xml b/.idea/misc.xml index af079604..f5406726 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -86,7 +86,7 @@ - + @@ -118,6 +118,7 @@ + diff --git a/app/src/main/assets/homepage/homepage-dark.html b/app/src/main/assets/homepage/homepage-dark.html index eea3ea6d..a3e41ffd 100755 --- a/app/src/main/assets/homepage/homepage-dark.html +++ b/app/src/main/assets/homepage/homepage-dark.html @@ -68,9 +68,7 @@
Genesis Search @@ -112,7 +110,7 @@

{ event.invokeObserver(Arrays.asList(mProgress, mSessionID), enums.etype.progress_update); }); - event.invokeObserver(Arrays.asList(mCurrentURL, mSessionID, mCurrentTitle, m_current_url_id, mTheme), enums.etype.M_UPDATE_PIXEL_BACKGROUND); } mPreviousErrorPage = false; } else { @@ -795,7 +794,6 @@ geckoSession extends GeckoSession implements MediaSession.Delegate, GeckoSession onSessionReinit(); } - event.invokeObserver(Arrays.asList(mCurrentURL, mSessionID, mCurrentTitle, m_current_url_id, mTheme), enums.etype.M_UPDATE_PIXEL_BACKGROUND); event.invokeObserver(Arrays.asList(mCurrentURL, mSessionID, mCurrentTitle, mTheme), enums.etype.ON_EXPAND_TOP_BAR); mPrevURL = mCurrentURL; } 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 46a71de3..18b04be9 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 @@ -424,7 +424,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba if (!status.mThemeApplying) { mHomeViewController.onUpdateSearchBar(model.getSession().getCurrentURL(), false, false, false); } - onLoadTab(model.getSession(), false, true, false); + onLoadTab(model.getSession(), false, true, false, true); } else { onNewIntent(getIntent()); onOpenLinkNewTab(helperMethod.getDomainName(mHomeModel.getSearchEngine())); @@ -679,7 +679,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba return mGeckoClient.getSecurityInfo(); } - public void onLoadTab(geckoSession mTempSession, boolean isSessionClosed, boolean pExpandAppBar, boolean pForced) { + public void onLoadTab(geckoSession mTempSession, boolean isSessionClosed, boolean pExpandAppBar, boolean pForced, boolean pGeneratePixel) { if (!isSessionClosed) { dataController.getInstance().invokeTab(dataEnums.eTabCommands.MOVE_TAB_TO_TOP, Collections.singletonList(mTempSession)); @@ -717,7 +717,9 @@ public class homeController extends AppCompatActivity implements ComponentCallba mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getTheme(), false); try { - mRenderedBitmap = mGeckoView.capturePixels(); + if(pGeneratePixel){ + mRenderedBitmap = mGeckoView.capturePixels(); + } } catch (Exception ignored) { } @@ -736,7 +738,9 @@ public class homeController extends AppCompatActivity implements ComponentCallba mHomeViewController.onProgressBarUpdate(mTempSession.getProgress(), true); } //} - dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_UPDATE_PIXEL, Arrays.asList(mGeckoClient.getSession().getSessionID(), mRenderedBitmap, null, mGeckoView, false)); + if(pGeneratePixel){ + dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_UPDATE_PIXEL, Arrays.asList(mGeckoClient.getSession().getSessionID(), mRenderedBitmap, null, mGeckoView, false)); + } TouchView(mGeckoView); TouchView(mNestedScroll); @@ -1185,7 +1189,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba tabRowModel model = (tabRowModel) dataController.getInstance().invokeTab(dataEnums.eTabCommands.GET_RECENT_TAB, null); if (model != null && !mGeckoClient.getSession().getSessionID().equals(model.getSession().getSessionID())) { mHomeViewController.onUpdateSearchBar(model.getSession().getCurrentURL(), false, false, true); - onLoadTab(model.getSession(), false, true, false); + onLoadTab(model.getSession(), false, true, false, true); } } @@ -1635,7 +1639,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba } } else { if (!model.getSession().getSessionID().equals(mGeckoClient.getSession().getSessionID())) { - onLoadTab(model.getSession(), false, true, false); + onLoadTab(model.getSession(), false, true, false, true); } if (mGeckoClient.getSession().getProgress() != 100) { mHomeViewController.onProgressBarUpdate(mGeckoClient.getSession().getProgress(), true); @@ -1804,7 +1808,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba if (model != null) { if (mTabFragment.getVisibility() != View.VISIBLE) { - onLoadTab(model.getSession(), true, true, false); + onLoadTab(model.getSession(), true, true, false, false); } return true; } else { @@ -2317,7 +2321,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba } else if (e_type.equals(enums.etype.M_HOME_PAGE)) { geckoSession mSession = (geckoSession) dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_HOME_PAGE, null); if (mSession != null) { - onLoadTab(mSession, false, true, false); + onLoadTab(mSession, false, true, false, false); } return dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_HOME_PAGE, null); } @@ -2563,7 +2567,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba } else if (e_type.equals(enums.etype.M_OPEN_SESSION)) { tabRowModel model = (tabRowModel) dataController.getInstance().invokeTab(dataEnums.eTabCommands.GET_CURRENT_TAB, null); if (model != null) { - onLoadTab(model.getSession(), false, true, false); + onLoadTab(model.getSession(), false, true, false, true); if (model.getSession().getCurrentURL().equals("about:blank") && status.sOpenURLInNewTab) { onLoadURL(helperMethod.getDomainName(mHomeModel.getSearchEngine())); } else { diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/settingManager/generalManager/settingGeneralController.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/settingManager/generalManager/settingGeneralController.java index 6675dd99..104dc962 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/appManager/settingManager/generalManager/settingGeneralController.java +++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/settingManager/generalManager/settingGeneralController.java @@ -140,7 +140,7 @@ public class settingGeneralController extends AppCompatActivity { status.mThemeApplying = true; - //activityContextManager.getInstance().getHomeController().onReInitTheme(); + activityContextManager.getInstance().getHomeController().onReInitTheme(); new Handler().postDelayed(() -> { try { @@ -148,9 +148,9 @@ public class settingGeneralController extends AppCompatActivity { activityContextManager.getInstance().getSettingController().onInitTheme(); activityContextManager.getInstance().getHomeController().onCloseAllTabs(); - //onBackPressed(); - //overridePendingTransition(R.anim.fade_in_lang, R.anim.fade_out_lang); - //helperMethod.openActivity(settingGeneralController.class, constants.CONST_LIST_HISTORY, settingGeneralController.this, true); + onBackPressed(); + overridePendingTransition(R.anim.fade_in_lang, R.anim.fade_out_lang); + helperMethod.openActivity(settingGeneralController.class, constants.CONST_LIST_HISTORY, settingGeneralController.this, true); } }catch (Exception ex){} diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/tabManager/tabController.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/tabManager/tabController.java index 2ee0db93..b5ac3440 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/appManager/tabManager/tabController.java +++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/tabManager/tabController.java @@ -644,7 +644,7 @@ public class tabController extends Fragment { } else if (e_type.equals(tabEnums.eTabAdapterCallback.ON_LOAD_TAB)) { mClosed = true; mtabViewController.onTrigger(tabEnums.eTabViewCommands.ON_HOLD_BLOCKER, null); - mHomeController.onLoadTab((geckoSession) data.get(0), (boolean) data.get(1), true, true); + mHomeController.onLoadTab((geckoSession) data.get(0), (boolean) data.get(1), true, true, false); } else if (e_type.equals(tabEnums.eTabAdapterCallback.ON_REMOVE_TAB_VIEW)) { onInitRemoveView((Integer) data.get(0), true, true); initTabCount(400); diff --git a/app/src/main/java/com/hiddenservices/onionservices/dataManager/models/tabRowModel.java b/app/src/main/java/com/hiddenservices/onionservices/dataManager/models/tabRowModel.java index 65a8f89b..4a500e9e 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/dataManager/models/tabRowModel.java +++ b/app/src/main/java/com/hiddenservices/onionservices/dataManager/models/tabRowModel.java @@ -80,6 +80,9 @@ public class tabRowModel { public Bitmap getBitmap() { return mBitmap; } + public void resetBitmap() { + mBitmap = null; + } public String getDate() { return mDate; diff --git a/app/src/main/java/com/hiddenservices/onionservices/dataManager/tabDataModel.java b/app/src/main/java/com/hiddenservices/onionservices/dataManager/tabDataModel.java index 8a81e92f..b62da69a 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/dataManager/tabDataModel.java +++ b/app/src/main/java/com/hiddenservices/onionservices/dataManager/tabDataModel.java @@ -84,6 +84,18 @@ class tabDataModel { return enums.AddTabCallback.TAB_FULL; } + if (mTabs.size() > 2) { + for(int counter=mTabs.size()-1;counter>1;counter--){ + if(!mTabs.get(counter).getSession().isLoaded()){ + mTabs.get(counter).resetBitmap(); + } + mTabs.get(counter).getSession().stop(); + mTabs.get(counter).getSession().setActive(false); + mTabs.get(counter).getSession().close(); + } + } + + if (pIsDataSavable) { String[] params = new String[3]; params[0] = mTabModel.getSession().getTitle(); 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 09a0a4fb..84a02968 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 @@ -52,7 +52,7 @@ public class appLovinManager implements MaxAdViewAdListener { } private boolean isAdvertLoaded() { - return bannerAdsLoaded; + return false; } /* Overriden Methods */ diff --git a/app/src/main/java/com/hiddenservices/onionservices/pluginManager/pluginController.java b/app/src/main/java/com/hiddenservices/onionservices/pluginManager/pluginController.java index c92ecf71..10cb7866 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/pluginManager/pluginController.java +++ b/app/src/main/java/com/hiddenservices/onionservices/pluginManager/pluginController.java @@ -285,7 +285,7 @@ public class pluginController { } else if (pEventType.equals(M_DOWNLOAD_FILE_MANUAL)) { ((homeController) mHomeController.get()).onManualDownload(pData.get(0).toString()); } else if (pEventType.equals(M_LOAD_NEW_TAB)) { - ((homeController) mHomeController.get()).onLoadTab((geckoSession) pData.get(pData.size() - 2), false, false, false); + ((homeController) mHomeController.get()).onLoadTab((geckoSession) pData.get(pData.size() - 2), false, false, true, true); } else if (pEventType.equals(M_OPEN_LINK_NEW_TAB)) { ((homeController) mHomeController.get()).postNewLinkTabAnimationInBackgroundTrigger(pData.get(0).toString()); diff --git a/app/src/main/res/drawable-hdpi/genesis_logo.png b/app/src/main/res/drawable-hdpi/genesis_logo.png new file mode 100644 index 00000000..99d8d1f6 Binary files /dev/null and b/app/src/main/res/drawable-hdpi/genesis_logo.png differ diff --git a/app/src/main/res/drawable-hdpi/genesis_logo_bordered.png b/app/src/main/res/drawable-hdpi/genesis_logo_bordered.png index 77d4d8c4..9e7f5593 100644 Binary files a/app/src/main/res/drawable-hdpi/genesis_logo_bordered.png and b/app/src/main/res/drawable-hdpi/genesis_logo_bordered.png differ diff --git a/app/src/main/res/drawable-hdpi/splashlogoclip.png b/app/src/main/res/drawable-hdpi/splashlogoclip.png index 1abe22c7..e3b1d62c 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-ldpi/splashlogoclip.png b/app/src/main/res/drawable-ldpi/splashlogoclip.png index 1abe22c7..4e901959 100644 Binary files a/app/src/main/res/drawable-ldpi/splashlogoclip.png and b/app/src/main/res/drawable-ldpi/splashlogoclip.png differ diff --git a/app/src/main/res/drawable-mdpi/genesis_logo.png b/app/src/main/res/drawable-mdpi/genesis_logo.png new file mode 100644 index 00000000..4d3f8ece Binary files /dev/null and b/app/src/main/res/drawable-mdpi/genesis_logo.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_stat_tor_logo.png b/app/src/main/res/drawable-mdpi/ic_stat_tor_logo.png new file mode 100644 index 00000000..b0f29b8e Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_stat_tor_logo.png differ diff --git a/app/src/main/res/drawable-mdpi/splashlogoclip.png b/app/src/main/res/drawable-mdpi/splashlogoclip.png index 1abe22c7..b0544ade 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/ic_stat_tor_logo.png b/app/src/main/res/drawable-xhdpi/ic_stat_tor_logo.png new file mode 100644 index 00000000..b0f29b8e Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_stat_tor_logo.png differ diff --git a/app/src/main/res/drawable-xhdpi/splashlogoclip.png b/app/src/main/res/drawable-xhdpi/splashlogoclip.png index 1abe22c7..992475b5 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-xxhdpi/ic_stat_tor_logo.png b/app/src/main/res/drawable-xxhdpi/ic_stat_tor_logo.png new file mode 100644 index 00000000..ba198282 Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_stat_tor_logo.png differ diff --git a/app/src/main/res/drawable-xxhdpi/splashlogoclip.png b/app/src/main/res/drawable-xxhdpi/splashlogoclip.png index 1abe22c7..d55500eb 100644 Binary files a/app/src/main/res/drawable-xxhdpi/splashlogoclip.png and b/app/src/main/res/drawable-xxhdpi/splashlogoclip.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_stat_tor_logo.png b/app/src/main/res/drawable-xxxhdpi/ic_stat_tor_logo.png new file mode 100644 index 00000000..4615805a Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_stat_tor_logo.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/splashlogoclip.png b/app/src/main/res/drawable-xxxhdpi/splashlogoclip.png index 1abe22c7..e103f4cd 100644 Binary files a/app/src/main/res/drawable-xxxhdpi/splashlogoclip.png and b/app/src/main/res/drawable-xxxhdpi/splashlogoclip.png differ diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml index 3daf33f5..67820c56 100644 --- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -1,5 +1,5 @@ - - + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml index 3daf33f5..67820c56 100644 --- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -1,5 +1,5 @@ - - + + \ No newline at end of file diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png index e39a3411..f4e360fa 100644 Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png index db69af29..7cc343b2 100644 Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png and b/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png index 3898f7fb..2914f9f2 100644 Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png index 91433e0f..a3a012f0 100644 Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png index 98d69634..96ccac0c 100644 Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png and b/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png index 9f554cba..7bf84e16 100644 Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png index 6246959c..90e440bc 100644 Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png index 763de23e..89ae39d8 100644 Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png and b/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png index 8fc45da4..9d9593e2 100644 Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index b45281f7..09078f16 100644 Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png index 5708c843..5c71b512 100644 Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png index 3a9d5833..989eb8c0 100644 Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index 45d28857..9fbb2f60 100644 Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png index cdbb7823..ba4d972b 100644 Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png index ead29086..bf7c097a 100644 Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/values/ic_launcher_background.xml b/app/src/main/res/values/ic_launcher_background.xml index c5d5899f..4e823a09 100644 --- a/app/src/main/res/values/ic_launcher_background.xml +++ b/app/src/main/res/values/ic_launcher_background.xml @@ -1,4 +1,4 @@ - #FFFFFF + #3DDC84 \ No newline at end of file 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 290d7b51..fa57d322 100644 --- a/orbotmanager/src/main/java/org/torproject/android/service/OrbotService.java +++ b/orbotmanager/src/main/java/org/torproject/android/service/OrbotService.java @@ -25,6 +25,7 @@ import android.content.IntentFilter; import android.content.ServiceConnection; import android.content.SharedPreferences; import android.content.pm.PackageManager; +import android.graphics.Color; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.net.Uri; @@ -205,6 +206,7 @@ public class OrbotService extends VpnService implements OrbotConstants { .setContentTitle(getString(R.string.app_name)) .setSmallIcon(R.mipmap.ic_stat_tor_logo) .setContentIntent(pendIntent) + .setColor(Color.rgb( 255, 158, 47)) .setCategory(Notification.CATEGORY_SERVICE) .setOngoing(org.torproject.android.service.util.Prefs.persistNotifications()); } @@ -887,51 +889,55 @@ public class OrbotService extends VpnService implements OrbotConstants { @Override public void onServiceConnected(ComponentName componentName, IBinder iBinder) { + new Thread(){ + public void run(){ + TorService torService = ((TorService.LocalBinder) iBinder).getService(); + + while ((conn = torService.getTorControlConnection())==null) + { + try { + sleep(500); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + try { + sleep(1000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + + mOrbotRawEventListener = new OrbotRawEventListener(OrbotService.this); + + ArrayList events = new ArrayList<>(Arrays.asList(TorControlCommands.EVENT_OR_CONN_STATUS, + TorControlCommands.EVENT_CIRCUIT_STATUS, TorControlCommands.EVENT_NOTICE_MSG, + TorControlCommands.EVENT_WARN_MSG, TorControlCommands.EVENT_ERR_MSG, + TorControlCommands.EVENT_BANDWIDTH_USED, TorControlCommands.EVENT_NEW_DESC, + TorControlCommands.EVENT_ADDRMAP)); + if (Prefs.useDebugLogging()) { + events.add(TorControlCommands.EVENT_DEBUG_MSG); + events.add(TorControlCommands.EVENT_INFO_MSG); + } + if (Prefs.useDebugLogging() || Prefs.showExpandedNotifications()) + events.add(TorControlCommands.EVENT_STREAM_STATUS); + + if (conn != null) { + try { + conn.addRawEventListener(mOrbotRawEventListener); + conn.authenticate(new byte[0]); + conn.setEvents(events); + logNotice(getString(R.string.log_notice_added_event_handler)); + } catch (IOException e) { + e.printStackTrace(); + } + + + initControlConnection(); + } + } + }.start(); //moved torService to a local variable, since we only need it once - TorService torService = ((TorService.LocalBinder) iBinder).getService(); - - while ((conn = torService.getTorControlConnection())==null) - { - try { - sleep(500); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - - try { - sleep(1000); - } catch (InterruptedException e) { - e.printStackTrace(); - } - - mOrbotRawEventListener = new OrbotRawEventListener(OrbotService.this); - - ArrayList events = new ArrayList<>(Arrays.asList(TorControlCommands.EVENT_OR_CONN_STATUS, - TorControlCommands.EVENT_CIRCUIT_STATUS, TorControlCommands.EVENT_NOTICE_MSG, - TorControlCommands.EVENT_WARN_MSG, TorControlCommands.EVENT_ERR_MSG, - TorControlCommands.EVENT_BANDWIDTH_USED, TorControlCommands.EVENT_NEW_DESC, - TorControlCommands.EVENT_ADDRMAP)); - if (Prefs.useDebugLogging()) { - events.add(TorControlCommands.EVENT_DEBUG_MSG); - events.add(TorControlCommands.EVENT_INFO_MSG); - } - if (Prefs.useDebugLogging() || Prefs.showExpandedNotifications()) - events.add(TorControlCommands.EVENT_STREAM_STATUS); - - if (conn != null) { - try { - conn.addRawEventListener(mOrbotRawEventListener); - conn.authenticate(new byte[0]); - conn.setEvents(events); - logNotice(getString(R.string.log_notice_added_event_handler)); - } catch (IOException e) { - e.printStackTrace(); - } - - - initControlConnection(); - } } @Override diff --git a/orbotmanager/src/main/res/mipmap-mdpi/ic_stat_tor_logo.png b/orbotmanager/src/main/res/mipmap-mdpi/ic_stat_tor_logo.png index 4545fd3f..b0f29b8e 100644 Binary files a/orbotmanager/src/main/res/mipmap-mdpi/ic_stat_tor_logo.png and b/orbotmanager/src/main/res/mipmap-mdpi/ic_stat_tor_logo.png differ diff --git a/orbotmanager/src/main/res/mipmap-xhdpi/ic_stat_tor_logo.png b/orbotmanager/src/main/res/mipmap-xhdpi/ic_stat_tor_logo.png index d34d2301..b0f29b8e 100644 Binary files a/orbotmanager/src/main/res/mipmap-xhdpi/ic_stat_tor_logo.png and b/orbotmanager/src/main/res/mipmap-xhdpi/ic_stat_tor_logo.png differ diff --git a/orbotmanager/src/main/res/mipmap-xxhdpi/ic_stat_tor_logo.png b/orbotmanager/src/main/res/mipmap-xxhdpi/ic_stat_tor_logo.png index 143be18a..ba198282 100644 Binary files a/orbotmanager/src/main/res/mipmap-xxhdpi/ic_stat_tor_logo.png and b/orbotmanager/src/main/res/mipmap-xxhdpi/ic_stat_tor_logo.png differ diff --git a/orbotmanager/src/main/res/mipmap-xxxhdpi/ic_stat_tor_logo.png b/orbotmanager/src/main/res/mipmap-xxxhdpi/ic_stat_tor_logo.png index 30f0078a..4615805a 100644 Binary files a/orbotmanager/src/main/res/mipmap-xxxhdpi/ic_stat_tor_logo.png and b/orbotmanager/src/main/res/mipmap-xxxhdpi/ic_stat_tor_logo.png differ diff --git a/orbotmanager/src/main/res/values/strings.xml b/orbotmanager/src/main/res/values/strings.xml index 70b1a0a0..099b1b3c 100644 --- a/orbotmanager/src/main/res/values/strings.xml +++ b/orbotmanager/src/main/res/values/strings.xml @@ -1,7 +1,7 @@ - Orbot - Orbot VPN + Orion + Orion VPN Orbot is a free proxy app that empowers other apps to use the internet more securely. Orbot uses Tor to encrypt your Internet traffic and then hides it by bouncing through a series of computers around the world. Tor is free software and an open network that helps you defend against a form of network surveillance that threatens personal freedom and privacy, confidential business activities and relationships, and state security known as traffic analysis. Orbot is Starting… Connected to the Tor Network