Skip to content

Commit 92a98c1

Browse files
authored
Merge pull request #3132 from PhilippC/feature/setting-to-skip-secure-display-check
Feature/setting to skip secure display check
2 parents da3f5f0 + 68422b5 commit 92a98c1

File tree

7 files changed

+39
-3
lines changed

7 files changed

+39
-3
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,10 @@ jobs:
311311
312312
- name: Update dotnet workloads
313313
run: |
314-
dotnet workload update
314+
dotnet workload update
315+
cd src/keepass2android-app
316+
dotnet workload restore
317+
cd ../..
315318
316319
- name: Select the manifest
317320
run: |

.github/workflows/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ jobs:
8484

8585
- name: Update dotnet workloads
8686
run: |
87-
dotnet workload update
87+
dotnet workload update
88+
cd src/keepass2android-app
89+
dotnet workload restore
90+
cd ../..
8891
8992
- name: List apks
9093
run: find . -type f -name "*.apk"

src/keepass2android-app/NoSecureDisplayActivity.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ protected override void OnCreate(Bundle savedInstanceState)
4646
_design.ApplyTheme();
4747
base.OnCreate(savedInstanceState);
4848
SetContentView(Resource.Layout.no_secure_display_layout);
49+
new Util.InsetListener(FindViewById(Resource.Id.no_secure_display_text)).Apply();
4950
FindViewById<Button>(Resource.Id.btn_goto_settings).Click += (sender, args) =>
5051
{
5152
AppSettingsActivity.Launch(this);

src/keepass2android-app/Resources/layout/no_secure_display_layout.axml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
android:background="#00000000" />
1616

1717
<TextView android:text="@string/no_secure_display" android:layout_width="match_parent"
18-
android:layout_height="wrap_content" />
18+
android:layout_height="wrap_content" android:id="@+id/no_secure_display_text" />
1919
<Button android:id="@+id/btn_goto_settings" android:text="@string/IconVisibilityInfo_Android8_btnSettings" android:layout_width="match_parent"
2020
android:layout_height="wrap_content" />
2121
<Button android:id="@+id/disable_secure_screen_check" android:text="@string/disable_secure_screen_check" android:layout_width="match_parent"

src/keepass2android-app/Resources/values/config.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
<bool name="ShowUsernameInList_default">true</bool>
9494
<bool name="ShowGroupnameInSearchResult_default">true</bool>
9595
<string name="ViewDatabaseSecure_key">ViewDatabaseSecure</string>
96+
<string name="DisableSecureDisplayCheck_key">no_secure_display_check</string>
9697
<string name="CloseDatabaseAfterFailedBiometricQuickUnlock_key">CloseDatabaseAfterFailedBiometricQuickUnlock_key</string>
9798
<bool name="RememberRecentFiles_default">true</bool>
9899
<string name="TrayTotp_SettingsField_key">TrayTotp_SettingsField_key</string>

src/keepass2android-app/Resources/values/strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,9 @@
342342
<string name="QuickUnlockDefaultEnabled_title">Enable QuickUnlock by default</string>
343343
<string name="QuickUnlockDefaultEnabled_summary">Defines whether QuickUnlock is enabled by default or not.</string>
344344
<string name="ViewDatabaseSecure_title">Protect database display</string>
345+
<string name="DisableSecureDisplayCheck_title">Skip check for secure display</string>
345346
<string name="ViewDatabaseSecure_summary">If enabled, no screenshots are allowed and no thumbnail of the app is displayed in the Recent Apps list.</string>
347+
<string name="DisableSecureDisplayCheck_summary">Allow to show sensitive information even if the current screen is not flagged "secure" by Android.</string>
346348
<string name="QuickUnlockIconHidden_title">Hide QuickUnlock icon</string>
347349
<string name="QuickUnlockIconHidden_summary">QuickUnlock unfortunately does not work without displaying a notification icon. Select this option to use a transparent icon.</string>
348350
<string name="QuickUnlockIconHidden16_title">Hide QuickUnlock icon</string>

src/keepass2android-app/Resources/xml/pref_app_display.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
<!--
2+
This file is part of Keepass2Android, Copyright 2026 Philipp Crocoll.
3+
4+
Keepass2Android is free software: you can redistribute it and/or modify
5+
it under the terms of the GNU General Public License as published by
6+
the Free Software Foundation, either version 3 of the License, or
7+
(at your option) any later version.
8+
9+
Keepass2Android is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
GNU General Public License for more details.
13+
14+
You should have received a copy of the GNU General Public License
15+
along with Keepass2Android. If not, see <http://www.gnu.org/licenses/>.
16+
-->
17+
118
<PreferenceScreen
219
xmlns:android="http://schemas.android.com/apk/res/android"
320
android:key="@string/display_prefs_key"
@@ -75,6 +92,15 @@
7592
android:title="@string/ViewDatabaseSecure_title"
7693
android:key="@string/ViewDatabaseSecure_key" />
7794

95+
<CheckBoxPreference
96+
android:enabled="true"
97+
android:persistent="true"
98+
android:dependency="@string/ViewDatabaseSecure_key"
99+
android:summary="@string/DisableSecureDisplayCheck_summary"
100+
android:defaultValue="false"
101+
android:title="@string/DisableSecureDisplayCheck_title"
102+
android:key="@string/DisableSecureDisplayCheck_key" />
103+
78104
<CheckBoxPreference
79105
android:enabled="true"
80106
android:persistent="true"

0 commit comments

Comments
 (0)