Skip to content

Commit

Permalink
Stop requiring manual update progression
Browse files Browse the repository at this point in the history
  • Loading branch information
AbandonedCart committed Feb 6, 2024
1 parent 90b929b commit fc14457
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
10 changes: 6 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ android {
dimension "source"
manifestPlaceholders.storagePermission = "android.permission.MANAGE_EXTERNAL_STORAGE"
manifestPlaceholders.installPermission = "android.permission.REQUEST_INSTALL_PACKAGES"
manifestPlaceholders.updatesPermission = "android.permission.UPDATE_PACKAGES_WITHOUT_USER_ACTION"
buildConfigField "boolean", "GOOGLE_PLAY", "false"
}
google {
dimension "source"
isDefault true
manifestPlaceholders.storagePermission = "com.hiddenramblings.tagmo.BROWSER"
manifestPlaceholders.installPermission = "com.hiddenramblings.tagmo.UPDATING"
manifestPlaceholders.storagePermission = "${defaultConfig.applicationId}.BROWSER"
manifestPlaceholders.installPermission = "${defaultConfig.applicationId}.INSTALL"
manifestPlaceholders.updatesPermission = "${defaultConfig.applicationId}.UPDATES"
buildConfigField "boolean", "GOOGLE_PLAY", "true"
}
}
Expand Down Expand Up @@ -124,7 +126,7 @@ dependencies {
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'androidx.webkit:webkit:1.9.0'
implementation 'androidx.webkit:webkit:1.10.0'
wearosImplementation "androidx.wear:wear:1.3.0"

implementation 'com.android.billingclient:billing:6.1.0'
Expand All @@ -150,5 +152,5 @@ dependencies {

implementation 'org.lsposed.hiddenapibypass:hiddenapibypass:4.3'

implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3'
}
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<uses-permission android:name="${storagePermission}"
tools:ignore="ScopedStorage" />
<uses-permission android:name="${installPermission}" />
<uses-permission android:name="${updatesPermission}" />
<uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ class UpdateManager internal constructor(activity: BrowserActivity) {
val params = PackageInstaller.SessionParams(
PackageInstaller.SessionParams.MODE_FULL_INSTALL
)
if (!BuildConfig.GOOGLE_PLAY && Version.isTiramisu) {
params.setRequireUserAction(
PackageInstaller.SessionParams.USER_ACTION_NOT_REQUIRED
)
}
openSession(createSession(params))
}
val document = DocumentFile.fromSingleUri(applicationContext, apkUri)
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:8.1.1'
classpath 'com.android.tools.build:gradle:8.1.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.10"

// NOTE: Do not place your application dependencies here; they belong
Expand Down

0 comments on commit fc14457

Please sign in to comment.