mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 02:39:05 +01:00
Screen Lock: Show verbose unlock message for older APIs
This commit is contained in:
@@ -18,6 +18,7 @@ import java.util.logging.Logger;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import static android.os.Build.VERSION.SDK_INT;
|
||||
import static org.briarproject.briar.android.activity.RequestCodes.REQUEST_KEYGUARD_UNLOCK;
|
||||
|
||||
@RequiresApi(21)
|
||||
@@ -67,7 +68,8 @@ public class UnlockActivity extends BaseActivity {
|
||||
(KeyguardManager) getSystemService(KEYGUARD_SERVICE);
|
||||
if (keyguardManager == null) throw new AssertionError();
|
||||
Intent intent = keyguardManager.createConfirmDeviceCredentialIntent(
|
||||
getString(R.string.lock_unlock), null);
|
||||
SDK_INT < 23 ? getString(R.string.lock_unlock_verbose) :
|
||||
getString(R.string.lock_unlock), null);
|
||||
if (intent == null) {
|
||||
// the user must have removed the screen lock since locked
|
||||
LOG.warning("Unlocking without keyguard");
|
||||
|
||||
@@ -451,6 +451,7 @@
|
||||
|
||||
<!-- App Locking -->
|
||||
<string name="lock_unlock">Unlock Briar</string>
|
||||
<string name="lock_unlock_verbose">Enter your device PIN, pattern or password to unlock Briar</string>
|
||||
<string name="lock_is_locked">Briar is locked</string>
|
||||
<string name="lock_tap_to_unlock">Tap to unlock</string>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user