Bug Fixes

Bug Fixes
master
Abdul Mannan Saeed 2023-03-04 01:31:09 +05:00
parent 7a9cbd43e8
commit f0b43032ac
8 changed files with 82 additions and 66 deletions

View File

@ -119,9 +119,11 @@ public class bridgeController extends AppCompatActivity implements View.OnFocusC
@Override @Override
public void afterTextChanged(Editable editable) { public void afterTextChanged(Editable editable) {
if (!status.sBridgeCustomBridge.equals("meek") && !status.sBridgeCustomBridge.equals("obfs4") && status.sBridgeCustomBridge.length() <= 5) { try {
mBridgeModel.onTrigger(bridgeEnums.eBridgeModelCommands.M_OBFS_CHECK, null); if (!status.sBridgeCustomBridge.equals("meek") && !status.sBridgeCustomBridge.equals("obfs4") && status.sBridgeCustomBridge.length() <= 5) {
} mBridgeModel.onTrigger(bridgeEnums.eBridgeModelCommands.M_OBFS_CHECK, null);
}
}catch (Exception ex){}
} }
/* VIEW LISTENERS */ /* VIEW LISTENERS */

View File

@ -34,7 +34,6 @@ import java.util.List;
import static android.content.Context.LAYOUT_INFLATER_SERVICE; import static android.content.Context.LAYOUT_INFLATER_SERVICE;
import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eMessageManager.M_COPY; import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eMessageManager.M_COPY;
import static com.hiddenservices.onionservices.pluginManager.pluginEnums.eMessageManager.M_RESET;
@SuppressLint("NotifyDataSetChanged") @SuppressLint("NotifyDataSetChanged")
public class historyAdapter extends RecyclerView.Adapter<historyAdapter.listViewHolder> { public class historyAdapter extends RecyclerView.Adapter<historyAdapter.listViewHolder> {
@ -523,12 +522,13 @@ public class historyAdapter extends RecyclerView.Adapter<historyAdapter.listView
if(status.sLowMemory != enums.MemoryStatus.LOW_MEMORY && status.sLowMemory != enums.MemoryStatus.CRITICAL_MEMORY){ if(status.sLowMemory != enums.MemoryStatus.LOW_MEMORY && status.sLowMemory != enums.MemoryStatus.CRITICAL_MEMORY){
if (model.getDescription().contains("167.86.99.31") || model.getDescription().contains("orion.onion")) { if (model.getDescription().contains("167.86.99.31") || model.getDescription().contains("orion.onion")) {
setItemViewOnClickListener(mRowContainer, mRowMenu, mDescription.getText().toString(), p_position, header, mRowMenu, mLogoImage, model.getID(), model.getDate());
mFaviconLogo.setImageDrawable(itemView.getResources().getDrawable(R.drawable.genesis)); mFaviconLogo.setImageDrawable(itemView.getResources().getDrawable(R.drawable.genesis));
} else { } else {
setItemViewOnClickListener(mRowContainer, mRowMenu, mDescription.getText().toString(), p_position, header, mRowMenu, mLogoImage, model.getID(), model.getDate());
mEvent.invokeObserver(Arrays.asList(mFaviconLogo, "https://" + helperMethod.getDomainName(model.getDescription())), historyEnums.eHistoryAdapterCallback.ON_FETCH_FAVICON); mEvent.invokeObserver(Arrays.asList(mFaviconLogo, "https://" + helperMethod.getDomainName(model.getDescription())), historyEnums.eHistoryAdapterCallback.ON_FETCH_FAVICON);
} }
} }
setItemViewOnClickListener(mRowContainer, mRowMenu, mDescription.getText().toString(), p_position, header, mRowMenu, mLogoImage, model.getID(), model.getDate());
} }
if (mLongSelectedID.size() > 0) { if (mLongSelectedID.size() > 0) {
@ -545,6 +545,7 @@ public class historyAdapter extends RecyclerView.Adapter<historyAdapter.listView
mPopupWindow = (PopupWindow) mHistroyAdapterView.onTrigger(historyEnums.eHistoryViewAdapterCommands.M_CLEAR_HIGHLIGHT, Arrays.asList(mRowContainer, mRowMenu, mLogoImage, true, false)); mPopupWindow = (PopupWindow) mHistroyAdapterView.onTrigger(historyEnums.eHistoryViewAdapterCommands.M_CLEAR_HIGHLIGHT, Arrays.asList(mRowContainer, mRowMenu, mLogoImage, true, false));
} }
} }
} }
public void setFilter(String pFilter) { public void setFilter(String pFilter) {

View File

@ -16,7 +16,9 @@ public class historyModel {
} }
private void removeFromMainList(int index) { private void removeFromMainList(int index) {
mModelList.remove(index); try {
mModelList.remove(index);
}catch (Exception ex){}
} }
public void onManualClear(int index) { public void onManualClear(int index) {

View File

@ -1430,11 +1430,14 @@ public class homeViewController {
if (purl[0].length() <= 300) { if (purl[0].length() <= 300) {
purl[0] = removeEndingSlash(purl[0]); purl[0] = removeEndingSlash(purl[0]);
if(status.sTorBrowsing){
mSearchbar.setText(helperMethod.urlDesigner(showProtocol, purl[0], mContext, mSearchbar.getCurrentTextColor(), status.sTheme, true)); try{
}else { if(status.sTorBrowsing){
mSearchbar.setText(helperMethod.urlDesigner(showProtocol, purl[0], mContext, mSearchbar.getCurrentTextColor(), status.sTheme, ssl_status || purl[0].contains("orion.onion"))); mSearchbar.setText(helperMethod.urlDesigner(showProtocol, purl[0], mContext, mSearchbar.getCurrentTextColor(), status.sTheme, true));
} }else {
mSearchbar.setText(helperMethod.urlDesigner(showProtocol, purl[0], mContext, mSearchbar.getCurrentTextColor(), status.sTheme, ssl_status || purl[0].contains("orion.onion")));
}
}catch (Exception ex){}
mSearchbar.selectAll(); mSearchbar.selectAll();
if (isTextSelected) { if (isTextSelected) {

View File

@ -73,14 +73,16 @@ public class settingHomeController extends AppCompatActivity {
@Override @Override
public void onConfigurationChanged(@NonNull Configuration newConfig) { public void onConfigurationChanged(@NonNull Configuration newConfig) {
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED); try {
if (activityThemeManager.getInstance().onInitTheme(this) && !status.mThemeApplying) { pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
activityContextManager.getInstance().onResetTheme(); if (activityThemeManager.getInstance().onInitTheme(this) && !status.mThemeApplying) {
} activityContextManager.getInstance().onResetTheme();
}
helperMethod.updateResources(this, status.mSystemLocale.getDisplayName()); helperMethod.updateResources(this, status.mSystemLocale.getDisplayName());
activityContextManager.getInstance().getHomeController().updateResources(this, status.mSystemLocale.getDisplayName()); activityContextManager.getInstance().getHomeController().updateResources(this, status.mSystemLocale.getDisplayName());
pluginController.getInstance().onMessageManagerInvoke(null, M_RESET); pluginController.getInstance().onMessageManagerInvoke(null, M_RESET);
}catch (Exception ex){}
super.onConfigurationChanged(newConfig); super.onConfigurationChanged(newConfig);
} }

View File

@ -332,56 +332,58 @@ public class messageManager implements View.OnClickListener, DialogInterface.OnD
} }
private void openSecureConnectionPopup() { private void openSecureConnectionPopup() {
if((boolean)mData.get(6) && !status.sTorBrowsing){ try{
initializeDialog(R.layout.non_secure_connection_popup, Gravity.TOP); if((boolean)mData.get(6) && !status.sTorBrowsing){
}else { initializeDialog(R.layout.non_secure_connection_popup, Gravity.TOP);
initializeDialog(R.layout.secure_connection_popup, Gravity.TOP); }else {
} initializeDialog(R.layout.secure_connection_popup, Gravity.TOP);
InsetDrawable inset = new InsetDrawable(new ColorDrawable(Color.TRANSPARENT), 0, 0, 0, -1); }
mDialog.getWindow().setBackgroundDrawable(inset); InsetDrawable inset = new InsetDrawable(new ColorDrawable(Color.TRANSPARENT), 0, 0, 0, -1);
mDialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND); mDialog.getWindow().setBackgroundDrawable(inset);
mDialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
ImageView pSecurePopupRootBlocker = mDialog.findViewById(R.id.pSecurePopupRootBlocker); ImageView pSecurePopupRootBlocker = mDialog.findViewById(R.id.pSecurePopupRootBlocker);
TextView pSecurePopupSubHeader = mDialog.findViewById(R.id.pSecurePopupSubHeader); TextView pSecurePopupSubHeader = mDialog.findViewById(R.id.pSecurePopupSubHeader);
Button mSecurePopupCertificate = mDialog.findViewById(R.id.pSecurePopupCertificate); Button mSecurePopupCertificate = mDialog.findViewById(R.id.pSecurePopupCertificate);
Button mSecurePopupPrivacy = mDialog.findViewById(R.id.pSecurePopupPrivacy); Button mSecurePopupPrivacy = mDialog.findViewById(R.id.pSecurePopupPrivacy);
SwitchMaterial mSecureJavascriptStatus = mDialog.findViewById(R.id.pSecurePopupJavascriptStatus); SwitchMaterial mSecureJavascriptStatus = mDialog.findViewById(R.id.pSecurePopupJavascriptStatus);
SwitchMaterial mSecureTrackingStatus = mDialog.findViewById(R.id.pSecurePopupTrackingStatus); SwitchMaterial mSecureTrackingStatus = mDialog.findViewById(R.id.pSecurePopupTrackingStatus);
SwitchMaterial mSecureTrackingProtectionStatus = mDialog.findViewById(R.id.pSecurePopupTrackingProtectionStatus); SwitchMaterial mSecureTrackingProtectionStatus = mDialog.findViewById(R.id.pSecurePopupTrackingProtectionStatus);
pSecurePopupRootBlocker.animate().setStartDelay(100).setDuration(400).alpha(1); pSecurePopupRootBlocker.animate().setStartDelay(100).setDuration(400).alpha(1);
String mURL = helperMethod.getDomainName(mData.get(0).toString().replace("167.86.99.31", "orion.onion").replace(CONST_GENESIS_URL_CACHED, "orion.onion").replace(CONST_GENESIS_URL_CACHED_DARK, "orion.onion")); String mURL = helperMethod.getDomainName(mData.get(0).toString().replace("167.86.99.31", "orion.onion").replace(CONST_GENESIS_URL_CACHED, "orion.onion").replace(CONST_GENESIS_URL_CACHED_DARK, "orion.onion"));
if(mURL.contains("?")){ if(mURL.contains("?")){
mURL = mURL.substring(0, mURL.indexOf("?")); mURL = mURL.substring(0, mURL.indexOf("?"));
} }
if(status.sTorBrowsing){ if(status.sTorBrowsing){
//pSecurePopupHeader //pSecurePopupHeader
((TextView)mDialog.findViewById(R.id.pSecurePopupHeader)).setText("Tor://"); ((TextView)mDialog.findViewById(R.id.pSecurePopupHeader)).setText("Tor://");
mURL = mURL.replace("http://","onion://").replace("https://","onion://"); mURL = mURL.replace("http://","onion://").replace("https://","onion://");
} }
pSecurePopupSubHeader.setText(mURL); pSecurePopupSubHeader.setText(mURL);
mDialog.setOnDismissListener(this); mDialog.setOnDismissListener(this);
pSecurePopupRootBlocker.setOnClickListener(this); pSecurePopupRootBlocker.setOnClickListener(this);
mSecurePopupCertificate.setOnClickListener(this); mSecurePopupCertificate.setOnClickListener(this);
mSecurePopupPrivacy.setOnClickListener(this); mSecurePopupPrivacy.setOnClickListener(this);
if ((boolean) mData.get(1)) { if ((boolean) mData.get(1)) {
mSecureJavascriptStatus.setChecked(true); mSecureJavascriptStatus.setChecked(true);
} else { } else {
mSecureJavascriptStatus.setChecked(false); mSecureJavascriptStatus.setChecked(false);
} }
if ((boolean) mData.get(2)) { if ((boolean) mData.get(2)) {
mSecureTrackingStatus.setChecked(true); mSecureTrackingStatus.setChecked(true);
} else { } else {
mSecureTrackingStatus.setChecked(false); mSecureTrackingStatus.setChecked(false);
} }
if ((int) mData.get(3) != ContentBlocking.AntiTracking.NONE) { if ((int) mData.get(3) != ContentBlocking.AntiTracking.NONE) {
mSecureTrackingProtectionStatus.setChecked(true); mSecureTrackingProtectionStatus.setChecked(true);
} else { } else {
mSecureTrackingProtectionStatus.setChecked(false); mSecureTrackingProtectionStatus.setChecked(false);
} }
}catch (Exception ex){}
} }
private void downloadFileLongPress() { private void downloadFileLongPress() {

View File

@ -1,6 +1,6 @@
/* Version */ /* Version */
project.ext.vname = 'Build | Dark-Origin 1.1.0.3' project.ext.vname = 'Build | Dark-Origin 1.1.0.4'
project.ext.vcode = 535 project.ext.vcode = 540
project.ext.buildType = 'release' project.ext.buildType = 'release'
project.ext.jvmTarget = "1.8" project.ext.jvmTarget = "1.8"
project.ext.applovin_key = "pCPe4EeU2ZQVwQPeHLgseRqHBX1V5pvo9Piuu4J809dRhadEgukXa1A8po_UeXu5hmPOTaP1v4QPaMKIEOhh50" project.ext.applovin_key = "pCPe4EeU2ZQVwQPeHLgseRqHBX1V5pvo9Piuu4J809dRhadEgukXa1A8po_UeXu5hmPOTaP1v4QPaMKIEOhh50"

View File

@ -305,7 +305,11 @@ public class OrbotService extends VpnService implements OrbotConstants {
} }
if(orbotLocalConstants.mNotificationStatus != 0){ if(orbotLocalConstants.mNotificationStatus != 0){
startForeground(NOTIFY_ID, mNotifyBuilder.build()); if(orbotLocalConstants.mNotificationStatus != 0){
try {
startForeground(NOTIFY_ID, mNotifyBuilder.build());
}catch (Exception ex){}
}
} }
} }