mirror of
https://github.com/SimpleMobileTools/Simple-App-Launcher.git
synced 2025-04-16 10:57:26 +02:00
add the selected launchers in the db
This commit is contained in:
parent
178d453dd6
commit
c8c78a0df5
@ -81,7 +81,9 @@ class MainActivity : SimpleActivity(), AddAppDialog.AddLaunchersInterface {
|
||||
}
|
||||
|
||||
override fun selectedLaunchers(launchers: ArrayList<AppLauncher>) {
|
||||
|
||||
for ((name, pkgName) in launchers) {
|
||||
dbHelper.addLauncher(name, pkgName)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
|
@ -36,7 +36,7 @@ class DbHelper(context: Context) : SQLiteOpenHelper(context, "launchers.db", nul
|
||||
addLauncher("Simple Notes", "com.simplemobiletools.notes", R.mipmap.notes, db)
|
||||
}
|
||||
|
||||
fun addLauncher(name: String, pkgName: String, iconId: Int, db: SQLiteDatabase = writableDatabase) {
|
||||
fun addLauncher(name: String, pkgName: String, iconId: Int = 0, db: SQLiteDatabase = writableDatabase) {
|
||||
val contentValues = ContentValues()
|
||||
contentValues.put(NAME, name)
|
||||
contentValues.put(PKG_NAME, pkgName)
|
||||
|
Loading…
x
Reference in New Issue
Block a user