allow to immediately disable donation option if a certain string is typed in search; 1.08c-r1
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:versionCode="161"
|
android:versionCode="162"
|
||||||
android:versionName="1.08c-r0"
|
android:versionName="1.08c-r1"
|
||||||
package="keepass2android.keepass2android"
|
package="keepass2android.keepass2android"
|
||||||
android:installLocation="auto">
|
android:installLocation="auto">
|
||||||
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="29" />
|
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="29" />
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ using Android.App;
|
|||||||
using Android.Content;
|
using Android.Content;
|
||||||
using Android.Content.PM;
|
using Android.Content.PM;
|
||||||
using Android.OS;
|
using Android.OS;
|
||||||
|
using Android.Preferences;
|
||||||
using Android.Views;
|
using Android.Views;
|
||||||
using Android.Widget;
|
using Android.Widget;
|
||||||
using keepass2android.view;
|
using keepass2android.view;
|
||||||
@@ -111,6 +112,18 @@ namespace keepass2android.search
|
|||||||
|
|
||||||
private void Query(SearchParameters searchParams)
|
private void Query(SearchParameters searchParams)
|
||||||
{
|
{
|
||||||
|
//kind of an easter egg: if the user types this exact string into the search, it immediately allows to disable the donation options
|
||||||
|
if (searchParams.SearchString == "allow disable donation")
|
||||||
|
{
|
||||||
|
ISharedPreferences prefs = PreferenceManager.GetDefaultSharedPreferences(this);
|
||||||
|
ISharedPreferencesEditor edit = prefs.Edit();
|
||||||
|
edit.PutLong(GetString(Resource.String.UsageCount_key), 1000);
|
||||||
|
edit.PutBoolean("DismissedDonateReminder", true);
|
||||||
|
edit.Commit();
|
||||||
|
Toast.MakeText(this, "Please go to Settings - App - Display to disable donation requests.", ToastLength.Long).Show();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Group = null;
|
Group = null;
|
||||||
try {
|
try {
|
||||||
foreach (var db in App.Kp2a.OpenDatabases)
|
foreach (var db in App.Kp2a.OpenDatabases)
|
||||||
|
|||||||
Reference in New Issue
Block a user