Skip to content

Commit

Permalink
actions: less warnings is more (fixes #3604) (#3607)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <[email protected]>
  • Loading branch information
strawberrybread and dogi authored Jun 13, 2024
1 parent 94d04db commit e5419ae
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "org.ole.planet.myplanet"
minSdkVersion 21
targetSdkVersion 34
versionCode 1584
versionName "0.15.84"
versionCode 1585
versionName "0.15.85"
ndkVersion '21.3.6528147'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,10 @@ abstract class BaseContainerFragment : BaseResourceFragment() {
FileProvider.getUriForFile(MainApplication.context, "${MainApplication.context.packageName}.fileprovider", it)
}

val intent = Intent(Intent.ACTION_INSTALL_PACKAGE)
intent.data = uri
intent.flags = Intent.FLAG_GRANT_READ_URI_PERMISSION or Intent.FLAG_ACTIVITY_NEW_TASK
val intent = Intent(Intent.ACTION_VIEW).apply {
setDataAndType(uri, "application/vnd.android.package-archive")
flags = Intent.FLAG_GRANT_READ_URI_PERMISSION or Intent.FLAG_ACTIVITY_NEW_TASK
}

if (intent.resolveActivity(requireActivity().packageManager) != null) {
if (hasInstallPermission(MainApplication.context)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@ abstract class BaseContainerFragment : BaseResourceFragment() {
// FileProvider.getUriForFile(MainApplication.context, "${MainApplication.context.packageName}.fileprovider", it)
// }
//
// val intent = Intent(Intent.ACTION_INSTALL_PACKAGE)
// intent.data = uri
// intent.flags = Intent.FLAG_GRANT_READ_URI_PERMISSION or Intent.FLAG_ACTIVITY_NEW_TASK
//
// val intent = Intent(Intent.ACTION_VIEW).apply {
// setDataAndType(uri, "application/vnd.android.package-archive")
// flags = Intent.FLAG_GRANT_READ_URI_PERMISSION or Intent.FLAG_ACTIVITY_NEW_TASK
// }
// if (intent.resolveActivity(requireActivity().packageManager) != null) {
// if (hasInstallPermission(MainApplication.context)) {
// startActivity(intent)
Expand Down

0 comments on commit e5419ae

Please sign in to comment.