Make PINs work with password managers.
This commit is contained in:
parent
9f033e64aa
commit
7db288b9aa
6 changed files with 19 additions and 0 deletions
|
@ -275,6 +275,7 @@ dependencies {
|
||||||
implementation "androidx.camera:camera-camera2:1.0.0-beta01"
|
implementation "androidx.camera:camera-camera2:1.0.0-beta01"
|
||||||
implementation "androidx.camera:camera-lifecycle:1.0.0-beta01"
|
implementation "androidx.camera:camera-lifecycle:1.0.0-beta01"
|
||||||
implementation "androidx.concurrent:concurrent-futures:1.0.0"
|
implementation "androidx.concurrent:concurrent-futures:1.0.0"
|
||||||
|
implementation "androidx.autofill:autofill:1.0.0"
|
||||||
|
|
||||||
implementation('com.google.firebase:firebase-messaging:17.3.4') {
|
implementation('com.google.firebase:firebase-messaging:17.3.4') {
|
||||||
exclude group: 'com.google.firebase', module: 'firebase-core'
|
exclude group: 'com.google.firebase', module: 'firebase-core'
|
||||||
|
|
|
@ -21,7 +21,9 @@ import android.widget.TextView;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.appcompat.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
|
import androidx.autofill.HintConstants;
|
||||||
import androidx.core.app.DialogCompat;
|
import androidx.core.app.DialogCompat;
|
||||||
|
import androidx.core.view.ViewCompat;
|
||||||
|
|
||||||
import com.google.android.material.textfield.TextInputLayout;
|
import com.google.android.material.textfield.TextInputLayout;
|
||||||
|
|
||||||
|
@ -72,6 +74,7 @@ public final class SignalPinReminderDialog {
|
||||||
ServiceUtil.getInputMethodManager(pinEditText.getContext()).showSoftInput(pinEditText, 0);
|
ServiceUtil.getInputMethodManager(pinEditText.getContext()).showSoftInput(pinEditText, 0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
ViewCompat.setAutofillHints(pinEditText, HintConstants.AUTOFILL_HINT_PASSWORD);
|
||||||
|
|
||||||
switch (SignalStore.pinValues().getKeyboardType()) {
|
switch (SignalStore.pinValues().getKeyboardType()) {
|
||||||
case NUMERIC:
|
case NUMERIC:
|
||||||
|
|
|
@ -4,11 +4,14 @@ import android.animation.Animator;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.view.autofill.AutofillManager;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.RawRes;
|
import androidx.annotation.RawRes;
|
||||||
import androidx.appcompat.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
|
import androidx.autofill.HintConstants;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
|
import androidx.core.view.ViewCompat;
|
||||||
import androidx.lifecycle.ViewModelProviders;
|
import androidx.lifecycle.ViewModelProviders;
|
||||||
|
|
||||||
import com.airbnb.lottie.LottieAnimationView;
|
import com.airbnb.lottie.LottieAnimationView;
|
||||||
|
@ -39,6 +42,7 @@ public class ConfirmKbsPinFragment extends BaseKbsPinFragment<ConfirmKbsPinViewM
|
||||||
} else {
|
} else {
|
||||||
initializeViewStatesForPinCreate();
|
initializeViewStatesForPinCreate();
|
||||||
}
|
}
|
||||||
|
ViewCompat.setAutofillHints(getInput(), HintConstants.AUTOFILL_HINT_NEW_PASSWORD);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
package org.thoughtcrime.securesms.lock.v2;
|
package org.thoughtcrime.securesms.lock.v2;
|
||||||
|
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.PluralsRes;
|
import androidx.annotation.PluralsRes;
|
||||||
|
import androidx.autofill.HintConstants;
|
||||||
|
import androidx.core.view.ViewCompat;
|
||||||
import androidx.lifecycle.ViewModelProviders;
|
import androidx.lifecycle.ViewModelProviders;
|
||||||
import androidx.navigation.Navigation;
|
import androidx.navigation.Navigation;
|
||||||
|
|
||||||
|
@ -21,6 +25,7 @@ public class CreateKbsPinFragment extends BaseKbsPinFragment<CreateKbsPinViewMod
|
||||||
|
|
||||||
getLabel().setText(getPinLengthRestrictionText(R.plurals.CreateKbsPinFragment__pin_must_be_at_least_digits));
|
getLabel().setText(getPinLengthRestrictionText(R.plurals.CreateKbsPinFragment__pin_must_be_at_least_digits));
|
||||||
getConfirm().setEnabled(false);
|
getConfirm().setEnabled(false);
|
||||||
|
ViewCompat.setAutofillHints(getInput(), HintConstants.AUTOFILL_HINT_NEW_PASSWORD);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initializeViewStatesForPinChange(boolean isForgotPin) {
|
private void initializeViewStatesForPinChange(boolean isForgotPin) {
|
||||||
|
|
|
@ -17,6 +17,8 @@ import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.annotation.StringRes;
|
import androidx.annotation.StringRes;
|
||||||
import androidx.appcompat.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
|
import androidx.autofill.HintConstants;
|
||||||
|
import androidx.core.view.ViewCompat;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.lifecycle.ViewModelProviders;
|
import androidx.lifecycle.ViewModelProviders;
|
||||||
import androidx.navigation.Navigation;
|
import androidx.navigation.Navigation;
|
||||||
|
@ -87,6 +89,7 @@ public class PinRestoreEntryFragment extends Fragment {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
ViewCompat.setAutofillHints(pinEntry, HintConstants.AUTOFILL_HINT_PASSWORD);
|
||||||
|
|
||||||
enableAndFocusPinEntry();
|
enableAndFocusPinEntry();
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,9 @@ dependencyVerification {
|
||||||
['androidx.asynclayoutinflater:asynclayoutinflater:1.0.0',
|
['androidx.asynclayoutinflater:asynclayoutinflater:1.0.0',
|
||||||
'f7eab60c57addd94bb06275832fe7600611beaaae1a1ec597c231956faf96c8b'],
|
'f7eab60c57addd94bb06275832fe7600611beaaae1a1ec597c231956faf96c8b'],
|
||||||
|
|
||||||
|
['androidx.autofill:autofill:1.0.0',
|
||||||
|
'c9468f56e05006ea151a426c54957cd0799b8b83a579d2846dd22061f33e5ecd'],
|
||||||
|
|
||||||
['androidx.camera:camera-camera2:1.0.0-beta01',
|
['androidx.camera:camera-camera2:1.0.0-beta01',
|
||||||
'02e15ad76153d09adcd6631627960707a8786333a8276d05dcbefc2bfe4ef5a1'],
|
'02e15ad76153d09adcd6631627960707a8786333a8276d05dcbefc2bfe4ef5a1'],
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue