mirror of https://github.com/LeOS-GSI/LeOS-Genesis
parent
7a9cbd43e8
commit
f0b43032ac
|
@ -119,9 +119,11 @@ public class bridgeController extends AppCompatActivity implements View.OnFocusC
|
|||
|
||||
@Override
|
||||
public void afterTextChanged(Editable editable) {
|
||||
if (!status.sBridgeCustomBridge.equals("meek") && !status.sBridgeCustomBridge.equals("obfs4") && status.sBridgeCustomBridge.length() <= 5) {
|
||||
mBridgeModel.onTrigger(bridgeEnums.eBridgeModelCommands.M_OBFS_CHECK, null);
|
||||
}
|
||||
try {
|
||||
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 */
|
||||
|
|
|
@ -34,7 +34,6 @@ import java.util.List;
|
|||
|
||||
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_RESET;
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
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 (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));
|
||||
} 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);
|
||||
}
|
||||
}
|
||||
setItemViewOnClickListener(mRowContainer, mRowMenu, mDescription.getText().toString(), p_position, header, mRowMenu, mLogoImage, model.getID(), model.getDate());
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void setFilter(String pFilter) {
|
||||
|
|
|
@ -16,7 +16,9 @@ public class historyModel {
|
|||
}
|
||||
|
||||
private void removeFromMainList(int index) {
|
||||
mModelList.remove(index);
|
||||
try {
|
||||
mModelList.remove(index);
|
||||
}catch (Exception ex){}
|
||||
}
|
||||
|
||||
public void onManualClear(int index) {
|
||||
|
|
|
@ -1430,11 +1430,14 @@ public class homeViewController {
|
|||
|
||||
if (purl[0].length() <= 300) {
|
||||
purl[0] = removeEndingSlash(purl[0]);
|
||||
if(status.sTorBrowsing){
|
||||
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")));
|
||||
}
|
||||
|
||||
try{
|
||||
if(status.sTorBrowsing){
|
||||
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();
|
||||
|
||||
if (isTextSelected) {
|
||||
|
|
|
@ -73,14 +73,16 @@ public class settingHomeController extends AppCompatActivity {
|
|||
|
||||
@Override
|
||||
public void onConfigurationChanged(@NonNull Configuration newConfig) {
|
||||
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
|
||||
if (activityThemeManager.getInstance().onInitTheme(this) && !status.mThemeApplying) {
|
||||
activityContextManager.getInstance().onResetTheme();
|
||||
}
|
||||
try {
|
||||
pluginController.getInstance().onLanguageInvoke(Collections.singletonList(this), pluginEnums.eLangManager.M_ACTIVITY_CREATED);
|
||||
if (activityThemeManager.getInstance().onInitTheme(this) && !status.mThemeApplying) {
|
||||
activityContextManager.getInstance().onResetTheme();
|
||||
}
|
||||
|
||||
helperMethod.updateResources(this, status.mSystemLocale.getDisplayName());
|
||||
activityContextManager.getInstance().getHomeController().updateResources(this, status.mSystemLocale.getDisplayName());
|
||||
pluginController.getInstance().onMessageManagerInvoke(null, M_RESET);
|
||||
helperMethod.updateResources(this, status.mSystemLocale.getDisplayName());
|
||||
activityContextManager.getInstance().getHomeController().updateResources(this, status.mSystemLocale.getDisplayName());
|
||||
pluginController.getInstance().onMessageManagerInvoke(null, M_RESET);
|
||||
}catch (Exception ex){}
|
||||
super.onConfigurationChanged(newConfig);
|
||||
}
|
||||
|
||||
|
|
|
@ -332,56 +332,58 @@ public class messageManager implements View.OnClickListener, DialogInterface.OnD
|
|||
}
|
||||
|
||||
private void openSecureConnectionPopup() {
|
||||
if((boolean)mData.get(6) && !status.sTorBrowsing){
|
||||
initializeDialog(R.layout.non_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);
|
||||
mDialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
|
||||
try{
|
||||
if((boolean)mData.get(6) && !status.sTorBrowsing){
|
||||
initializeDialog(R.layout.non_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);
|
||||
mDialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
|
||||
|
||||
ImageView pSecurePopupRootBlocker = mDialog.findViewById(R.id.pSecurePopupRootBlocker);
|
||||
TextView pSecurePopupSubHeader = mDialog.findViewById(R.id.pSecurePopupSubHeader);
|
||||
Button mSecurePopupCertificate = mDialog.findViewById(R.id.pSecurePopupCertificate);
|
||||
Button mSecurePopupPrivacy = mDialog.findViewById(R.id.pSecurePopupPrivacy);
|
||||
SwitchMaterial mSecureJavascriptStatus = mDialog.findViewById(R.id.pSecurePopupJavascriptStatus);
|
||||
SwitchMaterial mSecureTrackingStatus = mDialog.findViewById(R.id.pSecurePopupTrackingStatus);
|
||||
SwitchMaterial mSecureTrackingProtectionStatus = mDialog.findViewById(R.id.pSecurePopupTrackingProtectionStatus);
|
||||
ImageView pSecurePopupRootBlocker = mDialog.findViewById(R.id.pSecurePopupRootBlocker);
|
||||
TextView pSecurePopupSubHeader = mDialog.findViewById(R.id.pSecurePopupSubHeader);
|
||||
Button mSecurePopupCertificate = mDialog.findViewById(R.id.pSecurePopupCertificate);
|
||||
Button mSecurePopupPrivacy = mDialog.findViewById(R.id.pSecurePopupPrivacy);
|
||||
SwitchMaterial mSecureJavascriptStatus = mDialog.findViewById(R.id.pSecurePopupJavascriptStatus);
|
||||
SwitchMaterial mSecureTrackingStatus = mDialog.findViewById(R.id.pSecurePopupTrackingStatus);
|
||||
SwitchMaterial mSecureTrackingProtectionStatus = mDialog.findViewById(R.id.pSecurePopupTrackingProtectionStatus);
|
||||
|
||||
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"));
|
||||
if(mURL.contains("?")){
|
||||
mURL = mURL.substring(0, mURL.indexOf("?"));
|
||||
}
|
||||
if(status.sTorBrowsing){
|
||||
//pSecurePopupHeader
|
||||
((TextView)mDialog.findViewById(R.id.pSecurePopupHeader)).setText("Tor://");
|
||||
mURL = mURL.replace("http://","onion://").replace("https://","onion://");
|
||||
}
|
||||
pSecurePopupSubHeader.setText(mURL);
|
||||
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"));
|
||||
if(mURL.contains("?")){
|
||||
mURL = mURL.substring(0, mURL.indexOf("?"));
|
||||
}
|
||||
if(status.sTorBrowsing){
|
||||
//pSecurePopupHeader
|
||||
((TextView)mDialog.findViewById(R.id.pSecurePopupHeader)).setText("Tor://");
|
||||
mURL = mURL.replace("http://","onion://").replace("https://","onion://");
|
||||
}
|
||||
pSecurePopupSubHeader.setText(mURL);
|
||||
|
||||
mDialog.setOnDismissListener(this);
|
||||
pSecurePopupRootBlocker.setOnClickListener(this);
|
||||
mSecurePopupCertificate.setOnClickListener(this);
|
||||
mSecurePopupPrivacy.setOnClickListener(this);
|
||||
mDialog.setOnDismissListener(this);
|
||||
pSecurePopupRootBlocker.setOnClickListener(this);
|
||||
mSecurePopupCertificate.setOnClickListener(this);
|
||||
mSecurePopupPrivacy.setOnClickListener(this);
|
||||
|
||||
|
||||
if ((boolean) mData.get(1)) {
|
||||
mSecureJavascriptStatus.setChecked(true);
|
||||
} else {
|
||||
mSecureJavascriptStatus.setChecked(false);
|
||||
}
|
||||
if ((boolean) mData.get(2)) {
|
||||
mSecureTrackingStatus.setChecked(true);
|
||||
} else {
|
||||
mSecureTrackingStatus.setChecked(false);
|
||||
}
|
||||
if ((int) mData.get(3) != ContentBlocking.AntiTracking.NONE) {
|
||||
mSecureTrackingProtectionStatus.setChecked(true);
|
||||
} else {
|
||||
mSecureTrackingProtectionStatus.setChecked(false);
|
||||
}
|
||||
if ((boolean) mData.get(1)) {
|
||||
mSecureJavascriptStatus.setChecked(true);
|
||||
} else {
|
||||
mSecureJavascriptStatus.setChecked(false);
|
||||
}
|
||||
if ((boolean) mData.get(2)) {
|
||||
mSecureTrackingStatus.setChecked(true);
|
||||
} else {
|
||||
mSecureTrackingStatus.setChecked(false);
|
||||
}
|
||||
if ((int) mData.get(3) != ContentBlocking.AntiTracking.NONE) {
|
||||
mSecureTrackingProtectionStatus.setChecked(true);
|
||||
} else {
|
||||
mSecureTrackingProtectionStatus.setChecked(false);
|
||||
}
|
||||
}catch (Exception ex){}
|
||||
}
|
||||
|
||||
private void downloadFileLongPress() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* Version */
|
||||
project.ext.vname = 'Build | Dark-Origin 1.1.0.3'
|
||||
project.ext.vcode = 535
|
||||
project.ext.vname = 'Build | Dark-Origin 1.1.0.4'
|
||||
project.ext.vcode = 540
|
||||
project.ext.buildType = 'release'
|
||||
project.ext.jvmTarget = "1.8"
|
||||
project.ext.applovin_key = "pCPe4EeU2ZQVwQPeHLgseRqHBX1V5pvo9Piuu4J809dRhadEgukXa1A8po_UeXu5hmPOTaP1v4QPaMKIEOhh50"
|
||||
|
|
|
@ -305,7 +305,11 @@ public class OrbotService extends VpnService implements OrbotConstants {
|
|||
}
|
||||
|
||||
if(orbotLocalConstants.mNotificationStatus != 0){
|
||||
startForeground(NOTIFY_ID, mNotifyBuilder.build());
|
||||
if(orbotLocalConstants.mNotificationStatus != 0){
|
||||
try {
|
||||
startForeground(NOTIFY_ID, mNotifyBuilder.build());
|
||||
}catch (Exception ex){}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue