mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-23 18:15:22 +00:00
Revert "Fingerprint unlock UX improvements"
This reverts commit 8441ac4091
.
Fixes #8106
This commit is contained in:
parent
d581525a61
commit
eabaead700
Binary file not shown.
Before Width: | Height: | Size: 184 B |
Binary file not shown.
Before Width: | Height: | Size: 144 B |
Binary file not shown.
Before Width: | Height: | Size: 228 B |
Binary file not shown.
Before Width: | Height: | Size: 335 B |
Binary file not shown.
Before Width: | Height: | Size: 465 B |
@ -6,21 +6,32 @@
|
||||
android:id="@+id/prompt_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/login_top_background"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View android:id="@+id/shim"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:visibility="invisible"/>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?login_top_background"
|
||||
android:layout_above="@id/shim">
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:theme="?attr/actionBarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:layout_marginTop="20dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/icon_transparent"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
</android.support.v7.widget.Toolbar>
|
||||
@ -28,7 +39,7 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="280dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:layout_marginRight="30dp"
|
||||
android:orientation="vertical"
|
||||
@ -39,20 +50,11 @@
|
||||
|
||||
<TextView android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:text="@string/prompt_passphrase_activity__signal_is_locked"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:gravity="center_horizontal"
|
||||
android:textSize="25sp"/>
|
||||
|
||||
<TextView android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:text="@string/PassphrasePromptActivity_confirm_fingerprint"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
android:gravity="center_horizontal"
|
||||
android:textSize="16sp"/>
|
||||
|
||||
<ImageView android:id="@+id/fingerprint_auth_container"
|
||||
android:src="@drawable/ic_fingerprint_white_48dp"
|
||||
android:background="@drawable/circle_tintable"
|
||||
@ -61,17 +63,9 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="25dp"
|
||||
android:layout_marginBottom="60dp"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<TextView android:id="@+id/fingerprint_status_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/PassphrasePromptActivity_touch_sensor"
|
||||
android:textColor="@color/gray27"
|
||||
android:gravity="center_horizontal"
|
||||
android:textSize="16sp"/>
|
||||
|
||||
<TextView android:id="@+id/lock_screen_auth_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -464,10 +464,6 @@
|
||||
<string name="PassphrasePromptActivity_watermark_content_description">Signal icon</string>
|
||||
<string name="PassphrasePromptActivity_ok_button_content_description">Submit passphrase</string>
|
||||
<string name="PassphrasePromptActivity_invalid_passphrase_exclamation">Invalid passphrase!</string>
|
||||
<string name="PassphrasePromptActivity_confirm_fingerprint">Confirm fingerprint to unlock</string>
|
||||
<string name="PassphrasePromptActivity_touch_sensor">Touch sensor</string>
|
||||
<string name="PassphrasePromptActivity_fingerprint_not_recognized_try_again">Fingerprint not recognized. Try again.</string>
|
||||
<string name="PassphrasePromptActivity_fingerprint_recognized">Fingerprint recognized</string>
|
||||
|
||||
<!-- PlayServicesProblemFragment -->
|
||||
<string name="PlayServicesProblemFragment_the_version_of_google_play_services_you_have_installed_is_not_functioning">The version of Google Play Services you have installed is not functioning correctly. Please reinstall Google Play Services and try again.</string>
|
||||
|
@ -72,11 +72,6 @@
|
||||
<item name="elevation">0dp</item>
|
||||
</style>
|
||||
|
||||
<style name="TextSecure.FlatDarkActionBar"
|
||||
parent="@style/TextSecure.DarkActionBar">
|
||||
<item name="elevation">0dp</item>
|
||||
</style>
|
||||
|
||||
<style name="TextSecure.DarkActionBar.TabBar"
|
||||
parent="@style/Widget.AppCompat.ActionBar.TabBar">
|
||||
<item name="background">@color/gray95</item>
|
||||
|
@ -58,7 +58,6 @@
|
||||
</style>
|
||||
|
||||
<style name="TextSecure.LightIntroTheme" parent="@style/Theme.AppCompat.Light">
|
||||
<item name="actionBarStyle">@style/TextSecure.FlatLightActionBar</item>
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="windowActionModeOverlay">true</item>
|
||||
@ -78,7 +77,6 @@
|
||||
</style>
|
||||
|
||||
<style name="TextSecure.DarkIntroTheme" parent="@style/Theme.AppCompat">
|
||||
<item name="actionBarStyle">@style/TextSecure.FlatDarkActionBar</item>
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="windowActionModeOverlay">true</item>
|
||||
|
@ -73,7 +73,6 @@ public class PassphrasePromptActivity extends PassphraseActivity {
|
||||
private View passphraseAuthContainer;
|
||||
private ImageView fingerprintPrompt;
|
||||
private TextView lockScreenButton;
|
||||
private TextView fingerprintStatusText;
|
||||
|
||||
private EditText passphraseText;
|
||||
private ImageButton showButton;
|
||||
@ -106,9 +105,6 @@ public class PassphrasePromptActivity extends PassphraseActivity {
|
||||
dynamicTheme.onResume(this);
|
||||
dynamicLanguage.onResume(this);
|
||||
|
||||
fingerprintStatusText.setText(getResources().getString(R.string.PassphrasePromptActivity_touch_sensor));
|
||||
fingerprintStatusText.setTextColor(getResources().getColor(R.color.gray27));
|
||||
|
||||
setLockTypeVisibility();
|
||||
|
||||
if (TextSecurePreferences.isScreenLockEnabled(this) && !authenticated && !failure) {
|
||||
@ -218,7 +214,6 @@ public class PassphrasePromptActivity extends PassphraseActivity {
|
||||
passphraseAuthContainer = findViewById(R.id.password_auth_container);
|
||||
fingerprintPrompt = findViewById(R.id.fingerprint_auth_container);
|
||||
lockScreenButton = findViewById(R.id.lock_screen_auth_container);
|
||||
fingerprintStatusText = findViewById(R.id.fingerprint_status_text);
|
||||
fingerprintManager = FingerprintManagerCompat.from(this);
|
||||
fingerprintCancellationSignal = new CancellationSignal();
|
||||
fingerprintListener = new FingerprintListener();
|
||||
@ -345,22 +340,23 @@ public class PassphrasePromptActivity extends PassphraseActivity {
|
||||
@Override
|
||||
public void onAuthenticationError(int errMsgId, CharSequence errString) {
|
||||
Log.w(TAG, "Authentication error: " + errMsgId + " " + errString);
|
||||
onAuthenticationFailed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAuthenticationSucceeded(FingerprintManagerCompat.AuthenticationResult result) {
|
||||
Log.i(TAG, "onAuthenticationSucceeded");
|
||||
fingerprintPrompt.setImageResource(R.drawable.ic_check_white_48dp);
|
||||
fingerprintPrompt.getBackground().setColorFilter(getResources().getColor(R.color.teal_500), PorterDuff.Mode.SRC_IN);
|
||||
fingerprintPrompt.getBackground().setColorFilter(getResources().getColor(R.color.green_500), PorterDuff.Mode.SRC_IN);
|
||||
fingerprintPrompt.animate().setInterpolator(new BounceInterpolator()).scaleX(1.1f).scaleY(1.1f).setDuration(500).setListener(new AnimationCompleteListener() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
handleAuthenticated();
|
||||
|
||||
fingerprintPrompt.setImageResource(R.drawable.ic_fingerprint_white_48dp);
|
||||
fingerprintPrompt.getBackground().setColorFilter(getResources().getColor(R.color.signal_primary), PorterDuff.Mode.SRC_IN);
|
||||
}
|
||||
}).start();
|
||||
|
||||
fingerprintStatusText.setText(getResources().getString(R.string.PassphrasePromptActivity_fingerprint_recognized));
|
||||
fingerprintStatusText.setTextColor(getResources().getColor(R.color.teal_500));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -368,12 +364,12 @@ public class PassphrasePromptActivity extends PassphraseActivity {
|
||||
Log.w(TAG, "onAuthenticatoinFailed()");
|
||||
FingerprintManagerCompat.AuthenticationCallback callback = this;
|
||||
|
||||
fingerprintPrompt.setImageResource(R.drawable.ic_priority_high_white_48dp);
|
||||
fingerprintPrompt.getBackground().setColorFilter(getResources().getColor(R.color.deep_orange_600), PorterDuff.Mode.SRC_IN);
|
||||
fingerprintPrompt.setImageResource(R.drawable.ic_close_white_48dp);
|
||||
fingerprintPrompt.getBackground().setColorFilter(getResources().getColor(R.color.red_500), PorterDuff.Mode.SRC_IN);
|
||||
|
||||
TranslateAnimation shake = new TranslateAnimation(0, 20, 0, 0);
|
||||
TranslateAnimation shake = new TranslateAnimation(0, 30, 0, 0);
|
||||
shake.setDuration(50);
|
||||
shake.setRepeatCount(5);
|
||||
shake.setRepeatCount(7);
|
||||
shake.setAnimationListener(new Animation.AnimationListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animation animation) {}
|
||||
@ -389,9 +385,6 @@ public class PassphrasePromptActivity extends PassphraseActivity {
|
||||
});
|
||||
|
||||
fingerprintPrompt.startAnimation(shake);
|
||||
|
||||
fingerprintStatusText.setText(getResources().getString(R.string.PassphrasePromptActivity_fingerprint_not_recognized_try_again));
|
||||
fingerprintStatusText.setTextColor(getResources().getColor(R.color.deep_orange_600));
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user