You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -69,7 +71,7 @@ class SetupActivity : FoxActivity(), LanguageActivity {
69
71
if (ts.time > buildTime.time) {
70
72
val pm = packageManager
71
73
val intent =Intent(this, ExpiredActivity::class.java)
72
-
@Suppress("DEPRECATION") val resolveInfo = pm.queryIntentActivities(intent, 0)
74
+
val resolveInfo = pm.queryIntentActivities(intent, 0)
73
75
if (resolveInfo.size >0) {
74
76
startActivity(intent)
75
77
finish()
@@ -85,6 +87,67 @@ class SetupActivity : FoxActivity(), LanguageActivity {
85
87
}
86
88
}
87
89
val view:View= binding.root
90
+
// if our application id is "com.androidacy.mmm" or begins with it, check if com.fox2code.mmm is installed and offer to uninstall it. if we're com.fox2code.mmm, check if com.fox2code.mmm.fdroid or com.fox2code.mmm.debug is installed and offer to uninstall it
91
+
val ourPackageName =BuildConfig.APPLICATION_ID
92
+
val foxPkgName ="com.fox2code.mmm"
93
+
val foxPkgNameFdroid ="com.fox2code.mmm.fdroid"
94
+
val foxPkgNameDebug ="com.fox2code.mmm.debug"
95
+
val foxPkgNamePlay ="com.androidacy.mmm.play"
96
+
val androidacyPkgName ="com.androidacy.mmm"
97
+
val pm = packageManager
98
+
val intent =Intent(Intent.ACTION_MAIN, null)
99
+
intent.addCategory(Intent.CATEGORY_LAUNCHER)
100
+
val resolveInfoList = pm.queryIntentActivities(intent, 0)
101
+
for (resolveInfo in resolveInfoList) {
102
+
val packageName = resolveInfo.activityInfo.packageName
Copy file name to clipboardExpand all lines: app/src/main/kotlin/com/fox2code/mmm/utils/RuntimeUtils.kt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -159,7 +159,7 @@ class RuntimeUtils {
159
159
if (BuildConfig.DEBUG) Timber.i("Checking if we need to run setup")
160
160
// Check if context is the first launch using prefs and if doSetupRestarting was passed in the intent
161
161
val prefs =MainApplication.getSharedPreferences("mmm")!!
162
-
var firstLaunch = prefs.getString("last_shown_setup", null) !="v3"
162
+
var firstLaunch = prefs.getString("last_shown_setup", null) !="v4"
163
163
// First launch
164
164
// context is intentionally separate from the above if statement, because it needs to be checked even if the first launch check is true due to some weird edge cases
165
165
if (activity.intent.getBooleanExtra("doSetupRestarting", false)) {
0 commit comments