From 2cb59f8d0dc93512f1a5c34fd7f70ef459bd942d Mon Sep 17 00:00:00 2001 From: msmannan00 Date: Thu, 18 Mar 2021 22:42:53 +0500 Subject: [PATCH] Bug Fixes Bug Fixes --- app/build.gradle | 21 +-- .../ExampleInstrumentedTest.kt | 0 app/src/main/AndroidManifest.xml | 15 +- .../bookmarkManager/bookmarkAdapter.java | 27 ++- .../bookmarkManager/bookmarkController.java | 22 ++- .../externalNavigationController.java | 26 ++- .../historyManager/historyAdapter.java | 23 ++- .../historyManager/historyController.java | 18 +- .../geckoManager/geckoSession.java | 5 + .../homeController/homeController.java | 168 ++++++++++-------- .../homeController/homeViewController.java | 32 ++-- .../landingManager/landingViewController.java | 2 +- .../orbotLogManager/orbotLogAdapter.java | 2 +- .../clearManager/settingClearController.java | 10 +- .../appManager/tabManager/tabAdapter.java | 66 ++++--- .../appManager/tabManager/tabController.java | 62 ++++--- .../appManager/tabManager/tabEnums.java | 2 +- .../tabManager/tabViewController.java | 17 +- .../genesissearchengine/constants/enums.java | 6 + .../genesissearchengine/constants/status.java | 1 + .../dataManager/tabDataModel.java | 13 +- .../helperManager/theme.java | 120 +++++++++++++ .../pluginManager/pluginController.java | 4 +- .../widget/search/searchWidgetManager.java | 112 ++++++++++++ .../custom-xml/alert/xml/ax_load_new_tab.xml | 21 +++ .../xml/ax_ripple_default_round_right.xml | 6 +- .../generic/xml/gx_generic_input_white.xml | 23 +++ app/src/main/res/drawable-hdpi/widget_ref.png | Bin 0 -> 27063 bytes .../alert/layout/popup_data_cleared.xml | 1 + .../alert/layout/popup_load_new_tab.xml | 31 ++-- .../res/layouts/alert/layout/popup_undo.xml | 28 ++- .../layouts/bookmark/layout/bookmark_view.xml | 2 +- .../layouts/history/layout/history_view.xml | 2 +- .../res/layouts/history/values/strings.xml | 2 - .../res/layouts/home/layout/home_view.xml | 3 +- .../example_appwidget_preview.png | Bin 0 -> 3522 bytes .../layout/widget_search_controller.xml | 89 ++++++++++ .../searchWidget/values-night/themes.xml | 7 + .../res/layouts/searchWidget/values/attrs.xml | 6 + .../layouts/searchWidget/values/colors.xml | 6 + .../layouts/searchWidget/values/dimens.xml | 10 ++ .../layouts/searchWidget/values/strings.xml | 5 + .../layouts/searchWidget/values/themes.xml | 7 + .../xml/search_widget_manager_info.xml | 11 ++ .../setting/layout/setting_tracking_view.xml | 17 +- .../main/res/layouts/tab/layout/tab_view.xml | 26 ++- app/src/main/res/values-night/colors.xml | 2 +- app/src/main/res/values/colors.xml | 2 +- app/src/main/res/values/ids.xml | 4 + app/src/main/res/values/strings.xml | 1 + .../ExampleUnitTest.kt | 0 orbotservice/build.gradle | 2 +- .../android/service/OrbotService.java | 68 ++++++- 53 files changed, 896 insertions(+), 260 deletions(-) rename app/src/androidTest/java/com/example/{myapplication => genesissearchwidget}/ExampleInstrumentedTest.kt (100%) mode change 100755 => 100644 create mode 100644 app/src/main/java/com/darkweb/genesissearchengine/helperManager/theme.java create mode 100644 app/src/main/java/com/widget/search/searchWidgetManager.java create mode 100644 app/src/main/res/custom-xml/alert/xml/ax_load_new_tab.xml create mode 100644 app/src/main/res/custom-xml/generic/xml/gx_generic_input_white.xml create mode 100644 app/src/main/res/drawable-hdpi/widget_ref.png delete mode 100644 app/src/main/res/layouts/history/values/strings.xml create mode 100644 app/src/main/res/layouts/searchWidget/drawable-nodpi/example_appwidget_preview.png create mode 100644 app/src/main/res/layouts/searchWidget/layout/widget_search_controller.xml create mode 100644 app/src/main/res/layouts/searchWidget/values-night/themes.xml create mode 100644 app/src/main/res/layouts/searchWidget/values/attrs.xml create mode 100644 app/src/main/res/layouts/searchWidget/values/colors.xml create mode 100644 app/src/main/res/layouts/searchWidget/values/dimens.xml create mode 100644 app/src/main/res/layouts/searchWidget/values/strings.xml create mode 100644 app/src/main/res/layouts/searchWidget/values/themes.xml create mode 100644 app/src/main/res/layouts/searchWidget/xml/search_widget_manager_info.xml create mode 100644 app/src/main/res/values/ids.xml rename app/src/test/java/com/example/{myapplication => genesissearchwidget}/ExampleUnitTest.kt (100%) mode change 100755 => 100644 diff --git a/app/build.gradle b/app/build.gradle index fcf84f8d..56a66eeb 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -91,6 +91,7 @@ android { 'src/main/res/layouts/bookmark', 'src/main/res/layouts/shared', 'src/main/res/layouts/shared/listviews', + 'src/main/res/layouts/searchWidget', 'src/main/res/layouts/home', 'src/main/res/custom-xml/alert', 'src/main/res/custom-xml/tab', @@ -145,15 +146,15 @@ dependencies { } /*Default Libraries*/ - implementation 'androidx.constraintlayout:constraintlayout:2.0.2' - implementation 'androidx.constraintlayout:constraintlayout:2.0.2' + implementation 'androidx.constraintlayout:constraintlayout:2.0.4' + implementation 'androidx.constraintlayout:constraintlayout:2.0.4' implementation 'androidx.appcompat:appcompat:1.2.0' - implementation 'androidx.constraintlayout:constraintlayout:2.0.2' - implementation 'com.google.android.material:material:1.3.0-alpha03' + implementation 'androidx.constraintlayout:constraintlayout:2.0.4' + implementation 'com.google.android.material:material:1.4.0-alpha01' implementation 'androidx.preference:preference:1.1.1' - implementation 'com.google.android.material:material:1.2.1' + implementation 'com.google.android.material:material:1.3.0' implementation 'androidx.appcompat:appcompat:1.2.0' - implementation "org.jetbrains.kotlin:kotlin-stdlib:1.4.21" + implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.4.31' /*Firefox ABI Splits*/ implementation "org.mozilla.components:browser-engine-gecko:$mozilla_components_version" @@ -164,7 +165,7 @@ dependencies { implementation 'com.crowdfire.cfalertdialog:cfalertdialog:1.1.0' /*Ads Manager*/ - implementation 'com.google.android.gms:play-services-ads:19.5.0' + implementation 'com.google.android.gms:play-services-ads:19.8.0' /*Crashlytics*/ @@ -182,12 +183,12 @@ dependencies { /*Helper Libraries*/ implementation 'com.chauthai.overscroll:overscroll-bouncy:0.1.1' - androidTestImplementation "junit:junit:4.13.1" + androidTestImplementation 'junit:junit:4.13.2' implementation 'jp.wasabeef:recyclerview-animators:2.2.7' - implementation 'com.android.support:design:24.0.0' + implementation 'com.android.support:design:28.0.0' implementation "org.mozilla.components:browser-icons:9.0.0" implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:0.30.1' - implementation 'com.android.volley:volley:1.1.1' + implementation 'com.android.volley:volley:1.2.0' implementation 'com.github.gabrielemariotti.recyclerview:recyclerview-animators:0.3.0-SNAPSHOT@aar' implementation 'com.github.instacart.truetime-android:library-extension-rx:3.3' diff --git a/app/src/androidTest/java/com/example/myapplication/ExampleInstrumentedTest.kt b/app/src/androidTest/java/com/example/genesissearchwidget/ExampleInstrumentedTest.kt old mode 100755 new mode 100644 similarity index 100% rename from app/src/androidTest/java/com/example/myapplication/ExampleInstrumentedTest.kt rename to app/src/androidTest/java/com/example/genesissearchwidget/ExampleInstrumentedTest.kt diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index a9215354..f8001fe8 100755 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -2,6 +2,7 @@ + @@ -11,8 +12,7 @@ - - + - + + + + + + + + diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/bookmarkManager/bookmarkAdapter.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/bookmarkManager/bookmarkAdapter.java index 9d7a72a8..4da066f3 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/bookmarkManager/bookmarkAdapter.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/bookmarkManager/bookmarkAdapter.java @@ -64,12 +64,6 @@ public class bookmarkAdapter extends RecyclerView.Adapter pModelList){ - notifyDataSetChanged(); - initializeModelWithDate(false); - } - - private void initializeModelWithDate(boolean pFilterEnabled){ int m_real_counter=0; @@ -140,10 +134,20 @@ public class bookmarkAdapter extends RecyclerView.Adapter{ if (actionId == EditorInfo.IME_ACTION_NEXT) { @@ -294,6 +298,18 @@ public class bookmarkController extends AppCompatActivity finish(); } + public class edittextManagerCallback implements eventObserver.eventListener { + + @Override + public Object invokeObserver(List data, Object e_type) { + + if(e_type.equals(enums.etype.ON_KEYBOARD_CLOSE)){ + onHideSearch(null); + onClearMultipleSelection(null); + } + return null; + } + } /*Event Observer*/ diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/externalNavigationManager/externalNavigationController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/externalNavigationManager/externalNavigationController.java index e54129c4..1f1f5a52 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/externalNavigationManager/externalNavigationController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/externalNavigationManager/externalNavigationController.java @@ -4,6 +4,7 @@ import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; +import android.os.Handler; import androidx.appcompat.app.AppCompatActivity; import androidx.fragment.app.FragmentActivity; @@ -16,6 +17,10 @@ import com.darkweb.genesissearchengine.constants.status; import com.darkweb.genesissearchengine.helperManager.helperMethod; import com.example.myapplication.R; +import java.util.Collections; + +import static com.darkweb.genesissearchengine.constants.enums.etype.M_INITIALIZE_TAB_LINK; + public class externalNavigationController extends AppCompatActivity { @Override public void onCreate(Bundle savedInstanceState) { @@ -23,7 +28,15 @@ public class externalNavigationController extends AppCompatActivity { if(status.sSettingIsAppStarted){ finish(); Uri data = externalNavigationController.this.getIntent().getData(); - activityContextManager.getInstance().getHomeController().onLoadURL(data.toString()); + activityContextManager.getInstance().getHomeController().onOpenLinkNewTab(data.toString()); + + + final Handler handler = new Handler(); + handler.postDelayed(() -> { + Intent launchIntent = getPackageManager().getLaunchIntentForPackage("com.darkweb.genesissearchengine"); + startActivity(launchIntent); + }, 500); + return; } setContentView(R.layout.home_view); @@ -32,7 +45,7 @@ public class externalNavigationController extends AppCompatActivity { intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); Uri data = this.getIntent().getData(); if(data!=null){ - activityContextManager.getInstance().getHomeController().onLoadURL(data.toString()); + activityContextManager.getInstance().getHomeController().onOpenLinkNewTab(data.toString()); } this.startActivity(intent); @@ -46,15 +59,22 @@ public class externalNavigationController extends AppCompatActivity { } } }.start(); + + Intent launchIntent = getPackageManager().getLaunchIntentForPackage("com.darkweb.genesissearchengine"); + startActivity(launchIntent); + } + @Override protected void onNewIntent(Intent intent) { super.onNewIntent(intent); Uri data = intent.getData(); if(data!=null){ - activityContextManager.getInstance().getHomeController().onLoadURL("https://bbc.com"); + activityContextManager.getInstance().getHomeController().onOpenLinkNewTab(data.toString()); + Intent launchIntent = getPackageManager().getLaunchIntentForPackage("com.darkweb.genesissearchengine"); + startActivity(launchIntent); } } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/historyManager/historyAdapter.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/historyManager/historyAdapter.java index fb42857a..d4f2b37c 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/historyManager/historyAdapter.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/historyManager/historyAdapter.java @@ -69,7 +69,7 @@ public class historyAdapter extends RecyclerView.Adapter pModelList){ - notifyDataSetChanged(); + //notifyDataSetChanged(); initializeModelWithDate(false); } @@ -157,7 +157,7 @@ public class historyAdapter extends RecyclerView.Adapter data, Object e_type) { + + if(e_type.equals(enums.etype.ON_KEYBOARD_CLOSE)){ + onHideSearch(null); + onClearMultipleSelection(null); + } + return null; + } + } + /*Event Observer*/ public class adapterCallback implements eventObserver.eventListener{ diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/geckoManager/geckoSession.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/geckoManager/geckoSession.java index 01537514..e3f22d72 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/geckoManager/geckoSession.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/geckoManager/geckoSession.java @@ -390,6 +390,7 @@ public class geckoSession extends GeckoSession implements GeckoSession.MediaDele /* Its Absence causes delay on first launch*/ if(mCurrentURL.contains("boogle.store")){ + mProgress = 5; event.invokeObserver(Arrays.asList(5, mSessionID, mCurrentURL), enums.etype.progress_update_forced); } @@ -763,12 +764,14 @@ public class geckoSession extends GeckoSession implements GeckoSession.MediaDele final Handler handler = new Handler(); handler.postDelayed(this::goBack, 100); + mProgress = 5; event.invokeObserver(Arrays.asList(5, mSessionID, mCurrentURL), enums.etype.progress_update_forced); event.invokeObserver(Arrays.asList(5, mSessionID, mCurrentURL), enums.etype.M_ADMOB_BANNER_RECHECK); } else { final Handler handler = new Handler(); handler.postDelayed(this::goBack, 100); + mProgress = 5; event.invokeObserver(Arrays.asList(5, mSessionID, mCurrentURL), enums.etype.progress_update_forced); event.invokeObserver(Arrays.asList(5, mSessionID, mCurrentURL), enums.etype.M_ADMOB_BANNER_RECHECK); } @@ -786,11 +789,13 @@ public class geckoSession extends GeckoSession implements GeckoSession.MediaDele } final Handler handler = new Handler(); handler.postDelayed(this::goForward, 100); + mProgress = 5; event.invokeObserver(Arrays.asList(5, mSessionID, mCurrentURL), enums.etype.progress_update_forced); event.invokeObserver(Arrays.asList(5, mSessionID, mCurrentURL), enums.etype.M_ADMOB_BANNER_RECHECK); }else { final Handler handler = new Handler(); handler.postDelayed(this::goForward, 100); + mProgress = 5; event.invokeObserver(Arrays.asList(5, mSessionID, mCurrentURL), enums.etype.progress_update_forced); event.invokeObserver(Arrays.asList(5, mSessionID, mCurrentURL), enums.etype.M_ADMOB_BANNER_RECHECK); } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeController.java index 0627ebfe..d760810e 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeController.java @@ -9,6 +9,7 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.SharedPreferences; +import android.content.pm.ActivityInfo; import android.content.res.Configuration; import android.content.res.Resources; import android.database.Cursor; @@ -68,6 +69,7 @@ import com.darkweb.genesissearchengine.helperManager.OnClearFromRecentService; import com.darkweb.genesissearchengine.helperManager.SimpleGestureFilter; import com.darkweb.genesissearchengine.helperManager.eventObserver; import com.darkweb.genesissearchengine.helperManager.helperMethod; +import com.darkweb.genesissearchengine.helperManager.theme; import com.darkweb.genesissearchengine.helperManager.trueTime; import com.darkweb.genesissearchengine.pluginManager.pluginController; import com.darkweb.genesissearchengine.pluginManager.pluginEnums; @@ -167,11 +169,11 @@ public class homeController extends AppCompatActivity implements ComponentCallba onInitBooleans(); orbotLocalConstants.mHomeIntent = getIntent(); + getWindow().getDecorView().setBackgroundColor(Color.WHITE); pluginController.getInstance().preInitialize(this); databaseController.getInstance().initialize(this); dataController.getInstance().initialize(this); - onChangeTheme(); status.initStatus(); pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); trueTime.getInstance().initTime(); @@ -191,6 +193,42 @@ public class homeController extends AppCompatActivity implements ComponentCallba onInitResume(false); initSuggestions(); initAdmob(); + initWidget(); + } + + + public void initWidget(){ + if(status.sWidgetResponse == enums.WidgetResponse.SEARCHBAR){ + if(!status.sSettingIsAppStarted){ + if(mSplashScreen.getAlpha()==1 && mConnectButton.isEnabled()){ + onStartApplication(null); + status.sWidgetResponse = enums.WidgetResponse.NONE; + } + }else { + mHomeViewController.initSearchBarFocus(false, isKeyboardOpened); + final Handler handler = new Handler(); + handler.postDelayed(() -> + { + if(mSearchEngineBar.getVisibility() != View.VISIBLE){ + mHomeViewController.initSearchBarFocus(true, isKeyboardOpened); + status.sWidgetResponse = enums.WidgetResponse.NONE; + } + }, 500); + } + } + else if(status.sWidgetResponse == enums.WidgetResponse.VOICE){ + if(!status.sSettingIsAppStarted){ + if(mSplashScreen.getAlpha()==1 && mConnectButton.isEnabled()){ + onStartApplication(null); + status.sWidgetResponse = enums.WidgetResponse.NONE; + } + }else { + if(mSearchEngineBar.getVisibility() != View.VISIBLE){ + onVoiceClick(null); + status.sWidgetResponse = enums.WidgetResponse.NONE; + } + } + } } public void initAdmob(){ @@ -237,7 +275,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba org.mozilla.thirdparty.com.google.android.exoplayer2.util.Log.i("SUPPPP1:",(String)model.getSession().getCurrentURL()); mHomeViewController.onUpdateSearchBar(model.getSession().getCurrentURL(), false, false, false); } - onLoadTab(model.getSession(),false); + onLoadTab(model.getSession(),false,true); onLoadURL(model.getSession().getCurrentURL()); }else { onNewIntent(getIntent()); @@ -255,48 +293,13 @@ public class homeController extends AppCompatActivity implements ComponentCallba tabRowModel model = (tabRowModel)dataController.getInstance().invokeTab(dataEnums.eTabCommands.GET_CURRENT_TAB, null); if(model!=null){ if(!mGeckoClient.getSession().getSessionID().equals(model.getSession().getSessionID())){ - onLoadTab(model.getSession(),true); + onLoadTab(model.getSession(),true,true); } }else { postNewTabAnimation(false, false); } } - public Context setupTheme(Context context) { - - Resources res = context.getResources(); - int mode = res.getConfiguration().uiMode; - - if(status.sTheme == enums.Theme.THEME_DARK){ - if(AppCompatDelegate.getDefaultNightMode() != AppCompatDelegate.MODE_NIGHT_YES){ - AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES); - mode = Configuration.UI_MODE_NIGHT_YES; - } - }else if(status.sTheme == enums.Theme.THEME_LIGHT){ - if(AppCompatDelegate.getDefaultNightMode() != AppCompatDelegate.MODE_NIGHT_NO){ - AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO); - mode = Configuration.UI_MODE_NIGHT_NO; - } - }else { - if(!status.sDefaultNightMode){ - if(AppCompatDelegate.getDefaultNightMode() != AppCompatDelegate.MODE_NIGHT_NO){ - AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO); - mode = Configuration.UI_MODE_NIGHT_NO; - } - }else { - if(AppCompatDelegate.getDefaultNightMode() != AppCompatDelegate.MODE_NIGHT_YES){ - AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES); - mode = Configuration.UI_MODE_NIGHT_YES; - } - } - } - - Configuration config = new Configuration(res.getConfiguration()); - config.uiMode = mode; - context = context.createConfigurationContext(config); - return context; - } - @SuppressLint("ClickableViewAccessibility") private void initSuggestionView(ArrayList pList, String pSearch){ LinearLayoutManager layoutManager = new LinearLayoutManager(this); @@ -383,7 +386,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba mCopyright = findViewById(R.id.pCopyright); mHintListView = mSearchEngineBar.findViewById(R.id.pHistListView); mAppBar = findViewById(R.id.pAppbar); - mSearchLock = findViewById(R.id.pSearchLock); + mSearchLock = findViewById(R.id.pSearchLogo); mOrbotLogManager = findViewById(R.id.pOrbotLogManager); mFindBar = findViewById(R.id.pFindBar); mInfoPortrait = findViewById(R.id.pInfoPortrait); @@ -408,16 +411,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getSession().getTheme(), false); } - public void onUpdateToolbarTheme(){ - mHomeViewController.onUpdateToolbarTheme(); - } - - public void onChangeTheme(){ - if(!status.sSettingIsAppStarted){ - status.sDefaultNightMode = (getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES; - } - } - @Override public boolean dispatchTouchEvent(MotionEvent event) { if(inSignatureArea(event)){ @@ -465,11 +458,11 @@ public class homeController extends AppCompatActivity implements ComponentCallba protected void attachBaseContext(Context base) { SharedPreferences mPrefs = PreferenceManager.getDefaultSharedPreferences(base); status.sTheme = mPrefs.getInt(keys.SETTING_THEME,enums.Theme.THEME_DEFAULT); - Prefs.setContext(base); orbotLocalConstants.mHomeContext = new WeakReference<>(base); - Context context = setupTheme(base); - super.attachBaseContext(LocaleHelper.onAttach(context, Prefs.getDefaultLocale())); + + Context mContext = theme.getInstance().initTheme(base); + super.attachBaseContext(LocaleHelper.onAttach(mContext, Prefs.getDefaultLocale())); } /*-------------------------------------------------------Helper Methods-------------------------------------------------------*/ @@ -479,8 +472,10 @@ public class homeController extends AppCompatActivity implements ComponentCallba } public void onGetThumbnail(ImageView pImageView,boolean pLoadTabView){ - mRenderedBitmap = mGeckoView.capturePixels(); - dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_UPDATE_PIXEL, Arrays.asList(mGeckoClient.getSession().getSessionID(), mRenderedBitmap, pImageView, mGeckoView, pLoadTabView)); + try{ + mRenderedBitmap = mGeckoView.capturePixels(); + dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_UPDATE_PIXEL, Arrays.asList(mGeckoClient.getSession().getSessionID(), mRenderedBitmap, pImageView, mGeckoView, pLoadTabView)); + }catch (Exception ignored){} } @@ -502,7 +497,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba } public void onReDrawGeckoview(){ - mGeckoClient.getSession().closeSession(); mGeckoClient.getSession().close(); mGeckoClient.initialize(mGeckoView, new geckoViewCallback(), this,false); } @@ -514,7 +508,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba mGeckoClient.loadURL(url.replace("genesis.onion","boogle.store")); } - public void onLoadTab(geckoSession mTempSession, boolean isSessionClosed){ + public void onLoadTab(geckoSession mTempSession, boolean isSessionClosed, boolean pExpandAppBar){ dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_UPDATE_PIXEL, Arrays.asList(mGeckoClient.getSession().getSessionID(), mRenderedBitmap, null, mGeckoView, false)); if(!isSessionClosed){ @@ -540,8 +534,19 @@ public class homeController extends AppCompatActivity implements ComponentCallba org.mozilla.thirdparty.com.google.android.exoplayer2.util.Log.i("SUPPPP4:",(String)mGeckoClient.getSession().getCurrentURL()); mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(), false, false, false); mHomeViewController.onUpdateStatusBarTheme(mGeckoClient.getSession().getTheme(),true); - mAppBar.setExpanded(true,true); mRenderedBitmap = mGeckoView.capturePixels(); + + if(pExpandAppBar){ + mHomeViewController.expandTopBar(); + } + + if(mGeckoClient.getSession().getCurrentURL().contains("boogle.store") || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_URL_CACHED) || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_URL_CACHED_DARK) || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_HELP_URL_CACHE) || mGeckoClient.getSession().getCurrentURL().startsWith(CONST_GENESIS_HELP_URL_CACHE_DARK)){ + mHomeViewController.updateBannerAdvertStatus(false, (boolean)pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED)); + }else { + mHomeViewController.updateBannerAdvertStatus(true, (boolean)pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED)); + } + + mHomeViewController.onProgressBarUpdate(mGeckoClient.getSession().getProgress(),true); } /*-------------------------------------------------------USER EVENTS-------------------------------------------------------*/ @@ -762,7 +767,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba if(mHintListView!=null && mHintListView.getAdapter()!=null && mHintListView.getAdapter().getItemCount()>0){ mHomeViewController.onUpdateSearchEngineBar(false, 150); } - mHomeViewController.initSearchBarFocus(false); + mHomeViewController.initSearchBarFocus(false, isKeyboardOpened); if(!mGeckoClient.isLoading()){ org.mozilla.thirdparty.com.google.android.exoplayer2.util.Log.i("SUPPPP8:",(String)mGeckoClient.getSession().getCurrentURL()); mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(),false,true, false); @@ -774,7 +779,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba }else { if(!isFocusChanging){ if(!status.mThemeApplying){ - mHomeViewController.initSearchBarFocus(true); + mHomeViewController.initSearchBarFocus(true, isKeyboardOpened); } isSuggestionChanged = true; isSuggestionSearchOpened = false; @@ -869,11 +874,15 @@ public class homeController extends AppCompatActivity implements ComponentCallba mHomeViewController.onHideLoadTabDialog(); 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,false); - onLoadTab(model.getSession(), false); + mHomeViewController.onUpdateSearchBar(model.getSession().getCurrentURL(),false,false,true); + onLoadTab(model.getSession(), false,true); } } + public void onRestoreTab(View view){ + activityContextManager.getInstance().getTabController().onRestoreTab(view); + } + public void onClearSelection(View view){ activityContextManager.getInstance().getTabController().onClearSelection(view); } @@ -911,19 +920,23 @@ public class homeController extends AppCompatActivity implements ComponentCallba public void postNewLinkTabAnimationInBackgroundTrigger(String url){ postNewLinkTabAnimationInBackground(dataToStr(url)); mHomeViewController.onShowLoadTabDialog(); - initTabCount(); } public void postNewLinkTabAnimationInBackground(String url){ + mAppBar.setTag(R.id.expandableBar,false); geckoSession mSession = mGeckoClient.getSession(); dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_UPDATE_PIXEL, Arrays.asList(mGeckoClient.getSession().getSessionID(), mRenderedBitmap, null, mGeckoView,false)); mGeckoClient.initialize(mGeckoView, new geckoViewCallback(), this,true); - onSaveCurrentTab(mGeckoClient.getSession(),true); mHomeViewController.progressBarReset(); mHomeViewController.onUpdateSearchBar(url,false,true, false); mGeckoClient.initURL(url); mGeckoClient.loadURL(url); - onLoadTab(mSession,false); + onSaveCurrentTab(mGeckoClient.getSession(),false); + onLoadTab(mSession,false,false); + + + mAppBar.setTag(R.id.expandableBar,true); + initTabCount(); } public void onNewTab(boolean isKeyboardOpenedTemp, boolean isKeyboardOpened){ @@ -942,10 +955,12 @@ public class homeController extends AppCompatActivity implements ComponentCallba } public void onOpenLinkNewTab(String url){ - onGetThumbnail(null, false); - final Handler handler = new Handler(); - handler.postDelayed(() -> mHomeViewController.onNewTabAnimation(Collections.singletonList(url),M_INITIALIZE_TAB_LINK), 100); + handler.postDelayed(() -> { + onGetThumbnail(null, false); + mHomeViewController.expandTopBar(); + mHomeViewController.onNewTabAnimation(Collections.singletonList(url), M_INITIALIZE_TAB_LINK); + }, 100); } public void onOpenTabViewBoundary(View view){ @@ -1115,21 +1130,22 @@ public class homeController extends AppCompatActivity implements ComponentCallba mSearchbar.requestFocus(); mSearchbar.setText(helperMethod.urlDesigner(mSearchBarPreviousText, this, mSearchbar.getCurrentTextColor())); mSearchbar.selectAll(); - mHomeViewController.initSearchBarFocus(true); + mHomeViewController.initSearchBarFocus(true, isKeyboardOpened); } if(status.sSettingIsAppStarted && mAppRestarted){ + onUpdateStatusBarTheme(); activityContextManager.getInstance().onClearStack(); tabRowModel model = (tabRowModel)dataController.getInstance().invokeTab(dataEnums.eTabCommands.GET_CURRENT_TAB, null); if(model==null || !mGeckoClient.getSession().getSessionID().equals(model.getSession().getSessionID())){ if(model==null){ onInitDefaultTab(); }else { - onLoadTab(model.getSession(), false); + onLoadTab(model.getSession(), false,true); } } } if(mAppBar!=null){ - mAppBar.setExpanded(true,true); + mHomeViewController.expandTopBar(); mAppBar.refreshDrawableState(); mAppBar.invalidate(); @@ -1151,6 +1167,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba } } + initWidget(); super.onResume(); } @@ -1260,7 +1277,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba if(model!=null){ if(mTabFragment.getVisibility()!=View.VISIBLE){ - onLoadTab(model.getSession(),true); + onLoadTab(model.getSession(),true, true); } return true; } @@ -1535,7 +1552,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); + onLoadTab(mSession, false,true); } return dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_HOME_PAGE, null); } @@ -1575,7 +1592,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba if(mHintListView!=null && mHintListView.getAdapter()!=null && mHintListView.getAdapter().getItemCount()>0){ mHomeViewController.onUpdateSearchEngineBar(false, 150); } - mHomeViewController.initSearchBarFocus(false); + mHomeViewController.initSearchBarFocus(false, isKeyboardOpened); if(!mGeckoClient.isLoading()){ org.mozilla.thirdparty.com.google.android.exoplayer2.util.Log.i("SUPPPP19:",(String)mGeckoClient.getSession().getCurrentURL()); mHomeViewController.onUpdateSearchBar(mGeckoClient.getSession().getCurrentURL(),false,true, false); @@ -1607,7 +1624,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba { if(e_type.equals(enums.etype.ON_EXPAND_TOP_BAR)){ - mAppBar.setExpanded(true,true); + mHomeViewController.expandTopBar(); } else if(e_type.equals(enums.etype.M_ON_BANNER_UPDATE)){ Object mAdvertResponse = pluginController.getInstance().onAdsInvoke(null, pluginEnums.eAdManager.M_IS_ADVERT_LOADED); @@ -1670,7 +1687,6 @@ public class homeController extends AppCompatActivity implements ComponentCallba initLocalLanguage(); mHomeViewController.onPageFinished(); mGeckoClient.onRedrawPixel(); - org.mozilla.thirdparty.com.google.android.exoplayer2.util.Log.i("SUPPPP12:",(String)data.get(0)); mHomeViewController.onUpdateSearchBar(dataToStr(data.get(0),mGeckoClient.getSession().getCurrentURL()),false,true, false); } else if(e_type.equals(enums.etype.search_update)){ @@ -1704,7 +1720,7 @@ public class homeController extends AppCompatActivity implements ComponentCallba } else if(e_type.equals(enums.etype.on_close_sesson)){ if(!onCloseCurrentTab(mGeckoClient.getSession())){ - postNewTabAnimation(true,false); + postNewTabAnimation(true,true); } } else if(e_type.equals(enums.etype.on_playstore_load)){ diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeViewController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeViewController.java index 6a21f4cd..25a0e6c1 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeViewController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/homeManager/homeController/homeViewController.java @@ -48,7 +48,6 @@ import com.darkweb.genesissearchengine.widget.progressBar.AnimatedProgressBar; import com.example.myapplication.R; import com.google.android.gms.ads.AdView; import org.mozilla.geckoview.GeckoView; -import org.mozilla.thirdparty.com.google.android.exoplayer2.util.Log; import org.torproject.android.service.wrapper.orbotLocalConstants; import java.util.ArrayList; import java.util.Arrays; @@ -170,6 +169,7 @@ class homeViewController }, 1500); updateBannerAdvertStatus(false, false); + expandTopBar(); } public void initTopBarPadding(){ @@ -206,7 +206,7 @@ class homeViewController mPopupLoadNewTab.animate().setDuration(350).alpha(1); final Handler handler = new Handler(); - handler.postDelayed(this::onHideLoadTabDialog, 2000); + handler.postDelayed(this::onHideLoadTabDialog, 2500); } public void onHideLoadTabDialog() { @@ -275,7 +275,7 @@ class homeViewController } @SuppressLint("UseCompatLoadingForDrawables") - public void initSearchBarFocus(boolean pStatus){ + public void initSearchBarFocus(boolean pStatus, boolean mIsKeyboardOpened){ if(!pStatus){ this.mVoiceInput.animate().setDuration(0).alpha(0).withEndAction(() -> { @@ -322,9 +322,11 @@ class homeViewController params.rightMargin = helperMethod.pxFromDp(17); } - mSearchbar.requestFocus(); - InputMethodManager imm = (InputMethodManager)mContext.getSystemService(Context.INPUT_METHOD_SERVICE); - imm.showSoftInput(mSearchbar, InputMethodManager.SHOW_IMPLICIT); + if(!mIsKeyboardOpened){ + mSearchbar.requestFocus(); + InputMethodManager imm = (InputMethodManager)mContext.getSystemService(Context.INPUT_METHOD_SERVICE); + imm.showSoftInput(mSearchbar, InputMethodManager.SHOW_IMPLICIT); + } } } @@ -357,7 +359,7 @@ class homeViewController window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) { - window.setStatusBarColor(ContextCompat.getColor(mContext, R.color.c_text_v3)); + mContext.getWindow().setStatusBarColor(ContextCompat.getColor(mContext, R.color.landing_ease_blue)); } else { mContext.getWindow().setStatusBarColor(ContextCompat.getColor(mContext, R.color.landing_ease_blue)); @@ -560,12 +562,19 @@ class homeViewController } private void triggerPostUI(){ - mAppBar.setExpanded(true,true); + expandTopBar(); if(mProgressBar.getProgress()>0 && mProgressBar.getProgress()<10000){ mProgressBar.animate().setStartDelay(0).alpha(1); } } + public void expandTopBar(){ + Object mTag = mAppBar.getTag(R.id.expandableBar); + if(mTag!=null && (boolean) mTag){ + mAppBar.setExpanded(true,true); + } + } + /*-------------------------------------------------------Helper Methods-------------------------------------------------------*/ void onOpenMenu(View view, boolean canGoForward, boolean isLoading, int userAgent){ @@ -745,7 +754,7 @@ class homeViewController public void onUpdateStatusBarTheme(String pTheme, boolean mForced) { - if(mSplashScreen.getAlpha()<=0 && status.sTheme != enums.Theme.THEME_DARK){ + if(mSplashScreen.getAlpha()<=0 && (status.sTheme != enums.Theme.THEME_DARK && status.sDefaultNightMode)){ int mColor = -1; try{ mColor = Color.parseColor(pTheme); @@ -826,7 +835,7 @@ class homeViewController mVoiceInput.setColorFilter(ContextCompat.getColor(mContext, R.color.c_navigation_tint)); mSearchbar.setTextColor(ContextCompat.getColor(mContext, R.color.c_text_v1)); - if(status.sTheme == enums.Theme.THEME_DARK){ + if(status.sTheme != enums.Theme.THEME_DARK && !status.sDefaultNightMode){ View decorView = mContext.getWindow().getDecorView(); decorView.setSystemUiVisibility(decorView.getSystemUiVisibility() & ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); }else { @@ -919,7 +928,6 @@ class homeViewController void onNewTab(){ mSearchbar.requestFocus(); mSearchbar.selectAll(); - ((InputMethodManager)mContext.getSystemService(Context.INPUT_METHOD_SERVICE)).toggleSoftInput(InputMethodManager.SHOW_FORCED, InputMethodManager.HIDE_IMPLICIT_ONLY); } void onUpdateLogs(String log){ @@ -1054,7 +1062,7 @@ class homeViewController initTopBarPadding(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - if(status.sTheme == enums.Theme.THEME_DARK){ + if(status.sTheme == enums.Theme.THEME_DARK || status.sDefaultNightMode){ mContext.getWindow().getDecorView().setSystemUiVisibility(0); }else { mContext.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/landingManager/landingViewController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/landingManager/landingViewController.java index c2ebb64c..8e313763 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/landingManager/landingViewController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/landingManager/landingViewController.java @@ -36,7 +36,7 @@ class landingViewController window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) { - window.setStatusBarColor(ContextCompat.getColor(mContext, R.color.c_text_v3)); + mContext.getWindow().setStatusBarColor(ContextCompat.getColor(mContext, R.color.landing_ease_blue)); } else { mContext.getWindow().setStatusBarColor(ContextCompat.getColor(mContext, R.color.landing_ease_blue)); diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/orbotLogManager/orbotLogAdapter.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/orbotLogManager/orbotLogAdapter.java index a2c08318..bca37541 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/orbotLogManager/orbotLogAdapter.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/orbotLogManager/orbotLogAdapter.java @@ -71,7 +71,7 @@ public class orbotLogAdapter extends RecyclerView.Adapter return mSelectedList.size(); } + private void onRemoveRowCross(int mIndex){ + for(int mCounter=0;mCounter mLoadSession.setOnClickListener(this); } - try{ - mItemSelectionMenuReference.animate().cancel(); - if(this.getLayoutPosition()==mModelList.size()-1){ - if(mSelectedList.size()>0){ - itemView.setVisibility(View.GONE); - mLongPressMenuEnabled = true; - }else { - itemView.setVisibility(View.VISIBLE); - mLongPressMenuEnabled = false; - mItemSelectionMenuButton.animate().cancel(); - mItemSelectionMenuButton.animate().setDuration(250).alpha(1); - } + mItemSelectionMenuReference.animate().cancel(); + if(this.getLayoutPosition()==mModelList.size()-1){ + if(mSelectedList.size()>0){ + itemView.setVisibility(View.GONE); + mLongPressMenuEnabled = true; }else { itemView.setVisibility(View.VISIBLE); mLongPressMenuEnabled = false; + mItemSelectionMenuButton.animate().cancel(); mItemSelectionMenuButton.animate().setDuration(250).alpha(1); } - }catch (Exception ex){ - ex.printStackTrace(); + }else { + itemView.setVisibility(View.VISIBLE); + mLongPressMenuEnabled = false; + mItemSelectionMenuButton.animate().setDuration(250).alpha(1); } } @@ -331,26 +346,7 @@ public class tabAdapter extends RecyclerView.Adapter v.setEnabled(false); v.setFocusableInTouchMode(false); v.setClickable(false); - for(int mCounter=0;mCounter return getSelectionSize(); }else if(pCommands.equals(tabEnums.eTabAdapterCommands.REMOVE_ALL)){ onRemoveAll(); + }else if(pCommands.equals(tabEnums.eTabAdapterCommands.REMOVE_ROW_CROSSED)){ + onRemoveRowCross((int)pData.get(0)); } return null; } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabController.java index b98221a7..0f77ec64 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabController.java @@ -2,9 +2,8 @@ package com.darkweb.genesissearchengine.appManager.tabManager; import android.annotation.SuppressLint; import android.graphics.Canvas; -import android.graphics.drawable.ColorDrawable; import android.os.Bundle; -import android.util.Log; +import android.os.Handler; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; @@ -12,7 +11,6 @@ import android.view.ViewGroup; import android.widget.Button; import android.widget.ImageButton; import android.widget.ImageView; -import android.widget.LinearLayout; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; @@ -23,6 +21,8 @@ import androidx.recyclerview.widget.SimpleItemAnimator; import com.darkweb.genesissearchengine.appManager.activityContextManager; import com.darkweb.genesissearchengine.appManager.homeManager.geckoManager.geckoSession; import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController; +import com.darkweb.genesissearchengine.appManager.settingManager.settingHomePage.settingHomeController; +import com.darkweb.genesissearchengine.constants.constants; import com.darkweb.genesissearchengine.constants.status; import com.darkweb.genesissearchengine.dataManager.dataController; import com.darkweb.genesissearchengine.dataManager.dataEnums; @@ -55,7 +55,6 @@ public class tabController extends Fragment private tabViewController mtabViewController; private RecyclerView mRecycleView; private tabAdapter mTabAdapter; - private ColorDrawable mBackground; /*Initializations*/ @@ -90,7 +89,6 @@ public class tabController extends Fragment } public void initializeViews(){ - mBackground = new ColorDrawable(); mRecycleView = mRootView.findViewById(R.id.pRecycleView); mTabs = mRootView.findViewById(R.id.pTabs); mRemoveSelection = mRootView.findViewById(R.id.pRemoveSelection); @@ -128,7 +126,7 @@ public class tabController extends Fragment mRecycleView.setDrawingCacheEnabled(true); mRecycleView.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_HIGH); mRecycleView.setLayoutManager(new LinearLayoutManager(this.getContext())); - initTabCount(); + initTabCount(0); } /*Listeners*/ @@ -171,6 +169,15 @@ public class tabController extends Fragment mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.NOTIFY_SWIPE, Collections.singletonList(position)); } onShowUndoDialog(); + + final Handler handler = new Handler(); + handler.postDelayed(() -> + { + ViewGroup.LayoutParams params = mRecycleView.getLayoutParams(); + params.height = helperMethod.pxFromDp((mTabAdapter.getItemCount()) * 90); + mRecycleView.setLayoutParams(params); + }, 400); + } @Override @@ -193,18 +200,19 @@ public class tabController extends Fragment public void onRemoveTab(int pIndex){ mListModel.onTrigger(tabEnums.eModelCallback.M_REMOVE_TAB,Collections.singletonList(pIndex)); if(mListModel.getList().size()<1){ - mRecycleView.animate().setStartDelay(250).alpha(0); + mRecycleView.animate().setDuration(350).alpha(0); } - initTabCount(); + initTabCount(400); mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.INIT_FIRST_ROW, null); } public boolean onInitRemoveView(int pIndex, boolean pCreateBackup){ mListModel.onTrigger(tabEnums.eModelCallback.M_REMOVE_TAB,Collections.singletonList(pIndex)); mListModel.getList().remove(pIndex); - initTabCount(); if(mListModel.getList().size()<1){ - mRecycleView.animate().setStartDelay(250).alpha(0).withEndAction(() -> mTabAdapter.notifyDataSetChanged()); + mRecycleView.animate().setDuration(350).alpha(0).withEndAction(() -> { + mTabAdapter.notifyDataSetChanged(); + }); return false; }else{ mTabAdapter.notifyItemRangeChanged(pIndex, mTabAdapter.getItemCount() - pIndex); @@ -212,13 +220,20 @@ public class tabController extends Fragment } } - public void initTabCount() + public void initTabCount(int pDelay) { mtabViewController.onTrigger(tabEnums.eTabViewCommands.INIT_TAB_COUNT, Collections.singletonList(mListModel.getList().size())); - ViewGroup.LayoutParams params = mRecycleView.getLayoutParams(); - params.height = helperMethod.pxFromDp(mTabAdapter.getItemCount() * 90); - mRecycleView.setLayoutParams(params); + final Handler handler = new Handler(); + handler.postDelayed(() -> + { + if(mListModel.getList().size()>0){ + ViewGroup.LayoutParams params = mRecycleView.getLayoutParams(); + params.height = helperMethod.pxFromDp((mTabAdapter.getItemCount()) * 90); + mRecycleView.setLayoutParams(params); + } + }, pDelay); + } public void onClose(){ @@ -226,12 +241,12 @@ public class tabController extends Fragment } public void onNewTabInvoked(){ - mHomeController.onBackPressed(); int mBackupList = ((ArrayList)mListModel.onTrigger(tabEnums.eModelCallback.M_GET_BACKUP,null)).size(); if(mListModel.getList().size()-mBackupList>=1){ mHomeController.onNewTabBackground(true,false); } onClose(); + mHomeController.onBackPressed(); } public void onRestoreTab(View view){ @@ -242,13 +257,13 @@ public class tabController extends Fragment initializeList(); mRecycleView.animate().cancel(); mRecycleView.setVisibility(View.VISIBLE); - mRecycleView.animate().setDuration(250).alpha(1); + mRecycleView.animate().setDuration(350).alpha(1); } ArrayList mBackup = (ArrayList)mListModel.onTrigger(tabEnums.eModelCallback.M_LOAD_BACKUP,null); mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.REINIT_DATA, Collections.singletonList(mBackup)); mListModel.onTrigger(tabEnums.eModelCallback.M_CLEAR_BACKUP_RETAIN_DATABASE,null); - initTabCount(); + initTabCount(400); } public void onShowUndoDialog(){ @@ -286,7 +301,7 @@ public class tabController extends Fragment public void onRemoveSelection(View view) { int mSelectionSize = (int)mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.GET_SELECTION_SIZE,null); if(mSelectionSize >= mListModel.getList().size()){ - mRecycleView.animate().setStartDelay(250).alpha(0).withEndAction(() -> { + mRecycleView.animate().setDuration(350).alpha(0).withEndAction(() -> { mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.M_REMOVE_ALL_SELECTION, null); onShowUndoDialog(); }); @@ -318,14 +333,14 @@ public class tabController extends Fragment onNewTabInvoked(); } else if(pView.getId() == R.id.pCloseTab){ - mRecycleView.animate().setDuration(250).alpha(0).withEndAction(() -> { + mRecycleView.animate().setDuration(350).alpha(0).withEndAction(() -> { onClearTabBackup(); mTabAdapter.onTrigger(tabEnums.eTabAdapterCommands.REMOVE_ALL, null); - initTabCount(); + initTabCount(400); }); } else if(pView.getId() == R.id.pOpenSetting){ - // helperMethod.openActivity(settingHomeController.class, constants.CONST_LIST_HISTORY, this,true); + helperMethod.openActivity(settingHomeController.class, constants.CONST_LIST_HISTORY, activityContextManager.getInstance().getHomeController(),true); } mtabViewController.onTrigger(tabEnums.eTabViewCommands.M_DISMISS_MENU, null); } @@ -383,16 +398,17 @@ public class tabController extends Fragment onRemoveTab((Integer) data.get(0)); } else if(e_type.equals(tabEnums.eTabAdapterCallback.ON_INIT_TAB_COUNT)){ - initTabCount(); + initTabCount(400); } else if(e_type.equals(tabEnums.eTabAdapterCallback.ON_BACK_PRESSED)){ onBackPressed(); } else if(e_type.equals(tabEnums.eTabAdapterCallback.ON_LOAD_TAB)){ - mHomeController.onLoadTab((geckoSession)data.get(0),(boolean)data.get(1)); + mHomeController.onLoadTab((geckoSession)data.get(0),(boolean)data.get(1),true); } else if(e_type.equals(tabEnums.eTabAdapterCallback.ON_REMOVE_TAB_VIEW)){ onInitRemoveView((Integer) data.get(0), true); + initTabCount(400); } else if(e_type.equals(tabEnums.eTabAdapterCallback.ON_REMOVE_TAB_VIEW_RETAIN_BACKUP)){ onInitRemoveView((Integer) data.get(0), false); diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabEnums.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabEnums.java index fd82c8fe..3bf65263 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabEnums.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabEnums.java @@ -8,7 +8,7 @@ public class tabEnums } public enum eTabAdapterCommands { - M_SELECTION_MENU_SHOWING, M_REMOVE_ALL_SELECTION, M_CLEAR_ALL_SELECTION, ENABLE_LONG_CLICK_MENU, INIT_FIRST_ROW, REINIT_DATA, NOTIFY_SWIPE, GET_SELECTION_SIZE, REMOVE_ALL + M_SELECTION_MENU_SHOWING, M_REMOVE_ALL_SELECTION, M_CLEAR_ALL_SELECTION, ENABLE_LONG_CLICK_MENU, INIT_FIRST_ROW, REINIT_DATA, NOTIFY_SWIPE, GET_SELECTION_SIZE, REMOVE_ALL, REMOVE_ROW_CROSSED } public enum eTabAdapterCallback { diff --git a/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabViewController.java b/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabViewController.java index edded7eb..691a5770 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabViewController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/appManager/tabManager/tabViewController.java @@ -85,6 +85,8 @@ class tabViewController mMenuButton.setAlpha(0f); mMenuButton.animate().setStartDelay(200).setDuration(350).alpha(1); mMenuButton.setVisibility(View.VISIBLE); + + onHideUndoDialogInit(); } public void initExitUI(){ @@ -180,6 +182,13 @@ class tabViewController mToastLayoutRoot.animate().alpha(0).withEndAction(() -> mToastLayoutRoot.setVisibility(View.GONE)); } + private void onHideUndoDialogInit() { + mToastLayoutRoot.animate().cancel(); + mToastLayoutRoot.setAlpha(0); + mToastLayoutRoot.setVisibility(View.GONE); + } + + private void onDrawSwipableBackground(Canvas pCanvas, RecyclerView.ViewHolder pViewHolder, float pDX, int pActionState) { Bitmap icon; @@ -194,18 +203,18 @@ class tabViewController if(pDX > 0){ if(status.sTheme == enums.Theme.THEME_DARK){ - pCanvas.drawARGB(255, 59, 57, 70); + pCanvas.drawARGB(150, 59, 57, 70); }else { - pCanvas.drawARGB(255, 230, 230, 230); + pCanvas.drawARGB(150, 230, 230, 230); } icon = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.dustbin); RectF icon_dest = new RectF((float) itemView.getLeft() + width ,(float) itemView.getTop() + width,(float) itemView.getLeft()+ 2*width,(float)itemView.getBottom() - width); pCanvas.drawBitmap(icon,null,icon_dest, mPainter); } else { if(status.sTheme == enums.Theme.THEME_DARK){ - pCanvas.drawARGB(255, 59, 57, 70); + pCanvas.drawARGB(150, 59, 57, 70); }else { - pCanvas.drawARGB(255, 230, 230, 230); + pCanvas.drawARGB(150, 230, 230, 230); } icon = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.dustbin); RectF icon_dest = new RectF((float) itemView.getRight() - 2*width ,(float) itemView.getTop() + width,(float) itemView.getRight() - width,(float)itemView.getBottom() - width); diff --git a/app/src/main/java/com/darkweb/genesissearchengine/constants/enums.java b/app/src/main/java/com/darkweb/genesissearchengine/constants/enums.java index 40b68f85..fad2c6dc 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/constants/enums.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/constants/enums.java @@ -19,6 +19,12 @@ public class enums public static final int THEME_DEFAULT = 2; } + public static class WidgetResponse { + public static final int NONE = 0; + public static final int VOICE = 1; + public static final int SEARCHBAR = 2; + } + public static class ImageQueueStatus { public static final int M_IMAGE_LOADING = 0; public static final int M_IMAGE_LOADED_SUCCESSFULLY = 1; diff --git a/app/src/main/java/com/darkweb/genesissearchengine/constants/status.java b/app/src/main/java/com/darkweb/genesissearchengine/constants/status.java index 1a811014..5cd19980 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/constants/status.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/constants/status.java @@ -57,6 +57,7 @@ public class status public static int sTheme = enums.Theme.THEME_DEFAULT; public static int sSettingCookieStatus = ContentBlocking.AntiTracking.DEFAULT; public static int sShowImages = -1; + public static int sWidgetResponse = enums.WidgetResponse.NONE; /*Bridge Status*/ diff --git a/app/src/main/java/com/darkweb/genesissearchengine/dataManager/tabDataModel.java b/app/src/main/java/com/darkweb/genesissearchengine/dataManager/tabDataModel.java index 7ffbf3dd..9e8c08a9 100644 --- a/app/src/main/java/com/darkweb/genesissearchengine/dataManager/tabDataModel.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/dataManager/tabDataModel.java @@ -68,7 +68,7 @@ class tabDataModel params[2] = mTabModel.getSession().getTheme(); String m_date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS", Locale.ENGLISH).format(Calendar.getInstance().getTime()); - databaseController.getInstance().execSQL("INSERT INTO tab(mid,date,title,url,theme) VALUES('"+ mTabModel.getmId() +"','" + m_date + "',?,?,?);",params); + databaseController.getInstance().execSQL("REPLACE INTO tab(mid,date,title,url,theme) VALUES('"+ mTabModel.getmId() +"','" + m_date + "',?,?,?);",params); } } @@ -77,12 +77,13 @@ class tabDataModel for(int counter = 0; counter< size; counter++){ if(mTabs.size()>0){ mTabs.get(0).getSession().stop(); - mTabs.get(0).getSession().closeSession(); + mTabs.get(0).getSession().close(); mTabs.remove(0); } } if(mTabs.size()>0){ - mTabs.get(0).getSession().closeSession(); + mTabs.get(0).getSession().close(); + mTabs.remove(0); } databaseController.getInstance().execSQL("DELETE FROM tab WHERE 1",null); @@ -90,11 +91,15 @@ class tabDataModel } void closeTab(geckoSession mSession,Object pID) { + mSession.stop(); + mSession.close(); if(pID == null){ String mID = strings.GENERIC_EMPTY_STR; for(int counter = 0; counter< mTabs.size(); counter++){ if(mTabs.get(counter).getSession().getSessionID().equals(mSession.getSessionID())) { + mTabs.get(counter).getSession().stop(); + mTabs.get(counter).getSession().close(); mTabs.remove(counter); mID = mTabs.get(counter).getmId(); break; @@ -105,6 +110,8 @@ class tabDataModel for(int counter = 0; counter< mTabs.size(); counter++){ if(mTabs.get(counter).getSession().getSessionID().equals(mSession.getSessionID())) { + mTabs.get(counter).getSession().stop(); + mTabs.get(counter).getSession().close(); mTabs.remove(counter); break; } diff --git a/app/src/main/java/com/darkweb/genesissearchengine/helperManager/theme.java b/app/src/main/java/com/darkweb/genesissearchengine/helperManager/theme.java new file mode 100644 index 00000000..4d1b6557 --- /dev/null +++ b/app/src/main/java/com/darkweb/genesissearchengine/helperManager/theme.java @@ -0,0 +1,120 @@ +package com.darkweb.genesissearchengine.helperManager; + + +import android.content.Context; +import android.content.res.Configuration; +import android.content.res.Resources; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatDelegate; +import com.darkweb.genesissearchengine.constants.enums; +import com.darkweb.genesissearchengine.constants.status; + +public class theme { + + private boolean mLocalThemeChanged; + private static theme ourInstance = new theme(); + int mode = -1; + + public static theme getInstance() + { + return ourInstance; + } + + public void onConfigurationChanged(AppCompatActivity pContext){ + boolean sDefaultNightMode = (pContext.getApplicationContext().getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES; + if(status.sDefaultNightMode != sDefaultNightMode){ + setupThemeLocal(pContext, sDefaultNightMode); + pContext.recreate(); + } + } + + public void setupThemeLocal(Context context, boolean sDefaultNightMode) { + Resources res = context.getResources(); + mode = res.getConfiguration().uiMode; + + if(status.sTheme == enums.Theme.THEME_DARK){ + if(AppCompatDelegate.getDefaultNightMode() != AppCompatDelegate.MODE_NIGHT_YES){ + AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES); + mode = Configuration.UI_MODE_NIGHT_YES; + mLocalThemeChanged = true; + } + }else if(status.sTheme == enums.Theme.THEME_LIGHT){ + if(AppCompatDelegate.getDefaultNightMode() != AppCompatDelegate.MODE_NIGHT_NO){ + AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO); + mode = Configuration.UI_MODE_NIGHT_NO; + mLocalThemeChanged = true; + } + }else { + if(!sDefaultNightMode){ + if(AppCompatDelegate.getDefaultNightMode() != AppCompatDelegate.MODE_NIGHT_NO){ + AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO); + mode = Configuration.UI_MODE_NIGHT_NO; + mLocalThemeChanged = true; + } + }else { + if(AppCompatDelegate.getDefaultNightMode() != AppCompatDelegate.MODE_NIGHT_YES){ + AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES); + mode = Configuration.UI_MODE_NIGHT_YES; + mLocalThemeChanged = true; + } + } + } + + } + + public Context setupTheme(Context context) { + + Resources res = context.getResources(); + + if(mode==-1){ + mode = res.getConfiguration().uiMode; + + if(status.sTheme == enums.Theme.THEME_DARK){ + if(AppCompatDelegate.getDefaultNightMode() != AppCompatDelegate.MODE_NIGHT_YES){ + AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES); + mode = Configuration.UI_MODE_NIGHT_YES; + } + }else if(status.sTheme == enums.Theme.THEME_LIGHT){ + if(AppCompatDelegate.getDefaultNightMode() != AppCompatDelegate.MODE_NIGHT_NO){ + AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO); + mode = Configuration.UI_MODE_NIGHT_NO; + } + }else { + if(!status.sDefaultNightMode){ + if(AppCompatDelegate.getDefaultNightMode() != AppCompatDelegate.MODE_NIGHT_NO){ + AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO); + mode = Configuration.UI_MODE_NIGHT_NO; + } + }else { + if(AppCompatDelegate.getDefaultNightMode() != AppCompatDelegate.MODE_NIGHT_YES){ + AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES); + mode = Configuration.UI_MODE_NIGHT_YES; + } + } + } + } + + Configuration config = new Configuration(res.getConfiguration()); + config.uiMode = mode; + context = context.createConfigurationContext(config); + return context; + } + + public Context initTheme(Context pContext){ + boolean sDefaultNightMode = (pContext.getApplicationContext().getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES; + boolean sDefaultNightModeCurrent = (pContext.getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES; + + if(status.sSettingIsAppStarted){ + status.mThemeApplying = true; + } + + status.sDefaultNightMode = sDefaultNightMode; + pContext = setupTheme(pContext); + + mLocalThemeChanged = false; + mode = -1; + + return pContext; + } + +} diff --git a/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/pluginController.java b/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/pluginController.java index 44f57ad4..19c485ac 100755 --- a/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/pluginController.java +++ b/app/src/main/java/com/darkweb/genesissearchengine/pluginManager/pluginController.java @@ -1,5 +1,7 @@ package com.darkweb.genesissearchengine.pluginManager; +import android.util.Log; + import androidx.appcompat.app.AppCompatActivity; import com.darkweb.genesissearchengine.appManager.activityContextManager; import com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController; @@ -211,7 +213,7 @@ public class pluginController mContextManager.getHistoryController().onclearData(); mHomeController.onClearSession(); dataController.getInstance().invokeTab(dataEnums.eTabCommands.M_CLEAR_TAB, null); - mHomeController.initTab(false); + mHomeController.initTab(true); } else if(pEventType.equals(M_CLEAR_BOOKMARK)){ dataController.getInstance().invokeBookmark(dataEnums.eBookmarkCommands.M_CLEAR_BOOKMARK ,pData); diff --git a/app/src/main/java/com/widget/search/searchWidgetManager.java b/app/src/main/java/com/widget/search/searchWidgetManager.java new file mode 100644 index 00000000..c831d823 --- /dev/null +++ b/app/src/main/java/com/widget/search/searchWidgetManager.java @@ -0,0 +1,112 @@ +package com.widget.search; + +import android.app.PendingIntent; +import android.appwidget.AppWidgetManager; +import android.appwidget.AppWidgetProvider; +import android.content.Context; +import android.content.Intent; +import android.content.SharedPreferences; +import android.os.Bundle; +import android.widget.RemoteViews; + +import com.darkweb.genesissearchengine.constants.enums; +import com.darkweb.genesissearchengine.constants.status; +import com.example.myapplication.R; + +public class searchWidgetManager extends AppWidgetProvider { + + private static final String SHARED_PREF_FILE = "com.example.android.appwidgetsample"; + private static final String COUNT_KEY = "count"; + + private void updateAppWidget(Context context, AppWidgetManager appWidgetManager, int appWidgetId) { + + SharedPreferences prefs = context.getSharedPreferences(SHARED_PREF_FILE, 0); + int count = prefs.getInt(COUNT_KEY + appWidgetId, 0); + count++; + + RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_search_controller); + + SharedPreferences.Editor prefEditor = prefs.edit(); + prefEditor.putInt(COUNT_KEY + appWidgetId, count); + prefEditor.apply(); + + int[] idArray = new int[]{appWidgetId}; + Intent intentUpdate = new Intent(context, searchWidgetManager.class); + intentUpdate.setAction("mOpenApplication"); + intentUpdate.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, idArray); + PendingIntent pendingUpdate = PendingIntent.getBroadcast(context, appWidgetId, intentUpdate, PendingIntent.FLAG_UPDATE_CURRENT); + + Intent mintentUpdate = new Intent(context, searchWidgetManager.class); + mintentUpdate.setAction("mOpenVoice"); + mintentUpdate.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, idArray); + PendingIntent mpintentUpdate = PendingIntent.getBroadcast(context, appWidgetId, mintentUpdate, PendingIntent.FLAG_UPDATE_CURRENT); + + views.setOnClickPendingIntent(R.id.pSearchLogo, pendingUpdate); + views.setOnClickPendingIntent(R.id.pTopBarContainer, pendingUpdate); + views.setOnClickPendingIntent(R.id.pSearchInput, pendingUpdate); + views.setOnClickPendingIntent(R.id.pVoiceInput, mpintentUpdate); + appWidgetManager.updateAppWidget(appWidgetId, views); + } + + public void onReceive(Context context, Intent intent) { + + String action = intent.getAction(); + if(action.equals("mOpenApplication")){ + status.sWidgetResponse = enums.WidgetResponse.SEARCHBAR; + Intent launchIntent = context.getPackageManager().getLaunchIntentForPackage("com.darkweb.genesissearchengine"); + launchIntent.putExtra("mOpenApplication",true); + context.startActivity(launchIntent); + } + else if(action.equals("mOpenVoice")){ + status.sWidgetResponse = enums.WidgetResponse.VOICE; + Intent launchIntent = context.getPackageManager().getLaunchIntentForPackage("com.darkweb.genesissearchengine"); + launchIntent.putExtra("mOpenApplication",true); + context.startActivity(launchIntent); + } + else if (AppWidgetManager.ACTION_APPWIDGET_UPDATE.equals(action)) { + Bundle extras = intent.getExtras(); + if (extras != null) { + int[] appWidgetIds = extras.getIntArray(AppWidgetManager.EXTRA_APPWIDGET_IDS); + if (appWidgetIds != null && appWidgetIds.length > 0) { + this.onUpdate(context, AppWidgetManager.getInstance(context), appWidgetIds); + } + } + } else if (AppWidgetManager.ACTION_APPWIDGET_DELETED.equals(action)) { + Bundle extras = intent.getExtras(); + if (extras != null && extras.containsKey(AppWidgetManager.EXTRA_APPWIDGET_ID)) { + final int appWidgetId = extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID); + this.onDeleted(context, new int[] { appWidgetId }); + } + } else if (AppWidgetManager.ACTION_APPWIDGET_OPTIONS_CHANGED.equals(action)) { + Bundle extras = intent.getExtras(); + if (extras != null && extras.containsKey(AppWidgetManager.EXTRA_APPWIDGET_ID) + && extras.containsKey(AppWidgetManager.EXTRA_APPWIDGET_OPTIONS)) { + int appWidgetId = extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID); + Bundle widgetExtras = extras.getBundle(AppWidgetManager.EXTRA_APPWIDGET_OPTIONS); + this.onAppWidgetOptionsChanged(context, AppWidgetManager.getInstance(context), + appWidgetId, widgetExtras); + } + } else if (AppWidgetManager.ACTION_APPWIDGET_ENABLED.equals(action)) { + this.onEnabled(context); + } else if (AppWidgetManager.ACTION_APPWIDGET_DISABLED.equals(action)) { + this.onDisabled(context); + } else if (AppWidgetManager.ACTION_APPWIDGET_RESTORED.equals(action)) { + Bundle extras = intent.getExtras(); + if (extras != null) { + int[] oldIds = extras.getIntArray(AppWidgetManager.EXTRA_APPWIDGET_OLD_IDS); + int[] newIds = extras.getIntArray(AppWidgetManager.EXTRA_APPWIDGET_IDS); + if (oldIds != null && oldIds.length > 0) { + this.onRestored(context, oldIds, newIds); + this.onUpdate(context, AppWidgetManager.getInstance(context), newIds); + } + } + } + } + + @Override + public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { + for (int appWidgetId : appWidgetIds) { + updateAppWidget(context, appWidgetManager, appWidgetId); + } + } +} \ No newline at end of file diff --git a/app/src/main/res/custom-xml/alert/xml/ax_load_new_tab.xml b/app/src/main/res/custom-xml/alert/xml/ax_load_new_tab.xml new file mode 100644 index 00000000..f96a98d5 --- /dev/null +++ b/app/src/main/res/custom-xml/alert/xml/ax_load_new_tab.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/custom-xml/alert/xml/ax_ripple_default_round_right.xml b/app/src/main/res/custom-xml/alert/xml/ax_ripple_default_round_right.xml index e399ab35..111ed5e4 100644 --- a/app/src/main/res/custom-xml/alert/xml/ax_ripple_default_round_right.xml +++ b/app/src/main/res/custom-xml/alert/xml/ax_ripple_default_round_right.xml @@ -4,10 +4,10 @@ + android:topLeftRadius="4dp" + android:topRightRadius="4dp"/> \ No newline at end of file diff --git a/app/src/main/res/custom-xml/generic/xml/gx_generic_input_white.xml b/app/src/main/res/custom-xml/generic/xml/gx_generic_input_white.xml new file mode 100644 index 00000000..9cfc70ea --- /dev/null +++ b/app/src/main/res/custom-xml/generic/xml/gx_generic_input_white.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable-hdpi/widget_ref.png b/app/src/main/res/drawable-hdpi/widget_ref.png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<;#y#66zYB<6FCCk(&bElCx(M(=4en_|cU~nlLB#Y)(ZF_xR04 zUmqLLhB^J{WIMDKZB9LG;6#&yLNU{mCUPCK5e%f1KYlpU}^eEupzm5K>Tuz85Q7%ENSt zjFk%K019>np&Za+6#BUZ5*<+^ymJiX(n;~!ZmD;r(?sG#y+i(@_)fPVv({ff13;cn zOz4**4e24U_R^0Q=r@urT@Jf9Vj}=|0C%q?VC)FlZudq|9VC*(C8qstXAKP`Y#0`v z_aGBmSi&V3?RDXZW+)wnn#Y_^Z$*r&bmeQcn$R)+uqeXYlM#sr-I_Xojq}{uvv%s4 z!U+(g40a};?C24rj7WR-dKqAG$JE**4y0LBt#h;tY$AXC`3)w>Y;o!?W4&Y3(;@CG za_v&t2hlb*N%PXEy fKP){sC;YA?Zhj2;*#ca)gm>q*zDBt^IPCubc>o9Q literal 0 HcmV?d00001 diff --git a/app/src/main/res/layouts/alert/layout/popup_data_cleared.xml b/app/src/main/res/layouts/alert/layout/popup_data_cleared.xml index a7ad1fad..70b10830 100644 --- a/app/src/main/res/layouts/alert/layout/popup_data_cleared.xml +++ b/app/src/main/res/layouts/alert/layout/popup_data_cleared.xml @@ -3,6 +3,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" + android:layout_marginBottom="20dp" android:layout_width="match_parent" android:layout_height="match_parent"> diff --git a/app/src/main/res/layouts/alert/layout/popup_load_new_tab.xml b/app/src/main/res/layouts/alert/layout/popup_load_new_tab.xml index 51a262c9..61e97ceb 100644 --- a/app/src/main/res/layouts/alert/layout/popup_load_new_tab.xml +++ b/app/src/main/res/layouts/alert/layout/popup_load_new_tab.xml @@ -13,9 +13,9 @@ @@ -25,16 +25,16 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="10dp" - android:layout_marginTop="25dp" - android:alpha="0.6" + android:alpha="0.8" android:paddingStart="15dp" android:paddingEnd="15dp" android:text="@string/ALERT_OPEN_NEW_TAB" android:textAlignment="textStart" - android:textStyle="bold" android:textColor="@color/c_alert_text_inverted" android:textSize="14sp" - app:layout_constraintStart_toStartOf="parent" + android:textStyle="bold" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="@+id/pMainLayout" app:layout_constraintTop_toTopOf="parent" tools:ignore="SmallSp" /> @@ -47,8 +47,8 @@ android:layout_marginBottom="10dp" android:layout_weight="1" android:background="@xml/ax_ripple_default_round_right" - android:padding="0dp" android:onClick="onLoadRecentTab" + android:padding="0dp" android:text="@string/ALERT_OPEN_NEW_TAB_LOAD" android:textAllCaps="false" android:textColor="@color/c_button_text_v1_inverted" @@ -60,19 +60,30 @@ + + + diff --git a/app/src/main/res/layouts/alert/layout/popup_undo.xml b/app/src/main/res/layouts/alert/layout/popup_undo.xml index d5b23791..0e94c748 100644 --- a/app/src/main/res/layouts/alert/layout/popup_undo.xml +++ b/app/src/main/res/layouts/alert/layout/popup_undo.xml @@ -13,7 +13,7 @@ @@ -47,8 +47,8 @@ android:layout_marginBottom="10dp" android:layout_weight="1" android:background="@xml/ax_ripple_default_round_right" + android:onClick="onRestoreTab" android:padding="0dp" - android:onClick="onLoadRecentTab" android:text="@string/ALERT_UNDO_TAB_REMOVE_BUTTON" android:textAllCaps="false" android:textColor="@color/c_button_text_v1_inverted" @@ -60,19 +60,29 @@ + + diff --git a/app/src/main/res/layouts/bookmark/layout/bookmark_view.xml b/app/src/main/res/layouts/bookmark/layout/bookmark_view.xml index c2a11708..0a9b214c 100644 --- a/app/src/main/res/layouts/bookmark/layout/bookmark_view.xml +++ b/app/src/main/res/layouts/bookmark/layout/bookmark_view.xml @@ -55,7 +55,7 @@ android:textSize="17sp" android:textStyle="bold" /> - - - \ No newline at end of file diff --git a/app/src/main/res/layouts/home/layout/home_view.xml b/app/src/main/res/layouts/home/layout/home_view.xml index 43fc7db5..fcb73d9f 100644 --- a/app/src/main/res/layouts/home/layout/home_view.xml +++ b/app/src/main/res/lay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GNa5|5PbYeyQ7DPw|>ER*)1m8dQ+n9i{Sh;i?~UqNls^ zXIO7yN`hMZwu6oBWy~YDcHA|^I`Nx$TfH>1{`dD@%u`>NHw1Ou%eRZ-1}ty + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layouts/searchWidget/values-night/themes.xml b/app/src/main/res/layouts/searchWidget/values-night/themes.xml new file mode 100644 index 00000000..69c78ba9 --- /dev/null +++ b/app/src/main/res/layouts/searchWidget/values-night/themes.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/layouts/searchWidget/values/attrs.xml b/app/src/main/res/layouts/searchWidget/values/attrs.xml new file mode 100644 index 00000000..97531a25 --- /dev/null +++ b/app/src/main/res/layouts/searchWidget/values/attrs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layouts/searchWidget/values/colors.xml b/app/src/main/res/layouts/searchWidget/values/colors.xml new file mode 100644 index 00000000..b2bffa8d --- /dev/null +++ b/app/src/main/res/layouts/searchWidget/values/colors.xml @@ -0,0 +1,6 @@ + + #FFE1F5FE + #FF81D4FA + #FF039BE5 + #FF01579B + \ No newline at end of file diff --git a/app/src/main/res/layouts/searchWidget/values/dimens.xml b/app/src/main/res/layouts/searchWidget/values/dimens.xml new file mode 100644 index 00000000..4db8c590 --- /dev/null +++ b/app/src/main/res/layouts/searchWidget/values/dimens.xml @@ -0,0 +1,10 @@ + + + + + 0dp + + \ No newline at end of file diff --git a/app/src/main/res/layouts/searchWidget/values/strings.xml b/app/src/main/res/layouts/searchWidget/values/strings.xml new file mode 100644 index 00000000..1311c6a2 --- /dev/null +++ b/app/src/main/res/layouts/searchWidget/values/strings.xml @@ -0,0 +1,5 @@ + + + EXAMPLE + Add widget + \ No newline at end of file diff --git a/app/src/main/res/layouts/searchWidget/values/themes.xml b/app/src/main/res/layouts/searchWidget/values/themes.xml new file mode 100644 index 00000000..854d9a92 --- /dev/null +++ b/app/src/main/res/layouts/searchWidget/values/themes.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/layouts/searchWidget/xml/search_widget_manager_info.xml b/app/src/main/res/layouts/searchWidget/xml/search_widget_manager_info.xml new file mode 100644 index 00000000..bacde119 --- /dev/null +++ b/app/src/main/res/layouts/searchWidget/xml/search_widget_manager_info.xml @@ -0,0 +1,11 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/layouts/setting/layout/setting_tracking_view.xml b/app/src/main/res/layouts/setting/layout/setting_tracking_view.xml index 76b29e78..0d90838f 100644 --- a/app/src/main/res/layouts/setting/layout/setting_tracking_view.xml +++ b/app/src/main/res/layouts/setting/layout/setting_tracking_view.xml @@ -131,8 +131,6 @@ android:layout_width="match_parent" android:layout_marginTop="10dp" android:background="@xml/sx_border_left" - android:paddingStart="4dp" - android:paddingEnd="4dp" android:layout_height="wrap_content" android:orientation="vertical"> @@ -148,8 +146,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingBottom="13dp" - android:layout_marginRight="5dp" - android:layout_marginLeft="5dp" + android:layout_marginEnd="0dp" + android:layout_marginStart="5dp" android:background="@xml/gx_ripple_gray" android:onClick="onTracking" android:orientation="vertical"> @@ -162,6 +160,7 @@ android:buttonTint="@color/c_radio_tint" android:textColor="@color/c_text_v1" android:layout_marginEnd="10dp" + android:layout_marginStart="20dp" android:paddingStart="10dp" android:paddingEnd="10dp" android:textSize="15sp" @@ -190,8 +189,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingBottom="13dp" - android:layout_marginRight="5dp" - android:layout_marginLeft="5dp" + android:layout_marginEnd="0dp" + android:layout_marginStart="5dp" android:background="@xml/gx_ripple_gray" android:onClick="onTracking" android:orientation="vertical"> @@ -203,6 +202,7 @@ android:clickable="false" android:buttonTint="@color/c_radio_tint" android:textColor="@color/c_text_v1" + android:layout_marginStart="20dp" android:layout_marginEnd="10dp" android:paddingStart="10dp" android:paddingEnd="10dp" @@ -232,8 +232,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingBottom="13dp" - android:layout_marginRight="5dp" - android:layout_marginLeft="5dp" + android:layout_marginEnd="0dp" + android:layout_marginStart="5dp" android:background="@xml/gx_ripple_gray" android:onClick="onTracking" android:orientation="vertical"> @@ -246,6 +246,7 @@ android:buttonTint="@color/c_radio_tint" android:textColor="@color/c_text_v1" android:layout_marginEnd="10dp" + android:layout_marginStart="20dp" android:paddingStart="10dp" android:paddingEnd="10dp" android:textSize="15sp" diff --git a/app/src/main/res/layouts/tab/layout/tab_view.xml b/app/src/main/res/layouts/tab/layout/tab_view.xml index 92911b9f..5dd0617d 100644 --- a/app/src/main/res/layouts/tab/layout/tab_view.xml +++ b/app/src/main/res/layouts/tab/layout/tab_view.xml @@ -165,12 +165,23 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent"> + + @@ -181,19 +192,6 @@ - - #ffffff #910808 - #f32323 + #f76e6e #33cc33 #00802b #212d45 diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 4f2223d9..76b16fe4 100755 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -3,7 +3,7 @@ #ffffff #501c1b21 #999999 - #1c1b21 + #302e38 #ebebeb #e6e6e6 #e6e6e6 diff --git a/app/src/main/res/values/ids.xml b/app/src/main/res/values/ids.xml new file mode 100644 index 00000000..f3a7d305 --- /dev/null +++ b/app/src/main/res/values/ids.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ec97d562..02a11fff 100755 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -16,6 +16,7 @@ These might be the problems you are facing \n\n• Webpage or Website might be down \n• Your Internet connection might be poor \n• You might be using a proxy \n• Website might be blocked by firewall com.darkweb.genesissearchengine.fileprovider BBC | Israel Strikes Again + Search the web ... ru diff --git a/app/src/test/java/com/example/myapplication/ExampleUnitTest.kt b/app/src/test/java/com/example/genesissearchwidget/ExampleUnitTest.kt old mode 100755 new mode 100644 similarity index 100% rename from app/src/test/java/com/example/myapplication/ExampleUnitTest.kt rename to app/src/test/java/com/example/genesissearchwidget/ExampleUnitTest.kt diff --git a/orbotservice/build.gradle b/orbotservice/build.gradle index e881f448..18a16caf 100755 --- a/orbotservice/build.gradle +++ b/orbotservice/build.gradle @@ -58,7 +58,7 @@ dependencies { implementation 'androidx.core:core:1.3.2' implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0' - testImplementation 'junit:junit:4.13.1' + testImplementation 'junit:junit:4.13.2' implementation 'com.offbynull.portmapper:portmapper:2.0.5' diff --git a/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java b/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java index f8d9963a..e4d43521 100644 --- a/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java +++ b/orbotservice/src/main/java/org/torproject/android/service/OrbotService.java @@ -8,12 +8,14 @@ package org.torproject.android.service; import android.annotation.SuppressLint; +import android.app.ActivityManager; import android.app.Application; import android.app.Notification; import android.app.NotificationChannel; import android.app.NotificationManager; import android.app.PendingIntent; import android.app.Service; +import android.app.TaskStackBuilder; import android.content.BroadcastReceiver; import android.content.ContentResolver; import android.content.ContentValues; @@ -77,6 +79,7 @@ import java.util.Collections; import java.util.Date; import java.util.HashMap; import java.util.Iterator; +import java.util.List; import java.util.Objects; import java.util.Random; import java.util.StringTokenizer; @@ -244,7 +247,6 @@ public class OrbotService extends VpnService implements TorServiceConstants, Orb @SuppressLint("NewApi") protected void showToolbarNotification(String notifyMsg, int notifyType, int icon) { - if(orbotLocalConstants.mHomeContext ==null){ return; } @@ -252,7 +254,6 @@ public class OrbotService extends VpnService implements TorServiceConstants, Orb PackageManager pm = getPackageManager(); Intent mIntent = orbotLocalConstants.mHomeIntent; mIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); - PendingIntent pendIntent = PendingIntent.getActivity(orbotLocalConstants.mHomeContext.get(), 0, mIntent, PendingIntent.FLAG_UPDATE_CURRENT); if (mNotifyBuilder == null) { @@ -264,7 +265,35 @@ public class OrbotService extends VpnService implements TorServiceConstants, Orb .setColor(Color.parseColor("#84989f")) .setSmallIcon(R.drawable.ic_stat_tor_logo); - mNotifyBuilder.setContentIntent(pendIntent); + if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP) { + final ActivityManager activityManager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE); + final List recentTaskInfos = activityManager.getAppTasks(); + if (!recentTaskInfos.isEmpty()) { + for (ActivityManager.AppTask appTaskTaskInfo: recentTaskInfos) { + if (appTaskTaskInfo.getTaskInfo().baseIntent.getComponent().getPackageName().equals("com.darkweb.genesissearchengine")) { + Intent resultIntent = null; + try + { + Class mClass = Class.forName("com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController"); //without the .class + + resultIntent = new Intent(this, mClass); + resultIntent.setAction("android.intent.action.MAIN"); + resultIntent.addCategory("android.intent.category.LAUNCHER"); + PendingIntent resultPendingIntent = PendingIntent.getActivity(this, 0, resultIntent, PendingIntent.FLAG_UPDATE_CURRENT); + mNotifyBuilder.setContentIntent(resultPendingIntent); + + } + catch (ClassNotFoundException e) + { + e.printStackTrace(); + } + } + } + } + }else { + PendingIntent pendIntent = PendingIntent.getActivity(orbotLocalConstants.mHomeContext.get(), 0, mIntent, PendingIntent.FLAG_UPDATE_CURRENT); + mNotifyBuilder.setContentIntent(pendIntent); + } } @@ -276,9 +305,36 @@ public class OrbotService extends VpnService implements TorServiceConstants, Orb Intent intentRefresh = new Intent(); intentRefresh.setAction(CMD_NEWNYM); - PendingIntent pendingIntentNewNym = PendingIntent.getBroadcast(orbotLocalConstants.mHomeContext.get(), 0, intentRefresh, PendingIntent.FLAG_ONE_SHOT); - mNotifyBuilder.addAction(R.drawable.ic_refresh_white_24dp, getString(R.string.menu_new_identity), - pendingIntentNewNym); + + if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP) { + final ActivityManager activityManager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE); + final List recentTaskInfos = activityManager.getAppTasks(); + if (!recentTaskInfos.isEmpty()) { + for (ActivityManager.AppTask appTaskTaskInfo: recentTaskInfos) { + if (appTaskTaskInfo.getTaskInfo().baseIntent.getComponent().getPackageName().equals("com.darkweb.genesissearchengine")) { + Intent resultIntent = null; + try + { + Class mClass = Class.forName("com.darkweb.genesissearchengine.appManager.homeManager.homeController.homeController"); //without the .class + + resultIntent = new Intent(this, mClass); + resultIntent.setAction("android.intent.action.MAIN"); + resultIntent.addCategory("android.intent.category.LAUNCHER"); + PendingIntent resultPendingIntent = PendingIntent.getActivity(this, 0, resultIntent, PendingIntent.FLAG_UPDATE_CURRENT); + mNotifyBuilder.setContentIntent(resultPendingIntent); + + } + catch (ClassNotFoundException e) + { + e.printStackTrace(); + } + } + } + } + }else { + PendingIntent pendIntent = PendingIntent.getActivity(orbotLocalConstants.mHomeContext.get(), 0, mIntent, PendingIntent.FLAG_UPDATE_CURRENT); + mNotifyBuilder.setContentIntent(pendIntent); + } mNotifyBuilder.setOngoing(Prefs.persistNotifications());