Merge pull request #145 from Naveen3Singh/no_default_apps_in_prepaid

Remove default apps from prepaid variant
This commit is contained in:
Tibor Kaputa 2022-06-12 21:27:13 +02:00 committed by GitHub
commit ebaaf13ebd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 2 deletions

View File

@ -3,4 +3,5 @@
<bool name="show_donate_in_about">true</bool>
<bool name="hide_google_relations">true</bool>
<bool name="pretend_thank_you_installed">true</bool>
<bool name="add_default_apps">true</bool>
</resources>

View File

@ -14,7 +14,6 @@ import com.simplemobiletools.applauncher.extensions.isAPredefinedApp
import com.simplemobiletools.applauncher.models.AppLauncher
import com.simplemobiletools.commons.extensions.getIntValue
import com.simplemobiletools.commons.extensions.getStringValue
import java.util.*
class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(context, DB_NAME, null, DB_VERSION) {
private val MAIN_TABLE_NAME = "launchers"
@ -46,7 +45,9 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
"CREATE TABLE $MAIN_TABLE_NAME ($COL_ID INTEGER PRIMARY KEY AUTOINCREMENT, $COL_NAME TEXT, $COL_PKG_NAME TEXT UNIQUE, $COL_POSITION INTEGER," +
"$COL_WAS_RENAMED INTEGER, $COL_APP_ORDER INTEGER)"
)
addInitialLaunchers(db)
if (context.resources.getBoolean(R.bool.add_default_apps)) {
addInitialLaunchers(db)
}
}
override fun onUpgrade(db: SQLiteDatabase, oldVersion: Int, newVersion: Int) {

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="add_default_apps">true</bool>
</resources>

View File

@ -4,4 +4,5 @@
<bool name="hide_google_relations">true</bool>
<bool name="hide_all_external_links">true</bool>
<bool name="pretend_thank_you_installed">true</bool>
<bool name="add_default_apps">false</bool>
</resources>