mirror of
https://github.com/moparisthebest/keepass2android
synced 2024-11-25 02:32:26 -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.
@ -83,21 +83,23 @@ public class OneDriveStorage extends JavaFileStorageBase
|
|||||||
private boolean isConnected(Activity activity) {
|
private boolean isConnected(Activity activity) {
|
||||||
if (oneDriveClient == null)
|
if (oneDriveClient == null)
|
||||||
{
|
{
|
||||||
Log.d("KP2AJ", "trying silent login");
|
try
|
||||||
if (msaAuthenticator.loginSilent() != null)
|
|
||||||
{
|
{
|
||||||
Log.d("KP2AJ", "ok: silent login");
|
Log.d("KP2AJ", "trying silent login");
|
||||||
try
|
if (msaAuthenticator.loginSilent() != null)
|
||||||
{
|
{
|
||||||
oneDriveClient = buildClient(activity);
|
Log.d("KP2AJ", "ok: silent login");
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
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;
|
return oneDriveClient != null;
|
||||||
}
|
}
|
||||||
|
@ -33,8 +33,9 @@ namespace keepass2android
|
|||||||
});
|
});
|
||||||
b.SetNegativeButton(Resource.String.cancel, delegate { });
|
b.SetNegativeButton(Resource.String.cancel, delegate { });
|
||||||
b.SetTitle(GetString(AppNames.AppNameResource));
|
b.SetTitle(GetString(AppNames.AppNameResource));
|
||||||
b.SetOnDismissListener(this);
|
|
||||||
var dialog = b.Create();
|
var dialog = b.Create();
|
||||||
|
dialog.SetOnDismissListener(this);
|
||||||
dialog.Show();
|
dialog.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ namespace keepass2android
|
|||||||
AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(ctx, Android.Resource.Style.ThemeHoloLightDialog));
|
AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(ctx, Android.Resource.Style.ThemeHoloLightDialog));
|
||||||
builder.SetTitle(ctx.GetString(Resource.String.ChangeLog_title));
|
builder.SetTitle(ctx.GetString(Resource.String.ChangeLog_title));
|
||||||
List<string> changeLog = new List<string>{
|
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_01d),
|
||||||
ctx.GetString(Resource.String.ChangeLog_1_01),
|
ctx.GetString(Resource.String.ChangeLog_1_01),
|
||||||
ctx.GetString(Resource.String.ChangeLog_1_0_0e),
|
ctx.GetString(Resource.String.ChangeLog_1_0_0e),
|
||||||
|
@ -218,9 +218,10 @@ namespace keepass2android
|
|||||||
App.SetErrorReportMode(this, App.ErrorReportMode.Disabled);
|
App.SetErrorReportMode(this, App.ErrorReportMode.Disabled);
|
||||||
launchNextActivity();
|
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"?>
|
<?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="91"
|
android:versionCode="92"
|
||||||
android:versionName="1.01-e"
|
android:versionName="1.01-f"
|
||||||
package="keepass2android.keepass2android"
|
package="keepass2android.keepass2android"
|
||||||
android:installLocation="auto">
|
android:installLocation="auto">
|
||||||
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="23" />
|
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="23" />
|
||||||
|
@ -158,12 +158,12 @@ namespace keepass2android
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, Permission[] grantResults)
|
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, Permission[] grantResults)
|
||||||
{
|
{
|
||||||
Kp2aLog.Log("OnRequestPermissionsResult " + (requestCode == FingerprintPermissionRequestCode) +
|
Kp2aLog.Log("OnRequestPermissionsResult " + (requestCode == FingerprintPermissionRequestCode) +
|
||||||
((grantResults.Length > 0) && (grantResults[0] == Permission.Granted)));
|
((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);
|
var btn = FindViewById<ImageButton>(Resource.Id.fingerprintbtn);
|
||||||
btn.Click += (sender, args) =>
|
btn.Click += (sender, args) =>
|
||||||
|
@ -680,10 +680,11 @@
|
|||||||
<string name="ActivateAutoFillService_btnAutoFill">Use AutoFill service</string>
|
<string name="ActivateAutoFillService_btnAutoFill">Use AutoFill service</string>
|
||||||
<string name="ActivateAutoFillService_toast">Please enable the Keepass2Android 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="ShowKeyboardDuringFingerprintAuth">Show soft keyboard for password input when fingerprint scan is active.</string>
|
||||||
<string name="ChangeLog_1_01e">
|
<string name="ChangeLog_1_01f">
|
||||||
Version 1.01-e\n
|
Version 1.01-f\n
|
||||||
* Fix for crash when trying to work offline\n
|
* Fix for crash when trying to work offline\n
|
||||||
* Fix for incorrect encoding of FTP(S) credentials\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
|
* Display times as local time in entry screen\n
|
||||||
</string>
|
</string>
|
||||||
<string name="ChangeLog_1_01d">
|
<string name="ChangeLog_1_01d">
|
||||||
|
@ -316,6 +316,8 @@ namespace keepass2android
|
|||||||
}
|
}
|
||||||
public Drawable GetResourceDrawable(string key)
|
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);
|
var field = typeof(Resource.Drawable).GetField(key);
|
||||||
if (field == null)
|
if (field == null)
|
||||||
throw new Exception("Invalid key " + key);
|
throw new Exception("Invalid key " + key);
|
||||||
|
Loading…
Reference in New Issue
Block a user