Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] takePersistableUriPermission의 익셉션 처리 #273

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

minwooch
Copy link
Contributor

@minwooch minwooch commented Dec 2, 2024

#258

🤷‍♂️ Description

takePersistableUriPermission를 실패하는 기종이 있는 것 같습니다. SecurityException를 내뿜는데, 이를 무시하도록 했습니다.
해당 함수는 이 uri를, 앱을 껐다 켰을 때에도 접근 권한을 가지게 하는 함수로 알고 있습니다. 반대로 이 함수를 호출하지 않으면 임시적인 권한이므로 항상 호출하게 해 두었는데, 사실 우리 앱에서는 화면이 있을 때 이미지를 업로드하므로 임시적인 권한으로도 모두 처리가 가능할 것으로 생각됩니다.

실제로 이 함수 호출이 실패했을 때에는, cache 폴더 등에 복사해서 그 파일을 이용하는게 가장 완벽한 해결법인 것 같습니다.

@minwooch minwooch requested a review from a team as a code owner December 2, 2024 09:18
@minwooch minwooch self-assigned this Dec 2, 2024
Copy link
Contributor

@ruh0n ruh0n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

uri,
Intent.FLAG_GRANT_READ_URI_PERMISSION,
)
} catch (ignored: SecurityException) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignored 멋지시네요 :)
저는 그냥 _ 쓰는데

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

배겼음ㅎ

Copy link
Contributor

@flashdragon flashdragon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@easyhak easyhak added the 🐞 Bug 애플리케이션에서 발견된 오류나 예상하지 못한 동작을 보고합니다. label Dec 2, 2024
@easyhak easyhak merged commit 356452c into dev Dec 2, 2024
2 checks passed
@easyhak easyhak deleted the feature/fix-takePersistableUriPermission branch December 2, 2024 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug 애플리케이션에서 발견된 오류나 예상하지 못한 동작을 보고합니다.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants