+ system_apps = [
+ "com.android.calculator2",
+ "com.android.camera2",
+ "com.android.contacts",
+ "com.android.deskclock",
+ "com.android.documentsui",
+ "com.android.email",
+ "com.android.gallery3d",
+ "com.android.inputmethod.latin",
+ "com.android.settings",
+ "com.google.android.gms",
+ "org.lineageos.eleven",
+ "org.lineageos.etar",
+ "org.lineageos.jelly",
+ "org.lineageos.recorder"
+ ]
+
+
+ def prepend_list(old_list, new_list):
+ for s in reversed(new_list):
+ if s not in old_list:
+ old_list.insert(0, s)
+
+ def glib_key_file_get_string_list(key_file, group, key):
+ try:
+ return key_file.get_string_list(group, key)
+ except:
+ return []
+
+ def glib_key_file_prepend_string_list(key_file, group, key, new_list):
+ old_list = glib_key_file_get_string_list(key_file, group, key)
+ prepend_list(old_list, new_list)
+ key_file.set_string_list(group, key, new_list)
+
+ def glib_key_file_has_value(key_file, group, key):
+ try:
+ key_file.get_value(group, key)
+ return True
+ except:
+ return False
+
+
+ # Creates, deletes, or updates desktop file
+ def updateDesktopFile(appInfo):