This repository was archived by the owner on May 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
src/main/java/com/fox2code/mmm Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,25 @@ android {
2828 debuggable true
2929 }
3030 }
31+
32+ flavorDimensions " type"
33+ productFlavors {
34+ " default" {
35+ dimension " type"
36+ buildConfigField " boolean" , " ENABLE_AUTO_UPDATER" , " true"
37+ }
38+
39+ fdroid {
40+ dimension " type"
41+ applicationIdSuffix " .fdroid"
42+
43+ // Need to disable auto-updater for F-Droid flavor because their inclusion policy
44+ // forbids downloading blobs from third-party websites (and F-Droid APK isn't signed
45+ // with our keys, so the APK wouldn't install anyways).
46+ buildConfigField " boolean" , " ENABLE_AUTO_UPDATER" , " false"
47+ }
48+ }
49+
3150 compileOptions {
3251 sourceCompatibility JavaVersion . VERSION_1_8
3352 targetCompatibility JavaVersion . VERSION_1_8
Original file line number Diff line number Diff line change @@ -63,6 +63,8 @@ private AppUpdateManager() {
6363
6464 // Return true if should show a notification
6565 public boolean checkUpdate (boolean force ) {
66+ if (!BuildConfig .ENABLE_AUTO_UPDATER )
67+ return false ;
6668 if (!force && this .peekShouldUpdate ())
6769 return true ;
6870 long lastChecked = this .lastChecked ;
You can’t perform that action at this time.
0 commit comments