Screen Lock: Show verbose unlock message for older APIs

parent 0f37a434
......@@ -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>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment