allow to disable check for secure screen to solve #1501
This commit is contained in:
@@ -7,6 +7,7 @@ using Android.App;
|
||||
using Android.Content;
|
||||
using Android.Content.PM;
|
||||
using Android.OS;
|
||||
using Android.Preferences;
|
||||
using Android.Runtime;
|
||||
using Android.Support.V7.App;
|
||||
using Android.Views;
|
||||
@@ -34,6 +35,18 @@ namespace keepass2android
|
||||
{
|
||||
AppSettingsActivity.Launch(this);
|
||||
};
|
||||
FindViewById<Button>(Resource.Id.disable_secure_screen_check).Click += (sender, args) =>
|
||||
{
|
||||
var prefs = PreferenceManager.GetDefaultSharedPreferences(Application.Context);
|
||||
prefs.Edit()
|
||||
.PutBoolean("no_secure_display_check", true)
|
||||
.Commit();
|
||||
Finish();
|
||||
};
|
||||
FindViewById<Button>(Resource.Id.btn_close).Click += (sender, args) =>
|
||||
{
|
||||
Finish();
|
||||
};
|
||||
|
||||
var toolbar = FindViewById<AndroidX.AppCompat.Widget.Toolbar>(Resource.Id.mytoolbar);
|
||||
|
||||
|
||||
@@ -21,5 +21,8 @@
|
||||
android:layout_height="wrap_content" />
|
||||
<Button android:id="@+id/btn_goto_settings" android:text="@string/IconVisibilityInfo_Android8_btnSettings" android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<Button android:id="@+id/disable_secure_screen_check" android:text="@string/disable_secure_screen_check" android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
<Button android:id="@+id/btn_close" android:text="@string/menu_close" android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
|
||||
@@ -608,9 +608,9 @@ namespace keepass2android
|
||||
|
||||
public static void MakeSecureDisplay(Activity context)
|
||||
{
|
||||
if (SecureDisplayConfigured(context))
|
||||
{
|
||||
var hasUnsecureDisplay = HasUnsecureDisplay(context);
|
||||
if (SecureDisplayConfigured(context) && PreferenceManager.GetDefaultSharedPreferences(context).GetBoolean("no_secure_display_check", false))
|
||||
{
|
||||
var hasUnsecureDisplay = HasUnsecureDisplay(context);
|
||||
if (hasUnsecureDisplay)
|
||||
{
|
||||
var intent = new Intent(context, typeof(NoSecureDisplayActivity));
|
||||
|
||||
Reference in New Issue
Block a user