diff --git a/.idea/misc.xml b/.idea/misc.xml index 3a47835f..675c0bfb 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,183 +1,182 @@ - - - - - - - - - - + + + + + + + + + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 4ca6108e..599ce05e 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -52,7 +52,7 @@ android { splits { abi { - enable project.ext.splitEnabled + enable true reset() @@ -61,7 +61,7 @@ android { } bundle { abi { - enableSplit = true + enableSplit = false } } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 576abcb1..cc2272de 100755 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -2,9 +2,6 @@ - - - diff --git a/app/src/main/assets/policy/policy.html b/app/src/main/assets/policy/policy.html index f279975c..76796513 100644 --- a/app/src/main/assets/policy/policy.html +++ b/app/src/main/assets/policy/policy.html @@ -52,13 +52,13 @@

Search Leakage

At other search engines, when you do a search and then click on a link, your search terms are sent to that site you clicked on (in the HTTP referrer header). + href="https://looksmart.com/?q=HTTP referrer header">HTTP referrer header). We call this sharing of personal information "search leakageā€, For example, when you search for something private, you are sharing that private search not only with your search engine, but also with all the sites that you clicked on (for that search). In addition, when you visit any site, your computer automatically sends information about - it to that site (including your User - agent and IP address). This + it to that site (including your User + agent and IP address). This information can often be used to identify you directly. So when you do that private search, not only can those other sites know your search terms, but they can also know that you searched it. It is this combination of available information about you that @@ -77,14 +77,14 @@ versions of those sites. It is modeled after (and uses code from) the HTTPS Everywhere. These sites include Wikipedia, Facebook, Twitter, and Amazon to name a few. Another way to prevent search leakage is by using something called a POST request, which has the + href="https://looksmart.com/?q=POST request">POST request, which has the effect of not showing your search in your browser, and, as a consequence, does not send it to other sites. You can turn on POST requests on our settings page, but it has its own issues. POST requests usually break browser back buttons, and they make it impossible for you to easily share your search by copying and pasting it out of your Web browser's address bar.

Finally, if you want to prevent sites from knowing you - visited them at all, you can use a proxy like Tor. - Orion actually operates a Tor exit + visited them at all, you can use a proxy like Tor. + Orion actually operates a Tor exit enclave, which means you can get end to end anonymous and encrypted searching using Tor & DDG together. You can enter !proxy domain into Orion as well, and we will route you through a proxy, e.g. !proxy breadpig.com. Unfortunately, proxies can also be @@ -102,7 +102,7 @@

Other search engines save your search history. Usually your searches are saved along with the date and time of the search, some information about your computer (e.g. your IP address, User agent and often a unique identifier stored in - a browser cookie), and if you are + a browser cookie), and if you are logged in, your account information (e.g. name and email address). With only the timestamp and computer information, your searches can often be traced directly to you. With the additional account information, they are associated directly with you. Also, diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/geckoClients.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/geckoClients.java index d8a54976..223ec84d 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/geckoClients.java +++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/geckoClients.java @@ -301,7 +301,9 @@ public class geckoClients { } public void onMediaInvoke(enums.MediaController mController){ - mSession.getMediaSessionDelegate().onTrigger(mController); + if(mSession.getMediaSessionDelegate()!=null){ + mSession.getMediaSessionDelegate().onTrigger(mController); + } } public String getTheme() { @@ -476,7 +478,9 @@ public class geckoClients { mSession.onFullScreenInvoke((boolean)data.get(0)); } if (e_type.equals(homeEnums.eGeckoCallback.ON_DESTROY_MEDIA)) { - mSession.getMediaSessionDelegate().onTrigger(enums.MediaController.DESTROY); + if(mSession.getMediaSessionDelegate()!=null){ + mSession.getMediaSessionDelegate().onTrigger(enums.MediaController.DESTROY); + } } if (e_type.equals(homeEnums.eGeckoCallback.M_CHANGE_HOME_THEME)) { initHomeTheme(); diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/geckoSession.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/geckoSession.java index f636aa71..550c9430 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/geckoSession.java +++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/geckoManager/geckoSession.java @@ -17,6 +17,8 @@ import com.hiddenservices.onionservices.appManager.homeManager.geckoManager.help import com.hiddenservices.onionservices.appManager.homeManager.geckoManager.helperClasses.searchHandler; import com.hiddenservices.onionservices.appManager.homeManager.homeController.homeEnums; import com.hiddenservices.onionservices.eventObserver; +import com.hiddenservices.onionservices.helperManager.helperMethod; + import org.mozilla.geckoview.GeckoSession; import org.mozilla.geckoview.GeckoView; import java.lang.ref.WeakReference; @@ -54,9 +56,7 @@ public class geckoSession extends GeckoSession implements GeckoSession.Progress this.mGeckoDataModel = new geckoDataModel(); this.mGeckoDataModel.mSessionID = pSessionID; - this.mMediaDelegate = new mediaDelegate(this.mContext); this.mSelectionActionDelegate = new selectionDelegate(pContext, true); - this.mMediaSessionDelegate = new mediaSessionDelegate(this.mContext, mGeckoDataModel, mMediaDelegate); this.mHistoryDelegate = new historyDelegate(this.mContext, mEvent, mGeckoDataModel, this); this.mPromptDelegate = new promptDelegate(this.mContext.get()); this.mContentDelegate = new contentDelegate(this.mContext, mEvent, mGeckoDataModel, this); @@ -67,18 +67,25 @@ public class geckoSession extends GeckoSession implements GeckoSession.Progress this.mNavigationDelegate = new navigationDelegate(this.mContext, mEvent, mGeckoDataModel, this); this.mProgressDelegate = new progressDelegate(this.mContext, mEvent, mGeckoDataModel); this.mPermissionDelegate = new permissionDelegate(this.mContext, this); + this.mMediaDelegate = new mediaDelegate(new WeakReference(pContext)); + setMediaDelegate(this.mMediaDelegate); setSelectionActionDelegate(this.mSelectionActionDelegate); - setMediaSessionDelegate(this.mMediaSessionDelegate); setHistoryDelegate(this.mHistoryDelegate); setPromptDelegate(this.mPromptDelegate); setContentDelegate(this.mContentDelegate); - setMediaDelegate(this.mMediaDelegate); setScrollDelegate(this.mScrollDelegate); setAutofillDelegate(this.mAutofillDelegate); setNavigationDelegate(this.mNavigationDelegate); setProgressDelegate(this.mProgressDelegate); setPermissionDelegate(this.mPermissionDelegate); + setMediaSessionDelegate(null); + } + + public void onInit(AppCompatActivity pContext){ + setMediaSessionDelegate(null); + this.mMediaSessionDelegate = new mediaSessionDelegate(new WeakReference(pContext), mGeckoDataModel, mMediaDelegate); + setMediaSessionDelegate(this.mMediaSessionDelegate); } public void initCallback(eventObserver.eventListener pEvent) { 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 62d99c6d..1f550646 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 @@ -772,6 +772,9 @@ public class homeController extends AppCompatActivity implements ComponentCallba if (mGeckoView.getSession() != null && !mGeckoView.getSession().isOpen()) { mGeckoView.getSession().open(mGeckoClient.getmRuntime()); } + if (url.contains("torry.io") && !url.contains("torry.io/mobile/orion")) { + url = url.replace("torry.io","torry.io/mobile/orion"); + } mAppBar.animate().cancel(); if (mGeckoView.getSession() != null) { @@ -3169,6 +3172,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba } else if (e_type.equals(homeEnums.eGeckoCallback.ON_UPDATE_HISTORY)) { return dataController.getInstance().invokeHistory(dataEnums.eHistoryCommands.M_ADD_HISTORY, data); } else if (e_type.equals(homeEnums.eGeckoCallback.ON_PAGE_LOADED)) { + mGeckoClient.getSession().onInit(homeController.this); onInvokePixelGenerator(); dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_IS_BOOTSTRAPPED, true)); mHomeViewController.onPageFinished(); diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/homeController/homeModel.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/homeController/homeModel.java index bdd01cd7..c1c98a6f 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/homeController/homeModel.java +++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/homeManager/homeController/homeModel.java @@ -27,6 +27,9 @@ public class homeModel { if (pURL.startsWith("data") || pURL.startsWith("http://data") || pURL.startsWith("https://data")) { return pURL; } + if (pURL.contains("torry.io") && !pURL.contains("torry.io/mobile/orion")) { + pURL = pURL.replace("torry.io","torry.io/mobile/orion"); + } if (pURL.equals("about:blank")) { return helperMethod.completeURL("167.86.99.31"); } else if (pURL.equals("about:config")) { diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/settingManager/advanceManager/settingAdvanceController.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/settingManager/advanceManager/settingAdvanceController.java index 7b8d9f32..ef1d2b39 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/appManager/settingManager/advanceManager/settingAdvanceController.java +++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/settingManager/advanceManager/settingAdvanceController.java @@ -175,6 +175,7 @@ public class settingAdvanceController extends AppCompatActivity { mSettingAdvanceModel.onTrigger(settingAdvanceEnums.eAdvanceModel.M_BACKGROUND_MUSIC, Collections.singletonList(!mBackgroundMusic.isChecked())); mBackgroundMusic.toggle(); dataController.getInstance().invokePrefs(dataEnums.ePreferencesCommands.M_SET_BOOL, Arrays.asList(keys.SETTING_BACKGROUND_MUSIC, status.sBackgroundMusic)); + activityContextManager.getInstance().getHomeController().onReload(null); } public void onGridView(View view) { diff --git a/app/src/main/java/com/hiddenservices/onionservices/constants/constants.java b/app/src/main/java/com/hiddenservices/onionservices/constants/constants.java index 8785d4b7..7c663aec 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/constants/constants.java +++ b/app/src/main/java/com/hiddenservices/onionservices/constants/constants.java @@ -49,11 +49,12 @@ public class constants { public static final String CONST_GENESIS_HELP_URL_SUB = "167.86.99.31/help"; public static final String CONST_BACKEND_GENESIS_URL = "http://167.86.99.31/search?q=$s&p_num=1&s_type=all"; public static final String CONST_BACKEND_GOOGLE_URL = "https://www.google.com/search?q=$s"; - public static final String CONST_BACKEND_DUCK_DUCK_GO_URL = "https://duckduckgo.com?q=$s&ia=web"; - public static final String CONST_BACKEND_DUCK_DUCK_GO_STATIC_URL = "http://duckduckgo.com"; + public static final String CONST_BACKEND_DUCK_DUCK_GO_URL = "https://www.torry.io/mobile/orion/search/?q=$s"; + + public static final String CONST_BACKEND_DUCK_DUCK_GO_STATIC_URL = "https://www.torry.io/mobile/orion/"; public static final String CONST_BACKEND_BING_URL = "https://bing.com/search?q=$s"; public static final String CONST_BACKEND_WIKI_URL = "https://en.wikipedia.org/wiki/$s"; - public static final String CONST_LOG_DUCKDUCK = "https://duckduckgo.com/?q=tor"; + public static final String CONST_LOG_DUCKDUCK = "https://www.torry.io/mobile/orion/?q=tor"; /*PROXY CONSTANTS*/ diff --git a/app/src/main/java/com/hiddenservices/onionservices/dataManager/suggestionDataModel.java b/app/src/main/java/com/hiddenservices/onionservices/dataManager/suggestionDataModel.java index d3bb5101..25a54dbb 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/dataManager/suggestionDataModel.java +++ b/app/src/main/java/com/hiddenservices/onionservices/dataManager/suggestionDataModel.java @@ -224,7 +224,7 @@ public class suggestionDataModel implements SpellCheckerSession.SpellCheckerSess if (status.sTorBrowsing) { mCurrentList.add(mSize, new historyRowModel("Orion Search", "orion.onion", -1)); }else { - mCurrentList.add(mSize, new historyRowModel("Duckduckgo", "https://duckduckgo.com", -1)); + mCurrentList.add(mSize, new historyRowModel("Duckduckgo", "https://looksmart.com", -1)); } } @@ -234,7 +234,7 @@ public class suggestionDataModel implements SpellCheckerSession.SpellCheckerSess private ArrayList initSuggestions() { mHintListLocalCache = new ArrayList<>(); - mHintListLocalCache.add(new historyRowModel("Duckduckgo", "https://duckduckgo.com", -1)); + mHintListLocalCache.add(new historyRowModel("Duckduckgo", "https://looksmart.com", -1)); mHintListLocalCache.add(new historyRowModel("BBC", "https://bbc.com", -1)); mHintListLocalCache.add(new historyRowModel("Youtube", "https://youtube.com", -1)); mHintListLocalCache.add(new historyRowModel("Facebook", "https://facebook.com", -1)); @@ -276,6 +276,7 @@ public class suggestionDataModel implements SpellCheckerSession.SpellCheckerSess mHintListLocalCache.add(new historyRowModel("Bestbuy", "https://bestbuy.com", -1)); mHintListLocalCache.add(new historyRowModel("Urbandictionary", "https://urbandictionary.com", -1)); mHintListLocalCache.add(new historyRowModel("Mayoclinic", "https://mayoclinic.org", -1)); + mHintListLocalCache.add(new historyRowModel("Torry", "https://www.torry.io/mobile/orion/", -1)); mHintListLocalCache.add(new historyRowModel("AOL", "https://aol.com", -1)); mHintListLocalCache.add(new historyRowModel("Genius", "https://genius.com", -1)); mHintListLocalCache.add(new historyRowModel("Zillow", "https://zillow.com", -1)); diff --git a/app/src/main/java/com/hiddenservices/onionservices/pluginManager/pluginReciever/defaultNotificationReciever.java b/app/src/main/java/com/hiddenservices/onionservices/pluginManager/pluginReciever/defaultNotificationReciever.java index b2bc1cfa..afc70bed 100644 --- a/app/src/main/java/com/hiddenservices/onionservices/pluginManager/pluginReciever/defaultNotificationReciever.java +++ b/app/src/main/java/com/hiddenservices/onionservices/pluginManager/pluginReciever/defaultNotificationReciever.java @@ -1,6 +1,8 @@ package com.hiddenservices.onionservices.pluginManager.pluginReciever; import static com.hiddenservices.onionservices.constants.constants.CONST_NOTIFICATION_COMMAND; +import static java.lang.System.exit; + import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; @@ -19,8 +21,12 @@ public class defaultNotificationReciever extends BroadcastReceiver { } else if (mCommand == 1) { if(activityContextManager.getInstance().getHomeController() == null){ onDestroy(context); + NotificationManagerCompat.from(context).cancelAll(); + exit(1); }else { + NotificationManagerCompat.from(activityContextManager.getInstance().getHomeController()).cancelAll(); activityContextManager.getInstance().getHomeController().onCloseApplication(); + exit(1); } } } @@ -43,7 +49,7 @@ public class defaultNotificationReciever extends BroadcastReceiver { NotificationManagerCompat.from(context).cancel(1025); android.os.Process.killProcess(android.os.Process.myPid()); - System.exit(1); + exit(1); }, 100); } } diff --git a/app/src/main/res/drawable-hdpi/duckduckgo.jpg b/app/src/main/res/drawable-hdpi/duckduckgo.jpg index b384026c..5cdcc3ea 100644 Binary files a/app/src/main/res/drawable-hdpi/duckduckgo.jpg and b/app/src/main/res/drawable-hdpi/duckduckgo.jpg differ diff --git a/app/src/main/res/drawable-hdpi/duckduckgo1.jpg b/app/src/main/res/drawable-hdpi/duckduckgo1.jpg new file mode 100644 index 00000000..b384026c Binary files /dev/null and b/app/src/main/res/drawable-hdpi/duckduckgo1.jpg differ diff --git a/app/src/main/res/layouts/setting/layout/setting.xml b/app/src/main/res/layouts/setting/layout/setting.xml index 5e97997c..89e76b8c 100644 --- a/app/src/main/res/layouts/setting/layout/setting.xml +++ b/app/src/main/res/layouts/setting/layout/setting.xml @@ -16,7 +16,6 @@ android:paddingBottom="50dp" android:layout_height="wrap_content"> - - - - + + + + + + +