mirror of
https://github.com/moparisthebest/keepass2android
synced 2024-11-21 16:55:01 -05:00
several fixes for potential crashes -> 1.01f
This commit is contained in:
parent
defd8e7904
commit
c1f8e91a3f
Binary file not shown.
Binary file not shown.
@ -82,22 +82,24 @@ public class OneDriveStorage extends JavaFileStorageBase
|
||||
|
||||
private boolean isConnected(Activity activity) {
|
||||
if (oneDriveClient == null)
|
||||
{
|
||||
try
|
||||
{
|
||||
Log.d("KP2AJ", "trying silent login");
|
||||
if (msaAuthenticator.loginSilent() != null)
|
||||
{
|
||||
Log.d("KP2AJ", "ok: silent login");
|
||||
try
|
||||
{
|
||||
|
||||
oneDriveClient = buildClient(activity);
|
||||
|
||||
|
||||
}
|
||||
else Log.d("KP2AJ", "trying silent login failed.");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
else Log.d("KP2AJ", "trying silent login failed.");
|
||||
}
|
||||
return oneDriveClient != null;
|
||||
}
|
||||
|
@ -33,8 +33,9 @@ namespace keepass2android
|
||||
});
|
||||
b.SetNegativeButton(Resource.String.cancel, delegate { });
|
||||
b.SetTitle(GetString(AppNames.AppNameResource));
|
||||
b.SetOnDismissListener(this);
|
||||
|
||||
var dialog = b.Create();
|
||||
dialog.SetOnDismissListener(this);
|
||||
dialog.Show();
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@ 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_01e),
|
||||
ctx.GetString(Resource.String.ChangeLog_1_01f),
|
||||
ctx.GetString(Resource.String.ChangeLog_1_01d),
|
||||
ctx.GetString(Resource.String.ChangeLog_1_01),
|
||||
ctx.GetString(Resource.String.ChangeLog_1_0_0e),
|
||||
|
@ -218,9 +218,10 @@ namespace keepass2android
|
||||
App.SetErrorReportMode(this, App.ErrorReportMode.Disabled);
|
||||
launchNextActivity();
|
||||
});
|
||||
b.SetOnDismissListener(this);
|
||||
var dialog = b.Create();
|
||||
dialog.SetOnDismissListener(this);
|
||||
|
||||
b.Show();
|
||||
dialog.Show();
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:versionCode="91"
|
||||
android:versionName="1.01-e"
|
||||
android:versionCode="92"
|
||||
android:versionName="1.01-f"
|
||||
package="keepass2android.keepass2android"
|
||||
android:installLocation="auto">
|
||||
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="23" />
|
||||
|
@ -163,7 +163,7 @@ namespace keepass2android
|
||||
Kp2aLog.Log("OnRequestPermissionsResult " + (requestCode == FingerprintPermissionRequestCode) +
|
||||
((grantResults.Length > 0) && (grantResults[0] == Permission.Granted)));
|
||||
|
||||
if (requestCode == FingerprintPermissionRequestCode && grantResults[0] == Permission.Granted)
|
||||
if ((requestCode == FingerprintPermissionRequestCode) && (grantResults.Length > 0) && (grantResults[0] == Permission.Granted))
|
||||
{
|
||||
var btn = FindViewById<ImageButton>(Resource.Id.fingerprintbtn);
|
||||
btn.Click += (sender, args) =>
|
||||
|
@ -680,10 +680,11 @@
|
||||
<string name="ActivateAutoFillService_btnAutoFill">Use AutoFill service</string>
|
||||
<string name="ActivateAutoFillService_toast">Please enable the Keepass2Android service.</string>
|
||||
<string name="ShowKeyboardDuringFingerprintAuth">Show soft keyboard for password input when fingerprint scan is active.</string>
|
||||
<string name="ChangeLog_1_01e">
|
||||
Version 1.01-e\n
|
||||
<string name="ChangeLog_1_01f">
|
||||
Version 1.01-f\n
|
||||
* Fix for crash when trying to work offline\n
|
||||
* Fix for incorrect encoding of FTP(S) credentials\n
|
||||
* Fix for crashes when using OneDrive and on older Android versions\n
|
||||
* Display times as local time in entry screen\n
|
||||
</string>
|
||||
<string name="ChangeLog_1_01d">
|
||||
|
@ -316,6 +316,8 @@ namespace keepass2android
|
||||
}
|
||||
public Drawable GetResourceDrawable(string key)
|
||||
{
|
||||
if (key == "ic_storage_skydrive")
|
||||
key = "ic_storage_onedrive"; //resource was renamed. do this to avoid crashes with legacy file entries.
|
||||
var field = typeof(Resource.Drawable).GetField(key);
|
||||
if (field == null)
|
||||
throw new Exception("Invalid key " + key);
|
||||
|
Loading…
Reference in New Issue
Block a user