Merge branch '1.04'
Conflicts: src/keepass2android/ChangeLog.cs src/keepass2android/GroupBaseActivity.cs src/keepass2android/Properties/AndroidManifest_net.xml src/keepass2android/Resources/values/strings.xml
This commit is contained in:
@@ -26,7 +26,9 @@ namespace keepass2android
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(ctx, Android.Resource.Style.ThemeHoloLightDialog));
|
||||
builder.SetTitle(ctx.GetString(Resource.String.ChangeLog_title));
|
||||
List<string> changeLog = new List<string>{
|
||||
|
||||
ctx.GetString(Resource.String.ChangeLog_1_05),
|
||||
ctx.GetString(Resource.String.ChangeLog_1_04b),
|
||||
ctx.GetString(Resource.String.ChangeLog_1_04),
|
||||
ctx.GetString(Resource.String.ChangeLog_1_03),
|
||||
ctx.GetString(Resource.String.ChangeLog_1_02),
|
||||
|
||||
@@ -319,7 +319,23 @@ namespace keepass2android
|
||||
{
|
||||
var intent = new Intent(Settings.ActionRequestSetAutofillService);
|
||||
intent.SetData(Android.Net.Uri.Parse("package:" + PackageName));
|
||||
try
|
||||
{
|
||||
StartActivity(intent);
|
||||
}
|
||||
catch (ActivityNotFoundException e)
|
||||
{
|
||||
//this exception was reported by many Huawei users
|
||||
Kp2aLog.LogUnexpectedError(e);
|
||||
new AlertDialog.Builder(this)
|
||||
.SetTitle(Resource.String.autofill_enable)
|
||||
.SetMessage(Resource.String.autofill_enable_failed)
|
||||
.SetPositiveButton(Resource.String.ok, (o, eventArgs) => { })
|
||||
.Show();
|
||||
const string autofillservicewasenabled = "AutofillServiceWasEnabled";
|
||||
_prefs.Edit().PutBoolean(autofillservicewasenabled, true).Commit();
|
||||
UpdateBottomBarElementVisibility(Resource.Id.autofill_infotext, false);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -722,12 +722,19 @@
|
||||
* add some info texts to avoid some common misunderstandings\n
|
||||
* bug fixes\n
|
||||
</string>
|
||||
|
||||
<string name="ChangeLog_1_04b">
|
||||
Version 1.04b\n
|
||||
* Avoid crash when user tries to enable Autofill on Huawei devices.\n
|
||||
</string>
|
||||
<string name="ChangeLog_1_04">
|
||||
Version 1.04\n
|
||||
* Added Autofill service for Android 8.0 and later.\n
|
||||
* Upgraded libraries, build tools and Target SDK version.\n
|
||||
</string>
|
||||
|
||||
|
||||
|
||||
<string name="ChangeLog_1_03">
|
||||
Version 1.03\n
|
||||
* Removed accessibility service for AutoFill as requested by Google. Please see password access settings to find a plugin replicating the previous functionality.\n
|
||||
@@ -1072,6 +1079,7 @@ Initial public release
|
||||
|
||||
<string name="autofill_hint">Keepass2Android supports Android\'s Autofill feature but it looks like you haven\'t enabled it yet.</string>
|
||||
<string name="autofill_enable">Enable Autofill</string>
|
||||
<string name="autofill_enable_failed">Sorry, it looks like your device does not support opening the settings from inside the app. Please go manually to the system settings for AutoFill to enable the service.</string>
|
||||
<string name="show_autofill_help">Show Autofill help</string>
|
||||
<string name="autofill_sign_in_prompt">Fill with Keepass2Android</string>
|
||||
<string name="invalid_link_association">Could not associate web domain %1$s with app %2$s</string>
|
||||
|
||||
@@ -378,6 +378,32 @@ namespace keepass2android
|
||||
|
||||
UpdateAutofillPref();
|
||||
|
||||
var autofillPref = FindPreference(GetString(Resource.String.AutoFill_prefs_key));
|
||||
if (autofillPref != null)
|
||||
{
|
||||
autofillPref.PreferenceClick += (sender, args) =>
|
||||
{
|
||||
|
||||
var intent = new Intent(Settings.ActionRequestSetAutofillService);
|
||||
intent.SetData(Android.Net.Uri.Parse("package:" + Context.PackageName));
|
||||
try
|
||||
{
|
||||
Context.StartActivity(intent);
|
||||
}
|
||||
catch (ActivityNotFoundException e)
|
||||
{
|
||||
//this exception was reported by many Huawei users
|
||||
Kp2aLog.LogUnexpectedError(e);
|
||||
new AlertDialog.Builder(Context)
|
||||
.SetTitle(Resource.String.autofill_enable)
|
||||
.SetMessage(Resource.String.autofill_enable_failed)
|
||||
.SetPositiveButton(Resource.String.ok, (o, eventArgs) => { })
|
||||
.Show();
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
PrepareNoDonatePreference(Activity, FindPreference(GetString(Resource.String.NoDonateOption_key)));
|
||||
PrepareNoDonationReminderPreference(Activity, ((PreferenceScreen)FindPreference(GetString(Resource.String.display_prefs_key))), FindPreference(GetString(Resource.String.NoDonationReminder_key)));
|
||||
@@ -501,8 +527,11 @@ namespace keepass2android
|
||||
else
|
||||
{
|
||||
autofillPref.Summary = Activity.GetString(Resource.String.not_enabled);
|
||||
autofillPref.Intent = new Intent(Settings.ActionRequestSetAutofillService);
|
||||
autofillPref.Intent.SetData(Android.Net.Uri.Parse("package:" + Activity.PackageName));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1005,6 +1034,8 @@ namespace keepass2android
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Activity to configure the application and database settings. The database must be unlocked, and this activity will close if it becomes locked.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user