dkunzler / masterpassword

https://play.google.com/store/apps/details?id=de.devland.masterpassword
GNU General Public License v3.0
54 stars 11 forks source link

android m: export is broken for useLegacyFileManager true/false, import only for false #18

Closed stesachse closed 8 years ago

stesachse commented 8 years ago

export is not working at all. with useLegacyFileManager = true there is an exception after selecting the directory

java.io.FileNotFoundException: Is a directory
        at android.os.Parcel.openFileDescriptor(Native Method)
        at android.os.ParcelFileDescriptor.openInternal(ParcelFileDescriptor.java:270)
        at android.os.ParcelFileDescriptor.open(ParcelFileDescriptor.java:200)
        at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:937)
        at android.content.ContentResolver.openFileDescriptor(ContentResolver.java:795)
        at android.content.ContentResolver.openFileDescriptor(ContentResolver.java:749)
        at de.devland.masterpassword.export.Exporter.run(Exporter.java:144)
        at de.devland.masterpassword.shared.util.RequestCodeManager.execute(RequestCodeManager.java:67)
        at de.devland.masterpassword.shared.ui.BaseActivity.onActivityResult(BaseActivity.java:27)
        at android.app.Activity.dispatchActivityResult(Activity.java:6442)
        at android.app.ActivityThread.deliverResults(ActivityThread.java:3716)
        at android.app.ActivityThread.handleSendResult(ActivityThread.java:3763)
        at android.app.ActivityThread.-wrap16(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1403)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:148)
        at android.app.ActivityThread.main(ActivityThread.java:5443)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)

maybe because intent.getData() (Exporter.java:144) returns a path and the filename must be set as with the non legacy methode

with useLegacyFileManager = false there is a NullPointerException

java.lang.NullPointerException: Attempt to get length of null array
     at com.ianhanniballake.localstorage.LocalStorageProvider.queryChildDocuments(LocalStorageProvider.java:147)
     at android.provider.DocumentsProvider.query(DocumentsProvider.java:498)
     at android.content.ContentProvider.query(ContentProvider.java:1017)
     at android.content.ContentProvider$Transport.query(ContentProvider.java:238)
     at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:112)
     at android.os.Binder.execTransact(Binder.java:453)

the documents ui flashes up shortly and closes instantly. on the bottom of the screen is a error message R.string.error_generic. i have absolutely no clue of the reason. the documents ui works w/o problems in other apps.

for import with non legacy ui it's the same.

legacy file open ui works and the list is filtered for json files.

dkunzler commented 8 years ago

both should be working in the new version. Could you please try it?

Release will only go to 10% of installed apps at the moment. If you want to test ASAP you can install the apk directly by downloading it from the releases section here on github.

stesachse commented 8 years ago

works for me, thanks :)