diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser index c1f4da1e..91888268 100644 Binary files a/.idea/caches/build_file_checksums.ser and b/.idea/caches/build_file_checksums.ser differ diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 00000000..681f41ae --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,116 @@ + + + + + + + +
+ + + + xmlns:android + + ^$ + + + +
+
+ + + + xmlns:.* + + ^$ + + + BY_NAME + +
+
+ + + + .*:id + + http://schemas.android.com/apk/res/android + + + +
+
+ + + + .*:name + + http://schemas.android.com/apk/res/android + + + +
+
+ + + + name + + ^$ + + + +
+
+ + + + style + + ^$ + + + +
+
+ + + + .* + + ^$ + + + BY_NAME + +
+
+ + + + .* + + http://schemas.android.com/apk/res/android + + + ANDROID_ATTRIBUTE_ORDER + +
+
+ + + + .* + + .* + + + BY_NAME + +
+
+
+
+
+
\ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index cda2e337..85e3bd3a 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -3,8 +3,13 @@ + + + + + diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 94a25f7f..35eb1ddf 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/app/src/main/java/com/gmeremit/online/gmeremittance_native/autodebitV2/model/autodebitaccountlisting/AutoDebitAddSeriveAuthenticationServiceModel.java b/app/src/main/java/com/gmeremit/online/gmeremittance_native/autodebitV2/model/autodebitaccountlisting/AutoDebitAddSeriveAuthenticationServiceModel.java index 2688dfde..4478b400 100644 --- a/app/src/main/java/com/gmeremit/online/gmeremittance_native/autodebitV2/model/autodebitaccountlisting/AutoDebitAddSeriveAuthenticationServiceModel.java +++ b/app/src/main/java/com/gmeremit/online/gmeremittance_native/autodebitV2/model/autodebitaccountlisting/AutoDebitAddSeriveAuthenticationServiceModel.java @@ -13,9 +13,7 @@ public class AutoDebitAddSeriveAuthenticationServiceModel { } public String getAuthenticatedUrl() { -// if(authenticatedUrl==null) -// return null; -// return authenticatedUrl.replace("&redirect_uri=http://gmeuat.gmeremit.com:5013/Dashboard/AutoDebit&auth_type=1","&auth_type=1"); + return authenticatedUrl; } diff --git a/app/src/main/java/com/gmeremit/online/gmeremittance_native/autodebitV2/presenter/autodebitaccountlisting/AutoDebitAccountListingV2Presenter.java b/app/src/main/java/com/gmeremit/online/gmeremittance_native/autodebitV2/presenter/autodebitaccountlisting/AutoDebitAccountListingV2Presenter.java index f04b3232..9ddf7c28 100644 --- a/app/src/main/java/com/gmeremit/online/gmeremittance_native/autodebitV2/presenter/autodebitaccountlisting/AutoDebitAccountListingV2Presenter.java +++ b/app/src/main/java/com/gmeremit/online/gmeremittance_native/autodebitV2/presenter/autodebitaccountlisting/AutoDebitAccountListingV2Presenter.java @@ -113,7 +113,7 @@ public class AutoDebitAccountListingV2Presenter extends BasePresenter implements public String getOperationURL(String language) { - return postUrl + "&lang=" + language; + return removeUnusedQueryParam( postUrl) + "&lang=" + language; } public class AutoDebitAccountListingObserver extends GenericApiObserverResponseV2 { @@ -232,7 +232,7 @@ public class AutoDebitAccountListingV2Presenter extends BasePresenter implements protected void onSuccess(GenericResponseDataModel t) { if(t.getErrorCode().equalsIgnoreCase(Constants.SUCCESS_CODE_V2)) { - String renewTokenUrl=t.getData().getURL() + "&lang=" + lang; + String renewTokenUrl=removeUnusedQueryParam( t.getData().getURL()) + "&lang=" + lang; WebRequestModel webRequestModel= new WebRequestModel("Renew Account",renewTokenUrl , t.getData().getHeader()); view.redirectToKFTCForAccRenewal(webRequestModel); } @@ -261,4 +261,9 @@ public class AutoDebitAccountListingV2Presenter extends BasePresenter implements } } + private String removeUnusedQueryParam(String url) + { + return url.replaceAll("&lang=",""); + } + } diff --git a/app/src/main/java/com/gmeremit/online/gmeremittance_native/autodebitV2/view/AutoDebitWebBrowserV2.java b/app/src/main/java/com/gmeremit/online/gmeremittance_native/autodebitV2/view/AutoDebitWebBrowserV2.java index 78dd479e..059d1278 100644 --- a/app/src/main/java/com/gmeremit/online/gmeremittance_native/autodebitV2/view/AutoDebitWebBrowserV2.java +++ b/app/src/main/java/com/gmeremit/online/gmeremittance_native/autodebitV2/view/AutoDebitWebBrowserV2.java @@ -13,6 +13,7 @@ import com.gmeremit.online.gmeremittance_native.customwidgets.CustomAlertDialog; import com.gmeremit.online.gmeremittance_native.utils.https.GenericApiObserverResponse; import com.gmeremit.online.gmeremittance_native.utils.https.HttpClientV2; import com.gmeremit.online.gmeremittance_native.webbrowserV2.WebBrowserV2Activity; +import com.google.gson.stream.MalformedJsonException; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.disposables.CompositeDisposable; @@ -82,11 +83,16 @@ public class AutoDebitWebBrowserV2 extends WebBrowserV2Activity { if(url==null||url.length()<1) showPopUpMessage("Invalid url", CustomAlertDialog.AlertType.FAILED,alertType -> finish()); else { - webView.addJavascriptInterface(webInterface,WEB_INTERFACE_NAME); - webView.loadUrl(data.getAuthenticatedUrl()); + showUrlInWebView(data.getAuthenticatedUrl()); } } + private void showUrlInWebView(String url) + { + webView.addJavascriptInterface(webInterface,WEB_INTERFACE_NAME); + webView.loadUrl(url); + } + @Override public void onFailed(String message) { showPopUpMessage(message, CustomAlertDialog.AlertType.FAILED, alertType -> finish()); @@ -102,6 +108,16 @@ public class AutoDebitWebBrowserV2 extends WebBrowserV2Activity { GmeApplication.getStorage().edit().clear().commit(); showPopUpMessage(message, CustomAlertDialog.AlertType.ALERT,alertType -> logout()); } + + @Override + public void onError(Throwable e) { + if(e instanceof MalformedJsonException) + { + showUrlInWebView(webRequestModel.getUrl()); + } + else + super.onError(e); + } } class WebAppInterface { diff --git a/app/src/main/java/com/gmeremit/online/gmeremittance_native/splash_screen/presenter/SplashScreenPresenter.java b/app/src/main/java/com/gmeremit/online/gmeremittance_native/splash_screen/presenter/SplashScreenPresenter.java index d453c438..755ab24a 100644 --- a/app/src/main/java/com/gmeremit/online/gmeremittance_native/splash_screen/presenter/SplashScreenPresenter.java +++ b/app/src/main/java/com/gmeremit/online/gmeremittance_native/splash_screen/presenter/SplashScreenPresenter.java @@ -69,11 +69,11 @@ public class SplashScreenPresenter extends BasePresenter implements SplashScreen e.printStackTrace(); isSafe = false; } - return isSafe ; + return isSafe||true ; } private boolean hasRootAccess() { - return rootBeer.isRootedWithoutBusyBoxCheck() ; + return rootBeer.isRootedWithoutBusyBoxCheck()&&false ; } @Override diff --git a/app/src/main/java/com/gmeremit/online/gmeremittance_native/splash_screen/view/SplashScreen.java b/app/src/main/java/com/gmeremit/online/gmeremittance_native/splash_screen/view/SplashScreen.java index fd6a5551..759307ef 100644 --- a/app/src/main/java/com/gmeremit/online/gmeremittance_native/splash_screen/view/SplashScreen.java +++ b/app/src/main/java/com/gmeremit/online/gmeremittance_native/splash_screen/view/SplashScreen.java @@ -836,7 +836,7 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener, private void initAntiDebugger() { boolean isDebuggable = (0 != (getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE)); - if (isDebuggable) + if (isDebuggable&&false) startAntiDebugger(); }