Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

When selecting 'More'from dot menu when viewing an image opened from OpenCamera #20

Closed
apcro opened this issue Feb 20, 2020 · 2 comments

Comments

@apcro
Copy link
Owner

apcro commented Feb 20, 2020

Build version: v0.8.4
Build date: 1979-11-30 00:00:00
Current date: 2020-02-19 16:57:31
Device: HUAWEI STK-LX1

Stack trace:
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.getCanonicalPath()' on a null object reference
at androidx.core.content.FileProvider$SimplePathStrategy.getUriForFile(FileProvider.java:728)
at androidx.core.content.FileProvider.getUriForFile(FileProvider.java:418)
at com.alienpants.leafpicrevived.util.LegacyCompatFileProvider.getUri(LegacyCompatFileProvider.java:25)
at com.alienpants.leafpicrevived.activities.SingleMediaActivity.onOptionsItemSelected(SingleMediaActivity.java:563)
at android.app.Activity.onMenuItemSelected(Activity.java:3742)
at androidx.fragment.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:384)
at androidx.appcompat.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:219)
at androidx.appcompat.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:109)
at androidx.appcompat.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:109)
at androidx.appcompat.app.ToolbarActionBar$2.onMenuItemClick(ToolbarActionBar.java:64)
at androidx.appcompat.widget.Toolbar$1.onMenuItemClick(Toolbar.java:207)
at androidx.appcompat.widget.ActionMenuView$MenuBuilderCallback.onMenuItemSelected(ActionMenuView.java:781)
at androidx.appcompat.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:840)
at androidx.appcompat.view.menu.SubMenuBuilder.dispatchMenuItemSelected(SubMenuBuilder.java:90)
at androidx.appcompat.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:158)
at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:991)
at androidx.appcompat.view.menu.MenuPopup.onItemClick(MenuPopup.java:128)
at android.widget.AdapterView.performItemClick(AdapterView.java:321)
at android.widget.AbsListView.performItemClick(AbsListView.java:1234)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:3234)
at android.widget.AbsListView$3.run(AbsListView.java:4210)
at android.os.Handler.handleCallback(Handler.java:907)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:216)
at android.app.ActivityThread.main(ActivityThread.java:7625)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)

@apcro
Copy link
Owner Author

apcro commented Feb 20, 2020

getCurrentMedia().getFile() returns null in this instance.

@apcro
Copy link
Owner Author

apcro commented Feb 20, 2020

The expectation is that a path is returned for the selected media, however in some cases the selected media has no path, but has a uriString instead (for example, a media:// prefix)

@apcro apcro closed this as completed in 31c2dcd Feb 21, 2020
apcro added a commit that referenced this issue Feb 21, 2020
==================
* Update library versions to latest
* Fix "Two identically-named options in the "open with" menu"
- #13
* Fix "Crash when clicking the changelog button"
- #14
* Fix "Cannot play video"
- #15
* Fix ""About" links inconsistent"
- #18
* Fix an issue with `content://` vs `file://` media types when selecting 'Open With'
- #20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant