diff --git a/.idea/misc.xml b/.idea/misc.xml
index 91255167..d1072453 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -84,7 +84,9 @@
+
+
@@ -95,6 +97,7 @@
+
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index b0982c79..a7bc428d 100755
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -33,6 +33,11 @@
android:name="com.hiddenservices.onionservices.appManager.advertManager.advertController"
android:exported="true" />
+
+
+
+
-
-
+
+
-
-
+
+
@@ -110,11 +110,11 @@
diff --git a/app/src/main/assets/homepage/homepage.html b/app/src/main/assets/homepage/homepage.html
index 99685de6..ac47e150 100755
--- a/app/src/main/assets/homepage/homepage.html
+++ b/app/src/main/assets/homepage/homepage.html
@@ -92,11 +92,11 @@
-
-
+
+
-
-
+
+
diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/advertManager/advertController.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/advertManager/advertController.java
index 4db1ff3d..f370da24 100644
--- a/app/src/main/java/com/hiddenservices/onionservices/appManager/advertManager/advertController.java
+++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/advertManager/advertController.java
@@ -56,7 +56,6 @@ public class advertController extends AppCompatActivity {
finish();
}
-
/* Callbacks */
public class webivewViewCallback implements eventObserver.eventListener {
@Override
diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/advertManager/advertViewController.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/advertManager/advertViewController.java
index 19db75c4..f499dfb3 100644
--- a/app/src/main/java/com/hiddenservices/onionservices/appManager/advertManager/advertViewController.java
+++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/advertManager/advertViewController.java
@@ -6,12 +6,14 @@ import android.widget.ProgressBar;
import androidx.appcompat.app.AppCompatActivity;
import com.example.myapplication.R;
import com.hiddenservices.onionservices.eventObserver;
+import com.hiddenservices.onionservices.helperManager.sharedUIMethod;
import java.util.List;
public class advertViewController extends AppCompatActivity {
private WebView mWebView;
+ private AppCompatActivity mContext;
private ProgressBar mProgressBar;
@Override
@@ -22,6 +24,7 @@ public class advertViewController extends AppCompatActivity {
advertViewController(AppCompatActivity pContext, eventObserver.eventListener pEvent, WebView pGeckoView, ProgressBar pProgressBar)
{
+ this.mContext = pContext;
this.mWebView = pGeckoView;
this.mProgressBar = pProgressBar;
@@ -29,6 +32,7 @@ public class advertViewController extends AppCompatActivity {
}
private void initViews(){
+ sharedUIMethod.updateStatusBar(mContext);
}
public void onUpdateProgressBar(boolean status){
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 2c441093..a3213624 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
@@ -1,10 +1,10 @@
package com.hiddenservices.onionservices.appManager.homeManager.homeController;
+import static android.content.Intent.FLAG_ACTIVITY_NO_ANIMATION;
+
import android.annotation.SuppressLint;
import android.app.ActivityManager;
-import android.app.AlarmManager;
import android.app.DownloadManager;
-import android.app.PendingIntent;
import android.content.ActivityNotFoundException;
import android.content.BroadcastReceiver;
import android.content.ClipData;
@@ -52,9 +52,11 @@ import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.applovin.mediation.ads.MaxAdView;
import com.hiddenservices.onionservices.appManager.activityContextManager;
+import com.hiddenservices.onionservices.appManager.advertManager.advertController;
import com.hiddenservices.onionservices.appManager.bookmarkManager.bookmarkSettings.bookmarkSettingController;
import com.hiddenservices.onionservices.appManager.bookmarkManager.bookmarkHome.bookmarkController;
import com.hiddenservices.onionservices.appManager.historyManager.historyController;
+import com.hiddenservices.onionservices.appManager.orionAdvertManager.orionAdvertController;
import com.hiddenservices.onionservices.dataManager.models.historyRowModel;
import com.hiddenservices.onionservices.appManager.homeManager.geckoManager.NestedGeckoView;
import com.hiddenservices.onionservices.appManager.homeManager.geckoManager.*;
@@ -99,8 +101,6 @@ import java.util.Locale;
import java.util.Objects;
import java.util.concurrent.Callable;
import mozilla.components.support.utils.DownloadUtils;
-import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
-import static android.content.Intent.FLAG_ACTIVITY_NO_ANIMATION;
import static androidx.appcompat.app.AppCompatDelegate.setDefaultNightMode;
import static com.hiddenservices.onionservices.constants.constants.CONST_EXTERNAL_SHORTCUT_COMMAND_ERASE_OPEN;
import static com.hiddenservices.onionservices.constants.constants.CONST_EXTERNAL_SHORTCUT_COMMAND_RESTART;
@@ -197,7 +197,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba
private boolean mSearchBarLoading = false;
private boolean mSearchBarLoadingOpening = false;
private boolean mSearchBarWasBackButtonPressed = false;
- private boolean mWasEdittextChanged = false;
private String mSearchBarPreviousText = strings.GENERIC_EMPTY_STR;
private Handler mScrollHandler = null;
private Runnable mScrollRunnable = null;
@@ -341,6 +340,11 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mSearchBarLoading = false;
}
+ public void onAdvertClick(View view){
+ Intent myIntent = new Intent(this, orionAdvertController.class);
+ startActivity(myIntent);
+ }
+
public void initSuggestions(){
mSuggestions = (ArrayList)dataController.getInstance().invokeSuggestions(dataEnums.eSuggestionCommands.M_GET_SUGGESTIONS, Collections.singletonList(mSearchbar.getText().toString()));
}
@@ -978,7 +982,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
- mWasEdittextChanged = true;
+
new Handler().postDelayed(() ->
{
String mText = mSearchbar.getText().toString();
@@ -1010,7 +1014,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
if(mSuggestions.size()>0){
mSuggestions = (ArrayList)dataController.getInstance().invokeSuggestions(dataEnums.eSuggestionCommands.M_GET_SUGGESTIONS, Collections.singletonList(mText));
if(mHintListView.getAdapter()==null){
- initSuggestionView(mSuggestions, mText.toString());
+ initSuggestionView(mSuggestions, mText);
}else if(!mSearchBarLoadingOpening){
mEdittextChanged.removeCallbacks(postToServerRunnable);
if(!mSearchBarLoading){
@@ -1064,7 +1068,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba
if(!hasFocus)
{
msearchstatuscopy = false;
- mWasEdittextChanged = false;
mSearchBarWasBackButtonPressed = true;
new Handler().postDelayed(() ->
{
@@ -1115,7 +1118,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
};
public void onSearchBarInvoked(View view){
- String url = mGeckoClient.getSession().getCurrentURL();
+ String url;
if(!mSearchBarPreviousText.equals(mSearchbar.getText().toString())){
url = mSearchbar.getText().toString();
}else {
@@ -1610,7 +1613,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
{
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_RESUME);
activityContextManager.getInstance().setCurrentActivity(this);
- if (mGeckoClient.getSession()!=null && mGeckoClient!=null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && mGeckoClient.getUriPermission()!=null) {
+ if (mGeckoClient.getSession() != null && mGeckoClient != null && mGeckoClient.getUriPermission() != null) {
this.revokeUriPermission(mGeckoClient.getUriPermission(), Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_GRANT_READ_URI_PERMISSION);
}
if(isSuggestionSearchOpened){
@@ -1643,7 +1646,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba
mProgressBar.setProgress(0);
}
}else {
- if(model.getSession().getSessionID() != mGeckoClient.getSession().getSessionID()){
+ if(!model.getSession().getSessionID().equals(mGeckoClient.getSession().getSessionID())){
onLoadTab(model.getSession(),false,true, false);
}
if(mGeckoClient.getSession().getProgress()!=100){
diff --git a/app/src/main/java/com/hiddenservices/onionservices/appManager/orionAdvertManager/orionAdvertController.java b/app/src/main/java/com/hiddenservices/onionservices/appManager/orionAdvertManager/orionAdvertController.java
new file mode 100644
index 00000000..cdcb6bf3
--- /dev/null
+++ b/app/src/main/java/com/hiddenservices/onionservices/appManager/orionAdvertManager/orionAdvertController.java
@@ -0,0 +1,77 @@
+package com.hiddenservices.onionservices.appManager.orionAdvertManager;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.webkit.WebView;
+import android.widget.ProgressBar;
+
+import androidx.appcompat.app.AppCompatActivity;
+
+import com.example.myapplication.R;
+import com.hiddenservices.onionservices.appManager.settingManager.advertSetttings.advertSettingController;
+import com.hiddenservices.onionservices.eventObserver;
+
+import java.util.Collections;
+import java.util.List;
+
+public class orionAdvertController extends AppCompatActivity {
+
+ WebView mWebView;
+ ProgressBar mProgressBar;
+ orionAdvertViewController mAdvertViewController;
+
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_orion_adview_controller);
+
+ initializeViews();
+ onInitializeAdvertisements();
+ onInitAdvert();
+ }
+
+ private void initializeViews() {
+ mWebView = findViewById(R.id.pWebView);
+ mProgressBar = findViewById(R.id.mProgressBar);
+ mAdvertViewController = new orionAdvertViewController(this, null, mWebView, mProgressBar);
+ }
+
+ void onInitAdvert(){
+ mWebView.getSettings().setDomStorageEnabled(true);
+ mWebView.getSettings().setGeolocationEnabled(true);
+ mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
+ mWebView.getSettings().setUseWideViewPort(true);
+ mWebView.getSettings().setAppCacheEnabled(true);
+ mWebView.getSettings().setDatabaseEnabled(true);
+ mWebView.setWebViewClient(new orionAdvertWebViewClient(new webivewViewCallback()));
+ }
+
+ private void onInitializeAdvertisements(){
+ mWebView.loadUrl("https://360wise.com");
+ }
+
+ /* Helper Methods */
+ public void onClose(View view) {
+ finish();
+ }
+
+ public void onSettings(View view) {
+ Intent myIntent = new Intent(this, advertSettingController.class);
+ startActivity(myIntent);
+ }
+
+
+ /* Callbacks */
+ public class webivewViewCallback implements eventObserver.eventListener {
+ @Override
+ public Object invokeObserver(List