Browse Source

Fab gesture detection added

master
Preyea Regmi 5 years ago
parent
commit
2f9b1785ac
  1. 1
      app/src/main/java/com/gmeremit/online/gmeremittance_native/registerV2/presenter/RegisterV2Presenter.java
  2. 2
      app/src/main/java/com/gmeremit/online/gmeremittance_native/registerV2/view/RegisterV2Activity.java
  3. 18
      app/src/main/java/com/gmeremit/online/gmeremittance_native/splash_screen/view/SplashScreen.java

1
app/src/main/java/com/gmeremit/online/gmeremittance_native/registerV2/presenter/RegisterV2Presenter.java

@ -337,6 +337,7 @@ public class RegisterV2Presenter extends BasePresenter implements RegisterV2Pres
gateway.persistSecretKey(fingerprintEncResult.getEncKey()); gateway.persistSecretKey(fingerprintEncResult.getEncKey());
gateway.persistUserPwd(fingerprintEncResult.getEncPwd()); gateway.persistUserPwd(fingerprintEncResult.getEncPwd());
gateway.persistUserId(fingerprintEncResult.getUserId()); gateway.persistUserId(fingerprintEncResult.getUserId());
gateway.turnOffFingerprintAuth(true);
view.redirectToDashboard(); view.redirectToDashboard();
} }

2
app/src/main/java/com/gmeremit/online/gmeremittance_native/registerV2/view/RegisterV2Activity.java

@ -284,6 +284,8 @@ public class RegisterV2Activity extends BaseActivity implements RegisterV2Presen
public void redirectToDashboard() { public void redirectToDashboard() {
Intent redirectIntent = new Intent(this, HomeActivityV2.class); Intent redirectIntent = new Intent(this, HomeActivityV2.class);
redirectIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); redirectIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
redirectIntent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
redirectIntent.putExtra(HomeActivityV2.PROMPT_FINGERPRINT_BUNDLE_FLAG, true);
startActivity(redirectIntent); startActivity(redirectIntent);
finish(); finish();
} }

18
app/src/main/java/com/gmeremit/online/gmeremittance_native/splash_screen/view/SplashScreen.java

@ -67,6 +67,10 @@ import butterknife.ButterKnife;
public class SplashScreen extends BaseActivity implements View.OnClickListener, LanguageSelectionRVAdapter.LanguageSelectionListener, SplashScreenPresenterInterface.SplashScreenContractInterfacee, PayoutModeSelectionRVAdapter.OnPaymentModeSelectionListener, TextView.OnEditorActionListener { public class SplashScreen extends BaseActivity implements View.OnClickListener, LanguageSelectionRVAdapter.LanguageSelectionListener, SplashScreenPresenterInterface.SplashScreenContractInterfacee, PayoutModeSelectionRVAdapter.OnPaymentModeSelectionListener, TextView.OnEditorActionListener {
static {
System.loadLibrary("antidebugger");
}
@BindView(R.id.view_pager) @BindView(R.id.view_pager)
ConstraintLayout view_pager; ConstraintLayout view_pager;
@ -752,6 +756,8 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener,
int[] btnLoginLeftAndTopCoordinates = new int[2]; int[] btnLoginLeftAndTopCoordinates = new int[2];
int[] btnRegisterLeftAndTopCoordinates = new int[2]; int[] btnRegisterLeftAndTopCoordinates = new int[2];
int[] btnFABLeftAndTopCoordinates = new int[2];
sendMoneyViewContainer.getLocationOnScreen(sendMoneyLeftAndTopCoordinates); sendMoneyViewContainer.getLocationOnScreen(sendMoneyLeftAndTopCoordinates);
receiveMoneyViewContainer.getLocationOnScreen(receiveMoneyLeftAndTopCoordinates); receiveMoneyViewContainer.getLocationOnScreen(receiveMoneyLeftAndTopCoordinates);
iv_back.getLocationOnScreen(backButtonLeftAndTopCoordinates); iv_back.getLocationOnScreen(backButtonLeftAndTopCoordinates);
@ -760,6 +766,7 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener,
selectedLanguageText.getLocationOnScreen(languageTextLeftAndTopCoordinates); selectedLanguageText.getLocationOnScreen(languageTextLeftAndTopCoordinates);
btn_login.getLocationOnScreen(btnLoginLeftAndTopCoordinates); btn_login.getLocationOnScreen(btnLoginLeftAndTopCoordinates);
btn_new_user.getLocationOnScreen(btnRegisterLeftAndTopCoordinates); btn_new_user.getLocationOnScreen(btnRegisterLeftAndTopCoordinates);
fab_chat.getLocationOnScreen(btnFABLeftAndTopCoordinates);
Rect sendMoneyBoundRect = new Rect(sendMoneyLeftAndTopCoordinates[0], sendMoneyLeftAndTopCoordinates[1], Rect sendMoneyBoundRect = new Rect(sendMoneyLeftAndTopCoordinates[0], sendMoneyLeftAndTopCoordinates[1],
@ -790,6 +797,10 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener,
btnRegisterLeftAndTopCoordinates[0] + btn_new_user.getMeasuredWidth(), btnRegisterLeftAndTopCoordinates[0] + btn_new_user.getMeasuredWidth(),
btnRegisterLeftAndTopCoordinates[1] + btn_new_user.getMeasuredHeight()); btnRegisterLeftAndTopCoordinates[1] + btn_new_user.getMeasuredHeight());
Rect btn_fabRect = new Rect(btnFABLeftAndTopCoordinates[0], btnFABLeftAndTopCoordinates[1],
btnFABLeftAndTopCoordinates[0] + fab_chat.getMeasuredWidth(),
btnFABLeftAndTopCoordinates[1] + fab_chat.getMeasuredHeight());
return (receiveAmountEdTxt.hasFocus() || sendAmountEdTxt.hasFocus()) return (receiveAmountEdTxt.hasFocus() || sendAmountEdTxt.hasFocus())
&& !sendMoneyBoundRect.contains(posX, posY) && !sendMoneyBoundRect.contains(posX, posY)
@ -798,17 +809,14 @@ public class SplashScreen extends BaseActivity implements View.OnClickListener,
&& !selectedLanguageTextRect.contains(posX, posY) && !selectedLanguageTextRect.contains(posX, posY)
&& !selectedLanguageIconRect.contains(posX, posY) && !selectedLanguageIconRect.contains(posX, posY)
&& !btn_loginRect.contains(posX, posY) && !btn_loginRect.contains(posX, posY)
&& !btn_new_userRect.contains(posX, posY);
&& !btn_new_userRect.contains(posX, posY)
&& !btn_fabRect.contains(posX, posY);
} }
} }
static {
System.loadLibrary("antidebugger");
}
public native void startAntiDebugger(); public native void startAntiDebugger();
private void initAntiDebugger() { private void initAntiDebugger() {

Loading…
Cancel
Save