Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Techdebt/remove auth prompt #256

Merged
merged 5 commits into from
Nov 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_INTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
andhikayuana marked this conversation as resolved.
Show resolved Hide resolved
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.BIND_JOB_SERVICE" />
Expand Down Expand Up @@ -193,11 +191,6 @@
android:exported="true"
android:launchMode="singleTask"
android:screenOrientation="portrait" />
<activity
android:name=".presenter.activities.settings.FingerprintActivity"
android:exported="true"
android:launchMode="singleTask"
android:screenOrientation="portrait" />
<activity
android:name=".presenter.activities.settings.AdvancedActivity"
android:exported="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ public class LoginActivity extends BRActivity {
private TextView ltcPriceTextView;
private TextView ltcPriceDescTextView;

private ImageButton fingerPrint;
public static boolean appVisible = false;
private boolean inputAllowed = true;

Expand All @@ -97,7 +96,6 @@ protected void onCreate(Bundle savedInstanceState) {

keyboard = findViewById(R.id.brkeyboard);
pinLayout = findViewById(R.id.pinLayout);
fingerPrint = findViewById(R.id.fingerprint_icon);
versionText = findViewById(R.id.version_text);

ltcPriceTextView = findViewById(R.id.ltcPriceTextView);
Expand Down Expand Up @@ -149,28 +147,6 @@ protected void onCreate(Bundle savedInstanceState) {
}
});

final boolean useFingerprint = AuthManager.isFingerPrintAvailableAndSetup(this) && BRSharedPrefs.getUseFingerprint(this);
fingerPrint.setVisibility(useFingerprint ? View.VISIBLE : View.GONE);

if (useFingerprint) {
fingerPrint.setOnClickListener(v -> AuthManager.getInstance().authPrompt(LoginActivity.this, "", "", false, true, new BRAuthCompletion() {
@Override
public void onComplete() {
unlockWallet();
AnalyticsManager.logCustomEvent(BRConstants._20200217_DUWB);
}

@Override
public void onCancel() {
}
}));
}

new Handler().postDelayed(() -> {
if (fingerPrint != null && useFingerprint)
fingerPrint.performClick();
}, 500);

setCurrentLtcPrice();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,7 @@ public void onClick(View v) {
@Override
public void onClick(View v) {
if (!BRAnimator.isClickAllowed()) return;
AuthManager.getInstance().authPrompt(WriteDownActivity.this, null, getString(R.string.VerifyPin_continueBody), true, false, new BRAuthCompletion() {
@Override
public void onComplete() {
PostAuth.getInstance().onPhraseCheckAuth(WriteDownActivity.this, false);
}

@Override
public void onCancel() {

}
});
/// DEV NOTES: Remove this call to auth Prompt

}
});
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -157,23 +157,6 @@ public void onClick(View v) {
}
}));

int resId = Utils.isFingerprintEnrolled(SecurityCenterActivity.this)
&& BRSharedPrefs.getUseFingerprint(SecurityCenterActivity.this)
? R.drawable.ic_check_mark_blue
: R.drawable.ic_check_mark_grey;

if (Utils.isFingerprintAvailable(this)) {
itemList.add(new BRSecurityCenterItem(getString(R.string.SecurityCenter_touchIdTitle_android), getString(R.string.SecurityCenter_touchIdDescription),
resId, new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(SecurityCenterActivity.this, FingerprintActivity.class);
startActivity(intent);
overridePendingTransition(R.anim.enter_from_right, R.anim.exit_to_left);
}
}));
}

boolean isPaperKeySet = BRSharedPrefs.getPhraseWroteDown(this);
itemList.add(new BRSecurityCenterItem(getString(R.string.SecurityCenter_paperKeyTitle), getString(R.string.SecurityCenter_paperKeyDescription),
isPaperKeySet ? R.drawable.ic_check_mark_blue : R.drawable.ic_check_mark_grey, new View.OnClickListener() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,23 +143,6 @@ private void populateItems() {
/*Manage Title*/
items.add(new BRSettingsItem(getString(R.string.Settings_manage), "", null, true));

/*Fingerprint Limits*/
if (AuthManager.isFingerPrintAvailableAndSetup(this)) {
items.add(new BRSettingsItem(getString(R.string.Settings_touchIdLimit_android), "", v -> AuthManager.getInstance().authPrompt(SettingsActivity.this, null, getString(R.string.VerifyPin_continueBody), true, false, new BRAuthCompletion() {
@Override
public void onComplete() {
Intent intent = new Intent(SettingsActivity.this, SpendLimitActivity.class);
overridePendingTransition(R.anim.enter_from_right, R.anim.exit_to_left);
startActivity(intent);
}

@Override
public void onCancel() {

}
}), false));
}

/*Languages*/
items.add(new BRSettingsItem(getString(R.string.Settings_languages), null, v -> {
ChangeLanguageBottomSheet fragment = new ChangeLanguageBottomSheet();
Expand Down
Loading